From cd951ec78c90d4fd86d516dce806d3172d1e79b3e5dc18036c1f5d686b26489d Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 18 Dec 2006 23:18:10 +0000 Subject: [PATCH 001/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=1 --- README.largedisk | 12 + README.loop-AES-v2.2d | 1231 +++++ README.loop-AES-v2.2d.SuSE | 11 + README.raw | 54 + addnote.c | 205 - adjtimex-1.20-nosyscall.diff | 18 + adjtimex-1.20.tar.bz2 | 3 + baselibs.conf | 12 - blkid.conf | 5 - cryptoloop.txt | 169 + etc.raw | 6 +- etc_filesystems | 5 - freeramdisk.tar.bz2 | 3 + guessfstype.8 | 13 + guessfstype2.patch | 48 + klogconsole-quiet.patch | 11 + klogconsole.diff | 27 + klogconsole.tar.bz2 | 3 + klogconsole.tar.xz | 3 - login.pamd | 9 - loop-AES-v3.0a-util-linux-2.12p.diff | 4345 ++++++++++++++++ make-sure-sbin-resp-usr-sbin-are-in-PATH.diff | 143 - mkzimage_cmdline.c | 6 +- mount-nfs-nonreserved | 61 + mount.8-acl.diff | 39 + nfsboot | 50 + nologin.8 | 63 + nologin.c | 58 + pre_checkin.sh | 37 - python-libmount.changes | 4582 ----------------- python-libmount.spec | 1335 ----- raw.init | 61 + raw.service | 17 - ready | 0 remote.pamd | 12 - renice.8 | 136 + runuser.pamd | 5 - schedutils-1.4.0.tar.bz2 | 3 + sm-notify-20060111.tar.bz2 | 3 + stupid-programmer.diff | 38 + su.default | 11 - su.pamd | 8 - time-1.7.dif | 20 + time-1.7.tar.gz | 3 + util-linux-2.11q-fs_mac.diff | 250 + util-linux-2.11u-nfs-mount_acl.diff | 85 + util-linux-2.11z-hwclock_geteuid.diff | 11 + util-linux-2.12-enablereplaybuild.diff | 20 + util-linux-2.12-hostid.diff | 137 + util-linux-2.12-mount_guessfstype.diff | 183 + util-linux-2.12-mountfallback.patch | 34 + util-linux-2.12-multipleraw.diff | 65 + util-linux-2.12-nfs-tcp.diff | 61 + util-linux-2.12-suse-compatibility.diff | 149 + util-linux-2.12a-mountbylabel-dm.patch | 63 + util-linux-2.12a-mountpointwithcolon.diff | 21 + util-linux-2.12a-procswapscheck.diff | 24 + util-linux-2.12h-mtablock.diff | 86 + util-linux-2.12h-short-passwords.diff | 55 + util-linux-2.12i-x86_64intel.diff | 22 + util-linux-2.12q-ionice.diff | 249 + util-linux-2.12q-mount--move.diff | 29 + util-linux-2.12q-nfsv4.patch | 628 +++ util-linux-2.12q-null.diff | 14 + util-linux-2.12q-strict-aliasing.diff | 11 + util-linux-2.12q-umount2-not-static.patch | 11 + util-linux-2.12r-cal_formatting.patch | 26 + util-linux-2.12r-external-prog-on-guess.diff | 133 + util-linux-2.12r-fdisk_llseek.patch | 234 + util-linux-2.12r-fdiskcyl.patch | 32 + util-linux-2.12r-fdiskwrap.patch | 382 ++ util-linux-2.12r-losetup_password.patch | 231 + util-linux-2.12r-mkswap_fix.patch | 15 + util-linux-2.12r-mount-by-uuid.patch | 53 + ...-mount-doubleslashessourceprefix-cifs.diff | 58 + util-linux-2.12r-mount-mtab-update.patch | 29 + util-linux-2.12r-mount.8-xfs-update.patch | 15 + util-linux-2.12r-nfs_remount_options.patch | 18 + util-linux-2.12r-nonfsmountfallback.diff | 31 + util-linux-2.12r-pagesize.patch | 12 + util-linux-2.12r-partx.patch | 118 + util-linux-2.12r-rawfixes.patch | 19 + util-linux-2.12r-readprofile-mapfile.patch | 45 + util-linux-2.12r-rpcsec-gss.patch | 114 + util-linux-2.12r-sec-manpage.patch | 51 + util-linux-2.12r-umount_nosysfs.patch | 11 + util-linux-2.12r.diff | 86 + util-linux-2.12r.tar.bz2 | 3 + util-linux-2.30.tar.sign | 17 - util-linux-2.30.tar.xz | 3 - util-linux-libvolume_id-support.patch | 523 ++ ...upport-for-setting-logical-blocksize.patch | 156 - ...u-cleanup-DMI-detection-return-codes.patch | 85 - util-linux-nfs-timeo.diff | 11 + util-linux-nfs.8.diff | 11 + util-linux-nodiratime.diff | 14 + util-linux-opt-hotplug.diff | 88 + util-linux-rpmlintrc | 14 - util-linux-systemd.changes | 4582 ----------------- util-linux-systemd.spec | 1335 ----- util-linux-wall.dif | 11 + util-linux-warn-nfsudp.diff | 118 + util-linux.changes | 2770 +--------- util-linux.keyring | 56 - util-linux.spec | 2606 +++++----- which-2.13.tar.gz | 3 + 106 files changed, 12653 insertions(+), 16558 deletions(-) create mode 100644 README.largedisk create mode 100644 README.loop-AES-v2.2d create mode 100644 README.loop-AES-v2.2d.SuSE create mode 100644 README.raw delete mode 100644 addnote.c create mode 100644 adjtimex-1.20-nosyscall.diff create mode 100644 adjtimex-1.20.tar.bz2 delete mode 100644 baselibs.conf delete mode 100644 blkid.conf create mode 100644 cryptoloop.txt delete mode 100644 etc_filesystems create mode 100644 freeramdisk.tar.bz2 create mode 100644 guessfstype.8 create mode 100644 guessfstype2.patch create mode 100644 klogconsole-quiet.patch create mode 100644 klogconsole.diff create mode 100644 klogconsole.tar.bz2 delete mode 100644 klogconsole.tar.xz delete mode 100644 login.pamd create mode 100644 loop-AES-v3.0a-util-linux-2.12p.diff delete mode 100644 make-sure-sbin-resp-usr-sbin-are-in-PATH.diff create mode 100644 mount-nfs-nonreserved create mode 100644 mount.8-acl.diff create mode 100644 nfsboot create mode 100644 nologin.8 create mode 100644 nologin.c delete mode 100644 pre_checkin.sh delete mode 100644 python-libmount.changes delete mode 100644 python-libmount.spec create mode 100644 raw.init delete mode 100644 raw.service create mode 100644 ready delete mode 100644 remote.pamd create mode 100644 renice.8 delete mode 100644 runuser.pamd create mode 100644 schedutils-1.4.0.tar.bz2 create mode 100644 sm-notify-20060111.tar.bz2 create mode 100644 stupid-programmer.diff delete mode 100644 su.default delete mode 100644 su.pamd create mode 100644 time-1.7.dif create mode 100644 time-1.7.tar.gz create mode 100644 util-linux-2.11q-fs_mac.diff create mode 100644 util-linux-2.11u-nfs-mount_acl.diff create mode 100644 util-linux-2.11z-hwclock_geteuid.diff create mode 100644 util-linux-2.12-enablereplaybuild.diff create mode 100644 util-linux-2.12-hostid.diff create mode 100644 util-linux-2.12-mount_guessfstype.diff create mode 100644 util-linux-2.12-mountfallback.patch create mode 100644 util-linux-2.12-multipleraw.diff create mode 100644 util-linux-2.12-nfs-tcp.diff create mode 100644 util-linux-2.12-suse-compatibility.diff create mode 100644 util-linux-2.12a-mountbylabel-dm.patch create mode 100644 util-linux-2.12a-mountpointwithcolon.diff create mode 100644 util-linux-2.12a-procswapscheck.diff create mode 100644 util-linux-2.12h-mtablock.diff create mode 100644 util-linux-2.12h-short-passwords.diff create mode 100644 util-linux-2.12i-x86_64intel.diff create mode 100644 util-linux-2.12q-ionice.diff create mode 100644 util-linux-2.12q-mount--move.diff create mode 100644 util-linux-2.12q-nfsv4.patch create mode 100644 util-linux-2.12q-null.diff create mode 100644 util-linux-2.12q-strict-aliasing.diff create mode 100644 util-linux-2.12q-umount2-not-static.patch create mode 100644 util-linux-2.12r-cal_formatting.patch create mode 100644 util-linux-2.12r-external-prog-on-guess.diff create mode 100644 util-linux-2.12r-fdisk_llseek.patch create mode 100644 util-linux-2.12r-fdiskcyl.patch create mode 100644 util-linux-2.12r-fdiskwrap.patch create mode 100644 util-linux-2.12r-losetup_password.patch create mode 100644 util-linux-2.12r-mkswap_fix.patch create mode 100644 util-linux-2.12r-mount-by-uuid.patch create mode 100644 util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff create mode 100644 util-linux-2.12r-mount-mtab-update.patch create mode 100644 util-linux-2.12r-mount.8-xfs-update.patch create mode 100644 util-linux-2.12r-nfs_remount_options.patch create mode 100644 util-linux-2.12r-nonfsmountfallback.diff create mode 100644 util-linux-2.12r-pagesize.patch create mode 100644 util-linux-2.12r-partx.patch create mode 100644 util-linux-2.12r-rawfixes.patch create mode 100644 util-linux-2.12r-readprofile-mapfile.patch create mode 100644 util-linux-2.12r-rpcsec-gss.patch create mode 100644 util-linux-2.12r-sec-manpage.patch create mode 100644 util-linux-2.12r-umount_nosysfs.patch create mode 100644 util-linux-2.12r.diff create mode 100644 util-linux-2.12r.tar.bz2 delete mode 100644 util-linux-2.30.tar.sign delete mode 100644 util-linux-2.30.tar.xz create mode 100644 util-linux-libvolume_id-support.patch delete mode 100644 util-linux-losetup-Add-support-for-setting-logical-blocksize.patch delete mode 100644 util-linux-lscpu-cleanup-DMI-detection-return-codes.patch create mode 100644 util-linux-nfs-timeo.diff create mode 100644 util-linux-nfs.8.diff create mode 100644 util-linux-nodiratime.diff create mode 100644 util-linux-opt-hotplug.diff delete mode 100644 util-linux-rpmlintrc delete mode 100644 util-linux-systemd.changes delete mode 100644 util-linux-systemd.spec create mode 100644 util-linux-wall.dif create mode 100644 util-linux-warn-nfsudp.diff delete mode 100644 util-linux.keyring create mode 100644 which-2.13.tar.gz diff --git a/README.largedisk b/README.largedisk new file mode 100644 index 0000000..854dd3d --- /dev/null +++ b/README.largedisk @@ -0,0 +1,12 @@ +Some hints on fdisk and large disks (> 2TB) +------------------------------------------- + +Note that fdisk only supports legacy partition tables. +Legacy partition tables (like DOS) use 32 bit LBA addressing, +which means that you can only address partitions with a starting +sector and a size with a maximum of 2**32 sectors = 2TB. +This means you can not create partitions that are greater than 2TB +with fdisk! +If you want to use partition sizes above this limit, you need to use +GUID Partition Tables (GPT) which use 64 bit LBA addressing. +They are supported by parted. diff --git a/README.loop-AES-v2.2d b/README.loop-AES-v2.2d new file mode 100644 index 0000000..c3903f9 --- /dev/null +++ b/README.loop-AES-v2.2d @@ -0,0 +1,1231 @@ +Written by Jari Ruusu , October 26 2004 + +Copyright 2001,2002,2003,2004 by Jari Ruusu. +Redistribution of this file is permitted under the GNU Public License. + + +Table of Contents +~~~~~~~~~~~~~~~~~ +1. Loop device primer +2. General information +2.1. Key setup and IV modes +2.2. Use of journaling file systems on loop device +2.3. Use of offsets and sizelimits +2.4. Use of software suspend +2.5. File system soft block sizes +2.6. Compatibility with earlier versions +3. Instructions for building loop.o driver +4. Instructions for building new mount, umount, losetup, swapon and swapoff +5. Instructions for building new gpg +6. Testing the loop.o driver and losetup program +7. Examples +7.1 Example 1 - Encrypting swap on 2.4 and newer kernels +7.2. Example 2 - Partition backed loop with gpg encrypted key file +7.3. Example 3 - Encrypted partition that multiple users can mount +7.4. Example 4 - Encrypting /tmp partition with random keys +7.5. Example 5 - Encrypting root partition +7.6. Example 6 - Boot from CD-ROM + encrypted root partition +8. Security levels +9. Performance tuning for 2.4 and newer kernels +10. Files +11. Credits + + +1. Loop device primer +~~~~~~~~~~~~~~~~~~~~~ +Loop devices are block devices that do not store any data directly but loop +all reads and writes to underlying block device or file, possibly encrypting +and decrypting data in the process. Normally you don't write to a loop +device directly, but set up a file system on it. The file system will then +read from and write to loop device. + +By default, 8 loop devices are available: /dev/loop0, /dev/loop1 ... +/dev/loop7 (on devfs /dev/loop/0 ... /dev/loop/7). All devices are +identical, and each can be tied to one real block device or one file on some +file system. You have to decide and allocate which loop to use for which +purpose. + +losetup(8) program is used to make and tear down the connection between a +loop device and underlying device or file. You don't have to specify type of +underlying device as loop driver detects that automatically. mount(8), +umount(8), swapon(8) and swapoff(8) programs can also set up and tear down +loop devices. + +File backed loops may deadlock under some kernel + file system combinations. +So, if you can choose between device backed and file backed, choose device +backed even if it means that you have to re-partition your disks. + + +2. General information +~~~~~~~~~~~~~~~~~~~~~~ +This package provides loadable Linux kernel module (loop.o or loop.ko on 2.6 +kernels) that has AES cipher built-in. The AES cipher can be used to encrypt +local file systems and disk partitions. + +Loop device encrypts data but does not authenticate ciphertext. In other +words, it delivers data privacy, but does not guarantee that data has not +been tampered with. Admins setting up encrypted file systems should ensure +that neither ciphertext, nor tools used to access ciphertext (kernel + +kernel modules, mount, losetup, and other utilities) can be trojaned or +tampered. + +This package does *not* modify your kernel in any way, so you are free to +use kernels of your choice, with or without cool patches. This package works +with 2.0.x, 2.2.x, 2.4.x (2.4.7 or later) and 2.6.x kernels. + +Latest version of this package can be found at: + + http://loop-aes.sourceforge.net/ + http://members.tiscali.fi/ce6c8edf/ (limited downloads) + +New versions are announced to linux-crypto mailing list: + + http://mail.nl.linux.org/linux-crypto/ + http://www.spinics.net/lists/crypto/ + +List-subscribe: + + +2.1. Key setup and IV modes +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The AES cipher is used in CBC (cipher block chaining) mode. Data is +encrypted and decrypted in 512 byte chains. Two key setup modes are +supported; single-key mode and multi-key mode. Single-key mode uses simple +sector IV and one AES key to encrypt and decrypt all sectors in the loop +device. Multi-key mode uses cryptographically more secure MD5 IV and 64 +different AES keys to encrypt and decrypt sectors in the loop device. In +multi-key mode first key is used for first sector, second key for second +sector, and so on. + +Password string has a minimum length of 20 characters. Optional password +seed (salt) and key iteration count can be used to slow down dictionary +attacks. Password seed is appended to user supplied password before password +is hashed using one way hash. If password iteration count is specified, +password hash output is encrypted N thousand times using AES-256. Unique +seed prevents an adversary from precomputing hashes of passwords in his +dictionary in advance, and thus making an optimized attack slower. Large +password iteration count makes dictionary attack painfully slow. + +If encryption type is specified as AES128 or AES, password string is hashed +with SHA-256, and 128 bit AES encryption is used. If encryption type is +specified as AES192, password string is hashed with SHA-384, and 192 bit AES +encryption is used. If encryption type is specified as AES256, password +string is hashed with SHA-512, and 256 bit AES encryption is used. + + +2.2. Use of journaling file systems on loop device +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Don't use a journaling file system on top of file backed loop device. Device +backed loop device can be used with journaling file systems as device backed +loops guarantee that writes reach disk platters in order required by +journaling file system (write caching must be disabled on the disk drive, of +course). With file backed loop devices, correct write ordering may extend +only to page cache (which resides in RAM) of underlying file system. VM can +write such pages to disk in any order it wishes, and thus break write order +expectation of journaling file system. + + +2.3. Use of offsets and sizelimits +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +losetup and mount programs support using offset to underlying device or +file. 2.4.x and later kernels also support use of sizelimit that limit size +of device to some subset of full underlying device or file size. Both offset +and sizelimit are specified in bytes. If no offset is specified, zero offset +is used. If no sizelimit is specified, full device/file size is used. If you +do use nonzero offsets, make sure offset is integer multiple of 512 bytes. +Nonzero offsets that are not integer multiple of 512 bytes are NOT supported +as they may be nonportable and/or nonworking. + + +2.4. Use of software suspend +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Encryption keys are kept in kernel RAM while loop is active. Key is +immediately erased when loop is deactivated. Use of suspend-to-disk while +there are active encrypted loops should be used with caution: it would be +really bad security wise because encryption keys are written to disk when +kernel RAM is saved to disk. Once key is written to disk it may be +recoverable from that disk pretty much forever. Security of data encrypted +with such recoverable key is void. + + +2.5. File system soft block sizes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +If you intend to move encrypted file system to some other device (CD-ROM for +example), be sure to create file system with soft block size that is integer +multiple of device hard sector size. CD-ROMs have 2048 byte sectors. File +system with 1024 byte soft block size is not going to work with all CD-ROM +drives and/or drivers. + + +2.6. Compatibility with earlier versions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This version is compatible with on-disk formats of all previous relased +versions. This version is compatible with recommended mount, losetup and +swapon command line syntax and /etc/fstab option syntax since +loop-AES-v1.1b. + +Unhashed encryption type as created using ancient loop-AES-v1.0c, now needs +'mount -o phash=unhashed1' or 'losetup -H unhashed1' options. + +Mount and losetup programs from loop-AES-v2.0g and older accepted unlimited +long passphrase when passphrase was read from a file descriptor using '-p 0' +option. To prevent abuse of mlock()ed RAM by non-root users, mount and +losetup programs from loop-AES-v2.1a and newer limit max passphrase length +to 4094 bytes. + + +3. Instructions for building loop.o driver +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Before you attempt to build loop.o driver (loop.ko on 2.6 kernels), you +*must* configure, compile and install new kernel so that CONFIG_MODULES=y +and CONFIG_BLK_DEV_LOOP=n. Also, CONFIG_KMOD=y is recommended but not +required (kernel 2.0 doesn't have CONFIG_KMOD, set CONFIG_KERNELD=y +instead). Configuring your kernel so that loop driver is built-in +(CONFIG_BLK_DEV_LOOP=y) or module (CONFIG_BLK_DEV_LOOP=m) will *not* work. +After building and installing your new kernel, do not attempt to clean +kernel tree, or rename path to kernel sources. + +(Re)configuring and (re)compiling your kernel are required for following +reasons: (1) to disable loop driver in your kernel, (2) to get your kernel +sources to match your running kernel, (3) to get your kernel .config to +match your running kernel, (4) to set up configure time generated links +properly, (5) to generate compile time created header files properly to +match your kernel configuration. Failure to fulfill *all* above requirements +may cause loop.o driver compilation to fail or generate incorrectly +operating code. If you are just upgrading existing loop-AES with newer +version, there is no need to recompile kernel or reboot. Just unmount all +file systems using old loop driver, and remove loop driver from kernel with +rmmod command before compiling new loop driver. + +This is how loop.o is compiled and installed: + +2.2 and older kernels: Makefile copies your kernel's loop.c to this + directory. Then, Makefile patches that copy with a + kernel version specific patch. If patching a copy of + your kernel's loop.c fails, then a local copy of + known-to-work and patch-able loop.c-2.X.original is + used instead. + +2.4 and newer kernels: Makefile copies pre-patched loop.c-2.X.patched to + file called patched-loop.c. + +Resulting patched-loop.c along with other source files is then compiled and +linked to form a new loop.o driver that is (usually) installed in +/lib/modules/`uname -r`/block directory. AES cipher is permanently glued to +loop.o driver so that when loop.o is loaded it automagically has AES support +built in. There is no need to define any aliases in /etc/modules.conf file. + +To compile and install loop.o driver, as root, use commands: + + make clean + make + +Makefile tries to locate running kernel source directory, steal definitions +from kernel Makefile, and build a version that matches your running kernel. +Following directories are tried, in this order: + + /lib/modules/`uname -r`/source + /lib/modules/`uname -r`/build + /usr/src/linux + /usr/src/linux-`uname -r` + /usr/src/kernel-source-`uname -r` + +You can override automatic kernel source directory detection by specifying +LINUX_SOURCE like this: make LINUX_SOURCE=/usr/src/linux-2.4.22aa1 + +Both LINUX_SOURCE and KBUILD_OUTPUT must be specified when compiling for +2.6.x kernel with separate object directory. + +You can disable automatic module installation and creation of module +dependencies by specifying MODINST=n RUNDM=n on make command line. + +Automatic kernel source directory detection is not foolproof. For best +results, always specify LINUX_SOURCE, especially if loop.o module appears to +compile for wrong kernel. Observe last five lines of make output for clues. + +If you are upgrading your kernel and you need loop.o module during boot, you +probably need to build new version of loop.o module that matches your new +kernel *before* you boot the new kernel. To build loop.o module for other +kernel than running kernel, you *must* specify LINUX_SOURCE parameter to +make. + +You can override default installation root directory by specifying +INSTALL_MOD_PATH like this: make INSTALL_MOD_PATH=/path/to/destination/root + +Makefile detects processor type from kernel configuration. If selected +processor type is x86 processor or AMD64 processor, optimized assembler +implementations of AES and MD5 are used instead of C implementations. If you +want to unconditionally disable x86 assembler AES and MD5 implementations, +specify X86_ASM=n on make command line. If you want to unconditionally +disable AMD64 assembler AES and MD5 implementations, specify AMD64_ASM=n on +make command line. + +If you want to enable encryption key scrubbing, specify KEYSCRUB=y on make +command line. Loop encryption key scrubbing moves and inverts key bits in +kernel RAM so that the thin oxide which forms the storage capacitor +dielectric of DRAM cells is not permitted to develop detectable property. +For more info, see Peter Gutmann's paper: +http://www.cs.auckland.ac.nz/~pgut001/pubs/secure_del.html + +Note: If your patch program is very old, it may not understand the --dry-run +option, and may puke lengthy error messages. Even if that happens, the build +process should still produce a working loop driver. + + +4. Instructions for building new mount, umount, losetup, swapon and swapoff +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +In order to support AES and other ciphers, mount, umount, losetup, swapon +and swapoff need to be patched and recompiled. A patch is included. Mount, +umount, losetup, swapon and swapoff sources are in util-linux package which +you can get from: + + ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/ + or + ftp://ftp.kernel.org/pub/linux/utils/util-linux/ + +Just in case if the tarball is not properly signed, the md5 sum of +util-linux-2.12h.tar.gz is f8f1b2096abbf52fadf86d470c5035dd + +Do *not* install all the utilities in the util-linux package without +thinking. You may ruin your system if you do that. Read the INSTALL file +provided with util-linux tarball. + +These commands, as root user, will recompile and install mount, umount, +losetup, swapon, swapoff and their man pages: + + zcat util-linux-2.12h.tar.gz | tar xvf - + cd util-linux-2.12h + patch -p1 <../util-linux-2.12h.diff + CFLAGS=-O2 ./configure + make SUBDIRS="lib mount" + cd mount + install -m 4755 -o root mount umount /bin + install -m 755 losetup swapon /sbin + rm -f /sbin/swapoff && ( cd /sbin && ln -s swapon swapoff ) + rm -f /usr/share/man/man8/{mount,umount,losetup,swapon,swapoff}.8.gz + install -m 644 mount.8 umount.8 losetup.8 /usr/share/man/man8 + install -m 644 swapon.8 swapoff.8 /usr/share/man/man8 + rm -f /usr/share/man/man5/fstab.5.gz + install -m 644 fstab.5 /usr/share/man/man5 + mandb + cd ../.. + +Debian users may want to put mount package on hold like this: + + echo mount hold | dpkg --set-selections + + +5. Instructions for building new gpg +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +When gpg encrypts data with symmetric cipher only or when gpg encrypts +secret keyring keys with secret passphrase, gpg uses seeded (salted) and +iterated key setup. However, default amount of iteration is tuned for slow +processors and can be increased for better resistance against dictionary +attacks. Larger key iteration makes key setup much slower, but also makes +dictionary attacks much slower too. + +Included optional gpg patch makes gpg password iteration 128 times slower. +gpg stores new iteration value along with seed bytes into symmetric cipher +encrypted output file or secret keyring, so unpatched gpg versions will read +and decrypt the data just fine. + +gpg sources are available from: + + ftp://ftp.gnupg.org/gcrypt/gnupg/ + +These commands, as root user, will recompile and install gpg and gpgv and +their man pages: + + zcat gnupg-1.2.6.tar.gz | tar xvf - + cd gnupg-1.2.6 + patch -p1 <../gnupg-1.2.6.diff + CFLAGS="-O2" LDFLAGS="-static -s" ./configure --prefix=/usr --enable-static-rnd=linux + make + rm -f /usr/share/man/man1/{gpg,gpgv}.1.gz + make install + chown root.root /usr/bin/gpg + chmod 4755 /usr/bin/gpg + +Note: Above instructions create statically linked version of gpg. Static +linking is necessary if you ever decide to encrypt your root partition. + +If /usr/bin directory is not on your root partition, then it is necessary to +move gpg to /bin directory on your root partition: + + cd /usr/bin + mv gpg ../../bin + ln -s ../../bin/gpg gpg + +Debian users may want to put gnupg package on hold like this: + + echo gnupg hold | dpkg --set-selections + + +6. Testing the loop.o driver and losetup program +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Run this command, as root, and Makefile will run series of tests. + + make tests + +Makefile will display "*** Test results ok ***" message if tests are +completed successfully. If tests fail, do not use the driver as it is +broken. + +If gpg isn't available, then tests that involve decrypting gpg encrypted key +files will fail. You can skip gpg key file tests by specifying +TEST_GPG_TYPES=n on make command line. + + +7. Examples +~~~~~~~~~~~ +Many of following examples depend on gpg encrypted key file. gpg appears to +prevent its own keys from being leaked to swap, but does not appear to +prevent data handled by it from being leaked to swap. In gpg encrypted key +file cases, the data handled by gpg are loop encryption keys, and they may +leak to swap. Therefore, use of gpg encrypted key file depends on encrypted +swap. + +When using gpg encrypted key file, the password that is used to encrypt the +key file is the password that losetup and mount programs want. losetup and +mount programs run gpg to decrypt the key file, and pipe the password to +gpg. gpg then decrypts the file and pipes the real loop keys back to losetup +or mount program. + +Many of following examples need uuencode program. Not all boxes have it +installed by default. If you need to install uuencode program, it is usually +part of sharutils package. + +Many of following examples attempt to use loop in multi-key mode and thus +*require* losetup/mount programs from loop-AES-v2.0b or later. Setting up +multi-key gpg key-file and using that key-file with old single-key only +aware losetup/mount programs is *dangerous*. In multi-key loop cases +"losetup -a" command run by root user should output "multi-key" indicating +that loop is really in multi-key mode. If no "multi-key" string shows up, +your loop setup is a time bomb. If you later upgrade your losetup/mount +programs to version that can understand multi-key mode, those new +losetup/mount programs will correctly setup loop in multi-key mode instead +of single-key mode, and you may not be able to access your data any more. +New losetup/mount programs are compatible with both single-key and multi-key +key-files. New losetup/mount programs will recognize single-key key-files +and set up loop in single-key mode in those cases. Old single-key only aware +losetup/mount programs need single-key examples. None of the following gpg +key-file examples are such. + + +7.1. Example 1 - Encrypting swap on 2.4 and newer kernels +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Device backed (partition backed) loop is capable of encrypting swap on 2.4 +and newer kernels. File backed loops can't be used for swap. + +First, run "swapoff -a" to turn off swap devices in your /etc/fstab file. +Second, add "loop=/dev/loop?" and "encryption=AES128" options to swap lines +in your /etc/fstab file. Example: + + /dev/hda666 none swap sw,loop=/dev/loop6,encryption=AES128 0 0 + ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ +Third, there may be old unencrypted data on your swap devices, in which case +you can try to overwrite that data with command like this: + + dd if=/dev/zero of=/dev/hda666 bs=64k conv=notrunc + mkswap /dev/hda666 + +Fourth, run "swapon -a" and "rm -rf /var/log/ksymoops" and you are done. + +Running "swapon -a" will set up loop devices using random keys, run mkswap +on them, and enable encrypted swap on specified loop devices. Usually your +distro's startup scripts will run the "swapon -a" command so you don't need +to change your startup scripts at all. As expected, "swapoff -a" will tear +down such loop devices. + +Removing /var/log/ksymoops directory is often required because some versions +of modprobe (part of modutils package) try to log loaded modules to +/var/log/ksymoops/*.log files. This is bad because swap is often enabled +(and loop.o modprobe'd to kernel) before any partitions are mounted +writable. Without /var/log/ksymoops directory on root partition, modprobe +will not try to log loaded modules, and you won't see annoying error +messages. + +Note: If you are using encrypted swap and you are upgrading your kernel, you +probably need to build new version of loop.o module that matches your new +kernel *before* you boot the new kernel. See "Instructions for building +loop.o driver" section for more details. + + +7.2. Example 2 - Partition backed loop with gpg encrypted key file +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This example, originally from Michael H. Warfield, shows how to create an +ext2 file system on encrypted hard disk partition, and creates 64 random +encryption keys that are encrypted using gpg. Store the key file where ever +you like, on separate removable media, USB dongle, or on a smart card if you +like. You have to have both your passphrase and that key file in order to +mount that file system. + +This example uses a fictitious partition /dev/hda666 for storage and +fictitious directory /mnt666 as mount point. A removable USB dongle is +assumed to be (auto-)mounted at /a/usbdongle directory. + +Create 64 random encryption keys and encrypt those keys using gpg. Reading +from /dev/random may take indefinitely long if kernel's random entropy pool +is empty. If that happens, do some other work on some other console (use +keyboard, mouse and disks). Use of gpg encrypted key file depends on +encrypted swap. + + head -c 2880 /dev/random | uuencode -m - | head -n 65 | tail -n 64 \ + | gpg --symmetric -a >/a/usbdongle/keyfile.gpg + +Fill the partition with random looking data. "dd" command may take a while +to execute if partition is large. + + head -c 15 /dev/urandom | uuencode -m - | head -n 2 | tail -n 1 \ + | losetup -p 0 -e AES128 /dev/loop3 /dev/hda666 + dd if=/dev/zero of=/dev/loop3 bs=4k conv=notrunc 2>/dev/null + losetup -d /dev/loop3 + +Add this to your /etc/fstab file: + + /dev/hda666 /mnt666 ext2 defaults,noauto,loop=/dev/loop3,encryption=AES128,gpgkey=/a/usbdongle/keyfile.gpg 0 0 + +The "losetup -F" command asks for passphrase to unlock your key file. +Losetup -F option reads loop related options from /etc/fstab. Partition name +/dev/hda666, encryption=AES128 and gpgkey=/a/usbdongle/keyfile.gpg come from +/etc/fstab. + + losetup -F /dev/loop3 + mkfs -t ext2 /dev/loop3 + losetup -d /dev/loop3 + mkdir /mnt666 + +Now you should be able to mount the file system like this. The "mount" +command asks for passphrase to unlock your key file. + + mount /mnt666 + +Check that loop is really in multi-key mode. Losetup -a output should +include string "multi-key" indicating that loop is really in multi-key mode. +If no "multi-key" string shows up, you somehow managed to mess up gpg key +file generation part or you are trying to use old losetup/mount programs +that only understand single-key mode. + + losetup -a + +You can unmount partition like this: + + umount /mnt666 + +Unmounted filesystem can be fsck'ed like this. -F option reads loop related +options from /etc/fstab. Partition name /dev/hda666, encryption=AES128 and +gpgkey=/a/usbdongle/keyfile.gpg come from /etc/fstab. + + losetup -F /dev/loop3 + fsck -t ext2 -f -y /dev/loop3 + losetup -d /dev/loop3 + + +7.3. Example 3 - Encrypted partition that multiple users can mount +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This example shows how to create encrypted partition that multiple non-root +users can mount, each with their own gpg key. Non-root users don't have +access to file system key that is actually used to encrypt data. Root can +add or remove user's permission to mount encrypted partition at any time. +This example uses a fictitious partition /dev/hda666 for storage and +fictitious directory /secret1 as mount point. + +Create 64 random file system keys and encrypt those keys using root's gpg +public key. Reading from /dev/random may take indefinitely long if kernel's +random entropy pool is empty. If that happens, do some other work on some +other console (use keyboard, mouse and disks). Use of gpg encrypted key file +depends on encrypted swap. + + umask 077 + head -c 2880 /dev/random | uuencode -m - | head -n 65 | tail -n 64 \ + | gpg -e -a -r "Superuser" > /root/masterkey-secret1.gpg + +Fill the partition with random looking data. "dd" command may take a while +to execute if partition is large. + + head -c 15 /dev/urandom | uuencode -m - | head -n 2 | tail -n 1 \ + | losetup -p 0 -e AES128 /dev/loop0 /dev/hda666 + dd if=/dev/zero of=/dev/loop0 bs=4k conv=notrunc 2>/dev/null + losetup -d /dev/loop0 + +Use file system keys to setup /dev/loop0 to partition /dev/hda666 and create +encrypted ext2 file system. The "losetup -e" command asks for root's gpg +passphrase to unlock root's secret gpg key. + + losetup -e AES128 -K /root/masterkey-secret1.gpg /dev/loop0 /dev/hda666 + mkfs -t ext2 /dev/loop0 + losetup -d /dev/loop0 + mkdir /secret1 + +Add mount information to /etc/fstab file. Something like this: + + /dev/hda666 /secret1 ext2 defaults,user,noauto,encryption=AES128,loop=/dev/loop0,gpgkey=/etc/userkey-secret1.gpg 0 0 + ^^^^ +You may want to check non-obvious side effects of above "user" mount option. +It's all explained in mount man page. + +Create root-only-readable /etc/userkey-secret1.gpg file which contains file +system key encrypted with each user's public key. List all users as +recipient who should be able to mount /secret1 encrypted partition. Repeat +this every time you want to add or remove users. + + umask 077 + gpg --decrypt < /root/masterkey-secret1.gpg | gpg -e -a --always-trust \ + -r "Superuser" -r "John Doe" -r "Tea Lipton" > /etc/userkey-secret1.gpg + +Users can mount encrypted partition like this. mount asks for gpg passphrase +to unlock user's secret gpg key. Each user can use their own gpg key. + + mount /secret1 + +Root user can check that loop is really in multi-key mode. Losetup -a output +should include string "multi-key" indicating that loop is really in +multi-key mode. If no "multi-key" string shows up, you somehow managed to +mess up gpg key file generation part or you are trying to use old +losetup/mount programs that only understand single-key mode. + + losetup -a + +You can unmount partition like this: + + umount /secret1 + +Root user can fsck unmounted filesystem like this. -F option reads loop +related options from /etc/fstab. Partition name /dev/hda666, +encryption=AES128 and gpgkey=/etc/userkey-secret1.gpg come from /etc/fstab. + + losetup -F /dev/loop0 + fsck -t ext2 -f -y /dev/loop0 + losetup -d /dev/loop0 + + +7.4. Example 4 - Encrypting /tmp partition with random keys +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +When mount passphrase hash function is specified as random, mount does not +ask for password but sets up 64 random keys and attempts to put loop to +multi-key mode and creates new file system on that encrypted loop device +before that file system is mounted. + +First, unmount your existing /tmp partition by running "umount /tmp". There +may be open files in there, so you may have to do this from single user +mode. + +Second, add loop= encryption= and phash=random mount options to /etc/fstab +file. The sixth /etc/fstab field (fs_passno) must be zero so that fcsk will +not attempt to check this partition. + + /dev/hda555 /tmp ext2 defaults,loop=/dev/loop2,encryption=AES128,phash=random/1777 0 0 + ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^ +Third, run "mount /tmp" command and you are done. + +Octal digits after phash=random/ mount option specify initial permissions of +file system root directory that gets created on the loop device. 1777 means +read+write+search permissions for all and sticky bit set. Type "man 2 stat" +for more info about what each bit stands for. + +Encryption keys and plaintext data on above type mount vanish on unmount or +power off. Using journaled file system in such case does not make much +sense, because file system is re-created with different encryption keys on +each mount, and file system jounal is never used. + +This example requires that mount program is derived from util-linux patch +found in loop-AES-v2.2d or later version. + + +7.5. Example 5 - Encrypting root partition +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Encrypting root partition requires a small unencrypted /boot partition. +Everything else (root, swap and other partitions) can be encrypted. Kernels +and tools required to boot kernels reside in the /boot partition. Included +build-initrd.sh script builds a small "initrd" ram-disk that works with 2.2 +2.4, and 2.6 kernels. build-initrd.sh script depends on having minix file +system support in the kernel and working mkfs.minix program binary. +Util-linux includes source for mkfs.minix if you don't have it and need to +build it yourself. You need to temporarily boot from rescue floppy/CD-ROM or +other partition to do the actual encrypting work. The rescue floppy/CD-ROM +or other partition kernel doesn't need to support loop crypto, so just about +anything that boots will work. + +1) build-initrd.sh script needs dietlibc. Dietlibc source is available + from: + + http://www.fefe.de/dietlibc/ + ftp://ftp.kernel.org/pub/linux/libs/dietlibc/ + + To compile and install dietlibc, follow instructions in the dietlibc + README file. For example, on a x86 box, do this: + + make + install bin-i386/diet /usr/local/bin + +2) You need to use aespipe program (v2.2a or later) with your rescue + floppy/CD-ROM or other partition. aespipe source is available from: + + http://loop-aes.sourceforge.net/ + http://members.tiscali.fi/ce6c8edf/ (limited downloads) + + Download latest version of aespipe-*.tar.bz2 + + Dynamically linked aespipe program may have library dependency problems + with rescue floppy/CD-ROM or other partition C library. To avoid such + trouble, aespipe program needs to be linked statically. Static linking + with glibc makes aespipe much bigger (hundreds of kilobytes), and may + also create link warning about 'getpwuid'. Big program size and link + warning can be ignored here. + + Compile aespipe program like this: + + CFLAGS="-O2" LDFLAGS="-static -s" ./configure + make + make tests + + Copy statically linked aespipe program to /boot partition. + + cp -p aespipe /boot + +3) If you followed advise about recompiling and statically linking gpg + program, you don't need to do that again. However, if you don't have + statically linked gpg, you need to do that now because later steps in + root partition encryption depend on it. + +4) Backup all important data before proceeding with root partition + encryption. + +5) Recompile your kernel. These are required: CONFIG_BLK_DEV_RAM=y + CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_MINIX_FS=y + CONFIG_PROC_FS=y CONFIG_CRAMFS=n (or CONFIG_CRAMFS=m) + + CONFIG_BLK_DEV_{RAM,INITRD}=y are needed because kernel needs to support + initial ramdisk. CONFIG_MINIX_FS=y is needed because file system on + initrd is minix. CONFIG_CRAMFS=n is needed because cramfs code may + incorrectly detect initrd's compressed minix file system as cramfs file + system. If cramfs must be built-in, then build-initrd.sh must be + configured with USEPIVOT=1, and kernel parameter "rootfstype=minix" must + be added to bootloader configuration file. 2.2.x and older kernels have + neither CONFIG_CRAMFS nor cramfs, so that kernel configuration setting + can be ignored on those kernels. + + All kernel subsystems needed by root and /boot file systems must be + compiled directly into kernel (and not be modules). + + cd /usr/src/linux-2.4.22aa1 + cp .config ../somewhere/somename.config + make distclean + cp ../somewhere/somename.config .config + make config + make dep && make clean && make bzImage + make modules && make modules_install + cat arch/i386/boot/bzImage >/boot/vmlinuz + cp System.map /boot/System.map-2.4.22aa1 + +6) Compile loop-AES loop.o module for your kernel. + + cd ../loop-AES-* + make LINUX_SOURCE=/usr/src/linux-2.4.22aa1 + +7) Copy kernel version specific loop.o (2.4 and older kernels) or loop.ko + (2.6 kernels) to /boot/modules-KERNELRELEASE/ + + mkdir /boot/modules-2.4.22aa1 + ^^^^^^^^^ + cp -p /lib/modules/2.4.22aa1/block/loop.*o /boot/modules-2.4.22aa1/ + ^^^^^^^^^ ^^^^^^^^^ + Note: You need to have a kernel version specific loop.o or loop.ko + module in /boot/modules-KERNELRELEASE/ directory for every kernel you + intend to use. + +8) If your boot scripts automatically run "umount /initrd" and "blockdev + --flushbufs /dev/ram0" commands, you may want to disable those commands. + If you don't disable them, you may see annoying error messages when + booting to encrypted root partition. + + Root partition loop device node is inside initrd, and that device node + will remain busy forever. This means that encrypted root initrd can't be + unmounted and RAM used by initrd file system can't be freed. This + unable-to-unmount side effect is the reason why initrd is intentionally + made as small as possible. + +9) Create 64 random encryption keys and encrypt those keys using gpg. + Reading from /dev/random may take indefinitely long if kernel's random + entropy pool is empty. If that happens, do some other work on some other + console (use keyboard, mouse and disks). Use of gpg encrypted key file + depends on encrypted swap. + + umask 077 + head -c 2880 /dev/random | uuencode -m - | head -n 65 | tail -n 64 \ + | gpg --symmetric -a >/boot/rootkey.gpg + +10) Edit build-initrd.sh to match your setup. Set BOOTDEV, BOOTTYPE, + CRYPTROOT and ROOTTYPE variables to correct values. If you are using 2.2 + or older kernels, set USEPIVOT=0 because 2.2 and older kernels do not + have pivot_root functionality. You may also want to set + LOADNATIONALKEYB=1 and manually copy your uncompressed national keyboard + layout file (in "loadkeys" format) to /boot/default.kmap + + loadkeys configuration files for some popular distros: + + Debian: /etc/console/boottime.kmap.gz + Mandrake: /usr/lib/kbd/keymaps/i386/qwert[yz]/*.kmap.gz + Red Hat: /lib/kbd/keymaps/i386/qwert[yz]/*.kmap.gz + SuSE: /usr/lib/kbd/keymaps/i386/qwert[yz]/*.map.gz + Slackware: /usr/share/kbd/keymaps/i386/qwert[yz]/*.map.gz + + Or alternatively, you can create keyboard map using your current + keyboard layout. Like this: + + dumpkeys >/boot/default.kmap + + devfs enabled kernel users (CONFIG_DEVFS_FS=y and CONFIG_DEVFS_MOUNT=y + in kernel configuration) need to pay special attention to comments above + these build-initrd.sh options: USEDEVFS, BOOTDEV, CRYPTROOT and + EXTERNALGPGDEV. + +11) Edit /etc/lilo.conf (or whatever) and set root= initrd= and append= as + explained in comments at beginning of build-initrd.sh script. + +12) Build a new /boot/initrd.gz + + ./build-initrd.sh + + Note: /boot/initrd.gz is supposed to be small (2 KB to 3 KB). All other + utilities (loop.o module, insmod, losetup, loadkeys and possibly + libraries) are copied to /boot directory. Libraries are not copied if + programs are statically linked. + +13) Run lilo (or whatever) + + lilo + +14) Reboot your computer from rescue floppy/CD-ROM or other partition, so + that the partition you are about to encrypt is *not* mounted. + +15) Now you should be running a shell from rescue floppy/CD-ROM or other + partition. This example assumes that /dev/hda1 is your /boot partition + and /dev/hda2 is your root partition. Temporarily mount your root + partition under /mnt + + mount -t ext2 /dev/hda2 /mnt + +16) Edit root partition entry in /mnt/etc/fstab file. Replace old /dev/hda2 + with /dev/loop5 or whatever loop you are using for root partition. Loop + device number must match ROOTLOOPINDEX= in build-initrd.sh + configuration. The default in build-initrd.sh is 5, meaning /dev/loop5. + + Old /etc/fstab line: + /dev/hda2 / ext2 defaults 0 1 + New /etc/fstab line: + /dev/loop5 / ext2 defaults 0 1 + + devfs enabled kernel users (CONFIG_DEVFS_FS=y and CONFIG_DEVFS_MOUNT=y + in kernel configuration) need to substitute /dev/loop5 with /dev/loop/5 + +17) Unmount your root partition (and sync for extra safety). + + umount /mnt + sync + +18) Mount your normal /boot partition under /mnt so that you can use + previously built statically linked aespipe and gpg programs and read gpg + encrypted key file 'rootkey.gpg'. Statically linked gpg program was + copied there by build-initrd.sh script. + + mount -r -t ext2 /dev/hda1 /mnt + +19) Use dd program to read your root partition contents, pipe that data + through aespipe program, and finally write encrypted data back to same + partition with another dd program. This is going to take a while if + partition is large. + + dd if=/dev/hda2 bs=64k \ + | /mnt/aespipe -e AES128 -K /mnt/rootkey.gpg -G / \ + | dd of=/dev/hda2 bs=64k conv=notrunc + + aespipe program tries to run gpg from obvious locations on your rescue + floppy/CD-ROM file system, but if it can't find gpg from those obvious + locations, aespipe finally tries to run gpg from same directory that + aespipe was run from (/mnt/) and should find statically linked gpg + program there. + +20) Clean up and reboot your computer. + + umount /mnt + sync + reboot + +If you are upgrading kernel of a system where root partition is already +encrypted, only steps 5 to 7 and 13 are needed. /boot/initrd.gz is kernel +independent and there is no need to re-create it for each kernel. However, +if you are upgrading from 2.4 kernel to 2.6 kernel, new insmod may need to +be copied to /boot directory by running step 12 before running step 13. + +If you want to fsck and mount partitions automatically and are indeed +encrypting root partition, it may be easier to just losetup required +partitions early in init scripts (before partitions are fsck'ed and +mounted). Don't losetup root partition again, as root partition has already +been losetup'ed by /linuxrc program in the "initrd" ram-disk. + +Init scripts reside on root partition and encryption keys within such init +scripts are protected by root partition encryption. Of course, init scripts +containing sensitive keys must be readable only by root user: + + -rwx------ 1 root root 162 Nov 24 19:23 /etc/rcS.d/S07losetup.sh + +Here is an example of /etc/rcS.d/S07losetup.sh Debian init script. Other +distros may store such init scripts in different directory under different +name. On SuSE, /etc/init.d/boot.d/S01losetup.sh may be more appropriate. + +#!/bin/sh +echo "Pd1eXapMJk0XAJnNSIzE" | losetup -p 0 -e AES128 -K /etc/swapkey.gpg /dev/loop6 /dev/hda666 +echo "D0aZNSNnu6FdAph+zrHt" | losetup -p 0 -e AES128 -K /etc/homekey.gpg /dev/loop4 /dev/hdd666 + +Above partitions use gpg encrypted key files. Having encrypted files on +encrypted partition may seem little bit silly, but currently -K option is +the easiest way to activate multi-key mode with more secure MD5 IV +computation. + +Here are example lines of /etc/fstab file. It's not necessary to give +"loop=/dev/loop4,encryption=AES128" mount options as loop devices are +already losetup'ed and there is no need for mount program to do that again. + + /dev/loop5 / ext2 defaults 0 1 + /dev/loop6 none swap sw 0 0 + /dev/loop4 /home ext2 defaults 0 2 + +In above example, device /dev/hda666 is used as encrypted swap with fixed +key. If you set up swap with fixed key like in above example, don't forget +to initialize swap space by running "mkswap /dev/loop6" once. /dev/hdd666 is +used as encrypted /home partition. /dev/loop5 is encrypted root partition, +and it set up by /linuxrc program in "initrd" ram-disk. + + +7.6. Example 6 - Boot from CD-ROM + encrypted root partition +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Here is slight variation of above 'encrypting root partition' instructions. +Computer gets booted from read-only CD-ROM and there is no need for any +unencrypted partitions on the hard disk. + +1-6) Same as above 'encrypting root partition' steps 1-6. + +7) Copy kernel version specific loop.o or loop.ko module to CD-ROM source + directory + + rm -r -f /boot/iso/modules-* + mkdir -p /boot/iso/modules-2.4.22aa1 + ^^^^^^^^^ + cp -p /lib/modules/2.4.22aa1/block/loop.*o /boot/iso/modules-2.4.22aa1/ + ^^^^^^^^^ ^^^^^^^^^ +8-9) Same as above 'encrypting root partition' steps 8-9, with exception + that in step 9 you must write rootkey.gpg to /boot/iso directory instead + of /boot directory. + +10a) Contents of /boot/initrd.conf configuration file are below. + + BOOTDEV=/dev/hdc # CD-ROM device + BOOTTYPE=iso9660 + CRYPTROOT=/dev/hda2 + ROOTTYPE=ext2 + CIPHERTYPE=AES128 + DESTINATIONPREFIX=/boot/iso + INITRDGZNAME=../initrd.gz + LOADNATIONALKEYB=1 + + devfs enabled kernel users (CONFIG_DEVFS_FS=y and CONFIG_DEVFS_MOUNT=y + in kernel configuration) need to pay special attention to comments above + these build-initrd.sh options: USEDEVFS, BOOTDEV, CRYPTROOT and + EXTERNALGPGDEV. + +10b) Copy your national keyboard layout to CD-ROM source directory in + uncompressed form. + + dumpkeys >/boot/iso/default.kmap + +11) Contents of /etc/lilo.conf configuration file are below. Two copies of + '/dev/loop7' on first two lines refer to temporary file backed loop + mount that is mounted on /mnt later in step 13a. + + boot=/dev/loop7 + disk=/dev/loop7 + bios=0x00 + sectors=36 + heads=2 + cylinders=80 + geometric + compact + read-only + prompt + timeout=30 + vga=normal + backup=/dev/null + install=text + map=/mnt/map + image=/mnt/vmlinuz + label=Linux + append="init=/linuxrc rootfstype=minix" + initrd=/mnt/initrd.gz + root=/dev/ram0 + +12) Build new /boot/initrd.gz + + ./build-initrd.sh /boot/initrd.conf + +13a) Build and mount minix file system on floppy image + + dd if=/dev/zero of=/boot/iso/fdimage.bin bs=1024 count=2880 + mkfs -t minix -i 32 /boot/iso/fdimage.bin 2880 + mount -t minix /boot/iso/fdimage.bin /mnt -o loop=/dev/loop7 + +13b) Copy kernel and initrd.gz to floppy image + + cp -p /boot/vmlinuz /mnt/vmlinuz + cp -p /boot/initrd.gz /mnt/initrd.gz + +13c) Run lilo and unmount floppy image + + lilo + umount /mnt + sync + +13d) Create boot CD-ROM image + + mkisofs -r -b fdimage.bin /boot/iso >/boot/bootcdimage.iso + +13e) Burn /boot/bootcdimage.iso to CD-R. Resulting CD-ROM is your boot + CD-ROM that you use to boot to encrypted root, not the rescue CD-ROM + referred to in above 'encrypting root partition' step 14. + + You may want to burn two copies or at least archive bootcdimage.iso to + some unencrypted partition so that you can burn new copy if original + CD-ROM gets damaged. + +13f) Temporarily disable swap partitions and put a "temporary file system on + swap" into one of swap partitions. This example assumes that /dev/hda3 + is such swap partition. The 'dd' command clears first 64KB of that + partition so that dangerously buggy rescue floppies/CD-ROMs don't enable + swap on it. + + swapoff -a + dd if=/dev/zero of=/dev/hda3 bs=64k count=1 conv=notrunc + mkfs -t ext2 /dev/hda3 + mount -t ext2 /dev/hda3 /mnt + +13g) Copy statically linked aespipe and gpg programs and rootkey.gpg file to + "temporary file system on swap" partition. + + cp -p /boot/aespipe /boot/iso/rootkey.gpg /usr/bin/gpg /mnt + umount /mnt + +14-19) Same as above 'encrypting root partition' steps 14-19, with exception + that in step 18 you must rw mount (no -r option to mount) "temporary + file system on swap" /dev/hda3 instead of /boot partition. + +20) Clean up and reboot your computer. The 'dd' command attempts to + overwrite gpg encrypted root partition key file and 'mkswap' command + restores "temporary file system on swap" /dev/hda3 back to swap usage. + + dd if=/dev/zero of=/mnt/rootkey.gpg bs=64k count=1 conv=notrunc + umount /mnt + sync + mkswap /dev/hda3 + sync + reboot + +If you are upgrading kernel of a system where root partition is already +encrypted, only steps 5 to 7 and 13a to 13e are needed. However, if you are +upgrading from 2.4 kernel to 2.6 kernel, new insmod may need to be copied to +/boot/iso directory by running step 12 before running step 13a. + + +8. Security levels +~~~~~~~~~~~~~~~~~~ +Loop encryption key can be set up in different ways. Just in case it isn't +obvious how these different ways rank security wise, here is a list of +security levels from 1 (highest security) to 4 (lowest security). + +1) gpg encrypted 'multi-key' key file and/or gpg public+private keys are + stored on separate removable USB dongle that is not available to + attacker. If USB dongle and its key files are available to attacker, + security level is equivalent to level 2. (Example 2) + +2) gpg encrypted 'multi-key' key file and gpg public+private keys are + stored on disk that is available to attacker. This assumes that included + gpg patch is applied to gpg and symmetric cipher encrypted key file or + private keyring password was created/changed with patched version. + (Example 3) + +3) Loop is used in single-key mode. Random password seed and iteration + count are used to slow down optimized dictionary attacks. This level is + vulnerable to watermark attacks. Watermarked files contain special bit + patterns that can be detected without decryption. + +4) Loop is used in single-key mode. Neither password seed nor gpg encrypted + key file are used. This level is vulnerable to optimized dictionary + attacks as well as watermark attacks. (mainline linux cryptoloop is + example of this type of backdoored crypto) + + +9. Performance tuning for 2.4 and newer kernels +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Loop-AES driver for 2.4 and newer kernels understand two additional options: +lo_prealloc and lo_nice. First number of 'lo_prealloc' is the default number +of RAM pages to pre-allocate for each device backed (partition backed) loop. +Every configured device backed loop pre-allocates this amount of RAM pages +unless later 'lo_prealloc' numbers provide an override. 'lo_prealloc' +overrides are defined in pairs: loop_index,number_of_pages. If 'lo_prealloc' +is undefined, all pre-allocations default to 125 pages. A maximum of four +overrides (four number pairs) can be used. + +This example line added to your /etc/modules.conf file means that each +device backed loop device pre-allocates 100 pages of RAM at losetup/mount +time, except that /dev/loop6 allocates 200 pages, and /dev/loop5 allocates +250 pages. + + options loop lo_prealloc=100,6,200,5,250 + +On x86 systems page size is 4 Kbytes, some other architectures have 8 Kbyte +page size. + +lo_nice option sets scheduler nice for loop helper threads. Values between 0 +(low priority) to -20 (high priority) can be used. If loop transfers are +disk transfer rate limited, lowering loop thread priority may improve +performance. If loop transfers are CPU processing power limited, increasing +loop thread priority may improve performance. renice(8) command can be used +to alter nice values of loop helper threads while loop is being used. +Example /etc/modules.conf line: + + options loop lo_nice=-4 + +If lo_nice is not set, default nice value for kernels with old scheduler is +-20. For kernels with O(1) scheduler, default nice value is -1. + +2.6 kernels include anticipatory (the default) and deadline I/O schedulers. +Deadline I/O scheduler may improve performance of device backed loop +devices. Please read kernel's Documentation/as-iosched.txt file for more +information. + + +10. Files +~~~~~~~~~ +ChangeLog History of changes and public releases. + +Makefile Makefile to build and install loop.o module. + +README This README file. + +aes-GPL.diff A patch for aes-amd64.S and aes-x86.S files that + updates licenses to be fully GPL compatible. + aes-amd64.S and aes-x86.S files are derived from + Brian Gladman's December 2001 published version + that had no mention of GPL, but both Brian + Gladman and Jari Ruusu permit this license + change. + +aes-amd64.S Optimized assembler implementation of AES cipher + for AMD64 and compatible processors. + +aes-x86.S Optimized assembler implementation of AES cipher + for x86 processors. + +aes.[ch] AES encryption functions, portable and usable in + kernel and in user space, as well as in other + operating systems. + +build-initrd.sh Bash shell script to build a small initrd + ram-disk that can be used when root partition is + encrypted. + +dkms.conf Configuration file for Dynamic Kernel Module + Support. http://linux.dell.com/dkms/dkms.html + for more info. This dkms.conf can't be used to + compile loop module with partial kernel sources + that some distros provide. Build procedure + depends on presence of full kernel sources, and + using partial kernel source to build loop module + will guarantee miscompiled loop module. + +glue.c Glue logic between loop driver and encryption + functions in aes.c / aes-*.S and md5.c / md5-*.S + +gnupg-*.diff Optional patch for gpg that increases password + iteration and thus slows down dictionary attacks + against gpg encrypted key files. + +gpgkey[12].asc gpg encrypted key files that are used by + Makefile when "make tests" command is run. These + key files are encrypted with symmetric cipher + using 12345678901234567890 password. + +kernel-2.[46].*.diff Kernel patch for those people who prefer not to + use modules. Before this patch can be applied to + your kernel, drivers/block/loop.c and + include/linux/loop.h source files must be + removed using 'rm' command. Obviously applying + this patch changes your kernel sources, so this + is not entirely hassle free. This patch is + against recent mainline kernel. If this patch + doesn't apply cleanly to your kernel, I don't + want to know about it. Note: you only need to + build loop.o module or apply this patch but not + both. + +loop.c-2.[02].diff Kernel version specific patches that fix bugs + and preregisters AES cipher transfer to latest + loop.c source. + +loop.c-2.[02].original Unmodified loop.c sources that are used as + secondary source if patch does not apply cleanly + to primary source. Primary source is the loop.c + of your kernel. + +loop.c-2.[46].patched Pre-patched loop.c sources for kernels where + changes are so extensive that distributing + *.original plus *.diff does not make sense. + +md5-amd64.S Optimized assembler implementation of MD5 + transform function for AMD64 and compatible + processors. + +md5-x86.S Optimized assembler implementation of MD5 + transform function for x86 processors. + +md5.[ch] MD5 transform function implementation that is + used to compute IVs. This source code was copied + from Linux kernel CryptoAPI implementation. + +util-linux-2.12*.diff Util-linux patch that adds support for AES and + other ciphers. + + +11. Credits +~~~~~~~~~~~ +This package uses AES cipher sources that were originally written by +Dr Brian Gladman: + +// Copyright (c) 2001, Dr Brian Gladman , Worcester, UK. +// All rights reserved. +// +// TERMS +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted subject to the following conditions: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. The copyright holder's name must not be used to endorse or promote +// any products derived from this software without his specific prior +// written permission. +// +// This software is provided 'as is' with no express or implied warranties +// of correctness or fitness for purpose. + +Util-linux patch has few lines of documentation copied from international +crypto patch: -p option documentation in losetup and mount man pages were +written by Marc Mutz. + +Util-linux patch includes rmd160.[ch] files that were copied from +international crypto patch: they were originally written by GnuPG team and +modified by Marc Mutz. diff --git a/README.loop-AES-v2.2d.SuSE b/README.loop-AES-v2.2d.SuSE new file mode 100644 index 0000000..9ba6775 --- /dev/null +++ b/README.loop-AES-v2.2d.SuSE @@ -0,0 +1,11 @@ +loop-AES patch in util-linux +============================ + +To enhance the feature of mount, umount, losetup, swapon and swapoff we have +included the patch to util-linux from Jari Ruusu's loop-AES package +(http://loop-aes.sourceforge.net/). More details about this patch can be found +in /usr/share/doc/packages/util-linux/README.loop-AES-* +Please note, that we have only used the patch to util-linux and not the ones +for gpg or the new kernel loop driver. + +Your SuSE team diff --git a/README.raw b/README.raw new file mode 100644 index 0000000..6696ec8 --- /dev/null +++ b/README.raw @@ -0,0 +1,54 @@ +Raw device driver support on SLS 9 + +On SLS 9, you will notice that by default, raw devices (nodes) (/dev/rawctl +and /dev/raw/rawN (1-15)) no longer exist whereas in SLES 8, the raw nodes were +created when the system was initially installed. SLS 9, by default, uses +the new dynamic userspace implementation "sysfs" together with "udev" which +replaces the previous static "dev" system. + +Raw devices are moving towards eventual obsolescence with block+O_DIRECT +support intended as a replacement. The primary application users of raw +character devices have been databases so the database you are using will have +to support the O_DIRECT functionality before moving away from raw character +devices. + +Using RAW with kernel 2.6 (SLS 9) +--------------------------------- +Raw device usage in kernel 2.6 together with udev and sysfs was intended to be +quite seamless. Basically, all that is required is to load the raw module after +each reboot using the commands "modprobe raw" or "rcraw start". Then use the +"raw" command to create the bindings to the block character devices. The raw +device nodes are no longer required to exist before the bindings are assigned +and used. + +Using a single script, you can you load the raw module and bind the raw nodes +to block devices. + +#!/usr/bin +# load the raw module +modprobe raw # can also use "rcraw start" +# create the raw bindings +raw /dev/raw/raw1 /dev/sdb1 +raw /dev/raw/raw2 /dev/sbc1 + +You can see if the raw driver is available by issuing "rcraw status". If the +raw driver is loaded, the command should return a status of "running". A status +of "dead" will usually indicate that the driver was not loaded or +the /dev/rawctl file does not exist. The /dev/rawctl file is automatically +created when the module is loaded. This file and the /dev/raw/rawN nodes can +also be viewed under the /sys/class/raw directory. + +Raw node permissions +---------------------------------- +When the raw devices are assigned, permission settings are determined from the +/etc/udev/udev.permission file. This file can be modified to assign different +owner, group and/or access permissions to the raw nodes. For example, by +default, the permission settings for raw nodes are as follows: + +raw/raw*:root:disk:660 + +Here, root:disk is the default owner:group with read write access for owner and +group. As an example, to create the raw nodes with an owner:group of +user1:group1 and read write access for all, change the assignment as follows: + +raw/raw*:user1:group1:666 diff --git a/addnote.c b/addnote.c deleted file mode 100644 index d2be416..0000000 --- a/addnote.c +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Program to hack in a PT_NOTE program header entry in an ELF file. - * This is needed for OF on RS/6000s to load an image correctly. - * Note that OF needs a program header entry for the note, not an - * ELF section. - * - * Copyright 2000 Paul Mackerras. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * Usage: addnote zImage - */ -#include -#include -#include -#include -#include - -/* CHRP note section */ -char arch[] = "PowerPC"; - -#define N_DESCR 6 -unsigned int descr[N_DESCR] = { - 0xffffffff, /* real-mode = true */ - 0x02000000, /* real-base, i.e. where we expect OF to be */ - 0xffffffff, /* real-size */ - 0xffffffff, /* virt-base */ - 0xffffffff, /* virt-size */ - 0x4000, /* load-base */ -}; - -/* RPA note section */ -char rpaname[] = "IBM,RPA-Client-Config"; - -/* - * Note: setting ignore_my_client_config *should* mean that OF ignores - * all the other fields, but there is a firmware bug which means that - * it looks at the splpar field at least. So these values need to be - * reasonable. - */ -#define N_RPA_DESCR 8 -unsigned int rpanote[N_RPA_DESCR] = { - 0, /* lparaffinity */ - 64, /* min_rmo_size */ - 0, /* min_rmo_percent */ - 40, /* max_pft_size */ - 1, /* splpar */ - -1, /* min_load */ - 0, /* new_mem_def */ - 1, /* ignore_my_client_config */ -}; - -#define ROUNDUP(len) (((len) + 3) & ~3) - -unsigned char buf[512]; - -#define GET_16BE(off) ((buf[off] << 8) + (buf[(off)+1])) -#define GET_32BE(off) ((GET_16BE(off) << 16) + GET_16BE((off)+2)) - -#define PUT_16BE(off, v) (buf[off] = ((v) >> 8) & 0xff, \ - buf[(off) + 1] = (v) & 0xff) -#define PUT_32BE(off, v) (PUT_16BE((off), (v) >> 16), \ - PUT_16BE((off) + 2, (v))) - -/* Structure of an ELF file */ -#define E_IDENT 0 /* ELF header */ -#define E_PHOFF 28 -#define E_PHENTSIZE 42 -#define E_PHNUM 44 -#define E_HSIZE 52 /* size of ELF header */ - -#define EI_MAGIC 0 /* offsets in E_IDENT area */ -#define EI_CLASS 4 -#define EI_DATA 5 - -#define PH_TYPE 0 /* ELF program header */ -#define PH_OFFSET 4 -#define PH_FILESZ 16 -#define PH_HSIZE 32 /* size of program header */ - -#define PT_NOTE 4 /* Program header type = note */ - -#define ELFCLASS32 1 -#define ELFDATA2MSB 2 - -unsigned char elf_magic[4] = { 0x7f, 'E', 'L', 'F' }; - -int -main(int ac, char **av) -{ - int fd, n, i; - int ph, ps, np; - int nnote, nnote2, ns; - - if (ac != 2) { - fprintf(stderr, "Usage: %s elf-file\n", av[0]); - exit(1); - } - fd = open(av[1], O_RDWR); - if (fd < 0) { - perror(av[1]); - exit(1); - } - - nnote = 12 + ROUNDUP(strlen(arch) + 1) + sizeof(descr); - nnote2 = 12 + ROUNDUP(strlen(rpaname) + 1) + sizeof(rpanote); - - n = read(fd, buf, sizeof(buf)); - if (n < 0) { - perror("read"); - exit(1); - } - - if (n < E_HSIZE || memcmp(&buf[E_IDENT+EI_MAGIC], elf_magic, 4) != 0) - goto notelf; - - if (buf[E_IDENT+EI_CLASS] != ELFCLASS32 - || buf[E_IDENT+EI_DATA] != ELFDATA2MSB) { - fprintf(stderr, "%s is not a big-endian 32-bit ELF image\n", - av[1]); - exit(1); - } - - ph = GET_32BE(E_PHOFF); - ps = GET_16BE(E_PHENTSIZE); - np = GET_16BE(E_PHNUM); - if (ph < E_HSIZE || ps < PH_HSIZE || np < 1) - goto notelf; - if (ph + (np + 2) * ps + nnote + nnote2 > n) - goto nospace; - - for (i = 0; i < np; ++i) { - if (GET_32BE(ph + PH_TYPE) == PT_NOTE) { - fprintf(stderr, "%s already has a note entry\n", - av[1]); - exit(0); - } - ph += ps; - } - - /* XXX check that the area we want to use is all zeroes */ - for (i = 0; i < 2 * ps + nnote + nnote2; ++i) - if (buf[ph + i] != 0) - goto nospace; - - /* fill in the program header entry */ - ns = ph + 2 * ps; - PUT_32BE(ph + PH_TYPE, PT_NOTE); - PUT_32BE(ph + PH_OFFSET, ns); - PUT_32BE(ph + PH_FILESZ, nnote); - - /* fill in the note area we point to */ - /* XXX we should probably make this a proper section */ - PUT_32BE(ns, strlen(arch) + 1); - PUT_32BE(ns + 4, N_DESCR * 4); - PUT_32BE(ns + 8, 0x1275); - strcpy((char *) &buf[ns + 12], arch); - ns += 12 + strlen(arch) + 1; - for (i = 0; i < N_DESCR; ++i, ns += 4) - PUT_32BE(ns, descr[i]); - - /* fill in the second program header entry and the RPA note area */ - ph += ps; - PUT_32BE(ph + PH_TYPE, PT_NOTE); - PUT_32BE(ph + PH_OFFSET, ns); - PUT_32BE(ph + PH_FILESZ, nnote2); - - /* fill in the note area we point to */ - PUT_32BE(ns, strlen(rpaname) + 1); - PUT_32BE(ns + 4, sizeof(rpanote)); - PUT_32BE(ns + 8, 0x12759999); - strcpy((char *) &buf[ns + 12], rpaname); - ns += 12 + ROUNDUP(strlen(rpaname) + 1); - for (i = 0; i < N_RPA_DESCR; ++i, ns += 4) - PUT_32BE(ns, rpanote[i]); - - /* Update the number of program headers */ - PUT_16BE(E_PHNUM, np + 2); - - /* write back */ - lseek(fd, (long) 0, SEEK_SET); - i = write(fd, buf, n); - if (i < 0) { - perror("write"); - exit(1); - } - if (i < n) { - fprintf(stderr, "%s: write truncated\n", av[1]); - exit(1); - } - - exit(0); - - notelf: - fprintf(stderr, "%s does not appear to be an ELF file\n", av[1]); - exit(1); - - nospace: - fprintf(stderr, "sorry, I can't find space in %s to put the note\n", - av[1]); - exit(1); -} diff --git a/adjtimex-1.20-nosyscall.diff b/adjtimex-1.20-nosyscall.diff new file mode 100644 index 0000000..3a288c9 --- /dev/null +++ b/adjtimex-1.20-nosyscall.diff @@ -0,0 +1,18 @@ +--- adjtimex-1.20/adjtimex.c ++++ adjtimex-1.20/adjtimex.c +@@ -35,15 +35,6 @@ + #include + #include + +-#ifdef __alpha__ +-extern int adjtimex(struct timex *); +-#else +-#ifdef __ia64__ +-extern int adjtimex(struct timex *); +-#else +-_syscall1(int, adjtimex, struct timex *, txcp) +-#endif +-#endif + int F_print = 0; + + #ifndef LOG_PATH diff --git a/adjtimex-1.20.tar.bz2 b/adjtimex-1.20.tar.bz2 new file mode 100644 index 0000000..72479ce --- /dev/null +++ b/adjtimex-1.20.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad3619a6f4f04d278ac3d3e0261649465a9748dc84220aa5f4060aadaea839ba +size 50096 diff --git a/baselibs.conf b/baselibs.conf deleted file mode 100644 index 46b935b..0000000 --- a/baselibs.conf +++ /dev/null @@ -1,12 +0,0 @@ -libuuid1 -libuuid-devel - requires -libuuid- - requires "libuuid1- = " -libblkid1 -libblkid-devel - requires -libblkid- - requires "libblkid1- = " -libmount1 -libmount-devel - requires -libmount- - requires "libmount1- = " diff --git a/blkid.conf b/blkid.conf deleted file mode 100644 index fab9dd2..0000000 --- a/blkid.conf +++ /dev/null @@ -1,5 +0,0 @@ -# do not keep cache file across reboots -CACHE_FILE=/dev/.blkid.tab - -# never try to sequentially scan all devices in /dev -EVALUATE=udev diff --git a/cryptoloop.txt b/cryptoloop.txt new file mode 100644 index 0000000..b20a53e --- /dev/null +++ b/cryptoloop.txt @@ -0,0 +1,169 @@ +cryptoloop - a generic cryptographic loop device filter +======================================================= + +To enable cryptoloop, you must fetch the cryptoloop-version.tar.gz source from +your kernel.org mirror or directly from the non-US . + +Quickstart +~~~~~~~~~~ + +(if you have old encrypted volumes, please read the section about +conversion below) + +you need a kernel compiled with + *) loop device driver + *) cryptographic support + *) generic crypto loop filter + *) one or more ciphers you want to use for encryption either as module or + statically (if you build them as module, don't forget to insmod them!) + +Download the cryptoloop latest version tarball from the Internet and enter +the untarred directory. The following commands will patch your kernel and +copy the cryptoloop source in. + + $ make patch-kernel KDIR=/your/kernel/source LOOP=[iv or jari] + +Which will patch your kernel, and enable you to select cryptoloop in the +Cryptography section of the kernel configuration. Note, you have to manually +enable both CryptoAPI and cryptoloop in your kernel configuration. + +If you would rather build modules you can use the following commands. + + $ make modules KDIR=/your/kernel/source CDIR=/cryptoapi/source \ + LOOP=[iv or jari] + $ make modules_install KDIR=/your/kernel/source + +You also need a util-linux patched package (see + for some recent +patches) + +Read on at + + +How Loopback Encryption Works +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Here is a small overview of how the loopback filesystem encryption works. +For all the of the data to be encrypted on a drive we need to interrupt the +disk write/read *after* the filesystem meta data is attached. Instead of hi- +jacking the system call we pipe the the filesystem commands through a loopback +device. + One advantage of this is that you can either encrypt a device(hard drive) or +a file already on a drive and mount it as a file system. This allows you to +have encrypted folders on an unencrypted drive, useful if you don't want to +encrypt everything. + + The loopback device fits in like this: + + device-->loop-->mountpoint + + The loop stage is actually divided into a couple stages, which is why the +cryptoloop module is included. It splits the input and output from the +loopback into pieces for the ciphers. Since they operate on a specific +blocksize(i.e. 64-bits, 128-bits) the data must be chopped up for them. + + device-->cryptoloop-->loop-->mountpoint + + The cryptoloop module is also where the actual encryption and decryption of +the data takes place. + +Some words about IV Calculation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are some problems with the IV calculation up to recent 2.4.x +linux kernels. It's been calculated more or less by + +IV = rel_sector / (blocksize >> 9) + (lo_offset / blocksize) + +The first problem which arises, is that data transfers are not always +guaranteed to have a size of an integral multiple of the blocksize; +This is a problem, because of CBC mode's property of needing the +complete ciphertext block, i.e. you can't cipher or decipher only the +2nd half of a block if you don't know the first half of it! + +Another problem which may be experienced is, when the soft blocksize +changes, i.e. due to different medias, as CDROM block devices and +alike, or when the filesystem layer sets the blocksize to some other +size. + +But there's hope, as all transfer sizes are usually (except for the +last block on file backed loop devices sometimes...) an integral +multiple of 512 byte units (which is linux' atomic sector size); + +So the solution is to stick to a portable, uniform 512 byte based IV +metric! Alas this can't be accomplished without modifying the loop +driver, as the more granular IV metric can't be calculated from the +current dynamic IV metric. + +This change also renders most previously used encrypted volumes +unreadable, which need to be converted to the new IV metric. + +Converting from Older IV Metrics +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The recommended procedure is as follow, in case you don't want to +backup your old data in a conventional manner, and then restore it to +a freshly created encrypted volume with the new IV-metric. + +The more valuable your data is, the more important it is, that you try +the following procedure with some dummy data, before risking your real +data! Cause if something goes wrong you'll have to keep both pieces... + +1) decrypt from within your old kernel version + + 1.1) setup your encrypted loop device, and mount it (this is also + important for making sure, the filesystem layer sets the soft block + size accordingly!) + + 1.2) unmount the filesystem (but leave the loop device setted up) + + 1.3) dd if=/dev/loop0 of=/dev/ make sure + the process does not get interrupted, otherwise you will have a hard + time, reconstructing your data, since you are decrypting the data + back to the same area where the ciphertext was. + +3) make sure the block/file contains the properly deciphered content!! + +2) boot the new kernel featuring the 512byte based IV + follow the instructions for 'encrypting unencrypted volumes' below + + +Encrypting Unencrypted Volumes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +just as simple as that (please test this before trying on important data) + + 1) set up a new encrypted loop device over the still unencrypted data + 2) dd if=/dev/ of=/dev/loop0 + + +Migrating from loop-AES to CryptoAPI +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + If you want to move from using the loop-AES filesystem encryption to +CryptoAPI it only requires a small tweak. After loading cryptoapi and loading +the cipher-aes module use the following line when setting up your loopback +device: + + $ losetup -e aes -k 256 -P sha512 /dev/loop0 /dev/ + +Then proceed to mount your loop device as you normall would. Here is the +table for mapping loop-AES to cryptoapi losetup flags: + +loop-AES cryptoapi +============================================================ +-e aes128 -H rmd160 -e aes -k 128 +-e aes128 -H sha256 -e aes -k 128 -P sha256 +-e aes128 -H sha384 -e aes -k 128 -P sha384 +-e aes128 -H sha512 -e aes -k 128 -P sha512 + +-e aes256 -H rmd160 -e aes -k 256 +-e aes256 -H sha256 -e aes -k 256 -P sha256 +-e aes256 -H sha384 -e aes -k 256 -P sha384 +-e aes256 -H sha512 -e aes -k 256 -P sha512 + +-e aes128 -e aes -k 128 -P sha256 +-e aes192 -e aes -k 192 -P sha384 +-e aes256 -e aes -k 256 -P sha512 + +-- +$Id: cryptoloop.txt,v 1.3 2002/08/03 19:29:58 kyle Exp $ diff --git a/etc.raw b/etc.raw index 8eff0a0..6d98cdd 100644 --- a/etc.raw +++ b/etc.raw @@ -4,12 +4,12 @@ # to block devices # # The format of this file is: -# raw: +# raw: # # example: # --------- -# raw1:sdb1 +# raw1:hdb1 # -# this means: bind /dev/raw/raw1 to /dev/sdb1 +# this means: bind /dev/raw/raw1 to /dev/hdb1 # # ... diff --git a/etc_filesystems b/etc_filesystems deleted file mode 100644 index a0d3c30..0000000 --- a/etc_filesystems +++ /dev/null @@ -1,5 +0,0 @@ -vfat -hfs -minix -reiserfs -* diff --git a/freeramdisk.tar.bz2 b/freeramdisk.tar.bz2 new file mode 100644 index 0000000..9d2d4b7 --- /dev/null +++ b/freeramdisk.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de3d43efba1e5968f4ef748b7a02674929404a80c24bae287ed3490f8c1acf2e +size 2453 diff --git a/guessfstype.8 b/guessfstype.8 new file mode 100644 index 0000000..35bf2fd --- /dev/null +++ b/guessfstype.8 @@ -0,0 +1,13 @@ +.\" Michal Svec +.TH GUESSFSTYPE 8 "25 January 2002" "Linux 2.4" "Linux Programmer's Manual" +.SH NAME +guessfstype \- guess the device file system type +.SH SYNOPSIS +.BI guessfstype " device" +.SH DESCRIPTION +.B guessfstype +guess the device file system type from the device super block +.SH "SEE ALSO" +.BR mount (8) +.SH AUTHOR +Michal Svec diff --git a/guessfstype2.patch b/guessfstype2.patch new file mode 100644 index 0000000..24c4593 --- /dev/null +++ b/guessfstype2.patch @@ -0,0 +1,48 @@ +--- util-linux-2.12q/mount/guessfstype.c ++++ util-linux-2.12q/mount/guessfstype.c +@@ -0,0 +1,22 @@ ++#include ++#include "mount_guess_fstype.h" ++ ++int verbose = 0; ++int mount_quiet=0; ++int sloppy = 0; ++ ++char *progname; ++ ++int main(int argc, char *argv[]) { ++ char *device, *type; ++ ++ if(argc != 2) return 1; ++ ++ progname = argv[0]; ++ device = argv[1]; ++ ++ type = do_guess_fstype(device); ++ printf("%s *appears* to be: %s\n", device, type); ++ ++ return 0; ++} +--- util-linux-2.12q/mount/Makefile ++++ util-linux-2.12q/mount/Makefile +@@ -11,7 +11,7 @@ + LINK = $(CC) $(LDFLAGS) + + SUID_PROGS = mount umount +-NOSUID_PROGS = swapon losetup ++NOSUID_PROGS = swapon losetup guessfstype + MAN5 = fstab.5 nfs.5 + MAN8 = mount.8 swapoff.8 swapon.8 umount.8 losetup.8 + +@@ -57,6 +57,11 @@ + version.o $(LIB)/env.o loumount.o + $(LINK) $^ -o $@ $(BLKID_LIB) + ++guessfstype: guessfstype.o mount_guess_fstype.o sundries.o realpath.o \ ++ fstab.o mntent.o get_label_uuid.o mount_blkid.o mount_by_label.o \ ++ xmalloc.o ++ $(LINK) $^ -o $@ ++ + swapon: swapon.o version.o xmalloc.o \ + get_label_uuid.o mount_by_label.o mount_blkid.o loop.o sha512.o $(LIB)/xstrncpy.o + $(LINK) $^ -o $@ $(BLKID_LIB) diff --git a/klogconsole-quiet.patch b/klogconsole-quiet.patch new file mode 100644 index 0000000..4e62e88 --- /dev/null +++ b/klogconsole-quiet.patch @@ -0,0 +1,11 @@ +--- klogconsole/klogconsole.c ++++ klogconsole/klogconsole.c +@@ -59,7 +59,7 @@ + exit(1); + } + if( ioctl( vt, TIOCLINUX, &newvt ) ) { +- perror("ioctl(TIOCLINUX)"); ++ /* shut up perror("ioctl(TIOCLINUX)"); */ + exit(1); + } + close(vt); diff --git a/klogconsole.diff b/klogconsole.diff new file mode 100644 index 0000000..392dff8 --- /dev/null +++ b/klogconsole.diff @@ -0,0 +1,27 @@ +--- klogconsole/Makefile ++++ klogconsole/Makefile +@@ -15,11 +15,11 @@ + all: klogconsole + + klogconsole: klogconsole.c +- $(CC) $(CFLAGS) -s -o $@ $< ++ $(CC) $(CFLAGS) -o $@ $< + + clean: + $(RM) klogconsole + + install: klogconsole klogconsole.man +- $(INSTALL) -s -m 0700 klogconsole $(DEST)/usr/sbin/ ++ $(INSTALL) -m 0700 klogconsole $(DEST)/usr/sbin/ + $(INSTALL) -c -m 0444 klogconsole.man $(DEST)/usr/share/man/man8/klogconsole.8 +--- klogconsole/klogconsole.c ++++ klogconsole/klogconsole.c +@@ -46,7 +46,7 @@ + char newvt[2]; + int vt; + +- if ((new_console < 1) || (new_console > MAX_CONSOLE)) { ++ if ((new_console < 0) || (new_console > MAX_CONSOLE)) { + fprintf(stderr,"wrong console number\n"); + exit(1); + } diff --git a/klogconsole.tar.bz2 b/klogconsole.tar.bz2 new file mode 100644 index 0000000..7d6e606 --- /dev/null +++ b/klogconsole.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1efa9f001c8a92fb91a544d62a3f43356f31955dd5125364300827c239ee611 +size 1942 diff --git a/klogconsole.tar.xz b/klogconsole.tar.xz deleted file mode 100644 index 801770c..0000000 --- a/klogconsole.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a4cd7c96ea647ad6ede62f93675acf3fa3c21ce225f9b771b82618fb2e676e4e -size 2060 diff --git a/login.pamd b/login.pamd deleted file mode 100644 index 93fc60e..0000000 --- a/login.pamd +++ /dev/null @@ -1,9 +0,0 @@ -#%PAM-1.0 -auth requisite pam_nologin.so -auth include common-auth -account include common-account -password include common-password -session required pam_loginuid.so -session include common-session -#session optional pam_lastlog.so nowtmp showfailed -session optional pam_mail.so standard diff --git a/loop-AES-v3.0a-util-linux-2.12p.diff b/loop-AES-v3.0a-util-linux-2.12p.diff new file mode 100644 index 0000000..6301224 --- /dev/null +++ b/loop-AES-v3.0a-util-linux-2.12p.diff @@ -0,0 +1,4345 @@ +If this patch does not apply cleanly to newer version of util-linux, try +replacing original lomount.c lomount.h loop.h losetup.8 files in mount +subdirectory with versions from util-linux that the patch is for. And then +apply this patch. + +================================================================================ +--- util-linux-2.12q/mount/aes.c ++++ util-linux-2.12q/mount/aes.c +@@ -0,0 +1,299 @@ ++// I retain copyright in this code but I encourage its free use provided ++// that I don't carry any responsibility for the results. I am especially ++// happy to see it used in free and open source software. If you do use ++// it I would appreciate an acknowledgement of its origin in the code or ++// the product that results and I would also appreciate knowing a little ++// about the use to which it is being put. I am grateful to Frank Yellin ++// for some ideas that are used in this implementation. ++// ++// Dr B. R. Gladman 6th April 2001. ++// ++// This is an implementation of the AES encryption algorithm (Rijndael) ++// designed by Joan Daemen and Vincent Rijmen. This version is designed ++// to provide both fixed and dynamic block and key lengths and can also ++// run with either big or little endian internal byte order (see aes.h). ++// It inputs block and key lengths in bytes with the legal values being ++// 16, 24 and 32. ++ ++/* ++ * Modified by Jari Ruusu, May 1 2001 ++ * - Fixed some compile warnings, code was ok but gcc warned anyway. ++ * - Changed basic types: byte -> unsigned char, word -> u_int32_t ++ * - Major name space cleanup: Names visible to outside now begin ++ * with "aes_" or "AES_". A lot of stuff moved from aes.h to aes.c ++ * - Removed C++ and DLL support as part of name space cleanup. ++ * - Eliminated unnecessary recomputation of tables. (actual bug fix) ++ * - Merged precomputed constant tables to aes.c file. ++ * - Removed data alignment restrictions for portability reasons. ++ * - Made block and key lengths accept bit count (128/192/256) ++ * as well byte count (16/24/32). ++ * - Removed all error checks. This change also eliminated the need ++ * to preinitialize the context struct to zero. ++ * - Removed some totally unused constants. ++ */ ++ ++/* ++ * Modified by Jari Ruusu, June 9 2003 ++ * - Removed all code not necessary for small size ++ * optimized encryption using 256 bit keys. ++ */ ++ ++#include "aes.h" ++ ++#if AES_BLOCK_SIZE != 16 ++#error an illegal block size has been specified ++#endif ++ ++// upr(x,n): rotates bytes within words by n positions, moving bytes ++// to higher index positions with wrap around into low positions ++// bval(x,n): extracts a byte from a word ++ ++#define upr(x,n) (((x) << 8 * (n)) | ((x) >> (32 - 8 * (n)))) ++#define bval(x,n) ((unsigned char)((x) >> 8 * (n))) ++#define bytes2word(b0, b1, b2, b3) \ ++ ((u_int32_t)(b3) << 24 | (u_int32_t)(b2) << 16 | (u_int32_t)(b1) << 8 | (b0)) ++ ++#if defined(i386) || defined(_I386) || defined(__i386__) || defined(__i386) ++/* little endian processor without data alignment restrictions */ ++#define word_in(x) *(u_int32_t*)(x) ++#define word_out(x,v) *(u_int32_t*)(x) = (v) ++#else ++/* slower but generic big endian or with data alignment restrictions */ ++#define word_in(x) ((u_int32_t)(((unsigned char *)(x))[0])|((u_int32_t)(((unsigned char *)(x))[1])<<8)|((u_int32_t)(((unsigned char *)(x))[2])<<16)|((u_int32_t)(((unsigned char *)(x))[3])<<24)) ++#define word_out(x,v) ((unsigned char *)(x))[0]=(v),((unsigned char *)(x))[1]=((v)>>8),((unsigned char *)(x))[2]=((v)>>16),((unsigned char *)(x))[3]=((v)>>24) ++#endif ++ ++// the finite field modular polynomial and elements ++ ++#define ff_poly 0x011b ++#define ff_hi 0x80 ++ ++static int tab_gen = 0; ++static unsigned char s_box[256]; // the S box ++static u_int32_t rcon_tab[AES_RC_LENGTH]; // table of round constants ++static u_int32_t ft_tab[4][256]; ++static u_int32_t fl_tab[4][256]; ++ ++// Generate the tables for the dynamic table option ++ ++// It will generally be sensible to use tables to compute finite ++// field multiplies and inverses but where memory is scarse this ++// code might sometimes be better. ++ ++// return 2 ^ (n - 1) where n is the bit number of the highest bit ++// set in x with x in the range 1 < x < 0x00000200. This form is ++// used so that locals within FFinv can be bytes rather than words ++ ++static unsigned char hibit(const u_int32_t x) ++{ unsigned char r = (unsigned char)((x >> 1) | (x >> 2)); ++ ++ r |= (r >> 2); ++ r |= (r >> 4); ++ return (r + 1) >> 1; ++} ++ ++// return the inverse of the finite field element x ++ ++static unsigned char FFinv(const unsigned char x) ++{ unsigned char p1 = x, p2 = 0x1b, n1 = hibit(x), n2 = 0x80, v1 = 1, v2 = 0; ++ ++ if(x < 2) return x; ++ ++ for(;;) ++ { ++ if(!n1) return v1; ++ ++ while(n2 >= n1) ++ { ++ n2 /= n1; p2 ^= p1 * n2; v2 ^= v1 * n2; n2 = hibit(p2); ++ } ++ ++ if(!n2) return v2; ++ ++ while(n1 >= n2) ++ { ++ n1 /= n2; p1 ^= p2 * n1; v1 ^= v2 * n1; n1 = hibit(p1); ++ } ++ } ++} ++ ++// define the finite field multiplies required for Rijndael ++ ++#define FFmul02(x) ((((x) & 0x7f) << 1) ^ ((x) & 0x80 ? 0x1b : 0)) ++#define FFmul03(x) ((x) ^ FFmul02(x)) ++ ++// The forward and inverse affine transformations used in the S-box ++ ++#define fwd_affine(x) \ ++ (w = (u_int32_t)x, w ^= (w<<1)^(w<<2)^(w<<3)^(w<<4), 0x63^(unsigned char)(w^(w>>8))) ++ ++static void gen_tabs(void) ++{ u_int32_t i, w; ++ ++ for(i = 0, w = 1; i < AES_RC_LENGTH; ++i) ++ { ++ rcon_tab[i] = bytes2word(w, 0, 0, 0); ++ w = (w << 1) ^ (w & ff_hi ? ff_poly : 0); ++ } ++ ++ for(i = 0; i < 256; ++i) ++ { unsigned char b; ++ ++ s_box[i] = b = fwd_affine(FFinv((unsigned char)i)); ++ ++ w = bytes2word(b, 0, 0, 0); ++ fl_tab[0][i] = w; ++ fl_tab[1][i] = upr(w,1); ++ fl_tab[2][i] = upr(w,2); ++ fl_tab[3][i] = upr(w,3); ++ w = bytes2word(FFmul02(b), b, b, FFmul03(b)); ++ ft_tab[0][i] = w; ++ ft_tab[1][i] = upr(w,1); ++ ft_tab[2][i] = upr(w,2); ++ ft_tab[3][i] = upr(w,3); ++ } ++} ++ ++#define four_tables(x,tab,vf,rf,c) \ ++ ( tab[0][bval(vf(x,0,c),rf(0,c))] \ ++ ^ tab[1][bval(vf(x,1,c),rf(1,c))] \ ++ ^ tab[2][bval(vf(x,2,c),rf(2,c))] \ ++ ^ tab[3][bval(vf(x,3,c),rf(3,c))]) ++ ++#define vf1(x,r,c) (x) ++#define rf1(r,c) (r) ++#define rf2(r,c) ((r-c)&3) ++ ++#define ls_box(x,c) four_tables(x,fl_tab,vf1,rf2,c) ++ ++#define nc (AES_BLOCK_SIZE / 4) ++ ++// Initialise the key schedule from the user supplied key. ++// The key length is now specified in bytes, 32. ++// This corresponds to bit length of 256 bits, and ++// to Nk value of 8 respectively. ++ ++void aes_set_key(aes_context *cx, const unsigned char in_key[], int n_bytes, const int f) ++{ u_int32_t *kf, *kt, rci; ++ ++ if(!tab_gen) { gen_tabs(); tab_gen = 1; } ++ ++ cx->aes_Nkey = 8; ++ cx->aes_Nrnd = (cx->aes_Nkey > nc ? cx->aes_Nkey : nc) + 6; ++ ++ cx->aes_e_key[0] = word_in(in_key ); ++ cx->aes_e_key[1] = word_in(in_key + 4); ++ cx->aes_e_key[2] = word_in(in_key + 8); ++ cx->aes_e_key[3] = word_in(in_key + 12); ++ ++ kf = cx->aes_e_key; ++ kt = kf + nc * (cx->aes_Nrnd + 1) - cx->aes_Nkey; ++ rci = 0; ++ ++ switch(cx->aes_Nkey) ++ { ++ case 8: cx->aes_e_key[4] = word_in(in_key + 16); ++ cx->aes_e_key[5] = word_in(in_key + 20); ++ cx->aes_e_key[6] = word_in(in_key + 24); ++ cx->aes_e_key[7] = word_in(in_key + 28); ++ do ++ { kf[ 8] = kf[0] ^ ls_box(kf[7],3) ^ rcon_tab[rci++]; ++ kf[ 9] = kf[1] ^ kf[ 8]; ++ kf[10] = kf[2] ^ kf[ 9]; ++ kf[11] = kf[3] ^ kf[10]; ++ kf[12] = kf[4] ^ ls_box(kf[11],0); ++ kf[13] = kf[5] ^ kf[12]; ++ kf[14] = kf[6] ^ kf[13]; ++ kf[15] = kf[7] ^ kf[14]; ++ kf += 8; ++ } ++ while (kf < kt); ++ break; ++ } ++} ++ ++// y = output word, x = input word, r = row, c = column ++// for r = 0, 1, 2 and 3 = column accessed for row r ++ ++#define s(x,c) x[c] ++ ++// I am grateful to Frank Yellin for the following constructions ++// which, given the column (c) of the output state variable that ++// is being computed, return the input state variables which are ++// needed for each row (r) of the state ++ ++// For the fixed block size options, compilers reduce these two ++// expressions to fixed variable references. For variable block ++// size code conditional clauses will sometimes be returned ++ ++#define fwd_var(x,r,c) \ ++ ( r==0 ? \ ++ ( c==0 ? s(x,0) \ ++ : c==1 ? s(x,1) \ ++ : c==2 ? s(x,2) \ ++ : c==3 ? s(x,3) \ ++ : c==4 ? s(x,4) \ ++ : c==5 ? s(x,5) \ ++ : c==6 ? s(x,6) \ ++ : s(x,7)) \ ++ : r==1 ? \ ++ ( c==0 ? s(x,1) \ ++ : c==1 ? s(x,2) \ ++ : c==2 ? s(x,3) \ ++ : c==3 ? nc==4 ? s(x,0) : s(x,4) \ ++ : c==4 ? s(x,5) \ ++ : c==5 ? nc==8 ? s(x,6) : s(x,0) \ ++ : c==6 ? s(x,7) \ ++ : s(x,0)) \ ++ : r==2 ? \ ++ ( c==0 ? nc==8 ? s(x,3) : s(x,2) \ ++ : c==1 ? nc==8 ? s(x,4) : s(x,3) \ ++ : c==2 ? nc==4 ? s(x,0) : nc==8 ? s(x,5) : s(x,4) \ ++ : c==3 ? nc==4 ? s(x,1) : nc==8 ? s(x,6) : s(x,5) \ ++ : c==4 ? nc==8 ? s(x,7) : s(x,0) \ ++ : c==5 ? nc==8 ? s(x,0) : s(x,1) \ ++ : c==6 ? s(x,1) \ ++ : s(x,2)) \ ++ : \ ++ ( c==0 ? nc==8 ? s(x,4) : s(x,3) \ ++ : c==1 ? nc==4 ? s(x,0) : nc==8 ? s(x,5) : s(x,4) \ ++ : c==2 ? nc==4 ? s(x,1) : nc==8 ? s(x,6) : s(x,5) \ ++ : c==3 ? nc==4 ? s(x,2) : nc==8 ? s(x,7) : s(x,0) \ ++ : c==4 ? nc==8 ? s(x,0) : s(x,1) \ ++ : c==5 ? nc==8 ? s(x,1) : s(x,2) \ ++ : c==6 ? s(x,2) \ ++ : s(x,3))) ++ ++#define si(y,x,k,c) s(y,c) = word_in(x + 4 * c) ^ k[c] ++#define so(y,x,c) word_out(y + 4 * c, s(x,c)) ++ ++#define fwd_rnd(y,x,k,c) s(y,c)= (k)[c] ^ four_tables(x,ft_tab,fwd_var,rf1,c) ++#define fwd_lrnd(y,x,k,c) s(y,c)= (k)[c] ^ four_tables(x,fl_tab,fwd_var,rf1,c) ++ ++#define locals(y,x) x[4],y[4] ++ ++#define l_copy(y, x) s(y,0) = s(x,0); s(y,1) = s(x,1); \ ++ s(y,2) = s(x,2); s(y,3) = s(x,3); ++#define state_in(y,x,k) si(y,x,k,0); si(y,x,k,1); si(y,x,k,2); si(y,x,k,3) ++#define state_out(y,x) so(y,x,0); so(y,x,1); so(y,x,2); so(y,x,3) ++#define round(rm,y,x,k) rm(y,x,k,0); rm(y,x,k,1); rm(y,x,k,2); rm(y,x,k,3) ++ ++void aes_encrypt(const aes_context *cx, const unsigned char in_blk[], unsigned char out_blk[]) ++{ u_int32_t locals(b0, b1); ++ const u_int32_t *kp = cx->aes_e_key; ++ ++ state_in(b0, in_blk, kp); kp += nc; ++ ++ { u_int32_t rnd; ++ ++ for(rnd = 0; rnd < cx->aes_Nrnd - 1; ++rnd) ++ { ++ round(fwd_rnd, b1, b0, kp); ++ l_copy(b0, b1); kp += nc; ++ } ++ ++ round(fwd_lrnd, b0, b1, kp); ++ } ++ ++ state_out(out_blk, b0); ++} +--- util-linux-2.12q/mount/aes.h ++++ util-linux-2.12q/mount/aes.h +@@ -0,0 +1,97 @@ ++// I retain copyright in this code but I encourage its free use provided ++// that I don't carry any responsibility for the results. I am especially ++// happy to see it used in free and open source software. If you do use ++// it I would appreciate an acknowledgement of its origin in the code or ++// the product that results and I would also appreciate knowing a little ++// about the use to which it is being put. I am grateful to Frank Yellin ++// for some ideas that are used in this implementation. ++// ++// Dr B. R. Gladman 6th April 2001. ++// ++// This is an implementation of the AES encryption algorithm (Rijndael) ++// designed by Joan Daemen and Vincent Rijmen. This version is designed ++// to provide both fixed and dynamic block and key lengths and can also ++// run with either big or little endian internal byte order (see aes.h). ++// It inputs block and key lengths in bytes with the legal values being ++// 16, 24 and 32. ++ ++/* ++ * Modified by Jari Ruusu, May 1 2001 ++ * - Fixed some compile warnings, code was ok but gcc warned anyway. ++ * - Changed basic types: byte -> unsigned char, word -> u_int32_t ++ * - Major name space cleanup: Names visible to outside now begin ++ * with "aes_" or "AES_". A lot of stuff moved from aes.h to aes.c ++ * - Removed C++ and DLL support as part of name space cleanup. ++ * - Eliminated unnecessary recomputation of tables. (actual bug fix) ++ * - Merged precomputed constant tables to aes.c file. ++ * - Removed data alignment restrictions for portability reasons. ++ * - Made block and key lengths accept bit count (128/192/256) ++ * as well byte count (16/24/32). ++ * - Removed all error checks. This change also eliminated the need ++ * to preinitialize the context struct to zero. ++ * - Removed some totally unused constants. ++ */ ++ ++#ifndef _AES_H ++#define _AES_H ++ ++#if defined(__linux__) && defined(__KERNEL__) ++# include ++#else ++# include ++#endif ++ ++// CONFIGURATION OPTIONS (see also aes.c) ++// ++// Define AES_BLOCK_SIZE to set the cipher block size (16, 24 or 32) or ++// leave this undefined for dynamically variable block size (this will ++// result in much slower code). ++// IMPORTANT NOTE: AES_BLOCK_SIZE is in BYTES (16, 24, 32 or undefined). If ++// left undefined a slower version providing variable block length is compiled ++ ++#define AES_BLOCK_SIZE 16 ++ ++// The number of key schedule words for different block and key lengths ++// allowing for method of computation which requires the length to be a ++// multiple of the key length ++// ++// Nk = 4 6 8 ++// ------------- ++// Nb = 4 | 60 60 64 ++// 6 | 96 90 96 ++// 8 | 120 120 120 ++ ++#if !defined(AES_BLOCK_SIZE) || (AES_BLOCK_SIZE == 32) ++#define AES_KS_LENGTH 120 ++#define AES_RC_LENGTH 29 ++#else ++#define AES_KS_LENGTH 4 * AES_BLOCK_SIZE ++#define AES_RC_LENGTH (9 * AES_BLOCK_SIZE) / 8 - 8 ++#endif ++ ++typedef struct ++{ ++ u_int32_t aes_Nkey; // the number of words in the key input block ++ u_int32_t aes_Nrnd; // the number of cipher rounds ++ u_int32_t aes_e_key[AES_KS_LENGTH]; // the encryption key schedule ++ u_int32_t aes_d_key[AES_KS_LENGTH]; // the decryption key schedule ++#if !defined(AES_BLOCK_SIZE) ++ u_int32_t aes_Ncol; // the number of columns in the cipher state ++#endif ++} aes_context; ++ ++// THE CIPHER INTERFACE ++ ++#if !defined(AES_BLOCK_SIZE) ++extern void aes_set_blk(aes_context *, const int); ++#endif ++extern void aes_set_key(aes_context *, const unsigned char [], const int, const int); ++extern void aes_encrypt(const aes_context *, const unsigned char [], unsigned char []); ++extern void aes_decrypt(const aes_context *, const unsigned char [], unsigned char []); ++ ++// The block length inputs to aes_set_block and aes_set_key are in numbers ++// of bytes or bits. The calls to subroutines must be made in the above ++// order but multiple calls can be made without repeating earlier calls ++// if their parameters have not changed. ++ ++#endif // _AES_H +--- util-linux-2.12q/mount/lomount.c ++++ util-linux-2.12q/mount/lomount.c +@@ -1,4 +1,15 @@ +-/* Originally from Ted's losetup.c */ ++/* Taken from Ted's losetup.c - Mitch */ ++/* Added vfs mount options - aeb - 960223 */ ++/* Removed lomount - aeb - 960224 */ ++ ++/* ++ * 1999-02-22 Arkadiusz Mi¶kiewicz ++ * - added Native Language Support ++ * 1999-03-21 Arnaldo Carvalho de Melo ++ * - fixed strerr(errno) in gettext calls ++ * 2001-04-11 Jari Ruusu ++ * - added AES support ++ */ + + #define LOOPMAJOR 7 + +@@ -13,60 +24,74 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include + #include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + #include "loop.h" + #include "lomount.h" + #include "xstrncpy.h" + #include "nls.h" ++#include "sha512.h" ++#include "rmd160.h" ++#include "aes.h" + + extern int verbose; +-extern char *progname; + extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ + extern void error (const char *fmt, ...); /* idem */ ++extern void show_all_loops(void); ++extern int read_options_from_fstab(char *, char **); + +-#ifdef LOOP_SET_FD +- +-static int +-loop_info64_to_old(const struct loop_info64 *info64, struct loop_info *info) +-{ +- memset(info, 0, sizeof(*info)); +- info->lo_number = info64->lo_number; +- info->lo_device = info64->lo_device; +- info->lo_inode = info64->lo_inode; +- info->lo_rdevice = info64->lo_rdevice; +- info->lo_offset = info64->lo_offset; +- info->lo_encrypt_type = info64->lo_encrypt_type; +- info->lo_encrypt_key_size = info64->lo_encrypt_key_size; +- info->lo_flags = info64->lo_flags; +- info->lo_init[0] = info64->lo_init[0]; +- info->lo_init[1] = info64->lo_init[1]; +- if (info->lo_encrypt_type == LO_CRYPT_CRYPTOAPI) +- memcpy(info->lo_name, info64->lo_crypt_name, LO_NAME_SIZE); +- else +- memcpy(info->lo_name, info64->lo_file_name, LO_NAME_SIZE); +- memcpy(info->lo_encrypt_key, info64->lo_encrypt_key, LO_KEY_SIZE); +- +- /* error in case values were truncated */ +- if (info->lo_device != info64->lo_device || +- info->lo_rdevice != info64->lo_rdevice || +- info->lo_inode != info64->lo_inode || +- info->lo_offset != info64->lo_offset) +- return -EOVERFLOW; ++#if !defined(LOOP_PASSWORD_MIN_LENGTH) ++# define LOOP_PASSWORD_MIN_LENGTH 20 ++#endif + +- return 0; +-} ++char *passFDnumber = (char *)0; ++char *passAskTwice = (char *)0; ++char *passSeedString = (char *)0; ++char *passHashFuncName = (char *)0; ++char *passIterThousands = (char *)0; ++char *loInitValue = (char *)0; ++char *gpgKeyFile = (char *)0; ++char *gpgHomeDir = (char *)0; ++char *loopOffsetBytes = (char *)0; ++char *loopSizeBytes = (char *)0; ++char *loopEncryptionType = (char *)0; ++ ++static int multiKeyMode = 0; /* 0=single-key 64=multi-key-v2 65=multi-key-v3 1000=any */ ++static char *multiKeyPass[65]; ++static char *loopFileName; + + #ifdef MAIN ++static char * ++crypt_name (int id, int *flags) { ++ int i; ++ ++ for (i = 0; loop_crypt_type_tbl[i].id != -1; i++) ++ if(id == loop_crypt_type_tbl[i].id) { ++ *flags = loop_crypt_type_tbl[i].flags; ++ return loop_crypt_type_tbl[i].name; ++ } ++ *flags = 0; ++ if(id == 18) ++ return "CryptoAPI"; ++ return "undefined"; ++} + + static int + show_loop(char *device) { +- struct loop_info loopinfo; +- struct loop_info64 loopinfo64; +- int fd, errsv; ++ struct loop_info64 loopinfo; ++ int fd; + + if ((fd = open(device, O_RDONLY)) < 0) { + int errsv = errno; +@@ -74,70 +99,60 @@ + device, strerror (errsv)); + return 2; + } +- +- if (ioctl(fd, LOOP_GET_STATUS64, &loopinfo64) == 0) { +- +- loopinfo64.lo_file_name[LO_NAME_SIZE-2] = '*'; +- loopinfo64.lo_file_name[LO_NAME_SIZE-1] = 0; +- loopinfo64.lo_crypt_name[LO_NAME_SIZE-1] = 0; +- +- printf("%s: [%04llx]:%llu (%s)", +- device, loopinfo64.lo_device, loopinfo64.lo_inode, +- loopinfo64.lo_file_name); +- +- if (loopinfo64.lo_offset) +- printf(_(", offset %lld"), loopinfo64.lo_offset); +- +- if (loopinfo64.lo_sizelimit) +- printf(_(", sizelimit %lld"), loopinfo64.lo_sizelimit); +- +- if (loopinfo64.lo_encrypt_type || +- loopinfo64.lo_crypt_name[0]) { +- char *e = loopinfo64.lo_crypt_name; +- +- if (*e == 0 && loopinfo64.lo_encrypt_type == 1) +- e = "XOR"; +- printf(_(", encryption %s (type %d)"), +- e, loopinfo64.lo_encrypt_type); +- } +- printf("\n"); ++ if (loop_get_status64_ioctl(fd, &loopinfo) < 0) { ++ int errsv = errno; ++ fprintf(stderr, _("loop: can't get info on device %s: %s\n"), ++ device, strerror (errsv)); + close (fd); +- return 0; ++ return 1; + } +- +- if (ioctl(fd, LOOP_GET_STATUS, &loopinfo) == 0) { +- printf ("%s: [%04x]:%ld (%s)", +- device, loopinfo.lo_device, loopinfo.lo_inode, +- loopinfo.lo_name); +- +- if (loopinfo.lo_offset) +- printf(_(", offset %d"), loopinfo.lo_offset); +- +- if (loopinfo.lo_encrypt_type) +- printf(_(", encryption type %d\n"), +- loopinfo.lo_encrypt_type); +- +- printf("\n"); +- close (fd); +- return 0; ++ loopinfo.lo_file_name[LO_NAME_SIZE-1] = 0; ++ loopinfo.lo_crypt_name[LO_NAME_SIZE-1] = 0; ++ printf("%s: [%04llx]:%llu (%s)", device, (unsigned long long)loopinfo.lo_device, ++ (unsigned long long)loopinfo.lo_inode, loopinfo.lo_file_name); ++ if (loopinfo.lo_offset) { ++ if ((long long)loopinfo.lo_offset < 0) { ++ printf(_(" offset=@%llu"), -((unsigned long long)loopinfo.lo_offset)); ++ } else { ++ printf(_(" offset=%llu"), (unsigned long long)loopinfo.lo_offset); ++ } + } +- +- errsv = errno; +- fprintf(stderr, _("loop: can't get info on device %s: %s\n"), +- device, strerror (errsv)); ++ if (loopinfo.lo_sizelimit) ++ printf(_(" sizelimit=%llu"), (unsigned long long)loopinfo.lo_sizelimit); ++ if (loopinfo.lo_encrypt_type) { ++ int flags; ++ unsigned char *s = crypt_name (loopinfo.lo_encrypt_type, &flags); ++ ++ printf(_(" encryption=%s"), s); ++ /* type 18 == LO_CRYPT_CRYPTOAPI */ ++ if (loopinfo.lo_encrypt_type == 18) { ++ printf("/%s", loopinfo.lo_crypt_name); ++ } else { ++ if(flags & 2) ++ printf("-"); ++ if(flags & 1) ++ printf("%u", (unsigned int)loopinfo.lo_encrypt_key_size << 3); ++ } ++ } ++ switch(loopinfo.lo_flags & 0x180000) { ++ case 0x180000: ++ printf(_(" multi-key-v3")); ++ break; ++ case 0x100000: ++ printf(_(" multi-key-v2")); ++ break; ++ } ++ /* type 2 == LO_CRYPT_DES */ ++ if (loopinfo.lo_init[0] && (loopinfo.lo_encrypt_type != 2)) ++ printf(_(" loinit=%llu"), (unsigned long long)loopinfo.lo_init[0]); ++ if (loopinfo.lo_flags & 0x200000) ++ printf(_(" read-only")); ++ printf("\n"); + close (fd); +- return 1; +-} +-#endif +- +-int +-is_loop_device (const char *device) { +- struct stat statbuf; + +- return (stat(device, &statbuf) == 0 && +- S_ISBLK(statbuf.st_mode) && +- major(statbuf.st_rdev) == LOOPMAJOR); ++ return 0; + } ++#endif + + #define SIZE(a) (sizeof(a)/sizeof(a[0])) + +@@ -148,9 +163,8 @@ + So, we just try /dev/loop[0-7]. */ + char dev[20]; + char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" }; +- int i, j, fd, somedev = 0, someloop = 0, permission = 0; ++ int i, j, fd, somedev = 0, someloop = 0; + struct stat statbuf; +- struct loop_info loopinfo; + + for (j = 0; j < SIZE(loop_formats); j++) { + for(i = 0; i < 256; i++) { +@@ -159,16 +173,14 @@ + somedev++; + fd = open (dev, O_RDONLY); + if (fd >= 0) { +- if(ioctl (fd, LOOP_GET_STATUS, &loopinfo) == 0) ++ if (is_unused_loop_device(fd) == 0) + someloop++; /* in use */ + else if (errno == ENXIO) { + close (fd); + return xstrdup(dev);/* probably free */ + } + close (fd); +- } else if (errno == EACCES) +- permission++; +- ++ } + continue;/* continue trying as long as devices exist */ + } + break; +@@ -176,75 +188,563 @@ + } + + if (!somedev) +- error(_("%s: could not find any device /dev/loop#"), progname); +- else if (!someloop && permission) +- error(_("%s: no permission to look at /dev/loop#"), progname); ++ error(_("mount: could not find any device /dev/loop#")); + else if (!someloop) +- error(_( +- "%s: Could not find any loop device. Maybe this kernel " +- "does not know\n" +- " about the loop device? (If so, recompile or " +- "`modprobe loop'.)"), progname); ++ error(_("mount: Could not find any loop device. Maybe this kernel does not know\n" ++ " about the loop device? (If so, recompile or `modprobe loop'.)")); + else +- error(_("%s: could not find any free loop device"), progname); ++ error(_("mount: could not find any free loop device")); + return 0; + } + +-/* +- * A function to read the passphrase either from the terminal or from +- * an open file descriptor. +- */ +-static char * +-xgetpass(int pfd, const char *prompt) { +- char *pass; +- int buflen, i; +- +- if (pfd < 0) /* terminal */ +- return getpass(prompt); +- +- pass = NULL; +- buflen = 0; +- for (i=0; ; i++) { +- if (i >= buflen-1) { +- /* we're running out of space in the buffer. +- * Make it bigger: */ +- char *tmppass = pass; +- buflen += 128; +- pass = realloc(tmppass, buflen); +- if (pass == NULL) { +- /* realloc failed. Stop reading. */ +- error("Out of memory while reading passphrase"); +- pass = tmppass; /* the old buffer hasn't changed */ +- break; +- } +- } +- if (read(pfd, pass+i, 1) != 1 || +- pass[i] == '\n' || pass[i] == 0) ++static int rd_wr_retry(int fd, char *buf, int cnt, int w) ++{ ++ int x, y, z; ++ ++ x = 0; ++ while(x < cnt) { ++ y = cnt - x; ++ if(w) { ++ z = write(fd, buf + x, y); ++ } else { ++ z = read(fd, buf + x, y); ++ if (!z) return x; ++ } ++ if(z < 0) { ++ if ((errno == EAGAIN) || (errno == ENOMEM) || (errno == ERESTART) || (errno == EINTR)) { ++ continue; ++ } ++ return x; ++ } ++ x += z; ++ } ++ return x; ++} ++ ++static char *get_FD_pass(int fd) ++{ ++ char *p = NULL, *n; ++ int x = 0, y = 0; ++ ++ do { ++ if(y >= (x - 1)) { ++ x += 128; ++ /* Must enforce some max limit here -- this code */ ++ /* runs as part of mount, and mount is setuid root */ ++ /* and has used mlockall(MCL_CURRENT | MCL_FUTURE) */ ++ if(x > (4*1024)) return(NULL); ++ n = malloc(x); ++ if(!n) return(NULL); ++ if(p) { ++ memcpy(n, p, y); ++ memset(p, 0, y); ++ free(p); ++ } ++ p = n; ++ } ++ if(rd_wr_retry(fd, p + y, 1, 0) != 1) break; ++ if((p[y] == '\n') || !p[y]) break; ++ y++; ++ } while(1); ++ if(p) p[y] = 0; ++ return p; ++} ++ ++static unsigned long long mystrtoull(char *s, int acceptAT) ++{ ++ unsigned long long v = 0; ++ int negative = 0; ++ ++ while ((*s == ' ') || (*s == '\t')) ++ s++; ++ if (acceptAT && (*s == '@')) { ++ s++; ++ negative = 1; ++ } ++ if (*s == '0') { ++ s++; ++ if ((*s == 'x') || (*s == 'X')) { ++ s++; ++ sscanf(s, "%llx", &v); ++ } else { ++ sscanf(s, "%llo", &v); ++ } ++ } else { ++ sscanf(s, "%llu", &v); ++ } ++ return negative ? -v : v; ++} ++ ++static char *do_GPG_pipe(char *pass) ++{ ++ int x, pfdi[2], pfdo[2]; ++ char str[10], *a[16], *e[2], *h; ++ pid_t gpid; ++ struct passwd *p; ++ ++ if((getuid() == 0) && gpgHomeDir && gpgHomeDir[0]) { ++ h = gpgHomeDir; ++ } else { ++ if(!(p = getpwuid(getuid()))) { ++ fprintf(stderr, _("Error: Unable to detect home directory for uid %d\n"), (int)getuid()); ++ return NULL; ++ } ++ h = p->pw_dir; ++ } ++ if(!(e[0] = malloc(strlen(h) + 6))) { ++ nomem1: ++ fprintf(stderr, _("Error: Unable to allocate memory\n")); ++ return NULL; ++ } ++ sprintf(e[0], "HOME=%s", h); ++ e[1] = 0; ++ ++ if(pipe(&pfdi[0])) { ++ nomem2: ++ free(e[0]); ++ goto nomem1; ++ } ++ if(pipe(&pfdo[0])) { ++ close(pfdi[0]); ++ close(pfdi[1]); ++ goto nomem2; ++ } ++ ++ /* ++ * When this code is run as part of losetup, normal read permissions ++ * affect the open() below because losetup is not setuid-root. ++ * ++ * When this code is run as part of mount, only root can set ++ * 'gpgKeyFile' and as such, only root can decide what file is opened ++ * below. However, since mount is usually setuid-root all non-root ++ * users can also open() the file too, but that file's contents are ++ * only piped to gpg. This readable-for-all is intended behaviour, ++ * and is very useful in situations where non-root users mount loop ++ * devices with their own gpg private key, and yet don't have access ++ * to the actual key used to encrypt loop device. ++ */ ++ if((x = open(gpgKeyFile, O_RDONLY)) == -1) { ++ fprintf(stderr, _("Error: unable to open %s for reading\n"), gpgKeyFile); ++ nomem3: ++ free(e[0]); ++ close(pfdo[0]); ++ close(pfdo[1]); ++ close(pfdi[0]); ++ close(pfdi[1]); ++ return NULL; ++ } ++ ++ /* ++ * If someone puts a gpg key file at beginning of device and ++ * puts the real file system at some offset into the device, ++ * this code extracts that gpg key file into a temp file so gpg ++ * won't end up reading whole device when decrypting the key file. ++ * ++ * Example of encrypted cdrom mount with 8192 bytes reserved for gpg key file: ++ * mount -t iso9660 /dev/cdrom /cdrom -o loop=/dev/loop0,encryption=AES128,gpgkey=/dev/cdrom,offset=8192 ++ * ^^^^^^^^^^ ^^^^^^^^^^ ^^^^ ++ */ ++ if(loopOffsetBytes && !strcmp(loopFileName, gpgKeyFile)) { ++ FILE *f; ++ char b[1024]; ++ long long cnt; ++ int cnt2, cnt3; ++ ++ cnt = mystrtoull(loopOffsetBytes, 1); ++ if(cnt < 0) cnt = -cnt; ++ if(cnt > (1024 * 1024)) cnt = 1024 * 1024; /* sanity check */ ++ f = tmpfile(); ++ if(!f) { ++ fprintf(stderr, _("Error: unable to create temp file\n")); ++ close(x); ++ goto nomem3; ++ } ++ while(cnt > 0) { ++ cnt2 = sizeof(b); ++ if(cnt < cnt2) cnt2 = cnt; ++ cnt3 = rd_wr_retry(x, b, cnt2, 0); ++ if(cnt3 && (fwrite(b, cnt3, 1, f) != 1)) { ++ tmpWrErr: ++ fprintf(stderr, _("Error: unable to write to temp file\n")); ++ fclose(f); ++ close(x); ++ goto nomem3; ++ } ++ if(cnt2 != cnt3) break; ++ cnt -= cnt3; ++ } ++ if(fflush(f)) goto tmpWrErr; ++ close(x); ++ x = dup(fileno(f)); ++ fclose(f); ++ lseek(x, 0L, SEEK_SET); ++ } ++ ++ sprintf(str, "%d", pfdi[0]); ++ if(!(gpid = fork())) { ++ dup2(x, 0); ++ dup2(pfdo[1], 1); ++ close(x); ++ close(pfdi[1]); ++ close(pfdo[0]); ++ close(pfdo[1]); ++ if((x = open("/dev/null", O_WRONLY)) >= 0) { ++ dup2(x, 2); ++ close(x); ++ } ++ x = 0; ++ a[x++] = "gpg"; ++ if(gpgHomeDir && gpgHomeDir[0]) { ++ a[x++] = "--homedir"; ++ a[x++] = gpgHomeDir; ++ } ++ a[x++] = "--options"; ++ a[x++] = "/dev/null"; ++ a[x++] = "--quiet"; ++ a[x++] = "--batch"; ++ a[x++] = "--no-tty"; ++ a[x++] = "--passphrase-fd"; ++ a[x++] = str; ++ a[x++] = "--decrypt"; ++ a[x] = 0; ++ setgid(getgid()); ++ setuid(getuid()); ++ for(x = 3; x < 1024; x++) { ++ if(x == pfdi[0]) continue; ++ close(x); ++ } ++ execve("/bin/gpg", &a[0], &e[0]); ++ execve("/usr/bin/gpg", &a[0], &e[0]); ++ execve("/usr/local/bin/gpg", &a[0], &e[0]); ++ exit(1); ++ } ++ free(e[0]); ++ close(x); ++ close(pfdi[0]); ++ close(pfdo[1]); ++ if(gpid == -1) { ++ close(pfdi[1]); ++ close(pfdo[0]); ++ goto nomem1; ++ } ++ ++ x = strlen(pass); ++ rd_wr_retry(pfdi[1], pass, x, 1); ++ rd_wr_retry(pfdi[1], "\n", 1, 1); ++ close(pfdi[1]); ++ memset(pass, 0, x); ++ x = 0; ++ while(x < 65) { ++ multiKeyPass[x] = get_FD_pass(pfdo[0]); ++ if(!multiKeyPass[x]) { ++ /* mem alloc failed - abort */ ++ multiKeyPass[0] = 0; + break; ++ } ++ if(strlen(multiKeyPass[x]) < LOOP_PASSWORD_MIN_LENGTH) break; ++ x++; ++ } ++ if(x == 65) ++ multiKeyMode = 65; ++ if(x == 64) ++ multiKeyMode = 64; ++ close(pfdo[0]); ++ waitpid(gpid, &x, 0); ++ if(!multiKeyPass[0]) goto nomem1; ++ return multiKeyPass[0]; ++} ++ ++static char *sGetPass(int minLen, int warnLen) ++{ ++ char *p, *s, *seed; ++ int i, ask2; ++ ++ if(!passFDnumber) { ++ p = getpass(_("Password: ")); ++ ask2 = passAskTwice ? 1 : 0; ++ } else { ++ i = atoi(passFDnumber); ++ if(gpgKeyFile && gpgKeyFile[0]) { ++ p = get_FD_pass(i); ++ } else { ++ int x = 0; ++ while(x < 65) { ++ multiKeyPass[x] = get_FD_pass(i); ++ if(!multiKeyPass[x]) goto nomem; ++ if(strlen(multiKeyPass[x]) < LOOP_PASSWORD_MIN_LENGTH) break; ++ x++; ++ } ++ if(x == 65) { ++ multiKeyMode = 65; ++ return multiKeyPass[0]; ++ } ++ if(x == 64) { ++ multiKeyMode = 64; ++ return multiKeyPass[0]; ++ } ++ p = multiKeyPass[0]; ++ } ++ ask2 = 0; ++ } ++ if(!p) goto nomem; ++ if(gpgKeyFile && gpgKeyFile[0]) { ++ if(ask2) { ++ i = strlen(p); ++ s = malloc(i + 1); ++ if(!s) goto nomem; ++ strcpy(s, p); ++ p = getpass(_("Retype password: ")); ++ if(!p) goto nomem; ++ if(strcmp(s, p)) goto compareErr; ++ memset(s, 0, i); ++ free(s); ++ ask2 = 0; ++ } ++ p = do_GPG_pipe(p); ++ if(!p) return(NULL); ++ if(!p[0]) { ++ fprintf(stderr, _("Error: gpg key file decryption failed\n")); ++ return(NULL); ++ } ++ if(multiKeyMode) return(p); ++ } ++ i = strlen(p); ++ if(i < minLen) { ++ fprintf(stderr, _("Error: Password must be at least %d characters.\n"), minLen); ++ return(NULL); ++ } ++ seed = passSeedString; ++ if(!seed) seed = ""; ++ s = malloc(i + strlen(seed) + 1); ++ if(!s) { ++ nomem: ++ fprintf(stderr, _("Error: Unable to allocate memory\n")); ++ return(NULL); ++ } ++ strcpy(s, p); ++ memset(p, 0, i); ++ if(ask2) { ++ p = getpass(_("Retype password: ")); ++ if(!p) goto nomem; ++ if(strcmp(s, p)) { ++ compareErr: ++ fprintf(stderr, _("Error: Passwords are not identical\n")); ++ return(NULL); ++ } ++ memset(p, 0, i); + } ++ if(i < warnLen) { ++ fprintf(stderr, _("WARNING - Please use longer password (%d or more characters)\n"), LOOP_PASSWORD_MIN_LENGTH); ++ } ++ strcat(s, seed); ++ return(s); ++} + +- if (pass == NULL) +- return ""; ++/* this is for compatibility with historic loop-AES version */ ++static void unhashed1_key_setup(unsigned char *keyStr, int ile, unsigned char *keyBuf, int bufSize) ++{ ++ register int x, y, z, cnt = ile; ++ unsigned char *kp; + +- pass[i] = 0; +- return pass; ++ memset(keyBuf, 0, bufSize); ++ kp = keyStr; ++ for(x = 0; x < (bufSize * 8); x += 6) { ++ y = *kp++; ++ if(--cnt <= 0) { ++ kp = keyStr; ++ cnt = ile; ++ } ++ if((y >= '0') && (y <= '9')) y -= '0'; ++ else if((y >= 'A') && (y <= 'Z')) y -= ('A' - 10); ++ else if((y >= 'a') && (y <= 'z')) y -= ('a' - 36); ++ else if((y == '.') || (y == '/')) y += (62 - '.'); ++ else y &= 63; ++ z = x >> 3; ++ if(z < bufSize) { ++ keyBuf[z] |= y << (x & 7); ++ } ++ z++; ++ if(z < bufSize) { ++ keyBuf[z] |= y >> (8 - (x & 7)); ++ } ++ } + } + +-static int +-digits_only(const char *s) { +- while (*s) +- if (!isdigit(*s++)) +- return 0; +- return 1; ++/* this is for compatibility with mainline mount */ ++static void unhashed2_key_setup(unsigned char *keyStr, int ile, unsigned char *keyBuf, int bufSize) ++{ ++ memset(keyBuf, 0, bufSize); ++ strncpy(keyBuf, keyStr, bufSize - 1); ++ keyBuf[bufSize - 1] = 0; ++} ++ ++static void rmd160HashTwiceWithA(unsigned char *ib, int ile, unsigned char *ob, int ole) ++{ ++ char tmpBuf[20 + 20]; ++ char pwdCopy[130]; ++ ++ if(ole < 1) return; ++ memset(ob, 0, ole); ++ if(ole > 40) ole = 40; ++ rmd160_hash_buffer(&tmpBuf[0], ib, ile); ++ pwdCopy[0] = 'A'; ++ if(ile > sizeof(pwdCopy) - 1) ile = sizeof(pwdCopy) - 1; ++ memcpy(pwdCopy + 1, ib, ile); ++ rmd160_hash_buffer(&tmpBuf[20], pwdCopy, ile + 1); ++ memcpy(ob, tmpBuf, ole); ++ memset(tmpBuf, 0, sizeof(tmpBuf)); ++ memset(pwdCopy, 0, sizeof(pwdCopy)); ++} ++ ++static int loop_create_random_keys(char *partition, int loopro, unsigned char *k) ++{ ++ int x, y; ++ sha512_context s; ++ unsigned char b[4096]; ++ FILE *f; ++ ++ if(loopro) { ++ fprintf(stderr, _("Error: read-only device %s\n"), partition); ++ return 1; ++ } ++ ++ /* ++ * Compute SHA-512 over first 40 KB of old fs data. SHA-512 hash ++ * output is then used as entropy for new fs encryption key. ++ */ ++ if(!(f = fopen(partition, "r+"))) { ++ fprintf(stderr, _("Error: unable to open device %s\n"), partition); ++ return 1; ++ } ++ fseek(f, (long)0, SEEK_SET); ++ sha512_init(&s); ++ for(x = 0; x < 10; x++) { ++ if(fread(&b[0], sizeof(b), 1, f) != 1) break; ++ sha512_write(&s, &b[0], sizeof(b)); ++ } ++ sha512_final(&s); ++ ++ /* ++ * Overwrite 40 KB of old fs data 20 times so that recovering ++ * SHA-512 output beyond this point is difficult and expensive. ++ */ ++ for(y = 0; y < 20; y++) { ++ int z; ++ struct { ++ struct timeval tv; ++ unsigned char h[64]; ++ int x,y,z; ++ } j; ++ if(fseek(f, (long)0, SEEK_SET)) break; ++ memcpy(&j.h[0], &s.sha_out[0], 64); ++ gettimeofday(&j.tv, NULL); ++ j.y = y; ++ for(x = 0; x < 10; x++) { ++ j.x = x; ++ for(z = 0; z < sizeof(b); z += 64) { ++ j.z = z; ++ sha512_hash_buffer((unsigned char *)&j, sizeof(j), &b[z], 64); ++ } ++ if(fwrite(&b[0], sizeof(b), 1, f) != 1) break; ++ } ++ memset(&j, 0, sizeof(j)); ++ if(fflush(f)) break; ++ if(fsync(fileno(f))) break; ++ } ++ fclose(f); ++ ++ /* ++ * Use all 512 bits of hash output ++ */ ++ memcpy(&b[0], &s.sha_out[0], 64); ++ memset(&s, 0, sizeof(s)); ++ ++ /* ++ * Read 32 bytes of random entropy from kernel's random ++ * number generator. This code may be executed early on startup ++ * scripts and amount of random entropy may be non-existent. ++ * SHA-512 of old fs data is used as workaround for missing ++ * entropy in kernel's random number generator. ++ */ ++ if(!(f = fopen("/dev/urandom", "r"))) { ++ fprintf(stderr, _("Error: unable to open /dev/urandom\n")); ++ return 1; ++ } ++ fread(&b[64], 32, 1, f); ++ ++ /* generate multi-key hashes */ ++ x = 0; ++ while(x < 65) { ++ fread(&b[64+32], 16, 1, f); ++ sha512_hash_buffer(&b[0], 64+32+16, k, 32); ++ k += 32; ++ x++; ++ } ++ ++ fclose(f); ++ memset(&b[0], 0, sizeof(b)); ++ return 0; ++} ++ ++#if !defined(MAIN) ++static int loop_fork_mkfs_command(char *device, char *fstype) ++{ ++ int x, y = 0; ++ char *a[10], *e[1]; ++ ++ sync(); ++ if(!(x = fork())) { ++ if((x = open("/dev/null", O_WRONLY)) >= 0) { ++ dup2(x, 0); ++ dup2(x, 1); ++ dup2(x, 2); ++ close(x); ++ } ++ x = 0; ++ a[x++] = "mkfs"; ++ a[x++] = "-t"; ++ a[x++] = fstype; ++ /* mkfs.reiserfs and mkfs.xfs need -f option */ ++ if(!strcmp(fstype, "reiserfs") || !strcmp(fstype, "xfs")) { ++ a[x++] = "-f"; ++ } ++ a[x++] = device; ++ a[x] = 0; ++ e[0] = 0; ++ setgid(getgid()); ++ setuid(getuid()); ++ for(x = 3; x < 1024; x++) { ++ close(x); ++ } ++ execve("/sbin/mkfs", &a[0], &e[0]); ++ exit(1); ++ } ++ if(x == -1) { ++ fprintf(stderr, _("Error: fork failed\n")); ++ return 1; ++ } ++ waitpid(x, &y, 0); ++ sync(); ++ if(!WIFEXITED(y) || (WEXITSTATUS(y) != 0)) { ++ fprintf(stderr, _("Error: encrypted file system mkfs failed\n")); ++ return 1; ++ } ++ return 0; + } ++#endif + + int +-set_loop(const char *device, const char *file, unsigned long long offset, +- const char *encryption, int pfd, int *loopro) { +- struct loop_info64 loopinfo64; ++set_loop(const char *device, const char *file, int *loopro, const char **fstype, unsigned int *AutoChmodPtr) { ++ struct loop_info64 loopinfo; + int fd, ffd, mode, i; +- char *pass; ++ char *pass, *apiName = NULL; ++ void (*hashFunc)(unsigned char *, int, unsigned char *, int); ++ unsigned char multiKeyBits[65][32]; ++ int minPassLen = LOOP_PASSWORD_MIN_LENGTH; ++ int run_mkfs_command = 0; + ++ loopFileName = (char *)file; ++ multiKeyMode = 0; + mode = (*loopro ? O_RDONLY : O_RDWR); + if ((ffd = open(file, mode)) < 0) { + if (!*loopro && errno == EROFS) +@@ -256,32 +756,25 @@ + } + if ((fd = open(device, mode)) < 0) { + perror (device); +- return 1; ++ goto close_ffd_return1; + } + *loopro = (mode == O_RDONLY); + +- memset(&loopinfo64, 0, sizeof(loopinfo64)); +- +- xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE); ++ memset (&loopinfo, 0, sizeof (loopinfo)); ++ xstrncpy (loopinfo.lo_file_name, file, LO_NAME_SIZE); ++ if (loopEncryptionType) ++ loopinfo.lo_encrypt_type = loop_crypt_type (loopEncryptionType, &loopinfo.lo_encrypt_key_size, &apiName); ++ if (loopOffsetBytes) ++ loopinfo.lo_offset = mystrtoull(loopOffsetBytes, 1); ++ if (loopSizeBytes) ++ loopinfo.lo_sizelimit = mystrtoull(loopSizeBytes, 0); + +- if (encryption && *encryption) { +- if (digits_only(encryption)) { +- loopinfo64.lo_encrypt_type = atoi(encryption); +- } else { +- loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI; +- snprintf(loopinfo64.lo_crypt_name, LO_NAME_SIZE, +- "%s", encryption); +- } +- } +- +- loopinfo64.lo_offset = offset; +- +-#ifdef MCL_FUTURE ++#ifdef MCL_FUTURE + /* + * Oh-oh, sensitive data coming up. Better lock into memory to prevent + * passwd etc being swapped out and left somewhere on disk. + */ +- ++ + if(mlockall(MCL_CURRENT | MCL_FUTURE)) { + perror("memlock"); + fprintf(stderr, _("Couldn't lock into memory, exiting.\n")); +@@ -289,126 +782,222 @@ + } + #endif + +- switch (loopinfo64.lo_encrypt_type) { ++ switch (loopinfo.lo_encrypt_type) { + case LO_CRYPT_NONE: +- loopinfo64.lo_encrypt_key_size = 0; ++ loopinfo.lo_encrypt_key_size = 0; + break; + case LO_CRYPT_XOR: +- pass = getpass(_("Password: ")); +- goto gotpass; ++ pass = sGetPass (1, 0); ++ if(!pass) goto close_fd_ffd_return1; ++ xstrncpy (loopinfo.lo_encrypt_key, pass, LO_KEY_SIZE); ++ loopinfo.lo_encrypt_key_size = strlen(loopinfo.lo_encrypt_key); ++ break; ++ case 3: /* LO_CRYPT_FISH2 */ ++ case 4: /* LO_CRYPT_BLOW */ ++ case 7: /* LO_CRYPT_SERPENT */ ++ case 8: /* LO_CRYPT_MARS */ ++ case 11: /* LO_CRYPT_RC6 */ ++ case 12: /* LO_CRYPT_DES_EDE3 */ ++ case 16: /* LO_CRYPT_AES */ ++ case 18: /* LO_CRYPT_CRYPTOAPI */ ++ /* set default hash function */ ++ hashFunc = sha256_hash_buffer; ++ if(loopinfo.lo_encrypt_key_size == 24) hashFunc = sha384_hash_buffer; ++ if(loopinfo.lo_encrypt_key_size == 32) hashFunc = sha512_hash_buffer; ++ /* possibly override default hash function */ ++ if(passHashFuncName) { ++ if(!strcasecmp(passHashFuncName, "sha256")) { ++ hashFunc = sha256_hash_buffer; ++ } else if(!strcasecmp(passHashFuncName, "sha384")) { ++ hashFunc = sha384_hash_buffer; ++ } else if(!strcasecmp(passHashFuncName, "sha512")) { ++ hashFunc = sha512_hash_buffer; ++ } else if(!strcasecmp(passHashFuncName, "rmd160")) { ++ hashFunc = rmd160HashTwiceWithA; ++ minPassLen = 1; ++ } else if(!strcasecmp(passHashFuncName, "unhashed1")) { ++ hashFunc = unhashed1_key_setup; ++ } else if(!strcasecmp(passHashFuncName, "unhashed2")) { ++ hashFunc = unhashed2_key_setup; ++ minPassLen = 1; ++ } else if(!strcasecmp(passHashFuncName, "unhashed3") && passFDnumber && !gpgKeyFile) { ++ /* unhashed3 hash type reads binary key from file descriptor. */ ++ /* This is not compatible with gpgkey= mount option */ ++ if(rd_wr_retry(atoi(passFDnumber), (char *)&loopinfo.lo_encrypt_key[0], LO_KEY_SIZE, 0) < 1) { ++ fprintf(stderr, _("Error: couldn't read binary key\n")); ++ goto close_fd_ffd_return1; ++ } ++ break; /* out of switch(loopinfo.lo_encrypt_type) */ ++ } else if(!strncasecmp(passHashFuncName, "random", 6) && ((passHashFuncName[6] == 0) || (passHashFuncName[6] == '/'))) { ++ /* random hash type sets up 65 random keys */ ++ /* WARNING! DO NOT USE RANDOM HASH TYPE ON PARTITION WITH EXISTING */ ++ /* IMPORTANT DATA ON IT. RANDOM HASH TYPE WILL DESTROY YOUR DATA. */ ++ if(loop_create_random_keys((char*)file, *loopro, &multiKeyBits[0][0])) { ++ goto close_fd_ffd_return1; ++ } ++ memcpy(&loopinfo.lo_encrypt_key[0], &multiKeyBits[0][0], sizeof(loopinfo.lo_encrypt_key)); ++ run_mkfs_command = multiKeyMode = 1000; ++ break; /* out of switch(loopinfo.lo_encrypt_type) */ ++ } ++ } ++ pass = sGetPass (minPassLen, LOOP_PASSWORD_MIN_LENGTH); ++ if(!pass) goto close_fd_ffd_return1; ++ i = strlen(pass); ++ if(hashFunc == unhashed1_key_setup) { ++ /* this is for compatibility with historic loop-AES version */ ++ loopinfo.lo_encrypt_key_size = 16; /* 128 bits */ ++ if(i >= 32) loopinfo.lo_encrypt_key_size = 24; /* 192 bits */ ++ if(i >= 43) loopinfo.lo_encrypt_key_size = 32; /* 256 bits */ ++ } ++ (*hashFunc)(pass, i, &loopinfo.lo_encrypt_key[0], sizeof(loopinfo.lo_encrypt_key)); ++ if(multiKeyMode) { ++ int r = 0, t; ++ while(r < multiKeyMode) { ++ t = strlen(multiKeyPass[r]); ++ (*hashFunc)(multiKeyPass[r], t, &multiKeyBits[r][0], 32); ++ memset(multiKeyPass[r], 0, t); ++ /* ++ * MultiKeyMode uses md5 IV. One key mode uses sector IV. Sector IV ++ * and md5 IV v2 and v3 are all computed differently. This first key ++ * byte XOR with 0x55/0xF4 is needed to cause complete decrypt failure ++ * in cases where data is encrypted with one type of IV and decrypted ++ * with another type IV. If identical key was used but only IV was ++ * computed differently, only first plaintext block of 512 byte CBC ++ * chain would decrypt incorrectly and rest would decrypt correctly. ++ * Partially correct decryption is dangerous. Decrypting all blocks ++ * incorrectly is safer because file system mount will simply fail. ++ */ ++ if(multiKeyMode == 65) { ++ multiKeyBits[r][0] ^= 0xF4; /* version 3 */ ++ } else { ++ multiKeyBits[r][0] ^= 0x55; /* version 2 */ ++ } ++ r++; ++ } ++ } else if(passIterThousands) { ++ aes_context ctx; ++ unsigned long iter = 0; ++ unsigned char tempkey[32]; ++ /* ++ * Set up AES-256 encryption key using same password and hash function ++ * as before but with password bit 0 flipped before hashing. That key ++ * is then used to encrypt actual loop key 'itercountk' thousand times. ++ */ ++ pass[0] ^= 1; ++ (*hashFunc)(pass, i, &tempkey[0], 32); ++ aes_set_key(&ctx, &tempkey[0], 32, 0); ++ sscanf(passIterThousands, "%lu", &iter); ++ iter *= 1000; ++ while(iter > 0) { ++ /* encrypt both 128bit blocks with AES-256 */ ++ aes_encrypt(&ctx, &loopinfo.lo_encrypt_key[ 0], &loopinfo.lo_encrypt_key[ 0]); ++ aes_encrypt(&ctx, &loopinfo.lo_encrypt_key[16], &loopinfo.lo_encrypt_key[16]); ++ /* exchange upper half of first block with lower half of second block */ ++ memcpy(&tempkey[0], &loopinfo.lo_encrypt_key[8], 8); ++ memcpy(&loopinfo.lo_encrypt_key[8], &loopinfo.lo_encrypt_key[16], 8); ++ memcpy(&loopinfo.lo_encrypt_key[16], &tempkey[0], 8); ++ iter--; ++ } ++ memset(&ctx, 0, sizeof(ctx)); ++ memset(&tempkey[0], 0, sizeof(tempkey)); ++ } ++ memset(pass, 0, i); /* erase original password */ ++ break; + default: +- pass = xgetpass(pfd, _("Password: ")); +- gotpass: +- memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE); +- xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE); +- memset(pass, 0, strlen(pass)); +- loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE; ++ fprintf (stderr, _("Error: don't know how to get key for encryption system %d\n"), loopinfo.lo_encrypt_type); ++ goto close_fd_ffd_return1; ++ } ++ ++ if(loInitValue) { ++ /* cipher modules are free to do whatever they want with this value */ ++ i = 0; ++ sscanf(loInitValue, "%d", &i); ++ loopinfo.lo_init[0] = i; + } + + if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { + perror("ioctl: LOOP_SET_FD"); ++keyclean_close_fd_ffd_return1: ++ memset(loopinfo.lo_encrypt_key, 0, sizeof(loopinfo.lo_encrypt_key)); ++ memset(&multiKeyBits[0][0], 0, sizeof(multiKeyBits)); ++close_fd_ffd_return1: ++ close (fd); ++close_ffd_return1: ++ close (ffd); + return 1; + } +- close (ffd); + +- i = ioctl(fd, LOOP_SET_STATUS64, &loopinfo64); +- if (i) { +- struct loop_info loopinfo; +- int errsv = errno; +- +- i = loop_info64_to_old(&loopinfo64, &loopinfo); +- if (i) { +- errno = errsv; +- perror("ioctl: LOOP_SET_STATUS64"); +- } else { +- i = ioctl(fd, LOOP_SET_STATUS, &loopinfo); +- if (i) +- perror("ioctl: LOOP_SET_STATUS"); ++ /* type 18 == LO_CRYPT_CRYPTOAPI */ ++ if ((loopinfo.lo_encrypt_type == 18) || (loop_set_status64_ioctl(fd, &loopinfo) < 0)) { ++ /* direct cipher interface failed - try CryptoAPI interface now */ ++ if(!apiName || (try_cryptoapi_loop_interface(fd, &loopinfo, apiName) < 0)) { ++ fprintf(stderr, _("ioctl: LOOP_SET_STATUS: %s, requested cipher or key length (%d bits) not supported by kernel\n"), strerror(errno), loopinfo.lo_encrypt_key_size << 3); ++ loop_clr_fd_out: ++ (void) ioctl (fd, LOOP_CLR_FD, 0); ++ goto keyclean_close_fd_ffd_return1; + } +- memset(&loopinfo, 0, sizeof(loopinfo)); + } +- memset(&loopinfo64, 0, sizeof(loopinfo64)); +- +- if (i) { +- ioctl (fd, LOOP_CLR_FD, 0); +- close (fd); +- return 1; ++ if(multiKeyMode >= 65) { ++ if(ioctl(fd, LOOP_MULTI_KEY_SETUP_V3, &multiKeyBits[0][0]) < 0) { ++ if(multiKeyMode == 1000) goto try_v2_setup; ++ perror("ioctl: LOOP_MULTI_KEY_SETUP_V3"); ++ goto loop_clr_fd_out; ++ } ++ } else if(multiKeyMode == 64) { ++ try_v2_setup: ++ if((ioctl(fd, LOOP_MULTI_KEY_SETUP, &multiKeyBits[0][0]) < 0) && (multiKeyMode != 1000)) { ++ perror("ioctl: LOOP_MULTI_KEY_SETUP"); ++ goto loop_clr_fd_out; ++ } + } +- close (fd); + +- if (verbose > 1) +- printf(_("set_loop(%s,%s,%llu): success\n"), +- device, file, offset); +- return 0; +-} +- +-int +-del_loop (const char *device) { +- int fd; +- +- if ((fd = open (device, O_RDONLY)) < 0) { +- int errsv = errno; +- fprintf(stderr, _("loop: can't delete device %s: %s\n"), +- device, strerror (errsv)); +- return 1; +- } +- if (ioctl (fd, LOOP_CLR_FD, 0) < 0) { +- perror ("ioctl: LOOP_CLR_FD"); +- return 1; +- } ++ memset(loopinfo.lo_encrypt_key, 0, sizeof(loopinfo.lo_encrypt_key)); ++ memset(&multiKeyBits[0][0], 0, sizeof(multiKeyBits)); + close (fd); +- if (verbose > 1) +- printf(_("del_loop(%s): success\n"), device); +- return 0; +-} +- +-#else /* no LOOP_SET_FD defined */ +-static void +-mutter(void) { +- fprintf(stderr, +- _("This mount was compiled without loop support. " +- "Please recompile.\n")); +-} +- +-int +-set_loop (const char *device, const char *file, unsigned long long offset, +- const char *encryption, int *loopro) { +- mutter(); +- return 1; +-} ++ close (ffd); + +-int +-del_loop (const char *device) { +- mutter(); +- return 1; +-} ++#if !defined(MAIN) ++ if(run_mkfs_command && fstype && *fstype && **fstype && (getuid() == 0)) { ++ if(!loop_fork_mkfs_command((char *)device, (char *)(*fstype))) { ++ /* !strncasecmp(passHashFuncName, "random", 6) test matched */ ++ /* This reads octal mode for newly created file system root */ ++ /* directory node from '-o phash=random/1777' mount option. */ ++ /* octal mode--^^^^ */ ++ sscanf(passHashFuncName + 6, "/%o", AutoChmodPtr); ++ } else { ++ if((fd = open(device, mode)) >= 0) { ++ ioctl(fd, LOOP_CLR_FD, 0); ++ close(fd); ++ return 1; ++ } ++ } ++ } ++#endif + +-char * +-find_unused_loop_device (void) { +- mutter(); ++ if (verbose > 1) ++ printf(_("set_loop(%s,%s): success\n"), device, file); + return 0; + } + +-#endif +- + #ifdef MAIN + +-#ifdef LOOP_SET_FD +- + #include + #include + + int verbose = 0; +-char *progname; ++static char *progname; + + static void + usage(void) { + fprintf(stderr, _("usage:\n\ +- %s loop_device # give info\n\ +- %s -d loop_device # delete\n\ +- %s -f # find unused\n\ +- %s [-e encryption] [-o offset] {-f|loop_device} file # setup\n"), +- progname, progname, progname, progname); ++ %s [-e encryption] [options] loop_device file # setup\n\ ++ %s -F [options] loop_device [file] # setup, read /etc/fstab\n\ ++ %s loop_device # give info\n\ ++ %s -a # give info of all loops\n\ ++ %s -d loop_device # delete\n\ ++options: -o offset -s sizelimit -p passwdfd -S pseed -H phash\n\ ++ -I loinit -T -K gpgkey -G gpghome -C itercountk -v -r\n"), ++ progname, progname, progname, progname, progname); + exit(1); + } + +@@ -439,107 +1028,191 @@ + fprintf (stderr, "\n"); + } + ++void ++show_all_loops(void) ++{ ++ char dev[20]; ++ char *lfmt[] = { "/dev/loop%d", "/dev/loop/%d" }; ++ int i, j, fd, x; ++ struct stat statbuf; ++ ++ for(i = 0; i < 256; i++) { ++ for(j = (sizeof(lfmt) / sizeof(lfmt[0])) - 1; j >= 0; j--) { ++ sprintf(dev, lfmt[j], i); ++ if(stat(dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) { ++ fd = open(dev, O_RDONLY); ++ if(fd >= 0) { ++ x = is_unused_loop_device(fd); ++ close(fd); ++ if(x == 0) { ++ show_loop(dev); ++ j = 0; ++ } ++ } ++ } ++ } ++ } ++} ++ ++int ++read_options_from_fstab(char *loopToFind, char **partitionPtr) ++{ ++ FILE *f; ++ struct mntent *m; ++ int y, foundMatch = 0; ++ char *opt, *fr1, *fr2; ++ struct options { ++ char *name; /* name of /etc/fstab option */ ++ char **dest; /* destination where it is written to */ ++ char *line; /* temp */ ++ }; ++ struct options tbl[] = { ++ { "device/file name ", partitionPtr }, /* must be index 0 */ ++ { "loop=", &loopToFind }, /* must be index 1 */ ++ { "offset=", &loopOffsetBytes }, ++ { "sizelimit=", &loopSizeBytes }, ++ { "encryption=", &loopEncryptionType }, ++ { "pseed=", &passSeedString }, ++ { "phash=", &passHashFuncName }, ++ { "loinit=", &loInitValue }, ++ { "gpgkey=", &gpgKeyFile }, ++ { "gpghome=", &gpgHomeDir }, ++ { "itercountk=", &passIterThousands }, ++ }; ++ struct options *p; ++ ++ if (!(f = setmntent("/etc/fstab", "r"))) { ++ fprintf(stderr, _("Error: unable to open /etc/fstab for reading\n")); ++ return 0; ++ } ++ while ((m = getmntent(f)) != NULL) { ++ tbl[0].line = fr1 = xstrdup(m->mnt_fsname); ++ p = &tbl[1]; ++ do { ++ p->line = NULL; ++ } while (++p < &tbl[sizeof(tbl) / sizeof(struct options)]); ++ opt = fr2 = xstrdup(m->mnt_opts); ++ for (opt = strtok(opt, ","); opt != NULL; opt = strtok(NULL, ",")) { ++ p = &tbl[1]; ++ do { ++ y = strlen(p->name); ++ if (!strncmp(opt, p->name, y)) ++ p->line = opt + y; ++ } while (++p < &tbl[sizeof(tbl) / sizeof(struct options)]); ++ } ++ if (tbl[1].line && !strcmp(loopToFind, tbl[1].line)) { ++ if (++foundMatch > 1) { ++ fprintf(stderr, _("Error: multiple loop=%s options found in /etc/fstab\n"), loopToFind); ++ endmntent(f); ++ return 0; ++ } ++ p = &tbl[0]; ++ do { ++ if (!*p->dest && p->line) { ++ *p->dest = p->line; ++ if (verbose) ++ printf(_("using %s%s from /etc/fstab\n"), p->name, p->line); ++ } ++ } while (++p < &tbl[sizeof(tbl) / sizeof(struct options)]); ++ fr1 = fr2 = NULL; ++ } ++ if(fr1) free(fr1); ++ if(fr2) free(fr2); ++ } ++ endmntent(f); ++ if (foundMatch == 0) { ++ fprintf(stderr, _("Error: loop=%s option not found in /etc/fstab\n"), loopToFind); ++ } ++ return foundMatch; ++} ++ + int + main(int argc, char **argv) { +- char *p, *offset, *encryption, *passfd, *device, *file; +- int delete, find, c; ++ char *partitionName = NULL; ++ int delete,c,option_a=0,option_F=0; + int res = 0; + int ro = 0; +- int pfd = -1; +- unsigned long long off; + + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + +- delete = find = 0; +- off = 0; +- offset = encryption = passfd = NULL; +- ++ delete = 0; + progname = argv[0]; +- if ((p = strrchr(progname, '/')) != NULL) +- progname = p+1; +- +- while ((c = getopt(argc, argv, "de:E:fo:p:v")) != -1) { ++ while ((c = getopt(argc,argv,"aC:de:FG:H:I:K:o:p:rs:S:Tv")) != -1) { + switch (c) { ++ case 'a': /* show status of all loops */ ++ option_a = 1; ++ break; ++ case 'C': ++ passIterThousands = optarg; ++ break; + case 'd': + delete = 1; + break; +- case 'E': + case 'e': +- encryption = optarg; ++ loopEncryptionType = optarg; + break; +- case 'f': +- find = 1; ++ case 'F': /* read loop related options from /etc/fstab */ ++ option_F = 1; ++ break; ++ case 'G': /* GnuPG home dir */ ++ gpgHomeDir = optarg; ++ break; ++ case 'H': /* passphrase hash function name */ ++ passHashFuncName = optarg; ++ break; ++ case 'I': /* lo_init[0] value (in string form) */ ++ loInitValue = optarg; ++ break; ++ case 'K': /* GnuPG key file name */ ++ gpgKeyFile = optarg; + break; + case 'o': +- offset = optarg; ++ loopOffsetBytes = optarg; ++ break; ++ case 'p': /* read passphrase from given fd */ ++ passFDnumber = optarg; + break; +- case 'p': +- passfd = optarg; ++ case 'r': /* read-only */ ++ ro = 1; ++ break; ++ case 's': ++ loopSizeBytes = optarg; ++ break; ++ case 'S': /* optional seed for passphrase */ ++ passSeedString = optarg; ++ break; ++ case 'T': /* ask passphrase _twice_ */ ++ passAskTwice = "T"; + break; + case 'v': +- verbose = 1; ++ verbose++; + break; + default: + usage(); + } + } +- +- if (argc == 1) { +- usage(); +- } else if (delete) { +- if (argc != optind+1 || encryption || offset || find) +- usage(); +- } else if (find) { +- if (argc < optind || argc > optind+1) +- usage(); +- } else { +- if (argc < optind+1 || argc > optind+2) +- usage(); ++ if (argc == 1) usage(); ++ if (option_a) { ++ if (delete || (argc != optind)) usage(); ++ show_all_loops(); ++ exit(0); + } +- +- if (find) { +- device = find_unused_loop_device(); +- if (device == NULL) +- return -1; +- if (verbose) +- printf("Loop device is %s\n", device); +- if (argc == optind) { +- printf("%s\n", device); +- return 0; +- } +- file = argv[optind]; ++ if ((delete && (argc != optind+1 || loopEncryptionType || loopOffsetBytes || loopSizeBytes || option_F)) || ++ (!delete && (argc < optind+1 || argc > optind+2))) ++ usage(); ++ if (argc > optind+1) ++ partitionName = argv[optind+1]; ++ if (option_F && (read_options_from_fstab(argv[optind], &partitionName) != 1)) ++ exit(1); ++ if (delete) { ++ res = del_loop(argv[optind]); ++ } else if ((argc == optind+1) && !option_F) { ++ res = show_loop(argv[optind]); + } else { +- device = argv[optind]; +- if (argc == optind+1) +- file = NULL; +- else +- file = argv[optind+1]; +- } +- +- if (delete) +- res = del_loop(device); +- else if (file == NULL) +- res = show_loop(device); +- else { +- if (offset && sscanf(offset, "%llu", &off) != 1) +- usage(); +- if (passfd && sscanf(passfd, "%d", &pfd) != 1) +- usage(); +- res = set_loop(device, file, off, encryption, pfd, &ro); ++ res = set_loop(argv[optind],partitionName,&ro,(const char**)0,(unsigned int *)0); + } + return res; + } +- +-#else /* LOOP_SET_FD not defined */ +- +-int +-main(int argc, char **argv) { +- fprintf(stderr, +- _("No loop support was available at compile time. " +- "Please recompile.\n")); +- return -1; +-} +-#endif + #endif +--- util-linux-2.12q/mount/lomount.h ++++ util-linux-2.12q/mount/lomount.h +@@ -1,6 +1,17 @@ + extern int verbose; +-extern int set_loop(const char *, const char *, unsigned long long, +- const char *, int, int *); ++extern int set_loop(const char *, const char *, int *, const char **, unsigned int *); + extern int del_loop(const char *); + extern int is_loop_device(const char *); + extern char * find_unused_loop_device(void); ++ ++extern char *passFDnumber; ++extern char *passAskTwice; ++extern char *passSeedString; ++extern char *passHashFuncName; ++extern char *passIterThousands; ++extern char *loInitValue; ++extern char *gpgKeyFile; ++extern char *gpgHomeDir; ++extern char *loopOffsetBytes; ++extern char *loopSizeBytes; ++extern char *loopEncryptionType; +--- util-linux-2.12q/mount/loop.c ++++ util-linux-2.12q/mount/loop.c +@@ -0,0 +1,221 @@ ++/* ++ * loop.c ++ * ++ * Copyright 2003 by Jari Ruusu. ++ * Redistribution of this file is permitted under the GNU GPL ++ */ ++ ++/* collection of loop helper functions used by losetup, mount and swapon */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include "loop.h" ++ ++static void convert_info_to_info64(struct loop_info *info, struct loop_info64 *info64) ++{ ++ memset(info64, 0, sizeof(*info64)); ++ info64->lo_number = info->lo_number; ++ info64->lo_device = info->lo_device; ++ info64->lo_inode = info->lo_inode; ++ info64->lo_rdevice = info->lo_rdevice; ++ info64->lo_offset = info->lo_offset; ++ info64->lo_encrypt_type = info->lo_encrypt_type; ++ info64->lo_encrypt_key_size = info->lo_encrypt_key_size; ++ info64->lo_flags = info->lo_flags; ++ info64->lo_init[0] = info->lo_init[0]; ++ info64->lo_init[1] = info->lo_init[1]; ++ info64->lo_sizelimit = 0; ++ if (info->lo_encrypt_type == 18) /* LO_CRYPT_CRYPTOAPI */ ++ memcpy(info64->lo_crypt_name, info->lo_name, sizeof(info64->lo_crypt_name)); ++ else ++ memcpy(info64->lo_file_name, info->lo_name, sizeof(info64->lo_file_name)); ++ memcpy(info64->lo_encrypt_key, info->lo_encrypt_key, sizeof(info64->lo_encrypt_key)); ++} ++ ++static int convert_info64_to_info(struct loop_info64 *info64, struct loop_info *info) ++{ ++ memset(info, 0, sizeof(*info)); ++ info->lo_number = info64->lo_number; ++ info->lo_device = info64->lo_device; ++ info->lo_inode = info64->lo_inode; ++ info->lo_rdevice = info64->lo_rdevice; ++ info->lo_offset = info64->lo_offset; ++ info->lo_encrypt_type = info64->lo_encrypt_type; ++ info->lo_encrypt_key_size = info64->lo_encrypt_key_size; ++ info->lo_flags = info64->lo_flags; ++ info->lo_init[0] = info64->lo_init[0]; ++ info->lo_init[1] = info64->lo_init[1]; ++ if (info->lo_encrypt_type == 18) /* LO_CRYPT_CRYPTOAPI */ ++ memcpy(info->lo_name, info64->lo_crypt_name, sizeof(info->lo_name)); ++ else ++ memcpy(info->lo_name, info64->lo_file_name, sizeof(info->lo_name)); ++ memcpy(info->lo_encrypt_key, info64->lo_encrypt_key, sizeof(info->lo_encrypt_key)); ++ ++ /* error in case values were truncated */ ++ if (info->lo_device != info64->lo_device || ++ info->lo_rdevice != info64->lo_rdevice || ++ info->lo_inode != info64->lo_inode || ++ info->lo_offset != info64->lo_offset || ++ info64->lo_sizelimit) { ++ errno = EOVERFLOW; ++ return -1; ++ } ++ return 0; ++} ++ ++int loop_set_status64_ioctl(int fd, struct loop_info64 *info64) ++{ ++ struct loop_info info; ++ struct loop_info64 tmp; ++ int r; ++ ++ /* ++ * This ugly work around is needed because some ++ * Red Hat kernels are using same ioctl code: ++ * #define LOOP_CHANGE_FD 0x4C04 ++ * vs. ++ * #define LOOP_SET_STATUS64 0x4C04 ++ * that is used by modern loop driver. ++ * ++ * Attempt to detect presense of LOOP_GET_STATUS64 ++ * ioctl before issuing LOOP_SET_STATUS64 ioctl. ++ * Red Hat kernels with above LOOP_CHANGE_FD damage ++ * should return -1 and set errno to EINVAL. ++ */ ++ r = ioctl(fd, LOOP_GET_STATUS64, &tmp); ++ memset(&tmp, 0, sizeof(tmp)); ++ if ((r == 0) || (errno != EINVAL)) { ++ r = ioctl(fd, LOOP_SET_STATUS64, info64); ++ if (!r) ++ return 0; ++ } ++ r = convert_info64_to_info(info64, &info); ++ if (!r) ++ r = ioctl(fd, LOOP_SET_STATUS, &info); ++ ++ /* don't leave copies of encryption key on stack */ ++ memset(&info, 0, sizeof(info)); ++ return r; ++} ++ ++int loop_get_status64_ioctl(int fd, struct loop_info64 *info64) ++{ ++ struct loop_info info; ++ int r; ++ ++ memset(info64, 0, sizeof(*info64)); ++ r = ioctl(fd, LOOP_GET_STATUS64, info64); ++ if (!r) ++ return 0; ++ r = ioctl(fd, LOOP_GET_STATUS, &info); ++ if (!r) ++ convert_info_to_info64(&info, info64); ++ ++ /* don't leave copies of encryption key on stack */ ++ memset(&info, 0, sizeof(info)); ++ return r; ++} ++ ++/* returns: 1=unused 0=busy */ ++int is_unused_loop_device(int fd) ++{ ++ struct loop_info64 info64; ++ struct loop_info info; ++ int r; ++ ++ r = ioctl(fd, LOOP_GET_STATUS64, &info64); ++ memset(&info64, 0, sizeof(info64)); ++ if (!r) ++ return 0; ++ if (errno == ENXIO) ++ return 1; ++ ++ r = ioctl(fd, LOOP_GET_STATUS, &info); ++ memset(&info, 0, sizeof(info)); ++ if (!r) ++ return 0; ++ if (errno == ENXIO) ++ return 1; ++ if (errno == EOVERFLOW) ++ return 0; ++ return 1; ++} ++ ++struct loop_crypt_type_struct loop_crypt_type_tbl[] = { ++ { 0, 0, 0, "no" }, ++ { 0, 0, 0, "none" }, ++ { 1, 0, 0, "xor" }, ++ { 3, 1, 16, "twofish" }, ++ { 4, 1, 16, "blowfish" }, ++ { 7, 1, 16, "serpent" }, ++ { 8, 1, 16, "mars" }, ++ { 11, 3, 16, "rc6" }, ++ { 12, 0, 21, "tripleDES" }, ++ { 12, 0, 24, "3des" }, ++ { 12, 0, 24, "des3_ede" }, ++ { 16, 1, 16, "AES" }, ++ { -1, 0, 0, NULL } ++}; ++ ++static char *getApiName(char *e, int *len) ++{ ++ int x, y, z = 1, q = -1; ++ unsigned char *s; ++ ++ *len = y = 0; ++ s = strdup(e); ++ if(!s) ++ return ""; ++ x = strlen(s); ++ while(x > 0) { ++ x--; ++ if(!isdigit(s[x])) ++ break; ++ y += (s[x] - '0') * z; ++ z *= 10; ++ q = x; ++ } ++ while(x >= 0) { ++ s[x] = tolower(s[x]); ++ if(s[x] == '-') ++ s[x] = 0; ++ x--; ++ } ++ if(y >= 40) { ++ if(q >= 0) ++ s[q] = 0; ++ *len = y; ++ } ++ return(s); ++} ++ ++int loop_crypt_type(const char *name, u_int32_t *kbyp, char **apiName) ++{ ++ int i, k; ++ ++ *apiName = getApiName((char *)name, &k); ++ if(k < 0) ++ k = 0; ++ if(k > 256) ++ k = 256; ++ for (i = 0; loop_crypt_type_tbl[i].id != -1; i++) { ++ if (!strcasecmp (*apiName , loop_crypt_type_tbl[i].name)) { ++ *kbyp = k ? k >> 3 : loop_crypt_type_tbl[i].keyBytes; ++ return loop_crypt_type_tbl[i].id; ++ } ++ } ++ *kbyp = 16; /* 128 bits */ ++ return 18; /* LO_CRYPT_CRYPTOAPI */ ++} ++ ++int try_cryptoapi_loop_interface(int fd, struct loop_info64 *loopinfo, char *apiName) ++{ ++ snprintf(loopinfo->lo_crypt_name, sizeof(loopinfo->lo_crypt_name), "%s-cbc", apiName); ++ loopinfo->lo_crypt_name[LO_NAME_SIZE - 1] = 0; ++ loopinfo->lo_encrypt_type = 18; /* LO_CRYPT_CRYPTOAPI */ ++ return(loop_set_status64_ioctl(fd, loopinfo)); ++} +--- util-linux-2.12q/mount/loop.h ++++ util-linux-2.12q/mount/loop.h +@@ -1,6 +1,20 @@ +-#define LO_CRYPT_NONE 0 +-#define LO_CRYPT_XOR 1 +-#define LO_CRYPT_DES 2 ++/* ++ * loop.h ++ * ++ * Copyright 2003 by Jari Ruusu. ++ * Redistribution of this file is permitted under the GNU GPL ++ */ ++ ++#ifndef _LOOP_H ++#define _LOOP_H 1 ++ ++#include ++#include ++#include ++ ++#define LO_CRYPT_NONE 0 ++#define LO_CRYPT_XOR 1 ++#define LO_CRYPT_DES 2 + #define LO_CRYPT_CRYPTOAPI 18 + + #define LOOP_SET_FD 0x4C00 +@@ -9,17 +23,25 @@ + #define LOOP_GET_STATUS 0x4C03 + #define LOOP_SET_STATUS64 0x4C04 + #define LOOP_GET_STATUS64 0x4C05 ++#define LOOP_MULTI_KEY_SETUP 0x4C4D ++#define LOOP_MULTI_KEY_SETUP_V3 0x4C4E + +-#define LO_NAME_SIZE 64 +-#define LO_KEY_SIZE 32 +- +-#include "my_dev_t.h" ++#define LO_NAME_SIZE 64 ++#define LO_KEY_SIZE 32 + + struct loop_info { + int lo_number; +- my_dev_t lo_device; ++#if LINUX_VERSION_CODE >= 0x20600 ++ __kernel_old_dev_t lo_device; ++#else ++ __kernel_dev_t lo_device; ++#endif + unsigned long lo_inode; +- my_dev_t lo_rdevice; ++#if LINUX_VERSION_CODE >= 0x20600 ++ __kernel_old_dev_t lo_rdevice; ++#else ++ __kernel_dev_t lo_rdevice; ++#endif + int lo_offset; + int lo_encrypt_type; + int lo_encrypt_key_size; +@@ -30,22 +52,35 @@ + char reserved[4]; + }; + +-/* +- * Where to get __u8, __u32, __u64? Let us use unsigned char/int/long long +- * and get punished when someone comes with 128-bit long longs. +- */ + struct loop_info64 { +- unsigned long long lo_device; +- unsigned long long lo_inode; +- unsigned long long lo_rdevice; +- unsigned long long lo_offset; +- unsigned long long lo_sizelimit; /* bytes, 0 == max available */ +- unsigned int lo_number; +- unsigned int lo_encrypt_type; +- unsigned int lo_encrypt_key_size; +- unsigned int lo_flags; +- unsigned char lo_file_name[LO_NAME_SIZE]; +- unsigned char lo_crypt_name[LO_NAME_SIZE]; +- unsigned char lo_encrypt_key[LO_KEY_SIZE]; +- unsigned long long lo_init[2]; ++ u_int64_t lo_device; /* ioctl r/o */ ++ u_int64_t lo_inode; /* ioctl r/o */ ++ u_int64_t lo_rdevice; /* ioctl r/o */ ++ u_int64_t lo_offset; /* bytes */ ++ u_int64_t lo_sizelimit; /* bytes, 0 == max available */ ++ u_int32_t lo_number; /* ioctl r/o */ ++ u_int32_t lo_encrypt_type; ++ u_int32_t lo_encrypt_key_size; /* ioctl w/o */ ++ u_int32_t lo_flags; /* ioctl r/o */ ++ unsigned char lo_file_name[LO_NAME_SIZE]; ++ unsigned char lo_crypt_name[LO_NAME_SIZE]; ++ unsigned char lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */ ++ u_int64_t lo_init[2]; ++}; ++ ++extern int loop_set_status64_ioctl(int, struct loop_info64 *); ++extern int loop_get_status64_ioctl(int, struct loop_info64 *); ++extern int is_unused_loop_device(int); ++ ++struct loop_crypt_type_struct { ++ short int id; ++ unsigned char flags; /* bit0 = show keybits, bit1 = add '-' before keybits */ ++ unsigned char keyBytes; ++ char *name; + }; ++ ++extern struct loop_crypt_type_struct loop_crypt_type_tbl[]; ++extern int loop_crypt_type(const char *, u_int32_t *, char **); ++extern int try_cryptoapi_loop_interface(int, struct loop_info64 *, char *); ++ ++#endif +--- util-linux-2.12q/mount/losetup.8 ++++ util-linux-2.12q/mount/losetup.8 +@@ -1,42 +1,28 @@ +-.TH LOSETUP 8 "2003-07-01" "Linux" "MAINTENANCE COMMANDS" ++.TH LOSETUP 8 "2004-11-25" "Linux" "MAINTENANCE COMMANDS" + .SH NAME + losetup \- set up and control loop devices + .SH SYNOPSIS + .ad l +-Get info: +-.sp +-.in +5 + .B losetup ++[ ++.B \-e ++.I encryption ++] [options] ++.I loop_device ++file ++.br ++.B losetup -F ++[options] + .I loop_device +-.sp +-.in -5 +-Delete loop: +-.sp +-.in +5 +-.B "losetup \-d" ++[file] ++.br ++.B losetup ++[ ++.B \-d ++] + .I loop_device +-.sp +-.in -5 +-Print name of first unused loop device: +-.sp +-.in +5 +-.B "losetup \-f" +-.sp +-.in -5 +-Setup loop device: +-.sp +-.in +5 +-.B losetup +-.RB [{\-e | \-E} +-.IR encryption ] +-.RB [ \-o +-.IR offset ] +-.RB [ \-p +-.IR pfd ] +-.in +8 +-.RB { \-f | \fIloop_device\fP } +-.I file +-.in -13 ++.br ++.B losetup -a + .ad b + .SH DESCRIPTION + .B losetup +@@ -44,45 +30,108 @@ + to detach loop devices and to query the status of a loop device. If only the + \fIloop_device\fP argument is given, the status of the corresponding loop + device is shown. +- +-.SS "Encryption" +-It is possible to specify transfer functions (for encryption/decryption +-or other purposes) using one of the +-.B \-E +-and +-.B \-e +-options. +-There are two mechanisms to specify the desired encryption: by number +-and by name. If an encryption is specified by number then one +-has to make sure that the Linux kernel knows about the encryption with that +-number, probably by patching the kernel. Standard numbers that are +-always present are 0 (no encryption) and 1 (XOR encryption). +-When the cryptoloop module is loaded (or compiled in), it uses number 18. +-This cryptoloop module wil take the name of an arbitrary encryption type +-and finds the module that knows how to perform that encryption. +-(Thus, either one uses a number different from 18 with the +-.B \-E +-option, or one uses a name with the +-.B \-e +-option.) + .SH OPTIONS +-.IP \fB\-d\fP ++.IP \fB\-a\fP ++Show status of all loop devices. ++.IP "\fB\-C \fIitercountk\fP" ++Runs hashed password through \fIitercountk\fP thousand iterations of AES-256 ++before using it for loop encryption. This consumes lots of CPU cycles at ++loop setup/mount time but not thereafter. In combination with password seed ++this slows down dictionary attacks. Iteration is not done in multi-key mode. ++.IP "\fB\-d\fP" + Detach the file or device associated with the specified loop device. +-.IP "\fB\-E \fIencryption_type\fP" +-Enable data encryption with specified number. +-.IP "\fB\-e \fIencryption_name\fP" +-Enable data encryption with specified name. +-.IP "\fB\-f\fP" +-Find the first unused loop device. If a +-.I file +-argument is present, use this device. Otherwise, print its name. ++.IP "\fB\-e \fIencryption\fP" ++.RS ++Enable data encryption. Following encryption types are recognized: ++.IP \fBNONE\fP ++Use no encryption (default). ++.PD 0 ++.IP \fBXOR\fP ++Use a simple XOR encryption. ++.IP "\fBAES128 AES\fP" ++Use 128 bit AES encryption. Password is hashed with SHA-256 by default. ++.IP \fBAES192\fP ++Use 192 bit AES encryption. Password is hashed with SHA-384 by default. ++.IP \fBAES256\fP ++Use 256 bit AES encryption. Password is hashed with SHA-512 by default. ++ ++.IP "\fBtwofish128 twofish160 twofish192 twofish256\fP" ++.IP "\fBblowfish128 blowfish160 blowfish192 blowfish256\fP" ++.IP "\fBserpent128 serpent192 serpent256 mars128 mars192\fP" ++.IP "\fBmars256 rc6-128 rc6-192 rc6-256 tripleDES\fP" ++These encryption types are available if they are enabled in kernel ++configuration or corresponding modules have been loaded to kernel. ++.PD ++.RE ++.IP "\fB\-F\fP" ++Reads and uses mount options from /etc/fstab that match specified loop ++device, including offset= sizelimit= encryption= pseed= phash= loinit= ++gpgkey= gpghome= itercountk= and looped to device/file name. loop= option in ++/etc/fstab must match specified loop device name. Command line options take ++precedence in case of conflict. ++.IP "\fB\-G \fIgpghome\fP" ++Set gpg home directory to \fIgpghome\fP, so that gpg uses public/private ++keys on \fIgpghome\fP directory. This is only used when gpgkey file needs to ++be decrypted using public/private keys. If gpgkey file is encrypted with ++symmetric cipher only, public/private keys are not required and this option ++has no effect. ++.IP "\fB\-H \fIphash\fP" ++Uses \fIphash\fP function to hash password. Available hash functions are ++sha256, sha384, sha512 and rmd160. unhashed1, unhashed2 and unhashed3 ++functions also exist for compatibility with some obsolete implementations. ++ ++Hash function random does not ask for password but sets up random keys and ++attempts to put loop to multi-key mode. When random/1777 hash type is used ++as mount option for mount program, mount program will create new file system ++on the loop device and construct initial permissions of file system root ++directory from octal digits that follow the slash character. ++ ++WARNING! DO NOT USE RANDOM HASH TYPE ON PARTITION WITH EXISTING IMPORTANT ++DATA ON IT. RANDOM HASH TYPE WILL DESTROY YOUR DATA. ++.IP "\fB\-I \fIloinit\fP" ++Passes a numeric value of \fIloinit\fP as a parameter to cipher transfer ++function. Cipher transfer functions are free to interpret value as they ++want. ++.IP "\fB\-K \fIgpgkey\fP" ++Password is piped to gpg so that gpg can decrypt file \fIgpgkey\fP which ++contains the real keys that are used to encrypt loop device. If decryption ++requires public/private keys and gpghome is not specified, all users use ++their own gpg public/private keys to decrypt \fIgpgkey\fP. Decrypted ++\fIgpgkey\fP should contain 1 or 64 or 65 keys, each key at least 20 ++characters and separated by newline. If decrypted \fIgpgkey\fP contains 64 ++or 65 keys, then loop device is put to multi-key mode. In multi-key mode ++first key is used for first sector, second key for second sector, and so on. ++65th key, if present, is used as additional input to MD5 IV computation. + .IP "\fB\-o \fIoffset\fP" + The data start is moved \fIoffset\fP bytes into the specified file or +-device. +-.IP "\fB\-p \fInum\fP" +-Read the passphrase from file descriptor with number +-.I num +-instead of from the terminal. ++device. Normally offset is included in IV (initialization vector) ++computations. If offset is prefixed with @ character, then offset is not ++included in IV computations. @ prefix functionality may not be supported on ++some older kernels and/or loop drivers. ++.IP "\fB\-p \fIpasswdfd\fP" ++Read the passphrase from file descriptor \fIpasswdfd\fP instead of the ++terminal. If -K option is not being used (no gpg key file), then losetup ++attempts to read 65 keys from \fIpasswdfd\fP, each key at least 20 ++characters and separated by newline. If losetup successfully reads 64 or 65 ++keys, then loop device is put to multi-key mode. If losetup encounters ++end-of-file before 64 keys are read, then only first key is used in ++single-key mode. ++.IP "\fB\-r\fP" ++Read-only mode. ++.IP "\fB\-s \fIsizelimit\fP" ++Size of loop device is limited to \fIsizelimit\fP bytes. If unspecified or ++set to zero, loop device size is set to maximum available (file size minus ++offset). This option may not be supported on some older kernels and/or loop ++drivers. ++.IP "\fB\-S \fIpseed\fP" ++Sets encryption password seed \fIpseed\fP which is appended to user supplied ++password before hashing. Using different seeds for different partitions ++makes dictionary attacks slower but does not prevent them if user supplied ++password is guessable. Seed is not used in multi-key mode. ++.IP "\fB\-T\fP" ++Asks password twice. ++.IP "\fB\-v\fP" ++Verbose mode. + .SH RETURN VALUE + .B losetup + returns 0 on success, nonzero on failure. When +@@ -94,43 +143,26 @@ + + .SH FILES + .nf +-/dev/loop0, /dev/loop1, ... loop devices (major=7) ++/dev/loop0,/dev/loop1,... loop devices (major=7) + .fi + .SH EXAMPLE +-If you are using the loadable module you must have the module loaded +-first with the command +-.IP +-# insmod loop.o +-.LP +-Maybe also encryption modules are needed. +-.IP +-# insmod des.o +-# insmod cryptoloop.o +-.LP + The following commands can be used as an example of using the loop device. + .nf +-.IP +-# dd if=/dev/zero of=/file bs=1k count=100 +-# losetup -e des /dev/loop0 /file +-Password: +-Init (up to 16 hex digits): +-# mkfs -t ext2 /dev/loop0 100 +-# mount -t ext2 /dev/loop0 /mnt ++ ++dd if=/dev/zero of=/file bs=1k count=500 ++head -c 2925 /dev/random | uuencode -m - | head -n 66 \\ ++ | tail -n 65 | gpg --symmetric -a >/etc/fskey9.gpg ++losetup -e AES128 -K /etc/fskey9.gpg /dev/loop0 /file ++mkfs -t ext2 /dev/loop0 ++mount -t ext2 /dev/loop0 /mnt + ... +-# umount /dev/loop0 +-# losetup -d /dev/loop0 +-.fi +-.LP +-If you are using the loadable module you may remove the module with +-the command +-.IP +-# rmmod loop +-.LP ++umount /dev/loop0 ++losetup -d /dev/loop0 + .fi + .SH RESTRICTION +-DES encryption is painfully slow. On the other hand, XOR is terribly weak. +-.\" .SH AUTHORS +-.\" .nf +-.\" Original version: Theodore Ts'o +-.\" Original DES by: Eric Young +-.\" .fi ++XOR encryption is terribly weak. ++.SH AUTHORS ++.nf ++Original version: Theodore Ts'o ++AES support: Jari Ruusu ++.fi +--- util-linux-2.12q/mount/loumount.c ++++ util-linux-2.12q/mount/loumount.c +@@ -0,0 +1,60 @@ ++/* ++ * loumount.c ++ * ++ * This code was extracted to separate file from lomount.c so that umount ++ * program doesn't have to link with all loop related setup code ++ */ ++ ++#define LOOPMAJOR 7 ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "loop.h" ++#include "lomount.h" ++#include "xstrncpy.h" ++#include "nls.h" ++ ++int ++is_loop_device (const char *device) { ++ struct stat statbuf; ++ ++ return (stat(device, &statbuf) == 0 && ++ S_ISBLK(statbuf.st_mode) && ++ major(statbuf.st_rdev) == LOOPMAJOR); ++} ++ ++int ++del_loop (const char *device) { ++ int fd; ++ ++ if ((fd = open (device, O_RDONLY)) < 0) { ++ int errsv = errno; ++ fprintf(stderr, _("loop: can't delete device %s: %s\n"), ++ device, strerror (errsv)); ++ return 1; ++ } ++ if (ioctl (fd, LOOP_CLR_FD, 0) < 0) { ++ perror ("ioctl: LOOP_CLR_FD"); ++ return 1; ++ } ++ close (fd); ++ if (verbose > 1) ++ printf(_("del_loop(%s): success\n"), device); ++ return 0; ++} +--- util-linux-2.12q/mount/Makefile ++++ util-linux-2.12q/mount/Makefile +@@ -29,7 +29,6 @@ + + MAYBE = pivot_root swapoff + +-LO_OBJS = lomount.o $(LIB)/xstrncpy.o + NFS_OBJS = nfsmount.o nfsmount_xdr.o nfsmount_clnt.o + GEN_FILES = nfsmount.h nfsmount_xdr.c nfsmount_clnt.c + +@@ -49,24 +48,33 @@ + + mount: mount.o fstab.o sundries.o xmalloc.o realpath.o mntent.o version.o \ + get_label_uuid.o mount_by_label.o mount_blkid.o mount_guess_fstype.o \ +- getusername.o $(LIB)/setproctitle.o $(LIB)/env.o $(NFS_OBJS) $(LO_OBJS) ++ getusername.o $(LIB)/setproctitle.o $(LIB)/env.o $(NFS_OBJS) lomount.o \ ++ loumount.o loop.o sha512.o rmd160.o aes.o $(LIB)/xstrncpy.o + $(LINK) $^ -o $@ $(BLKID_LIB) + + umount: umount.o fstab.o sundries.o xmalloc.o realpath.o mntent.o \ + getusername.o get_label_uuid.o mount_by_label.o mount_blkid.o \ +- version.o $(LIB)/env.o $(LO_OBJS) ++ version.o $(LIB)/env.o loumount.o + $(LINK) $^ -o $@ $(BLKID_LIB) + + swapon: swapon.o version.o xmalloc.o \ +- get_label_uuid.o mount_by_label.o mount_blkid.o ++ get_label_uuid.o mount_by_label.o mount_blkid.o loop.o sha512.o $(LIB)/xstrncpy.o + $(LINK) $^ -o $@ $(BLKID_LIB) + + main_losetup.o: lomount.c + $(COMPILE) -DMAIN lomount.c -o $@ + +-losetup: main_losetup.o $(LIB)/xstrncpy.o ++losetup: main_losetup.o loumount.o loop.o sha512.o rmd160.o aes.o $(LIB)/xstrncpy.o + $(LINK) $^ -o $@ + ++loop.o lomount.o main_losetup.o swapon.o: loop.h ++ ++sha512.o lomount.o main_losetup.o swapon.o: sha512.h ++ ++rmd160.o lomount.o main_losetup.o: rmd160.h ++ ++aes.o lomount.o main_losetup.o: aes.h ++ + mount.o umount.o nfsmount.o losetup.o fstab.o realpath.o sundries.o: sundries.h + + mount.o umount.o fstab.o sundries.o: fstab.h +@@ -79,9 +87,9 @@ + + mount.o umount.o getusername.o: getusername.h + +-mount.o umount.o losetup.o lomount.o: lomount.h loop.h my_dev_t.h ++mount.o umount.o losetup.o lomount.o loumount.o: lomount.h loop.h + +-swapon.o: swap_constants.h swapargs.h ++swapon.o: swap_constants.h swapargs.h loop.h + + sundries.o nfsmount.o nfsmount_xdr.o nfsmount_clnt.o: nfsmount.h + +--- util-linux-2.12q/mount/mount.8 ++++ util-linux-2.12q/mount/mount.8 +@@ -281,6 +281,16 @@ + .B \-v + Verbose mode. + .TP ++.B \-p "\fIpasswdfd\fP" ++If the mount requires a passphrase to be entered, read it from file ++descriptor \fIpasswdfd\fP instead of from the terminal. If mount uses ++encrypted loop device and gpgkey= mount option is not being used (no gpg key ++file), then mount attempts to read 65 keys from \fIpasswdfd\fP, each key at ++least 20 characters and separated by newline. If mount successfully reads 64 ++or 65 keys, then loop device is put to multi-key mode. If mount encounters ++end-of-file before 64 keys are read, then only first key is used in ++single-key mode. ++.TP + .B \-a + Mount all filesystems (of the given types) mentioned in + .IR fstab . +@@ -328,12 +338,6 @@ + .I /etc + is on a read-only file system. + .TP +-.BI \-p " num" +-In case of a loop mount with encryption, read the passphrase from +-file descriptor +-.I num +-instead of from the terminal. +-.TP + .B \-s + Tolerate sloppy mount options rather than failing. This will ignore + mount options not supported by a filesystem type. Not all filesystems +@@ -1841,13 +1845,17 @@ + and then mount this device on + .IR /mnt . + +-This type of mount knows about three options, namely +-.BR loop ", " offset " and " encryption , ++This type of mount knows about 10 options, namely ++.BR loop ", " offset ", " sizelimit ", " encryption ", " pseed ", " phash ", " loinit ", " gpgkey ", " gpghome " and " itercountk + that are really options to + .BR \%losetup (8). + (These options can be used in addition to those specific + to the filesystem type.) + ++If the mount requires a passphrase, you will be prompted for one unless you ++specify a file descriptor to read from instead with the ++.BR \-p ++option. + If no explicit loop device is mentioned + (but just an option `\fB\-o loop\fP' is given), then + .B mount +--- util-linux-2.12q/mount/mount.c ++++ util-linux-2.12q/mount/mount.c +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -80,9 +81,6 @@ + /* True if ruid != euid. */ + static int suid = 0; + +-/* Contains the fd to read the passphrase from, if any. */ +-static int pfd = -1; +- + /* Map from -o and fstab option strings to the flag argument to mount(2). */ + struct opt_map { + const char *opt; /* option name */ +@@ -167,7 +165,7 @@ + { NULL, 0, 0, 0 } + }; + +-static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, ++static const char *opt_loopdev, *opt_vfstype, + *opt_speed, *opt_comment; + + static struct string_opt_map { +@@ -177,8 +175,15 @@ + } string_opt_map[] = { + { "loop=", 0, &opt_loopdev }, + { "vfs=", 1, &opt_vfstype }, +- { "offset=", 0, &opt_offset }, +- { "encryption=", 0, &opt_encryption }, ++ { "pseed=", 1, (const char **)&passSeedString }, ++ { "phash=", 0, (const char **)&passHashFuncName }, ++ { "loinit=", 0, (const char **)&loInitValue }, ++ { "gpgkey=", 0, (const char **)&gpgKeyFile }, ++ { "gpghome=", 0, (const char **)&gpgHomeDir }, ++ { "itercountk=", 1, (const char **)&passIterThousands }, ++ { "offset=", 0, (const char **)&loopOffsetBytes }, ++ { "sizelimit=", 0, (const char **)&loopSizeBytes }, ++ { "encryption=", 0, (const char **)&loopEncryptionType }, + { "speed=", 0, &opt_speed }, + { "comment=", 1, &opt_comment }, + { NULL, 0, NULL } +@@ -580,9 +585,8 @@ + + static int + loop_check(const char **spec, const char **type, int *flags, +- int *loop, const char **loopdev, const char **loopfile) { ++ int *loop, const char **loopdev, const char **loopfile, unsigned int *AutoChmodPtr) { + int looptype; +- unsigned long long offset; + + /* + * In the case of a loop mount, either type is of the form lo@/dev/loop5 +@@ -607,7 +611,7 @@ + *type = opt_vfstype; + } + +- *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_encryption); ++ *loop = ((*flags & MS_LOOP) || *loopdev || loopOffsetBytes || loopSizeBytes || loopEncryptionType); + *loopfile = *spec; + + if (*loop) { +@@ -624,9 +628,7 @@ + return EX_SYSERR; /* no more loop devices */ + if (verbose) + printf(_("mount: going to use the loop device %s\n"), *loopdev); +- offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0; +- if (set_loop(*loopdev, *loopfile, offset, +- opt_encryption, pfd, &loopro)) { ++ if (set_loop (*loopdev, *loopfile, &loopro, type, AutoChmodPtr)) { + if (verbose) + printf(_("mount: failed setting up loop device\n")); + return EX_FAIL; +@@ -687,14 +689,6 @@ + } + + static void +-set_pfd(char *s) { +- if (!isdigit(*s)) +- die(EX_USAGE, +- _("mount: argument to -p or --pass-fd must be a number")); +- pfd = atoi(optarg); +-} +- +-static void + cdrom_setspeed(const char *spec) { + #define CDROM_SELECT_SPEED 0x5322 /* Set the CD-ROM speed */ + if (opt_speed) { +@@ -788,6 +782,7 @@ + const char *opts, *spec, *node, *types; + char *user = 0; + int loop = 0; ++ unsigned int LoopMountAutomaticChmod = 0; + const char *loopdev = 0, *loopfile = 0; + struct stat statbuf; + int nfs_mount_version = 0; /* any version */ +@@ -820,7 +815,7 @@ + * stale assignments of files to loop devices. Nasty when used for + * encryption. + */ +- res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile); ++ res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile, &LoopMountAutomaticChmod); + if (res) + goto out; + } +@@ -855,9 +850,20 @@ + + block_signals (SIG_BLOCK); + +- if (!fake) ++ if (!fake) { + mnt5_res = guess_fstype_and_mount (spec, node, &types, flags & ~MS_NOSYS, + mount_opts); ++ if(!mnt5_res && LoopMountAutomaticChmod && (getuid() == 0)) { ++ /* ++ * If loop was set up using random keys and new file system ++ * was created on the loop device, initial permissions for ++ * file system root directory need to be set here. ++ */ ++ if(chmod(node, LoopMountAutomaticChmod)) { ++ error (_("Error: encrypted file system chmod() failed")); ++ } ++ } ++ } + + if (fake || mnt5_res == 0) { + /* Mount succeeded, report this (if verbose) and write mtab entry. */ +@@ -1530,8 +1536,8 @@ + else + test_opts = xstrdup(optarg); + break; +- case 'p': /* fd on which to read passwd */ +- set_pfd(optarg); ++ case 'p': /* read passphrase from given fd */ ++ passFDnumber = optarg; + break; + case 'r': /* mount readonly */ + readonly = 1; +--- util-linux-2.12q/mount/rmd160.c ++++ util-linux-2.12q/mount/rmd160.c +@@ -0,0 +1,532 @@ ++/* rmd160.c - RIPE-MD160 ++ * Copyright (C) 1998 Free Software Foundation, Inc. ++ */ ++ ++/* This file was part of GnuPG. Modified for use within the Linux ++ * mount utility by Marc Mutz . None of this code is ++ * by myself. I just removed everything that you don't need when all ++ * you want to do is to use rmd160_hash_buffer(). ++ * My comments are marked with (mm). */ ++ ++/* GnuPG is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * GnuPG is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ ++ ++#include /* (mm) for memcpy */ ++#include /* (mm) for BIG_ENDIAN and BYTE_ORDER */ ++#include "rmd160.h" ++ ++/* (mm) these are used by the original GnuPG file. In order to modify ++ * that file not too much, we keep the notations. maybe it would be ++ * better to include linux/types.h and typedef __u32 to u32 and __u8 ++ * to byte? */ ++typedef unsigned int u32; /* taken from e.g. util-linux's minix.h */ ++typedef unsigned char byte; ++ ++typedef struct { ++ u32 h0,h1,h2,h3,h4; ++ u32 nblocks; ++ byte buf[64]; ++ int count; ++} RMD160_CONTEXT; ++ ++/**************** ++ * Rotate a 32 bit integer by n bytes ++ */ ++#if defined(__GNUC__) && defined(__i386__) ++static inline u32 ++rol( u32 x, int n) ++{ ++ __asm__("roll %%cl,%0" ++ :"=r" (x) ++ :"0" (x),"c" (n)); ++ return x; ++} ++#else ++ #define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) ) ++#endif ++ ++/********************************* ++ * RIPEMD-160 is not patented, see (as of 25.10.97) ++ * http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html ++ * Note that the code uses Little Endian byteorder, which is good for ++ * 386 etc, but we must add some conversion when used on a big endian box. ++ * ++ * ++ * Pseudo-code for RIPEMD-160 ++ * ++ * RIPEMD-160 is an iterative hash function that operates on 32-bit words. ++ * The round function takes as input a 5-word chaining variable and a 16-word ++ * message block and maps this to a new chaining variable. All operations are ++ * defined on 32-bit words. Padding is identical to that of MD4. ++ * ++ * ++ * RIPEMD-160: definitions ++ * ++ * ++ * nonlinear functions at bit level: exor, mux, -, mux, - ++ * ++ * f(j, x, y, z) = x XOR y XOR z (0 <= j <= 15) ++ * f(j, x, y, z) = (x AND y) OR (NOT(x) AND z) (16 <= j <= 31) ++ * f(j, x, y, z) = (x OR NOT(y)) XOR z (32 <= j <= 47) ++ * f(j, x, y, z) = (x AND z) OR (y AND NOT(z)) (48 <= j <= 63) ++ * f(j, x, y, z) = x XOR (y OR NOT(z)) (64 <= j <= 79) ++ * ++ * ++ * added constants (hexadecimal) ++ * ++ * K(j) = 0x00000000 (0 <= j <= 15) ++ * K(j) = 0x5A827999 (16 <= j <= 31) int(2**30 x sqrt(2)) ++ * K(j) = 0x6ED9EBA1 (32 <= j <= 47) int(2**30 x sqrt(3)) ++ * K(j) = 0x8F1BBCDC (48 <= j <= 63) int(2**30 x sqrt(5)) ++ * K(j) = 0xA953FD4E (64 <= j <= 79) int(2**30 x sqrt(7)) ++ * K'(j) = 0x50A28BE6 (0 <= j <= 15) int(2**30 x cbrt(2)) ++ * K'(j) = 0x5C4DD124 (16 <= j <= 31) int(2**30 x cbrt(3)) ++ * K'(j) = 0x6D703EF3 (32 <= j <= 47) int(2**30 x cbrt(5)) ++ * K'(j) = 0x7A6D76E9 (48 <= j <= 63) int(2**30 x cbrt(7)) ++ * K'(j) = 0x00000000 (64 <= j <= 79) ++ * ++ * ++ * selection of message word ++ * ++ * r(j) = j (0 <= j <= 15) ++ * r(16..31) = 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8 ++ * r(32..47) = 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12 ++ * r(48..63) = 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2 ++ * r(64..79) = 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 ++ * r0(0..15) = 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12 ++ * r0(16..31)= 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2 ++ * r0(32..47)= 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13 ++ * r0(48..63)= 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14 ++ * r0(64..79)= 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 ++ * ++ * ++ * amount for rotate left (rol) ++ * ++ * s(0..15) = 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8 ++ * s(16..31) = 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12 ++ * s(32..47) = 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5 ++ * s(48..63) = 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12 ++ * s(64..79) = 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ++ * s'(0..15) = 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6 ++ * s'(16..31)= 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11 ++ * s'(32..47)= 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5 ++ * s'(48..63)= 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8 ++ * s'(64..79)= 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ++ * ++ * ++ * initial value (hexadecimal) ++ * ++ * h0 = 0x67452301; h1 = 0xEFCDAB89; h2 = 0x98BADCFE; h3 = 0x10325476; ++ * h4 = 0xC3D2E1F0; ++ * ++ * ++ * RIPEMD-160: pseudo-code ++ * ++ * It is assumed that the message after padding consists of t 16-word blocks ++ * that will be denoted with X[i][j], with 0 <= i <= t-1 and 0 <= j <= 15. ++ * The symbol [+] denotes addition modulo 2**32 and rol_s denotes cyclic left ++ * shift (rotate) over s positions. ++ * ++ * ++ * for i := 0 to t-1 { ++ * A := h0; B := h1; C := h2; D = h3; E = h4; ++ * A' := h0; B' := h1; C' := h2; D' = h3; E' = h4; ++ * for j := 0 to 79 { ++ * T := rol_s(j)(A [+] f(j, B, C, D) [+] X[i][r(j)] [+] K(j)) [+] E; ++ * A := E; E := D; D := rol_10(C); C := B; B := T; ++ * T := rol_s'(j)(A' [+] f(79-j, B', C', D') [+] X[i][r'(j)] ++ [+] K'(j)) [+] E'; ++ * A' := E'; E' := D'; D' := rol_10(C'); C' := B'; B' := T; ++ * } ++ * T := h1 [+] C [+] D'; h1 := h2 [+] D [+] E'; h2 := h3 [+] E [+] A'; ++ * h3 := h4 [+] A [+] B'; h4 := h0 [+] B [+] C'; h0 := T; ++ * } ++ */ ++ ++/* Some examples: ++ * "" 9c1185a5c5e9fc54612808977ee8f548b2258d31 ++ * "a" 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe ++ * "abc" 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc ++ * "message digest" 5d0689ef49d2fae572b881b123a85ffa21595f36 ++ * "a...z" f71c27109c692c1b56bbdceb5b9d2865b3708dbc ++ * "abcdbcde...nopq" 12a053384a9c0c88e405a06c27dcf49ada62eb2b ++ * "A...Za...z0...9" b0e20b6e3116640286ed3a87a5713079b21f5189 ++ * 8 times "1234567890" 9b752e45573d4b39f4dbd3323cab82bf63326bfb ++ * 1 million times "a" 52783243c1697bdbe16d37f97f68f08325dc1528 ++ */ ++ ++ ++static void ++rmd160_init( RMD160_CONTEXT *hd ) ++{ ++ hd->h0 = 0x67452301; ++ hd->h1 = 0xEFCDAB89; ++ hd->h2 = 0x98BADCFE; ++ hd->h3 = 0x10325476; ++ hd->h4 = 0xC3D2E1F0; ++ hd->nblocks = 0; ++ hd->count = 0; ++} ++ ++ ++ ++/**************** ++ * Transform the message X which consists of 16 32-bit-words ++ */ ++static void ++transform( RMD160_CONTEXT *hd, byte *data ) ++{ ++ u32 a,b,c,d,e,aa,bb,cc,dd,ee,t; ++ #if BYTE_ORDER == BIG_ENDIAN ++ u32 x[16]; ++ { int i; ++ byte *p2, *p1; ++ for(i=0, p1=data, p2=(byte*)x; i < 16; i++, p2 += 4 ) { ++ p2[3] = *p1++; ++ p2[2] = *p1++; ++ p2[1] = *p1++; ++ p2[0] = *p1++; ++ } ++ } ++ #else ++ #if 0 ++ u32 *x =(u32*)data; ++ #else ++ /* this version is better because it is always aligned; ++ * The performance penalty on a 586-100 is about 6% which ++ * is acceptable - because the data is more local it might ++ * also be possible that this is faster on some machines. ++ * This function (when compiled with -02 on gcc 2.7.2) ++ * executes on a 586-100 (39.73 bogomips) at about 1900kb/sec; ++ * [measured with a 4MB data and "gpgm --print-md rmd160"] */ ++ u32 x[16]; ++ memcpy( x, data, 64 ); ++ #endif ++ #endif ++ ++ ++#define K0 0x00000000 ++#define K1 0x5A827999 ++#define K2 0x6ED9EBA1 ++#define K3 0x8F1BBCDC ++#define K4 0xA953FD4E ++#define KK0 0x50A28BE6 ++#define KK1 0x5C4DD124 ++#define KK2 0x6D703EF3 ++#define KK3 0x7A6D76E9 ++#define KK4 0x00000000 ++#define F0(x,y,z) ( (x) ^ (y) ^ (z) ) ++#define F1(x,y,z) ( ((x) & (y)) | (~(x) & (z)) ) ++#define F2(x,y,z) ( ((x) | ~(y)) ^ (z) ) ++#define F3(x,y,z) ( ((x) & (z)) | ((y) & ~(z)) ) ++#define F4(x,y,z) ( (x) ^ ((y) | ~(z)) ) ++#define R(a,b,c,d,e,f,k,r,s) do { t = a + f(b,c,d) + k + x[r]; \ ++ a = rol(t,s) + e; \ ++ c = rol(c,10); \ ++ } while(0) ++ ++ /* left lane */ ++ a = hd->h0; ++ b = hd->h1; ++ c = hd->h2; ++ d = hd->h3; ++ e = hd->h4; ++ R( a, b, c, d, e, F0, K0, 0, 11 ); ++ R( e, a, b, c, d, F0, K0, 1, 14 ); ++ R( d, e, a, b, c, F0, K0, 2, 15 ); ++ R( c, d, e, a, b, F0, K0, 3, 12 ); ++ R( b, c, d, e, a, F0, K0, 4, 5 ); ++ R( a, b, c, d, e, F0, K0, 5, 8 ); ++ R( e, a, b, c, d, F0, K0, 6, 7 ); ++ R( d, e, a, b, c, F0, K0, 7, 9 ); ++ R( c, d, e, a, b, F0, K0, 8, 11 ); ++ R( b, c, d, e, a, F0, K0, 9, 13 ); ++ R( a, b, c, d, e, F0, K0, 10, 14 ); ++ R( e, a, b, c, d, F0, K0, 11, 15 ); ++ R( d, e, a, b, c, F0, K0, 12, 6 ); ++ R( c, d, e, a, b, F0, K0, 13, 7 ); ++ R( b, c, d, e, a, F0, K0, 14, 9 ); ++ R( a, b, c, d, e, F0, K0, 15, 8 ); ++ R( e, a, b, c, d, F1, K1, 7, 7 ); ++ R( d, e, a, b, c, F1, K1, 4, 6 ); ++ R( c, d, e, a, b, F1, K1, 13, 8 ); ++ R( b, c, d, e, a, F1, K1, 1, 13 ); ++ R( a, b, c, d, e, F1, K1, 10, 11 ); ++ R( e, a, b, c, d, F1, K1, 6, 9 ); ++ R( d, e, a, b, c, F1, K1, 15, 7 ); ++ R( c, d, e, a, b, F1, K1, 3, 15 ); ++ R( b, c, d, e, a, F1, K1, 12, 7 ); ++ R( a, b, c, d, e, F1, K1, 0, 12 ); ++ R( e, a, b, c, d, F1, K1, 9, 15 ); ++ R( d, e, a, b, c, F1, K1, 5, 9 ); ++ R( c, d, e, a, b, F1, K1, 2, 11 ); ++ R( b, c, d, e, a, F1, K1, 14, 7 ); ++ R( a, b, c, d, e, F1, K1, 11, 13 ); ++ R( e, a, b, c, d, F1, K1, 8, 12 ); ++ R( d, e, a, b, c, F2, K2, 3, 11 ); ++ R( c, d, e, a, b, F2, K2, 10, 13 ); ++ R( b, c, d, e, a, F2, K2, 14, 6 ); ++ R( a, b, c, d, e, F2, K2, 4, 7 ); ++ R( e, a, b, c, d, F2, K2, 9, 14 ); ++ R( d, e, a, b, c, F2, K2, 15, 9 ); ++ R( c, d, e, a, b, F2, K2, 8, 13 ); ++ R( b, c, d, e, a, F2, K2, 1, 15 ); ++ R( a, b, c, d, e, F2, K2, 2, 14 ); ++ R( e, a, b, c, d, F2, K2, 7, 8 ); ++ R( d, e, a, b, c, F2, K2, 0, 13 ); ++ R( c, d, e, a, b, F2, K2, 6, 6 ); ++ R( b, c, d, e, a, F2, K2, 13, 5 ); ++ R( a, b, c, d, e, F2, K2, 11, 12 ); ++ R( e, a, b, c, d, F2, K2, 5, 7 ); ++ R( d, e, a, b, c, F2, K2, 12, 5 ); ++ R( c, d, e, a, b, F3, K3, 1, 11 ); ++ R( b, c, d, e, a, F3, K3, 9, 12 ); ++ R( a, b, c, d, e, F3, K3, 11, 14 ); ++ R( e, a, b, c, d, F3, K3, 10, 15 ); ++ R( d, e, a, b, c, F3, K3, 0, 14 ); ++ R( c, d, e, a, b, F3, K3, 8, 15 ); ++ R( b, c, d, e, a, F3, K3, 12, 9 ); ++ R( a, b, c, d, e, F3, K3, 4, 8 ); ++ R( e, a, b, c, d, F3, K3, 13, 9 ); ++ R( d, e, a, b, c, F3, K3, 3, 14 ); ++ R( c, d, e, a, b, F3, K3, 7, 5 ); ++ R( b, c, d, e, a, F3, K3, 15, 6 ); ++ R( a, b, c, d, e, F3, K3, 14, 8 ); ++ R( e, a, b, c, d, F3, K3, 5, 6 ); ++ R( d, e, a, b, c, F3, K3, 6, 5 ); ++ R( c, d, e, a, b, F3, K3, 2, 12 ); ++ R( b, c, d, e, a, F4, K4, 4, 9 ); ++ R( a, b, c, d, e, F4, K4, 0, 15 ); ++ R( e, a, b, c, d, F4, K4, 5, 5 ); ++ R( d, e, a, b, c, F4, K4, 9, 11 ); ++ R( c, d, e, a, b, F4, K4, 7, 6 ); ++ R( b, c, d, e, a, F4, K4, 12, 8 ); ++ R( a, b, c, d, e, F4, K4, 2, 13 ); ++ R( e, a, b, c, d, F4, K4, 10, 12 ); ++ R( d, e, a, b, c, F4, K4, 14, 5 ); ++ R( c, d, e, a, b, F4, K4, 1, 12 ); ++ R( b, c, d, e, a, F4, K4, 3, 13 ); ++ R( a, b, c, d, e, F4, K4, 8, 14 ); ++ R( e, a, b, c, d, F4, K4, 11, 11 ); ++ R( d, e, a, b, c, F4, K4, 6, 8 ); ++ R( c, d, e, a, b, F4, K4, 15, 5 ); ++ R( b, c, d, e, a, F4, K4, 13, 6 ); ++ ++ aa = a; bb = b; cc = c; dd = d; ee = e; ++ ++ /* right lane */ ++ a = hd->h0; ++ b = hd->h1; ++ c = hd->h2; ++ d = hd->h3; ++ e = hd->h4; ++ R( a, b, c, d, e, F4, KK0, 5, 8); ++ R( e, a, b, c, d, F4, KK0, 14, 9); ++ R( d, e, a, b, c, F4, KK0, 7, 9); ++ R( c, d, e, a, b, F4, KK0, 0, 11); ++ R( b, c, d, e, a, F4, KK0, 9, 13); ++ R( a, b, c, d, e, F4, KK0, 2, 15); ++ R( e, a, b, c, d, F4, KK0, 11, 15); ++ R( d, e, a, b, c, F4, KK0, 4, 5); ++ R( c, d, e, a, b, F4, KK0, 13, 7); ++ R( b, c, d, e, a, F4, KK0, 6, 7); ++ R( a, b, c, d, e, F4, KK0, 15, 8); ++ R( e, a, b, c, d, F4, KK0, 8, 11); ++ R( d, e, a, b, c, F4, KK0, 1, 14); ++ R( c, d, e, a, b, F4, KK0, 10, 14); ++ R( b, c, d, e, a, F4, KK0, 3, 12); ++ R( a, b, c, d, e, F4, KK0, 12, 6); ++ R( e, a, b, c, d, F3, KK1, 6, 9); ++ R( d, e, a, b, c, F3, KK1, 11, 13); ++ R( c, d, e, a, b, F3, KK1, 3, 15); ++ R( b, c, d, e, a, F3, KK1, 7, 7); ++ R( a, b, c, d, e, F3, KK1, 0, 12); ++ R( e, a, b, c, d, F3, KK1, 13, 8); ++ R( d, e, a, b, c, F3, KK1, 5, 9); ++ R( c, d, e, a, b, F3, KK1, 10, 11); ++ R( b, c, d, e, a, F3, KK1, 14, 7); ++ R( a, b, c, d, e, F3, KK1, 15, 7); ++ R( e, a, b, c, d, F3, KK1, 8, 12); ++ R( d, e, a, b, c, F3, KK1, 12, 7); ++ R( c, d, e, a, b, F3, KK1, 4, 6); ++ R( b, c, d, e, a, F3, KK1, 9, 15); ++ R( a, b, c, d, e, F3, KK1, 1, 13); ++ R( e, a, b, c, d, F3, KK1, 2, 11); ++ R( d, e, a, b, c, F2, KK2, 15, 9); ++ R( c, d, e, a, b, F2, KK2, 5, 7); ++ R( b, c, d, e, a, F2, KK2, 1, 15); ++ R( a, b, c, d, e, F2, KK2, 3, 11); ++ R( e, a, b, c, d, F2, KK2, 7, 8); ++ R( d, e, a, b, c, F2, KK2, 14, 6); ++ R( c, d, e, a, b, F2, KK2, 6, 6); ++ R( b, c, d, e, a, F2, KK2, 9, 14); ++ R( a, b, c, d, e, F2, KK2, 11, 12); ++ R( e, a, b, c, d, F2, KK2, 8, 13); ++ R( d, e, a, b, c, F2, KK2, 12, 5); ++ R( c, d, e, a, b, F2, KK2, 2, 14); ++ R( b, c, d, e, a, F2, KK2, 10, 13); ++ R( a, b, c, d, e, F2, KK2, 0, 13); ++ R( e, a, b, c, d, F2, KK2, 4, 7); ++ R( d, e, a, b, c, F2, KK2, 13, 5); ++ R( c, d, e, a, b, F1, KK3, 8, 15); ++ R( b, c, d, e, a, F1, KK3, 6, 5); ++ R( a, b, c, d, e, F1, KK3, 4, 8); ++ R( e, a, b, c, d, F1, KK3, 1, 11); ++ R( d, e, a, b, c, F1, KK3, 3, 14); ++ R( c, d, e, a, b, F1, KK3, 11, 14); ++ R( b, c, d, e, a, F1, KK3, 15, 6); ++ R( a, b, c, d, e, F1, KK3, 0, 14); ++ R( e, a, b, c, d, F1, KK3, 5, 6); ++ R( d, e, a, b, c, F1, KK3, 12, 9); ++ R( c, d, e, a, b, F1, KK3, 2, 12); ++ R( b, c, d, e, a, F1, KK3, 13, 9); ++ R( a, b, c, d, e, F1, KK3, 9, 12); ++ R( e, a, b, c, d, F1, KK3, 7, 5); ++ R( d, e, a, b, c, F1, KK3, 10, 15); ++ R( c, d, e, a, b, F1, KK3, 14, 8); ++ R( b, c, d, e, a, F0, KK4, 12, 8); ++ R( a, b, c, d, e, F0, KK4, 15, 5); ++ R( e, a, b, c, d, F0, KK4, 10, 12); ++ R( d, e, a, b, c, F0, KK4, 4, 9); ++ R( c, d, e, a, b, F0, KK4, 1, 12); ++ R( b, c, d, e, a, F0, KK4, 5, 5); ++ R( a, b, c, d, e, F0, KK4, 8, 14); ++ R( e, a, b, c, d, F0, KK4, 7, 6); ++ R( d, e, a, b, c, F0, KK4, 6, 8); ++ R( c, d, e, a, b, F0, KK4, 2, 13); ++ R( b, c, d, e, a, F0, KK4, 13, 6); ++ R( a, b, c, d, e, F0, KK4, 14, 5); ++ R( e, a, b, c, d, F0, KK4, 0, 15); ++ R( d, e, a, b, c, F0, KK4, 3, 13); ++ R( c, d, e, a, b, F0, KK4, 9, 11); ++ R( b, c, d, e, a, F0, KK4, 11, 11); ++ ++ ++ t = hd->h1 + d + cc; ++ hd->h1 = hd->h2 + e + dd; ++ hd->h2 = hd->h3 + a + ee; ++ hd->h3 = hd->h4 + b + aa; ++ hd->h4 = hd->h0 + c + bb; ++ hd->h0 = t; ++} ++ ++ ++/* Update the message digest with the contents ++ * of INBUF with length INLEN. ++ */ ++static void ++rmd160_write( RMD160_CONTEXT *hd, byte *inbuf, size_t inlen) ++{ ++ if( hd->count == 64 ) { /* flush the buffer */ ++ transform( hd, hd->buf ); ++ hd->count = 0; ++ hd->nblocks++; ++ } ++ if( !inbuf ) ++ return; ++ if( hd->count ) { ++ for( ; inlen && hd->count < 64; inlen-- ) ++ hd->buf[hd->count++] = *inbuf++; ++ rmd160_write( hd, NULL, 0 ); ++ if( !inlen ) ++ return; ++ } ++ ++ while( inlen >= 64 ) { ++ transform( hd, inbuf ); ++ hd->count = 0; ++ hd->nblocks++; ++ inlen -= 64; ++ inbuf += 64; ++ } ++ for( ; inlen && hd->count < 64; inlen-- ) ++ hd->buf[hd->count++] = *inbuf++; ++} ++ ++/* The routine terminates the computation ++ */ ++ ++static void ++rmd160_final( RMD160_CONTEXT *hd ) ++{ ++ u32 t, msb, lsb; ++ byte *p; ++ ++ rmd160_write(hd, NULL, 0); /* flush */; ++ ++ msb = 0; ++ t = hd->nblocks; ++ if( (lsb = t << 6) < t ) /* multiply by 64 to make a byte count */ ++ msb++; ++ msb += t >> 26; ++ t = lsb; ++ if( (lsb = t + hd->count) < t ) /* add the count */ ++ msb++; ++ t = lsb; ++ if( (lsb = t << 3) < t ) /* multiply by 8 to make a bit count */ ++ msb++; ++ msb += t >> 29; ++ ++ if( hd->count < 56 ) { /* enough room */ ++ hd->buf[hd->count++] = 0x80; /* pad */ ++ while( hd->count < 56 ) ++ hd->buf[hd->count++] = 0; /* pad */ ++ } ++ else { /* need one extra block */ ++ hd->buf[hd->count++] = 0x80; /* pad character */ ++ while( hd->count < 64 ) ++ hd->buf[hd->count++] = 0; ++ rmd160_write(hd, NULL, 0); /* flush */; ++ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */ ++ } ++ /* append the 64 bit count */ ++ hd->buf[56] = lsb ; ++ hd->buf[57] = lsb >> 8; ++ hd->buf[58] = lsb >> 16; ++ hd->buf[59] = lsb >> 24; ++ hd->buf[60] = msb ; ++ hd->buf[61] = msb >> 8; ++ hd->buf[62] = msb >> 16; ++ hd->buf[63] = msb >> 24; ++ transform( hd, hd->buf ); ++ ++ p = hd->buf; ++ #if BYTE_ORDER == BIG_ENDIAN ++ #define X(a) do { *p++ = hd->h##a ; *p++ = hd->h##a >> 8; \ ++ *p++ = hd->h##a >> 16; *p++ = hd->h##a >> 24; } while(0) ++ #else /* little endian */ ++ #define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0) ++ #endif ++ X(0); ++ X(1); ++ X(2); ++ X(3); ++ X(4); ++ #undef X ++} ++ ++/**************** ++ * Shortcut functions which puts the hash value of the supplied buffer ++ * into outbuf which must have a size of 20 bytes. ++ */ ++void ++rmd160_hash_buffer( char *outbuf, const char *buffer, size_t length ) ++{ ++ RMD160_CONTEXT hd; ++ ++ rmd160_init( &hd ); ++ rmd160_write( &hd, (byte*)buffer, length ); ++ rmd160_final( &hd ); ++ memcpy( outbuf, hd.buf, 20 ); ++} +--- util-linux-2.12q/mount/rmd160.h ++++ util-linux-2.12q/mount/rmd160.h +@@ -0,0 +1,9 @@ ++#ifndef RMD160_H ++#define RMD160_H ++ ++void ++rmd160_hash_buffer( char *outbuf, const char *buffer, size_t length ); ++ ++#endif /*RMD160_H*/ ++ ++ +--- util-linux-2.12q/mount/sha512.c ++++ util-linux-2.12q/mount/sha512.c +@@ -0,0 +1,432 @@ ++/* ++ * sha512.c ++ * ++ * Written by Jari Ruusu, April 16 2001 ++ * ++ * Copyright 2001 by Jari Ruusu. ++ * Redistribution of this file is permitted under the GNU Public License. ++ */ ++ ++#include ++#include ++#include "sha512.h" ++ ++/* Define one or more of these. If none is defined, you get all of them */ ++#if !defined(SHA256_NEEDED)&&!defined(SHA512_NEEDED)&&!defined(SHA384_NEEDED) ++# define SHA256_NEEDED 1 ++# define SHA512_NEEDED 1 ++# define SHA384_NEEDED 1 ++#endif ++ ++#if defined(SHA256_NEEDED) ++static const u_int32_t sha256_hashInit[8] = { ++ 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, ++ 0x1f83d9ab, 0x5be0cd19 ++}; ++static const u_int32_t sha256_K[64] = { ++ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, ++ 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, ++ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, ++ 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, ++ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, ++ 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, ++ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, ++ 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, ++ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, ++ 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, ++ 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 ++}; ++#endif ++ ++#if defined(SHA512_NEEDED) ++static const u_int64_t sha512_hashInit[8] = { ++ 0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, 0x3c6ef372fe94f82bULL, ++ 0xa54ff53a5f1d36f1ULL, 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, ++ 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL ++}; ++#endif ++ ++#if defined(SHA384_NEEDED) ++static const u_int64_t sha384_hashInit[8] = { ++ 0xcbbb9d5dc1059ed8ULL, 0x629a292a367cd507ULL, 0x9159015a3070dd17ULL, ++ 0x152fecd8f70e5939ULL, 0x67332667ffc00b31ULL, 0x8eb44a8768581511ULL, ++ 0xdb0c2e0d64f98fa7ULL, 0x47b5481dbefa4fa4ULL ++}; ++#endif ++ ++#if defined(SHA512_NEEDED) || defined(SHA384_NEEDED) ++static const u_int64_t sha512_K[80] = { ++ 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL, ++ 0xe9b5dba58189dbbcULL, 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL, ++ 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL, 0xd807aa98a3030242ULL, ++ 0x12835b0145706fbeULL, 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL, ++ 0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL, 0x9bdc06a725c71235ULL, ++ 0xc19bf174cf692694ULL, 0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL, ++ 0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL, 0x2de92c6f592b0275ULL, ++ 0x4a7484aa6ea6e483ULL, 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL, ++ 0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL, 0xb00327c898fb213fULL, ++ 0xbf597fc7beef0ee4ULL, 0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL, ++ 0x06ca6351e003826fULL, 0x142929670a0e6e70ULL, 0x27b70a8546d22ffcULL, ++ 0x2e1b21385c26c926ULL, 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL, ++ 0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL, 0x81c2c92e47edaee6ULL, ++ 0x92722c851482353bULL, 0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL, ++ 0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL, 0xd192e819d6ef5218ULL, ++ 0xd69906245565a910ULL, 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL, ++ 0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL, 0x2748774cdf8eeb99ULL, ++ 0x34b0bcb5e19b48a8ULL, 0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL, ++ 0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL, 0x748f82ee5defb2fcULL, ++ 0x78a5636f43172f60ULL, 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL, ++ 0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL, 0xbef9a3f7b2c67915ULL, ++ 0xc67178f2e372532bULL, 0xca273eceea26619cULL, 0xd186b8c721c0c207ULL, ++ 0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL, 0x06f067aa72176fbaULL, ++ 0x0a637dc5a2c898a6ULL, 0x113f9804bef90daeULL, 0x1b710b35131c471bULL, ++ 0x28db77f523047d84ULL, 0x32caab7b40c72493ULL, 0x3c9ebe0a15c9bebcULL, ++ 0x431d67c49c100d4cULL, 0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL, ++ 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL ++}; ++#endif ++ ++#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z))) ++#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) ++#define R(x,y) ((y) >> (x)) ++ ++#if defined(SHA256_NEEDED) ++void sha256_init(sha256_context *ctx) ++{ ++ memcpy(&ctx->sha_H[0], &sha256_hashInit[0], sizeof(ctx->sha_H)); ++ ctx->sha_blocks = 0; ++ ctx->sha_bufCnt = 0; ++} ++ ++#define S(x,y) (((y) >> (x)) | ((y) << (32 - (x)))) ++#define uSig0(x) ((S(2,(x))) ^ (S(13,(x))) ^ (S(22,(x)))) ++#define uSig1(x) ((S(6,(x))) ^ (S(11,(x))) ^ (S(25,(x)))) ++#define lSig0(x) ((S(7,(x))) ^ (S(18,(x))) ^ (R(3,(x)))) ++#define lSig1(x) ((S(17,(x))) ^ (S(19,(x))) ^ (R(10,(x)))) ++ ++static void sha256_transform(sha256_context *ctx, unsigned char *datap) ++{ ++ register int j; ++ u_int32_t a, b, c, d, e, f, g, h; ++ u_int32_t T1, T2, W[64], Wm2, Wm15; ++ ++ /* read the data, big endian byte order */ ++ j = 0; ++ do { ++ W[j] = (((u_int32_t)(datap[0]))<<24) | (((u_int32_t)(datap[1]))<<16) | ++ (((u_int32_t)(datap[2]))<<8 ) | ((u_int32_t)(datap[3])); ++ datap += 4; ++ } while(++j < 16); ++ ++ /* initialize variables a...h */ ++ a = ctx->sha_H[0]; ++ b = ctx->sha_H[1]; ++ c = ctx->sha_H[2]; ++ d = ctx->sha_H[3]; ++ e = ctx->sha_H[4]; ++ f = ctx->sha_H[5]; ++ g = ctx->sha_H[6]; ++ h = ctx->sha_H[7]; ++ ++ /* apply compression function */ ++ j = 0; ++ do { ++ if(j >= 16) { ++ Wm2 = W[j - 2]; ++ Wm15 = W[j - 15]; ++ W[j] = lSig1(Wm2) + W[j - 7] + lSig0(Wm15) + W[j - 16]; ++ } ++ T1 = h + uSig1(e) + Ch(e,f,g) + sha256_K[j] + W[j]; ++ T2 = uSig0(a) + Maj(a,b,c); ++ h = g; g = f; f = e; ++ e = d + T1; ++ d = c; c = b; b = a; ++ a = T1 + T2; ++ } while(++j < 64); ++ ++ /* compute intermediate hash value */ ++ ctx->sha_H[0] += a; ++ ctx->sha_H[1] += b; ++ ctx->sha_H[2] += c; ++ ctx->sha_H[3] += d; ++ ctx->sha_H[4] += e; ++ ctx->sha_H[5] += f; ++ ctx->sha_H[6] += g; ++ ctx->sha_H[7] += h; ++ ++ ctx->sha_blocks++; ++} ++ ++void sha256_write(sha256_context *ctx, unsigned char *datap, int length) ++{ ++ while(length > 0) { ++ if(!ctx->sha_bufCnt) { ++ while(length >= sizeof(ctx->sha_out)) { ++ sha256_transform(ctx, datap); ++ datap += sizeof(ctx->sha_out); ++ length -= sizeof(ctx->sha_out); ++ } ++ if(!length) return; ++ } ++ ctx->sha_out[ctx->sha_bufCnt] = *datap++; ++ length--; ++ if(++ctx->sha_bufCnt == sizeof(ctx->sha_out)) { ++ sha256_transform(ctx, &ctx->sha_out[0]); ++ ctx->sha_bufCnt = 0; ++ } ++ } ++} ++ ++void sha256_final(sha256_context *ctx) ++{ ++ register int j; ++ u_int64_t bitLength; ++ u_int32_t i; ++ unsigned char padByte, *datap; ++ ++ bitLength = (ctx->sha_blocks << 9) | (ctx->sha_bufCnt << 3); ++ padByte = 0x80; ++ sha256_write(ctx, &padByte, 1); ++ ++ /* pad extra space with zeroes */ ++ padByte = 0; ++ while(ctx->sha_bufCnt != 56) { ++ sha256_write(ctx, &padByte, 1); ++ } ++ ++ /* write bit length, big endian byte order */ ++ ctx->sha_out[56] = bitLength >> 56; ++ ctx->sha_out[57] = bitLength >> 48; ++ ctx->sha_out[58] = bitLength >> 40; ++ ctx->sha_out[59] = bitLength >> 32; ++ ctx->sha_out[60] = bitLength >> 24; ++ ctx->sha_out[61] = bitLength >> 16; ++ ctx->sha_out[62] = bitLength >> 8; ++ ctx->sha_out[63] = bitLength; ++ sha256_transform(ctx, &ctx->sha_out[0]); ++ ++ /* return results in ctx->sha_out[0...31] */ ++ datap = &ctx->sha_out[0]; ++ j = 0; ++ do { ++ i = ctx->sha_H[j]; ++ datap[0] = i >> 24; ++ datap[1] = i >> 16; ++ datap[2] = i >> 8; ++ datap[3] = i; ++ datap += 4; ++ } while(++j < 8); ++ ++ /* clear sensitive information */ ++ memset(&ctx->sha_out[32], 0, sizeof(sha256_context) - 32); ++} ++ ++void sha256_hash_buffer(unsigned char *ib, int ile, unsigned char *ob, int ole) ++{ ++ sha256_context ctx; ++ ++ if(ole < 1) return; ++ memset(ob, 0, ole); ++ if(ole > 32) ole = 32; ++ sha256_init(&ctx); ++ sha256_write(&ctx, ib, ile); ++ sha256_final(&ctx); ++ memcpy(ob, &ctx.sha_out[0], ole); ++ memset(&ctx, 0, sizeof(ctx)); ++} ++ ++#endif ++ ++#if defined(SHA512_NEEDED) ++void sha512_init(sha512_context *ctx) ++{ ++ memcpy(&ctx->sha_H[0], &sha512_hashInit[0], sizeof(ctx->sha_H)); ++ ctx->sha_blocks = 0; ++ ctx->sha_blocksMSB = 0; ++ ctx->sha_bufCnt = 0; ++} ++#endif ++ ++#if defined(SHA512_NEEDED) || defined(SHA384_NEEDED) ++#undef S ++#undef uSig0 ++#undef uSig1 ++#undef lSig0 ++#undef lSig1 ++#define S(x,y) (((y) >> (x)) | ((y) << (64 - (x)))) ++#define uSig0(x) ((S(28,(x))) ^ (S(34,(x))) ^ (S(39,(x)))) ++#define uSig1(x) ((S(14,(x))) ^ (S(18,(x))) ^ (S(41,(x)))) ++#define lSig0(x) ((S(1,(x))) ^ (S(8,(x))) ^ (R(7,(x)))) ++#define lSig1(x) ((S(19,(x))) ^ (S(61,(x))) ^ (R(6,(x)))) ++ ++static void sha512_transform(sha512_context *ctx, unsigned char *datap) ++{ ++ register int j; ++ u_int64_t a, b, c, d, e, f, g, h; ++ u_int64_t T1, T2, W[80], Wm2, Wm15; ++ ++ /* read the data, big endian byte order */ ++ j = 0; ++ do { ++ W[j] = (((u_int64_t)(datap[0]))<<56) | (((u_int64_t)(datap[1]))<<48) | ++ (((u_int64_t)(datap[2]))<<40) | (((u_int64_t)(datap[3]))<<32) | ++ (((u_int64_t)(datap[4]))<<24) | (((u_int64_t)(datap[5]))<<16) | ++ (((u_int64_t)(datap[6]))<<8 ) | ((u_int64_t)(datap[7])); ++ datap += 8; ++ } while(++j < 16); ++ ++ /* initialize variables a...h */ ++ a = ctx->sha_H[0]; ++ b = ctx->sha_H[1]; ++ c = ctx->sha_H[2]; ++ d = ctx->sha_H[3]; ++ e = ctx->sha_H[4]; ++ f = ctx->sha_H[5]; ++ g = ctx->sha_H[6]; ++ h = ctx->sha_H[7]; ++ ++ /* apply compression function */ ++ j = 0; ++ do { ++ if(j >= 16) { ++ Wm2 = W[j - 2]; ++ Wm15 = W[j - 15]; ++ W[j] = lSig1(Wm2) + W[j - 7] + lSig0(Wm15) + W[j - 16]; ++ } ++ T1 = h + uSig1(e) + Ch(e,f,g) + sha512_K[j] + W[j]; ++ T2 = uSig0(a) + Maj(a,b,c); ++ h = g; g = f; f = e; ++ e = d + T1; ++ d = c; c = b; b = a; ++ a = T1 + T2; ++ } while(++j < 80); ++ ++ /* compute intermediate hash value */ ++ ctx->sha_H[0] += a; ++ ctx->sha_H[1] += b; ++ ctx->sha_H[2] += c; ++ ctx->sha_H[3] += d; ++ ctx->sha_H[4] += e; ++ ctx->sha_H[5] += f; ++ ctx->sha_H[6] += g; ++ ctx->sha_H[7] += h; ++ ++ ctx->sha_blocks++; ++ if(!ctx->sha_blocks) ctx->sha_blocksMSB++; ++} ++ ++void sha512_write(sha512_context *ctx, unsigned char *datap, int length) ++{ ++ while(length > 0) { ++ if(!ctx->sha_bufCnt) { ++ while(length >= sizeof(ctx->sha_out)) { ++ sha512_transform(ctx, datap); ++ datap += sizeof(ctx->sha_out); ++ length -= sizeof(ctx->sha_out); ++ } ++ if(!length) return; ++ } ++ ctx->sha_out[ctx->sha_bufCnt] = *datap++; ++ length--; ++ if(++ctx->sha_bufCnt == sizeof(ctx->sha_out)) { ++ sha512_transform(ctx, &ctx->sha_out[0]); ++ ctx->sha_bufCnt = 0; ++ } ++ } ++} ++ ++void sha512_final(sha512_context *ctx) ++{ ++ register int j; ++ u_int64_t bitLength, bitLengthMSB; ++ u_int64_t i; ++ unsigned char padByte, *datap; ++ ++ bitLength = (ctx->sha_blocks << 10) | (ctx->sha_bufCnt << 3); ++ bitLengthMSB = (ctx->sha_blocksMSB << 10) | (ctx->sha_blocks >> 54); ++ padByte = 0x80; ++ sha512_write(ctx, &padByte, 1); ++ ++ /* pad extra space with zeroes */ ++ padByte = 0; ++ while(ctx->sha_bufCnt != 112) { ++ sha512_write(ctx, &padByte, 1); ++ } ++ ++ /* write bit length, big endian byte order */ ++ ctx->sha_out[112] = bitLengthMSB >> 56; ++ ctx->sha_out[113] = bitLengthMSB >> 48; ++ ctx->sha_out[114] = bitLengthMSB >> 40; ++ ctx->sha_out[115] = bitLengthMSB >> 32; ++ ctx->sha_out[116] = bitLengthMSB >> 24; ++ ctx->sha_out[117] = bitLengthMSB >> 16; ++ ctx->sha_out[118] = bitLengthMSB >> 8; ++ ctx->sha_out[119] = bitLengthMSB; ++ ctx->sha_out[120] = bitLength >> 56; ++ ctx->sha_out[121] = bitLength >> 48; ++ ctx->sha_out[122] = bitLength >> 40; ++ ctx->sha_out[123] = bitLength >> 32; ++ ctx->sha_out[124] = bitLength >> 24; ++ ctx->sha_out[125] = bitLength >> 16; ++ ctx->sha_out[126] = bitLength >> 8; ++ ctx->sha_out[127] = bitLength; ++ sha512_transform(ctx, &ctx->sha_out[0]); ++ ++ /* return results in ctx->sha_out[0...63] */ ++ datap = &ctx->sha_out[0]; ++ j = 0; ++ do { ++ i = ctx->sha_H[j]; ++ datap[0] = i >> 56; ++ datap[1] = i >> 48; ++ datap[2] = i >> 40; ++ datap[3] = i >> 32; ++ datap[4] = i >> 24; ++ datap[5] = i >> 16; ++ datap[6] = i >> 8; ++ datap[7] = i; ++ datap += 8; ++ } while(++j < 8); ++ ++ /* clear sensitive information */ ++ memset(&ctx->sha_out[64], 0, sizeof(sha512_context) - 64); ++} ++ ++void sha512_hash_buffer(unsigned char *ib, int ile, unsigned char *ob, int ole) ++{ ++ sha512_context ctx; ++ ++ if(ole < 1) return; ++ memset(ob, 0, ole); ++ if(ole > 64) ole = 64; ++ sha512_init(&ctx); ++ sha512_write(&ctx, ib, ile); ++ sha512_final(&ctx); ++ memcpy(ob, &ctx.sha_out[0], ole); ++ memset(&ctx, 0, sizeof(ctx)); ++} ++#endif ++ ++#if defined(SHA384_NEEDED) ++void sha384_init(sha512_context *ctx) ++{ ++ memcpy(&ctx->sha_H[0], &sha384_hashInit[0], sizeof(ctx->sha_H)); ++ ctx->sha_blocks = 0; ++ ctx->sha_blocksMSB = 0; ++ ctx->sha_bufCnt = 0; ++} ++ ++void sha384_hash_buffer(unsigned char *ib, int ile, unsigned char *ob, int ole) ++{ ++ sha512_context ctx; ++ ++ if(ole < 1) return; ++ memset(ob, 0, ole); ++ if(ole > 48) ole = 48; ++ sha384_init(&ctx); ++ sha512_write(&ctx, ib, ile); ++ sha512_final(&ctx); ++ memcpy(ob, &ctx.sha_out[0], ole); ++ memset(&ctx, 0, sizeof(ctx)); ++} ++#endif +--- util-linux-2.12q/mount/sha512.h ++++ util-linux-2.12q/mount/sha512.h +@@ -0,0 +1,45 @@ ++/* ++ * sha512.h ++ * ++ * Written by Jari Ruusu, April 16 2001 ++ * ++ * Copyright 2001 by Jari Ruusu. ++ * Redistribution of this file is permitted under the GNU Public License. ++ */ ++ ++#include ++ ++typedef struct { ++ unsigned char sha_out[64]; /* results are here, bytes 0...31 */ ++ u_int32_t sha_H[8]; ++ u_int64_t sha_blocks; ++ int sha_bufCnt; ++} sha256_context; ++ ++typedef struct { ++ unsigned char sha_out[128]; /* results are here, bytes 0...63 */ ++ u_int64_t sha_H[8]; ++ u_int64_t sha_blocks; ++ u_int64_t sha_blocksMSB; ++ int sha_bufCnt; ++} sha512_context; ++ ++/* no sha384_context, use sha512_context */ ++ ++/* 256 bit hash, provides 128 bits of security against collision attacks */ ++extern void sha256_init(sha256_context *); ++extern void sha256_write(sha256_context *, unsigned char *, int); ++extern void sha256_final(sha256_context *); ++extern void sha256_hash_buffer(unsigned char *, int, unsigned char *, int); ++ ++/* 512 bit hash, provides 256 bits of security against collision attacks */ ++extern void sha512_init(sha512_context *); ++extern void sha512_write(sha512_context *, unsigned char *, int); ++extern void sha512_final(sha512_context *); ++extern void sha512_hash_buffer(unsigned char *, int, unsigned char *, int); ++ ++/* 384 bit hash, provides 192 bits of security against collision attacks */ ++extern void sha384_init(sha512_context *); ++/* no sha384_write(), use sha512_write() */ ++/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ ++extern void sha384_hash_buffer(unsigned char *, int, unsigned char *, int); +--- util-linux-2.12q/mount/swapon.8 ++++ util-linux-2.12q/mount/swapon.8 +@@ -142,6 +142,22 @@ + .I /proc/swaps + or + .IR /etc/fstab ). ++.PP ++If ++.I loop=/dev/loop? ++and ++.I encryption=AES128 ++options are present in ++.I /etc/fstab ++then ++.BR "swapon -a" ++will set up loop devices using random keys, run ++.BR "mkswap" ++on them, and enable encrypted swap on specified loop devices. Encrypted loop ++devices are set up with page size offset so that unencrypted swap signatures ++on first page of swap devices are not touched. ++.BR "swapoff -a" ++will tear down such loop devices. + .SH NOTE + You should not use + .B swapon +--- util-linux-2.12q/mount/swapon.c ++++ util-linux-2.12q/mount/swapon.c +@@ -1,22 +1,45 @@ + /* + * A swapon(8)/swapoff(8) for Linux 0.99. + * swapon.c,v 1.1.1.1 1993/11/18 08:40:51 jrs Exp ++ * ++ * 1997-02-xx ++ * - added '-s' (summary option) ++ * 1999-02-22 Arkadiusz Mi¶kiewicz ++ * - added Native Language Support ++ * 1999-03-21 Arnaldo Carvalho de Melo ++ * - fixed strerr(errno) in gettext calls ++ * 2001-03-22 Erik Troan ++ * - added -e option for -a ++ * - -a shouldn't try to add swaps that are already enabled ++ * 2002-04-14 Jari Ruusu ++ * - added encrypted swap support + */ + + #include + #include + #include ++#include + #include + #include + #include + #include ++#include ++#include + #include ++#include ++#include ++#include ++#include ++#include + #include "xmalloc.h" + #include "swap_constants.h" + #include "swapargs.h" + #include "nls.h" + #include "mount_blkid.h" + #include "mount_by_label.h" ++#include "loop.h" ++#include "xstrncpy.h" ++#include "sha512.h" + + #define streq(s, t) (strcmp ((s), (t)) == 0) + +@@ -297,6 +320,260 @@ + } + + static int ++prepare_encrypted_swap(const char *partition, char *loop, char *encryption) ++{ ++ int x, y, fd, ffd; ++ sha512_context s; ++ unsigned char b[4096], multiKeyBits[65][32]; ++ char *a[10], *apiName; ++ struct loop_info64 loopinfo; ++ FILE *f; ++ ++ /* ++ * Some sanity checks ++ */ ++ if(strlen(partition) < 1) { ++ fprintf(stderr, _("swapon: invalid swap device name\n")); ++ return 0; ++ } ++ if(strlen(loop) < 1) { ++ fprintf(stderr, _("swapon: invalid loop device name\n")); ++ return 0; ++ } ++ if(strlen(encryption) < 1) { ++ fprintf(stderr, _("swapon: invalid encryption type\n")); ++ return 0; ++ } ++ ++ /* ++ * Abort if loop device does not exist or is already in use ++ */ ++ if((fd = open(loop, O_RDWR)) == -1) { ++ fprintf(stderr, _("swapon: unable to open loop device %s\n"), loop); ++ return 0; ++ } ++ if(is_unused_loop_device(fd) == 0) { ++ fprintf(stderr, _("swapon: loop device %s already in use\n"), loop); ++ goto errout0; ++ } ++ ++ /* ++ * Compute SHA-512 over first 40 KB of old swap data. This data ++ * is mostly unknown data encrypted using unknown key. SHA-512 hash ++ * output is then used as entropy for new swap encryption key. ++ */ ++ if(!(f = fopen(partition, "r+"))) { ++ fprintf(stderr, _("swapon: unable to open swap device %s\n"), partition); ++ goto errout0; ++ } ++ fseek(f, (long)PAGE_SIZE, SEEK_SET); ++ sha512_init(&s); ++ for(x = 0; x < 10; x++) { ++ if(fread(&b[0], sizeof(b), 1, f) != 1) break; ++ sha512_write(&s, &b[0], sizeof(b)); ++ } ++ sha512_final(&s); ++ ++ /* ++ * Overwrite 40 KB of old swap data 20 times so that recovering ++ * SHA-512 output beyond this point is difficult and expensive. ++ */ ++ for(y = 0; y < 20; y++) { ++ int z; ++ struct { ++ struct timeval tv; ++ unsigned char h[64]; ++ int x,y,z; ++ } j; ++ if(fseek(f, (long)PAGE_SIZE, SEEK_SET)) break; ++ memcpy(&j.h[0], &s.sha_out[0], 64); ++ gettimeofday(&j.tv, NULL); ++ j.y = y; ++ for(x = 0; x < 10; x++) { ++ j.x = x; ++ for(z = 0; z < sizeof(b); z += 64) { ++ j.z = z; ++ sha512_hash_buffer((unsigned char *)&j, sizeof(j), &b[z], 64); ++ } ++ if(fwrite(&b[0], sizeof(b), 1, f) != 1) break; ++ } ++ memset(&j, 0, sizeof(j)); ++ if(fflush(f)) break; ++ if(fsync(fileno(f))) break; ++ } ++ fclose(f); ++ ++ /* ++ * Use all 512 bits of hash output ++ */ ++ memcpy(&b[0], &s.sha_out[0], 64); ++ memset(&s, 0, sizeof(s)); ++ ++ /* ++ * Read 32 bytes of random entropy from kernel's random ++ * number generator. This code may be executed early on startup ++ * scripts and amount of random entropy may be non-existent. ++ * SHA-512 of old swap data is used as workaround for missing ++ * entropy in kernel's random number generator. ++ */ ++ if(!(f = fopen("/dev/urandom", "r"))) { ++ fprintf(stderr, _("swapon: unable to open /dev/urandom\n")); ++ goto errout0; ++ } ++ fread(&b[64], 32, 1, f); ++ ++ /* ++ * Set up struct loop_info64 ++ */ ++ if((ffd = open(partition, O_RDWR)) < 0) { ++ fprintf(stderr, _("swapon: unable to open swap device %s\n"), partition); ++ goto errout1; ++ } ++ memset(&loopinfo, 0, sizeof(loopinfo)); ++ xstrncpy(loopinfo.lo_file_name, partition, LO_NAME_SIZE); ++ loopinfo.lo_encrypt_type = loop_crypt_type(encryption, &loopinfo.lo_encrypt_key_size, &apiName); ++ if(loopinfo.lo_encrypt_type <= 1) { ++ fprintf(stderr, _("swapon: unsupported swap encryption type %s\n"), encryption); ++errout2: ++ close(ffd); ++errout1: ++ fclose(f); ++errout0: ++ close(fd); ++ memset(&loopinfo.lo_encrypt_key[0], 0, sizeof(loopinfo.lo_encrypt_key)); ++ memset(&multiKeyBits[0][0], 0, sizeof(multiKeyBits)); ++ return 0; ++ } ++ loopinfo.lo_offset = PAGE_SIZE; ++ /* single-key hash */ ++ sha512_hash_buffer(&b[0], 64+32, &loopinfo.lo_encrypt_key[0], sizeof(loopinfo.lo_encrypt_key)); ++ /* multi-key hash */ ++ x = 0; ++ while(x < 65) { ++ fread(&b[64+32], 16, 1, f); ++ sha512_hash_buffer(&b[0], 64+32+16, &multiKeyBits[x][0], 32); ++ x++; ++ } ++ ++ /* ++ * Try to set up single-key loop ++ */ ++ if(ioctl(fd, LOOP_SET_FD, ffd) < 0) { ++ fprintf(stderr, _("swapon: LOOP_SET_FD failed\n")); ++ goto errout2; ++ } ++ if ((loopinfo.lo_encrypt_type == 18) || (loop_set_status64_ioctl(fd, &loopinfo) < 0)) { ++ if(try_cryptoapi_loop_interface(fd, &loopinfo, apiName) < 0) { ++ fprintf(stderr, _("swapon: LOOP_SET_STATUS failed\n")); ++ ioctl(fd, LOOP_CLR_FD, 0); ++ goto errout2; ++ } ++ } ++ ++ /* ++ * Try to put loop to multi-key v3 or v2 mode. ++ * If this fails, then let it operate in single-key mode. ++ */ ++ if(ioctl(fd, LOOP_MULTI_KEY_SETUP_V3, &multiKeyBits[0][0]) < 0) { ++ ioctl(fd, LOOP_MULTI_KEY_SETUP, &multiKeyBits[0][0]); ++ } ++ ++ /* ++ * Loop is now set up. Clean up the keys. ++ */ ++ memset(&loopinfo.lo_encrypt_key[0], 0, sizeof(loopinfo.lo_encrypt_key)); ++ memset(&multiKeyBits[0][0], 0, sizeof(multiKeyBits)); ++ close(ffd); ++ fclose(f); ++ close(fd); ++ ++ /* ++ * Write 40 KB of zeroes to loop device. That same data is written ++ * to underlying partition in encrypted form. This is done to guarantee ++ * that next time encrypted swap is initialized, the SHA-512 hash will ++ * be different. And, if encrypted swap data writes over this data, that's ++ * even better. ++ */ ++ if(!(f = fopen(loop, "r+"))) { ++ fprintf(stderr, _("swapon: unable to open loop device %s\n"), loop); ++ return 0; ++ } ++ memset(&b[0], 0, sizeof(b)); ++ for(x = 0; x < 10; x++) { ++ if(fwrite(&b[0], sizeof(b), 1, f) != 1) break; ++ } ++ fflush(f); ++ fsync(fileno(f)); ++ fclose(f); ++ sync(); ++ ++ /* ++ * Run mkswap on loop device so that kernel understands it as swap. ++ * Redirect stderr to /dev/null and ignore exit value. ++ */ ++ if(!(x = fork())) { ++ if((x = open("/dev/null", O_WRONLY)) >= 0) { ++ dup2(x, 2); ++ close(x); ++ } ++ a[0] = "mkswap"; ++ a[1] = loop; ++ a[2] = 0; ++ execvp(a[0], &a[0]); ++ execv("/sbin/mkswap", &a[0]); ++ /* error to stdout, stderr is directed to /dev/null */ ++ printf(_("swapon: unable to execute mkswap\n")); ++ exit(1); ++ } ++ if(x == -1) { ++ fprintf(stderr, _("swapon: fork failed\n")); ++ return 0; ++ } ++ waitpid(x, &y, 0); ++ sync(); ++ ++ return 1; ++} ++ ++static void ++shutdown_encrypted_swap(char *loop) ++{ ++ int fd; ++ struct stat statbuf; ++ struct loop_info64 loopinfo; ++ unsigned char b[32]; ++ FILE *f; ++ ++ if(stat(loop, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) { ++ if((fd = open(loop, O_RDWR)) >= 0) { ++ if(!loop_get_status64_ioctl(fd, &loopinfo)) { ++ /* ++ * Read 32 bytes of random data from kernel's random ++ * number generator and write that to loop device. ++ * This preserves some of kernel's random entropy ++ * to next activation of encrypted swap on this ++ * partition. ++ */ ++ if((f = fopen("/dev/urandom", "r")) != NULL) { ++ fread(&b[0], 32, 1, f); ++ fclose(f); ++ write(fd, &b[0], 32); ++ fsync(fd); ++ } ++ } ++ close(fd); ++ } ++ sync(); ++ if((fd = open(loop, O_RDONLY)) >= 0) { ++ if(!loop_get_status64_ioctl(fd, &loopinfo)) { ++ ioctl(fd, LOOP_CLR_FD, 0); ++ } ++ close(fd); ++ } ++ } ++} ++ ++static int + swapon_all(void) { + FILE *fp; + struct mntent *fstab; +@@ -317,6 +594,8 @@ + const char *special; + int skip = 0; + int pri = priority; ++ char *opt, *opts; ++ char *loop = NULL, *encryption = NULL; + + if (!streq(fstab->mnt_type, MNTTYPE_SWAP)) + continue; +@@ -325,23 +604,39 @@ + if (!special) + continue; + +- if (!is_in_proc_swaps(special) && +- (!ifexists || !access(special, R_OK))) { +- /* parse mount options; */ +- char *opt, *opts = strdup(fstab->mnt_opts); +- +- for (opt = strtok(opts, ","); opt != NULL; +- opt = strtok(NULL, ",")) { +- if (strncmp(opt, "pri=", 4) == 0) +- pri = atoi(opt+4); +- if (strcmp(opt, "noauto") == 0) +- skip = 1; ++ /* parse mount options; */ ++ opts = strdup(fstab->mnt_opts); ++ if (!opts) { ++ fprintf(stderr, "not enough memory"); ++ exit(1); ++ } ++ for (opt = strtok(opts, ","); opt != NULL; opt = strtok(NULL, ",")) { ++ if (strncmp(opt, "pri=", 4) == 0) ++ pri = atoi(opt+4); ++ if (strcmp(opt, "noauto") == 0) ++ skip = 1; ++ if (strncmp(opt, "loop=", 5) == 0) ++ loop = opt + 5; ++ if (strncmp(opt, "encryption=", 11) == 0) ++ encryption = opt + 11; ++ } ++ if(skip) ++ continue; ++ if (loop && encryption) { ++ if(!is_in_proc_swaps(loop) && (!ifexists || !access(special, R_OK))) { ++ if (!prepare_encrypted_swap(special, loop, encryption)) { ++ status |= -1; ++ continue; ++ } ++ status |= do_swapon(loop, pri); + } +- if (!skip) +- status |= do_swapon(special, pri); ++ continue; ++ } ++ if (!is_in_proc_swaps(special) && (!ifexists || !access(special, R_OK))) { ++ status |= do_swapon(special, pri); + } + } +- fclose(fp); ++ endmntent(fp); + + return status; + } +@@ -504,11 +799,49 @@ + exit(2); + } + while ((fstab = getmntent(fp)) != NULL) { +- if (streq(fstab->mnt_type, MNTTYPE_SWAP) && +- !is_in_proc_swaps(fstab->mnt_fsname)) +- do_swapoff(fstab->mnt_fsname, QUIET); ++ const char *orig_special = fstab->mnt_fsname; ++ const char *special; ++ int skip = 0; ++ char *opt, *opts; ++ char *loop = NULL, *encryption = NULL; ++ ++ if (!streq(fstab->mnt_type, MNTTYPE_SWAP)) ++ continue; ++ ++ special = mount_get_devname(orig_special); ++ if (!special) ++ continue; ++ ++ /* parse mount options; */ ++ opts = strdup(fstab->mnt_opts); ++ if (!opts) { ++ fprintf(stderr, "not enough memory"); ++ exit(1); ++ } ++ for (opt = strtok(opts, ","); opt != NULL; opt = strtok(NULL, ",")) { ++ if (strcmp(opt, "noauto") == 0) ++ skip = 1; ++ if (strncmp(opt, "loop=", 5) == 0) ++ loop = opt + 5; ++ if (strncmp(opt, "encryption=", 11) == 0) ++ encryption = opt + 11; ++ } ++ if (loop && encryption) { ++ if (!is_in_proc_swaps(loop)) { ++ if(skip) ++ continue; ++ do_swapoff(loop, QUIET); ++ } ++ shutdown_encrypted_swap(loop); ++ continue; ++ } ++ if(skip) ++ continue; ++ if (!is_in_proc_swaps(special)) { ++ do_swapoff(special, QUIET); ++ } + } +- fclose(fp); ++ endmntent(fp); + } + + return status; diff --git a/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff b/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff deleted file mode 100644 index 3fb223c..0000000 --- a/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff +++ /dev/null @@ -1,143 +0,0 @@ ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -523,6 +523,117 @@ set_path(const struct passwd* pw) - err (EXIT_FAILURE, _("failed to set the %s environment variable"), "PATH"); - } - -+/* Add or clear /sbin and /usr/sbin for the su command -+ used without `-'. */ -+ -+/* Set if /sbin is found in path. */ -+#define SBIN_MASK 0x01 -+/* Set if /usr/sbin is found in path. */ -+#define USBIN_MASK 0x02 -+ -+static char * -+addsbin (const char *const path) -+{ -+ unsigned char smask = 0; -+ char *ptr, *tmp, *cur, *ret = NULL; -+ size_t len; -+ -+ if (!path || *path == 0) -+ return NULL; -+ -+ tmp = xstrdup (path); -+ cur = tmp; -+ for (ptr = strsep (&cur, ":"); ptr != NULL; ptr = strsep (&cur, ":")) -+ { -+ if (!strcmp (ptr, "/sbin")) -+ smask |= SBIN_MASK; -+ if (!strcmp (ptr, "/usr/sbin")) -+ smask |= USBIN_MASK; -+ } -+ -+ if ((smask & (USBIN_MASK|SBIN_MASK)) == (USBIN_MASK|SBIN_MASK)) -+ { -+ free (tmp); -+ return NULL; -+ } -+ -+ len = strlen (path); -+ if (!(smask & USBIN_MASK)) -+ len += strlen ("/usr/sbin:"); -+ -+ if (!(smask & SBIN_MASK)) -+ len += strlen (":/sbin"); -+ -+ ret = xmalloc (len + 1); -+ strcpy (tmp, path); -+ -+ *ret = 0; -+ cur = tmp; -+ for (ptr = strsep (&cur, ":"); ptr; ptr = strsep (&cur, ":")) -+ { -+ if (!strcmp (ptr, ".")) -+ continue; -+ if (*ret) -+ strcat (ret, ":"); -+ if (!(smask & USBIN_MASK) && !strcmp (ptr, "/bin")) -+ { -+ strcat (ret, "/usr/sbin:"); -+ strcat (ret, ptr); -+ smask |= USBIN_MASK; -+ continue; -+ } -+ if (!(smask & SBIN_MASK) && !strcmp (ptr, "/usr/bin")) -+ { -+ strcat (ret, ptr); -+ strcat (ret, ":/sbin"); -+ smask |= SBIN_MASK; -+ continue; -+ } -+ strcat (ret, ptr); -+ } -+ free (tmp); -+ -+ if (!(smask & USBIN_MASK)) -+ strcat (ret, ":/usr/sbin"); -+ -+ if (!(smask & SBIN_MASK)) -+ strcat (ret, ":/sbin"); -+ -+ return ret; -+} -+ -+static char * -+clearsbin (const char *const path) -+{ -+ char *ptr, *tmp, *cur, *ret = NULL; -+ -+ if (!path || *path == 0) -+ return NULL; -+ -+ tmp = strdup (path); -+ if (!tmp) -+ return NULL; -+ -+ ret = xmalloc (strlen (path) + 1); -+ *ret = 0; -+ cur = tmp; -+ for (ptr = strsep (&cur, ":"); ptr; ptr = strsep (&cur, ":")) -+ { -+ if (!strcmp (ptr, "/sbin")) -+ continue; -+ if (!strcmp (ptr, "/usr/sbin")) -+ continue; -+ if (!strcmp (ptr, "/usr/local/sbin")) -+ continue; -+ if (*ret) -+ strcat (ret, ":"); -+ strcat (ret, ptr); -+ } -+ free (tmp); -+ -+ return ret; -+} -+ - /* Update `environ' for the new shell based on PW, with SHELL being - the value for the SHELL environment variable. */ - -@@ -560,6 +671,22 @@ modify_environment (const struct passwd *pw, const char *shell) - xsetenv ("SHELL", shell, 1); - if (getlogindefs_bool ("ALWAYS_SET_PATH", 0)) - set_path(pw); -+ else -+ { -+ char const *path = getenv ("PATH"); -+ char *new = NULL; -+ -+ if (pw->pw_uid) -+ new = clearsbin (path); -+ else -+ new = addsbin (path); -+ -+ if (new) -+ { -+ xsetenv ("PATH", new, 1); -+ free (new); -+ } -+ } - - if (pw->pw_uid) - { diff --git a/mkzimage_cmdline.c b/mkzimage_cmdline.c index ed27294..b341627 100644 --- a/mkzimage_cmdline.c +++ b/mkzimage_cmdline.c @@ -93,8 +93,6 @@ int main(int argc, char **argv) exit(1); } set = 1; - if (!activate) - activate = 1; break; case 'v': my_version(); @@ -162,9 +160,9 @@ int main(int argc, char **argv) if (clear) memset(s, 0x0, tmp - s); if (set) - snprintf((char*)s, tmp - s, "%s", string); + snprintf(s, tmp - s, "%s", string); } else { - fprintf(stdout, "cmd_line size:%td\n", tmp - s); + fprintf(stdout, "cmd_line size:%d\n", tmp - s); fprintf(stdout, "cmd_line: %s\n", s); fprintf(stdout, "active: %c\n", *active); } diff --git a/mount-nfs-nonreserved b/mount-nfs-nonreserved new file mode 100644 index 0000000..58be497 --- /dev/null +++ b/mount-nfs-nonreserved @@ -0,0 +1,61 @@ +diff -u util-linux-2.11z/mount/nfsmount.c-o util-linux-2.11z/mount/nfsmount.c +--- util-linux-2.11z/mount/nfsmount.c-o 2003-06-18 15:23:06.000000000 +0200 ++++ util-linux-2.11z/mount/nfsmount.c 2003-06-18 15:25:35.000000000 +0200 +@@ -215,7 +215,7 @@ + } status; + struct stat statbuf; + char *s; +- int port, mountport, proto, bg, soft, intr; ++ int port, mountport, proto, bg, soft, intr, nonreserved; + int posix, nocto, noac, nolock, broken_suid, noacl; + int retry, tcp; + int mountprog, mountvers, nfsprog, nfsvers; +@@ -320,6 +320,7 @@ + noac = 0; + retry = 10000; /* 10000 minutes ~ 1 week */ + tcp = 0; ++ nonreserved = 0; + + mountprog = MOUNTPROG; + mountvers = 0; +@@ -411,6 +412,8 @@ + soft = !val; + else if (!strcmp(opt, "intr")) + intr = val; ++ else if (!strcmp(opt, "reserved")) ++ nonreserved = !val; + else if (!strcmp(opt, "posix")) + posix = val; + else if (!strcmp(opt, "cto")) +@@ -445,7 +448,8 @@ + | (intr ? NFS_MOUNT_INTR : 0) + | (posix ? NFS_MOUNT_POSIX : 0) + | (nocto ? NFS_MOUNT_NOCTO : 0) +- | (noac ? NFS_MOUNT_NOAC : 0); ++ | (noac ? NFS_MOUNT_NOAC : 0) ++ | (nonreserved ? NFS_MOUNT_NONRESERVED : 0); + #if NFS_MOUNT_VERSION >= 2 + if (nfs_mount_version >= 2) + data.flags |= (tcp ? NFS_MOUNT_TCP : 0); +diff -u util-linux-2.11z/mount/nfs_mount4.h-o util-linux-2.11z/mount/nfs_mount4.h +--- util-linux-2.11z/mount/nfs_mount4.h-o 2003-06-18 15:23:06.000000000 +0200 ++++ util-linux-2.11z/mount/nfs_mount4.h 2003-06-18 15:26:04.000000000 +0200 +@@ -52,3 +52,4 @@ + #define NFS_MOUNT_NONLM 0x0200 /* 3 */ + #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */ + #define NFS_MOUNT_NOACL 0x0800 /* 4 */ ++#define NFS_MOUNT_NONRESERVED 0x1000 +--- util-linux-2.11z/mount/nfs.5-o 2003-06-18 07:10:54.000000000 -0700 ++++ util-linux-2.11z/mount/nfs.5 2003-06-18 07:14:05.000000000 -0700 +@@ -213,6 +213,11 @@ + NFS version 3. (On NFS version 2 filesystems this option has no effect.) + This option also deactivates the GETACL and SETACL remote procedure calls + which are otherwise used to manipulate ACLs. ++.TP 1.5i ++.I noreserved ++Don't use a reserved source port. This usually requires special options ++on the NFS server (insecure for linux knfsd), but allows more than 1024 ++mounts from a single IP address. + .P + All of the non-value options have corresponding nooption forms. + For example, nointr means don't allow file operations to be diff --git a/mount.8-acl.diff b/mount.8-acl.diff new file mode 100644 index 0000000..83402f6 --- /dev/null +++ b/mount.8-acl.diff @@ -0,0 +1,39 @@ +Index: mount/mount.8 +================================================================================ +--- mount/mount.8 ++++ mount/mount.8 +@@ -943,6 +943,17 @@ + Sync all data and metadata every + .I nrsec + seconds. The default value is 5 seconds. Zero means default. ++.RE ++.TP ++.BR user_xattr ++Enable Extended User Attributes. See the ++.BR attr (5) ++manual page. ++.TP ++.BR acl ++Enable POSIX Access Control Lists. See the ++.BR acl (5) ++manual page. + + .SH "Mount options for fat" + (Note: +@@ -1495,6 +1506,16 @@ + .I resizer + utility which can be obtained from + .IR ftp://ftp.namesys.com/pub/reiserfsprogs . ++.TP ++.BR user_xattr ++Enable Extended User Attributes. See the ++.BR attr (5) ++manual page. ++.TP ++.BR acl ++Enable POSIX Access Control Lists. See the ++.BR acl (5) ++manual page. + + .SH "Mount options for romfs" + None. diff --git a/nfsboot b/nfsboot new file mode 100644 index 0000000..62e284e --- /dev/null +++ b/nfsboot @@ -0,0 +1,50 @@ +#! /bin/sh +# Copyright (c) 2004 SuSE AG, Nuernberg, Germany. All rights reserved. +# +# Author: Mads Martin Joergensen +# +# /etc/init.d/nfsboot +# +# System startup script for service(s) needed with NFS +# +### BEGIN INIT INFO +# Provides: nfsboot +# Required-Start: $network $portmap +# Required-Stop: +# Default-Start: 3 5 +# Default-Stop: +# Description: Service(s) needed with NFS +### END INIT INFO + +SMNOTIFYBIN=/sbin/sm-notify +OPTIONS=" -q" +test -x $SMNOTIFYBIN || exit 5 + +. /etc/rc.status + +rc_reset + +case "$1" in + # It's a one shot binary notifying clients, so the below is + # ok in this special case. + start|restart|try-restart|reload|force-reload) + echo -n "Starting nfsboot (`/bin/basename $SMNOTIFYBIN`) " + $SMNOTIFYBIN $OPTIONS + rc_status -v + ;; + stop) + # we had rc_reset above, so we return 0 anyway + ;; + status) + # sm-notify is not a daemon, but a one-shot binary + # nothing to be checked, status is unknown + rc_failed 4 + rc_status -v + ;; + *) + echo "Usage: $0 {start|stop|restart|try-restart|reload|force-reload|status}" + exit 1 + ;; +esac +rc_exit + diff --git a/nologin.8 b/nologin.8 new file mode 100644 index 0000000..1aceb4a --- /dev/null +++ b/nologin.8 @@ -0,0 +1,63 @@ +.\" $OpenBSD: nologin.8,v 1.8 1999/06/04 02:45:19 aaron Exp $ +.\" $NetBSD: nologin.8,v 1.3 1995/03/18 14:59:09 cgd Exp $ +.\" +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)nologin.8 8.1 (Berkeley) 6/19/93 +.\" +.Dd February 15, 1997 +.Dt NOLOGIN 8 +.Os +.Sh NAME +.Nm nologin +.Nd politely refuse a login +.Sh SYNOPSIS +.Nm nologin +.Sh DESCRIPTION +.Nm +displays a message that an account is not available and +exits non-zero. +It is intended as a replacement shell field for accounts that +have been disabled. +.Pp +If the file +.Pa /etc/nologin.txt +exists, +.Nm +displays its contents to the user instead of the default message. +.Sh SEE ALSO +.Xr login 1 +.Sh HISTORY +The +.Nm +command appeared in +.Bx 4.4 . diff --git a/nologin.c b/nologin.c new file mode 100644 index 0000000..fc0ff26 --- /dev/null +++ b/nologin.c @@ -0,0 +1,58 @@ +/* $OpenBSD: nologin.c,v 1.2 1997/04/04 16:51:37 millert Exp $ */ + +/* + * Copyright (c) 1997, Jason Downs. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include + +/* Distinctly different from _PATH_NOLOGIN. */ +#define _PATH_NOLOGIN_TXT "/etc/nologin.txt" + +#define DEFAULT_MESG "This account is currently not available.\n" + +/*ARGSUSED*/ +int main(argc, argv) + int argc; + char *argv[]; +{ + int nfd, nrd; + char nbuf[128]; + + nfd = open(_PATH_NOLOGIN_TXT, O_RDONLY); + if (nfd < 0) { + write(STDOUT_FILENO, DEFAULT_MESG, strlen(DEFAULT_MESG)); + exit (1); + } + + while ((nrd = read(nfd, nbuf, sizeof(nbuf))) > 0) + write(STDOUT_FILENO, nbuf, nrd); + close (nfd); + + exit (1); +} diff --git a/pre_checkin.sh b/pre_checkin.sh deleted file mode 100644 index 5cd0052..0000000 --- a/pre_checkin.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -if test util-linux.spec -ot python-libmount.spec ; then - echo "util-linux.spec is older than python-libmount.spec. Please merge changes manually and call pre-checkin.sh again." - exit 1 -fi -if test util-linux.changes -ot python-libmount.changes ; then - echo "util-linux.changes is older than python-libmount.changes. Please merge changes manually and call pre-checkin.sh again." - exit 1 -fi - -if test util-linux.spec -ot util-linux-systemd.spec ; then - echo "util-linux.spec is older than util-linux-systemd.spec. Please merge changes manually and call pre-checkin.sh again." - exit 1 -fi -if test util-linux.changes -ot util-linux-systemd.changes ; then - echo "util-linux.changes is older than util-linux-systemd.changes. Please merge changes manually and call pre-checkin.sh again." - exit 1 -fi - -sed ' - s/spec file for package util-linux/spec file for package python-libmount/; - /^Name:/s/util-linux/python-libmount/; - s/WARNING: After editing this file please/WARNING: Never edit this file!!! Edit util-linux.spec and/ -' python-libmount.spec - -sed ' - s/spec file for package util-linux/spec file for package util-linux-systemd/; - /^Name:/s/util-linux/util-linux-systemd/; - s/WARNING: After editing this file please/WARNING: Never edit this file!!! Edit util-linux.spec and/ -' util-linux-systemd.spec - -cp -a util-linux.changes python-libmount.changes - -cp -a util-linux.changes util-linux-systemd.changes - -touch util-linux.spec util-linux.changes diff --git a/python-libmount.changes b/python-libmount.changes deleted file mode 100644 index ba8d776..0000000 --- a/python-libmount.changes +++ /dev/null @@ -1,4582 +0,0 @@ -------------------------------------------------------------------- -Mon Jul 3 12:38:36 UTC 2017 - schwab@suse.de - -- Make sure group tty is defined - -------------------------------------------------------------------- -Sun Jun 11 12:12:44 UTC 2017 - lnussel@suse.de - -- don't conflict with sysvinit-tools in Tumblweed anymore. Needed for Leap 15 - which wants to use a different release number scheme (lp150.x which produces - lower numbers than the conflict). - -------------------------------------------------------------------- -Thu Jun 8 21:21:12 UTC 2017 - sweet_f_a@gmx.de - -- Update to version 2.30: - * Many changes and improvements, most notably: - * The libblkid library has been improved for hybrid CDROM/DVD - media. - * The deprecated command tailf has been removed. Use "tail -f" - from coreutils. - * blkzone -- NEW COMMAND to run zone commands on block devices - that support Zoned Block Commands (ZBC) or Zoned-device ATA - Commands (ZAC). - * fincore -- NEW COMMAND to count pages of file contents in - core (memory). - * lsmem -- NEW COMMAND to list the ranges of available memory - with their online status. - * The command fallocate -- supports an "insert range" operation - now. - * The command "column -t|--table" has been modified to use - libsmartcols. It now provides nearly all of that library's - functionality from the command line. - * Security issues: - * hwclock - no longer makes any internal permission checks. The - System Administrator must set proper permissions to control - user access to the RTC. It is NOT recommended to use SUID. - * CVE-2016-2779 - This security issue is NOT FIXED yet. - * More details at: - https://www.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30-ReleaseNotes -- Drop upstreamed patch - arm64-lscpu-use-sysfs-for-table-access-if-available.patch -- Refreshed patch - util-linux-losetup-Add-support-for-setting-logical-blocksize.patch -- fix compiler warnings for mkzimage_cmdline - -------------------------------------------------------------------- -Thu Jun 8 16:28:41 UTC 2017 - msuchanek@suse.com - -- When when hypervisor_decode_sysfw fails continue with other - detection methods (bsc#1042991, bsc#1039360, bsc#1033718) - + util-linux-lscpu-cleanup-DMI-detection-return-codes.patch - -------------------------------------------------------------------- -Wed Apr 12 09:19:21 UTC 2017 - agraf@suse.com - -- Prefer sysfs exported SMBIOS3 tables in lscu (bsc#1033718) - + arm64-lscpu-use-sysfs-for-table-access-if-available.patch - -------------------------------------------------------------------- -Thu Apr 6 17:35:34 CEST 2017 - sbrabec@suse.com - -- To cover release numbers of both SLE12 SP3 and Leap 42.3, relax - release based conflict with bash-completion from 13.1 to 10. - -------------------------------------------------------------------- -Tue Apr 4 14:51:09 UTC 2017 - sweet_f_a@gmx.de - -- fix util-linux-losetup-Add-support-for-setting-logical-blocksize.patch - --logical-blocksize was behaving like --nooverlap - -------------------------------------------------------------------- -Fri Mar 17 17:18:28 CET 2017 - sbrabec@suse.com - -- Conflict with old systemd-presets-branding to ensure correct - preset migration (boo#1029775, bsc#1012850). - -------------------------------------------------------------------- -Thu Mar 16 22:44:12 CET 2017 - sbrabec@suse.com - -- Drop "codepage" fstab migration needed for SuSE Linux < 9.1 - (bsc#51950 (suse#36950)). - -------------------------------------------------------------------- -Tue Feb 28 17:27:58 CET 2017 - sbrabec@suse.com - -- Keep dependency on insserv and fillup for compatibilitiy reasons - in Leap 42.3. Too many poorly written packages depend on it. - (Marked as "sysv compatibility hack".) - -------------------------------------------------------------------- -Wed Feb 22 22:00:05 UTC 2017 - sweet_f_a@gmx.de - -- Update to version 2.29.2: - * su(1) security issue CVE-2017-2616 (bsc#1023041) - * minor bugfixes and enhancements - -------------------------------------------------------------------- -Fri Feb 10 10:40:23 UTC 2017 - fbui@suse.com - -- presets are managed by the branding presets package (bsc#1012850) - - The default activation state is defined by the branding preset - package. - - This also get rid of the only use of the rpm preset macros so we can - kill them. - -------------------------------------------------------------------- -Wed Feb 8 18:16:22 CET 2017 - sbrabec@suse.com - -- Merge SLE12 SP3 changes to make the package compatible with - Tumbleweed, SLE12 SP3 and Leap 42.3. -- Drop patch tests-script-race-on-force-only.patch from SLE12 SP3 - and Leap 42.3. Upstream has a different workaround. - https://github.com/karelzak/util-linux/issues/296 -- INCOMPATIBLE CHANGE for SLE12 SP3 and Leap 42.3: - losetup -L changes its meaning from SLE12 SP1&SP2 specific - --logical-blocksize to the upstream --nooverlap). - --logical-blocksize can be used only with long option - (bsc#966891). -- Include SLE12 + Leap 42 exclusive feature, implemented by - hare@suse.de: - * losetup: Add support for setting logical blocksizes - (bsc#931634, FATE#319010) - + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch - SLE12 & Leap 42 specific changes: - * Fix for SLE12: bsc#956540, SLE12 SP1: bsc#953691, Leap 42.1: - boo#954482, was obsoleted by the systemd update, and skipped. - * Remove --enable-ncurses that is intended to force non-wide - ncurses (boo#978993). - * Make release-dependent conflict with old sysvinit-tools SLE - specific, as it is required only for SLE 11 upgrade, - and breaks openSUSE staging builds (boo#994399). - * Obsolete these patches, now upstreamed: - * Drop upstreamed patches - (tests-script-race-on-force-only.patch, - util-linux-libmount-ignore-redundant-slashes.patch, - util-linux-sfdisk-show-pt-geometry-1.patch, - util-linux-sfdisk-show-pt-geometry-2.patch, - util-linux-sfdisk-show-pt-geometry-3.patch, - util-linux-libblkid-partition-loop.patch, - util-linux-libblkid-wipe-offset.patch, - util-linux-mount-reuse-loop-1.patch, - util-linux-mount-reuse-loop-2.patch, - util-linux-mount-reuse-loop-3.patch, - util-linux-mount-reuse-loop-4.patch, - util-linux-loop-reuse-01.patch, util-linux-loop-reuse-02.patch, - util-linux-loop-reuse-03.patch, util-linux-loop-reuse-04.patch, - util-linux-loop-reuse-05.patch, util-linux-loop-reuse-06.patch, - util-linux-loop-reuse-07.patch, util-linux-loop-reuse-08.patch, - util-linux-loop-reuse-09.patch, util-linux-loop-reuse-10.patch, - util-linux-loop-reuse-12.patch, util-linux-loop-reuse-13.patch, - util-linux-loop-reuse-14.patch, util-linux-loop-reuse-15.patch, - util-linux-loop-reuse-16.patch, util-linux-loop-reuse-17.patch, - util-linux-loop-reuse-18.patch, util-linux-loop-reuse-19.patch, - util-linux-loop-reuse-20.patch, - util-linux-libmount-cifs-is_mounted.patch). - * Refreshed patches - (make-sure-sbin-resp-usr-sbin-are-in-PATH.diff, - util-linux-losetup-Add-support-for-setting-logical-blocksize.patch). - -------------------------------------------------------------------- -Tue Feb 7 20:07:55 CET 2017 - sbrabec@suse.com - -- Update to version 2.29.1: - * lscpu: add aarch64 specific names - * lubmount: Disable disable ro/rw mtab checks (bsc#1012632) - * More details at: - https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29.1-ReleaseNotes - -------------------------------------------------------------------- -Tue Feb 7 18:31:04 CET 2017 - sbrabec@suse.com - -- Replace raw initscript by a systemd service doing the same thing. - Based on previous work of fcrozat@suse.com (FATE#321122). - -------------------------------------------------------------------- -Thu Jan 5 12:34:33 UTC 2017 - sweet_f_a@gmx.de - -- don't install bash-completions for uninstalled binaries (chfn, - chsh, newgrp, pg) -- for now remove procps dependency which is only needed for tests - because it pulls systemd - -------------------------------------------------------------------- -Thu Dec 15 09:26:01 UTC 2016 - fbui@suse.com - -- Replace pkgconfig(libsystemd-*) with pkgconfig(libsystemd) - - libsystemd-* libs were deprecated and are gone now. - -------------------------------------------------------------------- -Wed Dec 7 16:12:55 CET 2016 - sbrabec@suse.com - -- Remove no more supported --enable-libmount-force-mountinfo. - There is --enable-libmount-support-mtab, disabled by default, - exactly as we need. - -------------------------------------------------------------------- -Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de - -- Update to version 2.29 (FATE#322090) - * cal: possible to specify month by name (e.g. "cal January - 2017") and use relative placeholders (cal "+1 month") - * fdisk(8) allows to wipe newly created partitions; the feature - is possible to control by new command line option - --wipe-partitions[==auto|never|default]. - * findmnt --verify: the command scans /etc/fstab and tries to - verify the configuration. - * mount(8) now rejects requests to create another device and - mount filesystem for the same backing file. The command - `losetup --nooverlap` reuses loop device if already exists - for the same backing file. All the functionality calculate - with offset and sizelimit options of course, so it's fine to - have multiple regions (partitions) in the same image file and - mount all of them in the same time. The restriction is that - the regions should not overlap. - * lscpu supports the "drawer" topology for IBM S/390. - * sfdisk: Support for deprecated --show-pt-geometry (bsc#990531). - * libmount: various issues with cifs mount - (bsc#982331, bsc#987176). - * libblkid: Prevent infinite loop DoS while parsing DOS partition - tables (bsc#988361, CVE-2016-5011). - * More details at: - http://karelzak.blogspot.de/2016/10/util-linux-v229-whats-new.html - https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes -- refresh make-sure-sbin-resp-usr-sbin-are-in-PATH.diff - -------------------------------------------------------------------- -Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de - -- Update to version 2.28.2, bugfix release, see - https://www.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes - -------------------------------------------------------------------- -Thu Aug 11 13:24:34 UTC 2016 - sweet_f_a@gmx.de - -- Update to version 2.28.1, bugfix release, see - https://www.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes -- Remove util-linux-libblkid-wipe-offset.patch (upstream) -- use the new configure option --enable-libuuid-force-uuidd - instead of sed'ing configure.ac - -------------------------------------------------------------------- -Thu Aug 11 10:21:35 UTC 2016 - olaf@aepfle.de - -- Install klogconsole with read permissions (bnc#990837) - -------------------------------------------------------------------- -Mon Jul 11 07:29:18 UTC 2016 - dimstar@opensuse.org - -- BuildIgnore util-linux: it's part of VMInstall, hence part of - every package build. util-linux itself can be built without its - own presence though. Helps with some rare bootstrap issues (when - librtas changes soname for example). -- Drop usage of gpg-offline: this has long been migrated to a - source service that checks signatures on checkin already (osc - service lr source_validatory). - -------------------------------------------------------------------- -Mon Jun 13 11:37:33 UTC 2016 - dimstar@opensuse.org - -- Do not BuildRequires bash-completion: this is tempting, but it - pulls bash-completion and its entire dependency stack into Ring0, - which is inacceptable. Pass the correct path - (%{_datdir}/bash-completion/completions) via - --with-bashcompletiondir to configure. - -------------------------------------------------------------------- -Thu May 19 14:29:27 CEST 2016 - sbrabec@suse.com - -- blkid: Wipe corect area for probes with offset (bsc#976141, - util-linux-libblkid-wipe-offset.patch). - -------------------------------------------------------------------- -Tue Apr 26 18:24:40 CEST 2016 - sbrabec@suse.com - -- Remove incorrect --with-bashcompletiondir that breaks - bash-completion, use path in bash-completion.pc instead - (boo#977259). - -------------------------------------------------------------------- -Fri Apr 22 16:41:34 CEST 2016 - sbrabec@suse.com - -- Add librtas-devel to BuildRequires on Power platforms. Needed for - proper function of lscpu (bsc#975082). - -------------------------------------------------------------------- -Wed Apr 13 21:29:00 UTC 2016 - sweet_f_a@gmx.de - -- fix build for openSUSE >= 13.1 (inclusive SLE 12) -- drop build for openSUSE < 13.1 -- remove old build conditions: sysvinit_tools, enable_su and - enable_eject -- cosmetics: reorder configure options - -------------------------------------------------------------------- -Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de - -- Update to version 2.28 (bsc#974301): - * Many changes and improvements, most notably: - * Now cfdisk, sfdisk and fdisk wipe all filesystem and RAID - signatures when creating a new disk label in interactive - mode. See --wipe[=auto|never|always]. - * lsns -- this NEW COMMAND lists information about all - currently accessible namespaces or about the given namespace. - * The command sfdisk supports new operations --delete, - --move-data and --reorder. - * The command blkdiscard supports a new option --zeroout to - zero-fill rather than discard a specified area. - * The command cal supports a new option --span to span the date - when displaying multiple months. - * The command chrt supports the DEADLINE scheduling class and - the new options --sched-runtime --sched-period and - --sched-deadline. - * The command logger supports RFC 5424 structured data through - the new options --sd-id and --sd-param. - * The command losetup supports a new option --direct-io. - * The command lsblk allows to sort output by unprinted columns. - * The command mount applies the nofail mount option to - ENOMEDIUM errors. - * The commands nsenter and unshare support a new option - --cgroup for work with cgroups namespaces (CLONE_NEWCGROUP). - * The library libmount has been improved to properly detect - already mounted btrfs subvolumes (bsc#947494, bsc#972684). - * The library libsmartcols has been massively improved to print - table ranges, multi-line cells, table titles and to support - continuous printing. - * The package build system and code have been improved to be - more portable to non-Linux systems (BSD, OSX). - * The package does not provide fallback solutions for - openat-family functions anymore. - * The python binding for libsmartcols is available in separate - project at https://github.com/ignatenkobrain/python-smartcols - * Other bug fixes (bsc#970404, bsc#975082, FATE#318444). - * Security issue: CVE-2016-2779 is NOT FIXED yet. -- Remove old util-linux-noenc-suse.patch - -------------------------------------------------------------------- -Tue Dec 1 10:27:17 UTC 2015 - sweet_f_a@gmx.de - -- enable last binary - -------------------------------------------------------------------- -Wed Nov 11 15:46:46 UTC 2015 - sweet_f_a@gmx.de - -- Update to version 2.27.1, bugfix release, see - https://www.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes - (fixes bsc#950778, FATE#320552). - -------------------------------------------------------------------- -Wed Nov 11 11:25:25 UTC 2015 - schwab@suse.de - -- Change condition for known fail markers from test for armv6 and aarch64 - architecture to test for qemu user-space build - -------------------------------------------------------------------- -Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com - -- Update to version 2.27: - * Many changes and improvements, most notably: - * lsipc: new command - * unshare provides a new option --propagation= - * mount(8) supports read-only binds in one (not atomic) step by - "bind,ro". - * GNU readline support in fdisk and sfdisk. - * JSON support in libsmartcols and findmnt, losetup, lsblk, - lslocks, sfdisk and lsipc. - * script has been massively improved to be more robust and less - complex (bsc#888678, bsc#930236). - * sulogin supports locked root accounts by --force - (bsc#968733, bsc#963399). - * colors support by default. It is possible to change this - with --disable-colors-default. - * more information in cfdisk - * fdisk provides new commands 'F' and 'i' - * cal supports the new options --twelve and --months - * rtcwake supports a news option --list-modes and --date, no - support RTC_ALM_READ and RTC_ALM_SET fallbacks any more. - * Many fixes, most notably: - * fsck: now supports -r {fd} (bsc#923777, bsc#903738) - * Fix fsck -C {fd} parsing (bsc#923777, bsc#903738) - * better handling of multi-path devices - (bsc#880468, bsc#924994) - * flock: improve timeout handling (bsc#926945) - * lsblk: display mountpoint even for top-level device - (bsc#943415) - * colcrt: fix buffer overflow (bsc#949754, CVE-2015-5218) - -------------------------------------------------------------------- -Wed Aug 19 21:18:11 CEST 2015 - sbrabec@suse.com - -- Add licenses. - -------------------------------------------------------------------- -Tue Aug 4 20:31:55 CEST 2015 - sbrabec@suse.com - -- Add %systemd_preset_pre and %systemd_preset_posttrans that will - do one shot presetting of uuidd.service on upgrade. - (bnc#900935#c46, FATE#318949, FATE#317727). -- Remove one shot presetting hacks. - -------------------------------------------------------------------- -Mon May 25 16:26:01 UTC 2015 - crrodriguez@opensuse.org - -- Build with --enable-libmount-force-mountinfo the rationale is - identical to the following commit message --> http://bit.ly/1eqf5GO - The default behaviour is undesirable and fragile when using - systemd. - -------------------------------------------------------------------- -Fri May 1 11:30:09 UTC 2015 - sweet_f_a@gmx.de - -- Update to util-linux-2.26.2: - * many fixes, most notable for logger, *fdisks and mount - * (lib)mount, add support for MS_LAZYTIME -- disable libmount/lock test to avoid random timeouts -- socat is needed for logger tests - -------------------------------------------------------------------- -Fri Mar 13 15:57:56 UTC 2015 - sweet_f_a@gmx.de - -- Update to util-linux-2.26.1: - * cal(1): do not segfault when TERM is not defined or wrong - (bnc#903440) - * logger(1): major fixes and enhancements - * agetty(8): support /usr/lib/os-release too - * some more fixes, mostly minor ones, see ReleaseNotes -- re-enable fixed tests (fdisk/bsd, ppc64le) - -------------------------------------------------------------------- -Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz - -- Update to util-linux-2.26: - * based on the git master branch of util-linux, remove backported - patches (util-linux-libblkid-unsafe-chars.patch, - util-linux-libblkid-overflow.patch) - * zramctl(8): this NEW COMMAND allows to control /dev/zramN - devices - * agetty(8): supports new option --reload to force already - running agetty processes to reprint the /etc/issue file - * cfdisk(8), sfdisk(8) and fdisk(8): support sfdisk-compatible - scripts; it's possible to save your partitioning layout to text - files and (re)use it in all fdisks - * fdisk(8), sfdisk(8): support new command-line option "--output - " to specify output columns for --list or print commands, - do not abort when fdisk -l when device cannot be opened - [bnc#886790], [bnc#893712], [bnc#890351] - * nsenter(1): has been updated to work with the latest kernel - changes in user namespaces supports new command-line option - --preserve-credentials - * unshare(1): has been updated to work with the latest kernel - changes in user namespaces supports new command-line option - "--setgroups=" - * swapon(8): supports new command-line option "-o " with - the same semantics as -o for mount(8); it's now possible to - specify swap options on the command line by the same string as - in fstab - * fdformat(8): supports new command-line options --from and --to - to specify tracks and --repair for broken floppies - * getopt(1): has been updated to the latest version (originally - maintained outside of util-linux) and refactored - * ldattach(8): has been improved to support GSM0710 and intro - modem commands - * logger(1): supports new command-line option --id= to specify - PID (or another ID) allows to specify --rfc3164 or --rfc5424 - syslog protocols - * lscpu: recognizes Unisys s-Par as hypervisor (FATE#318231) - * libfdisk: the library is distributed as a shared library with a - stable API and a standard header file - * libmount: provides a new simple API to monitor mount-table - changes (including changes in userspace mount options) - * libmount: Fix mount point lookup (and mount -a) if the path - contains // (bsc#931955). -- Fix lack of I18N support in util-linux-systemd (mis-compilation). - -------------------------------------------------------------------- -Sun Feb 22 17:15:41 UTC 2015 - crrodriguez@opensuse.org - -- Build with FULL RELRO. - -------------------------------------------------------------------- -Tue Feb 10 15:26:55 UTC 2015 - sweet_f_a@gmx.de - -- define upstream source for klogconsole to remove patches - * klogconsole-quiet.patch - * klogconsole.diff -- remove openSUSE 13.1 specific eject permissions, did not worked - anyway since eject-fpie.patch was removed -- always call autoreconf, not only for splitted packages, skip - autopoint (gettext) - -------------------------------------------------------------------- -Fri Feb 6 17:01:02 UTC 2015 - dimstar@opensuse.org - -- Do not try to unregister an info file (ipc.info.gz) which we do - not own. Already in May 2011, we stopped registering it: "do not - register ipc.info.gz (not provided by this package)". - -------------------------------------------------------------------- -Wed Feb 4 19:08:43 CET 2015 - sbrabec@suse.cz - -- libblkid: care about unsafe chars and possible buffer overflow - in cache (CVE-2014-9114, util-linux-libblkid-unsafe-chars.patch, - util-linux-libblkid-overflow.patch, bsc#907434) - -------------------------------------------------------------------- -Thu Jan 29 14:13:41 UTC 2015 - sweet_f_a@gmx.de - -- Update to version 2.25.2: mostly minor fixes - (including boo#908742) -- re-enable utmpdump and ipcs tests for all archs - -------------------------------------------------------------------- -Thu Jan 15 17:15:47 UTC 2015 - schwab@linux-m68k.org - -- Use util-linux:/bin/logger as split-provide, - /usr/lib/systemd/system/fstrim.service didn't exist in 13.1 - -------------------------------------------------------------------- -Sat Jan 10 02:24:25 UTC 2015 - jengelh@inai.de - -- Remove pam_securetty.so from /etc/pam.d/login. By definition, - local logins are always secure. Remote logins actually use - /etc/pam.d/remote by way of `/bin/login -h` (such as rlogind). - This solves the problem that root logins are erroneously rejected - when using kmscon(8) or `machinectl login`, because they use - ptys. - -------------------------------------------------------------------- -Tue Nov 11 10:57:12 UTC 2014 - schwab@suse.de - -- Remove known fail marker for fdisk/bsd on ppc, ppc64, s390, s390x - -------------------------------------------------------------------- -Fri Oct 17 21:18:43 CEST 2014 - sbrabec@suse.cz - -- Fix mis-compilation of libuuid without uuidd support - (bnc#900935). -- Fix uuidd socket activation (bnc#900935). -- Remove obsolete sysvinit script for uuidd. -- Remove no more needed uuidd permissions stuff. -- Replace PreReq for obsolete pwdutils by names of binaries. -- Add fstrim service scripts and rcfstrim helper. - -------------------------------------------------------------------- -Mon Sep 8 21:04:34 CEST 2014 - sbrabec@suse.cz - -- Install runuser and runuser-l PAM file - (runuser.pamd, bnc#892079, bnc#894833). - -------------------------------------------------------------------- -Wed Sep 3 16:21:57 CEST 2014 - sbrabec@suse.cz - -- Update to version 2.25.1: - * bug fixes (removed util-linux-bash-completion-blockdev.patch, - util-linux-slash-in-format-string.patch) - * translation updates - * correct support for plurals - * gpt: use real sector size to set PTMAGIC_OFFSET - * gpt: add Microsoft Storage Spaces GUID - * libmount: use -t for type.subtype in helpers API - * erase all traces of the long-obsolete xiafs - -------------------------------------------------------------------- -Tue Aug 26 12:15:02 UTC 2014 - schwab@suse.de - -- Always mark ipcs/limits and misc/setarch as known failure - -------------------------------------------------------------------- -Tue Aug 26 07:43:16 UTC 2014 - pgajdos@suse.com - -- fix parsing of slash in the format string [bnc#889934] (internal) -- added patches: - * util-linux-slash-in-format-string.patch - -------------------------------------------------------------------- -Thu Aug 21 18:34:59 CEST 2014 - sbrabec@suse.cz - -- Remove hacks for format_spec_file and source_validator - (bnc#891152, bnc#891829). -- Use macro defined summary that passes both SLE and openSUSE - check-in QA scripts (invented by Ruediger Oertel). - -------------------------------------------------------------------- -Fri Aug 8 22:17:29 CEST 2014 - sbrabec@suse.cz - -- Update to version 2.25 - (using work of Ruediger Meier ): - * based on the git master branch of util-linux - * many fixes (including bnc#869355, bnc#871951 and - bnc#871698#c49) - * new Python binding sub-package for libmount: python-libmount - * new library: libsmartcols - * new commands: lslogins, setpriv - * add fstrim systemd timer - * better systemd integration - * DROPPED command: - * cytune: Upstream decided to remove tool untested for years - that supports this old hardware. -- Dropped patches included in the upstream: - (*git) Included with no changes - (+git) Included with improvements - (!git) Included with differences - * support-other-tty-lines-not-vconsole.patch (*b9c7390) - * agetty-fooled-on-serial-line-due-plymouth.patch, - * sulogin-fooled-on-tty-line-due-plymouth.patch (*bb280f7) - * agetty-on-s390-on-dev-3270-tty1-line.patch (*f2bcda5) - * sulogin-does-not-find-any-console.patch (*624b204) - * util-linux-setarch-uname26.patch (*f6eb160) - * util-linux-ng-2.16-squashfs3-detect.patch (*11402f5) - * util-linux-lscpu-improve-hypervisor-detection.patch - (!b774473, b32488c, 5bd31c6, 0f0c558, 96ce475) - WARNING, INCOMPATIBLE CHANGE: "lscpu -p" no more reports - hypervisor, as it breaks standard behavior. Use standard output - instead! (FATE#310255) - * blkid-stop-scanning-on-I-O-error.patch (+296d96e) - * blkid-convert-superblocks-to-new-calling-convention.patch - (+37f4060) - * util-linux-libblkid-ext-probe.patch (*a1ca32f) - * util-linux-hwclock-drift-check.patch (*f196fd1) - * util-linux-hwclock-adjtime-check.patch (*db8fc5f) -- Dropped obsolete patch: - * util-linux-2.23.1-eject-fpie.patch (eject is no more SUID) - * util-linux-2.24-fdisk_remove_bogus_warnings.patch - (upstream fixed it in a different way) - * util-linux-HACK-boot.localfs.diff - (MOUNT_PRINT_SOURCE is no more referenced) -- Ported and renamed: - * util-linux-2.23.1-noenc-suse.diff - -> util-linux-noenc-suse.patch -- Split spec file to three stages: - * util-linux.spec: Everything that do not need python or systemd. - * util-linux-systemd.spec: Stuff that needs systemd: - util-linux-systemd and uuidd - NOTE: Not building systemd-less variants of utilities. - * python-libmount.spec: Just python-libmount -- Move bash-completion files to correct packages. -- Add patch util-linux-bash-completion-blockdev.patch. -- Add hacks to prevent damaging of spec files by format_spec_file - (bnc#891152, also edited util-linux-rpmlintrc). - -------------------------------------------------------------------- -Sat Jul 26 11:44:57 UTC 2014 - dimstar@opensuse.org - -- Really fix devel-static requires (libblkid-devel-static). - -------------------------------------------------------------------- -Sat Jul 26 09:39:30 UTC 2014 - coolo@suse.com - -- fix requires of devel-static packages - -------------------------------------------------------------------- -Thu Jul 24 18:45:53 CEST 2014 - dsterba@suse.cz - -- enable build of libmount-devel-static, libuuid-devel-static and - libblkid-devel-static - -------------------------------------------------------------------- -Tue May 27 21:17:40 UTC 2014 - sweet_f_a@gmx.de - -- use nologin from upstream (was added in 2.24) -- remove unknown configure options -- remove unused and outdated suse READMEs -- require bc for checks - -------------------------------------------------------------------- -Fri May 16 15:10:53 UTC 2014 - sweet_f_a@gmx.de - -- Prevent excessive clock drift calculations (bnc#871698, - util-linux-prevent-excessive-clock-drift-calculations.patch), - committed by sbrabec@suse.cz - -------------------------------------------------------------------- -Thu May 8 08:15:04 UTC 2014 - werner@suse.de - -- Modify patch support-other-tty-lines-not-vconsole.patch to - make it work on virtual console -- Modify patch agetty-on-s390-on-dev-3270-tty1-line.patch - to add the missed 3270 support upstream - -------------------------------------------------------------------- -Wed May 7 14:12:32 UTC 2014 - werner@suse.de - -- Add patch support-other-tty-lines-not-vconsole.patch - to be able to support console lines like xvc and hvc - -------------------------------------------------------------------- -Thu Apr 24 11:33:36 UTC 2014 - sweet_f_a@gmx.de - -- Update to util-linux-2.24.2: - addpart: - * minor man page improvements - blockdev: - * Some minor corrections to the manual - build-sys: - * don't connect _DEPENDENCIES and _LIBADD - * fix .h.in usage in libblkid and libmount - * libmount/python/__init__.py is always a dist file - chcpu: - * cleanup return codes - * cleanup stdout/stderr usage - delpart: - * minor man page improvements - dmesg: - * -w output not line-buffered - * don't report EPIPE - docs: - * update AUTHORS file - fallocate: - * Clarify that space can also be deallocated - fdformat: - * Some minor change to the manual - fdisk: - * don't colorize "foo " prefixes - flock: - * use nfs4 fallback on EBADF too - fsck: - * Some typographical corrections to the manual - fsck.minix: - * A few typographical corrections to the manual - fstrim: - * add hint to man page - getopt: - * getopt.1 The usual doc dir is /usr/share/doc, not .../docs - hwclock: - * fix possible hang and other set_hardware_clock_exact() issues - include/closestream: - * don't wipe errno on EPIPE - ipcs: - * cleanup jumplabel stlyes - * fix ipc_msg_get_info fallback case - * fix ipc_sem_get_info fallback case - * fix ipc_shm_get_info fallback case - * fix memleak in ipc_*_get_info functions - isosize: - * A few typographical changes to the manual - last: - * fix minor typos in the man page - lib/sysfs: - * make dirent d_type usage more robust - libblkid: - * add extra checks to XFS prober - libfdisk: - * fix logical partition reorder command - * make qsort_r() optional - * properly implement read-only mode - libmount: - * FS id and parent ID could be zero - * accept (deleted) path suffix in mountinfo file - * initialize *root to NULL in mnt_table_get_root_fs - login: - * fix minor typos in the man page - losetup: - * wait for udev - lscpu: - * cleanup, use _PATH_SYS_CPU/NODE - * don't abort if cache size is unknown - * don't assume filesystem supports d_type when searching for NUMA nodes - * read_hypervisor_dmi only fallback to memory scan on x86/x86_64 - mkfs: - * Some typographical changes to the manual - mkfs.bfs: - * One typographical correction to the manual - mkfs.cramfs: - * Some typographical corrections to the manual - mkfs.minix: - * Some typographical changes in the manual - mkswap: - * Some minor typographical corrections to the manual - more: - * improve formatting and wording of man page and help text - mount: - * apply "nofail" to MNT_ERR_NOSOURCE libmount error - * fix --all and nofail return code - * mount.8 Some typographical and prefix corrections to the manual - * remove obsolete and confusing statement from mount.8 - * update mount.8 about barrier mount options defaults - nologin: - * minor man page improvements - nsenter: - * fix set{gid,uid} order,drop supplementary groups - partx: - * Improve the typesetting of the manual - * make dirent d_type usage more robust - po: - * merge changes - * update cs.po (from translationproject.org) - * update da.po (from translationproject.org) - * update de.po (from translationproject.org) - raw: - * Improve the typesetting of the manual - renice: - * correct max priority in renice man page - runuser: - * fix minor typos in the man page - script: - * Also flush writes to timing file. - * time from end of read() call partially fixes #58 - scriptreplay: - * no need to skip first time value or last bytes fixes #58 - setarch: - * Fix ppc64le architectures - setpriv: - * Fix --apparmor-profile - su: - * don't use kill(0, ...) when propagate signal - * fix minor typos in the man page - sulogin: - * minor man page improvements - swaplabel: - * Improve the typesetting of the manual - * wrong version number in check - switch_root: - * make dirent d_type usage more robust - * verify initramfs by f_type, not devno - tests: - * add fdisk 'f' command MBR test - * add lscpu dump for ppc cpu with no cache size - * clean up backport - * cleanup, remove unused lscpu output - * update Py parse mountinfo test - * update libmount tabdiff tests - * use old output format - umount: - * fix typo in usage - * more robust success message for --all - unshare: - * include libmount.h to provide missing MS_* defines - utmpdump: - * minor man page improvements - vipw: - * minor man page improvements -- remove tty3270-on-serial-line-of-s390.patch (was already upstream - since 2.24.1) -- remove barrier_documentation.patch (applied upstream) -- rebase blkid-convert-superblocks-to-new-calling-convention.patch - -------------------------------------------------------------------- -Thu Apr 17 22:43:31 CEST 2014 - sbrabec@suse.cz - -- Enable socket activation needed by systemd service (bnc#872807). - -------------------------------------------------------------------- -Fri Apr 11 16:45:03 CEST 2014 - sbrabec@suse.cz - -- libblkid: Drop the broken ext2/ext3/ext4 discrimination logic - (util-linux-libblkid-ext-probe.patch, bnc#864703). - -------------------------------------------------------------------- -Fri Apr 11 16:27:11 CEST 2014 - hare@suse.de - -- Abort blkid probing on I/O errors (bnc#859062, - blkid-stop-scanning-on-I-O-error.patch, - blkid-convert-superblocks-to-new-calling-convention.patch, - http://www.spinics.net/lists/util-linux-ng/msg08976.html) - -------------------------------------------------------------------- -Tue Apr 1 18:49:26 UTC 2014 - sweet_f_a@gmx.de - -- remove unnecessarily added patches from SLE11: - * util-linux-update-default-commit-interval.patch, openSUSE has - never changed the default and neither will SLE12 - * sfdisk-warn-about-2TB-limit.patch, fixed by upstream years ago - * umount-avoid-readlink.patch, this patch only affects unused - code and the used code does not have this bug -- edit util-linux-lscpu-improve-hypervisor-detection.patch to not - change the default behaviour of "lscpu -p" as documented in it's - man page. Now this patch only affects the summary output. - -------------------------------------------------------------------- -Mon Mar 17 22:36:58 CET 2014 - sbrabec@suse.cz - -- Merge fixes and features from SLE11 (bnc#831868): - * Detect squashfs version <= 3 as squashfs3 and version >= 4 as - squashfs. (mszeredi@suse.cz, - util-linux-ng-2.16-squashfs3-detect.patch, bnc#666893) - * add sfdisk-warn-about-2TB-limit.patch (puzel@novell.com, - bnc#495657) - * Document barrier option in mount.8 (jack@suse.cz, - hvogel@suse.de, - util-linux-ng-2.19.1-barrier_documentation.patch, bnc#489740) - * lscpu: improve hypervisor detection (puzel@novell.com, - fate#310255) - - util-linux-lscpu-improve-hypervisor-detection.patch - * umount: avoid calling readlink on mountpoints if not necessary - - add: umount-avoid-readlink.patch (puzel@suse.com, bnc#794529) - * fix file conflict between util-linux and s390-32 - (puzel@suse.com, bnc#805684) - * util-linux-update-default-commit-interval.patch: - mount(8): update default commit interval (puzel@suse.com, - bnc#809480) - * Obsolete no more packaged uuid-runtime. -- Add uname26 (util-linux-setarch-uname26.patch, FATE#313476). - -------------------------------------------------------------------- -Thu Mar 6 09:43:34 UTC 2014 - werner@suse.de - -- Modify the patches - agetty-fooled-on-serial-line-due-plymouth.patch - sulogin-fooled-on-tty-line-due-plymouth.patch - to be able to disable plymouth if not already terminated due to - a hanging network service (bnc#866860) - -------------------------------------------------------------------- -Sun Feb 9 21:20:31 UTC 2014 - andreas.stieger@gmx.de - -- util-linux 2.24.1 -- agetty: - * support the special terminal on first serial line on a S/390 -- blkdiscard: - * BLKSSZGET fills in an int, not a uint64 -- blkid: - * escape quotes in the output - * simple typo -- blockdev: - * don't use HDIO_GETGEO -- build-sys: - * add --with-smack to config-gen.d - * fstrim depends on libmount -- chsh, chfn: - * add info about non-local support to the man pages -- dmesg: - * fix --raw zero timestamp for kmsg -- docs: - * add patching process to howto-contribute.txt - * update AUTHORS file - * update links to http //git.kernel.org/ web repository views - -fdisk: - * don't care about partition type - * fix printf stuff - * fix usage(), -l [] -- flock: - * Change the 'exit status' man page section to make more sense -- fsck: - * add ext4 to list of filesystems with progress bars in fsck man page -- fstrim: - * add --all to discard all filesystem - * cleanup usage() -- lib/path: - * add path_strdup() -- libblkid: - * (nilfs2) check also backup superblock - * detect alone PMBR - * fix memory leak in blkid_parse_tag_string() - * fix swap-area version -- libfdisk: - * (dos) be more verbose when change bootable flag - * (dos) fix free part counter - * (dos) warn on type 0 - * (gpt) add /home GUID - * (gpt) improve and cleanup recovery code - * (gpt) recover from corrupted primary/backup PT - * (sgi) generate partname according to partition position - * (sun) fix end sectors with +1 error -- libmount: - * add efivarfs to the list of pseudo filesystems - * add mnt_tag_is_valid() - * cleanup fix_optstr() regards to selinux and smack - * fix typo in smack path - * remove smackfs* option when SMACK not enabled -- lsblk: - * fix -D segfault -- lscpu: - * sort NUMA nodes to keep output human readable - * support discontinuous NUMA nodes - * support non sequentially numbering of CPUs -- man: - * Syntax and spelling fixes -- mkfs.minix: - * fix fscanf() format string [coverity scan] -- mkswap: - * fix compiler warning [-Wunused-variable] - * remove cruft from the man page -- mount: - * add note about "noauto" to --all description - * correct mount man page default iso9660 permission - * fix man mount page type - * improve -s man mage info - * make NAME=value tags usable for non-root - * mount.8 fix grammar - * update man page ext3/4 mount options -- partx: - * fix --update ranges and out of order tables -- po: - * merge changes - * update da.po (from translationproject.org) - * update de.po (from translationproject.org) - * update pt_BR.po (from translationproject.org) - * update zh_CN.po (from translationproject.org) -- pylibmount: - * correctly import from pylibmount.so - * import directly from pylibmount in tests - * remove unncessary subdirectory -- script: - * don't call TIOCGWINSZ in signal handler - * restore errno in signal handler - * use poll() rather then O_NONBLOCK -- setpriv: - * simplify usage() -- setterm: - * fix -dump man page info -- sulogin: - * use dirent->d_type when scans /dev -- taskset: - * fix PERMISSIONS section of taskset man page -- tests: - * update blkid swap tests - * update build-sys tests - * update lscpu tests -- textual: - * small inprovements to usage and man page of fstrim -- umount: - * fix umount by tag for non-roots -- unshare: - * add more hints about mount namespaces to the man page -- wipefs: - * call BLKRRPART when erase partition table -- removed patches: - * blkdiscard-BLKSSZGET-fills-in-an-int.patch, applied upstream -- modified patches: - * tty3270-on-serial-line-of-s390.patch, one hunk applied - upstream - ------------------------------------------------------------------- -Fri Feb 7 15:59:20 UTC 2014 - werner@suse.de - -- Add patch sulogin-does-not-find-any-console.patch to enable sulogin - to find suitable console device even if first is not usable (bnc#862078) - -------------------------------------------------------------------- -Thu Feb 6 10:03:30 UTC 2014 - werner@suse.de - -- Avoid that hanging plymouth locks terminal lines that is - add patch sulogin-fooled-on-tty-line-due-plymouth.patch and - modify patch agetty-fooled-on-serial-line-due-plymouth.patch - to remove any lock which had been left over. - -------------------------------------------------------------------- -Tue Feb 4 10:24:02 UTC 2014 - werner@suse.de - -- Modify patch agetty-on-s390-on-dev--3270-tty1-line.patch and - patch tty3270-on-serial-line-of-s390.patch to handle 3270 - terminals -- Really do not verify /usr/bin/eject - -------------------------------------------------------------------- -Mon Feb 3 16:16:36 UTC 2014 - werner@suse.de - -- Add patch agetty-on-s390-on-dev--3270-tty1-line.patch - to let agetty detect /dev/3270/tty1 as device not as baud rate - -------------------------------------------------------------------- -Tue Jan 28 09:37:57 UTC 2014 - speilicke@suse.com - -- Don't verify /usr/bin/eject, it lost the SUID bit and was dropped - from /etc/permissions (bnc#824406) - -------------------------------------------------------------------- -Thu Jan 23 12:40:06 UTC 2014 - werner@suse.de - -- Change patch agetty-fooled-on-serial-line-due-plymouth.patch - to sleep instead of sending breaks to terminal (bnc#774126). - -------------------------------------------------------------------- -Mon Jan 13 10:45:54 CET 2014 - fcrozat@suse.com - -- Ensure localstatedir value used by configure is /run (changed to that - value upstream since 2012). - -------------------------------------------------------------------- -Fri Jan 10 13:08:45 UTC 2014 - werner@suse.de - -- Add patch - agetty-fooled-on-serial-line-due-plymouth.patch - even with TTYReset=no it seems with systemd or plymouth the termios - flags become changed from under the first agetty on a serial system - console as the flags are locked (bnc#774126). - -------------------------------------------------------------------- -Tue Dec 10 16:10:27 UTC 2013 - sweet_f_a@gmx.de - -- Update to util-linux-2.24 - + Release highlights (2.24) - fdisk(8): - * the code has been completely refactored and moved to libfdisk - (the library does not have a stable API yet) - * user interface has been unified for all label types and it - supports colors - * GPT disk UUID, partition UUID and partition name modification - is supported now - pylibmount: - * this new library provides PYTHON BINDINGS for libmount; - use --with-python[=2|3] to enable the bindings - last(1) and lastb(1): - * the NEW IMPLEMENTATION has been merged from sysvinit to - util-linux and extended; now it supports command line options - --present, --since, and --time-format - * use --enable-deprecated-last to enable the old util-linux - last(1) implementation - swapon(8): - * the option --discard= and fstab mount option discard= allow - to explicitly specify 'pages' or 'once' discard policy. If no - policy is selected, the default behavior is to enable both. - See swapon.8 man page for more details. - libblkid and blkid(8): - * supports LOGUUID= for external logs (e.g. extN and XFS) - * generates a pseudo PARTUUID= for MBR partitions (based on MBR - Id, Linux kernel supports the same concept for root= command - line option) - agetty(8): - * supportes new issue file \S escape code to read information - from /etc/os-release - * the option -L allows to completely control CLOCAL flag - dmesg(1): - * supports new command line option --time-format to specify - time format - * supports new iso-8601 time format - hexdump(1): - * supports long options now - wall(1): - * the command is compatible with sysvinit implementation now - logger(1): - * supports new command line option --prio-prefix when logging - stdin - lscpu(1): - * allows to detect more hypervisor types and provides info - about Max and Min CPU Mhz - unshare(8): - * supports new command line options --fork and --mount-proc for - pid namespaces - wipefs(8): - * now wipes superblocks with incorrect checksums too - * supports new command line option --backup to backup erased - data to $HOME/wipefs--.bak - nologin(8): - * this command has been merged into util-linux, the command - politely refuses a login. -- Removed following patches now upstream - * eject-scsi-check-host_status-and-driver_status.patch - * more-fix-buffer-overflow.patch - * more-check-for-buffer-size-when-write-multibyte-char.patch - * more-guarantee-space-for-multibyte.patch -- Removed following patch because now pkg-config does that - * fdisk-tinfo.patch -- Refreshed following patches with updating version string - * util-linux-2.23.1-fdisk_remove_bogus_warnings.patch -- Added enable_last condition in case we don't want to use the last - binary from sysvinit-tools in future -- Upstream moved getopt examples from datadir to docdir but we keep - the old location because we would need to fix the manpage first. - -------------------------------------------------------------------- -Fri Nov 29 13:46:21 UTC 2013 - werner@suse.de - -- Add patch - tty3270-on-serial-line-of-s390.patch - to better support the first and second serial line on s390/x - -------------------------------------------------------------------- -Sun Nov 3 12:53:34 UTC 2013 - schwab@linux-m68k.org - -- blkdiscard-BLKSSZGET-fills-in-an-int.patch: Fix type mismatch in - blkdiscard - -------------------------------------------------------------------- -Fri Oct 25 18:52:01 CEST 2013 - sbrabec@suse.cz - -- Drop SUID flag for eject (bnc#824406). - -------------------------------------------------------------------- -Wed Oct 9 10:00:55 UTC 2013 - schwab@suse.de - -- No *fdisk on m68k - -------------------------------------------------------------------- -Wed Oct 2 18:55:22 CEST 2013 - sbrabec@suse.cz - -- Safely migrate su config files from coreutils to util-linux - (bnc#814626#c18). - -------------------------------------------------------------------- -Fri Sep 27 21:58:03 UTC 2013 - mgorse@suse.com - -- Add more-check-for-buffer-size-when-write-multibyte-char.patch and - more-guarantee-space-for-multibyte.patch -- check for buffer space with - multi-byte chars (BNC#829720). - -------------------------------------------------------------------- -Fri Sep 27 16:58:40 UTC 2013 - mgorse@suse.com - -- Add more-fix-buffer-overflow.patch (bnc#829720). - -------------------------------------------------------------------- -Fri Sep 13 07:06:19 UTC 2013 - werner@suse.de - -- Avoid build require gpg-offline twice - -------------------------------------------------------------------- -Wed Sep 11 20:54:24 CEST 2013 - sbrabec@suse.cz - -- Update to version 2.23.2: - nsenter(1): - * this NEW COMMAND provides command line interface to setns() - Linux syscall and allows to run program with namespaces of - other processes - unshare(1): - * supports new PID and USER namespaces - fdisk(8): - * provides experimental support for GUID Partition Table (GPT), - the implementation is still not complete and some (unimportant) - features are missing. - * ~50% of fdisk code has been refactored, this task is going to - be complete in the next release. The goal is to have libfdisk - shared between all fdisks. - partx(8): - * supports new "update" command (implemented by - BLKPG_RESIZE_PARTITION ioctl) - mount(8): - * supports new userspace mount option x-mount.mkdir[=] to - create mountpoints on demand - * the support for propagation flags has been improved, now the - flags could be specified in /etc/fstab and used together with - regular mount options. It's also possible to specify more - propagation flags together. This EXPERIMENTAL feature is - implemented by additional mount(2) syscalls, because Linux does - not allow to use propagation flags with another options or more - flags together. - umount(8): - * supports new command line option --recursive to recursively - unmount all sub-mounts for the specified mountpoint * supports - new command line option --all-targets to unmount all - mountpoints in the current namespace for the specified - filesystem * the options --recursive and --all-targets could be - used together - dmesg(1): - * supports new command line options --color, --human and - --nopager, the --human option enables relative times, colors and - pager support. - su(1): - * supports new command line options --group and --supp-group to - specify primary and supplementary groups - chfn(1) and chsh(1): - * the commands could be linked with libuser to support non-local - accounts modification (e.g. LDAP, etc). - kill(1): - * the command has been improved to be compatible with procps - version, the procps version is deprecated now, the util-linux - version is enabled by default. - blkdiscard(8): - * this NEW COMMAND discard sectors on a device (for example on - SSD disks) - sulogin(8): - * provides multi-console feature from SysVinit - findmnt(8): - * provides new columns FREQ, PASSNO, ID, OPT-FIELDS, PROPAGATION - lslocks(8): - * provides new column BLOCKER and detects blocked locks - lsblk(8): - * supports new command line option --scsi and new columns HCTL, - TRANsport VENDOR and REVision - swapon(8) and losetup(8): - * the commands prints basic overview by default if no option - specified - column(1): - * supports new command line option --output-separator to specify - table output delimiter - rename(1): - * supports new command line option --symlink to rename symlink - target - hwclock(8): - * supports new command line option --compare to periodically - compare the Hardware Clock to the System Time (based on - adjtimex -c) - ipcs(1): - * supports new command line options --bytes and --human - wipefs(1): - * supports new command line option --force to force erase on used - devices -- Removed upstreamed patches (mkfs.bfs_cleanup_64bit.patch-Patch, - mkfs.bfs_cleanup_endian.patch) - -------------------------------------------------------------------- -Mon Jul 1 13:43:23 UTC 2013 - mail@bernhard-voelker.de - -- Correct condition for Conflicts of sysvinit-tools. - -------------------------------------------------------------------- -Mon Jul 1 07:08:46 UTC 2013 - werner@suse.de - -- Correct version in source URL path. - -------------------------------------------------------------------- -Fri Jun 28 17:42:14 CEST 2013 - sbrabec@suse.cz - -- Fix Provides and Obsoletes of eject. -- Conflict with old coreutils and sysvinit-tools with conflicting - files to guarantee seamless upgrade. -- Remove Provides and Obsoletes of packages that do not exist since - SuSE Linux 8. -- Include upstreamed patch from SUSE eject package: - Check eject host_status and driver_status when using SG_IO - (eject-scsi-check-host_status-and-driver_status.patch, - bnc#358033). - -------------------------------------------------------------------- -Wed Jun 19 10:58:17 UTC 2013 - coolo@suse.com - -- rely on systemd-rpm-macros instead of the full thing - -------------------------------------------------------------------- -Wed Jun 12 21:02:28 UTC 2013 - mail@bernhard-voelker.de - -- util-linux.spec: remove previously added "moving-su-trickery" again - as a su-less coreutils packet is in Base:Build and Factory now. - -------------------------------------------------------------------- -Fri Jun 7 00:13:25 UTC 2013 - mail@bernhard-voelker.de - -- util-linux.spec: work around su(1) PAM problems based on su(1) - being provided by both the coreutils and the util-linux package. - Fix macro typo in %post and %verifyscript sections related to su(1): - s/sysvinit_tools/enable_su/ - -------------------------------------------------------------------- -Thu Jun 6 08:27:43 UTC 2013 - werner@suse.de - -- Add make-sure-sbin-resp-usr-sbin-are-in-PATH.diff, that is include - the old "let `su' handle /sbin and /usr/sbin in path" -- Provide the new eject utility to avoid file conflict with old - eject package - -------------------------------------------------------------------- -Wed Jun 5 12:30:45 UTC 2013 - werner@suse.de - -- Update to util-linux-2.23.1 - + Release highlights (2.22) - su(1): - * has been merged from coreutils into util-linux - * utils-linux version uses /etc/pam.d/su-l PAM config file for --login - (e.g. "su -") session. - sulogin(8): - * has been merged from sysvinit into util-linux - utmpdump(1): - * has been merged from sysvinit into util-linux - eject(1): - * has been merged from inactive upstream from sf.net and Fedora into util-linux - * supports new options --manualeject, --force and --no-partitions-unmount - lslocks(1) - * this NEW COMMAND prints local system locks and it's replacement to very - long time unmaintained lslk(1) - wdctl(8): - * this NEW COMMAND shows hardware watchdog status - libuuid: - * does NOT EXECUTE uuidd on demand, the daemon has to be started by - init scripts / systemd - uuidd: - * supports socket activation (for systemd) - * supports new options -no-fork, --no-pid and --socket-activation - + Release highlights (2.23) - blkdiscard(8): - * this NEW COMMAND discard sectors on a device (for example on SSD disks) - sulogin(8): - * provides multi-console feature from SysVinit -- Removed following patches now upstream - * 0001-Test-for-secure_getenv-too.patch - * 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch - * add-canonicalize_path_restricted.patch - * fdiskbsdlabel.patch - * libmount-add-MNT_ERR_LOOPDEV.patch - * libmount-add-special-MNT_ERR-codes.patch - * libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch - * login-close-tty-before-vhangup.patch - * mount-new-add-loopdev-specific-error-message.patch - * mount-new-allow-sloppy-for-non-root.patch - * mount-new-improve-error-messages.patch - * mount-new-use-MNT_ERR-for-error-messages.patch - * mount-sanitize-paths-from-non-root-users.patch - * util-linux-2.21.2-noenc.diff - * umount-sanitize-paths-from-non-root-users.patch -- Removed following patch which otherwise cause to break build - * util-linux-2.20-libmount-deps.patch -- Refreshed following patches with updating version string - * util-linux-2.23.1-fdisk_remove_bogus_warnings.patch - * util-linux-2.23.1-noenc-suse.diff -- Add util-linux-2.23.1-eject-fpie.patch to compile and link eject - with PIE - -------------------------------------------------------------------- -Wed May 29 11:45:04 UTC 2013 - ihno@suse.com - -- fixing mkfs.bfs to make it 64bit and endian clean. - adding the patches mkfs.bfs_cleanup_64bit.patch and - mkfs.bfs_cleanup_endian.patch - -------------------------------------------------------------------- -Sun Mar 17 20:39:47 UTC 2013 - jengelh@inai.de - -- Split "which", "time" and "adjtimex" off util-linux - -------------------------------------------------------------------- -Sat Feb 16 17:48:29 UTC 2013 - schwab@suse.de - -- fdiskbsdlabel.patch: - Fix fdisk compilation on aarch64 - -------------------------------------------------------------------- -Tue Feb 5 14:32:49 UTC 2013 - crrodriguez@opensuse.org - -- 0001-Test-for-secure_getenv-too.patch: - Current glibc in 12.3/factory no longer exports internal - function __secure_getenv() but has secure_getenv() instead. - -------------------------------------------------------------------- -Mon Jan 7 13:26:15 UTC 2013 - puzel@suse.com - -- add-canonicalize_path_restricted.patch, - mount-sanitize-paths-from-non-root-users.patch, - umount-sanitize-paths-from-non-root-users.patch: - prevent leaking information about existence of folders - (bnc#797002, CVE-2013-0157) - -------------------------------------------------------------------- -Fri Dec 28 04:30:58 UTC 2012 - crrodriguez@opensuse.org - -- 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch - Use OS byteswapping macros, this patch is functionally identical - to the version submitted upstream with the exception it excludes - code that target non-linux systems. - -------------------------------------------------------------------- -Wed Sep 19 19:41:10 UTC 2012 - jslaby@suse.com - -- login: close tty before vhangup (bnc#778842) - login-close-tty-before-vhangup.patch - -------------------------------------------------------------------- -Fri Jun 22 09:37:20 CEST 2012 - kukuk@suse.de - -- Remove pam_lastlog from login.pamd, login is doing it itself. - [bnc#768067] - -------------------------------------------------------------------- -Wed Jun 20 09:22:50 UTC 2012 - lnussel@suse.de - -- add a hack for boot.localfs to determine the devices to wait for - -------------------------------------------------------------------- -Fri Jun 15 12:57:06 UTC 2012 - puzel@suse.com - -- improve error messages from new mount (bnc#767208) - - backport patches from upstream git: - - mount-new-add-loopdev-specific-error-message.patch - - mount-new-use-MNT_ERR-for-error-messages.patch - - libmount-add-special-MNT_ERR-codes.patch - - mount-new-improve-error-messages.patch - - libmount-add-MNT_ERR_LOOPDEV.patch - -------------------------------------------------------------------- -Fri Jun 15 10:07:26 UTC 2012 - lnussel@suse.de - -- remove encryption options completely as upstream will do that as - well in the next release (bnc#748879). - -------------------------------------------------------------------- -Thu Jun 14 13:04:40 UTC 2012 - puzel@suse.com - -- fix automount with quota (rh#825836) - - mount-new-allow-sloppy-for-non-root.patch -- fix wrong mount options for CIFS mounts (bnc#766157) - - libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch - -------------------------------------------------------------------- -Thu May 31 10:04:23 UTC 2012 - sweet_f_a@gmx.de - -- require binutils-devel because "which" wants to find libiberty.a -- remove which-lib64.patch because it's broken and couldn't find - libiberty.a whithin /usr/lib64 -- which doesn't need autoreconf anymore - -------------------------------------------------------------------- -Tue May 29 09:28:55 UTC 2012 - puzel@suse.com - -- switch to new libmount-based mount(8) - -------------------------------------------------------------------- -Fri May 25 12:12:09 UTC 2012 - puzel@suse.com - -- update to util-linux-2.21.2 - - bugfix release -- drop sfdisk-fix-calculation-due-to-type-mismatch.patch - (fixed upstream) - -------------------------------------------------------------------- -Fri May 25 12:03:07 UTC 2012 - puzel@suse.com - -- build with RPM_OPT_FLAGS again (removed by mistake) - -------------------------------------------------------------------- -Thu Apr 12 09:09:05 UTC 2012 - puzel@suse.com - -- fix miscalculation in sfdisk on ix86 (bnc#754789) - - add sfdisk-fix-calculation-due-to-type-mismatch.patch - -------------------------------------------------------------------- -Sat Mar 31 11:09:38 UTC 2012 - puzel@suse.com - -- update to util-linux-2.21.1 - - bugfix release - -------------------------------------------------------------------- -Fri Mar 16 09:56:21 UTC 2012 - fcrozat@suse.com - -- Fix Obsoletes / Provides for login. - -------------------------------------------------------------------- -Tue Mar 13 16:38:34 CET 2012 - kukuk@suse.de - -- Enable /bin/login and obsolete old fork now merged back - (not moved to /usr/bin until all problems are solved to - avoid that root is not able to login). - -------------------------------------------------------------------- -Tue Mar 6 21:18:56 UTC 2012 - rschweikert@suse.com - -- keep binaries in /usr tree (UsrMerge project) - -------------------------------------------------------------------- -Tue Feb 21 13:46:25 UTC 2012 - puzel@suse.com - -- update to util-linux-2.21 - chcpu(8): - - new command - prlimit(1): - - new command - losetup(8): - - the command has been rewritten, features: - * supports 64bit ioctls only - * losetup -a does not require root permissions - * uses new /dev/loop-control kernel API - * supports new command line option --partscan to enable - kernel partition table parser - agetty(8): - - supports new command line options --nohints to disable hints - about Num, Caps and Scroll Locks - - supports new command line option --remote to add a hostname - to the login(1) command line - dmesg(1): - - supports new command line options --file to read the log from - a file rather than from kernel buffer - fallocate(8): - - supports new command line options --punch-hole to punch holes - in the file - findmnt(8): - - supports alternative location of the fstab file - ipcrm(8): - - supports new command line option --all to remove all resources - lscpu(1): - - supports new command line options --all, --offline and - --online to list all, offline or online CPUs - - supports s390 topology description (polarization, books, ...) - partx(8): - - supports partitioned loop devices - wipefs(8): - - allows to zap partition tables - - supports new command line option "--type " to wipe only - specified filesystems, RAIDs or partition table types - libblkid: - - provides new function blkid_do_wipe() to remove all - signatures from the given block device. -- disable elvtune (works only with 2.4 kernel) -- drop patches which are upstream now: - - drop fsck-use-FS-blacklist-for-non-all-mode-too.patch - - drop util-linux-dmesg-fix-printing-of-multibyte-characters.patch - - libmount-ignore-tailing-slash-in-netfs-source-paths.patch - - libmount-fix-chdir-to-parent-for-restricted-user-umo.patch -- update to adjtimex-1.29 -- use fdupes to symlink duplicate manpages -- disabled make check for time (noop) -- libraries back to %{_libdir}, /usr merge project (by - crrodriguez@opensuse.org) -- drop cryptoloop support (provided by dm-crypt) - - util-linux-2.17.1-mount_losetup_crypto.patch - -------------------------------------------------------------------- -Tue Feb 7 14:48:23 UTC 2012 - jengelh@medozas.de - -- Remove redundant tags/sections - -------------------------------------------------------------------- -Sun Dec 25 22:19:44 UTC 2011 - coolo@suse.com - -- do not call %suse_update_config - -------------------------------------------------------------------- -Mon Nov 21 15:13:56 UTC 2011 - aj@suse.de - -- add fdisk-tinfo.patch to fix build with newer curses. - -------------------------------------------------------------------- -Tue Nov 15 13:15:19 UTC 2011 - coolo@suse.com - -- add libtool as buildrequire to avoid implicit dependency - -------------------------------------------------------------------- -Wed Nov 9 08:27:17 UTC 2011 - puzel@suse.com - -- add libmount-ignore-tailing-slash-in-netfs-source-paths.patch and - libmount-fix-chdir-to-parent-for-restricted-user-umo.patch: - fix umounting network filesystems as plain user (bnc#728480) - -------------------------------------------------------------------- -Tue Nov 8 09:36:41 UTC 2011 - puzel@suse.com - -- add fsck-use-FS-blacklist-for-non-all-mode-too.patch (bnc#728645) - -------------------------------------------------------------------- -Wed Nov 2 09:37:12 UTC 2011 - puzel@suse.com - -- add util-linux-dmesg-fix-printing-of-multibyte-characters.patch - (bnc#725993) - -------------------------------------------------------------------- -Thu Oct 20 13:01:22 UTC 2011 - puzel@suse.com - -- update to util-linux-2.20.1 - - bugfix release -- drop patches (in upstream): - - util-linux-sfdisk-manpage-fix.patch - - util-linux-lib-sysfs-deinit.patch - - fdisk-dont-shorten-long-path-to-disk.patch - -------------------------------------------------------------------- -Wed Oct 12 09:26:40 UTC 2011 - puzel@suse.com - -- add fdisk-dont-shorten-long-path-to-disk.patch (bnc#722959) - -------------------------------------------------------------------- -Tue Oct 4 11:32:11 UTC 2011 - uli@suse.com - -- cross-build fix: use %__cc, %configure macros -- set bindir explicitly when installing -- (cross-?)build fix: disable build dependency on SELINUX_LIBS - in libmount - -------------------------------------------------------------------- -Tue Sep 13 09:10:43 UTC 2011 - puzel@suse.com - -- add util-linux-lib-sysfs-deinit.patch (bnc#714151) - -------------------------------------------------------------------- -Mon Aug 29 14:57:57 UTC 2011 - puzel@suse.com - -- update to util-linux-2.20 - - cleanups, bugfixes -- build with --enable-ddate -- add util-linux-sfdisk-manpage-fix.patch - -------------------------------------------------------------------- -Thu Aug 25 14:12:15 UTC 2011 - rguenther@novell.com - -- BuildIgnore pwdutils. - -------------------------------------------------------------------- -Wed Aug 17 10:37:20 UTC 2011 - puzel@novell.com - -- update to util-linux-2.20-rc2 - - bugfixes -- drop patches: - - util-linux-fix-manpages.patch - - util-linux-wall-build-with-pie.patch - - util-linux-2.20-rc1-agetty-fixes.patch - - util-linux-2.20-rc1-hexdump-segfault.patch - - util-linux-2.20-rc-fix-dmesg.patch - -------------------------------------------------------------------- -Wed Aug 10 13:42:33 UTC 2011 - puzel@novell.com - -- add util-linux-2.20-rc1-hexdump-segfault.patch (bnc#710877) - -------------------------------------------------------------------- -Wed Aug 10 12:20:41 UTC 2011 - puzel@novell.com - -- add util-linux-2.20-rc-fix-dmesg.patch (bnc#710417) - -------------------------------------------------------------------- -Wed Aug 10 11:06:15 UTC 2011 - puzel@novell.com - -- add util-linux-2.20-rc1-agetty-fixes.patch (bnc#711240) - -------------------------------------------------------------------- -Mon Aug 1 13:44:21 UTC 2011 - puzel@novell.com - -- update to util-linux-2.20-rc1 - - Release highlights - agetty(8): - - mingetty features have been merged to agetty - chrt(1), taskset(1): - - supports new command line option "--all-tasks" to set or - retrieve the scheduling attributes of all the tasks (threads) - for a given PID - dmesg(1): - - supports new command line options: --clear, --console-on, - --console-off, --ctime, --decode, --facility=, - --level=, --show-delta, --notime, --kernel and - --userspace - fdisk(8): - - improved dialogs to be more user-friendly - findmnt(8), partx(8), lsblk(8) - - support new command line option "--pairs" to enable - key="value" output format - findmnt(8): - - supports new command line options "--poll" and "--timeout" to - monitor /proc/self/mountinfo changes - ionice(1): - - supports human-readable scheduling class names, for example: - ionice -c best-effort $PID - kill(1): - - supports new command line option "-q " to use - sigqueue(2) - - supports real-time signals in formats RT, RTMIN+ and - RTMAX- - lsblk(8): - - supports new columns - - supports new command line option "-D" to print device discard - topology - lscpu(8): - - improved support for s390 boxes - mkfs.minix: - - supports minix version 3 - simpleinit: - - this set of deprecated utils has been REMOVED - wall(1): - - support new command line option "--timeout" to specify write - timeout to terminals in seconds. -- add util-linux-fix-manpages.patch -- add util-linux-wall-build-with-pie.patch -- package /sbin/rcuuidd - -------------------------------------------------------------------- -Tue May 3 09:39:37 UTC 2011 - puzel@novell.com - -- update to util-linux-2.19.1 - - numerous bugfixes, including (bnc#690486 and bnc#690488) -- drop umount-by-imgname.patch (merged upstream) -- cleanup: do not register ipc.info.gz (not provided by - this package) - -------------------------------------------------------------------- -Thu Apr 14 16:27:27 UTC 2011 - puzel@novell.com - -- merge util-linux-2.17.1-losetup-honor-documented-c-option and - util-linux-2.17.1-mount_losetup_crypto.patch) - -------------------------------------------------------------------- -Mon Feb 21 16:28:38 UTC 2011 - puzel@novell.com - -- add umount-by-imgname.patch (bnc#666161) - -------------------------------------------------------------------- -Thu Feb 10 11:01:40 UTC 2011 - puzel@novell.com - -- update to util-linux-2.19 - - uuid fixes - - cleanups, documentation and translation updates -- drop util-linux-2.19-rc1-loop-offset.diff (fixed in upstream, by - different patch) - -------------------------------------------------------------------- -Wed Jan 26 11:47:55 UTC 2011 - puzel@novell.com - -- update to util-linux-2.19-rc3 - - bugfixes - -------------------------------------------------------------------- -Tue Jan 25 09:29:15 UTC 2011 - lnussel@suse.de - -- don't mess with /etc/mtab in %post. aaa_base does that for us - already. - -------------------------------------------------------------------- -Fri Jan 21 12:34:35 UTC 2011 - lnussel@suse.de - -- fix parsing offset= followed by more options (bnc#666150) - -------------------------------------------------------------------- -Tue Jan 18 09:47:11 UTC 2011 - bwiedemann@novell.com - -- fix bnc#664873 - -------------------------------------------------------------------- -Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com - -- update to util-linux-2.19-rc1 -- important changes: - * lsblk(8): - - this NEW COMMAND lists information about all or selected block - devices in tree-like format. - * partx(8): - - this command has been rewritten to use libblkid for partition - tables parsing. It supports aix, bsd, dos, gpt, mac, minix, - sgi, solaris_x86, sun, ultrix and unixware now. - - supports new command line option "--show" to list partitions in - new format - - prints UUID and name for GPT and mac partitions - * findmnt(8): - - supports new command line option "--submounts" to list all - submounts for selected mountpoint(s) - * agetty(8): - - supports new command line options "-c" and "-s" to reuse - already initialized tty cflags and existing baud rate - * mount(8), umount(8): - - could be linked with libmount (--enable-libmount-mount) to - manage userspace mount options outside /etc/mtab on systems - where the file is a symlink to /proc/mounts. (EXPERIMENTAL, - enabled in openSUSE package) - * losetup(8), mount(8): - - uses /sys/dev/block//loop/backing_file rather than - loopdev ioctls (requires kernel >= 2.6.37) - * fsck(8): - - supports new command line option "-l" to lock whole-disk device - by exclusive flock(2). This option is recommended when more - fsck(8) instances are executed in the same time. - * rtcwake(8): - - supports new mode "show" to print the current RTC alarm time - * fstrim(8): - - this NEW COMMAND allows to discard unused blocks on a mounted - filesystem (wrapper for FITRIM ioctl) - * swapon(8): - - supports new options "discard" and "nofail" - -- in post, replace /etc/mtab with a symlink to /proc/mounts/self -- drop following patches (in upstream) - - util-linux-swapon-btrfs-limitations - - util-linux-agetty-s-option.patch - - util-linux-fsck-l-option.patch - - util-linux-2.18-no-canonicalize-fix.patch - - util-linux-swapon-canonicalize-swap-device.patch -- fix uuidd Summary and Description -- build with --enable-libmount-mount (new option) -- use set_permissions macros -- run spec-cleaner - -------------------------------------------------------------------- -Tue Dec 14 16:11:34 UTC 2010 - puzel@novell.com - -- add util-linux-swapon-canonicalize-swap-device.patch - (bnc#641142) - -------------------------------------------------------------------- -Thu Dec 2 17:09:08 CET 2010 - mszeredi@suse.cz - -- mount: don't canonicalize "spec" with --no-canonicalize option - [bnc#651598] - -------------------------------------------------------------------- -Thu Dec 2 15:23:36 CET 2010 - mszeredi@suse.cz - -- add Provides: util-linux(fake+no-canonicalize) [bnc#651598] - -------------------------------------------------------------------- -Tue Nov 30 12:19:53 UTC 2010 - puzel@novell.com - -- update util-linux-2.17.1-mount_losetup_crypto.patch (bnc#655804) - -------------------------------------------------------------------- -Fri Nov 26 19:10:27 CET 2010 - kay.sievers@novell.com - -- add Provides: fsck-with-dev-lock - -------------------------------------------------------------------- -Thu Nov 25 13:37:43 CET 2010 - kay.sievers@novell.com - -- add 'fsck -l' option needed for systemd - -------------------------------------------------------------------- -Tue Nov 16 16:08:48 UTC 2010 - cristian.rodriguez@opensuse.org - -- disable silent rules - -------------------------------------------------------------------- -Thu Nov 11 10:36:35 CET 2010 - kay.sievers@novell.com - -- add 'agetty' -s option needed for systemd's serial console setup - -------------------------------------------------------------------- -Tue Sep 28 11:42:46 UTC 2010 - aj@suse.de - -- uuidd rc file already creates /var/run/uuidd, mark it as %ghost - in spec file. - -------------------------------------------------------------------- -Fri Jul 9 06:23:27 UTC 2010 - puzel@novell.com - -- update to util-linux-ng-2.18 - - do not provide rdev, ramsize, vidmode and rootflags commands - anymore - - fdisk does not use cylinders as display units by default - - libmount: new library; its API is still officially unstable - - new commands: findmnt, fsfreeze, swaplabel - - blkid: new option "-i" to print I/O limits - - full release notes: - https://www.kernel.org/pub/linux/utils/util-linux/v2.18/v2.18-ReleaseNotes -- update to adjtimex-1.28 -- update to which-2.20 -- drop util-linux-2.14.1-mount_skip_sync.patch (fixed upstream) -- drop util-linux-addpart-use-atoll.patch (fixed upstream) -- drop util-linux-mount-detect-ro-mount.patch (fixed upstream) -- drop adjtimex-1.20-nosyscall.diff (fixed upstream) -- cleanup specfile a bit - -------------------------------------------------------------------- -Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de - -- use %_smp_mflags - -------------------------------------------------------------------- -Thu Jun 24 23:24:41 CEST 2010 - jeffm@suse.de - -- document btrfs limitation with swapfiles (bnc#616617) - -------------------------------------------------------------------- -Tue Jun 22 16:48:29 UTC 2010 - bg@novell.com - -- hppa specific binaries are parisc{,32,64} - -------------------------------------------------------------------- -Tue Jun 1 14:23:23 UTC 2010 - puzel@novell.com - -- do not run uuidd as root, but uuidd:uuidd (bnc#604168) - -------------------------------------------------------------------- -Fri May 28 13:24:43 UTC 2010 - puzel@novell.com - -- add util-linux-mount-detect-ro-mount.patch (bnc#481123) - -------------------------------------------------------------------- -Tue May 11 13:58:49 UTC 2010 - puzel@novell.com - -- add util-linux-addpart-use-atoll.patch (bnc#603328) - -------------------------------------------------------------------- -Tue Apr 6 13:22:37 UTC 2010 - hvogel@novell.com - -- update to version 2.17.2 - - fix small typo in v2.17.1-ReleaseNotes - - fix -b fdisk - - fix typo in ionice - - fix display of device size, fix infinite loop when probe chain - bails out early, more robust minix probing, remove "0x" prefix - from DRBD UUID, reset BLKID_TINY_DEV flag in - blkid_probe_set_device, support alignment_offset=-1 in libblkid - - fix cpuid opcode detection in lscpu - - more explicitly explain fstab usage in mount.8, posix option - of vfat is obsolete, properly ignore comments in - /etc/filesystems in mount - - update ja.po, pl.po, update vi.po - - remove " (deleted)" from filenames from /proc/swaps - - cleanup usage() and man page of wipefs - -------------------------------------------------------------------- -Wed Mar 10 23:11:42 CET 2010 - jeffm@suse.de - -- Properly honor documented -c option (bnc#583677) - -------------------------------------------------------------------- -Tue Mar 2 09:53:04 UTC 2010 - lnussel@suse.de - -- drop freeramdisk (bnc#584565) -- drop hostid (bnc#584562) - -------------------------------------------------------------------- -Tue Feb 23 12:46:07 UTC 2010 - lnussel@suse.de - -- new version 2.17.1 - - new commands: wipefs, unshare, fallocate - - fdisk: DOS-compatible mode marked deprecated - - honor nofail option in fsck - - libblkid overhaul - - lots of bug fixes -- fix self-obsoletes -- compile suid programs using -fpie -- drop -DCONFIG_SMP for s390 as it doesn't seem to be used anyways - -------------------------------------------------------------------- -Sun Dec 13 15:19:16 CET 2009 - jengelh@medozas.de - -- add baselibs.conf as a source - -------------------------------------------------------------------- -Sun Dec 6 15:07:33 CET 2009 - jengelh@medozas.de - -- enabled parallel build - -------------------------------------------------------------------- -Mon Nov 30 17:05:38 CET 2009 - meissner@suse.de - -- exclude sparc correctly -> %sparc bnc#559180 - -------------------------------------------------------------------- -Sun Nov 15 14:04:48 CET 2009 - meissner@suse.de - -- refreshed patches with fuzz=0 - -------------------------------------------------------------------- -Mon Oct 26 17:45:53 UTC 2009 - crrodriguez@opensuse.org - -- fsck during boot up fails with Too many open files [bnc#503008] - -------------------------------------------------------------------- -Tue Oct 20 12:14:24 CEST 2009 - dmueller@suse.de - -- fix typo in baselibs.conf change - -------------------------------------------------------------------- -Tue Oct 13 11:23:07 UTC 2009 - aj@suse.de - -- Fix requires of 32-bit devel packages. - -------------------------------------------------------------------- -Tue Sep 29 12:58:37 UTC 2009 - hvogel@novell.com - -- finaly remove the mount mtab locking patch: - * util-linux-2.14.1-mount_race.patch - It causes too much regressions. - -------------------------------------------------------------------- -Mon Jul 13 14:21:07 CEST 2009 - kay.sievers@novell.com - -- update to final 2.16 release - - fix libdir issues in pkgconfig files - - fix location of uuidd run directory - - improve libuuid handling if uuidd is installed but not setuid -- add blkid.conf file to: - - disable the sequential /dev scanner - - move cache to /dev/.blkid.tab to get file out of /etc - and prevent the cache file to survive a reboot - -------------------------------------------------------------------- -Wed Jul 8 13:14:42 CEST 2009 - meissner@novell.com - -- added baselibs.conf for libblkid* and libuuid* - -------------------------------------------------------------------- -Sun Jun 28 21:36:57 CEST 2009 - kay.sievers@novell.com - -- update to version 2.16 -- switch from libvolume_id to new libblkid -- provide fsck -- provide libblkid -- provide libuuid -- provide setarch -- provide separate uuidd package -- remove patches: - util-linux-2.14.1-lscpu.patch (upstream) - util-linux-2.14.1-lscpu_add_hypervisor_detection.patch (upstream) - util-linux-2.14.1-lscpu_sysroot_option.patch (upstream) - util-linux-2.14.1-sys-utils_lscpu_exit.patch (upstream) - util-linux-2.14.2-schedutils_fix_email.patch (upstream) - util-linux-2.12r-fdisk_cyl.patch (upstream) - util-linux-2.14.1-mount_swap_pagesize.patch (--fixpg option) - util-linux-2.14.2-schedutils_ionice_enosys.patch (-t option) - util-linux-2.14.1-hwclock_adjust_and_hctosys.patch (--systz) - -------------------------------------------------------------------- -Thu Apr 16 14:55:22 CEST 2009 - werner@suse.de - -- Move /usr/sbin/adjtimex to /sbin/adjtimex to be able to check the - kernel time variables even without /usr mounted - -------------------------------------------------------------------- -Mon Feb 16 12:35:00 CET 2009 - mkoenig@suse.de - -- remove util-linux-2.14.1-fdisk_cylinder.patch - fixed upstream - -------------------------------------------------------------------- -Thu Feb 12 17:12:28 CET 2009 - mkoenig@suse.de - -- update to version 2.14.2 - chrt: - * support CFS SCHED_IDLE priority and document it - fdisk: - * cannot create partition with starting beyond 1 TB - * remove obsolete information from man page - hwclock: - * remove "cli" and "sti" from i386 CMOS code - * remove x86_64-specific bogon - losetup: - * add warning about read-only mode - * missing EBUSY error hint message - more: - * minor fixes to magic() - mount: - * add i_version support - * add info about /proc/mounts to mount.1 - * add info about semantics of read-only mount to mount.8 - * add rootcontext= SELinux mount option - * clean up SPEC canonicalization - * create separate section for fs-independent options in mount.8 - * finalize support of quoted LABELs/UUIDs - * mtab created multiple times with -a option - * suggest to use blockdev --setro rather than losetup -- catch ENOSYS in ionice to allow execution in virtualized - environments which don't support ioprio_{get,set} calls [bnc#444637] -- umount: fix suid check for user mounted loop devices [bnc#461732] -- fix doc [bnc#456375] -- remove patches: - util-linux-2.13.1-fdisk_cfdisk_yesno.patch - util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch - util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch - util-linux-2.14.1-fdisk_missing_include.patch - util-linux-2.14.1-mount_loop_ro_fix.patch - -------------------------------------------------------------------- -Sat Feb 7 18:28:58 CET 2009 - schwab@suse.de - -- Fix info dir entry for which. - -------------------------------------------------------------------- -Wed Jan 7 15:42:38 CET 2009 - mkoenig@suse.de - -- fix locking problem for external mount helpers when type - is not given [bnc#459839] - -------------------------------------------------------------------- -Tue Dec 2 12:23:37 CET 2008 - mkoenig@suse.de - -- raw: do not stat the raw devices when binding, since they - are created dynamically [bnc#450675] - -------------------------------------------------------------------- -Thu Nov 27 01:27:19 CET 2008 - dmueller@suse.de - -- mount: fix hang on trying to find a free loop device - if one of them has a stale nfs handle mounted (bnc#449646) - -------------------------------------------------------------------- -Mon Nov 24 15:24:11 CET 2008 - mkoenig@suse.de - -- mount: fix locking patch to not break -n [bnc#447937] - -------------------------------------------------------------------- -Thu Nov 20 18:08:33 CET 2008 - mkoenig@suse.de - -- mount: enhance mount/umount mtab locking and lock the whole - read mtab/syscall/write mtab process to avoid mtab corruption - with highly concurrent mount/umount calls [bnc#444966] -- add arch/powerpc/boot/addnote.c from kernel 2.6.27 - as /usr/bin/chrp-addnote [bnc#443859] -- umount: skip sync() in umount -a if no umount happened [bnc#447036] -- hwclock: allow --adjust and --hctosys simultaneously [bnc#441106] - -------------------------------------------------------------------- -Fri Nov 7 14:50:00 CET 2008 - mkoenig@suse.de - -- fdisk: support +cylinder notation [bnc#441871] -- check for EACCES when using ro fallback when loop mounting - a readonly image -- fix uninitialized variable in swapon pagesize detection - -------------------------------------------------------------------- -Mon Oct 27 17:33:01 CET 2008 - mkoenig@suse.de - -- fdisk: add missing includes [bnc#438670] - -------------------------------------------------------------------- -Thu Oct 23 17:58:28 CEST 2008 - mkoenig@suse.de - -- swapon: add swap pagesize detection [bnc#433028] -- lscpu: fix return code [bnc#437367] -- mkfs.minix: fix device size detection [bnc#437980] -- lscpu: update to most recent version for hypervisor detection - -------------------------------------------------------------------- -Thu Oct 2 11:10:11 CEST 2008 - mkoenig@suse.de - -- add lscpu tool from current util-linux-ng git, - needed for fate#303051 -- replace hypervisor detection tool with the solution blessed by - upstream, which adds hv detection as lscpu feature [fate#303051] - -------------------------------------------------------------------- -Wed Sep 24 11:28:07 CEST 2008 - mkoenig@suse.de - -- add new tool /bin/hypervisor for x86, x86_64 - from Ky Srinivasan - to detect the presence of a hypervisor [fate#303051] - -------------------------------------------------------------------- -Wed Sep 10 15:58:52 CEST 2008 - mkoenig@suse.de - -- update to version 2.14.1 - * fdisk: don't check for GPT when asked for disk size only - * losetup: remove unnecessary minor number check - * rtcwake: prefer RTC_WKALM_SET over RTC_ALM_SET - * scriptreplay: new implementation is out-of-sync - * selinux: is_selinux_enabled() returns 0, 1 and -1 - * umount: improve "-d" option for autoclear loops -- remove patch - util-linux-2.14-loop_autoclear.patch - -------------------------------------------------------------------- -Wed Aug 20 15:20:06 CEST 2008 - mkoenig@suse.de - -- enable SELinux support [fate#303662] - -------------------------------------------------------------------- -Mon Aug 18 18:13:10 CEST 2008 - mrueckert@suse.de - -- remove outdated options in the fillup_and_insserv call - -------------------------------------------------------------------- -Mon Aug 18 12:36:39 CEST 2008 - mkoenig@suse.de - -- raw: fix init script tags - -------------------------------------------------------------------- -Mon Jul 7 15:13:24 CEST 2008 - mkoenig@suse.de - -- update which to version 2.19 - * Upgraded code from bash to version 3.2. This DOES has influence - on how Which behaves under certain circumstances. - * When the environment variable HOME is not set, the home directory - is now read from /etc/passwd or set to '/' if no home directory - could be found (this now matches the tilde lib used in bash) - * Changed the license to GPLv3 - * Add support for shells that output '{' on the same line as the - function name in the output of 'declare -f' (ie zsh). -- fix build - -------------------------------------------------------------------- -Wed Jul 2 15:47:08 CEST 2008 - mkoenig@suse.de - -- replace util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch - with upstream version - util-linux-2.14-loop_autoclear.patch - -------------------------------------------------------------------- -Fri Jun 27 17:05:46 CEST 2008 - schwab@suse.de - -- Fix lib64 check. - -------------------------------------------------------------------- -Wed Jun 25 14:26:49 CEST 2008 - mkoenig@suse.de - -- update to version 2.14 - most important changes: - * new command ldattach - mount: - * support auto-destruction of loop devices - losetup: - * new option -j - * supports unlimited number of loop devices - * new option --sizelimit to set data end - * option -s (short form of --show) now deprecated - mkswap: - * new option -U to set UUID explicitly - fdisk: - * calculate partition size in 2^N [bnc#381270] - hwclock: - * new option --adjfile to override default /etc/adjtime -- readd scriptreplay, implemented now in C -- add retry for mount if ENOMEDIUM is returned [bnc#390204] -- ignore ENXIO in del_loop, because they might have been - auto-destructed -- removed patches: - util-linux-2.13.1-canonicalize_loopfile_name.patch - util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch - util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch - util-linux-2.13.1-mount_getfs_fix.patch - util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch - util-linux-2.13-fdisk_cfdisk_ncursesw.patch - util-linux-mount_opt_nofail.patch - util-linux-ng-2.13-swapon-swsuspend.patch - -------------------------------------------------------------------- -Thu Apr 3 17:11:53 CEST 2008 - mkoenig@suse.de - -- cfdisk: accept english answer [bnc#369043] -- use upstream getfs fix - -------------------------------------------------------------------- -Wed Mar 26 22:05:42 CET 2008 - coolo@suse.de - -- actually require the split out package - -------------------------------------------------------------------- -Sun Mar 23 11:13:13 CET 2008 - coolo@suse.de - -- splitting out 60% of the size of the package: - creating lang subpackage - -------------------------------------------------------------------- -Wed Feb 13 10:21:42 CET 2008 - bg@suse.de - -- don't try to package parisc*.8 manual pages - -------------------------------------------------------------------- -Mon Feb 11 17:49:04 CET 2008 - mkoenig@suse.de - -- update to version 2.13.1 again -- fix broken util-linux-2.13.1-getfs_fix.patch - -------------------------------------------------------------------- -Sun Feb 10 18:11:07 CET 2008 - lrupp@suse.de - -- revert to 2.13.0.1+git20071121 - breaks current 'mount' call in Buildservice - -------------------------------------------------------------------- -Thu Feb 7 12:41:25 CET 2008 - mkoenig@suse.de - -- update to version 2.13.1: - mount: - * -L|-U segfault when label or uuid doesn't exist - * chain of symlinks to fstab causes use of pointer after free - * don't call canonicalize(SPEC) for cifs, smbfs and nfs - * improve error message when helper program not present - losetup: - * fix errno usage - mkswap: - * possible to crash with SELinux relabeling support - sfdisk: - * allow partitioning drives of over 2^31 sectors - hwclock: - * check for ENODEV -- mount: fix problem with device canonicalization when using - persistent name in fstab but call mount with real bd name -- patches merged: - util-linux-2.13-mount_fd_leak.patch - -------------------------------------------------------------------- -Tue Dec 18 15:55:19 CET 2007 - mkoenig@suse.de - -- add temporary workaround for broken RTC update interrupts - [#338419] - -------------------------------------------------------------------- -Mon Dec 3 11:03:57 CET 2007 - ro@suse.de - -- remove "arch", in coreutils now - -------------------------------------------------------------------- -Thu Nov 29 17:51:17 CET 2007 - lnussel@suse.de - -- update crypto patch - * fix mount buffer overflow when reading the passphrase (#332148) - * add loop_fish2 compatability code to losetup/mount again (#332095) - * change default hash size for 128bit keys to sha256 again - - -------------------------------------------------------------------- -Wed Nov 21 13:43:31 CET 2007 - mkoenig@suse.de - -- update to git20071121: - add sector size check for mkfs.minix [#308256] - fix canonicalization for cifs [#338375] -- provide Short-Description for raw init script -- add rpmlintrc - -------------------------------------------------------------------- -Tue Nov 20 17:49:35 CET 2007 - mkoenig@suse.de - -- fix raw path in init script - -------------------------------------------------------------------- -Tue Nov 6 16:11:02 CET 2007 - mkoenig@suse.de - -- update to 2.13.0.1+git20071106 -- prevent loop mounting the same file twice [#240653] -- merged upstream: - util-linux-2.13-mount_helper_fix.patch - util-linux-2.13-hwclock_rtc_option.patch - -------------------------------------------------------------------- -Thu Oct 4 22:24:04 CEST 2007 - bg@suse.de - -- don't use parisc, parisc32 and parisc64. - -------------------------------------------------------------------- -Mon Oct 1 17:08:06 CEST 2007 - mkoenig@suse.de - -- update to version 2.13 - merged upstream: - util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch - util-linux-2.13-loop.patch - util-linux-2.13-mount_create_mtab.patch - util-linux-2.13-schedutils_error_handling.patch - util-linux-2.13-sys_utils_build_rdev_x86_64.patch -- fix hwclock --rtc option [#326106] -- fix setuid/setgid mixup and error checking [#327022] - -------------------------------------------------------------------- -Fri Sep 14 11:24:33 CEST 2007 - mkoenig@suse.de - -- link cfdisk against libncursesw instead libncurses to fix - broken utf-8 characters [#307353] - -------------------------------------------------------------------- -Wed Aug 29 12:22:21 CEST 2007 - mkoenig@suse.de - -- fix fd leaks in previous patch - -------------------------------------------------------------------- -Tue Aug 28 16:42:04 CEST 2007 - lnussel@suse.de - -- add support for specifying the key length and password hash - algorithm [#304861] - -------------------------------------------------------------------- -Fri Aug 24 14:09:19 CEST 2007 - mkoenig@suse.de - -- avoid duplicates of root fs if defined with LABEL in fstab - [#297959] -- fix ionice error handling [#301675] - -------------------------------------------------------------------- -Thu Aug 16 18:34:30 CEST 2007 - ssommer@suse.de - -- free loop devices when mount fails [#297172] - -------------------------------------------------------------------- -Wed Jul 25 18:43:42 CEST 2007 - mkoenig@suse.de - -- update to git20070725 -- removed patches (merged upstream): - util-linux-2.12r-mount_mount.8_xfs_update.patch - util-linux-2.12r-sys_utils_readprofile_mapfile.patch - util-linux-2.12r-disk_utils_mkswap_fix.patch - util-linux-2.13-schedutils_ionice_idle.patch - -------------------------------------------------------------------- -Tue Jul 17 10:44:18 CEST 2007 - mkoenig@suse.de - -- updated to version 2.13-rc2: - * add wakertc -- cleanup ionice usage [#270251] -- enable hwclock audit support [#280113] -- removed patches (merged/fixed upstream) - util-linux-login_utils_wall.patch - util-linux-mount_mount.8-acl.patch - util-linux-2.12r-mount_mtab_update.patch - util-linux-2.13-schedutils_chrt.patch - util-linux-2.13-sys_utils_arch.patch - util-linux-2.12a-mount_mountpointwithcolon.patch - util-linux-2.12a-mount_procswapcheck.patch - util-linux-2.12q-mount_umount2_not_static.patch - -------------------------------------------------------------------- -Fri Jul 13 12:31:56 CEST 2007 - mkoenig@suse.de - -- replace hotplug with nofail option and fix it to not use - syscall reserved values. -- removed patch - util-linux-2.11z-hwclock_geteuid.patch - it is intentional that suid hwclock capabilities are limited -- removed patch (fixed upstream) - util-linux-2.12q-mount_--move.patch - -------------------------------------------------------------------- -Mon Jul 9 11:34:33 CEST 2007 - mkoenig@suse.de - -- add libuuid-devel to BuildRequires to let mkswap use UUIDs - -------------------------------------------------------------------- -Thu Jul 5 16:08:58 CEST 2007 - mkoenig@suse.de - -- use %config(noreplace) for /etc/filesystems -- Keep rdev stuff for x86_64 - util-linux-2.13-sys_utils_build_rdev_x86_64.patch -- removed patches (merged upstream) - util-linux-2.12r-misc_utils_cal_formatting.patch - util-linux-2.12q-sys_utils_ionice.patch - -------------------------------------------------------------------- -Thu Jul 5 11:59:30 CEST 2007 - mkoenig@suse.de - -- update to 2.13-rc1: - * mount fixes - * agetty: add 'O' escape code to display domain name - * blockdev: add BLKFRAGET/BLKFRASET ioctls - * fdisk: many significant improvements and fixes to Sun label handling - * update po files -- removed patches (merged upstream): - util-linux-2.11q-fdisk_fs_mac.patch - util-linux-2.12r-fdisk_fdiskwrap.patch - util-linux-2.12r-mount_racy_loop.patch - util-linux-2.13-misc_utils_cal_ncurses.patch - util-linux-2.13-mount_volumeid_label.patch -- use %find_lang - -------------------------------------------------------------------- -Thu Jun 21 14:50:58 CEST 2007 - mkoenig@suse.de - -- use encoded label names with volume_id [#232929] - util-linux-2.13-mount_volumeid_label.patch - -------------------------------------------------------------------- -Thu Jun 14 10:52:25 CEST 2007 - mkoenig@suse.de - -- mkzimage_cmdline: activate commandline if used with -s [#279935] - -------------------------------------------------------------------- -Wed Jun 13 12:33:59 CEST 2007 - mkoenig@suse.de - -- schedutils: let chrt accept pid 0 for current process and - fix some documentation bugs [#266879] - util-linux-2.13-schedutils_chrt.patch - -------------------------------------------------------------------- -Wed Jun 6 16:15:43 CEST 2007 - mkoenig@suse.de - -- update to git20070530 -- removed patches - util-linux-2.13-mount_volume_id.patch - util-linux-2.12r-mount_by_uuid.patch - util-linux-2.13-build_gnu_source.patch -- fix build with ncurses - -------------------------------------------------------------------- -Tue Jun 5 17:01:48 CEST 2007 - mkoenig@suse.de - -- update to git20070509 - mount: NFS code removed (use mount.nfs{,4} from nfs-utils) -- remove sm-notify (nfs-utils) -- removed patches - util-linux-2.11u-mount_nfs_mount_acl.patch - util-linux-2.12-mount_base_nfsv4.patch - util-linux-2.12-mount_mountfallback.patch - util-linux-2.12-mount_nfs_tcp.patch - util-linux-2.12q-mount_strict_aliasing.patch - util-linux-2.12r-mount_nfs_remount_options.patch - util-linux-2.12r-mount_rpcsec_gss.patch - util-linux-2.12r-mount_sec_manpage.patch - util-linux-2.12r-mount_umount_nosysfs.patch - util-linux-2.13-mount_nfs_timeo.patch - util-linux-mount_nfs.8.patch - util-linux-mount_warn_nfsudp.patch - -------------------------------------------------------------------- -Tue Jun 5 14:34:49 CEST 2007 - pth@suse.de - -- Update to which-2.16, mainly because regenerating configure - with newer autotools works. -- Fix the patch for AC_CHECK_STATICLIB -- Our distribution doesn't install libiberty.a, so pass - --disable-iberty to configure of which to not use a libiberty from - somewhere else. - -------------------------------------------------------------------- -Mon Jun 4 17:06:47 CEST 2007 - pth@suse.de - -- Make configure of which search for static libs in lib64 subdirs. - -------------------------------------------------------------------- -Mon Apr 23 16:49:00 CEST 2007 - mkoenig@suse.de - -- update to git20070412 -- remove chkdupexe and scriptreplay to get rid of the - perl dependency [#265757] - util-linux-2.13-build_no_perl_dependency.patch -- upstream integration of umount helper support [#252089] -- merged patches: - util-linux-2.13-misc_utils_add_man_scriptreplay.patch - util-linux-2.13-tests_missing_include.patch - -------------------------------------------------------------------- -Mon Apr 16 17:20:16 CEST 2007 - mkoenig@suse.de - -- fix initialization of offset in - util-linux-2.12r-mount_racy_loop.patch [#264225] - -------------------------------------------------------------------- -Tue Apr 10 17:25:34 CEST 2007 - mkoenig@suse.de - -- update to version git20070330 of new forked development tree -- removed Suse crypto patches for losetup [FATE#302001] -- removed binaries: - /bin/guessfstype - /sbin/sln - /usr/bin/setfdprm -- removed obsolete patches: - * guessfstype2.patch - * loop-AES-v3.0a-util-linux-2.12p.diff - * mount-nfs-nonreserved - * stupid-programmer.diff - * util-linux-nodiratime.diff - * util-linux-2.12-multipleraw.diff - * util-linux-2.12-enablereplaybuild.diff - * util-linux-2.12-mount_guessfstype.diff - * util-linux-2.12h-mtablock.diff - * util-linux-2.12i-x86_64intel.diff - * util-linux-2.12q-null.diff - * util-linux-2.12r.diff - * util-linux-2.12r-fdisk_llseek.patch - * util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff - * util-linux-2.12r-mount_external_prog_on_guess.patch - * util-linux-2.12r-nonfsmountfallback.diff - * util-linux-2.12r-pagesize.patch - * util-linux-2.12r-partx_enable.patch - * util-linux-2.12r-partx_gpt_warning.patch -- add patches: - * util-linux-2.13-misc_utils_add_man_scriptreplay.patch - install man page for scriptreplay - * util-linux-2.13-tests_missing_include.patch - fix missing header in tests/mnt_test_sysinfo.c - * util-linux-2.13-sys_utils_arch.patch - keep /bin/arch - * util-linux-2.13-build_gnu_source.patch - build with _GNU_SOURCE - * util-linux-2.13-build_fix_intel_check.patch - detect also x86_64 as INTEL architecture -- rename patches to identify them clearly by subsystem -- schedutils now part of util-linux itself - -------------------------------------------------------------------- -Wed Apr 4 12:55:40 CEST 2007 - mkoenig@suse.de - -- add Supplements line [FATE#301966] - -------------------------------------------------------------------- -Mon Mar 26 15:49:09 CEST 2007 - rguenther@suse.de - -- add ncurses-devel and zlib-devel BuildRequires - -------------------------------------------------------------------- -Thu Mar 15 17:24:34 CET 2007 - mkoenig@suse.de - -- mount: Let swapon automatically reinitialize a suspended - swap partition [#254437] - -------------------------------------------------------------------- -Thu Mar 9 11:00:11 CET 2007 - mkoenig@suse.de - -- mount: fix mtablock patch to avoid mtab corruption [#226783] - -------------------------------------------------------------------- -Thu Mar 8 17:27:22 CET 2007 - mkoenig@suse.de - -- partx: fix warning for too long literal - -------------------------------------------------------------------- -Wed Mar 7 16:58:08 CET 2007 - rguenther@suse.de - -- fix changelog entry order - -------------------------------------------------------------------- -Tue Feb 27 10:58:46 CET 2007 - mkoenig@suse.de - -- fix missing return code in - util-linux-2.12r-losetup_password.patch -- mount: fix race condition in mount -o loop [#242750] - -------------------------------------------------------------------- -Mon Feb 12 17:22:45 CET 2007 - mkoenig@suse.de - -- remove legacy warnings from fdisk [#241372] - -------------------------------------------------------------------- -Fri Feb 2 13:27:31 CET 2007 - mkoenig@suse.de - -- do not use O_EXCL for mkfs.cramfs [#241466] - -------------------------------------------------------------------- -Wed Jan 31 12:06:55 CET 2007 - mkoenig@suse.de - -- let mkfs tools open with O_EXCL [#238687] - -------------------------------------------------------------------- -Tue Dec 12 11:04:07 CET 2006 - mkoenig@suse.de - -- provide different return codes for losetup with encryption - for empty and too short passwords. [#197493] - -------------------------------------------------------------------- -Tue Dec 5 18:13:32 CET 2006 - mkoenig@suse.de - -- default swap to V1 in any case [#205956] - patch: util-linux-2.12r-mkswap_fix.patch -- do not append addr option with each nfs remount [#130625] - patch: util-linux-2.12r-nfs_remount_options.patch -- add README.largedisk about fdisk partition size constraints - [#153657] - -------------------------------------------------------------------- -Tue Nov 7 13:09:45 CET 2006 - mkoenig@suse.de - -- enable partx [#214992] - -------------------------------------------------------------------- -Tue Oct 10 18:17:42 CEST 2006 - mkoenig@suse.de - -- Round up partition end LBA to a cylinder boundary during - add_partition() [#174892] -- Fix readprofile on ppc64 [#179122] -- Fix cal formatting bug [#203469] - -------------------------------------------------------------------- -Mon Oct 9 12:27:33 CEST 2006 - mkoenig@suse.de - -- Fix llseek issues. -- swapon.c: Do not use PAGE_SIZE macro. - -------------------------------------------------------------------- -Mon Aug 21 12:10:01 CEST 2006 - mkoenig@suse.de - -- Added sysfs to list of filesystems not to unmount with - umount -a, resolves #190385 - -------------------------------------------------------------------- -Mon Jun 12 14:08:25 CEST 2006 - kay.sievers@suse.de - -- use libvolume_id from provided as a rpm by udev 094 - -------------------------------------------------------------------- -Wed May 17 23:48:27 CEST 2006 - jeffm@suse.com - -- Fixed support for calling external programs w/o -t , - it would add mtab twice [#176582] - -------------------------------------------------------------------- -Mon Apr 24 14:33:20 CEST 2006 - hvogel@suse.de - -- document xfs dmapi mount options better [#158955] - -------------------------------------------------------------------- -Fri Apr 21 15:48:16 CEST 2006 - olh@suse.de - -- add mkzimage_cmdline to edit CHRP zImage kernel cmdline (168313) - -------------------------------------------------------------------- -Tue Apr 18 16:09:46 CEST 2006 - hvogel@suse.de - -- fix number of supported raw devices [#165570] - -------------------------------------------------------------------- -Wed Mar 29 13:54:32 CEST 2006 - olh@suse.de - -- clearify comments about mac disk label handling in fdisk - -------------------------------------------------------------------- -Tue Mar 28 17:53:46 CEST 2006 - hvogel@suse.de - -- more fixes for the fdiskwrap patch [#160822] - -------------------------------------------------------------------- -Tue Mar 21 11:35:26 CET 2006 - okir@suse.de - -- Update nfs(5) manpage to document security flavors [#159368] - -------------------------------------------------------------------- -Mon Mar 20 12:14:18 CET 2006 - hvogel@suse.de - -- fix numbers of supported raw devices to match the kernel - [#158203] -- make NFSv3 client support RPCSEC_GSS [#158401] -- fix that if the user doesn't specify -t - mount.fstype will never be called. [#155147] - -------------------------------------------------------------------- -Fri Mar 10 12:07:10 CET 2006 - hvogel@suse.de - -- Fix init.d/raw script to parse device names with , in them - correctly [#155653] - -------------------------------------------------------------------- -Thu Mar 9 12:28:04 CET 2006 - hare@suse.de - -- Fix potential security hole in libvolume_id (#133256) - -------------------------------------------------------------------- -Mon Mar 6 12:03:35 CET 2006 - hvogel@suse.de - -- patch fdiskmaclabel.h too - -------------------------------------------------------------------- -Thu Mar 2 15:49:06 CET 2006 - hvogel@suse.de - -- axboe made fdisk not wrap at 2TB [#153657] - -------------------------------------------------------------------- -Fri Feb 17 15:25:39 CET 2006 - lmuelle@suse.de - -- Use cifs instead of smbfs if the source starts with // and we do not set a - different fs type. - -------------------------------------------------------------------- -Sun Feb 12 12:40:21 CET 2006 - olh@suse.de - -- cosmetic fix for option_hotplug declaration - fix unininitalized string for unknown filesystems (#148855) - -------------------------------------------------------------------- -Fri Feb 10 14:00:48 CET 2006 - hvogel@suse.de - -- mount should not put / in the mtab twice if mount -f / is called - [#148409] -- fix hostid printf [#149163] - -------------------------------------------------------------------- -Wed Feb 1 03:58:58 CET 2006 - olh@suse.de - -- dont invent our own MS_FLAGS (#147132) - -------------------------------------------------------------------- -Wed Feb 1 02:20:17 CET 2006 - ro@suse.de - -- fix typo in previous change, binary negation is "~" - -------------------------------------------------------------------- -Fri Jan 27 13:02:36 CET 2006 - sscheler@suse.de - -- fixed mount hotplug option (#143352). now we don't send the - MS_HOTPLUG flag to the kernel any longer, because the kernel - doesn't know this option (EINVAL) and actually doesn't need to - know about it. - -------------------------------------------------------------------- -Fri Jan 27 12:55:29 CET 2006 - olh@suse.de - -- remove clock symlink, hwclock exists since 7 years - -------------------------------------------------------------------- -Fri Jan 27 11:46:17 CET 2006 - olh@suse.de - -- lsprop and nvsetenv moved to powerpc-utils [#144758] - -------------------------------------------------------------------- -Thu Jan 26 13:06:51 CET 2006 - hvogel@suse.de - -- Make nfsboot world readable [#145418] - -------------------------------------------------------------------- -Wed Jan 25 21:31:03 CET 2006 - mls@suse.de - -- converted neededforbuild to BuildRequires - -------------------------------------------------------------------- -Tue Jan 24 17:06:22 CET 2006 - mmj@suse.de - -- Remove faulty nfs fallback code [#139019] - -------------------------------------------------------------------- -Mon Jan 16 11:25:28 CET 2006 - mmj@suse.de - -- Add patch for nsetenv to fix short reads/short writes [#142546] - -------------------------------------------------------------------- -Wed Jan 11 12:46:28 CET 2006 - mmj@suse.de - -- Update sm-notify [#141542] - -------------------------------------------------------------------- -Wed Jan 4 13:52:31 CET 2006 - mmj@suse.de - -- Update to 2.12r including since 2.12q: - o cfdisk: fix a segfault with ReiserFS partitions - o umount: disallow -r option for non-root users - -------------------------------------------------------------------- -Tue Nov 22 11:49:39 CET 2005 - mmj@suse.de - -- install proper renice manpage [#132470] - -------------------------------------------------------------------- -Tue Nov 15 17:01:34 CET 2005 - uli@suse.de - -- umount2 is not static (only fails on ARM, surprisingly) -- added ARM ionice syscalls - -------------------------------------------------------------------- -Fri Nov 11 10:42:35 CET 2005 - hare@suse.de - -- Fix reverse-mapping of by-UUID and by-LABEL mounts. - -------------------------------------------------------------------- -Thu Nov 10 09:04:17 CET 2005 - hare@suse.de - -- Fix a mishandling of by-UUID mounts. -- Use libvolume_id from udev. - -------------------------------------------------------------------- -Sat Oct 22 17:55:16 CEST 2005 - mmj@suse.de - -- Increase lsprop.c max property size to 4k [#128155] - -------------------------------------------------------------------- -Mon Oct 10 12:44:05 CEST 2005 - mmj@suse.de - -- Add -fno-strict-aliasing to nfsmount_xdr.c - -------------------------------------------------------------------- -Mon Oct 3 09:55:56 CEST 2005 - mmj@suse.de - -- Teach the mount manual page about nodiratime [#118987] - -------------------------------------------------------------------- -Thu Sep 29 12:42:03 CEST 2005 - mmj@suse.de - -- Patch from jakub007@go2.pl to make mount --move update - /etc/mtab correctly [#115129] - -------------------------------------------------------------------- -Tue Sep 13 14:16:58 CEST 2005 - mmj@suse.de - -- Only allow root to pass -r to umount [#116741] - -------------------------------------------------------------------- -Mon Sep 5 13:18:27 CEST 2005 - mmj@suse.de - -- MAC -> Mac [#104081] - -------------------------------------------------------------------- -Fri Sep 2 13:48:17 CEST 2005 - mmj@suse.de - -- Don't package manual executable [#114849] - -------------------------------------------------------------------- -Thu Sep 1 10:56:25 CEST 2005 - mmj@suse.de - -- Add patch for device-mapper mount by label support [#75966] - -------------------------------------------------------------------- -Thu Sep 1 00:12:39 CEST 2005 - ro@suse.de - -- provide and obsolete schedutils - -------------------------------------------------------------------- -Tue Aug 23 18:00:01 CEST 2005 - hvogel@suse.de - -- update ionice patch by axboe so that ionice will complain about - missing sys_ioprio_set support, but it will still - execute the process. - -------------------------------------------------------------------- -Mon Aug 22 17:06:42 CEST 2005 - hvogel@suse.de - -- Fix rpm verify output [#105807] - (ghost entry for /var/lib/nfs/state) - -------------------------------------------------------------------- -Mon Aug 22 16:27:16 CEST 2005 - schwab@suse.de - -- Fix stupid buffer overflow bug in cfdisk [#66020]. - -------------------------------------------------------------------- -Wed Aug 17 12:59:24 CEST 2005 - hare@suse.de - -- Add option 'hotplug' to mount (#104405) - -------------------------------------------------------------------- -Mon Aug 15 16:33:48 CEST 2005 - schwab@suse.de - -- Always build with RPM_OPT_FLAGS. - -------------------------------------------------------------------- -Thu Aug 11 14:41:18 CEST 2005 - mmj@suse.de - -- Patch from Patrick Kirsch to make fdisk detect MAC-fs [#104081] - -------------------------------------------------------------------- -Wed Aug 3 20:50:59 CEST 2005 - mmj@suse.de - -- Merge schedutils to here (it's happened upstream already) - -------------------------------------------------------------------- -Tue Aug 2 08:47:47 CEST 2005 - mmj@suse.de - -- Support for s390 and s390x - -------------------------------------------------------------------- -Mon Aug 1 20:04:13 CEST 2005 - mmj@suse.de - -- It's not __ppc_ and __ppc64__ but __powerpc__ and __powerpc64__ - -------------------------------------------------------------------- -Mon Aug 1 12:17:39 CEST 2005 - mmj@suse.de - -- Add ionice binary from Jens Axboe - -------------------------------------------------------------------- -Wed Jun 29 11:26:31 CEST 2005 - mmj@suse.de - -- Document load and clearly issues about NFS over UDP [#80263] -- Don't compile with -fsigned-char [#93886] - -------------------------------------------------------------------- -Tue May 31 13:26:05 CEST 2005 - okir@suse.de - -- Added NFSv4 support - -------------------------------------------------------------------- -Mon May 9 17:27:59 CEST 2005 - hvogel@suse.de - -- move hashalot and cryptsetup tools to util-linux-crypto - -------------------------------------------------------------------- -Tue Apr 12 16:13:57 CEST 2005 - mmj@suse.de - -- bump TCP timeo to 600 [#76198] - -------------------------------------------------------------------- -Tue Mar 29 13:43:31 CEST 2005 - mmj@suse.de - -- Add awareness of twofishSL92 [#74359] -- Update hashalot to version 0.3 - -------------------------------------------------------------------- -Mon Mar 14 15:30:49 CET 2005 - okir@suse.de - -- Changed sm-notify to recognize host names as well as addresses. - -------------------------------------------------------------------- -Thu Mar 10 11:28:21 CET 2005 - mmj@suse.de - -- Don't strip anything explicitly -- Don't compile with -fno-strict-aliasing [#66020] - -------------------------------------------------------------------- -Fri Feb 4 14:48:27 CET 2005 - schwab@suse.de - -- Fix stupid programmer. - -------------------------------------------------------------------- -Mon Jan 24 17:01:51 CET 2005 - meissner@suse.de - -- implicit strcmp / strerror in setctsid fixed. -- 0 -> NULL in an execl - -------------------------------------------------------------------- -Fri Jan 21 14:37:21 CET 2005 - mmj@suse.de - -- Sleep after inserting the raw module to make sure it's ready [#49807] -- Update to 2.12q including since 2.12p: - o New upstream maintainer - Adrian Bunk - o sfdisk: add -G option - o Updated translations - -------------------------------------------------------------------- -Tue Jan 18 17:04:30 CET 2005 - okir@suse.de - -- Updated sm-notify; try not to stall bootup my moving the NSM - state update after we've backgrounded (#49072). - -------------------------------------------------------------------- -Mon Jan 10 14:45:12 CET 2005 - mmj@suse.de - -- Update adjtimex to 1.20 -- Update to util-linux-2.12p including since 2.12i: - o cfdisk: fix number of new partition when partitions not in disk order - o fdisk: fix Sun label handling in sector mode - o mkfs: never truncate filename (not that that ever happened) - o more: fix redraw flaw - o lomount: revert patch from 2.12j - o lptune.8: -T option is obsolete - o mkswap, mkswap.8, swapon: support labels - o umount: allow user unmounting repeatedly mounted nfs mounts - o cfdisk: recognize JFS, support reiserfs labels - o mount: fix option parsing bug - o mount.8: several updates - o swapon.8: document -v option - o Makefile: remove cat-id-tbl.c upon make clean - o fdisk: fixed a bug that would cause a non-update of a sun disklabel - o fdisk: use sectorsize instead of 512 for SGI - o hwclock: actually use HAVE_tm_gmtoff - o swapon: fix priority handling - o umount: refuse to unmount an empty string - o configure, MCONFIG: detect gcc 3.4.0 and use -mtune option - o configure: do not run ./conftest (for cross compilation) - o fsck.cramfs: try to get correct PAGE_CACHE_SIZE - o losetup: try to give better error messages - o readprofile: default map file is /boot/System.map - o rdev.8: added historical info on ramdisk - o cal: highlight today - o lomount: stop reading passwd at NUL, fix lo_encrypt key_size - o losetup: add -f option to find an unused loop device - o more: code cleanup - o mount: add "group" mount option - o sfdisk: fix 2.6.8 BLKRRPART ioctl damage - o swapon: let swapon -a skip the swapfiles marked "noauto" - o umount: fix problem with empty mtab - o umount: use special umount program if it exists - o new flock binary - o New messages - -------------------------------------------------------------------- -Tue Nov 30 11:02:32 CET 2004 - mmj@suse.de - -- Install ramsize, rdev, rootflags and vidmode on x86-64 [#48633] - -------------------------------------------------------------------- -Fri Nov 12 15:01:36 CET 2004 - schwab@suse.de - -- Don't install *fdisk on ia64. - -------------------------------------------------------------------- -Fri Nov 12 14:50:24 CET 2004 - ro@suse.de - -- correct permissions handling for wall and write - -------------------------------------------------------------------- -Tue Nov 9 16:00:23 CET 2004 - mmj@suse.de - -- Fix segfault with mount -l [#48029] - -------------------------------------------------------------------- -Fri Nov 5 11:36:16 CET 2004 - mmj@suse.de - -- Update to util-linux-2.12i including: - o MCONFIG: fix build conditions - o chfn, chsh: add error checking - o cytune: use local header cyclades.h - o fdisk: fix default SGI volume header size - o fstab.c: use strsignal() instead of sys_siglist[] - o hwclock: use when available on i386 - o hwclock: dont try KDGHWCLK on archs other than __m68k__ - o sfdisk: correct typo in __attribute__used nonsense - o sfdisk: use PACKED on __arm__ - o sfdisk: fix warning printout - -------------------------------------------------------------------- -Thu Nov 4 08:37:19 CET 2004 - mmj@suse.de - -- Update to util-linux-2.12h including: - o cfdisk: avoid crash if no partition table - o elvtune: tell user that this only works on 2.4 kernels - o lomount: clear passwords after use - o mount: accept comments (specified by comment=) in fstab - o mount: support ocfs, ocfs2 - o [u]mount: be more careful with malloc, try to avoid OOM with - many mounts - o sfdisk: __attribute__used nonsense to support gcc 3.4 - o shutdown: do not unmount various virtual filesystems - o mount.8: added recent ext2 mount options - o mount: support jfs mount-by-label, improve reiserfs support - o sfdisk: remove strange "ends in a digit" heuristic - o *fdisk: use common disksize() routine - -------------------------------------------------------------------- -Tue Oct 19 10:24:13 CEST 2004 - mmj@suse.de - -- Add patch from SGI for fdisk label [#47368] - -------------------------------------------------------------------- -Tue Sep 28 11:18:50 CEST 2004 - mmj@suse.de - -- And another one [#46201] - -------------------------------------------------------------------- -Wed Sep 15 23:11:56 CEST 2004 - mmj@suse.de - -- Add patch from Andries to fix cfdisk [#44996] - -------------------------------------------------------------------- -Tue Sep 7 07:32:39 CEST 2004 - mmj@suse.de - -- Update to util-linux-2.12c including: - o mount.8: added recent ext2 mount options - o mount: support jfs mount-by-label, improve reiserfs support - o sfdisk: remove strange "ends in a digit" heuristic - o *fdisk: use common disksize() routine [#44678] - -------------------------------------------------------------------- -Wed Aug 25 12:54:00 CEST 2004 - mmj@suse.de - -- Update to util-linux-2.12b including: - o chsh: improved error message - o dmesg: ask kernel proper buffer size - o losetup: handle 64-bit offsets - o blockdev: also report BLKGETSIZE64 result [#43464] - o blockdev, elvtune, fdisk: handle new kernel _IOR,_IOW defines - o fdisk: remove strange "ends in a digit" heuristic - o fdisk: also list Solaris as possible type for 0x82 - o mount: added --rbind option - o mount: use blkid library - o mount: support reiserfs mount by label - o mount: attempt to use the right definition of dev_t in struct - loopinfo - o mount.8: jfs mount options added - o readprofile: new -s option - o rename.1: added ref to mmv.1 - o replay: renamed to scriptreplay; correct typos - o script: do not use locale for time delay floating point number - format - o sfdisk: error messages to stderr - o New Catalan, Dutch, Finnish, French, German, Spanish, Swedish, - Turkish, Ukrainian messages -- Update the loop-AES patch, thanks to Sumit Bose -- Change the minimum password length to 8 chars - -------------------------------------------------------------------- -Tue Aug 24 08:03:24 CEST 2004 - mmj@suse.de - -- Fix signed/unsigned bug in lsprop [#44048] - -------------------------------------------------------------------- -Wed Aug 18 15:56:01 CEST 2004 - mmj@suse.de - -- Readd patch that got lost to make fdisk -l work better with - RAID controllers [#43485] - -------------------------------------------------------------------- -Mon Aug 9 11:06:34 CEST 2004 - mmj@suse.de - -- Add an improved version of the dmesg bufsize patch. - -------------------------------------------------------------------- -Tue Jun 22 15:50:05 CEST 2004 - mmj@suse.de - -- Add patch to try and guess a filesystem type before blindly - assuming it's nfs because of the colon [#42097] - -------------------------------------------------------------------- -Mon Jun 14 19:21:08 CEST 2004 - agruen@suse.de - -- Formatting error in mount.8 manual page. - -------------------------------------------------------------------- -Wed Jun 9 15:17:47 CEST 2004 - mmj@suse.de - -- Add patch from Olaf Kirch to make protocol selection for mount - independent of protocol selection for NFS, and picks what is - available (preferring TCP over UDP) [#41735] - -------------------------------------------------------------------- -Wed Jun 9 12:10:03 CEST 2004 - mls@suse.de - -- add '-f' option to setctsid - -------------------------------------------------------------------- -Thu May 27 15:07:13 CEST 2004 - okir@suse.de - -- sm-notify now binds to a reserved port - -------------------------------------------------------------------- -Sat May 15 16:15:00 CEST 2004 - mmj@suse.de - -- Add documentation about raw device handling [#39037] - -------------------------------------------------------------------- -Mon May 10 14:40:43 CEST 2004 - mmj@suse.de - -- Make dmesg dump entire buffer. Patch from Andries/odabrunz [#39761] - -------------------------------------------------------------------- -Wed May 6 10:05:16 CEST 2004 - mmj@suse.de - -- Also check if the device is the same when doing swapon. Could be - the same block device with 2 different names [#39436] - -------------------------------------------------------------------- -Wed May 5 11:12:47 CEST 2004 - mmj@suse.de - -- Do a /sbin/modprobe raw when invoking raw devices [#39037] - -------------------------------------------------------------------- -Tue Apr 20 09:28:09 CEST 2004 - mmj@suse.de - -- Update to 2.12a including: - o fdisk: fix for kernels 2.4.15-2.4.17 - o fdisk: fix when all partitions are in use - o hwclock: add a timeout when waiting for a clock update - o ipcs: compilation fix - o ipcs: shminfo.shmall gives pages - o mount: efs support - o partx: bigendian fix - o readprofile: support for 64-bit addresses - o setterm: fix klogctl error message - o setterm.1: clarification - o sfdisk: fix check for is_ide_cdrom_or_tape - o umount: skip proc, devfs, devpts on umount -a - -------------------------------------------------------------------- -Mon Apr 19 11:52:54 CEST 2004 - mmj@suse.de - -- Add patch for unlimited raw devices [#39037] - -------------------------------------------------------------------- -Thu Apr 15 11:08:50 CEST 2004 - mmj@suse.de - -- Make sm-notify be more quiet when nothing wrong, and log to sys- - log when something is. - -------------------------------------------------------------------- -Tue Apr 6 14:45:36 CEST 2004 - mmj@suse.de - -- Don't use startproc for sm-notify [#38481] - -------------------------------------------------------------------- -Mon Apr 5 14:55:39 CEST 2004 - mmj@suse.de - -- Removing elvtune alltogether was a bit drastic, since it of - course works fine with 2.4 kernels. So print a warning in case - the BLKELVGET ioctl returns something indicating 2.6 kernels. - -------------------------------------------------------------------- -Thu Apr 1 19:50:47 CEST 2004 - mmj@suse.de - -- Don't package elvtune anymore since it's obsolete now that io - scheduler can be tuned in /sys/block/hdX/queue/iosched/* [#37869] - -------------------------------------------------------------------- -Wed Mar 31 11:19:28 CEST 2004 - mmj@suse.de - -- Apply util-linux-2.12a fixes for hwclock and readprofile. The - hwclock bit is a timout fix which hopefully fixes [#35877] -- Move sm-notify to here from nfs-utils [#36737] - -------------------------------------------------------------------- -Mon Mar 29 13:26:20 CEST 2004 - mmj@suse.de - -- Adjust warnings about Crypto-API - -------------------------------------------------------------------- -Sun Mar 28 11:00:24 CEST 2004 - mmj@suse.de - -- Add patch to make script allways use the same LC_NUMERIC [#35476] - -------------------------------------------------------------------- -Fri Mar 26 21:38:27 CET 2004 - od@suse.de - -- Add setctsid by Werner Fink [#37177] - -------------------------------------------------------------------- -Fri Mar 26 15:07:00 CET 2004 - mmj@suse.de - -- Mount option "code" is now "codepage" so update /etc/fstab in - postinstall [#36950] - -------------------------------------------------------------------- -Fri Mar 26 11:49:01 CET 2004 - mmj@suse.de - -- Remove false statement in nfs.5 about the linux kernel not - supporting nfs over tcp [#37060] - -------------------------------------------------------------------- -Wed Mar 17 21:41:17 CET 2004 - mmj@suse.de - -- Use correct permissions for README.hashalot [#36303] - -------------------------------------------------------------------- -Mon Mar 8 10:51:46 CET 2004 - mmj@suse.de - -- Enable build of replay [#35434] - -------------------------------------------------------------------- -Wed Feb 25 14:07:15 CET 2004 - mmj@suse.de - -- Use loop-AES-v2.0f-util-linux-2.12.diff instead of losetup patch - added earlier. Thanks Sumit Bose! - -------------------------------------------------------------------- -Thu Feb 19 09:54:03 CET 2004 - mmj@suse.de - -- Add cryptsetup script from Christophe Saout, for usage with the - new dm-crypt. - -------------------------------------------------------------------- -Mon Feb 16 15:32:57 CET 2004 - mmj@suse.de - -- Add losetup patch and hashalot program from Ben Slusky - -------------------------------------------------------------------- -Sun Feb 1 14:11:51 CET 2004 - kukuk@suse.de - -- Remove newgrp again (will use POSIX conform version) - -------------------------------------------------------------------- -Fri Jan 16 13:26:55 CET 2004 - kukuk@suse.de - -- Add pam-devel to neededforbuild - -------------------------------------------------------------------- -Mon Jan 12 11:31:47 CET 2004 - mmj@suse.de - -- Adjust the nfs.5 manual page to reflect we're mounting nfs over - tcp pr. default. -- Collapse two similar patches 2 one. - -------------------------------------------------------------------- -Fri Dec 19 16:43:39 CET 2003 - garloff@suse.de - -- Fix by okir for previous patch. - -------------------------------------------------------------------- -Fri Dec 19 11:19:43 CET 2003 - garloff@suse.de - -- Add patch to fallback to UDP if TCP NFS mount fails. - -------------------------------------------------------------------- -Tue Dec 2 09:03:32 CET 2003 - mmj@suse.de - -- Make patch to guess if a CD is a CD-Extra [#30316] -- Adjust patch that moves ext2/3 in front of vfat -- Regenerate patches (filename still tells when they were added) - -------------------------------------------------------------------- -Tue Nov 18 13:57:28 CET 2003 - mmj@suse.de - -- Mount NFS over TCP pr. default [#33018] - -------------------------------------------------------------------- -Thu Nov 13 14:43:39 CET 2003 - mmj@suse.de - -- Update to util-linux-2.12 including: - o losetup: -p option specifies fd for passphrase - o fdisk: sgi layout fix - o mount: -p option specifies fd for passphrase - o mount: recognize some PCDOS floppies - o umount: in "umount name", first try to interpret "name" as a mount point - o translations updates for several languages - o cfdisk: localize the Y/N answer, improve printing localized messages - o cfdisk: make various variables long long - some disks are close to 2 TB - o cfdisk: use BLKGETSIZE64 - o fdisk: make various variables unsigned to lengthen the life of 32-bit vars - o fdisk: some sgi fixes - o fdisk: k=1000, K=1024 - o fdisk: removed last occurrences of HDIO_REQ - o fdisk: use BLKGETSIZE64 - o hwclock: fix rtc test - o login: set a timeout on printing the timeout message - o md5: x86_64 fix - o more: POSIX fixes - o mount: do not supply MS_MGC_VAL when there are conflicting flags - o mount: ncp and smb are called smbfs and ncpfs - global change - o mount: add support for xvm mount by label - o mount: correct hfs magic recognition - o mount: keep original umask - it influences the mount call - o raw.8: documented unbinding of raw devices - o readprofile: fixed off-by eight error - o script: add -c option - o sfdisk.8: added an example of partitioning with logical partitions - o sfdisk: only add a AA55 signature for DOS-type partition tables - o tailf: new - -------------------------------------------------------------------- -Tue Oct 21 15:49:01 CEST 2003 - mmj@suse.de - -- Correct permissions - -------------------------------------------------------------------- -Tue Oct 21 14:53:54 CEST 2003 - ja@suse.cz - -- added support for cryptoloop in 2.6.x kernels. - -------------------------------------------------------------------- -Wed Oct 15 13:20:54 CEST 2003 - mmj@suse.de - -- Don't build as root - -------------------------------------------------------------------- -Mon Oct 13 21:44:43 CEST 2003 - kukuk@suse.de - -- Enable newgrp - -------------------------------------------------------------------- -Thu Oct 2 11:31:14 CEST 2003 - kukuk@suse.de - -- Fix compiling with kernel 2.6.0-test6 header files - -------------------------------------------------------------------- -Tue Aug 12 15:27:20 CEST 2003 - mmj@suse.de - -- Update to pmac-utils-2.1 sources and only include nvsetenv - -------------------------------------------------------------------- -Tue Aug 12 12:38:18 CEST 2003 - mmj@suse.de - -- Add mount_guessfstype support for PCDOS [#27814] - -------------------------------------------------------------------- -Wed Jun 18 16:16:15 CEST 2003 - ak@suse.de - -- support noreserved option for NFS (#27428) - -------------------------------------------------------------------- -Thu Jun 5 14:06:51 CEST 2003 - mmj@suse.de - -- Rearrange the specfile wrt. archs - -------------------------------------------------------------------- -Tue May 13 11:20:26 CEST 2003 - mmj@suse.de - -- Use %defattr -- Remove files we don't package - -------------------------------------------------------------------- -Wed May 7 15:38:56 CEST 2003 - mmj@suse.de - -- Rearrange the do_guess_fstype() code to look for ext2/3 before - vfat [#26581] - -------------------------------------------------------------------- -Thu Apr 24 12:20:23 CEST 2003 - ro@suse.de - -- fix install_info --delete call and move from preun to postun - -------------------------------------------------------------------- -Mon Apr 14 15:12:27 CEST 2003 - pthomas@suse.de - -- Get rid of the syscall for adjtimex in selective cases and - just call the glibc wrapper. Fixes build on s390. - -------------------------------------------------------------------- -Mon Apr 14 10:35:38 CEST 2003 - pthomas@suse.de - -- Use geteuid instead of getuid in hwclock to enable making - hwclock suid root. - -------------------------------------------------------------------- -Mon Apr 7 15:40:54 CEST 2003 - mmj@suse.de - -- Only delete info entries when removing last version. - -------------------------------------------------------------------- -Thu Mar 13 11:29:54 CET 2003 - mmj@suse.de - -- Apply patch to make sfdisk not destroy BSD slices [#25093] - -------------------------------------------------------------------- -Mon Mar 3 16:19:04 CET 2003 - mmj@suse.de - -- Remove superflous umask(033); calls [#23292] - -------------------------------------------------------------------- -Mon Mar 3 12:27:01 CET 2003 - ro@suse.de - -- add missing info dir entries - -------------------------------------------------------------------- -Tue Feb 18 14:29:45 CET 2003 - agruen@suse.de - -- Add description of the effect of `mount -t nfs -o noacl' on - the use of the GETACL and SETACL remote procedure calls to - the nfs(5) manual page. - -------------------------------------------------------------------- -Mon Feb 17 15:44:28 CET 2003 - mmj@suse.de - -- It's called smbfs not smb [#23697] - -------------------------------------------------------------------- -Thu Feb 13 06:17:02 CET 2003 - mmj@suse.de - -- Readd patch for passphrase timeout that got lost [#23527] - -------------------------------------------------------------------- -Fri Feb 7 12:24:12 CET 2003 - mmj@suse.de - -- The install_info macros need PreReq: %install_info_prereq - -------------------------------------------------------------------- -Fri Feb 7 01:30:53 CET 2003 - ro@suse.de - -- added install_info macros - -------------------------------------------------------------------- -Tue Feb 4 22:34:10 CET 2003 - ro@suse.de - -- don't package /bin/kill (part of coreutils now) - -------------------------------------------------------------------- -Tue Feb 4 12:40:00 CET 2003 - meissner@suse.de - -- Include tarball with pmac-utils manpages, so we do not need - sgmltool and all its dependents. - -------------------------------------------------------------------- -Wed Jan 29 11:52:19 CET 2003 - mmj@suse.de - -- Update to util-linux-2.11z including: - * Translation updates - * mount: fix LABEL= handling for user umount, don't abort on read - error with photocds and add dmask and fmask vfat mount options - * setterm: accept devfs name - * simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails - * umount: allow user umount after mount by label or uuid - -------------------------------------------------------------------- -Wed Jan 22 15:10:24 CET 2003 - sf@suse.de - -- removed last patch, added new (correct) patch - -------------------------------------------------------------------- -Wed Jan 22 12:48:30 CET 2003 - sf@suse.de - -- removed eliminate_doubles() from mkfs.cramfs.c - for x86_64, as it segfaults. - (makes the images slightly larger, about 10%) - -------------------------------------------------------------------- -Tue Jan 21 14:51:29 CET 2003 - mmj@suse.de - -- Added description of ISO mount options to mount.8 [#22915] - -------------------------------------------------------------------- -Mon Dec 2 12:21:38 CET 2002 - mmj@suse.de - -- Update the ReiserFS patch from Chris Mason - -------------------------------------------------------------------- -Fri Nov 29 10:38:02 CET 2002 - mmj@suse.de - -- Fix missing #include - -------------------------------------------------------------------- -Thu Nov 28 15:03:05 CET 2002 - mmj@suse.de - -- Make readprofile also try to locate the System.map in - /boot/System.map-`uname -r` [#22168] - -------------------------------------------------------------------- -Wed Nov 27 11:01:52 CET 2002 - mmj@suse.de - -- Update to util-linux-2.11y including: - o Translation updates - o fdisk,cfdisk: cosmetic fixes - o mount,umount: fix LABEL= handling for non-root [#17322] - o more: kill external help file - o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC - fails (patch we had, now folded upstream) - -------------------------------------------------------------------- -Wed Nov 20 12:19:33 CET 2002 - mmj@suse.de - -- Update to util-linux-2.11x including: - o Translation updates for several languages - o cfdisk: correct error printout - o fdisk: allow addition of a new partition when logicals all used - but primary free - o hwclock: detect systime jumps backward during setting hwclock - o Merge of the cramfs bloksize patch - o mount: new --rbind flag, for recursive loopback mounts - o mount, umount: new -O option - o setpwnam.c: open temp pw file with O_EXCL - o simpleinit: fix for "spawn too fast" - o swapon: new -e option - -------------------------------------------------------------------- -Tue Nov 19 20:12:02 CET 2002 - mmj@suse.de - -- Fix multistring assignment in adjtimex - -------------------------------------------------------------------- -Mon Nov 11 11:26:14 CET 2002 - ro@suse.de - -- changed neededforbuild to -- changed neededforbuild to <> - -------------------------------------------------------------------- -Thu Oct 31 14:59:11 CET 2002 - mmj@suse.de - -- Add -b option to mkfs.cramfs (needed for biarch architectures) - -------------------------------------------------------------------- -Thu Oct 31 00:40:09 CET 2002 - ro@suse.de - -- hack time to build on alpha - -------------------------------------------------------------------- -Tue Oct 22 16:13:36 CEST 2002 - mmj@suse.de - -- Add correction to the ReiserFS patch that fixes the case where it - was possible but unlikely to detect a logged copy of a super on a - dedicated logging device as the real thing. From Chris Mason. - -------------------------------------------------------------------- -Tue Oct 22 14:13:30 CEST 2002 - mmj@suse.de - -- Update to util-linux-2.11w including: - o fdisk and cfdisk fixes - o more bigendian fix - o translation updates - o > 2GB swapspace - o mount umask, cramfs and ocfs stuff - -------------------------------------------------------------------- -Tue Oct 8 17:13:18 CEST 2002 - mmj@suse.de - -- Only enable below patch on ix86 and x86_64 - -------------------------------------------------------------------- -Mon Oct 7 16:35:24 CEST 2002 - mmj@suse.de - -- Make small bugfix to below patch - -------------------------------------------------------------------- -Sat Oct 5 01:27:51 CEST 2002 - mmj@suse.de - -- Apply patch to enable > 2GB swap (redhat) [#20533] - -------------------------------------------------------------------- -Wed Oct 2 15:27:47 CEST 2002 - mmj@suse.de - -- Add one-liner security fix to mount and umount. - -------------------------------------------------------------------- -Mon Sep 23 09:47:33 CEST 2002 - mmj@suse.de - -- Readd fix for klogconsole that got lost [#19834] - -------------------------------------------------------------------- -Fri Sep 13 12:55:24 CEST 2002 - mmj@suse.de - -- Added patch from Oracle to mount ocfs by label [#19262] - -------------------------------------------------------------------- -Thu Sep 12 18:06:21 CEST 2002 - mmj@suse.de - -- more: Do not cast char * to int and back [#18896] - -------------------------------------------------------------------- -Sat Aug 31 17:58:26 CEST 2002 - olh@suse.de - -- add mount_cramfs_be.diff to allow mount -oloop cramfsfile loopdir - -------------------------------------------------------------------- -Mon Aug 26 16:56:52 CEST 2002 - mmj@suse.de - -- Make mode not 666 when writing /etc/mtab [#18342] - -------------------------------------------------------------------- -Mon Aug 26 13:21:30 CEST 2002 - meissner@suse.de - -- quieten klogconsole if the console does not support TIOCLINUX [#12516] - -------------------------------------------------------------------- -Thu Aug 22 15:05:32 CEST 2002 - mmj@suse.de - -- Added patch from Andreas Gruenbacher for nfs-access-acl [#18183] - -------------------------------------------------------------------- -Wed Aug 21 10:33:05 CEST 2002 - mmj@suse.de - -- Fixed an mtab locking bug with patch from Olaf Kirch [#17637] - -------------------------------------------------------------------- -Mon Aug 19 16:46:54 CEST 2002 - mmj@suse.de - -- Updated reiserfs patch from Chris Mason -- Added patch for mount.8, thanks Andreas Gruenbacher - -------------------------------------------------------------------- -Thu Aug 15 19:56:31 CEST 2002 - mmj@suse.de - -- Correct PreReq: - -------------------------------------------------------------------- -Mon Aug 5 10:45:05 CEST 2002 - mmj@suse.de - -- Update to 2.11u which includes: - o Danish, German, Spanish, Swedish and Turkish updates. - o configure: for fsck.cramfs, mkfs.cramfs: add test for libz - o text-utils/Makefile: pg fix - o agetty: use same test as login does to find utmp entry - o fdisk: fix for fdisk on empty disk - o mount updates - -------------------------------------------------------------------- -Tue Jul 23 21:10:27 CEST 2002 - schwab@suse.de - -- Fix mkfs.cramfs for architectures with non-4k pages. - -------------------------------------------------------------------- -Wed Jul 17 00:34:49 CEST 2002 - mmj@suse.de - -- Merged base into util-linux - -------------------------------------------------------------------- -Mon Jul 15 10:23:51 CEST 2002 - mmj@suse.de - -- Added JFSv2 patch from Christoph Hellwig for volume label. Does - for JFS, what below patch does for ReiserFS. - -------------------------------------------------------------------- -Sun Jul 14 19:04:16 CEST 2002 - adrian@suse.de - -- fix ul-2.10m-sgi-fdisk.diff patch to apply again - -------------------------------------------------------------------- -Thu Jul 11 10:36:16 CEST 2002 - mmj@suse.de - -- Added patch from Chris Mason for volume label on reiserfs - -------------------------------------------------------------------- -Wed Jul 10 15:31:53 CEST 2002 - olh@suse.de - -- add mkfs.cramfs and fsck.cramfs to file list - -------------------------------------------------------------------- -Wed Jul 10 15:12:48 CEST 2002 - mmj@suse.de - -- Fixed nfs.5 to tell nfsver defaults to 3 [#16815] - -------------------------------------------------------------------- -Mon Jul 8 21:16:07 CEST 2002 - mmj@suse.de - -- Update to 2.11t which includes - * fdformat: remove test on major - * fdisk, hwclock and swap polishing - * Lots of translations - * cramfs tools includes from the kernel - * swap{on,off} honours /proc/swaps - * mount small fixups - -------------------------------------------------------------------- -Fri Jul 5 11:10:06 CEST 2002 - kukuk@suse.de - -- Use %ix86 macro - -------------------------------------------------------------------- -Mon Jul 1 14:23:38 CEST 2002 - bk@suse.de - -- get raw built on s390 and s390x -- remove %ifarchs s390 s390x for fdisk(needed for SCSI disks) - -------------------------------------------------------------------- -Mon Jun 17 10:52:49 CEST 2002 - mmj@suse.de - -- Added a fix for simpleinit exploit. - -------------------------------------------------------------------- -Thu Jun 13 17:01:38 CEST 2002 - olh@suse.de - -- disable hwclock ppc patch, maybe obsolete with recent kernels - -------------------------------------------------------------------- -Thu May 16 12:57:53 CEST 2002 - mmj@suse.de - -- Added manpage guessfstype(8) - -------------------------------------------------------------------- -Thu May 9 19:07:21 CEST 2002 - mmj@suse.de - -- Updated to util-linux-2.11r, including translations, x86-64 sup- - port and small bugfixes. - -------------------------------------------------------------------- -Sat Apr 13 14:19:46 CEST 2002 - mmj@suse.de - -- Updated to util-linux-2.11q, includes bugfixes. -- util-linux-mkswap.patch for ia64 was folded into mainline - -------------------------------------------------------------------- -Fri Apr 12 16:49:38 CEST 2002 - stepan@suse.de - -- added x86-64 support. - -------------------------------------------------------------------- -Thu Apr 4 20:06:09 CEST 2002 - ihno@suse.de - -- corrected printf to report shared memories sizes bigger than - 2 GByte correct (Bug #15585). It was reportet on s390x, but - should effect other 64-Bit systems as well. - -------------------------------------------------------------------- -Tue Mar 19 13:41:04 MET 2002 - mmj@suse.de - -- Updated to 2.11o. The hexdump patch have been dropped since it - was folded to mainline util-linux. - -------------------------------------------------------------------- -Fri Mar 15 12:08:15 CET 2002 - schwab@suse.de - -- Fix mkswap for ia64. - -------------------------------------------------------------------- -Mon Mar 4 16:21:41 MET 2002 - draht@suse.de - -- permissions fixes for write(1) and wall(1) - -------------------------------------------------------------------- -Fri Feb 1 14:46:45 CET 2002 - mmj@suse.de - -- Moved /usr/bin/logger to /bin/logger (needed by sysconfig) - -------------------------------------------------------------------- -Mon Jan 28 13:59:26 CET 2002 - mmj@suse.de - -- Added the guessfstype binary from msvec/fehr - -------------------------------------------------------------------- -Thu Jan 24 10:16:37 CET 2002 - ro@suse.de - -- modified fillup_and_insserv call (perl-hack not needed here) - -------------------------------------------------------------------- -Mon Jan 21 17:08:17 CET 2002 - mmj@suse.de - -- Merge NetBSD hexdump changes, fixes bugzilla #12801 - -------------------------------------------------------------------- -Thu Jan 10 14:18:21 CET 2002 - ro@suse.de - -- removed ACTIVATE_RAW_DEV - -------------------------------------------------------------------- -Mon Dec 31 19:05:45 UTC 2001 - adrian@suse.de - -- add patch for mips to create SGI partition tables with fdisk - -------------------------------------------------------------------- -Tue Dec 18 16:50:34 CET 2001 - bjacke@suse.de - -- add adjtimex - -------------------------------------------------------------------- -Mon Dec 10 18:22:06 CET 2001 - mmj@suse.de - -- Update to util-linux-2.11n - -------------------------------------------------------------------- -Tue Nov 20 14:48:25 CET 2001 - mmj@suse.de - -- Added a patch to 'wall' to remove unwanted newline (#12181) - -------------------------------------------------------------------- -Wed Nov 7 14:15:51 CET 2001 - kukuk@suse.de - -- Remove unneeded SPARC patch for hwclock - -------------------------------------------------------------------- -Sat Oct 13 20:59:29 CEST 2001 - kukuk@suse.de - -- Update to util-linux 2.11l - -------------------------------------------------------------------- -Wed Sep 12 00:13:22 MEST 2001 - garloff@suse.de - -- Fixed some dutch translations. (bug #10276) - -------------------------------------------------------------------- -Mon Sep 10 19:31:57 CEST 2001 - olh@suse.de - -- marry fdisk and AIX label again... - add lsprop for ppc - dumps the device tree in a human readable format - -------------------------------------------------------------------- -Mon Sep 3 09:50:11 CEST 2001 - kukuk@suse.de - -- Update to version 2.11i: - - blockdev: corrected ioctl numbers - - cal: fixed for multibyte locales - - line: new - - mount: added vxfs magic - -------------------------------------------------------------------- -Sat Sep 1 19:08:46 CEST 2001 - kukuk@suse.de - -- Let mount follow symlinks again - -------------------------------------------------------------------- -Wed Aug 29 16:00:18 CEST 2001 - kukuk@suse.de - -- Add new option to losetup manual page - -------------------------------------------------------------------- -Tue Aug 28 18:24:14 MEST 2001 - draht@suse.de - -- added timeout support for losetup (-t ) - -------------------------------------------------------------------- -Mon Aug 27 15:24:25 CEST 2001 - kukuk@suse.de - -- Add raw rc scripts, too - -------------------------------------------------------------------- -Sun Aug 26 08:51:29 CEST 2001 - bjacke@suse.de - -- added raw binary and put rawio into obsoletes and provides - -------------------------------------------------------------------- -Sat Aug 25 20:22:58 CEST 2001 - kukuk@suse.de - -- Fix path in getopt.1 manual page to example directory [Bug #9831] - -------------------------------------------------------------------- -Fri Aug 24 16:00:13 CEST 2001 - kukuk@suse.de - -- Small fix for hwclock on newer SPARCs - -------------------------------------------------------------------- -Mon Aug 13 15:51:59 CEST 2001 - ro@suse.de - -- changed neededforbuild to - -------------------------------------------------------------------- -Mon Jul 30 10:59:46 CEST 2001 - kukuk@suse.de - -- Update to util-linux-2.11h -- Add nologin program - -------------------------------------------------------------------- -Tue Jul 10 16:44:35 CEST 2001 - kukuk@suse.de - -- Remove swapdev from filelist - -------------------------------------------------------------------- -Tue Jul 10 13:10:23 CEST 2001 - kukuk@suse.de - -- Update to util-linux-2.11g - -------------------------------------------------------------------- -Wed Jun 6 17:25:33 EDT 2001 - bk@suse.de - -- added s390x to all ifnarch s390 - -------------------------------------------------------------------- -Fri Apr 20 12:09:40 CEST 2001 - kukuk@suse.de - -- Fix wall bug (character 80, 160, 240, are missing) [Bug #6962] - -------------------------------------------------------------------- -Mon Mar 26 10:24:40 CEST 2001 - kukuk@suse.de - -- Add exception for broken i2o disk device numbering scheme, kernel - hacker are not able to fix this and make it right [Bug #5881]. - -------------------------------------------------------------------- -Sat Mar 24 15:27:56 CET 2001 - kukuk@suse.de - -- Update to util-linux 2.11b - -------------------------------------------------------------------- -Thu Mar 15 15:47:34 CET 2001 - kukuk@suse.de - -- Fix changing of partitions with ID 0 on SPARC -- Remove duplicate mount patch - -------------------------------------------------------------------- -Wed Mar 14 21:29:23 CET 2001 - schwab@suse.de - -- Don't use _syscallX on ia64. -- Fix missing includes. - -------------------------------------------------------------------- -Wed Mar 14 11:05:22 CET 2001 - kukuk@suse.de - -- Update to version 2.11a - -------------------------------------------------------------------- -Fri Mar 2 17:05:01 CET 2001 - kukuk@suse.de - -- enable write again - -------------------------------------------------------------------- -Mon Feb 12 15:23:14 CET 2001 - kukuk@suse.de - -- cmos.c: Use sys/io.h, fix PowerPC hack - -------------------------------------------------------------------- -Tue Feb 6 11:54:34 CET 2001 - ro@suse.de - -- wall.c: include time.h - -------------------------------------------------------------------- -Mon Feb 5 11:13:56 CET 2001 - kukuk@suse.de - -- Split hex to extra package -- Update to util-linux-2.10s - -------------------------------------------------------------------- -Fri Feb 2 12:18:56 CET 2001 - werner@suse.de - -- Make swapon/swapoff more handy: - * Ignore swap files on ro mounted file systems - * If -a is given ignore already active devices at swapon - * If -a is given ignore not active devices at swapoff - -------------------------------------------------------------------- -Thu Jan 25 00:37:22 CET 2001 - ro@suse.de - -- added Provides: util - -------------------------------------------------------------------- -Fri Jan 12 10:08:29 MET 2001 - garloff@suse.de - -- Apply patch to lomount to allow all kerneli crypt algos to be - passed and allow to pass passwd with -k. -- losetup seems to support >2GB files just fine (#5433) - -------------------------------------------------------------------- -Tue Jan 2 12:04:33 CET 2001 - kukuk@suse.de - -- Save permissions of /etc/mtab [Bug #5027] - -------------------------------------------------------------------- -Tue Dec 5 15:25:45 CET 2000 - kukuk@suse.de - -- Search first in /etc/filesystems, then in /proc/filesystems - -------------------------------------------------------------------- -Tue Dec 5 11:24:34 CET 2000 - kukuk@suse.de - -- Use AIX/fdisk patch from util-linux-2.10r -- Backport "guess filesystems" from util-linux-2.10r - -------------------------------------------------------------------- -Tue Dec 5 11:10:10 CET 2000 - schwab@suse.de - -- Don't use _syscallX on ia64. - - -------------------------------------------------------------------- -Mon Dec 4 09:27:28 CET 2000 - olh@suse.de - -- fix diff again - -------------------------------------------------------------------- -Sun Dec 3 00:09:16 CET 2000 - olh@suse.de - -- no segfaults with AIX disklabels - -------------------------------------------------------------------- -Wed Nov 29 18:21:25 CET 2000 - uli@suse.de - -- fixed to build on PPC - -------------------------------------------------------------------- -Mon Nov 27 19:03:20 CET 2000 - schwab@suse.de - -- Fix broken casts in hwclock. - -------------------------------------------------------------------- -Thu Nov 23 15:48:35 CET 2000 - bk@suse.de - -- temporary disable pivot_root on s390(2.4 kernel is not yet built) - -------------------------------------------------------------------- -Wed Nov 22 13:28:06 CET 2000 - schwab@suse.de - -- Add pivot_root to file list. - -------------------------------------------------------------------- -Mon Nov 20 11:37:35 CET 2000 - kukuk@suse.de - -- Fix pmac-utils to compile with new kernel - -------------------------------------------------------------------- -Fri Nov 17 19:40:20 CET 2000 - kukuk@suse.de - -- Fix hwclock to compile on PPC - -------------------------------------------------------------------- -Wed Nov 15 12:39:13 CET 2000 - kukuk@suse.de - -- Update util-linux to 2.10q, merge flushb.diff - -------------------------------------------------------------------- -Thu Nov 2 10:21:12 CET 2000 - kukuk@suse.de - -- Remove some of the last specfile changes - -------------------------------------------------------------------- -Wed Nov 1 14:17:07 CET 2000 - olh@suse.de - -- update pmac-utils for new powermacs, cleanup specfile - -------------------------------------------------------------------- -Fri Oct 20 14:58:09 CEST 2000 - kukuk@suse.de - -- Update util-linux to 2.10p -- Rename package from util to util-linux - -------------------------------------------------------------------- -Wed Sep 27 11:30:21 CEST 2000 - kukuk@suse.de - -- Allow NFS v3 with 2.2.17.SuSE - -------------------------------------------------------------------- -Tue Sep 26 17:54:23 CEST 2000 - kukuk@suse.de - -- Fix mount for new NFS kernel patch - -------------------------------------------------------------------- -Sat Sep 9 17:36:24 CEST 2000 - kukuk@suse.de - -- Remove tcsh dependency -- Update to util-linux 2.10o, use of /etc/filesystems is still broken - -------------------------------------------------------------------- -Fri Aug 25 17:05:50 MEST 2000 - pthomas@suse.de - -- use %{_mandir} and %{_infodir} exclusively. This allows building - from source rpm on platforms other than 7.0. - -------------------------------------------------------------------- -Wed Jul 19 00:50:48 CEST 2000 - bk@suse.de - -- s390: removed dasdfmt and silo, %ifnarch s390 for some non-s390 things. - -------------------------------------------------------------------- -Tue May 30 18:45:56 CEST 2000 - bk@suse.de - -- added dasdfmt and silo on s390 - -------------------------------------------------------------------- -Mon May 15 18:15:05 CEST 2000 - kukuk@suse.de - -- util-linux: Update to 2.10m - -------------------------------------------------------------------- -Wed Apr 26 11:22:54 CEST 2000 - kukuk@suse.de - -- flusb: Don't use kernel headers, even if we don't need them! - -------------------------------------------------------------------- -Wed Apr 19 13:56:28 CEST 2000 - kukuk@suse.de - -- util-linux: Update to 2.10l - -------------------------------------------------------------------- -Mon Apr 17 15:06:51 CEST 2000 - kukuk@suse.de - -- util-linux: Update to 2.10k - -------------------------------------------------------------------- -Thu Apr 13 15:57:45 CEST 2000 - kukuk@suse.de - -- Move /sbin/setserial to /bin/setserial, add compat link to - /sbin. This fixes [Bug 1084] and is necessary for FHS 2.1 - -------------------------------------------------------------------- -Wed Apr 12 15:43:05 CEST 2000 - kukuk@suse.de - -- Fix util-linux for Alpha - -------------------------------------------------------------------- -Wed Apr 12 14:36:41 CEST 2000 - kukuk@suse.de - -- util-linux: Update to 2.10j - -------------------------------------------------------------------- -Sun Apr 2 01:08:05 CEST 2000 - bk@suse.de - -- suse s390 team added support for s390 - -------------------------------------------------------------------- -Thu Mar 30 21:31:15 CEST 2000 - uli@suse.de - -- hwclock/PPC: added support for MK48T559 RTC chip used in MTX+ boards - -------------------------------------------------------------------- -Fri Mar 24 11:49:25 CET 2000 - kukuk@suse.de - -- Add Linux LVM partition tag to fdisk -- Fix a lot of more possible buffer overruns -- Fix some fdisk sunlabel bugs -- added BuildRoot fixes from nadvorni@suse.cz - -------------------------------------------------------------------- -Wed Mar 22 14:28:27 CET 2000 - kukuk@suse.de - -- Update util-linux to 2.10h -- Add clock again for non PPC platforms - -------------------------------------------------------------------- -Fri Mar 17 15:10:50 CET 2000 - uli@suse.de - -- now contains both hwclock and clock on PPC (/sbin/init.d/boot - chooses what to run at runtime) - -------------------------------------------------------------------- -Tue Mar 14 19:23:26 CET 2000 - schwab@suse.de - -- Add support for ia64. - -------------------------------------------------------------------- -Thu Mar 9 21:25:15 CET 2000 - kukuk@suse.de - -- fdisk: Fix -l for Mylex RAID controller - -------------------------------------------------------------------- -Tue Mar 7 17:23:57 CET 2000 - kukuk@suse.de - -- etc/filesystems: Add minix and reiserfs - -------------------------------------------------------------------- -Tue Mar 7 11:49:23 CET 2000 - kukuk@suse.de - -- mount: fix endian problem with minix fs - -------------------------------------------------------------------- -Tue Feb 15 12:11:50 CET 2000 - kukuk@suse.de - -- mount: Add hack for PPC/syscall mount problem - -------------------------------------------------------------------- -Sun Feb 13 05:16:13 CET 2000 - bk@suse.de - -- let rdev continue in case it stubles over a bad file in /dev (/dev/snd fix) - -------------------------------------------------------------------- -Fri Feb 4 17:14:07 CET 2000 - kukuk@suse.de - -- Make PPC clock parameter compatible to hwclock - -------------------------------------------------------------------- -Thu Feb 3 14:42:23 CET 2000 - kukuk@suse.de - -- Fix filelist for SPARC - -------------------------------------------------------------------- -Thu Feb 3 11:14:29 CET 2000 - kukuk@suse.de - -- util-linux: Update to 2.10f (mount security fix) - -------------------------------------------------------------------- -Sun Jan 23 15:45:08 CET 2000 - kukuk@suse.de - -- util-linux: Update to 2.10e - -------------------------------------------------------------------- -Tue Jan 18 19:18:08 CET 2000 - kukuk@suse.de - -- mount now looks at first in /etc/filesystems and then in - /proc/filesystems - -------------------------------------------------------------------- -Tue Jan 18 16:32:05 CET 2000 - ro@suse.de - -- fixed pmac-utils to build with 2.3 as well - -------------------------------------------------------------------- -Tue Jan 18 14:56:22 CET 2000 - kukuk@suse.de - -- Fix a lot of fdisk buffer overruns [Bug 1642] - -------------------------------------------------------------------- -Mon Jan 17 18:23:56 CET 2000 - kukuk@suse.de - -- Fix setserial for Linux 2.3.40 -- Remove write, is now in nkitb -- Build minix and bfs tools for SPARC -- Fix some buffer overflows in fdisk - -------------------------------------------------------------------- -Fri Dec 17 15:00:19 MET 1999 - kukuk@suse.de - -- util-linux: Update to 2.10d -- hex: Update to 1.2 -- Move manual pages to /usr/share/man - -------------------------------------------------------------------- -Tue Nov 30 18:28:14 CET 1999 - uli@suse.de - -- re-added hwclock link for PPC (2nd try) - -------------------------------------------------------------------- -Tue Nov 30 17:49:27 MET 1999 - uli@suse.de - -- re-added hwclock link for PPC - -------------------------------------------------------------------- -Mon Nov 15 12:39:41 MET 1999 - kukuk@suse.de - -- util-linux: Update to 2.10b - -------------------------------------------------------------------- -Sat Nov 13 15:36:37 MET 1999 - kukuk@suse.de - -- setserial: Add Patch for Sparc -- Fix filelist for Sparc - -------------------------------------------------------------------- -Wed Oct 27 04:03:42 CEST 1999 - garloff@suse.de - -- added flushb (moved here from ddrescue). -- fix bug in logger (remove trailing newlines). - -------------------------------------------------------------------- -Fri Oct 22 11:29:51 MEST 1999 - kukuk@suse.de - -- util-linux: Remove old patches for mk_loop_h - -------------------------------------------------------------------- -Sat Oct 16 16:40:13 MEST 1999 - kukuk@suse.de - -- util-linux: Update to 2.9z - -------------------------------------------------------------------- -Fri Oct 8 10:58:48 MEST 1999 - kukuk@suse.de - -- Update to util-linux-2.9y (execpt fdisk) - -------------------------------------------------------------------- -Tue Sep 14 18:14:53 CEST 1999 - uli@suse.de - -- added PMac-specific utils for PPC - -------------------------------------------------------------------- -Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de - -- ran old prepare_spec on spec file to switch to new prepare_spec. - -------------------------------------------------------------------- -Thu Aug 26 15:05:03 CEST 1999 - uli@suse.de - -- disabled hayesesp for PPC - -------------------------------------------------------------------- -Wed Aug 25 18:04:35 MEST 1999 - kukuk@suse.de - -- Don't install tsort, its now in textutils 2.0 - -------------------------------------------------------------------- -Tue Aug 24 10:11:06 MEST 1999 - kukuk@suse.de - -- Update to util-linux-2.9w (execpt fdisk) - -------------------------------------------------------------------- -Mon Aug 9 10:55:48 MEST 1999 - kukuk@suse.de - -- Update to util-linux-2.9v (execpt fdisk) - -------------------------------------------------------------------- -Tue Jul 20 18:01:29 CEST 1999 - garloff@suse.de - -- Added hex from Erich S. Raymond - -------------------------------------------------------------------- -Mon Jul 12 12:11:45 MEST 1999 - kukuk@suse.de - -- Add fdisk patch from Klaus G. Wagner -- Add mount patch from util-linux 2.9u - -------------------------------------------------------------------- -Tue Jul 6 12:23:47 MEST 1999 - kukuk@suse.de - -- update to util-linux-2.9t - -------------------------------------------------------------------- -Fri Jun 25 14:44:30 MEST 1999 - kukuk@suse.de - -- update to util-linux-2.9s - -------------------------------------------------------------------- -Wed Mar 3 11:25:50 MET 1999 - ro@suse.de - -- hwclock.c: always use busywait to get rtctime - (it's hard to find out at runtime if we will get an irq) - -------------------------------------------------------------------- -Tue Mar 2 00:42:15 MET 1999 - ro@suse.de - -- update to util-linux-2.9i -- update to setserial-2.15 -- using diffs from jurix and add-ons from kgw for compaq smart raid - -------------------------------------------------------------------- -Mon Feb 1 10:22:10 MET 1999 - ro@suse.de - -- rdev is not built on alpha - -------------------------------------------------------------------- -Mon Jan 18 21:29:36 MET 1999 - florian@suse.de - -- fixed one broken case to delete a partition in fdisk - -------------------------------------------------------------------- -Sun Dec 13 22:20:16 MET 1998 - bs@suse.de - -- fixed file list - -------------------------------------------------------------------- -Thu Dec 10 16:38:08 MET 1998 - fehr@suse.de - -- fix bug in fdisk - -------------------------------------------------------------------- -Tue Dec 8 15:43:23 MET 1998 - ro@suse.de - -- removed last from filelist -- added link /sbin/clock -> hwclock - -------------------------------------------------------------------- -Wed Nov 4 00:23:02 MET 1998 - ro@suse.de - -- fdisksunlabel: don't include scsi/scsi.h for glibc-2.0 - -------------------------------------------------------------------- -Fri Oct 30 11:46:38 MET 1998 - ro@suse.de - -- update to 2.9 / added hostid from previous diff -- copied some glibc changes from previous diff (strcpy..) - -------------------------------------------------------------------- -Thu Sep 17 13:04:14 MEST 1998 - ro@suse.de - -- define _GNU_SOURCE when using getopt - -------------------------------------------------------------------- -Mon Aug 31 16:12:36 MEST 1998 - ro@suse.de - -- full switch to util-linux 2.8 --- sync has moved to pkg fileutils --- chroot has moved to pkg sh_utils (has been there for a while) --- adopted hostid from previous suse-pkg - -------------------------------------------------------------------- -Mon Aug 24 10:46:33 MEST 1998 - ro@suse.de - -- switched to use mount from util-linux-2.8 - -------------------------------------------------------------------- -Tue Jun 23 10:46:45 MEST 1998 - ro@suse.de - -- added fdisk, sfdisk, cfdisk from util-linux-2.8 - (including man-pages,readmes) - -------------------------------------------------------------------- -Mon Nov 17 14:14:47 MET 1997 - ro@suse.de - -- changed /local/bin/perl5 in chkdupexe to /usr/bin/perl - -------------------------------------------------------------------- -Fri Oct 31 13:38:58 MET 1997 - ro@suse.de - -- temporarily removed mount-hacker - -------------------------------------------------------------------- -Wed Oct 29 23:44:37 MET 1997 - florian@suse.de - -- add changes from ms@suse.de for hostid.c - - -------------------------------------------------------------------- -Tue May 20 14:10:37 MEST 1997 - florian@suse.de - - -- only support kernel 2.0.x for nfs mounts, please use /bin/mount-hacker - for kernel 2.1.x - - -------------------------------------------------------------------- -Wed Apr 30 15:57:14 CEST 1997 - florian@suse.de - - -- update to mount 2.6g - - -------------------------------------------------------------------- -Sun Apr 13 23:04:29 MEST 1997 - florian@suse.de - - -- update to new version util-linux 2.6 - -- update to new version mount 2.6e - - - -------------------------------------------------------------------- -Sat Nov 2 17:35:11 CET 1996 - florian@suse.de - - -- update to mount 2.5p - - -------------------------------------------------------------------- -Thu Oct 17 16:05:09 CEST 1996 - florian@suse.de - - -- Update auf neue Version von mount 2.5o. - - -------------------------------------------------------------------- -Tue Sep 3 17:01:45 MET DST 1996 - florian@suse.de - - -- updated to new version mount 2.5m -- (u)mount now gives much better error messages - - -------------------------------------------------------------------- -Sun Aug 25 19:28:50 MET DST 1996 - bs@suse.de - -compile setterm with libtermcap and not libncurses -use newer mount instead of the old version in util-linux -(security fix) diff --git a/python-libmount.spec b/python-libmount.spec deleted file mode 100644 index 5f866e6..0000000 --- a/python-libmount.spec +++ /dev/null @@ -1,1335 +0,0 @@ -# -# spec file for package python-libmount -# -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. -# -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -# Please submit bugfixes or comments via http://bugs.opensuse.org/ -# - - -%if 0%{?suse_version} >= 1330 -%bcond_without enable_last -%else -%bcond_with enable_last -%endif - -Name: python-libmount -%define _name util-linux -# WARNING: Never edit this file!!! Edit util-linux.spec and call pre_checkin.sh to update spec files: -%define _name util-linux -# To prevent dependency loop in automatic build systems, we want to -# build util-linux in parts. To build all at once, set build_all to 1. -# -# build_util_linux: First stage build builds all except: -# build_util_linux_systemd: Builds util-linux-systemd and uuidd. -# build_python_libmount: Builds python-libmount. -%define build_all 0 -# definitions for the main packages -# This two level indirect definition of Summary and Group is needed to -# simplify parsing of spec file by format_spec_file, -# source_validator and check-in QA scripts). -%define summary_ul A collection of basic system utilities -%define summary_uls A collection of basic system utilities -%define summary_pl Python bindings for the libmount library -%define group_ul System/Base -%define group_uls System/Base -%define group_pl System/Filesystems -%if "%{name}" == "python-libmount" -%define build_util_linux 0 -%define build_util_linux_systemd 0 -%define build_python_libmount 1 -# To prevent dependency loops, verify signature only in third stage. -%define main_summary %summary_pl -%define main_group %group_pl -%else -%if "%{name}" == "util-linux-systemd" -%define build_util_linux 0 -%define build_util_linux_systemd 1 -%define build_python_libmount 0 -%define main_summary %summary_uls -%define main_group %group_uls -%else -%define main_summary %summary_ul -%define main_group %group_ul -%if %build_all -%define build_util_linux 1 -%define build_util_linux_systemd 1 -%define build_python_libmount 1 -%else -%define build_util_linux 1 -%define build_util_linux_systemd 0 -%define build_python_libmount 0 -%endif -%endif -%endif -Summary: %main_summary -License: GPL-2.0+ -Group: %main_group -BuildRequires: audit-devel -BuildRequires: bc -BuildRequires: binutils-devel -BuildRequires: fdupes -BuildRequires: gettext-devel -BuildRequires: libcap-ng-devel -BuildRequires: libselinux-devel -BuildRequires: libsepol-devel -BuildRequires: libtool -BuildRequires: ncurses-devel -BuildRequires: pam-devel -BuildRequires: pkg-config -BuildRequires: readline-devel -BuildRequires: utempter-devel -BuildRequires: zlib-devel -# util-linux is part of VMInstall, but we can well build without it -# Helps shorten a cycle and eliminate a bootstrap issue -#!BuildIgnore: util-linux -%ifarch ppc ppc64 ppc64le -BuildRequires: librtas-devel -%endif -%if %build_util_linux_systemd -BuildRequires: socat -BuildRequires: systemd-rpm-macros -BuildRequires: pkgconfig(libsystemd) -%endif -%if %build_python_libmount -BuildRequires: python-devel -%endif -#BEGIN SECOND STAGE DEPENDENCIES -%if !%build_util_linux -%if %build_util_linux_systemd -BuildRequires: libblkid-devel -BuildRequires: libmount-devel -BuildRequires: libsmartcols-devel -BuildRequires: libuuid-devel -%endif -%if %build_python_libmount -BuildRequires: libmount-devel -%endif -%endif -#END SECOND STAGE DEPENDENCIES -Version: 2.30 -Release: 0 -# util-linux is a base package and uuidd pre-requiring pwdutils pulls -# that into the core build cycle. pwdutils also pulls in the whole -# ldap stack into it. Avoid this whole mess which is done only to -# make the rpm install check of uuidd happy which has support to work without -# these tools as well -#!BuildIgnore: pwdutils -Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.30/util-linux-%{version}.tar.xz -Source1: util-linux-rpmlintrc -Source4: raw.service -Source5: etc.raw -Source6: etc_filesystems -Source7: baselibs.conf -Source8: login.pamd -Source9: remote.pamd -Source10: su.pamd -Source11: su.default -Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.30/util-linux-%{version}.tar.sign -Source13: %{_name}.keyring -Source14: runuser.pamd -# klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 -# TODO: split to separate package -Source40: klogconsole.tar.xz -# XXX: Run a program in a new session and with controlling tty -Source22: setctsid.c -Source23: setctsid.8 -# XXX: ppc specific, still needed? -Source28: mkzimage_cmdline.8 -Source29: mkzimage_cmdline.c -Source31: addnote.c -# -Source51: blkid.conf -## -## util-linux patches -## -# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path -Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff -# PATCH-FEATURE-SLE util-linux-losetup-Add-support-for-setting-logical-blocksize.patch bsc931634 FATE319010 hare@suse.de -- Add support for setting logical blocksizes. -Patch1: util-linux-losetup-Add-support-for-setting-logical-blocksize.patch -# PATCH-BUG-FIX util-linux-lscpu-cleanup-DMI-detection-return-codes.patch bsc#1039360 msuchanek@suse.de -- lscpu: cleanup DMI detection return codes -Patch2: util-linux-lscpu-cleanup-DMI-detection-return-codes.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build -# -%if %build_util_linux -Supplements: filesystem(minix) -%if 0%{?suse_version} >= 1330 -Requires: group(tty) -%endif -Provides: fsck-with-dev-lock = %{version} -# bnc#651598: -Provides: util-linux(fake+no-canonicalize) -PreReq: %install_info_prereq permissions -Recommends: %{name}-lang = %{version} -Provides: eject = 2.1.0-166.8 -Provides: login = 4.0-33.7 -# File conflict of eject (up to 12.3 and SLE11). -Obsoletes: eject < 2.1.0-166.8 -# File conflict of login (up to 12.1 and SLE11). -Obsoletes: login < 4.0-33.7 -# File conflict of su and kill (up to 12.3 and SLE11). -# It should be coreutils < 8.21-4, but coreutils provide Release-less symbol. -Conflicts: coreutils < 8.21 -%if 0%{?suse_version} < 1330 -# File conflict of sulogin and utmpdump (up to 12.3 and SLE11). -Conflicts: sysvinit-tools < 2.88+-87 -%endif -# File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3). -Conflicts: bash-completion <= 2.1-10 -# The preset is provided by the presets branding package since 0.4 (bsc#1012850) and since 12.2 in SLE (boo#1029775) -Conflicts: systemd-presets-branding < 12.2 -# bnc#805684: -%ifarch s390x -Obsoletes: s390-32 -Provides: s390-32 -%endif -# uuid-runtime appeared in SLE11 SP1 to SLE11 SP3 -Provides: uuid-runtime = %{version}-%{release} -Obsoletes: uuid-runtime < %{version}-%{release} -%if 0%{?suse_version} < 1330 -#BEGIN sysv compatibility hack -# After migration of raw init script to systemd, util-linux no more depends on -# fillup and insserv. Many poorly written packages implicitly depend on them -# without declaring it. Keep these dependencies in Leap 42 + SLE 12 line to -# prevent failures. -PreReq: %insserv_prereq %fillup_prereq -#END sysv compatibility hack -%endif -# -# Using "Requires" here would lend itself to help upgrading, but since -# util-linux is in the initial bootstrap, that is not a good thing to do: -# -Recommends: adjtimex -Recommends: time -Recommends: which -# -%if 0%{?suse_version} < 1330 -# Using Conflicts as util-linux-losetup-Add-support-for-setting-logical-blocksize -# now uses bit 5 of lo_flags with meaning LO_FLAGS_BLOCKSIZE bsc#966891 -# -Conflicts: kernel < 4.4 -%endif -%else -%if %build_python_libmount -%else -%if %build_util_linux_systemd -Supplements: packageand(util-linux:systemd) -# Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 -Provides: util-linux:/bin/logger -# Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 -Conflicts: util-linux < 2.25 -%systemd_requires -%else -# ERROR: No build_* variables are set. -%endif -%endif -%endif - -%if %build_util_linux -%description -This package contains a large variety of low-level system utilities -that are necessary for a Linux system to function. It contains the -mount program, the fdisk configuration tool, and more. - -%package -n libblkid1 -Summary: Filesystem detection library -Group: System/Filesystems - -%description -n libblkid1 -Library for filesystem detection. - -%package -n libblkid-devel -Summary: Development files for the filesystem detection library -Group: Development/Libraries/C and C++ -Requires: libblkid1 = %{version} - -%description -n libblkid-devel -Files needed to develop applications using the library for filesystem -detection. - -%package -n libblkid-devel-static -Summary: Development files for the filesystem detection library -Group: Development/Libraries/C and C++ -Requires: libblkid-devel = %{version} - -%description -n libblkid-devel-static -Files needed to develop applications using the library for filesystem -detection. - -%package -n libuuid1 -Summary: Library to generate UUIDs -Group: System/Filesystems - -%description -n libuuid1 -A library to generate universally unique IDs (UUIDs). - -%package -n libuuid-devel -Summary: Development files for libuuid1 -Group: Development/Libraries/C and C++ -Requires: libuuid1 = %{version} - -%description -n libuuid-devel -Files to develop applications using the library to generate universally -unique IDs (UUIDs). - -%package -n libuuid-devel-static -Summary: Development files for libuuid1 -Group: Development/Libraries/C and C++ -Requires: libuuid-devel = %{version} - -%description -n libuuid-devel-static -Files to develop applications using the library to generate universally -unique IDs (UUIDs). - -%package -n libmount1 -Summary: Device mount library -Group: System/Filesystems - -%description -n libmount1 -Library designed to be used in low-level utils like -mount(8) and /usr/sbin/mount. helpers. - -%package -n libmount-devel -Summary: Development files for libmount1 -Group: Development/Libraries/C and C++ -Requires: libmount1 = %{version} - -%package -n libmount-devel-static -Summary: Development files for libmount1 -Group: Development/Libraries/C and C++ -Requires: libmount-devel = %{version} - -%description -n libmount-devel-static -Files to develop applications using the libmount library. - -%description -n libmount-devel -Files to develop applications using the libmount library. - -%package -n libsmartcols1 -Summary: Column-based text sort engine -Group: System/Libraries - -%description -n libsmartcols1 -Library to sort human readable column-based text output. - -%package -n libsmartcols-devel -Summary: Development files for libsmartcols1 -Group: Development/Libraries/C and C++ -Requires: libsmartcols1 = %{version} - -%description -n libsmartcols-devel -Files to develop applications using the libsmartcols library. - -%package -n libsmartcols-devel-static -Summary: Development files for libsmartcols1 -Group: Development/Libraries/C and C++ -Requires: libsmartcols-devel = %{version} - -%description -n libsmartcols-devel-static -Files to develop applications using the libsmartcols library. - -%package -n libfdisk1 -Summary: Filesystem detection library -Group: System/Filesystems - -%description -n libfdisk1 -Library for filesystem detection. - -%package -n libfdisk-devel -Summary: Development files for the filesystem detection library -Group: Development/Libraries/C and C++ -Requires: libfdisk1 = %{version} - -%description -n libfdisk-devel -Files needed to develop applications using the library for filesystem -detection. - -%package -n libfdisk-devel-static -Summary: Development files for the filesystem detection library -Group: Development/Libraries/C and C++ -Requires: libfdisk-devel = %{version} - -%description -n libfdisk-devel-static -Files needed to develop applications using the library for filesystem -detection. - -%lang_package -%endif -%if %build_util_linux_systemd -%if %build_util_linux -%package systemd -Summary: %summary_uls -Group: %group_uls -Supplements: packageand(util-linux:systemd) -# Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 -Provides: util-linux:/usr/lib/systemd/system/fstrim.service -# Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 -Conflicts: util-linux < 2.25 - -%description systemd -%else -%description -%endif -This package contains low-level util-linux utilities that use systemd. - -%package -n uuidd -Summary: Helper daemon to guarantee uniqueness of time-based UUIDs -Group: System/Filesystems -Requires(pre): /usr/sbin/groupadd -Requires(pre): /usr/sbin/useradd -# uuidd bash-completion moved to a correct package -Conflicts: util-linux < 2.25 -%systemd_requires - -%description -n uuidd -The uuidd package contains a userspace daemon (uuidd) which guarantees -uniqueness of time-based UUID generation even at very high rates on -SMP systems. - -%endif -%if %build_python_libmount -%if %build_util_linux -%package -n python-libmount -Summary: %summary_pl -Group: %group_pl - -%description -n python-libmount -%else -%description -%endif -This package contains the python bindings for util-linux libmount -library. - -%endif -%prep -%setup -q -n %{_name}-%{version} -b 40 -%patch0 -p1 -%if 0%{?suse_version} < 1330 -# logical block size support in loop does not exist in Tumbleweed and upstream kernel yet -%patch1 -p1 -%endif -%patch2 -p1 -# -# setctsid -cp -p %{S:22} %{S:23} . - -%build -%if %build_util_linux -pushd ../klogconsole -# klogconsole build -make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" -popd -# setctsid build -rm -f setctsid -make %{?_smp_mflags} setctsid CFLAGS="%{optflags}" CC="%{__cc}" -# -#BEGIN SYSTEMD SAFETY CHECK -# With systemd, some utilities are built differently. Keep track of these -# sources to prevent building of systemd-less versions. -# -# WARNING: Never edit following line without doing all suggested in the echo below! -UTIL_LINUX_KNOWN_SYSTEMD_DEPS='./login-utils/lslogins.c ./misc-utils/logger.c ./misc-utils/uuidd.c ' -UTIL_LINUX_FOUND_SYSTEMD_DEPS=$(grep -rl 'HAVE_LIBSYSTEMD' . | fgrep '.c' | LC_ALL=C sort | tr '\n' ' ') -if test "$UTIL_LINUX_KNOWN_SYSTEMD_DEPS" != "$UTIL_LINUX_FOUND_SYSTEMD_DEPS" ; then - echo "List of utilities depending on systemd have changed. -Please check the new util-linux-systemd file list, file removal and update of Conflicts for safe update! -Then update configure options to build what needed. -Only then you can safely update following spec file line: -UTIL_LINUX_KNOWN_SYSTEMD_DEPS='$UTIL_LINUX_FOUND_SYSTEMD_DEPS'" - exit 1 -fi -#END SYSTEMD SAFETY CHECK -%else -#BEGIN SECOND STAGE MODIFICATIONS -# delete all make modules except wanted ones -sed -i '/^include/{ -%if %build_python_libmount - /libmount\/Makemodule.am/b 1 -%endif -%if %build_util_linux_systemd -# for lslogins - /login-utils/b 1 -# for logger and uuidd - /misc-utils/b 1 -# for fstrim.service and fstrim.timer - /sys-utils/b 1 -# for uninstalled libcommon required by uuidd - / lib\//b 1 -# for bash completions - /bash-completion/b 1 -# we always want tests (they are smart enough to skip irrelevant parts) - /tests/b 1 -%endif -%if %build_python_libmount - /libmount\/python/b 1 -%endif - d - :1 - }' Makefile.am libmount/Makemodule.am -%if %build_python_libmount -# trick: we do not want to build libmount, but include subdirs -# We close prefious if FALSE and open new pairing with endif -sed -i '/^if BUILD_LIBMOUNT/d -/^if ENABLE_GTK_DOC/i \ -if BUILD_LIBMOUNT -' libmount/Makemodule.am -# Do not install terminal-colors.d.5 -sed -i '/dist_man_MANS/d' lib/Makemodule.am -%endif -# disable all make modules except wanted ones -sed -i '/^if BUILD_/{ -%if %build_util_linux_systemd - /LSLOGINS/b 1 - /LOGGER/b 1 - /UUIDD/b 1 - /BASH_COMPLETION/b 1 -%endif - s/BUILD_.*/FALSE/ - :1 - } - ' libmount/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am sys-utils/Makemodule.am bash-completion/Makemodule.am -%if %build_util_linux_systemd -# trick: we do not want to build fstrim, but we want to install fstrim systemd connectors -# We close prefious if FALSE and open new pairing with endif -sed -i '/^if HAVE_SYSTEMD/i \ -endif\ -if TRUE -' sys-utils/Makemodule.am -# Do not install terminal-colors.d.5 -sed -i '/dist_man_MANS/d' lib/Makemodule.am -%endif -# Use installed first stage libraries -sed -i ' -# extra space to not replace pylibmount.la - s/ libmount\.la/ -lmount/g - s/libuuid\.la/-luuid/g - s/libblkid\.la/-lblkid/g - s/libsmartcols\.la/-lsmartcols/g - ' libmount/python/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am tests/helpers/Makemodule.am -# Ignore dependencies on optional (and not built in second stage) libraries -sed -i ' - s/UL_REQUIRES_BUILD(\[.*\], \[libuuid\])/dnl &/ - s/UL_REQUIRES_BUILD(\[.*\], \[libsmartcols\])/dnl &/ - ' configure.ac -sed -i ' - /SUBDIRS =/s/ po// - ' Makefile.am -#END SECOND STAGE MODIFICATIONS -%endif -# -# util-linux itself -# -# Version check for libutempter -# -uhead=$(find %_includedir -name utempter.h 2>/dev/null) -if test -n "$uhead" && grep -q utempter_add_record "$uhead" -then - uhead=--with-utempter -else - uhead=--without-utempter -fi -export SUID_CFLAGS="-fpie" -export SUID_LDFLAGS="-pie" -export LDFLAGS="-Wl,-z,relro,-z,now" -# override default localstatedir to /run -# only used for volatile data -# -# SUSE now supports only systemd based system. We do not build -# sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities. -AUTOPOINT=true autoreconf -vfi -%configure \ - --disable-silent-rules \ - --localstatedir=/run \ - --docdir=%{_docdir}/%{_name} \ - --with-audit \ - --with-gnu-ld \ - --with-ncursesw \ - --with-selinux \ - $uhead \ - --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ - --with-systemdsystemunitdir=%{_unitdir} \ - --enable-libuuid-force-uuidd \ - --enable-sulogin-emergency-mount \ - --disable-use-tty-group \ - --enable-static \ - --disable-rpath \ - --enable-all-programs \ - --disable-reset \ - --disable-chfn-chsh \ - --disable-newgrp \ - --disable-vipw \ - --disable-pg \ -%if %{without enable_last} - --disable-last \ -%endif -%if %build_util_linux_systemd - --with-systemd \ - --enable-logger \ - --enable-lslogins \ - --enable-uuidd \ -%else - --without-systemd \ - --disable-logger \ - --disable-lslogins \ - --disable-uuidd \ -%endif -%if %build_python_libmount - --with-python \ -%else - --without-python \ -%endif - -# -# Safety check: HAVE_UUIDD should be always 1: -grep -q 'HAVE_UUIDD 1' config.h -make %{?_smp_mflags} -# -%if %build_util_linux -%{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29} -%{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31} -%endif - -%check -# mark some tests "known_fail" -# -%if 0%{?qemu_user_space_build} -export TS_OPT_fdisk_gpt_known_fail="yes" -export TS_OPT_fdisk_oddinput_known_fail="yes" -export TS_OPT_fdisk_sunlabel_known_fail="yes" -export TS_OPT_fincore_count_known_fail="yes" -export TS_OPT_libfdisk_gpt_known_fail="yes" -export TS_OPT_misc_flock_known_fail="yes" -export TS_OPT_misc_ionice_known_fail="yes" -export TS_OPT_misc_swaplabel_known_fail="yes" -export TS_OPT_kill_name_to_number_known_fail="yes" -export TS_OPT_kill_print_pid_known_fail="yes" -export TS_OPT_kill_queue_known_fail="yes" -export TS_OPT_uuid_uuidd_known_fail="yes" -# unsupported syscall in script(1) ... might be fixed in qemu -export TS_OPT_script_known_fail="yes" -# may segfault on qemu-user-space -export TS_OPT_misc_setarch_known_fail="yes" -%endif -# -# hacks -export PATH="$PATH:/sbin:/usr/sbin" -# -# do the check but don't abort yet -result="0" -make %{?_smp_mflags} check || result="1" -# -# always show test diffs (inclusive known_fail) and exit result -diffs_files="$(find tests/diff -type f | sort)" -echo "$diffs_files" | xargs -r cat -exit "$result" - -%install -%if %build_util_linux -mkdir -p %{buildroot}{%{_sysconfdir}/{pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} -install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf -install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login -install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote -install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser -install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l -install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su -install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l -install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su -pushd ../klogconsole -# klogconsole install -make install DEST=%{buildroot} -popd -%endif -# -# util-linux install -# -%make_install -rm -f %{buildroot}%{python_sitearch}/libmount/*.*a -%if %build_util_linux -#UsrMerge -ln -s %{_bindir}/kill %{buildroot}/bin -ln -s %{_bindir}/su %{buildroot}/bin -ln -s %{_bindir}/dmesg %{buildroot}/bin -ln -s %{_bindir}/more %{buildroot}/bin -ln -s %{_bindir}/mount %{buildroot}/bin -ln -s %{_bindir}/umount %{buildroot}/bin -ln -s %{_bindir}/findmnt %{buildroot}/bin -ln -s %{_bindir}/lsblk %{buildroot}/bin -ln -s %{_sbindir}/agetty %{buildroot}/sbin -ln -s %{_sbindir}/blockdev %{buildroot}/sbin -ln -s %{_sbindir}/cfdisk %{buildroot}/sbin -ln -s %{_sbindir}/ctrlaltdel %{buildroot}/sbin -ln -s %{_sbindir}/fdisk %{buildroot}/sbin -ln -s %{_sbindir}/fsck.minix %{buildroot}/sbin -ln -s %{_sbindir}/fsck.cramfs %{buildroot}/sbin -ln -s %{_sbindir}/hwclock %{buildroot}/sbin -ln -s %{_sbindir}/losetup %{buildroot}/sbin -ln -s %{_sbindir}/mkfs %{buildroot}/sbin -ln -s %{_sbindir}/mkfs.bfs %{buildroot}/sbin -ln -s %{_sbindir}/mkfs.minix %{buildroot}/sbin -ln -s %{_sbindir}/mkfs.cramfs %{buildroot}/sbin -ln -s %{_sbindir}/mkswap %{buildroot}/sbin -ln -s %{_sbindir}/nologin %{buildroot}/sbin -ln -s %{_sbindir}/pivot_root %{buildroot}/sbin -ln -s %{_sbindir}/raw %{buildroot}/sbin -ln -s %{_sbindir}/sfdisk %{buildroot}/sbin -ln -s %{_sbindir}/swapoff %{buildroot}/sbin -ln -s %{_sbindir}/swapon %{buildroot}/sbin -ln -s %{_sbindir}/blkid %{buildroot}/sbin -ln -s %{_sbindir}/findfs %{buildroot}/sbin -ln -s %{_sbindir}/fsck %{buildroot}/sbin -ln -s %{_sbindir}/switch_root %{buildroot}/sbin -ln -s %{_sbindir}/wipefs %{buildroot}/sbin -ln -s %{_sbindir}/fsfreeze %{buildroot}/sbin -ln -s %{_sbindir}/swaplabel %{buildroot}/sbin -ln -s %{_sbindir}/fstrim %{buildroot}/sbin -ln -s %{_sbindir}/chcpu %{buildroot}/sbin -#EndUsrMerge -install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/filesystems -%ifnarch ppc ppc64 -install -m 755 mkzimage_cmdline %{buildroot}%{_bindir} -install -m 644 %{S:28} %{buildroot}%{_mandir}/man8 -install -m 755 chrp-addnote %{buildroot}%{_bindir} -%endif -# setctsid install -install -m 755 setctsid %{buildroot}%{_sbindir} -install -m 444 setctsid.8 %{buildroot}%{_mandir}/man8/ -echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir}/flushb -chmod 755 %{buildroot}%{_sbindir}/flushb -# Install scripts to configure raw devices at boot time -install -m 644 $RPM_SOURCE_DIR%{_sysconfdir}.raw %{buildroot}%{_sysconfdir}/raw -install -m 644 $RPM_SOURCE_DIR/raw.service %{buildroot}%{_unitdir} -ln -sf service %{buildroot}%{_sbindir}/rcraw -# upstream moved getopt examples from datadir to docdir but we keep -# the old location because we would need to fix the manpage first -mv %{buildroot}%{_docdir}/%{_name}/getopt %{buildroot}%{_datadir}/ -# Stupid hack so we don't have a tcsh dependency -chmod 644 %{buildroot}%{_datadir}/getopt/getopt*.tcsh -# login is always and only in /bin -mv %{buildroot}%{_bindir}/login %{buildroot}/bin/ -# arch dependent -%ifarch s390 s390x -rm -f %{buildroot}%{_sysconfdir}/fdprm -rm -f %{buildroot}%{_sbindir}/fdformat -rm -f %{buildroot}%{_sbindir}/hwclock -#UsrMerge -rm -f %{buildroot}/sbin/hwclock -#EndUsrMerge -rm -f %{buildroot}%{_sbindir}/klogconsole -rm -f %{buildroot}%{_bindir}/setterm -rm -f %{buildroot}%{_sbindir}/tunelp -rm -f %{buildroot}%{_mandir}/man8/fdformat.8* -rm -f %{buildroot}%{_mandir}/man8/hwclock.8* -rm -f %{buildroot}%{_mandir}/man8/klogconsole.8* -rm -f %{buildroot}%{_mandir}/man8/tunelp.8* -%endif -%ifarch ia64 %sparc m68k -rm -f %{buildroot}%{_mandir}/man8/cfdisk.8* -rm -f %{buildroot}%{_mandir}/man8/sfdisk.8* -rm -f %{buildroot}%{_sbindir}/cfdisk -#UsrMerge -rm -f %{buildroot}/sbin/cfdisk -#EndUsrMerge -rm -f %{buildroot}%{_sbindir}/sfdisk -#UsrMerge -rm -f %{buildroot}/sbin/sfdisk -#EndUsrMerge -%endif -%ifarch ia64 m68k -rm -f %{buildroot}%{_sbindir}/fdisk -#UsrMerge -rm -f %{buildroot}/sbin/fdisk -#EndUsrMerge -rm -f %{buildroot}%{_mandir}/man8/fdisk.8* -%endif -%find_lang %{name} %{name}.lang -# create list of setarch(8) symlinks -find %{buildroot}%{_bindir}/ -regextype posix-egrep -type l \ - -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)$" \ - -printf "%{_bindir}/%f\n" >> %{name}.files -find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ - -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)\.8.*" \ - -printf "%{_mandir}/man8/%f*\n" >> %{name}.files -%else -# install systemd files manually, don't use Makefile that expect build of utilities and its dependencies. -%endif -%if %build_util_linux_systemd -mkdir -p %{buildroot}/bin -mkdir -p %{buildroot}%{_sbindir} -mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid -mkdir -p %{buildroot}/run/uuidd -ln -s %{_bindir}/logger %{buildroot}/bin -# clock.txt from uuidd is a ghost file -touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt -ln -sf /sbin/service %{buildroot}/usr/sbin/rcuuidd -ln -sf /sbin/service %{buildroot}/usr/sbin/rcfstrim -%if !%build_util_linux -%make_install -%endif -%endif -# link duplicate manpages and python bindings -%fdupes -s %{buildroot}%{_prefix} - -%if %build_util_linux -%pre -%{service_add_pre raw.service} - -%post -%{service_add_post raw.service} -%set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount -%set_permissions %{_bindir}/su -# Safely migrate PAM files from coreutils to util-linux -# (openSUSE 12.3->13.1, SLE11->SLE12) -# -# coreutils with su were upgraded (and su removed) before util-linux -# with su was installed (see the Conflicts above). If the admin edited -# the PAM file, the seemingly no more used modified file was saved as -# .rpmsave and the new clean file was installed. As we want -# "noreplace" upgrade, and the contents of the clean file contents has -# no changes, we should restore admin modification, and rename the -# clean file to .rpmnew, as it would happen if the file was not moved -# from one package to another. -for PAM_FILE in default/su pam.d/su pam.d/su-l ; do - if test -f %{_sysconfdir}/$PAM_FILE.rpmsave ; then - mv %{_sysconfdir}/$PAM_FILE %{_sysconfdir}/$PAM_FILE.rpmnew - mv %{_sysconfdir}/$PAM_FILE.rpmsave %{_sysconfdir}/$PAM_FILE - fi -done - -%preun -%{service_del_preun raw.service} - -%postun -%{service_del_postun raw.service} - -%verifyscript -%verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount -%verify_permissions -e %{_bindir}/su - -%post -n libblkid1 -p /sbin/ldconfig - -%postun -n libblkid1 -p /sbin/ldconfig - -%post -n libmount1 -p /sbin/ldconfig - -%postun -n libmount1 -p /sbin/ldconfig - -%post -n libsmartcols1 -p /sbin/ldconfig - -%postun -n libsmartcols1 -p /sbin/ldconfig - -%post -n libuuid1 -p /sbin/ldconfig - -%postun -n libuuid1 -p /sbin/ldconfig - -%post -n libfdisk1 -p /sbin/ldconfig - -%postun -n libfdisk1 -p /sbin/ldconfig - -%files lang -f %{name}.lang -%endif - -%if %build_util_linux_systemd -# fstrim(8) and fstrim.service are from different packages. But it's a oneshot -# service (timer), no restart needed on binary updates (unless path is changed). -%pre -n util-linux-systemd -%{service_add_pre fstrim.service fstrim.timer} - -%post -n util-linux-systemd -%{service_add_post fstrim.service fstrim.timer} - -%preun -n util-linux-systemd -%{service_del_preun fstrim.service fstrim.timer} - -%postun -n util-linux-systemd -%{service_del_postun fstrim.service fstrim.timer} - -%pre -p /bin/bash -n uuidd -/usr/sbin/groupadd -r uuidd 2>/dev/null || : -/usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ - -d /var/run/uuidd uuidd 2>/dev/null || : -%{service_add_pre uuidd.socket uuidd.service} - -%post -n uuidd -%{service_add_post uuidd.socket uuidd.service} - -%preun -n uuidd -%{service_del_preun uuidd.socket uuidd.service} - -%postun -n uuidd -%{service_del_postun uuidd.socket uuidd.service} -%endif - -%if %build_util_linux -%files -f %{name}.files -# Common files for all archs -%defattr(-,root,root) -# util-linux documentation files -%doc README.licensing -%doc COPYING -%doc Documentation/licenses/COPYING.BSD-3 -%doc Documentation/licenses/COPYING.LGPLv2.1 -%doc Documentation/licenses/COPYING.UCB -%doc Documentation/blkid.txt -%doc Documentation/cal.txt -%doc Documentation/col.txt -%doc Documentation/deprecated.txt -%doc Documentation/getopt.txt -%doc Documentation/howto-debug.txt -%doc Documentation/hwclock.txt -%doc Documentation/modems-with-agetty.txt -%doc Documentation/mount.txt -%doc Documentation/pg.txt -%{_unitdir}/raw.service -%config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw -%config(noreplace) %{_sysconfdir}/filesystems -%config(noreplace) %{_sysconfdir}/blkid.conf -%config(noreplace) %{_sysconfdir}/pam.d/login -%config(noreplace) %{_sysconfdir}/pam.d/remote -%config(noreplace) %{_sysconfdir}/pam.d/runuser -%config(noreplace) %{_sysconfdir}/pam.d/runuser-l -%config(noreplace) %{_sysconfdir}/pam.d/su -%config(noreplace) %{_sysconfdir}/pam.d/su-l -%config(noreplace) %{_sysconfdir}/default/su -#UsrMerge -/bin/kill -/bin/su -/bin/dmesg -/bin/more -/bin/mount -/bin/umount -/bin/findmnt -/bin/login -/bin/lsblk -/sbin/agetty -/sbin/blockdev -/sbin/ctrlaltdel -/sbin/fsck.minix -/sbin/fsck.cramfs -/sbin/losetup -/sbin/mkfs -/sbin/mkfs.bfs -/sbin/mkfs.minix -/sbin/mkfs.cramfs -/sbin/mkswap -/sbin/nologin -/sbin/pivot_root -/sbin/raw -/sbin/swapoff -/sbin/swapon -/sbin/blkid -/sbin/findfs -/sbin/fsck -/sbin/switch_root -/sbin/wipefs -/sbin/fsfreeze -/sbin/swaplabel -/sbin/fstrim -/sbin/chcpu -#EndUsrMerge -%{_bindir}/kill -%{_bindir}/su -%{_bindir}/eject -%{_bindir}/cal -%{_bindir}/chmem -%{_bindir}/chrt -%{_bindir}/col -%{_bindir}/colcrt -%{_bindir}/colrm -%{_bindir}/column -%{_bindir}/dmesg -%{_bindir}/fallocate -%{_bindir}/fincore -%{_bindir}/findmnt -%{_bindir}/flock -%{_bindir}/getopt -%{_bindir}/hexdump -%{_bindir}/ionice -%{_bindir}/ipcmk -%{_bindir}/ipcrm -%{_bindir}/ipcs -%{_bindir}/isosize -%if %{with enable_last} -%{_bindir}/last -%{_bindir}/lastb -%endif -%{_bindir}/line -%{_bindir}/look -%{_bindir}/lsblk -%{_bindir}/lscpu -%{_bindir}/lsipc -%{_bindir}/lslocks -%{_bindir}/lsmem -%{_bindir}/lsns -%{_bindir}/mcookie -%{_bindir}/mesg -%{_bindir}/more -%{_bindir}/mount -%{_bindir}/namei -%{_bindir}/nsenter -%{_bindir}/prlimit -%{_bindir}/rename -%{_bindir}/renice -%{_bindir}/rev -%{_bindir}/script -%{_bindir}/scriptreplay -%{_bindir}/setarch -%{_bindir}/setpriv -%{_bindir}/setsid -%{_bindir}/taskset -%{_bindir}/ul -%{_bindir}/umount -%{_bindir}/unshare -%{_bindir}/mountpoint -%{_bindir}/utmpdump -%{_bindir}/uuidgen -%{_bindir}/uname26 -%ifnarch ppc ppc64 -%{_bindir}/chrp-addnote -%{_bindir}/mkzimage_cmdline -%endif -%{_bindir}/wdctl -%{_sbindir}/addpart -%{_sbindir}/agetty -%{_sbindir}/blkid -%{_sbindir}/blkdiscard -# blkzone depends on linux/blkzoned.h -%if 0%{?suse_version} >= 1330 -%{_sbindir}/blkzone -%endif -%{_sbindir}/blockdev -%{_sbindir}/chcpu -%{_sbindir}/ctrlaltdel -%{_sbindir}/delpart -%{_sbindir}/findfs -%{_sbindir}/fsck -%{_sbindir}/fsck.minix -%{_sbindir}/fsck.cramfs -%{_sbindir}/fsfreeze -%{_sbindir}/fstrim -%{_sbindir}/ldattach -%{_sbindir}/losetup -%{_sbindir}/mkfs -%{_sbindir}/mkfs.bfs -%{_sbindir}/mkfs.minix -%{_sbindir}/mkfs.cramfs -%{_sbindir}/mkswap -%{_sbindir}/nologin -%{_sbindir}/partx -%{_sbindir}/pivot_root -%{_sbindir}/raw -%{_sbindir}/rcraw -%{_sbindir}/resizepart -%{_sbindir}/rtcwake -%{_sbindir}/runuser -%{_sbindir}/setctsid -%{_sbindir}/sulogin -%{_sbindir}/swaplabel -%{_sbindir}/swapoff -%{_sbindir}/swapon -%{_sbindir}/switch_root -%{_sbindir}/wipefs -%verify(not mode) %attr(0755,root,tty) %{_bindir}/wall -%{_bindir}/whereis -%verify(not mode) %attr(0755,root,tty) %{_bindir}/write -%{_sbindir}/zramctl -%{_mandir}/man1/kill.1.gz -%{_mandir}/man1/su.1.gz -%{_mandir}/man1/cal.1.gz -%{_mandir}/man1/chrt.1.gz -%{_mandir}/man1/col.1.gz -%{_mandir}/man1/colcrt.1.gz -%{_mandir}/man1/colrm.1.gz -%{_mandir}/man1/column.1.gz -%{_mandir}/man1/dmesg.1.gz -%{_mandir}/man1/eject.1.gz -%{_mandir}/man1/fallocate.1.gz -%{_mandir}/man1/fincore.1.gz -%{_mandir}/man1/flock.1.gz -%{_mandir}/man1/getopt.1.gz -%{_mandir}/man1/hexdump.1.gz -%{_mandir}/man1/ipcrm.1.gz -%{_mandir}/man1/ipcs.1.gz -%if %{with enable_last} -%{_mandir}/man1/last.1.gz -%{_mandir}/man1/lastb.1.gz -%endif -%{_mandir}/man1/line.1.gz -%{_mandir}/man1/login.1.gz -%{_mandir}/man1/look.1.gz -%{_mandir}/man1/lscpu.1.gz -%{_mandir}/man1/lsipc.1.gz -%{_mandir}/man1/lsmem.1.gz -%{_mandir}/man1/mcookie.1.gz -%{_mandir}/man1/mesg.1.gz -%{_mandir}/man1/more.1.gz -%{_mandir}/man1/namei.1.gz -%{_mandir}/man1/nsenter.1.gz -%{_mandir}/man1/ionice.1.gz -%{_mandir}/man1/prlimit.1.gz -%{_mandir}/man1/rename.1.gz -%{_mandir}/man1/rev.1.gz -%{_mandir}/man1/renice.1.gz -%{_mandir}/man1/setpriv.1.gz -%{_mandir}/man1/setsid.1.gz -%{_mandir}/man1/script.1.gz -%{_mandir}/man1/scriptreplay.1.gz -%{_mandir}/man1/setterm.1.gz -%{_mandir}/man1/taskset.1.gz -%{_mandir}/man1/ul.1.gz -%{_mandir}/man1/unshare.1.gz -%{_mandir}/man1/wall.1.gz -%{_mandir}/man1/whereis.1.gz -%{_mandir}/man1/write.1.gz -%{_mandir}/man1/ipcmk.1.gz -%{_mandir}/man1/mountpoint.1.gz -%{_mandir}/man1/utmpdump.1.gz -%{_mandir}/man1/runuser.1.gz -%{_mandir}/man1/uuidgen.1.gz -%{_mandir}/man5/fstab.5.gz -%{_mandir}/man5/terminal-colors.d.5.gz -%{_mandir}/man8/addpart.8.gz -%{_mandir}/man8/agetty.8.gz -%if 0%{?suse_version} >= 1330 -%{_mandir}/man8/blkzone.8.gz -%endif -%{_mandir}/man8/blockdev.8.gz -%{_mandir}/man8/chmem.8.gz -%{_mandir}/man8/ctrlaltdel.8.gz -%{_mandir}/man8/delpart.8.gz -%{_mandir}/man8/blkid.8.gz -%{_mandir}/man8/blkdiscard.8.gz -%{_mandir}/man8/switch_root.8.gz -%{_mandir}/man8/mkfs.bfs.8.gz -%{_mandir}/man8/mkfs.minix.8.gz -%{_mandir}/man8/findfs.8.gz -%{_mandir}/man8/fsck.8.gz -%{_mandir}/man8/fsck.cramfs.8.gz -%{_mandir}/man8/fsck.minix.8.gz -%{_mandir}/man8/isosize.8.gz -%{_mandir}/man8/ldattach.8.gz -%{_mandir}/man8/losetup.8.gz -%{_mandir}/man8/lslocks.8.gz -%{_mandir}/man8/lsns.8.gz -%{_mandir}/man8/mkfs.8.gz -%{_mandir}/man8/mkfs.cramfs.8.gz -%{_mandir}/man8/mkswap.8.gz -%{_mandir}/man8/mount.8.gz -%{_mandir}/man8/nologin.8.gz -%{_mandir}/man8/findmnt.8.gz -%{_mandir}/man8/fsfreeze.8.gz -%{_mandir}/man8/swaplabel.8.gz -%{_mandir}/man8/readprofile.8.gz -%{_mandir}/man8/chcpu.8.gz -%ifnarch ppc ppc64 -%{_mandir}/man8/mkzimage_cmdline.8.gz -%endif -%{_mandir}/man8/partx.8.gz -%{_mandir}/man8/pivot_root.8.gz -%{_mandir}/man8/raw.8.gz -%{_mandir}/man8/rtcwake.8.gz -%{_mandir}/man8/setarch.8.gz -%{_mandir}/man8/swapoff.8.gz -%{_mandir}/man8/swapon.8.gz -%{_mandir}/man8/umount.8.gz -%{_mandir}/man8/uname26.8.gz -%{_mandir}/man8/setctsid.8.gz -%{_mandir}/man8/wipefs.8.gz -%{_mandir}/man8/zramctl.8.gz -%{_mandir}/man8/fstrim.8.gz -%{_mandir}/man8/lsblk.8.gz -%{_mandir}/man8/resizepart.8.gz -%{_mandir}/man8/sulogin.8.gz -%{_mandir}/man8/wdctl.8.gz -%{_sbindir}/flushb -%{_sbindir}/readprofile -%dir %{_datadir}/getopt -%attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash -%attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh -# These directories should be owned by bash-completion. But we don't want to -# install them on build, so own these two directories: -%dir %{_datadir}/bash-completion -%dir %{_datadir}/bash-completion/completions -%{_datadir}/bash-completion/completions/* -%if %build_util_linux_systemd -%exclude %{_datadir}/bash-completion/completions/logger -%exclude %{_datadir}/bash-completion/completions/lslogins -%exclude %{_datadir}/bash-completion/completions/uuidd -%endif -%ifnarch ia64 m68k -#XXX: post our patches upstream -#XXX: call fdupes on /usr/share/man -#UsrMerge -/sbin/fdisk -#EndUsrMerge -%{_sbindir}/fdisk -%{_mandir}/man8/fdisk.8.gz -%endif -%ifnarch %sparc ia64 m68k -%{_mandir}/man8/cfdisk.8.gz -%{_mandir}/man8/sfdisk.8.gz -#UsrMerge -/sbin/cfdisk -/sbin/sfdisk -#EndUsrMerge -%{_sbindir}/cfdisk -%{_sbindir}/sfdisk -%endif -%ifnarch s390 s390x -%{_sbindir}/fdformat -#UsrMerge -/sbin/hwclock -#EndUsrMerge -%{_sbindir}/hwclock -%attr(744,root,root) %{_sbindir}/klogconsole -%{_bindir}/setterm -%{_sbindir}/tunelp -%{_mandir}/man8/fdformat.8.gz -%{_mandir}/man8/hwclock.8.gz -%{_mandir}/man8/klogconsole.8.gz -%{_mandir}/man8/tunelp.8.gz -%endif - -%files -n libblkid1 -%defattr(-, root, root) -%{_libdir}/libblkid.so.1 -%{_libdir}/libblkid.so.1.* - -%files -n libblkid-devel -%defattr(-, root, root) -%{_libdir}/libblkid.so -%dir %{_includedir}/blkid -%{_includedir}/blkid/blkid.h -%{_libdir}/pkgconfig/blkid.pc -%{_mandir}/man3/libblkid.3.gz - -%files -n libblkid-devel-static -%defattr(-, root, root) -%{_libdir}/libblkid.*a - -%files -n libmount1 -%defattr(-, root, root) -%{_libdir}/libmount.so.1 -%{_libdir}/libmount.so.1.* - -%files -n libmount-devel -%defattr(-, root, root) -%{_libdir}/libmount.so -%dir %{_includedir}/libmount -%{_includedir}/libmount/libmount.h -%{_libdir}/pkgconfig/mount.pc - -%files -n libmount-devel-static -%defattr(-, root, root) -%{_libdir}/libmount.*a - -%files -n libsmartcols1 -%defattr(-, root, root) -%{_libdir}/libsmartcols.so.1 -%{_libdir}/libsmartcols.so.1.* - -%files -n libsmartcols-devel -%defattr(-, root, root) -%{_libdir}/libsmartcols.so -%dir %{_includedir}/libsmartcols -%{_includedir}/libsmartcols/libsmartcols.h -%{_libdir}/pkgconfig/smartcols.pc - -%files -n libsmartcols-devel-static -%defattr(-, root, root) -%{_libdir}/libsmartcols.*a - -%files -n libuuid1 -%defattr(-, root, root) -%{_libdir}/libuuid.so.1 -%{_libdir}/libuuid.so.1.* - -%files -n libuuid-devel -%defattr(-, root, root) -%{_libdir}/libuuid.so -%dir %{_includedir}/uuid -%{_includedir}/uuid/uuid.h -%{_libdir}/pkgconfig/uuid.pc -%{_mandir}/man3/uuid* - -%files -n libuuid-devel-static -%defattr(-, root, root) -%{_libdir}/libuuid.*a - -%files -n libfdisk1 -%defattr(-, root, root) -%{_libdir}/libfdisk.so.1 -%{_libdir}/libfdisk.so.1.* - -%files -n libfdisk-devel -%defattr(-, root, root) -%{_libdir}/libfdisk.so -%dir %{_includedir}/libfdisk -%{_includedir}/libfdisk/libfdisk.h -%{_libdir}/pkgconfig/fdisk.pc - -%files -n libfdisk-devel-static -%defattr(-, root, root) -%{_libdir}/libfdisk.*a -%endif - -%if %build_util_linux_systemd -%if %build_util_linux -%files systemd -%else -%files -%endif -%defattr(-, root, root) -/bin/logger -%{_bindir}/logger -%{_bindir}/lslogins -#BEGIN bootstrap_hack -%if 0%{?suse_version} < 1330 -# Build images of some products use util-linux that does not come from this -# spec and does not own bash-completion dir. So we have to own own these two -# directories in util-linux-systemd as well: -%dir %{_datadir}/bash-completion -%dir %{_datadir}/bash-completion/completions -%endif -#END bootstrap_hack -%{_datadir}/bash-completion/completions/logger -%{_datadir}/bash-completion/completions/lslogins -%{_mandir}/man1/logger.1.gz -%{_mandir}/man1/lslogins.1.gz -%{_sbindir}/rcfstrim -%{_unitdir}/fstrim.service -%{_unitdir}/fstrim.timer - -%files -n uuidd -%defattr(-, root, root) -%{_sbindir}/uuidd -%attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid -%ghost %{_localstatedir}/lib/libuuid/clock.txt -%attr(-,uuidd,uuidd) %ghost %dir /run/uuidd -%{_datadir}/bash-completion/completions/uuidd -%{_mandir}/man8/uuidd.8.gz -%{_sbindir}/rcuuidd -%{_unitdir}/uuidd.service -%{_unitdir}/uuidd.socket -%endif - -%if %build_python_libmount -%if %build_util_linux -%files -n python-libmount -%else -%files -%endif -%defattr(-, root, root) -%{python_sitearch}/libmount -%endif - -%changelog diff --git a/raw.init b/raw.init new file mode 100644 index 0000000..76623b7 --- /dev/null +++ b/raw.init @@ -0,0 +1,61 @@ +#! /bin/sh +# Copyright (c) 1995-2001 SuSE GmbH Nuernberg, Germany. +# +# Author: Dirk Lerner +# +# /etc/init.d/raw +# +# and symbolic its link +# +# /usr/sbin/rcraw +# +### BEGIN INIT INFO +# Provides: raw +# Required-Start: $local_fs $remote_fs +# Required-Stop: +# Default-Start: 2 3 5 +# Default-Stop: 0 1 6 +# Description: raw-devices +### END INIT INFO + +. /etc/rc.status + +CONFIG=/etc/raw +RAW_BIN=/usr/sbin/raw +RAW_MODULE=raw +test -x $RAW_BIN || exit 5 + +if [ ! -f $CONFIG ];then + echo "file: $CONFIG not found" + exit 6 +fi + +rc_reset +case "$1" in + start) + /sbin/modprobe $RAW_MODULE && sleep 2 + line=`grep -v ^# < $CONFIG` + + for i in $line;do + rawdev=`echo $i | cut -f1 -d:` + rawbind=`echo $i | cut -f2- -d:` + echo -n "bind /dev/raw/$rawdev to /dev/$rawbind..." + $RAW_BIN /dev/raw/$rawdev /dev/$rawbind > /dev/null 2>&1 + rc_status -v + done + ;; + stop) + echo -n "to unbind the rawdevice please perform a system shutdown" + rc_failed 3 + rc_status -v + ;; + status) + $RAW_BIN -qa 2> /dev/null + rc_status -v + ;; + *) + echo "Usage: $0 {start|stop|status}" + exit 1 + ;; +esac +rc_exit diff --git a/raw.service b/raw.service deleted file mode 100644 index 37d53b3..0000000 --- a/raw.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=raw devices -After=local-fs.target remote-fs.target - -[Service] -Type=oneshot -ExecStart=/bin/sh -c "\ - /sbin/modprobe raw;\ - /sbin/udevadm settle;\ - for i in `grep -v ^# /etc/raw`; do\ - rawdev=`echo $i | cut -f1 -d:`;\ - rawbind=`echo $i | cut -f2- -d:`;\ - /usr/sbin/raw /dev/raw/$rawdev /dev/$rawbind;\ - done" - -[Install] -WantedBy=multi-user.target diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4 diff --git a/remote.pamd b/remote.pamd deleted file mode 100644 index 4dd900b..0000000 --- a/remote.pamd +++ /dev/null @@ -1,12 +0,0 @@ -#%PAM-1.0 -# This file is used by /bin/login in case of remote logins (means where -# the -h option is used -auth requisite pam_nologin.so -auth [user_unknown=ignore success=ok ignore=ignore auth_err=die default=bad] pam_securetty.so -auth include common-auth -account include common-account -password include common-password -session required pam_loginuid.so -session include common-session -session optional pam_lastlog.so nowtmp showfailed -session optional pam_mail.so standard diff --git a/renice.8 b/renice.8 new file mode 100644 index 0000000..1aab359 --- /dev/null +++ b/renice.8 @@ -0,0 +1,136 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)renice.8 8.1 (Berkeley) 6/9/93 +.\" +.Dd June 9, 1993 +.Dt RENICE 8 +.Os BSD 4 +.Sh NAME +.Nm renice +.Nd alter priority of running processes +.Sh SYNOPSIS +.Nm renice +.Ar priority +.Oo +.Op Fl p +.Ar pid ... +.Oc +.Oo +.Op Fl g +.Ar pgrp ... +.Oc +.Oo +.Op Fl u +.Ar user ... +.Oc +.Sh DESCRIPTION +.Nm Renice +alters the +scheduling priority of one or more running processes. +The following +.Ar who +parameters are interpreted as process ID's, process group +ID's, or user names. +.Nm Renice Ns 'ing +a process group causes all processes in the process group +to have their scheduling priority altered. +.Nm Renice Ns 'ing +a user causes all processes owned by the user to have +their scheduling priority altered. +By default, the processes to be affected are specified by +their process ID's. +.Pp +Options supported by +.Nm renice : +.Bl -tag -width Ds +.It Fl g +Force +.Ar who +parameters to be interpreted as process group ID's. +.It Fl u +Force the +.Ar who +parameters to be interpreted as user names. +.It Fl p +Resets the +.Ar who +interpretation to be (the default) process ID's. +.El +.Pp +For example, +.Bd -literal -offset +renice +1 987 -u daemon root -p 32 +.Ed +.Pp +would change the priority of process ID's 987 and 32, and +all processes owned by users daemon and root. +.Pp +Users other than the super-user may only alter the priority of +processes they own, +and can only monotonically increase their ``nice value'' +within the range 0 to +.Dv PRIO_MAX +(20). +(This prevents overriding administrative fiats.) +The super-user +may alter the priority of any process +and set the priority to any value in the range +.Dv PRIO_MIN +(\-20) +to +.Dv PRIO_MAX . +Useful priorities are: +20 (the affected processes will run only when nothing else +in the system wants to), +0 (the ``base'' scheduling priority), +anything negative (to make things go very fast). +.Sh FILES +.Bl -tag -width /etc/passwd -compact +.It Pa /etc/passwd +to map user names to user ID's +.El +.Sh SEE ALSO +.Xr getpriority 2 , +.Xr setpriority 2 +.Sh BUGS +Non super-users can not increase scheduling priorities of their own processes, +even if they were the ones that decreased the priorities in the first place. +.br +The Linux kernel (at least version 2.0.0) and linux libc (at least +version 5.2.18) does not agree entirely on what the specifics of the +systemcall interface to set nice values is. Thus causes renice to +report bogus previous nice values. +.Sh HISTORY +The +.Nm +command appeared in +.Bx 4.0 . diff --git a/runuser.pamd b/runuser.pamd deleted file mode 100644 index 15d79c9..0000000 --- a/runuser.pamd +++ /dev/null @@ -1,5 +0,0 @@ -#%PAM-1.0 -# Note that runuser requires only "session" setting (and for example "auth sufficient pam_rootok.so" dummy line). -auth sufficient pam_rootok.so -session include common-session -session optional pam_xauth.so diff --git a/schedutils-1.4.0.tar.bz2 b/schedutils-1.4.0.tar.bz2 new file mode 100644 index 0000000..f046c5a --- /dev/null +++ b/schedutils-1.4.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84038ab2b3ea6ff4b31b46638b9ceae56aebc95742e9b75276c6e6f5465f05b1 +size 15930 diff --git a/sm-notify-20060111.tar.bz2 b/sm-notify-20060111.tar.bz2 new file mode 100644 index 0000000..e5cf4a7 --- /dev/null +++ b/sm-notify-20060111.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffe524be61389246a7ebb71832bf3f750834dbf8e5a38d4cc1548e267a8fb853 +size 5843 diff --git a/stupid-programmer.diff b/stupid-programmer.diff new file mode 100644 index 0000000..6b4f2ee --- /dev/null +++ b/stupid-programmer.diff @@ -0,0 +1,38 @@ +--- disk-utils/fsck.cramfs.c ++++ disk-utils/fsck.cramfs.c +@@ -76,16 +76,7 @@ + + #define PAD_SIZE 512 + +-#include +-#ifdef PAGE_SIZE +-#define PAGE_CACHE_SIZE ((int) PAGE_SIZE) +-#elif defined __ia64__ +-#define PAGE_CACHE_SIZE (16384) +-#elif defined __alpha__ +-#define PAGE_CACHE_SIZE (8192) +-#else +-#define PAGE_CACHE_SIZE (4096) +-#endif ++#define PAGE_CACHE_SIZE getpagesize() /* Stupid programmer */ + + /* Guarantee access to at least 8kB at a time */ + #define ROMBUFFER_BITS 13 +@@ -95,7 +86,7 @@ + static unsigned long read_buffer_block = ~0UL; + + /* Uncompressing data structures... */ +-static char outbuffer[PAGE_CACHE_SIZE*2]; ++static char *outbuffer; /* Stupid programmer */ + z_stream stream; + + #endif /* INCLUDE_FS_TESTS */ +@@ -464,6 +455,8 @@ + int c; /* for getopt */ + int start = 0; + ++ outbuffer = malloc(PAGE_CACHE_SIZE); /* Stupid programmer */ ++ + if (argc) + progname = argv[0]; + diff --git a/su.default b/su.default deleted file mode 100644 index 62d1702..0000000 --- a/su.default +++ /dev/null @@ -1,11 +0,0 @@ -# Per default, only "su -" will set a new PATH. -# If this variable is changed to "yes" (default is "no"), -# every su call will overwrite the PATH variable. -ALWAYS_SET_PATH=no - -# Default path. -PATH=/usr/local/bin:/bin:/usr/bin - -# Default path for a user invoking su to root. -SUPATH=/usr/sbin:/bin:/usr/bin:/sbin - diff --git a/su.pamd b/su.pamd deleted file mode 100644 index d0c9fe8..0000000 --- a/su.pamd +++ /dev/null @@ -1,8 +0,0 @@ -#%PAM-1.0 -auth sufficient pam_rootok.so -auth include common-auth -account sufficient pam_rootok.so -account include common-account -password include common-password -session include common-session -session optional pam_xauth.so diff --git a/time-1.7.dif b/time-1.7.dif new file mode 100644 index 0000000..f3b9104 --- /dev/null +++ b/time-1.7.dif @@ -0,0 +1,20 @@ +--- resuse.h ++++ resuse.h +@@ -39,6 +39,9 @@ + # if HAVE_WAIT3 + # include + # else ++# if defined(__linux__) && defined(__alpha__) ++# include ++# else + /* Process resource usage structure. */ + struct rusage + { +@@ -49,6 +52,7 @@ + ru_oublock, ru_msgsnd, ru_msgrcv, ru_nsignals, + ru_nvcsw, ru_nivcsw; + }; ++# endif + # endif + #endif + diff --git a/time-1.7.tar.gz b/time-1.7.tar.gz new file mode 100644 index 0000000..d9a5b53 --- /dev/null +++ b/time-1.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e37ea79a253bf85a85ada2f7c632c14e481a5fd262a362f6f4fd58e68601496d +size 103066 diff --git a/util-linux-2.11q-fs_mac.diff b/util-linux-2.11q-fs_mac.diff new file mode 100644 index 0000000..58bc11d --- /dev/null +++ b/util-linux-2.11q-fs_mac.diff @@ -0,0 +1,250 @@ +--- util-linux-2.12q/fdisk/fdiskmaclabel.c ++++ util-linux-2.12q/fdisk/fdiskmaclabel.c +@@ -0,0 +1,87 @@ ++/* ++ Changes: ++ Sat Mar 20 09:51:38 EST 1999 Arnaldo Carvalho de Melo ++ Internationalization ++*/ ++#include /* stderr */ ++#include /* strstr */ ++#include /* write */ ++ ++#include ++ ++#include "common.h" ++#include "fdisk.h" ++#include "fdiskmaclabel.h" ++#include "nls.h" ++ ++#define MAC_BITMASK 0xffff0000 ++ ++ ++static int other_endian = 0; ++static short volumes=1; ++ ++/* ++ * only dealing with free blocks here ++ */ ++ ++static void ++mac_info( void ) { ++ puts( ++ _("\n\tThere is a valid Mac label on this disk.\n" ++ "\tUnfortunately fdisk(1) cannot handle these disks.\n" ++ "\tUse either pdisk or parted to modify the partition table.\n" ++ "\tNevertheless some advice:\n" ++ "\t1. fdisk will destroy its contents on write.\n" ++ "\t2. Be sure that this disk is NOT a still vital\n" ++ "\t part of a volume group. (Otherwise you may\n" ++ "\t erase the other disks as well, if unmirrored.)\n") ++ ++ ); ++} ++ ++void ++mac_nolabel( void ) ++{ ++ maclabel->magic = 0; ++ mac_label = 0; ++ partitions = 4; ++ memset( MBRbuffer, 0, sizeof(MBRbuffer) ); /* avoid fdisk cores */ ++ return; ++} ++ ++int ++check_mac_label( void ) ++{ ++ /* ++ Conversion: only 16 bit should compared ++ e.g.: HFS Label is only 16bit long ++ */ ++ ++ int magic_masked = 0 ; ++ magic_masked = maclabel->magic & MAC_BITMASK ; ++ ++ switch (magic_masked) { ++ case MAC_LABEL_MAGIC : ++ case MAC_LABEL_MAGIC_2: ++ case MAC_LABEL_MAGIC_3: ++ goto IS_MAC; ++ break; ++ default: ++ mac_label = 0; ++ other_endian = 0; ++ return 0; ++ ++ ++ } ++ ++ IS_MAC: ++ other_endian = (maclabel->magic == MAC_LABEL_MAGIC_SWAPPED); // =? ++ update_units(); ++ mac_label = 1; ++ partitions= 1016; // =? ++ volumes = 15; // =? ++ mac_info(); ++ mac_nolabel(); /* %% */ ++ mac_label = 1; /* %% */ ++ return 1; ++} +--- util-linux-2.12q/fdisk/fdiskmaclabel.h ++++ util-linux-2.12q/fdisk/fdiskmaclabel.h +@@ -0,0 +1,40 @@ ++#include /* for __u32 etc */ ++/* ++ * Copyright (C) Andreas Neuper, Sep 1998. ++ * This file may be redistributed under ++ * the terms of the GNU Public License. ++ */ ++ ++typedef struct { ++ unsigned int magic; /* expect MAC_LABEL_MAGIC */ ++ unsigned int fillbytes1[124]; ++ unsigned int physical_volume_id; ++ unsigned int fillbytes2[124]; ++} mac_partition; ++ ++#define MAC_LABEL_MAGIC 0x45520000 // MAC magic number only 16bits, do i always know that there are 0200 following ? Problem, after magic the uint16_t res1; follows, i donnno know about the 200k ++#define MAC_LABEL_MAGIC_2 0x50530000 ++#define MAC_LABEL_MAGIC_3 0x504d0000 ++ ++ ++#define MAC_LABEL_MAGIC_SWAPPED 0x00002554 ++ ++#define MAC_LABEL_MAGIC_2_SWAPPED 0x00003505 ++#define MAC_LABEL_MAGIC_3_SWAPPED 0x0000d405 ++ ++ ++/* fdisk.c */ ++#define maclabel ((mac_partition *)MBRbuffer) ++extern char MBRbuffer[MAX_SECTOR_SIZE]; ++extern char changed[MAXIMUM_PARTS]; ++extern unsigned int heads, sectors, cylinders; ++extern int show_begin; ++extern int mac_label; ++extern char *partition_type(unsigned char type); ++extern void update_units(void); ++extern char read_chars(char *mesg); ++ ++/* fdiskmaclabel.c */ ++extern struct systypes mac_sys_types[]; ++extern void mac_nolabel( void ); ++extern int check_mac_label( void ); +--- util-linux-2.12q/fdisk/Makefile ++++ util-linux-2.12q/fdisk/Makefile +@@ -39,7 +39,7 @@ + endif + endif + +-cfdisk: cfdisk.o llseek.o disksize.o i386_sys_types.o $(LIB)/xstrncpy.o ++cfdisk: cfdisk.o llseek.o disksize.o i386_sys_types.o $(LIB)/xstrncpy.o + ifeq "$(HAVE_SLANG)" "yes" + $(CC) $(LDFLAGS) $^ -o $@ $(LIBSLANG) + else +@@ -55,15 +55,17 @@ + rm -f activate + ln -s sfdisk activate + +-fdisk: fdisk.o llseek.o disksize.o fdiskbsdlabel.o fdisksgilabel.o \ +- fdisksunlabel.o fdiskaixlabel.o i386_sys_types.o partname.o ++fdisk: fdisk.o llseek.o disksize.o fdiskbsdlabel.o fdisksgilabel.o fdisksunlabel.o \ ++ fdiskmaclabel.o fdiskaixlabel.o i386_sys_types.o partname.o + fdisk.o: fdisk.c fdisk.h + fdiskbsdlabel.o: fdiskbsdlabel.c fdisk.h fdiskbsdlabel.h + fdisksunlabel.o: fdisksunlabel.c fdisksunlabel.h fdisk.h + fdiskaixlabel.o: fdiskaixlabel.c fdiskaixlabel.h fdisk.h ++fdiskmaclabel.o: fdiskmaclabel.c fdiskmaclabel.h fdisk.h ++ + fdisk.o cfdisk.o sfdisk.o fdiskbsdlabel.o fdisksunlabel.o \ +- fdisksgilabel.o fdiskaixlabel.o i386_sys_types.o partname.o: common.h +-sfdisk: sfdisk.o disksize.o i386_sys_types.o partname.o ++ fdisksgilabel.o fdiskaixlabel.o fdiskmaclabel.o i386_sys_types.o partname.o: common.h ++sfdisk: sfdisk.o disksize.o i386_sys_types.o partname.o + + install: all + $(INSTALLDIR) $(SBINDIR) +--- util-linux-2.12q/fdisk/fdisk.c ++++ util-linux-2.12q/fdisk/fdisk.c +@@ -26,6 +26,7 @@ + #include "fdisksunlabel.h" + #include "fdisksgilabel.h" + #include "fdiskaixlabel.h" ++#include "fdiskmaclabel.h" + + #include "../defines.h" + #ifdef HAVE_blkpg_h +@@ -165,11 +166,12 @@ + + unsigned long long total_number_of_sectors; + +-#define dos_label (!sun_label && !sgi_label && !aix_label && !osf_label) ++#define dos_label (!sun_label && !sgi_label && !aix_label && !mac_label && !osf_label) + int sun_label = 0; /* looking at sun disklabel */ + int sgi_label = 0; /* looking at sgi disklabel */ + int aix_label = 0; /* looking at aix disklabel */ + int osf_label = 0; /* looking at OSF/1 disklabel */ ++int mac_label = 0; /* looking at mac disklabel */ + int possibly_osf_label = 0; + + jmp_buf listingbuf; +@@ -363,6 +365,10 @@ + puts(_(" v verify the partition table")); + puts(_(" w write table to disk and exit")); + } ++ else if (mac_label) { ++ puts(_("no Commands available")); ++ ++ } + else if (aix_label) { + puts(_("Command action")); + puts(_(" m print this menu")); +@@ -443,6 +449,9 @@ + puts(_(" v verify the partition table")); + puts(_(" w write table to disk and exit")); + } ++ else if (mac_label) { ++ puts(_("no Commands available")); ++ } + else { + puts(_("Command action")); + puts(_(" b move beginning of data in a partition")); /* !sun */ +@@ -943,6 +952,9 @@ + if (check_aix_label()) + return 0; + ++ if (check_mac_label()) ++ return 0; ++ + if (check_osf_label()) { + possibly_osf_label = 1; + if (!valid_part_table_flag(MBRbuffer)) { +@@ -2074,6 +2086,15 @@ + "This will destroy the present disk contents.\n")); + return; + } ++ ++ if (mac_label) { ++ printf(_("\tSorry - this fdisk cannot handle Mac disk labels." ++ "\n\tIf you want to add DOS-type partitions, create" ++ "\n\ta new empty DOS partition table first. (Use o.)" ++ "\n\tWARNING: " ++ "This will destroy the present disk contents.\n")); ++ return; ++ } + + for (i = 0; i < 4; i++) + free_primary += !ptes[i].part_table->sys_ind; +@@ -2404,7 +2425,11 @@ + if (gb > 0) { /* I/O error */ + } else if (gb < 0) { /* no DOS signature */ + list_disk_geometry(); +- if (!aix_label && btrydev(device) < 0) ++ if (aix_label) ++ return; ++ if (mac_label) ++ return; ++ if (btrydev(device) < 0) + fprintf(stderr, + _("Disk %s doesn't contain a valid " + "partition table\n"), device); diff --git a/util-linux-2.11u-nfs-mount_acl.diff b/util-linux-2.11u-nfs-mount_acl.diff new file mode 100644 index 0000000..8977f08 --- /dev/null +++ b/util-linux-2.11u-nfs-mount_acl.diff @@ -0,0 +1,85 @@ +Adds the [no]acl NFS mount option that was added to the kernel. This +change has been discussed and accepted by Trond Myklebust + and Olaf Kirch . + + -- Andreas Gruenbacher + +================================================================================ +--- util-linux-2.12q/mount/mount.8 ++++ util-linux-2.12q/mount/mount.8 +@@ -1335,7 +1335,8 @@ + .BR ac , + .BR tcp , + .BR udp , +-.BR lock . ++.BR lock , ++.BR acl . + For details, see + .BR nfs (5). + +--- util-linux-2.12q/mount/nfs.5 ++++ util-linux-2.12q/mount/nfs.5 +@@ -204,6 +204,15 @@ + .I udp + Mount the NFS filesystem using the UDP protocol. This + is the default. ++.TP 1.5i ++.I noacl ++Assume no extended access control mechanisms like POSIX ACLs are used ++on the NFS filesystem, and depend on the file mode permission bits ++instead of using the ACCESS remote procedure call. The default is to ++use the ACCESS remote procedure call for making access decisions in ++NFS version 3. (On NFS version 2 filesystems this option has no effect.) ++This option also deactivates the GETACL and SETACL remote procedure calls ++which are otherwise used to manipulate ACLs. + .P + All of the non-value options have corresponding nooption forms. + For example, nointr means don't allow file operations to be +--- util-linux-2.12q/mount/nfs_mount4.h ++++ util-linux-2.12q/mount/nfs_mount4.h +@@ -51,4 +51,4 @@ + #define NFS_MOUNT_KERBEROS 0x0100 /* 3 */ + #define NFS_MOUNT_NONLM 0x0200 /* 3 */ + #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */ +- ++#define NFS_MOUNT_NOACL 0x0800 /* 4 */ +--- util-linux-2.12q/mount/nfsmount.c ++++ util-linux-2.12q/mount/nfsmount.c +@@ -216,7 +216,7 @@ + struct stat statbuf; + char *s; + int port, mountport, proto, bg, soft, intr; +- int posix, nocto, noac, nolock, broken_suid; ++ int posix, nocto, noac, nolock, broken_suid, noacl; + int retry, tcp; + int mountprog, mountvers, nfsprog, nfsvers; + int retval; +@@ -316,6 +316,7 @@ + nocto = 0; + nolock = 0; + broken_suid = 0; ++ noacl = 0; + noac = 0; + retry = 10000; /* 10000 minutes ~ 1 week */ + tcp = 0; +@@ -427,6 +428,8 @@ + printf(_("Warning: option nolock is not supported.\n")); + } else if (!strcmp(opt, "broken_suid")) { + broken_suid = val; ++ } else if (!strcmp(opt, "acl")) { ++ noacl = !val; + } else { + if (!sloppy) { + printf(_("unknown nfs mount option: " +@@ -452,8 +455,10 @@ + data.flags |= (nolock ? NFS_MOUNT_NONLM : 0); + #endif + #if NFS_MOUNT_VERSION >= 4 +- if (nfs_mount_version >= 4) ++ if (nfs_mount_version >= 4) { + data.flags |= (broken_suid ? NFS_MOUNT_BROKEN_SUID : 0); ++ data.flags |= (noacl ? NFS_MOUNT_NOACL : 0); ++ } + #endif + if (nfsvers > MAX_NFSPROT) { + fprintf(stderr, "NFSv%d not supported!\n", nfsvers); diff --git a/util-linux-2.11z-hwclock_geteuid.diff b/util-linux-2.11z-hwclock_geteuid.diff new file mode 100644 index 0000000..aa0ed74 --- /dev/null +++ b/util-linux-2.11z-hwclock_geteuid.diff @@ -0,0 +1,11 @@ +--- hwclock/hwclock.c ++++ hwclock/hwclock.c +@@ -1446,7 +1446,7 @@ + show = 1; /* default to show */ + + +- if (getuid() == 0) ++ if (geteuid() == 0) + permitted = TRUE; + else { + /* program is designed to run setuid (in some situations) */ diff --git a/util-linux-2.12-enablereplaybuild.diff b/util-linux-2.12-enablereplaybuild.diff new file mode 100644 index 0000000..f824893 --- /dev/null +++ b/util-linux-2.12-enablereplaybuild.diff @@ -0,0 +1,20 @@ +--- misc-utils/Makefile ++++ misc-utils/Makefile +@@ -12,7 +12,7 @@ + # Where to put man pages? + + MAN1= cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \ +- namei.1 rename.1 script.1 whereis.1 hostid.1 ++ namei.1 rename.1 script.1 whereis.1 hostid.1 scriptreplay.1 + + # Where to put binaries? + # See the "install" rule for the links. . . +@@ -20,7 +20,7 @@ + BIN= + + USRBIN= cal chkdupexe ddate hostid logger look mcookie \ +- namei rename script whereis ++ namei rename script scriptreplay whereis + + MAYBE= reset setterm + diff --git a/util-linux-2.12-hostid.diff b/util-linux-2.12-hostid.diff new file mode 100644 index 0000000..0a9423c --- /dev/null +++ b/util-linux-2.12-hostid.diff @@ -0,0 +1,137 @@ +--- util-linux-2.12q/misc-utils/hostid.1 ++++ util-linux-2.12q/misc-utils/hostid.1 +@@ -0,0 +1,24 @@ ++.TH hostid 1 ++.SH NAME ++hostid \- set or print system's host id. ++.SH SYNTAX ++.B hostid ++[\-v] [\|\fIdecimal-id\fR\|] ++.SH DESCRIPTION ++.\".NXR "hostid command" ++The ++.B hostid ++command prints the current host id number in hexadecimal and both ++decimal and hexadecimal in parenthesis if the \-v option is given. ++This numeric value is expected to be unique across all hosts ++and is normally set to resemble the host's Internet address. ++ ++Only the super-user can set the hostid by giving an argument. This value is ++stored in the file /etc/hostid and need only be performed once. ++ ++.SH AUTHOR ++Hostid is written by Mitch DSouza \- (m.dsouza@mrc-apu.cam.ac.uk) ++ ++.SH SEE ALSO ++gethostid(2), sethostid(2) ++ +--- util-linux-2.12q/misc-utils/hostid.c ++++ util-linux-2.12q/misc-utils/hostid.c +@@ -0,0 +1,88 @@ ++/* Program hostid. Changed on 7.10.1997 ++ New: - Hostid 0 is not permitted. ++ - Set hostid dezimal or hexadezimal, both possible. ++ - Maximum Value for id is tested ++ - Wrong Parameters are caught ++ Nov 13 2003 - cleanup, mmj@suse.de ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++void usage(void); ++ ++void usage() ++{ ++ printf ("usage : hostid [-h] [-v] []\n\n" ++ "no options: print hostid as hexadecimal number\n" ++ "-h print this helptext\n" ++ "-v print hostid decimal and hexadecimal\n" ++ " set the hostid to \n\n" ++ "The id String can be specified as\n" ++ " - decimal number\n" ++ " - hexadecimal number preceded by 0x\n" ++ " - octal number preceded by 0 \n\n" ++ "Remarks:\n" ++ " - only root can set the hostid\n" ++ " - it's not possible to set the hostid to 0\n\n"); ++} ++ ++int main (int argc, char *argv[]) ++{ ++ long id; ++ int verbose = 0; ++ ++ if (argc > 2) { ++ printf ("wrong arguments\n"); ++ usage(); ++ exit(1); ++ } ++ ++ if (argc == 2 && strcmp(argv[1], "-h") == 0) { ++ usage(); ++ exit(0); ++ } ++ ++ if (argc == 2 && strcmp(argv[1], "-v") == 0) { ++ verbose = 1; ++ argc--; ++ argv++; ++ } ++ ++ switch (argc) { ++ case 2: ++ id = strtol(argv[1], NULL, 0); ++ if (errno == ERANGE) { ++ printf ("Overflow: given string was out of range\n"); ++ exit(1); ++ } ++ ++ if (id == 0) { ++ printf ("value not possible: Abort\n"); ++ usage(); ++ exit(1); ++ } ++ if (sethostid(id) != 0) { ++ perror("sethostid"); ++ exit(1); ++ } ++ break; ++ ++ case 1: ++ id = gethostid(); ++ if(id && verbose) { ++ printf("Hostid is %ld (0x%lx)\n", id, id); ++ } else if(id) { ++ printf("0x%lx\n", id); ++ } else { ++ printf ("Error while trying: gethostid\n"); ++ exit(1); ++ } ++ break; ++ } ++ ++ return 0; ++} +--- util-linux-2.12q/misc-utils/Makefile ++++ util-linux-2.12q/misc-utils/Makefile +@@ -12,14 +12,14 @@ + # Where to put man pages? + + MAN1= cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \ +- namei.1 rename.1 script.1 whereis.1 ++ namei.1 rename.1 script.1 whereis.1 hostid.1 + + # Where to put binaries? + # See the "install" rule for the links. . . + + BIN= + +-USRBIN= cal chkdupexe ddate logger look mcookie \ ++USRBIN= cal chkdupexe ddate hostid logger look mcookie \ + namei rename script whereis + + MAYBE= reset setterm diff --git a/util-linux-2.12-mount_guessfstype.diff b/util-linux-2.12-mount_guessfstype.diff new file mode 100644 index 0000000..2dbf0d7 --- /dev/null +++ b/util-linux-2.12-mount_guessfstype.diff @@ -0,0 +1,183 @@ +--- util-linux-2.12q/configure ++++ util-linux-2.12q/configure +@@ -190,6 +190,7 @@ + + # + # H9. For raw.c: do we have ? ++# H10. For guessfstype of CD-Extra, do we have ? + # + if ./testincl "linux/raw.h"; then + echo "HAVE_RAW_H=yes" >> make_include +@@ -552,6 +553,12 @@ + echo "HAVE_XGETTEXT=no" >> make_include + fi + ++# ++# H10. For guessfstype of CD-Extra, do we have ++# ++if ./testincl "linux/cdrom.h"; then ++ echo "#define HAVE_cdrom_h" >> defines.h ++fi + + # + # 8. For err.c: do we have __progname? +--- util-linux-2.12q/mount/mount_guess_fstype.c ++++ util-linux-2.12q/mount/mount_guess_fstype.c +@@ -26,6 +26,9 @@ + * 2001-10-26 Tim Launchbury + * added sysv magic. + * ++ * 2003-11-21 Mads Martin Joergensen ++ * added guessfstype support for CD-Extra ++ * + * aeb - many changes. + * + */ +@@ -37,11 +40,16 @@ + #include + #include + #include ++#include + #include "linux_fs.h" + #include "mount_blkid.h" + #include "mount_guess_fstype.h" + #include "sundries.h" /* for xstrdup */ + #include "nls.h" ++#include "../defines.h" ++#ifdef HAVE_cdrom_h ++#include ++#endif + + #define ETC_FILESYSTEMS "/etc/filesystems" + #define PROC_FILESYSTEMS "/proc/filesystems" +@@ -249,7 +257,51 @@ + return 0; + + /* do seeks and reads in disk order, otherwise a very short +- partition may cause a failure because of read error */ ++ partition may cause a failure because of read error ++ Rearranged a tiny bit to check ext2/3 before vfat. We still ++ have to make sure it's not iso9660 first, or otherwise we ++ might bail out wrongly due to an io-error */ ++ ++ if (!type) { ++ /* block 0 */ ++ if (lseek(fd, 0, SEEK_SET) != 0 ++ || read(fd, (char *) &xsb, sizeof(xsb)) != sizeof(xsb)) ++ goto try_iso9660; ++ } ++ ++ if (!type) { ++ /* block 1 */ ++ if (lseek(fd, 1024, SEEK_SET) != 1024 || ++ read(fd, (char *) &sb, sizeof(sb)) != sizeof(sb)) ++ goto io_error; ++ ++ /* ext2 has magic in little-endian on disk, so "swapped" is ++ superfluous; however, there have existed strange byteswapped ++ PPC ext2 systems */ ++ if (ext2magic(sb.e2s) == EXT2_SUPER_MAGIC || ++ ext2magic(sb.e2s) == EXT2_PRE_02B_MAGIC || ++ ext2magic(sb.e2s) == swapped(EXT2_SUPER_MAGIC)) { ++ type = "ext2"; ++ ++ /* maybe even ext3? */ ++ if ((assemble4le(sb.e2s.s_feature_compat) ++ & EXT3_FEATURE_COMPAT_HAS_JOURNAL) && ++ assemble4le(sb.e2s.s_journal_inum) != 0) ++ type = "ext3"; /* "ext3,ext2" */ ++ } ++ ++ else if (minixmagic(sb.ms) == MINIX_SUPER_MAGIC || ++ minixmagic(sb.ms) == MINIX_SUPER_MAGIC2 || ++ minixmagic(sb.ms) == MINIX2_SUPER_MAGIC || ++ minixmagic(sb.ms) == MINIX2_SUPER_MAGIC2) ++ type = "minix"; ++ ++ else if (extmagic(sb.es) == EXT_SUPER_MAGIC) ++ type = "ext"; ++ ++ else if (vxfsmagic(sb.vs) == VXFS_SUPER_MAGIC) ++ type = "vxfs"; ++ } + + if (!type) { + /* block 0 */ +@@ -307,40 +359,6 @@ + type = "sysv"; + } + +- if (!type) { +- /* block 1 */ +- if (lseek(fd, 1024, SEEK_SET) != 1024 || +- read(fd, (char *) &sb, sizeof(sb)) != sizeof(sb)) +- goto io_error; +- +- /* ext2 has magic in little-endian on disk, so "swapped" is +- superfluous; however, there have existed strange byteswapped +- PPC ext2 systems */ +- if (ext2magic(sb.e2s) == EXT2_SUPER_MAGIC || +- ext2magic(sb.e2s) == EXT2_PRE_02B_MAGIC || +- ext2magic(sb.e2s) == swapped(EXT2_SUPER_MAGIC)) { +- type = "ext2"; +- +- /* maybe even ext3? */ +- if ((assemble4le(sb.e2s.s_feature_compat) +- & EXT3_FEATURE_COMPAT_HAS_JOURNAL) && +- assemble4le(sb.e2s.s_journal_inum) != 0) +- type = "ext3"; /* "ext3,ext2" */ +- } +- +- else if (minixmagic(sb.ms) == MINIX_SUPER_MAGIC || +- minixmagic(sb.ms) == MINIX_SUPER_MAGIC2 || +- minixmagic(sb.ms) == swapped(MINIX_SUPER_MAGIC2) || +- minixmagic(sb.ms) == MINIX2_SUPER_MAGIC || +- minixmagic(sb.ms) == MINIX2_SUPER_MAGIC2) +- type = "minix"; +- +- else if (extmagic(sb.es) == EXT_SUPER_MAGIC) +- type = "ext"; +- +- else if (vxfsmagic(sb.vs) == VXFS_SUPER_MAGIC) +- type = "vxfs"; +- } + + if (!type) { + /* block 1 */ +@@ -416,8 +434,34 @@ + /* block 32 */ + try_iso9660: + if (lseek(fd, 0x8000, SEEK_SET) != 0x8000 +- || read(fd, (char *) &isosb, sizeof(isosb)) != sizeof(isosb)) +- goto io_error; ++ || read(fd, (char *) &isosb, sizeof(isosb)) != sizeof(isosb)) { ++#ifdef HAVE_cdrom_h ++ /* Try and see if we have an iso9660 data track later on */ ++ char toc_header[2]; ++ struct cdrom_tocentry *toc[CDROM_LEADOUT + 1]; ++ int i, offset; ++ ++ if (ioctl(fd, CDROMREADTOCHDR, &toc_header)) ++ goto io_error; ++ for (i = toc_header[0]; i <= toc_header[1]; i++) { ++ toc[i] = malloc(sizeof(struct cdrom_tocentry)); ++ memset(toc[i],0,sizeof(struct cdrom_tocentry)); ++ toc[i]->cdte_track = i; ++ toc[i]->cdte_format = CDROM_LBA; ++ if(ioctl(fd,CDROMREADTOCENTRY,toc[i])) ++ goto io_error; ++ if((toc[i]->cdte_ctrl & CDROM_DATA_TRACK)) { ++ offset = 2048 * (toc[i]->cdte_addr.lba + 16); ++ if(lseek(fd, offset, SEEK_SET) != offset) ++ goto io_error; ++ if(read(fd,(char *) &isosb,sizeof(isosb))==-1) ++ goto io_error; ++ } ++ } ++#else ++ goto io_error; ++#endif ++ } + + if (strncmp(isosb.hs.id, HS_STANDARD_ID, sizeof(isosb.hs.id)) == 0) { + /* "CDROM" */ diff --git a/util-linux-2.12-mountfallback.patch b/util-linux-2.12-mountfallback.patch new file mode 100644 index 0000000..5ffd6c7 --- /dev/null +++ b/util-linux-2.12-mountfallback.patch @@ -0,0 +1,34 @@ +--- util-linux-2.12q/mount/nfsmount.c ++++ util-linux-2.12q/mount/nfsmount.c +@@ -169,8 +169,20 @@ + } + if (!p.pm_vers) + p.pm_vers = MOUNTVERS; +- if (!p.pm_prot) ++ if (!p.pm_prot) { + p.pm_prot = IPPROTO_TCP; ++ if (!p.pm_port) { ++ p.pm_port = pmap_getport(server_addr, ++ p.pm_prog, p.pm_vers, p.pm_prot); ++ } ++ /* Fall back to UDP if there's no TCP registration for mount */ ++ if (!p.pm_port) { ++ fprintf(stderr, "mount server reported tcp not available, falling back to udp\n"); ++ p.pm_prot = IPPROTO_UDP; ++ p.pm_port = pmap_getport(server_addr, ++ p.pm_prog, p.pm_vers, p.pm_prot); ++ } ++ } + #if 0 + if (!p.pm_port) { + p.pm_port = pmap_getport(server_addr, p.pm_prog, p.pm_vers, +@@ -584,7 +596,8 @@ + pm_mnt = get_mountport(&mount_server_addr, + mountprog, + mountvers, +- proto, ++ 0, /* TCP or UDP: pick ++ whatever is available */ + mountport, + nfs_mount_version); + diff --git a/util-linux-2.12-multipleraw.diff b/util-linux-2.12-multipleraw.diff new file mode 100644 index 0000000..9e38775 --- /dev/null +++ b/util-linux-2.12-multipleraw.diff @@ -0,0 +1,65 @@ +--- disk-utils/raw.c ++++ disk-utils/raw.c +@@ -100,7 +100,7 @@ + } + + /* +- * It's a bind or a single query. Either way we need a raw device. ++ * It's a bind or a single query. + */ + + if (optind >= argc) +@@ -108,27 +108,38 @@ + raw_name = argv[optind++]; + + err = stat(raw_name, &statbuf); +- if (err) { ++ if (err && do_query) { + fprintf (stderr, "Cannot locate raw device '%s' (%s)\n", + raw_name, strerror(errno)); + exit(2); + } + +- if (!S_ISCHR(statbuf.st_mode)) { +- fprintf (stderr, "raw device '%s' is not a character dev\n", +- raw_name); +- exit(2); +- } +- if (major(statbuf.st_rdev) != RAW_MAJOR) { +- fprintf (stderr, "Device '%s' is not a raw dev\n", +- raw_name); +- exit(2); +- } +- +- raw_minor = minor(statbuf.st_rdev); ++ if (!err) { ++ if (!S_ISCHR(statbuf.st_mode)) { ++ fprintf (stderr, "raw device '%s' is not a character dev\n", ++ raw_name); ++ exit(2); ++ } ++ if (major(statbuf.st_rdev) != RAW_MAJOR) { ++ fprintf (stderr, "Device '%s' is not a raw dev\n", ++ raw_name); ++ exit(2); ++ } + +- if (do_query) +- return query(raw_minor, 0); ++ raw_minor = minor(statbuf.st_rdev); ++ if (do_query) ++ return query(raw_minor, 0); ++ } else { ++ char *p; ++ p = strrchr(raw_name, '/'); ++ if (p) { ++ p = strpbrk(p, "0123456789"); ++ if (p) ++ raw_minor = atoi(p); ++ } ++ if (!p) ++ raw_minor = -1; ++ } + + /* + * It's not a query, so we still have some parsing to do. Have diff --git a/util-linux-2.12-nfs-tcp.diff b/util-linux-2.12-nfs-tcp.diff new file mode 100644 index 0000000..06ff169 --- /dev/null +++ b/util-linux-2.12-nfs-tcp.diff @@ -0,0 +1,61 @@ +--- util-linux-2.12q/mount/nfs.5 ++++ util-linux-2.12q/mount/nfs.5 +@@ -199,11 +199,11 @@ + .TP 1.5i + .I tcp + Mount the NFS filesystem using the TCP protocol instead of the +-default UDP protocol. Many NFS servers only support UDP. ++UDP protocol. This is the default, but in case it fails (many NFS servers only ++support UDP) it will fallback and try UDP. + .TP 1.5i + .I udp +-Mount the NFS filesystem using the UDP protocol. This +-is the default. ++Mount the NFS filesystem using the UDP protocol. + .TP 1.5i + .I noacl + Assume no extended access control mechanisms like POSIX ACLs are used +@@ -227,8 +227,5 @@ + The posix, and nocto options are parsed by mount + but currently are silently ignored. + .P +-The tcp and namlen options are implemented but are not currently +-supported by the Linux kernel. +-.P + The umount command should notify the server + when an NFS filesystem is unmounted. +--- util-linux-2.12q/mount/nfsmount.c ++++ util-linux-2.12q/mount/nfsmount.c +@@ -319,7 +319,7 @@ + noacl = 0; + noac = 0; + retry = 10000; /* 10000 minutes ~ 1 week */ +- tcp = 0; ++ tcp = 2; + + mountprog = MOUNTPROG; + mountvers = 0; +@@ -439,6 +439,8 @@ + } + } + } ++ ++retry_udp: + proto = (tcp) ? IPPROTO_TCP : IPPROTO_UDP; + + data.flags = (soft ? NFS_MOUNT_SOFT : 0) +@@ -742,7 +744,13 @@ + * '0' for port (service unavailable), we then exit, + * notifying the user, rather than hanging up mount. + */ +- if (port == 0 && tcp == 1) { ++ if (port == 0 && tcp) { ++ if (tcp == 2) { ++ fprintf(stderr, "nfs server reported tcp not available, falling back to udp\n"); ++ close(fsock); ++ tcp = 0; ++ goto retry_udp; ++ } + perror(_("nfs server reported service unavailable")); + goto fail; + } diff --git a/util-linux-2.12-suse-compatibility.diff b/util-linux-2.12-suse-compatibility.diff new file mode 100644 index 0000000..0da6c54 --- /dev/null +++ b/util-linux-2.12-suse-compatibility.diff @@ -0,0 +1,149 @@ +--- util-linux-2.12q/mount/lomount.c ++++ util-linux-2.12q/mount/lomount.c +@@ -52,6 +52,24 @@ + extern void show_all_loops(void); + extern int read_options_from_fstab(char *, char **); + ++int passphrase_timeout=0; ++struct sigaction alrmact; ++ ++static void ++alrmhandler() { ++ /* let the SIGINT handler do the work: */ ++ kill(getpid(),SIGINT); ++ usleep(1000000); ++ kill(getpid(),SIGTERM); ++ usleep(1000000); ++ /* stubborn... */ ++ exit(0); ++} ++ ++ ++ ++ ++ + #if !defined(LOOP_PASSWORD_MIN_LENGTH) + # define LOOP_PASSWORD_MIN_LENGTH 20 + #endif +@@ -460,6 +478,15 @@ + int i, ask2; + + if(!passFDnumber) { ++ ++ if(passphrase_timeout) { ++ alrmact.sa_handler = &alrmhandler; ++ memset(&alrmact.sa_mask, 0, sizeof(alrmact.sa_mask)); ++ alrmact.sa_flags = 0; ++ sigaction(SIGALRM, &alrmact, NULL); ++ alarm(passphrase_timeout); ++ } ++ + p = getpass(_("Password: ")); + ask2 = passAskTwice ? 1 : 0; + } else { +@@ -493,6 +520,15 @@ + s = malloc(i + 1); + if(!s) goto nomem; + strcpy(s, p); ++ ++ if(passphrase_timeout) { ++ alrmact.sa_handler = &alrmhandler; ++ memset(&alrmact.sa_mask, 0, sizeof(alrmact.sa_mask)); ++ alrmact.sa_flags = 0; ++ sigaction(SIGALRM, &alrmact, NULL); ++ alarm(passphrase_timeout); ++ } ++ + p = getpass(_("Retype password: ")); + if(!p) goto nomem; + if(strcmp(s, p)) goto compareErr; +@@ -524,6 +560,15 @@ + strcpy(s, p); + memset(p, 0, i); + if(ask2) { ++ ++ if(passphrase_timeout) { ++ alrmact.sa_handler = &alrmhandler; ++ memset(&alrmact.sa_mask, 0, sizeof(alrmact.sa_mask)); ++ alrmact.sa_flags = 0; ++ sigaction(SIGALRM, &alrmact, NULL); ++ alarm(passphrase_timeout); ++ } ++ + p = getpass(_("Retype password: ")); + if(!p) goto nomem; + if(strcmp(s, p)) { +@@ -738,7 +783,7 @@ + struct loop_info64 loopinfo; + int fd, ffd, mode, i; + char *pass, *apiName = NULL; +- void (*hashFunc)(unsigned char *, int, unsigned char *, int); ++ void (*hashFunc)(unsigned char *, int, unsigned char *, int) = NULL; + unsigned char multiKeyBits[65][32]; + int minPassLen = LOOP_PASSWORD_MIN_LENGTH; + int run_mkfs_command = 0; +@@ -762,8 +807,23 @@ + + memset (&loopinfo, 0, sizeof (loopinfo)); + xstrncpy (loopinfo.lo_file_name, file, LO_NAME_SIZE); +- if (loopEncryptionType) ++ if (loopEncryptionType) { ++ if (strcasecmp(loopEncryptionType,"twofish")==0 ++ && !passHashFuncName) { ++ loopinfo.lo_encrypt_type = 3; /*LO_CRYPT_FISH*/ ++ loopinfo.lo_encrypt_key_size = 20; ++ passHashFuncName = strdup("rmd160"); ++ fprintf(stderr,"Switching to old S.u.S.E. loop_fish2 compatibility mode.\n"); ++ } else if (strcasecmp(loopEncryptionType,"twofishSL92")==0 ++ && !passHashFuncName) { ++ loopinfo.lo_encrypt_type = 3; /*LO_CRYPT_FISH*/ ++ loopinfo.lo_encrypt_key_size = 32; ++ passHashFuncName = strdup("sha512"); ++ fprintf(stderr,"Switching to SuSE 9.2 loop_fish2 compatibility mode.\n"); ++ } else { + loopinfo.lo_encrypt_type = loop_crypt_type (loopEncryptionType, &loopinfo.lo_encrypt_key_size, &apiName); ++ } ++ } + if (loopOffsetBytes) + loopinfo.lo_offset = mystrtoull(loopOffsetBytes, 1); + if (loopSizeBytes) +@@ -995,7 +1055,7 @@ + %s loop_device # give info\n\ + %s -a # give info of all loops\n\ + %s -d loop_device # delete\n\ +-options: -o offset -s sizelimit -p passwdfd -S pseed -H phash\n\ ++options: -o offset -s sizelimit -p passwdfd -S pseed -H phash -t timeout\n\ + -I loinit -T -K gpgkey -G gpghome -C itercountk -v -r\n"), + progname, progname, progname, progname, progname); + exit(1); +@@ -1139,7 +1199,7 @@ + + delete = 0; + progname = argv[0]; +- while ((c = getopt(argc,argv,"aC:de:FG:H:I:K:o:p:rs:S:Tv")) != -1) { ++ while ((c = getopt(argc,argv,"aC:de:FG:H:I:K:o:p:rs:S:t:Tv")) != -1) { + switch (c) { + case 'a': /* show status of all loops */ + option_a = 1; +@@ -1183,6 +1243,9 @@ + case 'S': /* optional seed for passphrase */ + passSeedString = optarg; + break; ++ case 't': ++ passphrase_timeout = atoi(optarg); ++ break; + case 'T': /* ask passphrase _twice_ */ + passAskTwice = "T"; + break; +--- util-linux-2.12q/mount/losetup.8 ++++ util-linux-2.12q/mount/losetup.8 +@@ -128,6 +128,9 @@ + password before hashing. Using different seeds for different partitions + makes dictionary attacks slower but does not prevent them if user supplied + password is guessable. Seed is not used in multi-key mode. ++.IP "\fB\-t \fItimeout\fP" ++make the password prompt time out after \fItimeout\fP seconds have ++passed by. + .IP "\fB\-T\fP" + Asks password twice. + .IP "\fB\-v\fP" diff --git a/util-linux-2.12a-mountbylabel-dm.patch b/util-linux-2.12a-mountbylabel-dm.patch new file mode 100644 index 0000000..2969097 --- /dev/null +++ b/util-linux-2.12a-mountbylabel-dm.patch @@ -0,0 +1,63 @@ +--- util-linux-2.12a/mount/mount_by_label.c.old 2004-08-11 22:25:06.000000000 +0100 ++++ util-linux-2.12a/mount/mount_by_label.c 2004-08-11 22:25:21.000000000 +0100 +@@ -17,6 +17,8 @@ + * - Added JFS v2 format support + * 2002-07-26 Luciano Chavez + * - Added EVMS support ++ * 2004-08-11 Alasdair Kergon ++ * - Added LVM2/device-mapper support + */ + + #include +@@ -38,6 +40,7 @@ + #define VG_DIR "/proc/lvm/VGs" + #define EVMS_VOLUME_NAME_SIZE 127 + #define PROC_EVMS_VOLUMES "/proc/evms/volumes" ++#define DEVICEMAPPERDIR "/dev/mapper" + + static struct uuidCache_s { + struct uuidCache_s *next; +@@ -101,6 +104,34 @@ + closedir(vg_dir); + } + ++/* LVM2/device-mapper support */ ++static void ++uuidcache_init_dm(void) { ++ char lvm_device[PATH_MAX]; ++ DIR *d; ++ struct dirent *lv_iter; ++ char uuid[16], *label; ++ ++ if (!(d = opendir(DEVICEMAPPERDIR))) { ++ if (errno != ENOENT) ++ perror("mount (init_dm)"); ++ return; ++ } ++ ++ while ((lv_iter = readdir(d))) { ++ if (!strcmp(lv_iter->d_name, "control") || ++ !strcmp(lv_iter->d_name, ".") || ++ !strcmp(lv_iter->d_name, "..")) ++ continue; ++ snprintf(lvm_device, sizeof(lvm_device), "%s/%s", ++ DEVICEMAPPERDIR, lv_iter->d_name); ++ if (!get_label_uuid(strdup(lvm_device), &label, uuid)) ++ uuidcache_addentry(strdup(lvm_device), ++ label, uuid); ++ } ++ closedir(d); ++} ++ + static int + uuidcache_init_evms(void) { + FILE *procvol; +@@ -250,6 +281,8 @@ + fclose(procpt); + + uuidcache_init_lvm(); ++ ++ uuidcache_init_dm(); + } + + #define UUID 1 diff --git a/util-linux-2.12a-mountpointwithcolon.diff b/util-linux-2.12a-mountpointwithcolon.diff new file mode 100644 index 0000000..d3aca72 --- /dev/null +++ b/util-linux-2.12a-mountpointwithcolon.diff @@ -0,0 +1,21 @@ +--- util-linux-2.12q/mount/mount.c ++++ util-linux-2.12q/mount/mount.c +@@ -1178,11 +1178,15 @@ + + if (types == NULL && !mounttype && !is_existing_file(spec)) { + if (strchr (spec, ':') != NULL) { +- types = "nfs"; +- if (verbose) +- printf(_("mount: no type was given - " ++ types = do_guess_fstype(spec); ++ if(types == NULL) { ++ types = "nfs"; ++ if (verbose) { ++ printf(_("mount: no type was given - " + "I'll assume nfs because of " + "the colon\n")); ++ } ++ } + } else if(!strncmp(spec, "//", 2)) { + types = "smbfs"; + if (verbose) diff --git a/util-linux-2.12a-procswapscheck.diff b/util-linux-2.12a-procswapscheck.diff new file mode 100644 index 0000000..208c7fd --- /dev/null +++ b/util-linux-2.12a-procswapscheck.diff @@ -0,0 +1,24 @@ +--- util-linux-2.12q/mount/swapon.c ++++ util-linux-2.12q/mount/swapon.c +@@ -160,10 +160,19 @@ + static int + is_in_proc_swaps(const char *fname) { + int i; ++ struct stat stfname, stswapFile; + +- for (i = 0; i < numSwaps; i++) +- if (swapFiles[i] && !strcmp(fname, swapFiles[i])) ++ stat(fname, &stfname); ++ ++ for (i = 0; i < numSwaps; i++) { ++ if(S_ISBLK(stfname.st_mode)) { ++ stat(swapFiles[i], &stswapFile); ++ if(S_ISBLK(stswapFile.st_mode)) ++ if(stfname.st_rdev == stswapFile.st_rdev) ++ return 1; ++ } else if (swapFiles[i] && !strcmp(fname, swapFiles[i])) + return 1; ++ } + return 0; + } + diff --git a/util-linux-2.12h-mtablock.diff b/util-linux-2.12h-mtablock.diff new file mode 100644 index 0000000..1ae109c --- /dev/null +++ b/util-linux-2.12h-mtablock.diff @@ -0,0 +1,86 @@ +--- util-linux-2.12q/mount/fstab.c ++++ util-linux-2.12q/mount/fstab.c +@@ -395,6 +395,7 @@ + + /* Flag for already existing lock file. */ + static int we_created_lockfile = 0; ++static int lock_file_desc = -1; + + /* Flag to indicate that signals have been set up. */ + static int signals_have_been_setup = 0; +@@ -417,6 +418,8 @@ + unlock_mtab (void) { + if (we_created_lockfile) { + unlink (MOUNTED_LOCK); ++ close(lock_file_desc); ++ lock_file_desc = -1; + we_created_lockfile = 0; + } + } +@@ -443,6 +446,7 @@ + + void + lock_mtab (void) { ++ sigset_t sigmask; + int tries = 3; + char linktargetfile[MOUNTLOCK_LINKTARGET_LTH]; + +@@ -467,6 +471,10 @@ + signals_have_been_setup = 1; + } + ++ /* Allow all signals while trying to lock mtab */ ++ sigemptyset(&sigmask); ++ sigprocmask(SIG_SETMASK, &sigmask, &sigmask); ++ + sprintf(linktargetfile, MOUNTLOCK_LINKTARGET, getpid ()); + + /* Repeat until it was us who made the link */ +@@ -521,12 +529,21 @@ + if (j == 0) { + /* We made the link. Now claim the lock. */ + if (fcntl (fd, F_SETLK, &flock) == -1) { ++ int errsv = errno; ++ if (!tries--) ++ die(EX_FILEIO, ++ _("Can't lock lock file %s: %s\n"), ++ MOUNTED_LOCK, strerror (errsv)); + if (verbose) { +- int errsv = errno; + printf(_("Can't lock lock file %s: %s\n"), + MOUNTED_LOCK, strerror (errsv)); + } +- /* proceed anyway */ ++ /* bummer - someone raced us to the file ++ * lock. Start all over again. */ ++ unlink(MOUNTED_LOCK); ++ } else { ++ we_created_lockfile = 1; ++ lock_file_desc = fd; + } + } else { + static int tries = 0; +@@ -551,8 +568,14 @@ + } + } + +- close(fd); ++ /* If we created the lock file, keep the fd else ++ * our POSIX lock will go away immediately */ ++ if (!we_created_lockfile) ++ close(fd); + } ++ ++ /* Restore original signal mask */ ++ sigprocmask(SIG_SETMASK, &sigmask, NULL); + } + + /* +--- util-linux-2.12q/mount/paths.h ++++ util-linux-2.12q/mount/paths.h +@@ -7,4 +7,4 @@ + #define MOUNTED_LOCK "/etc/mtab~" + #define MOUNTED_TEMP "/etc/mtab.tmp" + #endif +-#define LOCK_TIMEOUT 10 ++#define LOCK_TIMEOUT 30 diff --git a/util-linux-2.12h-short-passwords.diff b/util-linux-2.12h-short-passwords.diff new file mode 100644 index 0000000..ee917b1 --- /dev/null +++ b/util-linux-2.12h-short-passwords.diff @@ -0,0 +1,55 @@ +--- util-linux-2.12q/mount/lomount.c ++++ util-linux-2.12q/mount/lomount.c +@@ -73,6 +73,7 @@ + #if !defined(LOOP_PASSWORD_MIN_LENGTH) + # define LOOP_PASSWORD_MIN_LENGTH 20 + #endif ++#define SUSE_PASSWORD_MIN_LENGTH 8 + + char *passFDnumber = (char *)0; + char *passAskTwice = (char *)0; +@@ -459,7 +460,7 @@ + multiKeyPass[0] = 0; + break; + } +- if(strlen(multiKeyPass[x]) < LOOP_PASSWORD_MIN_LENGTH) break; ++ if(strlen(multiKeyPass[x]) < SUSE_PASSWORD_MIN_LENGTH) break; + x++; + } + if(x == 65) +@@ -498,7 +499,7 @@ + while(x < 65) { + multiKeyPass[x] = get_FD_pass(i); + if(!multiKeyPass[x]) goto nomem; +- if(strlen(multiKeyPass[x]) < LOOP_PASSWORD_MIN_LENGTH) break; ++ if(strlen(multiKeyPass[x]) < SUSE_PASSWORD_MIN_LENGTH) break; + x++; + } + if(x == 65) { +@@ -579,7 +580,7 @@ + memset(p, 0, i); + } + if(i < warnLen) { +- fprintf(stderr, _("WARNING - Please use longer password (%d or more characters)\n"), LOOP_PASSWORD_MIN_LENGTH); ++ fprintf(stderr, _("WARNING - Please use longer password (%d or more characters)\n"), SUSE_PASSWORD_MIN_LENGTH); + } + strcat(s, seed); + return(s); +@@ -785,7 +786,7 @@ + char *pass, *apiName = NULL; + void (*hashFunc)(unsigned char *, int, unsigned char *, int) = NULL; + unsigned char multiKeyBits[65][32]; +- int minPassLen = LOOP_PASSWORD_MIN_LENGTH; ++ int minPassLen = SUSE_PASSWORD_MIN_LENGTH; + int run_mkfs_command = 0; + + loopFileName = (char *)file; +@@ -900,7 +901,7 @@ + break; /* out of switch(loopinfo.lo_encrypt_type) */ + } + } +- pass = sGetPass (minPassLen, LOOP_PASSWORD_MIN_LENGTH); ++ pass = sGetPass (minPassLen, SUSE_PASSWORD_MIN_LENGTH); + if(!pass) goto close_fd_ffd_return1; + i = strlen(pass); + if(hashFunc == unhashed1_key_setup) { diff --git a/util-linux-2.12i-x86_64intel.diff b/util-linux-2.12i-x86_64intel.diff new file mode 100644 index 0000000..ac7f2f1 --- /dev/null +++ b/util-linux-2.12i-x86_64intel.diff @@ -0,0 +1,22 @@ +--- util-linux-2.12q/MCONFIG ++++ util-linux-2.12q/MCONFIG +@@ -17,7 +17,7 @@ + # Select for CPU i386 if the binaries must be able to run on an intel 386 + # (by default i486 code is generated, see below) + CPU=$(shell uname -m) +-ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/') ++ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/;s/x86_64/intel/') + + # If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp + # will use PAM for authentication. Additionally, passwd will not be +@@ -137,6 +137,10 @@ + else + CPUTAIL=486 + endif ++ ifeq "$(CPU)" "x86_64" ++ CPUHEAD=-mcpu= ++ CPUTAIL=nocona ++ endif + CPUOPT= $(CPUHEAD)$(CPUTAIL) + OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer + else diff --git a/util-linux-2.12q-ionice.diff b/util-linux-2.12q-ionice.diff new file mode 100644 index 0000000..e52f2ce --- /dev/null +++ b/util-linux-2.12q-ionice.diff @@ -0,0 +1,249 @@ +--- util-linux-2.12q/sys-utils/Makefile ++++ util-linux-2.12q/sys-utils/Makefile +@@ -8,7 +8,7 @@ + + # Where to put man pages? + +-MAN1= arch.1 flock.1 readprofile.1 ++MAN1= arch.1 flock.1 readprofile.1 ionice.1 + + MAN8= ctrlaltdel.8 cytune.8 dmesg.8 \ + ipcrm.8 ipcs.8 renice.8 \ +@@ -19,7 +19,7 @@ + + BIN= arch dmesg + +-USRBIN= cytune flock ipcrm ipcs renice setsid ++USRBIN= cytune flock ipcrm ipcs renice setsid ionice + + USRSBIN= readprofile tunelp + +@@ -71,6 +71,7 @@ + ctrlaltdel: ctrlaltdel.o $(LIB)/my_reboot.o + cytune.o: cytune.c cyclades.h + cytune: cytune.o ++ionice: ionice.o + ipcrm: ipcrm.o + ipcs: ipcs.o + rdev: rdev.o +--- util-linux-2.12q/sys-utils/ionice.1 ++++ util-linux-2.12q/sys-utils/ionice.1 +@@ -0,0 +1,71 @@ ++.TH ionice "1" "August 2005" ionice ++.SH NAME ++ionice \- get/set program io scheduling class and priority ++.SH SYNOPSIS ++.B ionice ++[\fI-c\fR] \fI[-n\fR] [\fI-p\fR] [COMMAND [ARG...]] ++ ++.SH DESCRIPTION ++This program sets the io scheduling class and priority for a program. As of ++this writing, Linux supports 3 scheduling classes: ++ ++\fBIdle\fR. ++A program running with idle io priority will only get disk time when no other ++program has asked for disk io for a defined grace period. The impact of idle ++io processes on normal system activity should be zero. This scheduling ++class does not take a priority argument. ++ ++\fBBest effort\fR. ++This is the default scheduling class for any process that hasn't asked for ++a specific io priority. Programs inherit the CPU nice setting for io ++priorities. This class takes a priority argument from \fI0-7\fR, with lower ++number being higher priority. Programs running at the same best effort ++priority are served in a round-robin fashion. ++ ++\fBReal time\fR. ++The RT scheduling class is given first access to the disk, regardless of ++what else is going on in the system. Thus the RT class needs to be used with ++some care, as it can starve other processes. As with the best effort class, ++8 priority levels are defined denoting how big a time slice a given process ++will receive on each scheduling window. ++ ++If no arguments or just \fI-p\fR is given, \fIionice\fR will query the ++current io scheduling class and priority for that process. ++ ++.SH OPTIONS ++.LP ++.TP 7 ++\fB-c\fP ++The scheduling class. 1 for real time, 2 for best-effort, 3 for idle. ++.TP 7 ++\fB-n\fP ++The scheduling class data. This defines the class data, if the class ++accepts an argument. For real time and best-effort, \fI0-7\fR is valid ++data. ++.TP 7 ++\fB-p\fP ++Pass in a process pid to change an already running process. If this argument ++is not given, \fBionice\fP will run the listed program with the given ++parameters. ++ ++.SH EXAMPLES ++.LP ++.TP 7 ++# \fBionice\fP -c3 -p89 ++.TP 7 ++Sets process with PID 89 as an idle io process. ++.TP 7 ++# \fBionice\fP -c2 -n0 bash ++.TP 7 ++Runs 'bash' as a best-effort program with highest priority. ++.TP 7 ++# \fBionice\fP -p89 ++.TP 7 ++Returns the class and priority of the process with PID 89. ++ ++.SH NOTES ++Linux supports io scheduling priorities and classes since 2.6.13 with the CFQ ++io scheduler. ++ ++.SH AUTHORS ++Jens Axboe +--- util-linux-2.12q/sys-utils/ionice.c ++++ util-linux-2.12q/sys-utils/ionice.c +@@ -0,0 +1,144 @@ ++/* ++ * ionice: set or get process io scheduling class and priority ++ * ++ * Copyright (C) 2005 Jens Axboe SUSE Labs ++ * ++ * Released under the terms of the GNU General Public License version 2 ++ * ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#if defined(__i386__) ++#define __NR_ioprio_set 289 ++#define __NR_ioprio_get 290 ++#elif defined(__powerpc__) || defined(__powerpc64__) ++#define __NR_ioprio_set 273 ++#define __NR_ioprio_get 274 ++#elif defined(__x86_64__) ++#define __NR_ioprio_set 251 ++#define __NR_ioprio_get 252 ++#elif defined(__ia64__) ++#define __NR_ioprio_set 1274 ++#define __NR_ioprio_get 1275 ++#elif defined(__alpha__) ++#define __NR_ioprio_set 442 ++#define __NR_ioprio_get 443 ++#elif defined(__s390__) || defined(__s390x__) ++#define __NR_ioprio_set 282 ++#define __NR_ioprio_get 283 ++#elif defined(__arm__) ++#define __NR_ioprio_set 314 ++#define __NR_ioprio_get 315 ++#else ++#error "Unsupported arch" ++#endif ++ ++static int ioprio_set(int which, int who, int ioprio) ++{ ++ return syscall(__NR_ioprio_set, which, who, ioprio); ++} ++ ++static int ioprio_get(int which, int who) ++{ ++ return syscall(__NR_ioprio_get, which, who); ++} ++ ++enum { ++ IOPRIO_CLASS_NONE, ++ IOPRIO_CLASS_RT, ++ IOPRIO_CLASS_BE, ++ IOPRIO_CLASS_IDLE, ++}; ++ ++enum { ++ IOPRIO_WHO_PROCESS = 1, ++ IOPRIO_WHO_PGRP, ++ IOPRIO_WHO_USER, ++}; ++ ++#define IOPRIO_CLASS_SHIFT 13 ++ ++const char *to_prio[] = { "none", "realtime", "best-effort", "idle", }; ++ ++static void usage(void) ++{ ++ printf("Usage: ionice [OPTIONS] [COMMAND [ARG]...]\n"); ++ printf("Sets or gets process io scheduling class and priority.\n"); ++ printf("\n\t-n\tClass data (typically 0-7, lower being higher prio)\n"); ++ printf("\t-c\tScheduling class\n"); ++ printf("\t\t\t1: realtime, 2: best-effort, 3: idle\n"); ++ printf("\t-p\tProcess pid\n"); ++ printf("\t-h\tThis help page\n"); ++ printf("\nJens Axboe (C) 2005\n"); ++} ++ ++int main(int argc, char *argv[]) ++{ ++ int ioprio = 4, set = 0, ioprio_class = IOPRIO_CLASS_BE; ++ int c, pid = 0; ++ ++ while ((c = getopt(argc, argv, "+n:c:p:h")) != EOF) { ++ switch (c) { ++ case 'n': ++ ioprio = strtol(optarg, NULL, 10); ++ set = 1; ++ break; ++ case 'c': ++ ioprio_class = strtol(optarg, NULL, 10); ++ set = 1; ++ break; ++ case 'p': ++ pid = strtol(optarg, NULL, 10); ++ break; ++ case 'h': ++ default: ++ usage(); ++ exit(0); ++ } ++ } ++ ++ switch (ioprio_class) { ++ case IOPRIO_CLASS_NONE: ++ ioprio_class = IOPRIO_CLASS_BE; ++ break; ++ case IOPRIO_CLASS_RT: ++ case IOPRIO_CLASS_BE: ++ break; ++ case IOPRIO_CLASS_IDLE: ++ ioprio = 7; ++ break; ++ default: ++ printf("bad prio class %d\n", ioprio_class); ++ return 1; ++ } ++ ++ if (!set) { ++ if (!pid && argv[optind]) ++ pid = strtol(argv[optind], NULL, 10); ++ ++ ioprio = ioprio_get(IOPRIO_WHO_PROCESS, pid); ++ ++ if (ioprio == -1) ++ perror("ioprio_get"); ++ else { ++ ioprio_class = ioprio >> IOPRIO_CLASS_SHIFT; ++ ioprio = ioprio & 0xff; ++ printf("%s: prio %d\n", to_prio[ioprio_class], ioprio); ++ } ++ } else { ++ if (ioprio_set(IOPRIO_WHO_PROCESS, pid, ioprio | ioprio_class << IOPRIO_CLASS_SHIFT) == -1) ++ perror("ioprio_set"); ++ ++ if (argv[optind]) ++ execvp(argv[optind], &argv[optind]); ++ } ++ ++ return 0; ++} diff --git a/util-linux-2.12q-mount--move.diff b/util-linux-2.12q-mount--move.diff new file mode 100644 index 0000000..9060495 --- /dev/null +++ b/util-linux-2.12q-mount--move.diff @@ -0,0 +1,29 @@ +--- mount/mount.c ++++ mount/mount.c +@@ -665,6 +665,25 @@ + else { + mntFILE *mfp; + ++ /* when moving a mount point, we have to make sure the mtab ++ * gets updated properly. We get info about the old mount ++ * point, copy it to the new mount point, and then delete ++ * the old mount point. */ ++ if (flags & MS_MOVE) { ++ const char *olddir = mnt.mnt_fsname; ++ struct mntentchn *oldmc = oldmc = getmntfile(olddir); ++ if (oldmc != NULL) { ++ mnt.mnt_fsname = strdup(oldmc->m.mnt_fsname); ++ mnt.mnt_type = oldmc->m.mnt_type; ++ mnt.mnt_opts = oldmc->m.mnt_opts; ++ mnt.mnt_freq = oldmc->m.mnt_freq; ++ mnt.mnt_passno = oldmc->m.mnt_passno; ++ } ++ update_mtab(olddir, NULL); ++ if (oldmc != NULL) ++ my_free(olddir); ++ } ++ + lock_mtab(); + mfp = my_setmntent(MOUNTED, "a+"); + if (mfp == NULL || mfp->mntent_fp == NULL) { + diff --git a/util-linux-2.12q-nfsv4.patch b/util-linux-2.12q-nfsv4.patch new file mode 100644 index 0000000..d33aaaf --- /dev/null +++ b/util-linux-2.12q-nfsv4.patch @@ -0,0 +1,628 @@ +--- util-linux-2.12q/mount/Makefile ++++ util-linux-2.12q/mount/Makefile +@@ -29,7 +29,7 @@ + + MAYBE = pivot_root swapoff + +-NFS_OBJS = nfsmount.o nfsmount_xdr.o nfsmount_clnt.o ++NFS_OBJS = nfsmount.o nfsmount_xdr.o nfsmount_clnt.o nfs4mount.o + GEN_FILES = nfsmount.h nfsmount_xdr.c nfsmount_clnt.c + + all: $(PROGS) +--- util-linux-2.12q/mount/mount.c ++++ util-linux-2.12q/mount/mount.c +@@ -847,8 +847,23 @@ + "without support for the type `nfs'")); + #endif + } ++#ifdef HAVE_NFS ++ /* ++ * NFSv4 support ++ */ ++ if (!fake && types && streq (types, "nfs4")) { ++ mnt_err = nfs4mount(spec, node, &flags, &extra_opts, &mount_opts, bg); ++ if (mnt_err) ++ return mnt_err; ++ goto nosigblock; ++#else ++ die (EX_SOFTWARE, _("mount: this version was compiled " ++ "without support for the type `nfs4'")); ++#endif ++ } + + block_signals (SIG_BLOCK); ++nosigblock: + + if (!fake) { + mnt5_res = guess_fstype_and_mount (spec, node, &types, flags & ~MS_NOSYS, +--- util-linux-2.12q/mount/nfs4mount.c ++++ util-linux-2.12q/mount/nfs4mount.c +@@ -0,0 +1,460 @@ ++/* ++ * nfs4mount.c -- Linux NFS mount ++ * Copyright (C) 2002 Trond Myklebust ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * Note: this file based on the original nfsmount.c ++ */ ++ ++#include "../defines.h" /* for HAVE_rpcsvc_nfs_prot_h and HAVE_inet_aton */ ++ ++#include ++#include ++#undef __FD_CLR ++#undef __FD_SET ++#undef __FD_ISSET ++#undef __FD_ZERO ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#ifdef HAVE_rpcsvc_nfs_prot_h ++#include ++#else ++#include ++#define nfsstat nfs_stat ++#endif ++ ++#include "sundries.h" ++ ++#include "mount_constants.h" ++#include "nfs4_mount.h" ++ ++#include "nls.h" ++ ++#ifndef NFS_PORT ++#define NFS_PORT 2049 ++#endif ++ ++extern int clnt_ping(struct sockaddr_in *, const u_long, const u_long, const u_int); ++extern void rpc_strerror(void); ++ ++struct { ++ char *flavour; ++ int fnum; ++} flav_map[] = { ++ { "krb5", RPC_AUTH_GSS_KRB5 }, ++ { "krb5i", RPC_AUTH_GSS_KRB5I }, ++ { "krb5p", RPC_AUTH_GSS_KRB5P }, ++ { "lipkey", RPC_AUTH_GSS_LKEY }, ++ { "lipkey-i", RPC_AUTH_GSS_LKEYI }, ++ { "lipkey-p", RPC_AUTH_GSS_LKEYP }, ++ { "spkm3", RPC_AUTH_GSS_SPKM }, ++ { "spkm3i", RPC_AUTH_GSS_SPKMI }, ++ { "spkm3p", RPC_AUTH_GSS_SPKMP }, ++ { "unix", AUTH_UNIX }, ++ { "sys", AUTH_SYS }, ++ { "null", AUTH_NULL }, ++ { "none", AUTH_NONE }, ++}; ++ ++#define FMAPSIZE (sizeof(flav_map)/sizeof(flav_map[0])) ++#define MAX_USER_FLAVOUR 16 ++ ++static int parse_sec(char *sec, int *pseudoflavour) ++{ ++ int i, num_flavour = 0; ++ ++ for (sec = strtok(sec, ":"); sec; sec = strtok(NULL, ":")) { ++ if (num_flavour >= MAX_USER_FLAVOUR) { ++ fprintf(stderr, ++ _("mount: maximum number of security flavors " ++ "exceeded\n")); ++ return 0; ++ } ++ for (i = 0; i < FMAPSIZE; i++) { ++ if (strcmp(sec, flav_map[i].flavour) == 0) { ++ pseudoflavour[num_flavour++] = flav_map[i].fnum; ++ break; ++ } ++ } ++ if (i == FMAPSIZE) { ++ fprintf(stderr, ++ _("mount: unknown security type %s\n"), sec); ++ return 0; ++ } ++ } ++ if (!num_flavour) ++ fprintf(stderr, ++ _("mount: no security flavors passed to sec= option\n")); ++ return num_flavour; ++} ++ ++static int parse_devname(char *hostdir, char **hostname, char **dirname) ++{ ++ char *s; ++ ++ if (!(s = strchr(hostdir, ':'))) { ++ fprintf(stderr, ++ _("mount: " ++ "directory to mount not in host:dir format\n")); ++ return -1; ++ } ++ *hostname = hostdir; ++ *dirname = s + 1; ++ *s = '\0'; ++ /* Ignore all but first hostname in replicated mounts ++ until they can be fully supported. (mack@sgi.com) */ ++ if ((s = strchr(hostdir, ','))) { ++ *s = '\0'; ++ fprintf(stderr, ++ _("mount: warning: " ++ "multiple hostnames not supported\n")); ++ } ++ return 0; ++} ++ ++static int fill_ipv4_sockaddr(const char *hostname, struct sockaddr_in *addr) ++{ ++ struct hostent *hp; ++ addr->sin_family = AF_INET; ++ ++ if (inet_aton(hostname, &addr->sin_addr)) ++ return 0; ++ if ((hp = gethostbyname(hostname)) == NULL) { ++ fprintf(stderr, _("mount: can't get address for %s\n"), ++ hostname); ++ return -1; ++ } ++ if (hp->h_length > sizeof(struct in_addr)) { ++ fprintf(stderr, ++ _("mount: got bad hp->h_length\n")); ++ hp->h_length = sizeof(struct in_addr); ++ } ++ memcpy(&addr->sin_addr, hp->h_addr, hp->h_length); ++ return 0; ++} ++ ++static int get_my_ipv4addr(char *ip_addr, int len) ++{ ++ char myname[1024]; ++ struct sockaddr_in myaddr; ++ ++ if (gethostname(myname, sizeof(myname))) { ++ fprintf(stderr, _("mount: can't determine client address\n")); ++ return -1; ++ } ++ if (fill_ipv4_sockaddr(myname, &myaddr)) ++ return -1; ++ snprintf(ip_addr, len, "%s", inet_ntoa(myaddr.sin_addr)); ++ ip_addr[len-1] = '\0'; ++ return 0; ++} ++ ++/* Convert RPC errors into strings */ ++void rpc_strerror(void) ++{ ++ int cf_stat = rpc_createerr.cf_stat; ++ int cf_errno = rpc_createerr.cf_error.re_errno; ++ char *ptr, *estr = clnt_sperrno(cf_stat); ++ ++ if (estr) { ++ if ((ptr = index(estr, ':'))) ++ estr = ++ptr; ++ ++ fprintf(stderr, "RPC Error: %d (%s )\n", cf_stat, estr); ++ if (cf_stat == RPC_SYSTEMERROR) ++ fprintf(stderr, "System Error: %d (%s)\n", cf_errno, strerror(cf_errno)); ++ } ++} ++ ++int ++clnt_ping(struct sockaddr_in *saddr, const u_long prog, const u_long vers, ++ const u_int prot) ++{ ++ static const struct timeval TIMEOUT = { 20, 0 }; ++ static const struct timeval RETRY_TIMEOUT = { 3, 0 }; ++ CLIENT *clnt=NULL; ++ int sock, stat; ++ static char clnt_res; ++ ++ rpc_createerr.cf_stat = stat = 0; ++ sock = RPC_ANYSOCK; ++ switch(prot) { ++ case IPPROTO_UDP: ++ clnt = clntudp_bufcreate(saddr, prog, vers, ++ RETRY_TIMEOUT, &sock, ++ RPCSMALLMSGSIZE, RPCSMALLMSGSIZE); ++ break; ++ case IPPROTO_TCP: ++ clnt = clnttcp_create(saddr, prog, vers, &sock, ++ RPCSMALLMSGSIZE, RPCSMALLMSGSIZE); ++ break; ++ default: ++ goto out_bad; ++ } ++ if (!clnt) ++ goto out_bad; ++ memset(&clnt_res, 0, sizeof(clnt_res)); ++ stat = clnt_call(clnt, NULLPROC, ++ (xdrproc_t)xdr_void, (caddr_t)NULL, ++ (xdrproc_t)xdr_void, (caddr_t)&clnt_res, ++ TIMEOUT); ++ clnt_destroy(clnt); ++ close(sock); ++ if (stat != RPC_PROGVERSMISMATCH) ++ return 1; ++ ++ out_bad: ++ return 0; ++} ++ ++ ++int nfs4mount(const char *spec, const char *node, int *flags, ++ char **extra_opts, char **mount_opts, ++ int running_bg) ++{ ++ static struct nfs4_mount_data data; ++ static char hostdir[1024]; ++ static char ip_addr[16] = "127.0.0.1"; ++ static struct sockaddr_in server_addr; ++ static int pseudoflavour[MAX_USER_FLAVOUR]; ++ int num_flavour = 0; ++ ++ char *hostname, *dirname, *old_opts; ++ char new_opts[1024]; ++ char *opt, *opteq; ++ char *s; ++ int val; ++ int bg, soft, intr; ++ int nocto, noac; ++ int retry; ++ int retval; ++ ++ retval = EX_FAIL; ++ if (strlen(spec) >= sizeof(hostdir)) { ++ fprintf(stderr, _("mount: " ++ "excessively long host:dir argument\n")); ++ goto fail; ++ } ++ strcpy(hostdir, spec); ++ if (parse_devname(hostdir, &hostname, &dirname)) ++ goto fail; ++ ++ if (fill_ipv4_sockaddr(hostname, &server_addr)) ++ goto fail; ++ if (get_my_ipv4addr(ip_addr, sizeof(ip_addr))) ++ goto fail; ++ ++ /* add IP address to mtab options for use when unmounting */ ++ s = inet_ntoa(server_addr.sin_addr); ++ old_opts = *extra_opts; ++ if (!old_opts) ++ old_opts = ""; ++ if (strlen(old_opts) + strlen(s) + 10 >= sizeof(new_opts)) { ++ fprintf(stderr, _("mount: " ++ "excessively long option argument\n")); ++ goto fail; ++ } ++ snprintf(new_opts, sizeof(new_opts), "%s%saddr=%s", ++ old_opts, *old_opts ? "," : "", s); ++ *extra_opts = xstrdup(new_opts); ++ ++ /* Set default options. ++ * rsize/wsize and timeo are left 0 in order to ++ * let the kernel decide. ++ */ ++ memset(&data, 0, sizeof(data)); ++ data.retrans = 3; ++ data.acregmin = 3; ++ data.acregmax = 60; ++ data.acdirmin = 30; ++ data.acdirmax = 60; ++ data.proto = IPPROTO_TCP; ++ ++ bg = 0; ++ soft = 0; ++ intr = NFS4_MOUNT_INTR; ++ nocto = 0; ++ noac = 0; ++ retry = 10000; /* 10000 minutes ~ 1 week */ ++ ++ /* ++ * NFSv4 specifies that the default port should be 2049 ++ */ ++ server_addr.sin_port = htons(NFS_PORT); ++ ++ /* parse options */ ++ ++ for (opt = strtok(old_opts, ","); opt; opt = strtok(NULL, ",")) { ++ if ((opteq = strchr(opt, '='))) { ++ val = atoi(opteq + 1); ++ *opteq = '\0'; ++ if (!strcmp(opt, "rsize")) ++ data.rsize = val; ++ else if (!strcmp(opt, "wsize")) ++ data.wsize = val; ++ else if (!strcmp(opt, "timeo")) ++ data.timeo = val; ++ else if (!strcmp(opt, "retrans")) ++ data.retrans = val; ++ else if (!strcmp(opt, "acregmin")) ++ data.acregmin = val; ++ else if (!strcmp(opt, "acregmax")) ++ data.acregmax = val; ++ else if (!strcmp(opt, "acdirmin")) ++ data.acdirmin = val; ++ else if (!strcmp(opt, "acdirmax")) ++ data.acdirmax = val; ++ else if (!strcmp(opt, "actimeo")) { ++ data.acregmin = val; ++ data.acregmax = val; ++ data.acdirmin = val; ++ data.acdirmax = val; ++ } ++ else if (!strcmp(opt, "retry")) ++ retry = val; ++ else if (!strcmp(opt, "port")) ++ server_addr.sin_port = htons(val); ++ else if (!strcmp(opt, "proto")) { ++ if (!strncmp(opteq+1, "tcp", 3)) ++ data.proto = IPPROTO_TCP; ++ else if (!strncmp(opteq+1, "udp", 3)) ++ data.proto = IPPROTO_UDP; ++ else ++ printf(_("Warning: Unrecognized proto= option.\n")); ++ } else if (!strcmp(opt, "clientaddr")) { ++ if (strlen(opteq+1) >= sizeof(ip_addr)) ++ printf(_("Invalid client address %s"), ++ opteq+1); ++ strncpy(ip_addr,opteq+1, sizeof(ip_addr)); ++ ip_addr[sizeof(ip_addr)-1] = '\0'; ++ } else if (!strcmp(opt, "sec")) { ++ num_flavour = parse_sec(opteq+1, pseudoflavour); ++ if (!num_flavour) ++ goto fail; ++ } else if (!strcmp(opt, "addr")) { ++ /* ignore */; ++ } else { ++ printf(_("unknown nfs mount parameter: " ++ "%s=%d\n"), opt, val); ++ goto fail; ++ } ++ } else { ++ val = 1; ++ if (!strncmp(opt, "no", 2)) { ++ val = 0; ++ opt += 2; ++ } ++ if (!strcmp(opt, "bg")) ++ bg = val; ++ else if (!strcmp(opt, "fg")) ++ bg = !val; ++ else if (!strcmp(opt, "soft")) ++ soft = val; ++ else if (!strcmp(opt, "hard")) ++ soft = !val; ++ else if (!strcmp(opt, "intr")) ++ intr = val; ++ else if (!strcmp(opt, "cto")) ++ nocto = !val; ++ else if (!strcmp(opt, "ac")) ++ noac = !val; ++ else { ++ if (!sloppy) { ++ printf(_("unknown nfs mount option: " ++ "%s%s\n"), val ? "" : "no", opt); ++ goto fail; ++ } ++ } ++ } ++ } ++ ++ data.flags = (soft ? NFS4_MOUNT_SOFT : 0) ++ | (intr ? NFS4_MOUNT_INTR : 0) ++ | (nocto ? NFS4_MOUNT_NOCTO : 0) ++ | (noac ? NFS4_MOUNT_NOAC : 0); ++ ++ if (num_flavour == 0) ++ pseudoflavour[num_flavour++] = AUTH_UNIX; ++ data.auth_flavourlen = num_flavour; ++ data.auth_flavours = pseudoflavour; ++ ++ data.client_addr.data = ip_addr; ++ data.client_addr.len = strlen(ip_addr); ++ ++ data.mnt_path.data = dirname; ++ data.mnt_path.len = strlen(dirname); ++ ++ data.hostname.data = hostname; ++ data.hostname.len = strlen(hostname); ++ data.host_addr = (struct sockaddr *)&server_addr; ++ data.host_addrlen = sizeof(server_addr); ++ ++#ifdef NFS_MOUNT_DEBUG ++ printf("rsize = %d, wsize = %d, timeo = %d, retrans = %d\n", ++ data.rsize, data.wsize, data.timeo, data.retrans); ++ printf("acreg (min, max) = (%d, %d), acdir (min, max) = (%d, %d)\n", ++ data.acregmin, data.acregmax, data.acdirmin, data.acdirmax); ++ printf("port = %d, bg = %d, retry = %d, flags = %.8x\n", ++ ntohs(server_addr.sin_port), bg, retry, data.flags); ++ printf("soft = %d, intr = %d, nocto = %d, noac = %d\n", ++ (data.flags & NFS4_MOUNT_SOFT) != 0, ++ (data.flags & NFS4_MOUNT_INTR) != 0, ++ (data.flags & NFS4_MOUNT_NOCTO) != 0, ++ (data.flags & NFS4_MOUNT_NOAC) != 0); ++ ++ if (num_flavour > 0) { ++ int pf_cnt, i; ++ ++ printf("sec = "); ++ for (pf_cnt = 0; pf_cnt < num_flavour; pf_cnt++) { ++ for (i = 0; i < FMAPSIZE; i++) { ++ if (flav_map[i].fnum == pseudoflavour[pf_cnt]) { ++ printf("%s", flav_map[i].flavour); ++ break; ++ } ++ } ++ printf("%s", (pf_cnt < num_flavour-1) ? ":" : "\n"); ++ } ++ } ++ printf("proto = %s\n", (data.proto == IPPROTO_TCP) ? "tcp" : "udp"); ++#endif ++ ++ data.version = NFS4_MOUNT_VERSION; ++ ++ clnt_ping(&server_addr, NFS_PROGRAM, 4, data.proto); ++ if (rpc_createerr.cf_stat) { ++ fprintf(stderr, "mount to NFS server '%s' failed.\n", data.hostname.data); ++ goto fail; ++ } ++ ++ *mount_opts = (char *) &data; ++ /* clean up */ ++ return 0; ++ ++fail: ++ if (verbose) { ++ rpc_strerror(); ++ } ++ return retval; ++} +--- util-linux-2.12q/mount/nfs4_mount.h ++++ util-linux-2.12q/mount/nfs4_mount.h +@@ -0,0 +1,82 @@ ++#ifndef _LINUX_NFS4_MOUNT_H ++#define _LINUX_NFS4_MOUNT_H ++ ++/* ++ * linux/include/linux/nfs4_mount.h ++ * ++ * Copyright (C) 2002 Trond Myklebust ++ * ++ * structure passed from user-space to kernel-space during an nfsv4 mount ++ */ ++ ++/* ++ * WARNING! Do not delete or change the order of these fields. If ++ * a new field is required then add it to the end. The version field ++ * tracks which fields are present. This will ensure some measure of ++ * mount-to-kernel version compatibility. Some of these aren't used yet ++ * but here they are anyway. ++ */ ++#define NFS4_MOUNT_VERSION 1 ++ ++struct nfs_string { ++ unsigned int len; ++ const char* data; ++}; ++ ++struct nfs4_mount_data { ++ int version; /* 1 */ ++ int flags; /* 1 */ ++ int rsize; /* 1 */ ++ int wsize; /* 1 */ ++ int timeo; /* 1 */ ++ int retrans; /* 1 */ ++ int acregmin; /* 1 */ ++ int acregmax; /* 1 */ ++ int acdirmin; /* 1 */ ++ int acdirmax; /* 1 */ ++ ++ /* see the definition of 'struct clientaddr4' in RFC3010 */ ++ struct nfs_string client_addr; /* 1 */ ++ ++ /* Mount path */ ++ struct nfs_string mnt_path; /* 1 */ ++ ++ /* Server details */ ++ struct nfs_string hostname; /* 1 */ ++ /* Server IP address */ ++ unsigned int host_addrlen; /* 1 */ ++ struct sockaddr* host_addr; /* 1 */ ++ ++ /* Transport protocol to use */ ++ int proto; /* 1 */ ++ ++ /* Pseudo-flavours to use for authentication. See RFC2623 */ ++ int auth_flavourlen; /* 1 */ ++ int *auth_flavours; /* 1 */ ++}; ++ ++/* bits in the flags field */ ++/* Note: the fields that correspond to existing NFSv2/v3 mount options ++ * should mirror the values from include/linux/nfs_mount.h ++ */ ++ ++#define NFS4_MOUNT_SOFT 0x0001 /* 1 */ ++#define NFS4_MOUNT_INTR 0x0002 /* 1 */ ++#define NFS4_MOUNT_NOCTO 0x0010 /* 1 */ ++#define NFS4_MOUNT_NOAC 0x0020 /* 1 */ ++#define NFS4_MOUNT_STRICTLOCK 0x1000 /* 1 */ ++#define NFS4_MOUNT_FLAGMASK 0xFFFF ++ ++/* pseudoflavors: */ ++ ++#define RPC_AUTH_GSS_KRB5 390003 ++#define RPC_AUTH_GSS_KRB5I 390004 ++#define RPC_AUTH_GSS_KRB5P 390005 ++#define RPC_AUTH_GSS_LKEY 390006 ++#define RPC_AUTH_GSS_LKEYI 390007 ++#define RPC_AUTH_GSS_LKEYP 390008 ++#define RPC_AUTH_GSS_SPKM 390009 ++#define RPC_AUTH_GSS_SPKMI 390010 ++#define RPC_AUTH_GSS_SPKMP 390011 ++ ++#endif +--- util-linux-2.12q/mount/nfs_mount4.h ++++ util-linux-2.12q/mount/nfs_mount4.h +@@ -8,7 +8,9 @@ + * so it is easiest to ignore the kernel altogether (at compile time). + */ + +-#define NFS_MOUNT_VERSION 4 ++#define NFS_MOUNT_VERSION 6 ++#define NFS_MAX_CONTEXT_LEN 256 ++ + + struct nfs2_fh { + char data[32]; +@@ -36,6 +38,9 @@ + int namlen; /* 2 */ + unsigned int bsize; /* 3 */ + struct nfs3_fh root; /* 4 */ ++ int pseudoflavor; /* 5 */ ++ char context[NFS_MAX_CONTEXT_LEN + 1]; /* 6 */ ++ + }; + + /* bits in the flags field */ +@@ -52,3 +57,19 @@ + #define NFS_MOUNT_NONLM 0x0200 /* 3 */ + #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */ + #define NFS_MOUNT_NOACL 0x0800 /* 4 */ ++#define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */ ++ ++/* security pseudoflavors */ ++ ++#ifndef AUTH_GSS_KRB5 ++#define AUTH_GSS_KRB5 390003 ++#define AUTH_GSS_KRB5I 390004 ++#define AUTH_GSS_KRB5P 390005 ++#define AUTH_GSS_LKEY 390006 ++#define AUTH_GSS_LKEYI 390007 ++#define AUTH_GSS_LKEYP 390008 ++#define AUTH_GSS_SPKM 390009 ++#define AUTH_GSS_SPKMI 390010 ++#define AUTH_GSS_SPKMP 390011 ++#endif ++ diff --git a/util-linux-2.12q-null.diff b/util-linux-2.12q-null.diff new file mode 100644 index 0000000..d9eb82e --- /dev/null +++ b/util-linux-2.12q-null.diff @@ -0,0 +1,14 @@ +--- util-linux-2.12q/misc-utils/script.c ++++ util-linux-2.12q/misc-utils/script.c +@@ -325,9 +325,9 @@ + shname = shell; + + if (cflg) +- execl(shell, shname, "-c", cflg, 0); ++ execl(shell, shname, "-c", cflg, NULL); + else +- execl(shell, shname, "-i", 0); ++ execl(shell, shname, "-i", NULL); + + perror(shell); + fail(); diff --git a/util-linux-2.12q-strict-aliasing.diff b/util-linux-2.12q-strict-aliasing.diff new file mode 100644 index 0000000..94bd8f0 --- /dev/null +++ b/util-linux-2.12q-strict-aliasing.diff @@ -0,0 +1,11 @@ +--- util-linux-2.12q/mount/Makefile ++++ util-linux-2.12q/mount/Makefile +@@ -110,7 +110,7 @@ + $(COMPILE) $(RPC_CFLAGS) nfsmount_clnt.c + + nfsmount_xdr.o: nfsmount_xdr.c +- $(COMPILE) $(RPC_CFLAGS) nfsmount_xdr.c ++ $(COMPILE) -fno-strict-aliasing $(RPC_CFLAGS) nfsmount_xdr.c + + ifeq "$(HAVE_GOOD_RPC)" "yes" + nfsmount.h: nfsmount.x diff --git a/util-linux-2.12q-umount2-not-static.patch b/util-linux-2.12q-umount2-not-static.patch new file mode 100644 index 0000000..e07c3d1 --- /dev/null +++ b/util-linux-2.12q-umount2-not-static.patch @@ -0,0 +1,11 @@ +--- mount/umount.c ++++ mount/umount.c +@@ -40,7 +40,7 @@ + #include + #ifdef __NR_umount2 + +-static int umount2(const char *path, int flags); ++int umount2(const char *path, int flags); + + _syscall2(int, umount2, const char *, path, int, flags); + diff --git a/util-linux-2.12r-cal_formatting.patch b/util-linux-2.12r-cal_formatting.patch new file mode 100644 index 0000000..1758a2c --- /dev/null +++ b/util-linux-2.12r-cal_formatting.patch @@ -0,0 +1,26 @@ +--- misc-utils/cal.c ++++ misc-utils/cal.c +@@ -702,18 +702,16 @@ + } + + void +-trim_trailing_spaces(s) +- char *s; ++trim_trailing_spaces(char *s) + { + char *p; + + for (p = s; *p; ++p) + continue; +- while (p > s && isspace(*--p)) +- continue; +- if (p > s) +- ++p; +- *p = '\0'; ++ ++ p--; ++ if (isspace(*p)) ++ *p = '\0'; + } + + /* diff --git a/util-linux-2.12r-external-prog-on-guess.diff b/util-linux-2.12r-external-prog-on-guess.diff new file mode 100644 index 0000000..662da55 --- /dev/null +++ b/util-linux-2.12r-external-prog-on-guess.diff @@ -0,0 +1,133 @@ +From: Jeff Mahoney +Subject: [PATCH] mount: needs to handle special mountprog even on guessed file systems. + + If the user doesn't specify -t mount.fstype will never be called. + + This patch fixes that. + + Update: Fixes a bug where the mount would get added to mtab twice. + +-- + + mount.c | 47 +++++++++++++++++++++++++++++++++++++++++------ + mount_guess_fstype.c | 3 +-- + 2 files changed, 42 insertions(+), 8 deletions(-) + +diff -rup util-linux-2.12r/mount/mount.c util-linux-2.12r.updated/mount/mount.c +--- util-linux-2.12r/mount/mount.c 2006-05-17 17:35:37.000000000 -0400 ++++ util-linux-2.12r.updated/mount/mount.c 2006-05-17 17:35:17.000000000 -0400 +@@ -451,6 +451,10 @@ create_mtab (void) { + unlock_mtab(); + } + ++static int check_special_mountprog(const char *spec, const char *node, ++ const char *type, int flags, ++ char *extra_opts, int *status); ++ + /* count successful mount system calls */ + static int mountcount = 0; + +@@ -462,12 +466,30 @@ static int mountcount = 0; + static int + do_mount_syscall (struct mountargs *args) { + int flags = args->flags; +- int ret; + + if ((flags & MS_MGC_MSK) == 0) + flags |= MS_MGC_VAL; + +- ret = mount (args->spec, args->node, args->type, flags, args->data); ++ return mount (args->spec, args->node, args->type, flags, args->data); ++} ++ ++/* ++ * do_mount() ++ * Mount a single file system, possibly invoking an external handler to ++ * do so. Keep track of successes. ++ * returns: 0: OK, -1: error in errno ++ */ ++static int ++do_mount (struct mountargs *args) { ++ int ret; ++ if (check_special_mountprog(args->spec, args->node, args->type, ++ args->flags, args->data, &ret) == 0) ++ ret = do_mount_syscall(args); ++ else if (ret == 0) { /* set by the call */ ++ mountcount++; ++ ret = 1; ++ } ++ + if (ret == 0) + mountcount++; + return ret; +@@ -507,10 +529,11 @@ guess_fstype_and_mount(const char *spec, + char *p; + + while((p = index(t,',')) != NULL) { ++ int ret; + *p = 0; + args.type = *types = t; +- if(do_mount_syscall (&args) == 0) +- return 0; ++ if((ret = do_mount (&args)) >= 0) ++ return ret; + t = p+1; + } + /* do last type below */ +@@ -519,10 +542,10 @@ guess_fstype_and_mount(const char *spec, + + if (*types || (flags & MS_REMOUNT)) { + args.type = *types; +- return do_mount_syscall (&args); ++ return do_mount (&args); + } + +- return procfsloop(do_mount_syscall, &args, types); ++ return procfsloop(do_mount, &args, types); + } + + /* +@@ -895,8 +918,16 @@ retry_nfs: + nosigblock: + + if (!fake) { ++ int skip_mtab = 0; + mnt5_res = guess_fstype_and_mount (spec, node, &types, flags & ~MS_NOSYS, + mount_opts); ++ /* External program was executed to mount the file system, skip updating ++ * mtab. */ ++ if (mnt5_res == 1) { ++ skip_mtab = 1; ++ mnt5_res = 0; ++ res = 0; ++ } + if(!mnt5_res && LoopMountAutomaticChmod && (getuid() == 0)) { + /* + * If loop was set up using random keys and new file system +@@ -907,8 +938,12 @@ nosigblock: + error (_("Error: encrypted file system chmod() failed")); + } + } ++ ++ if (skip_mtab) ++ goto out; + } + ++ + if (fake || mnt5_res == 0) { + /* Mount succeeded, report this (if verbose) and write mtab entry. */ + if (loop) +diff -rup util-linux-2.12r/mount/mount_guess_fstype.c util-linux-2.12r.updated/mount/mount_guess_fstype.c +--- util-linux-2.12r/mount/mount_guess_fstype.c 2006-05-17 17:35:37.000000000 -0400 ++++ util-linux-2.12r.updated/mount/mount_guess_fstype.c 2006-05-17 17:19:44.000000000 -0400 +@@ -695,9 +695,8 @@ procfsloop(int (*mount_fn)(struct mounta + printf(_("Trying %s\n"), fsname); + fflush(stdout); + } +- if ((*mount_fn) (args) == 0) { ++ if ((ret = (*mount_fn) (args)) >= 0) { + *types = fsname; +- ret = 0; + break; + } else if (errno != EINVAL && + is_in_procfs(fsname) == 1) { diff --git a/util-linux-2.12r-fdisk_llseek.patch b/util-linux-2.12r-fdisk_llseek.patch new file mode 100644 index 0000000..786a385 --- /dev/null +++ b/util-linux-2.12r-fdisk_llseek.patch @@ -0,0 +1,234 @@ +--- fdisk/Makefile ++++ fdisk/Makefile +@@ -39,7 +39,7 @@ + endif + endif + +-cfdisk: cfdisk.o llseek.o disksize.o i386_sys_types.o $(LIB)/xstrncpy.o ++cfdisk: cfdisk.o disksize.o i386_sys_types.o $(LIB)/xstrncpy.o + ifeq "$(HAVE_SLANG)" "yes" + $(CC) $(LDFLAGS) $^ -o $@ $(LIBSLANG) + else +@@ -55,7 +55,7 @@ + rm -f activate + ln -s sfdisk activate + +-fdisk: fdisk.o llseek.o disksize.o fdiskbsdlabel.o fdisksgilabel.o fdisksunlabel.o \ ++fdisk: fdisk.o disksize.o fdiskbsdlabel.o fdisksgilabel.o fdisksunlabel.o \ + fdiskmaclabel.o fdiskaixlabel.o i386_sys_types.o partname.o + fdisk.o: fdisk.c fdisk.h + fdiskbsdlabel.o: fdiskbsdlabel.c fdisk.h fdiskbsdlabel.h +--- fdisk/cfdisk.c ++++ fdisk/cfdisk.c +@@ -84,9 +84,6 @@ + #include "xstrncpy.h" + #include "common.h" + +-extern long long ext2_llseek(unsigned int fd, long long offset, +- unsigned int origin); +- + #define VERSION UTIL_LINUX_VERSION + + #define DEFAULT_DEVICE "/dev/hda" +@@ -552,7 +549,7 @@ + + static void + read_sector(char *buffer, long long sect_num) { +- if (ext2_llseek(fd, sect_num*SECTOR_SIZE, SEEK_SET) < 0) ++ if (lseek(fd, sect_num*SECTOR_SIZE, SEEK_SET) < 0) + fatal(_("Cannot seek on disk drive"), 2); + if (read(fd, buffer, SECTOR_SIZE) != SECTOR_SIZE) + fatal(_("Cannot read disk drive"), 2); +@@ -560,7 +557,7 @@ + + static void + write_sector(char *buffer, long long sect_num) { +- if (ext2_llseek(fd, sect_num*SECTOR_SIZE, SEEK_SET) < 0) ++ if (lseek(fd, sect_num*SECTOR_SIZE, SEEK_SET) < 0) + fatal(_("Cannot seek on disk drive"), 2); + if (write(fd, buffer, SECTOR_SIZE) != SECTOR_SIZE) + fatal(_("Cannot write disk drive"), 2); +@@ -587,7 +584,7 @@ + long long offset; + + offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE; +- if (ext2_llseek(fd, offset, SEEK_SET) == offset ++ if (lseek(fd, offset, SEEK_SET) == offset + && read(fd, §or, sizeof(sector)) == sizeof(sector)) { + dos_copy_to_info(p_info[i].ostype, OSTYPESZ, + sector+DOS_OSTYPE_OFFSET, DOS_OSTYPE_SZ); +@@ -672,7 +669,7 @@ + + offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE + + 1024; +- if (ext2_llseek(fd, offset, SEEK_SET) == offset ++ if (lseek(fd, offset, SEEK_SET) == offset + && read(fd, &e2fsb, sizeof(e2fsb)) == sizeof(e2fsb) + && e2fsb.s_magic[0] + (e2fsb.s_magic[1]<<8) == EXT2_SUPER_MAGIC) { + label = e2fsb.s_volume_name; +@@ -688,7 +685,7 @@ + } + + offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE + 0; +- if (ext2_llseek(fd, offset, SEEK_SET) == offset ++ if (lseek(fd, offset, SEEK_SET) == offset + && read(fd, &xfsb, sizeof(xfsb)) == sizeof(xfsb) + && !strncmp(xfsb.s_magic, XFS_SUPER_MAGIC, 4)) { + label = xfsb.s_fname; +@@ -702,7 +699,7 @@ + /* jfs? */ + offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE + + JFS_SUPER1_OFF; +- if (ext2_llseek(fd, offset, SEEK_SET) == offset ++ if (lseek(fd, offset, SEEK_SET) == offset + && read(fd, &jfsb, sizeof(jfsb)) == sizeof(jfsb) + && !strncmp(jfsb.s_magic, JFS_MAGIC, strlen(JFS_MAGIC))) { + label = jfsb.s_label; +@@ -716,7 +713,7 @@ + /* reiserfs? */ + offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE + + REISERFS_DISK_OFFSET_IN_BYTES; +- if (ext2_llseek(fd, offset, SEEK_SET) == offset ++ if (lseek(fd, offset, SEEK_SET) == offset + && read(fd, &reiserfsb, sizeof(reiserfsb)) == sizeof(reiserfsb) + && has_reiserfs_magic_string(&reiserfsb, &reiserfs_is_3_6)) { + if (reiserfs_is_3_6) { +--- fdisk/fdiskbsdlabel.c ++++ fdisk/fdiskbsdlabel.c +@@ -566,7 +566,7 @@ + sector = get_start_sect(xbsd_part); + #endif + +- if (ext2_llseek (fd, (long long) sector * SECTOR_SIZE, SEEK_SET) == -1) ++ if (lseek (fd, (long long) sector * SECTOR_SIZE, SEEK_SET) == -1) + fatal (unable_to_seek); + if (BSD_BBSIZE != write (fd, disklabelbuffer, BSD_BBSIZE)) + fatal (unable_to_write); +@@ -735,7 +735,7 @@ + sector = 0; + #endif + +- if (ext2_llseek (fd, (long long) sector * SECTOR_SIZE, SEEK_SET) == -1) ++ if (lseek (fd, (long long) sector * SECTOR_SIZE, SEEK_SET) == -1) + fatal (unable_to_seek); + if (BSD_BBSIZE != read (fd, disklabelbuffer, BSD_BBSIZE)) + fatal (unable_to_read); +@@ -781,12 +781,12 @@ + + #if defined (__alpha__) && BSD_LABELSECTOR == 0 + alpha_bootblock_checksum (disklabelbuffer); +- if (ext2_llseek (fd, (long long) 0, SEEK_SET) == -1) ++ if (lseek (fd, (long long) 0, SEEK_SET) == -1) + fatal (unable_to_seek); + if (BSD_BBSIZE != write (fd, disklabelbuffer, BSD_BBSIZE)) + fatal (unable_to_write); + #else +- if (ext2_llseek (fd, (long long) sector * SECTOR_SIZE + BSD_LABELOFFSET, ++ if (lseek (fd, (long long) sector * SECTOR_SIZE + BSD_LABELOFFSET, + SEEK_SET) == -1) + fatal (unable_to_seek); + if (sizeof (struct xbsd_disklabel) != write (fd, d, sizeof (struct xbsd_disklabel))) +--- fdisk/fdisksgilabel.c ++++ fdisk/fdisksgilabel.c +@@ -379,7 +379,7 @@ + */ + sgiinfo *info = fill_sgiinfo(); + int infostartblock = SSWAP32(sgilabel->directory[0].vol_file_start); +- if (ext2_llseek(fd, (long long)infostartblock* ++ if (lseek(fd, (long long)infostartblock* + SECTOR_SIZE, SEEK_SET) < 0) + fatal(unable_to_seek); + if (write(fd, info, SECTOR_SIZE) != SECTOR_SIZE) +--- fdisk/llseek.c ++++ fdisk/llseek.c +@@ -13,31 +13,12 @@ + extern long long ext2_llseek (unsigned int, long long, unsigned int); + + #ifdef __linux__ +- +-#ifdef HAVE_LLSEEK +-#include +- +-#else /* HAVE_LLSEEK */ +- +-#if defined(__alpha__) || defined(__ia64__) || defined(__s390x__) +- +-#define my_llseek lseek +- +-#else +-#include /* for __NR__llseek */ +- +-static int _llseek (unsigned int, unsigned long, +- unsigned long, long long *, unsigned int); +- +-#ifdef __NR__llseek +- +-static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high, +- unsigned long, offset_low,long long *,result, +- unsigned int, origin) +- +-#else ++# if defined(__alpha__) || defined(__ia64__) || defined(__s390x__) ++# define my_llseek lseek ++# else + + /* no __NR__llseek on compilation machine - might give it explicitly */ ++# ifndef __NR__llseek + static int _llseek (unsigned int fd, unsigned long oh, + unsigned long ol, long long *result, + unsigned int origin) { +@@ -45,10 +26,10 @@ + return -1; + } + +-#endif ++# endif /* __NR__llseek */ + + static long long my_llseek (unsigned int fd, long long offset, +- unsigned int origin) ++ unsigned int origin) + { + long long result; + int retval; +--- fdisk/sfdisk.c ++++ fdisk/sfdisk.c +@@ -164,36 +164,16 @@ + /* + * sseek: seek to specified sector - return 0 on failure + * +- * For >4GB disks lseek needs a > 32bit arg, and we have to use llseek. +- * On the other hand, a 32 bit sector number is OK until 2TB. +- * The routines _llseek and sseek below are the only ones that +- * know about the loff_t type. +- * + * Note: we use 512-byte sectors here, irrespective of the hardware ss. + */ +-#undef use_lseek +-#if defined (__alpha__) || defined (__ia64__) || defined (__x86_64__) || defined (__s390x__) +-#define use_lseek +-#endif +- +-#ifndef use_lseek +-static __attribute__used +-_syscall5(int, _llseek, unsigned int, fd, ulong, hi, ulong, lo, +- loff_t *, res, unsigned int, wh); +-#endif +- + static int + sseek(char *dev, unsigned int fd, unsigned long s) { +- loff_t in, out; +- in = ((loff_t) s << 9); ++ off_t in, out; ++ in = ((off_t) s << 9); + out = 1; + +-#ifndef use_lseek +- if (_llseek (fd, in>>32, in & 0xffffffff, &out, SEEK_SET) != 0) { +-#else + if ((out = lseek(fd, in, SEEK_SET)) != in) { +-#endif +- perror("llseek"); ++ perror("lseek"); + error(_("seek error on %s - cannot seek to %lu\n"), dev, s); + return 0; + } diff --git a/util-linux-2.12r-fdiskcyl.patch b/util-linux-2.12r-fdiskcyl.patch new file mode 100644 index 0000000..70a0a1b --- /dev/null +++ b/util-linux-2.12r-fdiskcyl.patch @@ -0,0 +1,32 @@ +--- util-linux-2.12r/fdisk/fdisk.c.old 2006-05-11 19:20:15.000000000 -0400 ++++ util-linux-2.12r/fdisk/fdisk.c 2006-05-11 19:33:44.000000000 -0400 +@@ -1916,6 +1916,16 @@ + total_number_of_sectors - total); + } + ++static unsigned long long ++roundup_to_cylinder_boundary(unsigned long long offset) { ++ if (units_per_sector) { ++ unsigned long long extra_sectors = offset % units_per_sector; ++ if (extra_sectors != 0) ++ offset += (units_per_sector - extra_sectors) - 1; ++ } ++ return offset; ++} ++ + static void + add_partition(int n, int sys) { + char mesg[256]; /* 48 does not suffice in Japanese */ +@@ -1951,8 +1961,10 @@ + limit = get_start_sect(q) + get_nr_sects(q) - 1; + } + if (display_in_cyl_units) +- for (i = 0; i < partitions; i++) ++ for (i = 0; i < partitions; i++) { + first[i] = (cround(first[i]) - 1) * units_per_sector; ++ last[i] = roundup_to_cylinder_boundary(last[i]); ++ } + + snprintf(mesg, sizeof(mesg), _("First %s"), str_units(SINGULAR)); + do { + diff --git a/util-linux-2.12r-fdiskwrap.patch b/util-linux-2.12r-fdiskwrap.patch new file mode 100644 index 0000000..56bf598 --- /dev/null +++ b/util-linux-2.12r-fdiskwrap.patch @@ -0,0 +1,382 @@ +--- util-linux-2.12r/fdisk/fdisk.c ++++ util-linux-2.12r/fdisk/fdisk.c +@@ -61,7 +61,7 @@ + + /* A valid partition table sector ends in 0x55 0xaa */ + static unsigned int +-part_table_flag(char *b) { ++part_table_flag(unsigned char *b) { + return ((unsigned int) b[510]) + (((unsigned int) b[511]) << 8); + } + +@@ -71,7 +71,7 @@ + } + + static void +-write_part_table_flag(char *b) { ++write_part_table_flag(unsigned char *b) { + b[510] = 0x55; + b[511] = 0xaa; + } +@@ -98,17 +98,17 @@ + store4_little_endian(p->start4, start_sect); + } + +-unsigned int ++unsigned long long + get_start_sect(struct partition *p) { + return read4_little_endian(p->start4); + } + + static void +-set_nr_sects(struct partition *p, unsigned int nr_sects) { ++set_nr_sects(struct partition *p, unsigned long long nr_sects) { + store4_little_endian(p->size4, nr_sects); + } + +-unsigned int ++unsigned long long + get_nr_sects(struct partition *p) { + return read4_little_endian(p->size4); + } +@@ -120,7 +120,7 @@ + * Raw disk label. For DOS-type partition tables the MBR, + * with descriptions of the primary partitions. + */ +-char MBRbuffer[MAX_SECTOR_SIZE]; ++unsigned char MBRbuffer[MAX_SECTOR_SIZE]; + + /* + * per partition table entry data +@@ -134,8 +134,8 @@ + struct partition *part_table; /* points into sectorbuffer */ + struct partition *ext_pointer; /* points into sectorbuffer */ + char changed; /* boolean */ +- unsigned int offset; /* disk sector number */ +- char *sectorbuffer; /* disk sector contents */ ++ unsigned long long offset; /* disk sector number */ ++ unsigned char *sectorbuffer; /* disk sector contents */ + } ptes[MAXIMUM_PARTS]; + + char *disk_device, /* must be specified */ +@@ -154,15 +154,14 @@ + unsigned int pt_heads, pt_sectors; + unsigned int kern_heads, kern_sectors; + ++unsigned long long sector_offset = 1, extended_offset = 0, sectors; ++ + unsigned int heads, +- sectors, + cylinders, + sector_size = DEFAULT_SECTOR_SIZE, + user_set_sector_size = 0, +- sector_offset = 1, + units_per_sector = 1, +- display_in_cyl_units = 1, +- extended_offset = 0; /* offset of link pointers */ ++ display_in_cyl_units = 1; + + unsigned long long total_number_of_sectors; + +@@ -240,21 +239,21 @@ + } + + static void +-seek_sector(int fd, unsigned int secno) { +- long long offset = (long long) secno * sector_size; +- if (ext2_llseek(fd, offset, SEEK_SET) == (long long) -1) ++seek_sector(int fd, unsigned long long secno) { ++ off_t offset = (off_t) secno * sector_size; ++ if (lseek(fd, offset, SEEK_SET) == (off_t) -1) + fatal(unable_to_seek); + } + + static void +-read_sector(int fd, unsigned int secno, char *buf) { ++read_sector(int fd, unsigned long long secno, unsigned char *buf) { + seek_sector(fd, secno); + if (read(fd, buf, sector_size) != sector_size) + fatal(unable_to_read); + } + + static void +-write_sector(int fd, unsigned int secno, char *buf) { ++write_sector(int fd, unsigned long long secno, unsigned char *buf) { + seek_sector(fd, secno); + if (write(fd, buf, sector_size) != sector_size) + fatal(unable_to_write); +@@ -262,11 +261,11 @@ + + /* Allocate a buffer and read a partition table sector */ + static void +-read_pte(int fd, int pno, unsigned int offset) { ++read_pte(int fd, int pno, unsigned long long offset) { + struct pte *pe = &ptes[pno]; + + pe->offset = offset; +- pe->sectorbuffer = (char *) malloc(sector_size); ++ pe->sectorbuffer = malloc(sector_size); + if (!pe->sectorbuffer) + fatal(out_of_memory); + read_sector(fd, offset, pe->sectorbuffer); +@@ -274,7 +273,7 @@ + pe->part_table = pe->ext_pointer = NULL; + } + +-static unsigned int ++static unsigned long long + get_partition_start(struct pte *pe) { + return pe->offset + get_start_sect(pe->part_table); + } +@@ -547,10 +546,10 @@ + } + + static void +-set_partition(int i, int doext, unsigned int start, unsigned int stop, +- int sysid) { ++set_partition(int i, int doext, unsigned long long start, ++ unsigned long long stop, int sysid) { + struct partition *p; +- unsigned int offset; ++ unsigned long long offset; + + if (doext) { + p = ptes[i].ext_pointer; +@@ -1546,7 +1545,7 @@ + else + printf(_("\nDisk %s: %ld.%ld GB, %lld bytes\n"), + disk_device, megabytes/1000, (megabytes/100)%10, bytes); +- printf(_("%d heads, %d sectors/track, %d cylinders"), ++ printf(_("%d heads, %Ld sectors/track, %d cylinders"), + heads, sectors, cylinders); + if (units_per_sector == 1) + printf(_(", total %llu sectors"), +@@ -1778,20 +1777,21 @@ + struct partition *p; + int i; + +- printf(_("\nDisk %s: %d heads, %d sectors, %d cylinders\n\n"), ++ printf(_("\nDisk %s: %d heads, %Ld sectors, %d cylinders\n\n"), + disk_device, heads, sectors, cylinders); + printf(_("Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID\n")); + for (i = 0 ; i < partitions; i++) { + pe = &ptes[i]; + p = (extend ? pe->ext_pointer : pe->part_table); + if (p != NULL) { +- printf("%2d %02x%4d%4d%5d%4d%4d%5d%11u%11u %02x\n", ++ printf("%2d %02x%4d%4d%5d%4d%4d%5d%11lu%11lu %02x\n", + i + 1, p->boot_ind, p->head, + sector(p->sector), + cylinder(p->sector, p->cyl), p->end_head, + sector(p->end_sector), + cylinder(p->end_sector, p->end_cyl), +- get_start_sect(p), get_nr_sects(p), p->sys_ind); ++ (unsigned long) get_start_sect(p), ++ (unsigned long) get_nr_sects(p), p->sys_ind); + if (p->sys_ind) + check_consistency(p, i); + } +@@ -1799,7 +1799,7 @@ + } + + static void +-fill_bounds(unsigned int *first, unsigned int *last) { ++fill_bounds(unsigned long long *first, unsigned long long *last) { + int i; + struct pte *pe = &ptes[0]; + struct partition *p; +@@ -1832,7 +1832,7 @@ + n, h + 1, heads); + if (real_s >= sectors) + fprintf(stderr, _("Partition %d: sector %d greater than " +- "maximum %d\n"), n, s, sectors); ++ "maximum %Ld\n"), n, s, sectors); + if (real_c >= cylinders) + fprintf(stderr, _("Partitions %d: cylinder %d greater than " + "maximum %d\n"), n, real_c + 1, cylinders); +@@ -1845,8 +1845,8 @@ + static void + verify(void) { + int i, j; +- unsigned int total = 1; +- unsigned int first[partitions], last[partitions]; ++ unsigned long total = 1; ++ unsigned long long first[partitions], last[partitions]; + struct partition *p; + + if (warn_geometry()) +@@ -1890,7 +1890,7 @@ + + if (extended_offset) { + struct pte *pex = &ptes[ext_index]; +- unsigned int e_last = get_start_sect(pex->part_table) + ++ unsigned long long e_last = get_start_sect(pex->part_table) + + get_nr_sects(pex->part_table) - 1; + + for (i = 4; i < partitions; i++) { +@@ -1909,8 +1909,8 @@ + } + + if (total > total_number_of_sectors) +- printf(_("Total allocated sectors %d greater than the maximum " +- "%lld\n"), total, total_number_of_sectors); ++ printf(_("Total allocated sectors %ld greater than the maximum" ++ " %lld\n"), total, total_number_of_sectors); + else if (total < total_number_of_sectors) + printf(_("%lld unallocated sectors\n"), + total_number_of_sectors - total); +@@ -1923,7 +1923,7 @@ + struct partition *p = ptes[n].part_table; + struct partition *q = ptes[ext_index].part_table; + long long llimit; +- unsigned int start, stop = 0, limit, temp, ++ unsigned long long start, stop = 0, limit, temp, + first[partitions], last[partitions]; + + if (p && p->sys_ind) { +@@ -1969,7 +1969,7 @@ + if (start > limit) + break; + if (start >= temp+units_per_sector && read) { +- printf(_("Sector %d is already allocated\n"), temp); ++ printf(_("Sector %llu is already allocated\n"), temp); + temp = start; + read = 0; + } +@@ -2228,14 +2228,14 @@ + + #define MAX_PER_LINE 16 + static void +-print_buffer(char pbuffer[]) { ++print_buffer(unsigned char pbuffer[]) { + int i, + l; + + for (i = 0, l = 0; i < sector_size; i++, l++) { + if (l == 0) + printf("0x%03X:", i); +- printf(" %02X", (unsigned char) pbuffer[i]); ++ printf(" %02X", pbuffer[i]); + if (l == MAX_PER_LINE - 1) { + printf("\n"); + l = -1; +--- util-linux-2.12r/fdisk/fdisk.h ++++ util-linux-2.12r/fdisk/fdisk.h +@@ -84,8 +84,8 @@ + #define SINGULAR 1 + extern char *const str_units(int); + +-extern unsigned int get_start_sect(struct partition *p); +-extern unsigned int get_nr_sects(struct partition *p); ++extern unsigned long long get_start_sect(struct partition *p); ++extern unsigned long long get_nr_sects(struct partition *p); + + extern int osf_label; + +--- util-linux-2.12r/fdisk/fdiskaixlabel.h ++++ util-linux-2.12r/fdisk/fdiskaixlabel.h +@@ -19,9 +19,10 @@ + + /* fdisk.c */ + #define aixlabel ((aix_partition *)MBRbuffer) +-extern char MBRbuffer[MAX_SECTOR_SIZE]; ++extern unsigned char MBRbuffer[MAX_SECTOR_SIZE]; + extern char changed[MAXIMUM_PARTS]; +-extern unsigned int heads, sectors, cylinders; ++extern unsigned int heads, cylinders; ++extern unsigned long long sectors; + extern int show_begin; + extern int aix_label; + extern char *partition_type(unsigned char type); +--- util-linux-2.12r/fdisk/fdiskmaclabel.h ++++ util-linux-2.12r/fdisk/fdiskmaclabel.h +@@ -25,9 +25,10 @@ + + /* fdisk.c */ + #define maclabel ((mac_partition *)MBRbuffer) +-extern char MBRbuffer[MAX_SECTOR_SIZE]; ++extern unsigned char MBRbuffer[MAX_SECTOR_SIZE]; + extern char changed[MAXIMUM_PARTS]; +-extern unsigned int heads, sectors, cylinders; ++extern unsigned int heads, cylinders; ++extern unsigned long long sectors; + extern int show_begin; + extern int mac_label; + extern char *partition_type(unsigned char type); +--- util-linux-2.12r/fdisk/fdisksgilabel.c ++++ util-linux-2.12r/fdisk/fdisksgilabel.c +@@ -197,7 +197,7 @@ + w = strlen(disk_device); + + if (xtra) { +- printf(_("\nDisk %s (SGI disk label): %d heads, %d sectors\n" ++ printf(_("\nDisk %s (SGI disk label): %d heads, %llu sectors\n" + "%d cylinders, %d physical cylinders\n" + "%d extra sects/cyl, interleave %d:1\n" + "%s\n" +@@ -211,7 +211,7 @@ + sector_size); + } else { + printf(_("\nDisk %s (SGI disk label): " +- "%d heads, %d sectors, %d cylinders\n" ++ "%d heads, %llu sectors, %d cylinders\n" + "Units = %s of %d * %d bytes\n\n"), + disk_device, heads, sectors, cylinders, + str_units(PLURAL), units_per_sector, +--- util-linux-2.12r/fdisk/fdisksgilabel.h ++++ util-linux-2.12r/fdisk/fdisksgilabel.h +@@ -103,8 +103,9 @@ + /* fdisk.c */ + #define sgilabel ((sgi_partition *)MBRbuffer) + #define sgiparam (sgilabel->devparam) +-extern char MBRbuffer[MAX_SECTOR_SIZE]; +-extern unsigned int heads, sectors, cylinders, sector_size; ++extern unsigned char MBRbuffer[MAX_SECTOR_SIZE]; ++extern unsigned int heads, cylinders, sector_size; ++extern unsigned long long sectors; + extern int show_begin; + extern int sgi_label; + extern char *partition_type(unsigned char type); +--- util-linux-2.12r/fdisk/fdisksunlabel.c ++++ util-linux-2.12r/fdisk/fdisksunlabel.c +@@ -349,7 +349,7 @@ + } + + snprintf(sunlabel->info, sizeof(sunlabel->info), +- "%s%s%s cyl %d alt %d hd %d sec %d", ++ "%s%s%s cyl %d alt %d hd %d sec %llu", + p ? p->vendor : "", (p && *p->vendor) ? " " : "", + p ? p->model + : (floppy ? _("3,5\" floppy") : _("Linux custom")), +@@ -656,7 +656,7 @@ + w = strlen(disk_device); + if (xtra) + printf( +- _("\nDisk %s (Sun disk label): %d heads, %d sectors, %d rpm\n" ++ _("\nDisk %s (Sun disk label): %d heads, %llu sectors, %d rpm\n" + "%d cylinders, %d alternate cylinders, %d physical cylinders\n" + "%d extra sects/cyl, interleave %d:1\n" + "%s\n" +@@ -670,7 +670,7 @@ + str_units(PLURAL), units_per_sector); + else + printf( +- _("\nDisk %s (Sun disk label): %d heads, %d sectors, %d cylinders\n" ++ _("\nDisk %s (Sun disk label): %d heads, %llu sectors, %d cylinders\n" + "Units = %s of %d * 512 bytes\n\n"), + disk_device, heads, sectors, cylinders, + str_units(PLURAL), units_per_sector); +--- util-linux-2.12r/fdisk/fdisksunlabel.h ++++ util-linux-2.12r/fdisk/fdisksunlabel.h +@@ -37,8 +37,9 @@ + : (__u32)(x)) + + /* fdisk.c */ +-extern char MBRbuffer[MAX_SECTOR_SIZE]; +-extern unsigned int heads, sectors, cylinders; ++extern unsigned char MBRbuffer[MAX_SECTOR_SIZE]; ++extern unsigned int heads, cylinders; ++extern unsigned long long sectors; + extern int show_begin; + extern int sun_label; + extern char *partition_type(unsigned char type); diff --git a/util-linux-2.12r-losetup_password.patch b/util-linux-2.12r-losetup_password.patch new file mode 100644 index 0000000..8098f68 --- /dev/null +++ b/util-linux-2.12r-losetup_password.patch @@ -0,0 +1,231 @@ +Index: util-linux-2.12r/mount/lomount.c +=================================================================== +--- util-linux-2.12r.orig/mount/lomount.c ++++ util-linux-2.12r/mount/lomount.c +@@ -46,24 +46,24 @@ + #include "rmd160.h" + #include "aes.h" + ++#define LO_PASS_OK EXIT_SUCCESS ++#define LO_PASS_ERR EXIT_FAILURE ++#define LO_PASS_EMPTY 5 ++#define LO_PASS_SHORT 6 ++ + extern int verbose; + extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ + extern void error (const char *fmt, ...); /* idem */ + extern void show_all_loops(void); + extern int read_options_from_fstab(char *, char **); + ++volatile int timeout=0; + int passphrase_timeout=0; + struct sigaction alrmact; + + static void + alrmhandler() { +- /* let the SIGINT handler do the work: */ +- kill(getpid(),SIGINT); +- usleep(1000000); +- kill(getpid(),SIGTERM); +- usleep(1000000); +- /* stubborn... */ +- exit(0); ++ timeout = 1; + } + + +@@ -473,11 +473,14 @@ static char *do_GPG_pipe(char *pass) + return multiKeyPass[0]; + } + +-static char *sGetPass(int minLen, int warnLen) ++static int sGetPass(char **pass, int minLen, int warnLen) + { + char *p, *s, *seed; + int i, ask2; + ++ *pass = NULL; ++ timeout = 0; ++ + if(!passFDnumber) { + + if(passphrase_timeout) { +@@ -489,6 +492,9 @@ static char *sGetPass(int minLen, int wa + } + + p = getpass(_("Password: ")); ++ alarm(0); ++ if (timeout) ++ return LO_PASS_EMPTY; + ask2 = passAskTwice ? 1 : 0; + } else { + i = atoi(passFDnumber); +@@ -504,11 +510,13 @@ static char *sGetPass(int minLen, int wa + } + if(x == 65) { + multiKeyMode = 65; +- return multiKeyPass[0]; ++ *pass = multiKeyPass[0]; ++ return LO_PASS_OK; + } + if(x == 64) { + multiKeyMode = 64; +- return multiKeyPass[0]; ++ *pass = multiKeyPass[0]; ++ return LO_PASS_OK; + } + p = multiKeyPass[0]; + } +@@ -531,6 +539,9 @@ static char *sGetPass(int minLen, int wa + } + + p = getpass(_("Retype password: ")); ++ alarm(0); ++ if (timeout) ++ return LO_PASS_EMPTY; + if(!p) goto nomem; + if(strcmp(s, p)) goto compareErr; + memset(s, 0, i); +@@ -538,17 +549,25 @@ static char *sGetPass(int minLen, int wa + ask2 = 0; + } + p = do_GPG_pipe(p); +- if(!p) return(NULL); ++ if(!p) ++ return LO_PASS_ERR; + if(!p[0]) { + fprintf(stderr, _("Error: gpg key file decryption failed\n")); +- return(NULL); ++ return LO_PASS_ERR; ++ } ++ if(multiKeyMode) { ++ *pass = p; ++ return LO_PASS_OK; + } +- if(multiKeyMode) return(p); + } + i = strlen(p); ++ if(i == 0) { ++ fprintf(stderr, _("Error: Empty password\n")); ++ return LO_PASS_EMPTY; ++ } + if(i < minLen) { + fprintf(stderr, _("Error: Password must be at least %d characters.\n"), minLen); +- return(NULL); ++ return LO_PASS_SHORT; + } + seed = passSeedString; + if(!seed) seed = ""; +@@ -556,7 +575,7 @@ static char *sGetPass(int minLen, int wa + if(!s) { + nomem: + fprintf(stderr, _("Error: Unable to allocate memory\n")); +- return(NULL); ++ return LO_PASS_ERR; + } + strcpy(s, p); + memset(p, 0, i); +@@ -571,11 +590,14 @@ static char *sGetPass(int minLen, int wa + } + + p = getpass(_("Retype password: ")); ++ alarm(0); ++ if (timeout) ++ return LO_PASS_EMPTY; + if(!p) goto nomem; + if(strcmp(s, p)) { + compareErr: + fprintf(stderr, _("Error: Passwords are not identical\n")); +- return(NULL); ++ return LO_PASS_ERR; + } + memset(p, 0, i); + } +@@ -583,7 +605,8 @@ static char *sGetPass(int minLen, int wa + fprintf(stderr, _("WARNING - Please use longer password (%d or more characters)\n"), SUSE_PASSWORD_MIN_LENGTH); + } + strcat(s, seed); +- return(s); ++ *pass = s; ++ return LO_PASS_OK; + } + + /* this is for compatibility with historic loop-AES version */ +@@ -788,6 +811,7 @@ set_loop(const char *device, const char + unsigned char multiKeyBits[65][32]; + int minPassLen = SUSE_PASSWORD_MIN_LENGTH; + int run_mkfs_command = 0; ++ int ret; + + loopFileName = (char *)file; + multiKeyMode = 0; +@@ -848,8 +872,8 @@ set_loop(const char *device, const char + loopinfo.lo_encrypt_key_size = 0; + break; + case LO_CRYPT_XOR: +- pass = sGetPass (1, 0); +- if(!pass) goto close_fd_ffd_return1; ++ ret = sGetPass (&pass, 1, 0); ++ if(ret) goto close_fd_ffd_return1; + xstrncpy (loopinfo.lo_encrypt_key, pass, LO_KEY_SIZE); + loopinfo.lo_encrypt_key_size = strlen(loopinfo.lo_encrypt_key); + break; +@@ -886,6 +910,7 @@ set_loop(const char *device, const char + /* This is not compatible with gpgkey= mount option */ + if(rd_wr_retry(atoi(passFDnumber), (char *)&loopinfo.lo_encrypt_key[0], LO_KEY_SIZE, 0) < 1) { + fprintf(stderr, _("Error: couldn't read binary key\n")); ++ ret = 1; + goto close_fd_ffd_return1; + } + break; /* out of switch(loopinfo.lo_encrypt_type) */ +@@ -894,6 +919,7 @@ set_loop(const char *device, const char + /* WARNING! DO NOT USE RANDOM HASH TYPE ON PARTITION WITH EXISTING */ + /* IMPORTANT DATA ON IT. RANDOM HASH TYPE WILL DESTROY YOUR DATA. */ + if(loop_create_random_keys((char*)file, *loopro, &multiKeyBits[0][0])) { ++ ret = 1; + goto close_fd_ffd_return1; + } + memcpy(&loopinfo.lo_encrypt_key[0], &multiKeyBits[0][0], sizeof(loopinfo.lo_encrypt_key)); +@@ -901,8 +927,8 @@ set_loop(const char *device, const char + break; /* out of switch(loopinfo.lo_encrypt_type) */ + } + } +- pass = sGetPass (minPassLen, SUSE_PASSWORD_MIN_LENGTH); +- if(!pass) goto close_fd_ffd_return1; ++ ret = sGetPass (&pass, minPassLen, SUSE_PASSWORD_MIN_LENGTH); ++ if(ret) goto close_fd_ffd_return1; + i = strlen(pass); + if(hashFunc == unhashed1_key_setup) { + /* this is for compatibility with historic loop-AES version */ +@@ -966,6 +992,7 @@ set_loop(const char *device, const char + break; + default: + fprintf (stderr, _("Error: don't know how to get key for encryption system %d\n"), loopinfo.lo_encrypt_type); ++ ret = 1; + goto close_fd_ffd_return1; + } + +@@ -985,7 +1012,7 @@ close_fd_ffd_return1: + close (fd); + close_ffd_return1: + close (ffd); +- return 1; ++ return ret; + } + + /* type 18 == LO_CRYPT_CRYPTOAPI */ +Index: util-linux-2.12r/mount/losetup.8 +=================================================================== +--- util-linux-2.12r.orig/mount/losetup.8 ++++ util-linux-2.12r/mount/losetup.8 +@@ -143,6 +143,10 @@ displays the status of a loop device, it + is not configured and 2 if an error occurred which prevented + .B losetup + from determining the status of the device. ++When using encryption ++.B losetup ++returns 5 if the passphrase is empty or a timeout occurred and 6 if ++the passphrase is too short. + + .SH FILES + .nf diff --git a/util-linux-2.12r-mkswap_fix.patch b/util-linux-2.12r-mkswap_fix.patch new file mode 100644 index 0000000..58d50a0 --- /dev/null +++ b/util-linux-2.12r-mkswap_fix.patch @@ -0,0 +1,15 @@ +Index: util-linux-2.12r/disk-utils/mkswap.c +=================================================================== +--- util-linux-2.12r.orig/disk-utils/mkswap.c 2004-12-21 09:21:24.000000000 -0800 ++++ util-linux-2.12r/disk-utils/mkswap.c 2006-10-23 17:51:24.636063632 -0700 +@@ -602,9 +602,7 @@ + version = 1; + else + /* use version 1 as default, if possible */ +- if (PAGES <= V0_MAX_PAGES && PAGES > V1_MAX_PAGES) +- version = 0; +- else if (linux_version_code() < MAKE_VERSION(2,1,117)) ++ if (linux_version_code() < MAKE_VERSION(2,1,117)) + version = 0; + else if (pagesize < 2048) + version = 0; diff --git a/util-linux-2.12r-mount-by-uuid.patch b/util-linux-2.12r-mount-by-uuid.patch new file mode 100644 index 0000000..982b9b6 --- /dev/null +++ b/util-linux-2.12r-mount-by-uuid.patch @@ -0,0 +1,53 @@ +diff -pur util-linux-2.12r/mount.orig/fstab.c util-linux-2.12r/mount/fstab.c +--- util-linux-2.12r/mount.orig/fstab.c 2004-12-21 20:09:24.000000000 +0100 ++++ util-linux-2.12r/mount/fstab.c 2005-11-10 08:53:42.000000000 +0100 +@@ -296,7 +296,7 @@ has_uuid(const char *device, const char + const char *devuuid; + int ret; + +- devuuid = mount_get_devname_by_uuid(device); ++ devuuid = mount_get_volume_uuid_by_spec(device); + ret = !strcmp(uuid, devuuid); + /* free(devuuid); */ + return ret; +Only in util-linux-2.12r/mount: fstab.c~ +diff -pur util-linux-2.12r/mount.orig/mount_blkid.c util-linux-2.12r/mount/mount_blkid.c +--- util-linux-2.12r/mount.orig/mount_blkid.c 2004-12-22 10:54:41.000000000 +0100 ++++ util-linux-2.12r/mount/mount_blkid.c 2005-11-10 08:55:00.000000000 +0100 +@@ -16,6 +16,11 @@ mount_blkid_put_cache(void) { + } + + const char * ++mount_get_volume_uuid_by_spec(const char *spec) { ++ return blkid_get_tag_value(blkid, "UUID", spec); ++} ++ ++const char * + mount_get_volume_label_by_spec(const char *spec) { + return blkid_get_tag_value(blkid, "LABEL", spec); + } +@@ -56,6 +61,11 @@ mount_blkid_put_cache(void) { + } + + const char * ++mount_get_volume_uuid_by_spec(const char *spec) { ++ return xstrdup(get_volume_uuid_by_spec(spec)); ++} ++ ++const char * + mount_get_volume_label_by_spec(const char *spec) { + return xstrdup(get_volume_label_by_spec(spec)); + } +Only in util-linux-2.12r/mount: mount_blkid.c~ +diff -pur util-linux-2.12r/mount.orig/mount_blkid.h util-linux-2.12r/mount/mount_blkid.h +--- util-linux-2.12r/mount.orig/mount_blkid.h 2004-04-13 22:00:02.000000000 +0200 ++++ util-linux-2.12r/mount/mount_blkid.h 2005-11-10 08:55:21.000000000 +0100 +@@ -7,6 +7,7 @@ extern void mount_blkid_get_cache(void); + extern void mount_blkid_put_cache(void); + extern const char *mount_get_devname_by_uuid(const char *uuid); + extern const char *mount_get_devname_by_label(const char *label); ++extern const char *mount_get_volume_uuid_by_spec(const char *spec); + extern const char *mount_get_volume_label_by_spec(const char *spec); + extern const char *mount_get_devname(const char *spec); + extern const char *mount_get_devname_for_mounting(const char *spec); +Only in util-linux-2.12r/mount: mount_blkid.h~ diff --git a/util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff b/util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff new file mode 100644 index 0000000..9b57882 --- /dev/null +++ b/util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff @@ -0,0 +1,58 @@ +Author: Lars Mueller +Subject: Use cifs instead of smbfs by default if the source starts with //; minor mount man pages changes (mention cifs and point to mount.cifs man page) +Bugzilla: na +submitted upstream: yes +accepeted upstream: no + +Index: util-linux-2.12r/mount/mount.8 +=================================================================== +--- util-linux-2.12r.orig/mount/mount.8 ++++ util-linux-2.12r/mount/mount.8 +@@ -367,6 +367,7 @@ currently supported include: + .IR adfs , + .IR affs , + .IR autofs , ++.IR cifs , + .IR coda , + .IR coherent , + .IR cramfs , +@@ -420,8 +421,8 @@ For most types all the + program has to do is issue a simple + .IR mount (2) + system call, and no detailed knowledge of the filesystem type is required. +-For a few types however (like nfs, smbfs, ncpfs) ad hoc code is +-necessary. The nfs ad hoc code is built in, but smbfs and ncpfs ++For a few types however (like nfs, cifs, smbfs, ncpfs) ad hoc code is ++necessary. The nfs ad hoc code is built in, but cifs, smbfs, and ncpfs + have a separate mount program. In order to make it possible to + treat all types in a uniform way, mount will execute the program + .I /sbin/mount.TYPE +@@ -733,6 +734,11 @@ These options are accepted but ignored. + (However, quota utilities may react to such strings in + .IR /etc/fstab .) + ++.SH "Mount options for cifs" ++See the options section of the ++.BR mount.cifs (8) ++man page (cifs-mount package must be installed). ++ + .SH "Mount options for coherent" + None. + +Index: util-linux-2.12r/mount/mount.c +=================================================================== +--- util-linux-2.12r.orig/mount/mount.c ++++ util-linux-2.12r/mount/mount.c +@@ -1178,10 +1178,10 @@ mount_one (const char *spec, const char + "I'll assume nfs because of " + "the colon\n")); + } else if(!strncmp(spec, "//", 2)) { +- types = "smbfs"; ++ types = "cifs"; + if (verbose) + printf(_("mount: no type was given - " +- "I'll assume smbfs because of " ++ "I'll assume cifs because of " + "the // prefix\n")); + } + } diff --git a/util-linux-2.12r-mount-mtab-update.patch b/util-linux-2.12r-mount-mtab-update.patch new file mode 100644 index 0000000..c620b11 --- /dev/null +++ b/util-linux-2.12r-mount-mtab-update.patch @@ -0,0 +1,29 @@ +--- mount/mount.c ++++ mount/mount.c +@@ -805,6 +805,7 @@ + int mnt5_res = 0; /* only for gcc */ + int mnt_err; + int flags; ++ int isroot; + char *extra_opts; /* written in mtab */ + char *mount_opts; /* actually used on system call */ + const char *opts, *spec, *node, *types; +@@ -913,13 +914,17 @@ + if (loop) + opt_loopdev = loopdev; + +- update_mtab_entry(loop ? loopfile : spec, ++ isroot = (streq (node, "/") || streq (node, "root") || ++ streq (node, "rootfs")); ++ if (!isroot) { ++ update_mtab_entry(loop ? loopfile : spec, + node, + types ? types : "unknown", + fix_opts_string (flags & ~MS_NOMTAB, extra_opts, user), + flags, + freq, + pass); ++ } + + block_signals (SIG_UNBLOCK); + res = 0; diff --git a/util-linux-2.12r-mount.8-xfs-update.patch b/util-linux-2.12r-mount.8-xfs-update.patch new file mode 100644 index 0000000..0519712 --- /dev/null +++ b/util-linux-2.12r-mount.8-xfs-update.patch @@ -0,0 +1,15 @@ +--- mount/mount.8 ++++ mount/mount.8 +@@ -1781,6 +1781,12 @@ + .TP + .B dmapi " / " xdsm + Enable the DMAPI (Data Management API) event callouts. ++Use with the "mtpt" option. ++.TP ++.BI mtpt= mountpoint ++Use with the "dmapi" option. The value specified here will be ++included in the DMAPI mount event, and should be the path of ++the actual mountpoint that is used. + .TP + .BI logbufs= value + Set the number of in-memory log buffers. diff --git a/util-linux-2.12r-nfs_remount_options.patch b/util-linux-2.12r-nfs_remount_options.patch new file mode 100644 index 0000000..04fd6b6 --- /dev/null +++ b/util-linux-2.12r-nfs_remount_options.patch @@ -0,0 +1,18 @@ +Index: util-linux-2.12r/mount/nfsmount.c +=================================================================== +--- util-linux-2.12r.orig/mount/nfsmount.c ++++ util-linux-2.12r/mount/nfsmount.c +@@ -305,8 +305,11 @@ int nfsmount(const char *spec, const cha + "excessively long option argument\n")); + goto fail; + } +- sprintf(new_opts, "%s%saddr=%s", +- old_opts, *old_opts ? "," : "", s); ++ if (*flags & MS_REMOUNT) ++ strcpy(new_opts, old_opts); ++ else ++ sprintf(new_opts, "%s%saddr=%s", ++ old_opts, *old_opts ? "," : "", s); + *extra_opts = xstrdup(new_opts); + + /* Set default options. diff --git a/util-linux-2.12r-nonfsmountfallback.diff b/util-linux-2.12r-nonfsmountfallback.diff new file mode 100644 index 0000000..97a7460 --- /dev/null +++ b/util-linux-2.12r-nonfsmountfallback.diff @@ -0,0 +1,31 @@ +--- util-linux-2.12r/mount/mount.c ++++ util-linux-2.12r/mount/mount.c +@@ -927,17 +927,6 @@ + + block_signals (SIG_UNBLOCK); + +-#ifdef HAVE_NFS +- if (mnt_err && types && streq (types, "nfs")) { +- if (nfs_mount_version == 4 && mnt_err != EBUSY && mnt_err != ENOENT) { +- if (verbose) +- printf(_("mount: failed with nfs mount version 4, trying 3..\n")); +- nfs_mount_version = 3; +- goto retry_nfs; +- } +- } +-#endif +- + /* Mount failed, complain, but don't die. */ + + if (types == 0) { +--- util-linux-2.12r/mount/nfsmount.c ++++ util-linux-2.12r/mount/nfsmount.c +@@ -76,7 +76,7 @@ + + #define MAKE_VERSION(p,q,r) (65536*(p) + 256*(q) + (r)) + +-#define MAX_NFSPROT ((nfs_mount_version >= 4) ? 3 : 2) ++#define MAX_NFSPROT 3 + + static int + linux_version_code(void) { diff --git a/util-linux-2.12r-pagesize.patch b/util-linux-2.12r-pagesize.patch new file mode 100644 index 0000000..e7a6968 --- /dev/null +++ b/util-linux-2.12r-pagesize.patch @@ -0,0 +1,12 @@ +--- mount/swapon.c ++++ mount/swapon.c +@@ -50,6 +50,9 @@ + + #define QUIET 1 + ++#undef PAGE_SIZE ++#define PAGE_SIZE sysconf(_SC_PAGESIZE) ++ + int all = 0; + int verbose = 0; + int priority = -1; /* non-prioritized swap by default */ diff --git a/util-linux-2.12r-partx.patch b/util-linux-2.12r-partx.patch new file mode 100644 index 0000000..bde9c4a --- /dev/null +++ b/util-linux-2.12r-partx.patch @@ -0,0 +1,118 @@ +Index: util-linux-2.12r/Makefile +=================================================================== +--- util-linux-2.12r.orig/Makefile ++++ util-linux-2.12r/Makefile +@@ -18,7 +18,8 @@ SUBDIRS=po \ + fdisk \ + hwclock \ + sys-utils \ +- text-utils ++ text-utils \ ++ partx + + .PHONEY: all install clean now + all: defines.h +@@ -43,7 +44,7 @@ install: + + clean: + -rm -f *.o *~ omake conftest conftest.c core +- @for subdir in $(SUBDIRS) partx; do \ ++ @for subdir in $(SUBDIRS); do \ + (cd $$subdir && $(MAKE) $@) || exit 1; \ + done + +Index: util-linux-2.12r/partx/partx.c +=================================================================== +--- util-linux-2.12r.orig/partx/partx.c ++++ util-linux-2.12r/partx/partx.c +@@ -38,6 +38,8 @@ + #include + #include + #include /* HDIO_GETGEO */ ++/* workaround for __user in header file */ ++#define __user + #include + #define BLKGETSIZE _IO(0x12,96) /* return device size */ + +@@ -333,29 +335,13 @@ xmalloc (size_t size) { + /* + * sseek: seek to specified sector + */ +-#if !defined (__alpha__) && !defined (__ia64__) && !defined (__s390x__) && !defined(__x86_64__) +-#define NEED__llseek +-#endif +- +-#ifdef NEED__llseek +-#include /* _syscall */ +-static +-_syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, +- long long *, res, uint, wh); +-#endif +- + static int + sseek(int fd, unsigned int secnr) { + long long in, out; + in = ((long long) secnr << 9); + out = 1; + +-#ifdef NEED__llseek +- if (_llseek (fd, in>>32, in & 0xffffffff, &out, SEEK_SET) != 0 +- || out != in) +-#else + if ((out = lseek(fd, in, SEEK_SET)) != in) +-#endif + { + fprintf(stderr, "llseek error\n"); + return -1; +Index: util-linux-2.12r/partx/addpart.c +=================================================================== +--- util-linux-2.12r.orig/partx/addpart.c ++++ util-linux-2.12r/partx/addpart.c +@@ -3,6 +3,8 @@ + #include + #include + #include ++/* workaround for __user in header file */ ++#define __user + #include + + int +Index: util-linux-2.12r/partx/delpart.c +=================================================================== +--- util-linux-2.12r.orig/partx/delpart.c ++++ util-linux-2.12r/partx/delpart.c +@@ -3,6 +3,8 @@ + #include + #include + #include ++/* workaround for __user in header file */ ++#define __user + #include + + int +Index: util-linux-2.12r/partx/Makefile +=================================================================== +--- util-linux-2.12r.orig/partx/Makefile ++++ util-linux-2.12r/partx/Makefile +@@ -1,7 +1,12 @@ ++include ../MCONFIG ++ + OBJ = bsd.o dos.o partx.o solaris.o unixware.o gpt.o crc32.o + CFLAGS += -Wall ++SBIN= ++ ++SBIN:=$(SBIN) partx + +-all: addpart delpart partx ++all: addpart delpart $(SBIN) + + partx: $(OBJ) + +@@ -13,3 +18,7 @@ clean: + rm -f $(OBJ) addpart.o delpart.o addpart delpart partx *~ + + $(OBJ): partx.h ++ ++install: all ++ $(INSTALLDIR) $(SBINDIR) ++ $(INSTALLBIN) $(SBIN) $(SBINDIR) diff --git a/util-linux-2.12r-rawfixes.patch b/util-linux-2.12r-rawfixes.patch new file mode 100644 index 0000000..14ba34b --- /dev/null +++ b/util-linux-2.12r-rawfixes.patch @@ -0,0 +1,19 @@ +--- util-linux-2.12a/disk-utils/raw.c.=K0000=.orig ++++ util-linux-2.12a/disk-utils/raw.c +@@ -31,6 +31,7 @@ + #endif + #define DEVFS_RAWCTLDEV "/dev/raw/rawctl" + ++#define RAW_NR_MINORS 4096 + + char * progname; + int do_query = 0; +@@ -94,7 +95,7 @@ int main(int argc, char *argv[]) + if (do_query_all) { + if (optind < argc) + usage(1); +- for (i=1; i<255; i++) ++ for (i = 1; i < RAW_NR_MINORS; i++) + query(i, 1); + exit(0); + } diff --git a/util-linux-2.12r-readprofile-mapfile.patch b/util-linux-2.12r-readprofile-mapfile.patch new file mode 100644 index 0000000..810b440 --- /dev/null +++ b/util-linux-2.12r-readprofile-mapfile.patch @@ -0,0 +1,45 @@ +diff -ruNp util-linux-2.12r/sys-utils/readprofile.c util-linux-2.12r.fix/sys-utils/readprofile.c +--- util-linux-2.12r/sys-utils/readprofile.c 2004-12-11 11:11:09.000000000 +1100 ++++ util-linux-2.12r.fix/sys-utils/readprofile.c 2006-05-19 17:45:56.000000000 +1000 +@@ -324,6 +324,7 @@ main(int argc, char **argv) { + */ + while (fgets(mapline,S_LEN,map)) { + unsigned int this=0; ++ int done = 0; + + if (sscanf(mapline,"%llx %s %s",&next_add,mode,next_name)!=3) { + fprintf(stderr,_("%s: %s(%i): wrong map line\n"), +@@ -332,12 +333,17 @@ main(int argc, char **argv) { + } + header_printed = 0; + +- /* ignore any LEADING (before a '[tT]' symbol is found) +- Absolute symbols */ +- if ((*mode == 'A' || *mode == '?') && total == 0) continue; +- if (*mode != 'T' && *mode != 't' && +- *mode != 'W' && *mode != 'w') +- break; /* only text is profiled */ ++ /* the kernel only profiles up to _etext */ ++ if (!strcmp(next_name, "_etext")) ++ done = 1; ++ else { ++ /* ignore any LEADING (before a '[tT]' symbol is found) ++ Absolute symbols */ ++ if ((*mode == 'A' || *mode == '?') && total == 0) continue; ++ if (*mode != 'T' && *mode != 't' && ++ *mode != 'W' && *mode != 'w') ++ break; /* only text is profiled */ ++ } + + if (indx >= len / sizeof(*buf)) { + fprintf(stderr, _("%s: profile address out of range. " +@@ -387,6 +393,8 @@ main(int argc, char **argv) { + strcpy(fn_name,next_name); + + maplineno++; ++ if (done) ++ break; + } + + /* clock ticks, out of kernel text - probably modules */ + diff --git a/util-linux-2.12r-rpcsec-gss.patch b/util-linux-2.12r-rpcsec-gss.patch new file mode 100644 index 0000000..cdff5f4 --- /dev/null +++ b/util-linux-2.12r-rpcsec-gss.patch @@ -0,0 +1,114 @@ +--- mount/nfsmount.c.orig 2006-03-17 19:42:33.000000000 +1100 ++++ mount/nfsmount.c 2006-03-17 19:56:55.000000000 +1100 +@@ -119,8 +119,10 @@ find_kernel_nfs_mount_version(void) { + nfs_mount_version = 4; /* since 2.2.18pre9 */ + else if (kernel_version < MAKE_VERSION(2,3,99)) + nfs_mount_version = 3; ++ else if (kernel_version < MAKE_VERSION(2,6,3)) ++ nfs_mount_version = 4; + else +- nfs_mount_version = 4; /* since 2.3.99pre4 */ ++ nfs_mount_version = 6; + } + if (nfs_mount_version > NFS_MOUNT_VERSION) + nfs_mount_version = NFS_MOUNT_VERSION; +@@ -320,7 +322,6 @@ int nfsmount(const char *spec, const cha + #if NFS_MOUNT_VERSION >= 2 + data.namlen = NAME_MAX; + #endif +- + bg = 0; + soft = 0; + intr = 0; +@@ -402,6 +403,38 @@ int nfsmount(const char *spec, const cha + printf(_("Warning: Option namlen is not supported.\n")); + } else if (!strcmp(opt, "addr")) { + /* ignore */; ++#if NFS_MOUNT_VERSION >= 5 ++ } else if (!strcmp(opt, "sec")) { ++ char *secflavor = opteq+1; ++ /* see RFC 2623 */ ++ if (nfs_mount_version < 5) { ++ printf(_("Warning: this version of mount(1) does not support RPCSEC_GSS, ignoring sec=%s option\n"), secflavor); ++ continue; ++ } else if (!strcmp(secflavor, "sys")) ++ data.pseudoflavor = AUTH_SYS; ++ else if (!strcmp(secflavor, "krb5")) ++ data.pseudoflavor = AUTH_GSS_KRB5; ++ else if (!strcmp(secflavor, "krb5i")) ++ data.pseudoflavor = AUTH_GSS_KRB5I; ++ else if (!strcmp(secflavor, "krb5p")) ++ data.pseudoflavor = AUTH_GSS_KRB5P; ++ else if (!strcmp(secflavor, "lipkey")) ++ data.pseudoflavor = AUTH_GSS_LKEY; ++ else if (!strcmp(secflavor, "lipkey-i")) ++ data.pseudoflavor = AUTH_GSS_LKEYI; ++ else if (!strcmp(secflavor, "lipkey-p")) ++ data.pseudoflavor = AUTH_GSS_LKEYP; ++ else if (!strcmp(secflavor, "spkm3")) ++ data.pseudoflavor = AUTH_GSS_SPKM; ++ else if (!strcmp(secflavor, "spkm3i")) ++ data.pseudoflavor = AUTH_GSS_SPKMI; ++ else if (!strcmp(secflavor, "spkm3p")) ++ data.pseudoflavor = AUTH_GSS_SPKMP; ++ else if(!sloppy) { ++ printf(_("Warning: Unrecognized security flavor %s.\n"), secflavor); ++ goto fail; ++ } ++#endif + } else { + printf(_("unknown nfs mount parameter: " + "%s=%d\n"), opt, val); +@@ -474,6 +507,11 @@ retry_udp: + data.flags |= (noacl ? NFS_MOUNT_NOACL : 0); + } + #endif ++#if NFS_MOUNT_VERSION >= 5 ++ if ((nfs_mount_version >= 5) && data.pseudoflavor) { ++ data.flags |= NFS_MOUNT_SECFLAVOUR; ++ } ++#endif + if (nfsvers > MAX_NFSPROT) { + fprintf(stderr, "NFSv%d not supported!\n", nfsvers); + return 0; +@@ -510,6 +548,9 @@ retry_udp: + printf("tcp = %d\n", + (data.flags & NFS_MOUNT_TCP) != 0); + #endif ++#if NFS_MOUNT_VERSION >= 5 ++ printf("sec = %u\n", data.pseudoflavor); ++#endif + #endif + + data.version = nfs_mount_version; +@@ -717,6 +758,30 @@ retry_udp: + nfs_strerror(status.nfsv3.fhs_status)); + goto fail; + } ++#if NFS_MOUNT_VERSION >= 5 ++ if (data.pseudoflavor) { ++ mountres3_ok *mountres = &status.nfsv3.mountres3_u.mountinfo; ++ int i = mountres->auth_flavours.auth_flavours_len; ++ ++ if (i > 0) { ++ int *flavor = mountres->auth_flavours.auth_flavours_val; ++ while (--i >= 0) { ++ if (flavor[i] == data.pseudoflavor) { ++ break; ++ } ++ } ++ ++ if (i < 0) { ++ fprintf(stderr, ++ "mount: %s:%s failed, security flavor not supported\n", ++ hostname, dirname); ++ mountproc3_umnt_3(&dirname,mclient); ++ goto fail; ++ } ++ } ++ } ++#endif ++ + fhandle = &status.nfsv3.mountres3_u.mountinfo.fhandle; + memset(data.old_root.data, 0, NFS_FHSIZE); + memset(&data.root, 0, sizeof(data.root)); diff --git a/util-linux-2.12r-sec-manpage.patch b/util-linux-2.12r-sec-manpage.patch new file mode 100644 index 0000000..0621cd6 --- /dev/null +++ b/util-linux-2.12r-sec-manpage.patch @@ -0,0 +1,51 @@ +From: http://www.citi.umich.edu/projects/nfsv4/linux/util-linux-patches +Subject: Update nfs(5) manpage to document security flavors +References: 159368 + +Acked-by: okir@suse.de + + mount/nfs.5 | 24 ++++++++++++++++++++---- + 1 files changed, 20 insertions(+), 4 deletions(-) + +Index: util-linux-2.12r/mount/nfs.5 +=================================================================== +--- util-linux-2.12r.orig/mount/nfs.5 ++++ util-linux-2.12r/mount/nfs.5 +@@ -128,7 +128,7 @@ mount daemon program number. + Use an alternate RPC version number to contact the + mount daemon on the remote host. This option is useful + for hosts that can run multiple NFS servers. +-The default value is version 1. ++The default value depends on which kernel you are using. + .TP 1.5i + .I nfsprog=n + Use an alternate RPC program number to contact the +@@ -193,9 +193,25 @@ Suppress the retrieval of new attributes + .TP 1.5i + .I noac + Disable all forms of attribute caching entirely. This extracts a +-server performance penalty but it allows two different NFS clients +-to get reasonable good results when both clients are actively +-writing to common filesystem on the server. ++significant performance penalty but it allows two different NFS clients ++to get reasonable results when both clients are actively ++writing to a common export on the server. ++.TP 1.5i ++.I sec=mode ++Set the security flavor for this mount to "mode". ++The default setting is \f3sec=sys\f1, which uses local ++unix uids and gids to authenticate NFS operations (AUTH_SYS). ++Other currently supported settings are: ++\f3sec=krb5\f1, which uses Kerberos V5 instead of local unix uids ++and gids to authenticate users; ++\f3sec=krb5i\f1, which uses Kerberos V5 for user authentication ++and performs integrity checking of NFS operations using secure ++checksums to prevent data tampering; and ++\f3sec=krb5p\f1, which uses Kerberos V5 for user authentication ++and integrity checking, and encrypts NFS traffic to prevent ++traffic sniffing (this is the most secure setting). ++Note that there is a performance penalty when using integrity ++or privacy. + .TP 1.5i + .I tcp + Mount the NFS filesystem using the TCP protocol instead of the diff --git a/util-linux-2.12r-umount_nosysfs.patch b/util-linux-2.12r-umount_nosysfs.patch new file mode 100644 index 0000000..f8d5ea6 --- /dev/null +++ b/util-linux-2.12r-umount_nosysfs.patch @@ -0,0 +1,11 @@ +--- mount/umount.c ++++ mount/umount.c +@@ -724,7 +724,7 @@ + if (all) { + /* nodev stuff: sysfs, usbfs, oprofilefs, ... */ + if (types == NULL) +- types = "noproc,nodevfs,nodevpts"; ++ types = "noproc,nodevfs,nodevpts,nosysfs"; + result = umount_all (types, test_opts); + } else if (argc < 1) { + usage (stderr, 2); diff --git a/util-linux-2.12r.diff b/util-linux-2.12r.diff new file mode 100644 index 0000000..901db7f --- /dev/null +++ b/util-linux-2.12r.diff @@ -0,0 +1,86 @@ +--- util-linux-2.12q/configure ++++ util-linux-2.12q/configure +@@ -59,7 +59,7 @@ + + CC=${CC-cc} + CFLAGS=${CFLAGS-"-O2"} +-LDFLAGS=${LDFLAGS-"-s"} ++LDFLAGS=${LDFLAGS-""} + echo CC=$CC >> make_include + echo CFLAGS=$CFLAGS >> make_include + echo LDFLAGS=$LDFLAGS >> make_include +--- util-linux-2.12q/MCONFIG ++++ util-linux-2.12q/MCONFIG +@@ -22,7 +22,7 @@ + # If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp + # will use PAM for authentication. Additionally, passwd will not be + # installed as it is not PAM aware. +-HAVE_PAM=no ++HAVE_PAM=yes + + # If HAVE_SELINUX is set to "yes", the login will make sure the user is + # logged into an appropriate security context +@@ -35,7 +35,7 @@ + + # If HAVE_PASSWD is set to "yes", then passwd will not be built or + # installed from the login-utils subdirectory. +-HAVE_PASSWD=no ++HAVE_PASSWD=yes + + # If you use chfn and chsh from this package, REQUIRE_PASSWORD will require + # non-root users to enter the account password before updating /etc/passwd. +@@ -59,7 +59,7 @@ + # not be built or installed from the login-utils subdirectory. (The + # shutdown and init from the SysVinit package do not depend on the last, + # mesg, and wall from that package.) +-HAVE_SYSVINIT_UTILS=yes ++HAVE_SYSVINIT_UTILS=no + + # If HAVE_WRITE is set to "yes", then write will not be built or + # installed from the misc-utils subdirectory. +@@ -77,7 +77,7 @@ + # user's tty to "tty" [The login in util-linux does this correctly, and + # xterm will do it correctly if X is compiled with USE_TTY_GROUP set + # properly.] +-USE_TTY_GROUP=yes ++USE_TTY_GROUP=no + + # If HAVE_KILL is set to "yes", then kill will not be built or + # installed from the misc-utils subdirectory. +@@ -141,7 +141,7 @@ + OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer + else + ifeq "$(ARCH)" "arm" +- OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer ++ OPT= -pipe -O2 -fomit-frame-pointer + else + OPT= -O2 -fomit-frame-pointer + endif +@@ -220,7 +220,7 @@ + INSTALLBIN= $(INSTALL) -m $(BINMODE) + INSTALLMAN= $(INSTALL) -m $(MANMODE) + INSTALLDAT= $(INSTALL) -m $(DATMODE) +-INSTALLSUID= $(INSTALL) -m $(SUIDMODE) -o root ++INSTALLSUID= $(INSTALL) -m $(SUIDMODE) + + ifeq "$(DISABLE_NLS)" "yes" + NLSFLAGS = -DDISABLE_NLS +--- util-linux-2.12q/mount/filesystems ++++ util-linux-2.12q/mount/filesystems +@@ -0,0 +1,5 @@ ++vfat ++hfs ++minix ++reiserfs ++* +--- util-linux-2.12q/mount/linux_fs.h ++++ util-linux-2.12q/mount/linux_fs.h +@@ -19,7 +19,7 @@ + #define MINIX2_SUPER_MAGIC2 0x2478 /* minix v2, 30 char names */ + struct minix_super_block { + u_char s_dummy[16]; +- u_char s_magic[2]; ++ short s_magic[2]; + }; + #define minixmagic(s) assemble2le(s.s_magic) + diff --git a/util-linux-2.12r.tar.bz2 b/util-linux-2.12r.tar.bz2 new file mode 100644 index 0000000..dd91c63 --- /dev/null +++ b/util-linux-2.12r.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8e499b338ce9fbd1fb315194b26540ec823c0afc46c9e145ac7a3e38ad57e6b +size 1370907 diff --git a/util-linux-2.30.tar.sign b/util-linux-2.30.tar.sign deleted file mode 100644 index c1e2ca1..0000000 --- a/util-linux-2.30.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQIcBAABCAAGBQJZMUBLAAoJEOS3HV7sOcKEr9IP/i90Hc8Tiukh8Hlap02p4uWa -t083KEdi79a7H7vhCKNPjM8bkeod8F5/I+61uhSc9r4QoEpKX0vk8UU69NVK3gn1 -RntwmuXjZB4ZR+aDN6vmp3uuZlPEMG6em8dgiO+Gjy61xRGw9Krxo6+jyTvTzouT -bZsPy3JnVRXg0toawyR39ScRjGiLjb5P+3KMoJK8R6MUbkOMCgAN73yx6UHBkzb3 -n0zAALs10Y4OfYaIA4R+mcq4AKvPPsb/eCXTia75aThv/uFvdEpXK2wDYeUmjJmH -eVqTU2zYrhWvueu3FW7suAx/6o+ijGWD8ROu9Dd6sHnUK9mGLomxfxTthh2UlBES -23ZJBLLoIDPL+aUKq3EYeIsqLMf4eRaRUb5VIHwEZwcMqWvSvVZJGlk0WR3SzhfQ -UCAGWEE6ifQskVg6QbAZe8qFybbiTcH5onqKUJ2DlDiP53Kk8+0YKxhkNLulFoU1 -XrN0hqRP7z2BtlrSzhGt25heExfnMMIelpiqYb2jVtbXV9s5/0jKZT4x2CRFhZ86 -EHKvN1W0gtzMD1ZOLVEj1MaopS68TvmLooxf+x4Ns5GPGMReILWqwNWklwqXFGjs -P91JD3l6opcoUMO2xjVpVIcH6oLhXeLfAFEmUggrdmk/Jm4kjYQZAUi1ByWrJg30 -3fOzxEEoirUWP5cZoV5B -=8KFU ------END PGP SIGNATURE----- diff --git a/util-linux-2.30.tar.xz b/util-linux-2.30.tar.xz deleted file mode 100644 index ef2c745..0000000 --- a/util-linux-2.30.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c208a4ff6906cb7f57940aa5bc3a6eed146e50a7cc0a092f52ef2ab65057a08d -size 4478016 diff --git a/util-linux-libvolume_id-support.patch b/util-linux-libvolume_id-support.patch new file mode 100644 index 0000000..adca26a --- /dev/null +++ b/util-linux-libvolume_id-support.patch @@ -0,0 +1,523 @@ +--- MCONFIG ++++ MCONFIG +@@ -138,8 +138,8 @@ + CPUTAIL=486 + endif + ifeq "$(CPU)" "x86_64" +- CPUHEAD=-mcpu= +- CPUTAIL=nocona ++ CPUHEAD=-mtune= ++ CPUTAIL=k8 + endif + CPUOPT= $(CPUHEAD)$(CPUTAIL) + OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer +@@ -151,7 +151,7 @@ + endif + endif + +-WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes ++WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -g + + LIB=../lib + +--- configure ++++ configure +@@ -754,3 +754,23 @@ + echo "You don't have blkid" + fi + rm -f conftest conftest.c ++ ++# ++# 16. For mount, do we have libvolume_id? ++# ++echo ' ++#include ++#include ++int main(){ exit(0); volume_id_close(NULL); } ++' > conftest.c ++LIBS="-lvolume_id" ++eval $compile ++LIBS= ++if test -s conftest; then ++ echo "HAVE_VOLID=yes" >> make_include ++ echo "You have libvolume_id" ++else ++ echo "HAVE_VOLID=no" >> make_include ++ echo "You don't have libvolume_id" ++fi ++rm -f conftest conftest.c +--- mount/Makefile ++++ mount/Makefile +@@ -1,7 +1,7 @@ + include ../make_include + include ../MCONFIG + +-DEFINES = -DHAVE_NFS $(BLKID_DEFINE) ++DEFINES = -DHAVE_NFS $(BLKID_DEFINE) $(VOLID_DEFINE) + + RPCSVCDIR = rpcsvc + RPC_CFLAGS = -Wno-unused +@@ -25,6 +25,11 @@ + BLKID_LIB = -lblkid -luuid + endif + ++ifeq "$(HAVE_VOLID)" "yes" ++VOLID_DEFINE = -DHAVE_VOLID ++VOLID_LIB = -lvolume_id ++endif ++ + PROGS = $(SUID_PROGS) $(NOSUID_PROGS) + + MAYBE = pivot_root swapoff +@@ -48,23 +53,25 @@ + + mount: mount.o fstab.o sundries.o xmalloc.o realpath.o mntent.o version.o \ + get_label_uuid.o mount_by_label.o mount_blkid.o mount_guess_fstype.o \ ++ mount_udev.o \ + getusername.o $(LIB)/setproctitle.o $(LIB)/env.o $(NFS_OBJS) lomount.o \ + loumount.o loop.o sha512.o rmd160.o aes.o $(LIB)/xstrncpy.o +- $(LINK) $^ -o $@ $(BLKID_LIB) ++ $(LINK) $^ -o $@ $(BLKID_LIB) $(VOLID_LIB) + + umount: umount.o fstab.o sundries.o xmalloc.o realpath.o mntent.o \ + getusername.o get_label_uuid.o mount_by_label.o mount_blkid.o \ +- version.o $(LIB)/env.o loumount.o +- $(LINK) $^ -o $@ $(BLKID_LIB) ++ mount_udev.o version.o $(LIB)/env.o loumount.o ++ $(LINK) $^ -o $@ $(BLKID_LIB) $(VOLID_LIB) + + guessfstype: guessfstype.o mount_guess_fstype.o sundries.o realpath.o \ + fstab.o mntent.o get_label_uuid.o mount_blkid.o mount_by_label.o \ +- xmalloc.o +- $(LINK) $^ -o $@ ++ mount_udev.o xmalloc.o ++ $(LINK) $^ -o $@ $(VOLID_LIB) + + swapon: swapon.o version.o xmalloc.o \ +- get_label_uuid.o mount_by_label.o mount_blkid.o loop.o sha512.o $(LIB)/xstrncpy.o +- $(LINK) $^ -o $@ $(BLKID_LIB) ++ get_label_uuid.o mount_by_label.o mount_blkid.o mount_udev.o \ ++ loop.o sha512.o $(LIB)/xstrncpy.o ++ $(LINK) $^ -o $@ $(BLKID_LIB) $(VOLID_LIB) + + main_losetup.o: lomount.c + $(COMPILE) -DMAIN lomount.c -o $@ +@@ -142,7 +149,7 @@ + + clean: + rm -f a.out core *~ *.o swapargs.h $(PROGS) $(MAYBE) +- rm -f nfs_mountversion.h ++ rm -f nfs_mountversion.h nfsmount_clnt.c nfsmount.h nfsmount_xdr.c + + clobber distclean realclean: clean + rm -f $(GEN_FILES) +--- mount/fstab.c ++++ mount/fstab.c +@@ -305,6 +305,7 @@ + /* Find the entry (SPEC,FILE) in fstab */ + struct mntentchn * + getfsspecfile (const char *spec, const char *file) { ++ char *nspec; + struct mntentchn *mc, *mc0; + + mc0 = fstab_head(); +@@ -316,11 +317,12 @@ + return mc; + + /* second attempt: names found after symlink resolution */ ++ nspec = canonicalize(spec); + for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) + if ((streq(mc->m.mnt_dir, file) || + streq(canonicalize(mc->m.mnt_dir), file)) + && (streq(mc->m.mnt_fsname, spec) || +- streq(canonicalize(mc->m.mnt_fsname), spec))) ++ streq(canonicalize(mc->m.mnt_fsname), nspec))) + return mc; + + /* third attempt: names found after LABEL= or UUID= resolution */ +@@ -357,11 +359,21 @@ + struct mntentchn * + getfsspec (const char *spec) { + struct mntentchn *mc, *mc0; ++ const char *nspec, *fsname; + + mc0 = fstab_head(); +- for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) +- if (streq(mc->m.mnt_fsname, spec)) ++ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) { ++ if (!strncmp (mc->m.mnt_fsname, "LABEL=", 6)) { ++ fsname = mount_get_devname_by_label(mc->m.mnt_fsname + 6); ++ } else if (!strncmp(mc->m.mnt_fsname, "UUID=", 5)) { ++ fsname = mount_get_devname_by_uuid(mc->m.mnt_fsname + 5); ++ } else { ++ fsname = mc->m.mnt_fsname; ++ } ++ nspec = canonicalize(fsname); ++ if (streq(nspec, spec)) + return mc; ++ } + return NULL; + } + +--- mount/mount.c ++++ mount/mount.c +@@ -1667,7 +1667,7 @@ + use only for testing purposes - + the guessing is not reliable at all */ + { +- char *fstype; ++ const char *fstype; + fstype = do_guess_fstype(optarg); + printf("%s\n", fstype ? fstype : "unknown"); + exit(fstype ? 0 : EX_FAIL); +@@ -1738,6 +1738,8 @@ + if (mc == NULL) + mc = getfsspec (spec); + if (mc == NULL) ++ mc = getfsspec (canonicalize(spec)); ++ if (mc == NULL) + die (EX_USAGE, + _("mount: cannot find %s in %s"), + spec, _PATH_FSTAB); +--- mount/mount_blkid.c ++++ mount/mount_blkid.c +@@ -1,6 +1,7 @@ + #include + #include "mount_blkid.h" + ++#ifndef HAVE_VOLID + #ifdef HAVE_BLKID + + blkid_cache blkid; +@@ -119,3 +120,4 @@ + + + #endif ++#endif +--- mount/mount_blkid.h ++++ mount/mount_blkid.h +@@ -11,3 +11,5 @@ + extern const char *mount_get_volume_label_by_spec(const char *spec); + extern const char *mount_get_devname(const char *spec); + extern const char *mount_get_devname_for_mounting(const char *spec); ++ ++extern const char *volume_id_get_tag(const char *spec, const char *token); +--- mount/mount_by_label.c ++++ mount/mount_by_label.c +@@ -1,4 +1,4 @@ +-#ifndef HAVE_BLKID ++#if (!defined HAVE_BLKID) && (!defined HAVE_VOLID) + /* + * mount_by_label.c - aeb + * +--- mount/mount_guess_fstype.c ++++ mount/mount_guess_fstype.c +@@ -54,9 +54,23 @@ + #define ETC_FILESYSTEMS "/etc/filesystems" + #define PROC_FILESYSTEMS "/proc/filesystems" + ++#ifdef HAVE_VOLID ++ ++static int ++known_fstype(const char *fstype) { ++ return 0; ++} ++ ++const char * ++do_guess_fstype(const char *spec) ++{ ++ return volume_id_get_tag(spec, "TYPE"); ++} ++ ++#else + #ifdef HAVE_BLKID + +-char * ++const char * + do_guess_fstype(const char *device) + { + return blkid_get_tag_value(blkid, "TYPE", device); +@@ -208,7 +222,7 @@ + return (sum == p[511]); + } + +-char * ++const char * + do_guess_fstype(const char *device) { + int fd; + char *type = NULL; +@@ -536,7 +550,7 @@ + } + + #endif +- ++#endif + static struct tried { + struct tried *next; + char *type; +@@ -578,9 +592,9 @@ + tried = NULL; + } + +-char * ++const char * + guess_fstype(const char *spec) { +- char *type = do_guess_fstype(spec); ++ const char *type = do_guess_fstype(spec); + if (verbose) { + printf (_("mount: you didn't specify a filesystem type for %s\n"), + spec); +--- /dev/null 2006-06-02 17:12:45.000000000 +0200 ++++ mount/mount_udev.c 2006-06-12 11:14:42.285154088 +0200 +@@ -0,0 +1,237 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "mount_blkid.h" ++ ++#ifdef HAVE_VOLID ++ ++extern int verbose; ++ ++struct volume_id_types_t { ++ int id; ++ char *token; ++ char *env; ++}; ++ ++enum { ++ VOLUME_ID_NONE=0, ++ VOLUME_ID_TYPE, ++ VOLUME_ID_LABEL, ++ VOLUME_ID_UUID ++}; ++ ++#define volume_id_offset(member) (unsigned long)offsetof(struct volume_id,member) ++ ++struct volume_id_types_t volume_id_types[] = { ++ { VOLUME_ID_TYPE, "TYPE", "ID_FS_TYPE" }, ++ { VOLUME_ID_LABEL, "LABEL", "ID_FS_LABEL" }, ++ { VOLUME_ID_UUID, "UUID", "ID_FS_UUID" }, ++ { VOLUME_ID_NONE, NULL, NULL }, ++}; ++ ++const char * ++volume_id_get_tag(const char *spec, const char *token) ++{ ++ struct volume_id *vid; ++ uint64_t size; ++ struct volume_id_types_t *volume_id_ptr = volume_id_types; ++ char *var, *value; ++ ++ value = calloc(1, VOLUME_ID_LABEL_SIZE); ++ if (!value) ++ return NULL; ++ ++ if (!spec) ++ return NULL; ++ ++ while (volume_id_ptr->token && strcmp(volume_id_ptr->token,token)) ++ volume_id_ptr++; ++ ++ if (!volume_id_ptr->token) { ++ free(value); ++ value = NULL; ++ goto out; ++ } ++ ++ /* Quick exit if ID_FS_* variables are set */ ++ if ((var = getenv(volume_id_ptr->env))) { ++ strncpy(value,var,VOLUME_ID_LABEL_SIZE - 1); ++ goto out; ++ } ++ ++ vid = volume_id_open_node(spec); ++ if (!vid) { ++ free(value); ++ value = NULL; ++ goto out; ++ } ++ ++ if (ioctl(vid->fd, BLKGETSIZE64, &size) != 0) ++ size = 0; ++ ++ if (volume_id_probe_all(vid, 0, size) == 0) { ++ switch(volume_id_ptr->id) { ++ case VOLUME_ID_TYPE: ++ strcpy(value, vid->type); ++ break; ++ case VOLUME_ID_LABEL: ++ strcpy(value, vid->label); ++ break; ++ case VOLUME_ID_UUID: ++ strcpy(value, vid->uuid); ++ break; ++ default: ++ free(value); ++ value = NULL; ++ break; ++ } ++ } else ++ value = NULL; ++ ++ volume_id_close(vid); ++ ++ out: ++ return value; ++} ++ ++void ++mount_blkid_get_cache(void) {} ++ ++void ++mount_blkid_put_cache(void) {} ++ ++const char * ++mount_get_volume_uuid_by_spec(const char *spec) ++{ ++ return volume_id_get_tag(spec, "UUID"); ++} ++ ++const char * ++mount_get_volume_label_by_spec(const char *spec) ++{ ++ return volume_id_get_tag(spec, "LABEL"); ++} ++ ++const char * ++mount_get_devname_by_uuid(const char *uuid) { ++ char *dev = NULL; ++ ++ if (!uuid) ++ return NULL; ++ ++ dev = malloc(19 + strlen(uuid)); ++ if (dev) { ++ strcpy(dev,"/dev/disk/by-uuid/"); ++ strcat(dev,uuid); ++ } ++ ++ return dev; ++} ++ ++const char * ++mount_get_devname_by_label(const char *label) { ++ char *dev = NULL; ++ ++ if (!label) ++ return NULL; ++ ++ dev = malloc(20 + strlen(label)); ++ if (dev) { ++ strcpy(dev,"/dev/disk/by-label/"); ++ strcat(dev,label); ++ } ++ ++ return dev; ++} ++ ++const char * ++mount_get_devname(const char *spec) ++{ ++ char *token, *cp, *value; ++ const char *nspec = NULL; ++ ++ if (!spec) ++ return NULL; ++ ++ token = strdup(spec); ++ if (!token) ++ return NULL; ++ ++ /* We have to return an allocated string */ ++ if (!(cp = strchr(token, '='))) ++ return token; ++ ++ value = token + (cp - token); ++ *value++ = '\0'; ++ ++ if (*value == '"' || *value == '\'') { ++ char c = *value++; ++ if (!(cp = strrchr(value, c))) ++ goto errout; /* missing closing quote */ ++ *cp = '\0'; ++ } ++ ++ if (!strcmp(token,"LABEL")) { ++ nspec = mount_get_devname_by_label(value); ++ } else if (!strcmp(token,"UUID")) { ++ nspec = mount_get_devname_by_uuid(value); ++ } ++ ++ free(token); ++ ++ errout: ++ return nspec; ++} ++ ++/* Also when no UUID= or LABEL= occur? No verbose? No warnings? */ ++const char * ++mount_get_devname_for_mounting(const char *spec) ++{ ++ char *token, *cp, *value; ++ const char *nspec = NULL; ++ ++ if (!spec) ++ return NULL; ++ ++ token = strdup(spec); ++ if (!token) ++ return NULL; ++ ++ /* We have to return an allocated string */ ++ if (!(cp = strchr(token, '='))) ++ return token; ++ ++ value = token + (cp - token); ++ *value++ = '\0'; ++ ++ if (*value == '"' || *value == '\'') { ++ char c = *value++; ++ if (!(cp = strrchr(value, c))) ++ goto errout; /* missing closing quote */ ++ *cp = '\0'; ++ } ++ ++ if (!strcmp(token,"LABEL")) { ++ nspec = mount_get_devname_by_label(value); ++ if (nspec && verbose > 1) ++ printf(_("mount: going to mount %s by LABEL\n"), spec); ++ } else if (!strcmp(token,"UUID")) { ++ nspec = mount_get_devname_by_uuid(value); ++ if (nspec && verbose > 1) ++ printf(_("mount: going to mount %s by UUID\n"), spec); ++ } ++ ++ free(token); ++ ++ errout: ++ return nspec; ++} ++ ++#endif +--- mount/mount_guess_fstype.h ++++ mount/mount_guess_fstype.h +@@ -8,8 +8,8 @@ struct mountargs { + + extern int verbose; + +-char *guess_fstype(const char *device); +-char *do_guess_fstype(const char *device); ++const char *guess_fstype(const char *device); ++const char *do_guess_fstype(const char *device); + int procfsloop(int (*mount_fn)(struct mountargs *), struct mountargs *args, + const char **type); + int is_in_procfs(const char *fstype); + diff --git a/util-linux-losetup-Add-support-for-setting-logical-blocksize.patch b/util-linux-losetup-Add-support-for-setting-logical-blocksize.patch deleted file mode 100644 index e0710b6..0000000 --- a/util-linux-losetup-Add-support-for-setting-logical-blocksize.patch +++ /dev/null @@ -1,156 +0,0 @@ -From a60cc5c2eeaad7ea5ea0c4a74cc4af5e2dc3f6c2 Mon Sep 17 00:00:00 2001 -From: Ruediger Meier -Date: Tue, 4 Apr 2017 16:29:58 +0200 -Subject: [PATCH] - util-linux-losetup-Add-support-for-setting-logical-blocksize.patch - -Signed-off-by: Ruediger Meier ---- - include/loopdev.h | 5 ++++- - lib/loopdev.c | 20 ++++++++++++++++++++ - sys-utils/losetup.c | 19 +++++++++++++++---- - 3 files changed, 39 insertions(+), 5 deletions(-) - -diff --git a/include/loopdev.h b/include/loopdev.h -index 953d2db..7c783bf 100644 ---- a/include/loopdev.h -+++ b/include/loopdev.h -@@ -41,6 +41,7 @@ enum { - LO_FLAGS_AUTOCLEAR = 4, /* kernel >= 2.6.25 */ - LO_FLAGS_PARTSCAN = 8, /* kernel >= 3.2 */ - LO_FLAGS_DIRECT_IO = 16, /* kernel >= 4.2 */ -+ LO_FLAGS_BLOCKSIZE = 32, /* Tentative */ - }; - - #define LO_NAME_SIZE 64 -@@ -120,7 +121,8 @@ enum { - LOOPDEV_FL_NOIOCTL = (1 << 6), - LOOPDEV_FL_DEVSUBDIR = (1 << 7), - LOOPDEV_FL_CONTROL = (1 << 8), /* system with /dev/loop-control */ -- LOOPDEV_FL_SIZELIMIT = (1 << 9) -+ LOOPDEV_FL_SIZELIMIT = (1 << 9), -+ LOOPDEV_FL_BLOCKSIZE = (1 << 10) - }; - - /* -@@ -173,6 +175,7 @@ int loopcxt_set_offset(struct loopdev_cxt *lc, uint64_t offset); - int loopcxt_set_sizelimit(struct loopdev_cxt *lc, uint64_t sizelimit); - int loopcxt_set_flags(struct loopdev_cxt *lc, uint32_t flags); - int loopcxt_set_backing_file(struct loopdev_cxt *lc, const char *filename); -+int loopcxt_set_blocksize(struct loopdev_cxt *lc, uint64_t blocksize); - - extern char *loopcxt_get_backing_file(struct loopdev_cxt *lc); - extern int loopcxt_get_backing_devno(struct loopdev_cxt *lc, dev_t *devno); -diff --git a/lib/loopdev.c b/lib/loopdev.c -index fd4f166..b85e2ce 100644 ---- a/lib/loopdev.c -+++ b/lib/loopdev.c -@@ -1115,6 +1115,26 @@ int loopcxt_set_backing_file(struct loopdev_cxt *lc, const char *filename) - } - - /* -+ * @lc: context -+ * @blocksize: logical blocksize for the device -+ * -+ * The setting is removed by loopcxt_set_device() loopcxt_next()! -+ * -+ * Returns: 0 on success, <0 on error. -+ */ -+int loopcxt_set_blocksize(struct loopdev_cxt *lc, uint64_t blocksize) -+{ -+ if (!lc) -+ return -EINVAL; -+ -+ lc->info.lo_init[0] = blocksize; -+ lc->info.lo_flags |= LO_FLAGS_BLOCKSIZE; -+ -+ DBG(CXT, ul_debugobj(lc, "set blocksize=%llu", (long long unsigned int)lc->info.lo_init[0])); -+ return 0; -+} -+ -+/* - * In kernels prior to v3.9, if the offset or sizelimit options - * are used, the block device's size won't be synced automatically. - * blockdev --getsize64 and filesystems will use the backing -diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c -index 2218d3b..d8f1bfa 100644 ---- a/sys-utils/losetup.c -+++ b/sys-utils/losetup.c -@@ -399,6 +399,7 @@ static void usage(FILE *out) - fputs(USAGE_SEPARATOR, out); - fputs(_(" -o, --offset start at offset into file\n"), out); - fputs(_(" --sizelimit device is limited to bytes of the file\n"), out); -+ fputs(_(" --logical-blocksize set the logical block size to \n"), out); - fputs(_(" -P, --partscan create a partitioned loop device\n"), out); - fputs(_(" -r, --read-only set up a read-only loop device\n"), out); - fputs(_(" --direct-io[=] open backing file with O_DIRECT\n"), out); -@@ -448,7 +449,8 @@ static void warn_size(const char *filename, uint64_t size) - - static int create_loop(struct loopdev_cxt *lc, - int nooverlap, int lo_flags, int flags, -- const char *file, uint64_t offset, uint64_t sizelimit) -+ const char *file, uint64_t offset, uint64_t sizelimit, -+ uint64_t blocksize) - { - int hasdev = loopcxt_has_device(lc); - int rc = 0; -@@ -534,6 +536,8 @@ static int create_loop(struct loopdev_cxt *lc, - loopcxt_set_offset(lc, offset); - if (flags & LOOPDEV_FL_SIZELIMIT) - loopcxt_set_sizelimit(lc, sizelimit); -+ if (flags & LOOPDEV_FL_BLOCKSIZE) -+ loopcxt_set_blocksize(lc, blocksize); - if (lo_flags) - loopcxt_set_flags(lc, lo_flags); - if ((rc = loopcxt_set_backing_file(lc, file))) { -@@ -562,7 +566,7 @@ int main(int argc, char **argv) - struct loopdev_cxt lc; - int act = 0, flags = 0, no_overlap = 0, c; - char *file = NULL; -- uint64_t offset = 0, sizelimit = 0; -+ uint64_t offset = 0, sizelimit = 0, blocksize = 0; - int res = 0, showdev = 0, lo_flags = 0; - char *outarg = NULL; - int list = 0; -@@ -572,7 +576,8 @@ int main(int argc, char **argv) - OPT_SIZELIMIT = CHAR_MAX + 1, - OPT_SHOW, - OPT_RAW, -- OPT_DIO -+ OPT_DIO, -+ OPT_BLOCKSIZE, - }; - static const struct option longopts[] = { - { "all", no_argument, NULL, 'a' }, -@@ -585,6 +590,7 @@ int main(int argc, char **argv) - { "associated", required_argument, NULL, 'j' }, - { "json", no_argument, NULL, 'J' }, - { "list", no_argument, NULL, 'l' }, -+ { "logical-blocksize", required_argument, NULL, OPT_BLOCKSIZE }, - { "noheadings", no_argument, NULL, 'n' }, - { "offset", required_argument, NULL, 'o' }, - { "output", required_argument, NULL, 'O' }, -@@ -658,6 +664,10 @@ int main(int argc, char **argv) - act = A_SHOW; - file = optarg; - break; -+ case OPT_BLOCKSIZE: -+ blocksize = strtosize_or_err(optarg, _("failed to parse logical block size")); -+ flags |= LOOPDEV_FL_BLOCKSIZE; -+ break; - case 'l': - list = 1; - break; -@@ -790,7 +800,8 @@ int main(int argc, char **argv) - - switch (act) { - case A_CREATE: -- res = create_loop(&lc, no_overlap, lo_flags, flags, file, offset, sizelimit); -+ res = create_loop(&lc, no_overlap, lo_flags, flags, file, offset, -+ sizelimit, blocksize); - if (res == 0) { - if (showdev) - printf("%s\n", loopcxt_get_device(&lc)); --- -1.8.5.6 - diff --git a/util-linux-lscpu-cleanup-DMI-detection-return-codes.patch b/util-linux-lscpu-cleanup-DMI-detection-return-codes.patch deleted file mode 100644 index 13c00b5..0000000 --- a/util-linux-lscpu-cleanup-DMI-detection-return-codes.patch +++ /dev/null @@ -1,85 +0,0 @@ -From c972852b29391c35b1d5c7d3e1e6413e0cc86908 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 13 Jun 2017 12:15:11 +0200 -Subject: [PATCH] lscpu: cleanup DMI detection return codes - -Michal wrote: - There is weird mix of logic in lscpu-dmi.c which sometimes returns 0 and - sometimes -1 on error. Since most checks are if (rc) goto done; this - bails out early on error skipping some detection methods. Further, in - lscpu.c all following detections are guarder by if(hyper) so returning - -1 causes all following methods to be skipped. - -Reported-by: Michal Suchanek -Signed-off-by: Karel Zak ---- - sys-utils/lscpu-dmi.c | 21 +++++++++++++-------- - 1 file changed, 13 insertions(+), 8 deletions(-) - -diff --git a/sys-utils/lscpu-dmi.c b/sys-utils/lscpu-dmi.c -index 3ba999124a2e..4b845b97ccd9 100644 ---- a/sys-utils/lscpu-dmi.c -+++ b/sys-utils/lscpu-dmi.c -@@ -174,7 +174,7 @@ done: - static int hypervisor_decode_legacy(uint8_t *buf, const char *devmem) - { - if (!checksum(buf, 0x0F)) -- return HYPER_NONE; -+ return -1; - - return hypervisor_from_dmi_table(DWORD(buf + 0x08), WORD(buf + 0x06), - WORD(buf + 0x0C), -@@ -254,11 +254,15 @@ int read_hypervisor_dmi(void) - || sizeof(uint16_t) != 2 - || sizeof(uint32_t) != 4 - || '\0' != 0) -- return rc; -+ goto done; - -+ /* -1 : no DMI in /sys, -+ * 0 : DMI exist, nothing detected (HYPER_NONE) -+ * >0 : hypervisor detected -+ */ - rc = hypervisor_decode_sysfw(); -- if (rc >= 0) -- return rc; -+ if (rc >= HYPER_NONE) -+ goto done; - - /* First try EFI (ia64, Intel-based Mac) */ - switch (address_from_efi(&fp)) { -@@ -273,8 +277,9 @@ int read_hypervisor_dmi(void) - goto done; - - rc = hypervisor_decode_smbios(buf, _PATH_DEV_MEM); -- if (rc) -+ if (rc >= HYPER_NONE) - goto done; -+ - free(buf); - buf = NULL; - memory_scan: -@@ -287,17 +292,17 @@ memory_scan: - for (fp = 0; fp <= 0xFFF0; fp += 16) { - if (memcmp(buf + fp, "_SM_", 4) == 0 && fp <= 0xFFE0) { - rc = hypervisor_decode_smbios(buf + fp, _PATH_DEV_MEM); -- if (rc == -1) -+ if (rc < 0) - fp += 16; - - } else if (memcmp(buf + fp, "_DMI_", 5) == 0) - rc = hypervisor_decode_legacy(buf + fp, _PATH_DEV_MEM); - -- if (rc >= 0) -+ if (rc >= HYPER_NONE) - break; - } - #endif - done: - free(buf); -- return rc; -+ return rc < 0 ? HYPER_NONE : rc; - } --- -2.12.3 - diff --git a/util-linux-nfs-timeo.diff b/util-linux-nfs-timeo.diff new file mode 100644 index 0000000..2f41dec --- /dev/null +++ b/util-linux-nfs-timeo.diff @@ -0,0 +1,11 @@ +--- util-linux-2.12q/mount/nfsmount.c ++++ util-linux-2.12q/mount/nfsmount.c +@@ -489,7 +489,7 @@ + + /* Adjust options if none specified */ + if (!data.timeo) +- data.timeo = tcp ? 70 : 7; ++ data.timeo = tcp ? 600 : 7; + + #ifdef NFS_MOUNT_DEBUG + printf("rsize = %d, wsize = %d, timeo = %d, retrans = %d\n", diff --git a/util-linux-nfs.8.diff b/util-linux-nfs.8.diff new file mode 100644 index 0000000..9ee6e65 --- /dev/null +++ b/util-linux-nfs.8.diff @@ -0,0 +1,11 @@ +--- util-linux-2.12q/mount/nfs.5 ++++ util-linux-2.12q/mount/nfs.5 +@@ -141,7 +141,7 @@ + Use an alternate RPC version number to contact the + NFS daemon on the remote host. This option is useful + for hosts that can run multiple NFS servers. +-The default value is version 2. ++The default value is version 3. + .TP 1.5i + .I nolock + Disable NFS locking. Do not start lockd. diff --git a/util-linux-nodiratime.diff b/util-linux-nodiratime.diff new file mode 100644 index 0000000..798b02d --- /dev/null +++ b/util-linux-nodiratime.diff @@ -0,0 +1,14 @@ +Index: util-linux-2.12/mount/mount.8 +=================================================================== +--- util-linux-2.12.orig/mount/mount.8 ++++ util-linux-2.12/mount/mount.8 +@@ -572,6 +572,9 @@ until the network has been enabled on th + Do not update inode access times on this file system (e.g, for faster + access on the news spool to speed up news servers). + .TP ++.B nodiratime ++Do not update directory inode access times on this filesystem. ++.TP + .B noauto + Can only be mounted explicitly (i.e., the + .B \-a diff --git a/util-linux-opt-hotplug.diff b/util-linux-opt-hotplug.diff new file mode 100644 index 0000000..ee5ed40 --- /dev/null +++ b/util-linux-opt-hotplug.diff @@ -0,0 +1,88 @@ + mount/mount.8 | 7 +++++++ + mount/mount.c | 15 +++++++++++++-- + mount/mount_constants.h | 3 +++ + 3 files changed, 23 insertions(+), 2 deletions(-) + +Index: util-linux-2.12r/mount/mount.8 +=================================================================== +--- util-linux-2.12r.orig/mount/mount.8 ++++ util-linux-2.12r/mount/mount.8 +@@ -572,6 +572,10 @@ This option implies the options + (unless overridden by subsequent options, as in the option line + .BR group,dev,suid ). + .TP ++.B hotplug ++Do not report errors for this device if it doesn't exist. ++.BR fcntl (2). ++.TP + .B mand + Allow mandatory locks on this filesystem. See + .BR fcntl (2). +@@ -599,6 +603,9 @@ Do not allow direct execution of any bin + (Until recently it was possible to run binaries anyway using a command like + /lib/ld*.so /mnt/binary. This trick fails since Linux 2.4.25 / 2.6.0.) + .TP ++.B nohotplug ++Report an error if the device does not exist. ++.TP + .B nomand + Do not allow mandatory locks on this filesystem. + .TP +Index: util-linux-2.12r/mount/mount.c +=================================================================== +--- util-linux-2.12r.orig/mount/mount.c ++++ util-linux-2.12r/mount/mount.c +@@ -162,9 +162,14 @@ static const struct opt_map opt_map[] = + { "diratime", 0, 1, MS_NODIRATIME }, /* Update dir access times */ + { "nodiratime", 0, 0, MS_NODIRATIME },/* Do not update dir access times */ + #endif ++#ifdef MS_HOTPLUG ++ { "hotplug", 0, 0, MS_HOTPLUG }, /* Don't fail if ENOENT on dev */ ++#endif + { NULL, 0, 0, 0 } + }; + ++static int option_hotplug; /* can not invent our own MS_FLAGS */ ++ + static const char *opt_loopdev, *opt_vfstype, + *opt_speed, *opt_comment; + +@@ -265,6 +270,10 @@ parse_opt(const char *opt, int *mask, ch + + for (om = opt_map; om->opt != NULL; om++) + if (streq (opt, om->opt)) { ++ if (om->mask & MS_HOTPLUG) { ++ option_hotplug = 1; ++ return; ++ } + if (om->inv) + *mask &= ~om->mask; + else +@@ -958,9 +967,11 @@ nosigblock: + else if (stat (node, &statbuf)) + error (_("mount: mount point %s is a symbolic link to nowhere"), + node); +- else if (stat (spec, &statbuf)) ++ else if (stat (spec, &statbuf)) { ++ if (option_hotplug) ++ goto out; + error (_("mount: special device %s does not exist"), spec); +- else { ++ } else { + errno = mnt_err; + perror("mount"); + } +Index: util-linux-2.12r/mount/mount_constants.h +=================================================================== +--- util-linux-2.12r.orig/mount/mount_constants.h ++++ util-linux-2.12r/mount/mount_constants.h +@@ -57,6 +57,9 @@ if we have a stack or plain mount - moun + #ifndef MS_VERBOSE + #define MS_VERBOSE 0x8000 /* 32768 */ + #endif ++ ++#define MS_HOTPLUG (1<<18) /* Don't fail if ENOENT on the dev, mount internal */ ++ + /* + * Magic mount flag number. Had to be or-ed to the flag values. + */ diff --git a/util-linux-rpmlintrc b/util-linux-rpmlintrc deleted file mode 100644 index 676746b..0000000 --- a/util-linux-rpmlintrc +++ /dev/null @@ -1,14 +0,0 @@ -addFilter("init-script-without-%stop_on_removal-preun /etc/init.d/raw") -addFilter("init-script-without-%restart_on_update-postun /etc/init.d/raw") -addFilter("incoherent-init-script-name raw") -addFilter("no-reload-entry /etc/init.d/raw") -# There is no egrep(1) used -> False positive -addFilter("deprecated-grep") -# Both pam configs for su and su-l are marked as noreplace -addFilter(".*W:.*files-duplicate.*/pam/su.*/pam.d/su-l.*") -# Useless warning as the /usr/bin variants are known -addFilter(".*W:.*permissions-symlink.*/bin/su.*") -addFilter(".*W:.*permissions-symlink.*/bin/umount.*") -addFilter(".*W:.*permissions-symlink.*/bin/mount.*") -# UGLY HACK: rpmlint falsely declares problems with files-attr-not-set -addFilter("W: files-attr-not-set") diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes deleted file mode 100644 index ba8d776..0000000 --- a/util-linux-systemd.changes +++ /dev/null @@ -1,4582 +0,0 @@ -------------------------------------------------------------------- -Mon Jul 3 12:38:36 UTC 2017 - schwab@suse.de - -- Make sure group tty is defined - -------------------------------------------------------------------- -Sun Jun 11 12:12:44 UTC 2017 - lnussel@suse.de - -- don't conflict with sysvinit-tools in Tumblweed anymore. Needed for Leap 15 - which wants to use a different release number scheme (lp150.x which produces - lower numbers than the conflict). - -------------------------------------------------------------------- -Thu Jun 8 21:21:12 UTC 2017 - sweet_f_a@gmx.de - -- Update to version 2.30: - * Many changes and improvements, most notably: - * The libblkid library has been improved for hybrid CDROM/DVD - media. - * The deprecated command tailf has been removed. Use "tail -f" - from coreutils. - * blkzone -- NEW COMMAND to run zone commands on block devices - that support Zoned Block Commands (ZBC) or Zoned-device ATA - Commands (ZAC). - * fincore -- NEW COMMAND to count pages of file contents in - core (memory). - * lsmem -- NEW COMMAND to list the ranges of available memory - with their online status. - * The command fallocate -- supports an "insert range" operation - now. - * The command "column -t|--table" has been modified to use - libsmartcols. It now provides nearly all of that library's - functionality from the command line. - * Security issues: - * hwclock - no longer makes any internal permission checks. The - System Administrator must set proper permissions to control - user access to the RTC. It is NOT recommended to use SUID. - * CVE-2016-2779 - This security issue is NOT FIXED yet. - * More details at: - https://www.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30-ReleaseNotes -- Drop upstreamed patch - arm64-lscpu-use-sysfs-for-table-access-if-available.patch -- Refreshed patch - util-linux-losetup-Add-support-for-setting-logical-blocksize.patch -- fix compiler warnings for mkzimage_cmdline - -------------------------------------------------------------------- -Thu Jun 8 16:28:41 UTC 2017 - msuchanek@suse.com - -- When when hypervisor_decode_sysfw fails continue with other - detection methods (bsc#1042991, bsc#1039360, bsc#1033718) - + util-linux-lscpu-cleanup-DMI-detection-return-codes.patch - -------------------------------------------------------------------- -Wed Apr 12 09:19:21 UTC 2017 - agraf@suse.com - -- Prefer sysfs exported SMBIOS3 tables in lscu (bsc#1033718) - + arm64-lscpu-use-sysfs-for-table-access-if-available.patch - -------------------------------------------------------------------- -Thu Apr 6 17:35:34 CEST 2017 - sbrabec@suse.com - -- To cover release numbers of both SLE12 SP3 and Leap 42.3, relax - release based conflict with bash-completion from 13.1 to 10. - -------------------------------------------------------------------- -Tue Apr 4 14:51:09 UTC 2017 - sweet_f_a@gmx.de - -- fix util-linux-losetup-Add-support-for-setting-logical-blocksize.patch - --logical-blocksize was behaving like --nooverlap - -------------------------------------------------------------------- -Fri Mar 17 17:18:28 CET 2017 - sbrabec@suse.com - -- Conflict with old systemd-presets-branding to ensure correct - preset migration (boo#1029775, bsc#1012850). - -------------------------------------------------------------------- -Thu Mar 16 22:44:12 CET 2017 - sbrabec@suse.com - -- Drop "codepage" fstab migration needed for SuSE Linux < 9.1 - (bsc#51950 (suse#36950)). - -------------------------------------------------------------------- -Tue Feb 28 17:27:58 CET 2017 - sbrabec@suse.com - -- Keep dependency on insserv and fillup for compatibilitiy reasons - in Leap 42.3. Too many poorly written packages depend on it. - (Marked as "sysv compatibility hack".) - -------------------------------------------------------------------- -Wed Feb 22 22:00:05 UTC 2017 - sweet_f_a@gmx.de - -- Update to version 2.29.2: - * su(1) security issue CVE-2017-2616 (bsc#1023041) - * minor bugfixes and enhancements - -------------------------------------------------------------------- -Fri Feb 10 10:40:23 UTC 2017 - fbui@suse.com - -- presets are managed by the branding presets package (bsc#1012850) - - The default activation state is defined by the branding preset - package. - - This also get rid of the only use of the rpm preset macros so we can - kill them. - -------------------------------------------------------------------- -Wed Feb 8 18:16:22 CET 2017 - sbrabec@suse.com - -- Merge SLE12 SP3 changes to make the package compatible with - Tumbleweed, SLE12 SP3 and Leap 42.3. -- Drop patch tests-script-race-on-force-only.patch from SLE12 SP3 - and Leap 42.3. Upstream has a different workaround. - https://github.com/karelzak/util-linux/issues/296 -- INCOMPATIBLE CHANGE for SLE12 SP3 and Leap 42.3: - losetup -L changes its meaning from SLE12 SP1&SP2 specific - --logical-blocksize to the upstream --nooverlap). - --logical-blocksize can be used only with long option - (bsc#966891). -- Include SLE12 + Leap 42 exclusive feature, implemented by - hare@suse.de: - * losetup: Add support for setting logical blocksizes - (bsc#931634, FATE#319010) - + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch - SLE12 & Leap 42 specific changes: - * Fix for SLE12: bsc#956540, SLE12 SP1: bsc#953691, Leap 42.1: - boo#954482, was obsoleted by the systemd update, and skipped. - * Remove --enable-ncurses that is intended to force non-wide - ncurses (boo#978993). - * Make release-dependent conflict with old sysvinit-tools SLE - specific, as it is required only for SLE 11 upgrade, - and breaks openSUSE staging builds (boo#994399). - * Obsolete these patches, now upstreamed: - * Drop upstreamed patches - (tests-script-race-on-force-only.patch, - util-linux-libmount-ignore-redundant-slashes.patch, - util-linux-sfdisk-show-pt-geometry-1.patch, - util-linux-sfdisk-show-pt-geometry-2.patch, - util-linux-sfdisk-show-pt-geometry-3.patch, - util-linux-libblkid-partition-loop.patch, - util-linux-libblkid-wipe-offset.patch, - util-linux-mount-reuse-loop-1.patch, - util-linux-mount-reuse-loop-2.patch, - util-linux-mount-reuse-loop-3.patch, - util-linux-mount-reuse-loop-4.patch, - util-linux-loop-reuse-01.patch, util-linux-loop-reuse-02.patch, - util-linux-loop-reuse-03.patch, util-linux-loop-reuse-04.patch, - util-linux-loop-reuse-05.patch, util-linux-loop-reuse-06.patch, - util-linux-loop-reuse-07.patch, util-linux-loop-reuse-08.patch, - util-linux-loop-reuse-09.patch, util-linux-loop-reuse-10.patch, - util-linux-loop-reuse-12.patch, util-linux-loop-reuse-13.patch, - util-linux-loop-reuse-14.patch, util-linux-loop-reuse-15.patch, - util-linux-loop-reuse-16.patch, util-linux-loop-reuse-17.patch, - util-linux-loop-reuse-18.patch, util-linux-loop-reuse-19.patch, - util-linux-loop-reuse-20.patch, - util-linux-libmount-cifs-is_mounted.patch). - * Refreshed patches - (make-sure-sbin-resp-usr-sbin-are-in-PATH.diff, - util-linux-losetup-Add-support-for-setting-logical-blocksize.patch). - -------------------------------------------------------------------- -Tue Feb 7 20:07:55 CET 2017 - sbrabec@suse.com - -- Update to version 2.29.1: - * lscpu: add aarch64 specific names - * lubmount: Disable disable ro/rw mtab checks (bsc#1012632) - * More details at: - https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29.1-ReleaseNotes - -------------------------------------------------------------------- -Tue Feb 7 18:31:04 CET 2017 - sbrabec@suse.com - -- Replace raw initscript by a systemd service doing the same thing. - Based on previous work of fcrozat@suse.com (FATE#321122). - -------------------------------------------------------------------- -Thu Jan 5 12:34:33 UTC 2017 - sweet_f_a@gmx.de - -- don't install bash-completions for uninstalled binaries (chfn, - chsh, newgrp, pg) -- for now remove procps dependency which is only needed for tests - because it pulls systemd - -------------------------------------------------------------------- -Thu Dec 15 09:26:01 UTC 2016 - fbui@suse.com - -- Replace pkgconfig(libsystemd-*) with pkgconfig(libsystemd) - - libsystemd-* libs were deprecated and are gone now. - -------------------------------------------------------------------- -Wed Dec 7 16:12:55 CET 2016 - sbrabec@suse.com - -- Remove no more supported --enable-libmount-force-mountinfo. - There is --enable-libmount-support-mtab, disabled by default, - exactly as we need. - -------------------------------------------------------------------- -Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de - -- Update to version 2.29 (FATE#322090) - * cal: possible to specify month by name (e.g. "cal January - 2017") and use relative placeholders (cal "+1 month") - * fdisk(8) allows to wipe newly created partitions; the feature - is possible to control by new command line option - --wipe-partitions[==auto|never|default]. - * findmnt --verify: the command scans /etc/fstab and tries to - verify the configuration. - * mount(8) now rejects requests to create another device and - mount filesystem for the same backing file. The command - `losetup --nooverlap` reuses loop device if already exists - for the same backing file. All the functionality calculate - with offset and sizelimit options of course, so it's fine to - have multiple regions (partitions) in the same image file and - mount all of them in the same time. The restriction is that - the regions should not overlap. - * lscpu supports the "drawer" topology for IBM S/390. - * sfdisk: Support for deprecated --show-pt-geometry (bsc#990531). - * libmount: various issues with cifs mount - (bsc#982331, bsc#987176). - * libblkid: Prevent infinite loop DoS while parsing DOS partition - tables (bsc#988361, CVE-2016-5011). - * More details at: - http://karelzak.blogspot.de/2016/10/util-linux-v229-whats-new.html - https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes -- refresh make-sure-sbin-resp-usr-sbin-are-in-PATH.diff - -------------------------------------------------------------------- -Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de - -- Update to version 2.28.2, bugfix release, see - https://www.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes - -------------------------------------------------------------------- -Thu Aug 11 13:24:34 UTC 2016 - sweet_f_a@gmx.de - -- Update to version 2.28.1, bugfix release, see - https://www.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes -- Remove util-linux-libblkid-wipe-offset.patch (upstream) -- use the new configure option --enable-libuuid-force-uuidd - instead of sed'ing configure.ac - -------------------------------------------------------------------- -Thu Aug 11 10:21:35 UTC 2016 - olaf@aepfle.de - -- Install klogconsole with read permissions (bnc#990837) - -------------------------------------------------------------------- -Mon Jul 11 07:29:18 UTC 2016 - dimstar@opensuse.org - -- BuildIgnore util-linux: it's part of VMInstall, hence part of - every package build. util-linux itself can be built without its - own presence though. Helps with some rare bootstrap issues (when - librtas changes soname for example). -- Drop usage of gpg-offline: this has long been migrated to a - source service that checks signatures on checkin already (osc - service lr source_validatory). - -------------------------------------------------------------------- -Mon Jun 13 11:37:33 UTC 2016 - dimstar@opensuse.org - -- Do not BuildRequires bash-completion: this is tempting, but it - pulls bash-completion and its entire dependency stack into Ring0, - which is inacceptable. Pass the correct path - (%{_datdir}/bash-completion/completions) via - --with-bashcompletiondir to configure. - -------------------------------------------------------------------- -Thu May 19 14:29:27 CEST 2016 - sbrabec@suse.com - -- blkid: Wipe corect area for probes with offset (bsc#976141, - util-linux-libblkid-wipe-offset.patch). - -------------------------------------------------------------------- -Tue Apr 26 18:24:40 CEST 2016 - sbrabec@suse.com - -- Remove incorrect --with-bashcompletiondir that breaks - bash-completion, use path in bash-completion.pc instead - (boo#977259). - -------------------------------------------------------------------- -Fri Apr 22 16:41:34 CEST 2016 - sbrabec@suse.com - -- Add librtas-devel to BuildRequires on Power platforms. Needed for - proper function of lscpu (bsc#975082). - -------------------------------------------------------------------- -Wed Apr 13 21:29:00 UTC 2016 - sweet_f_a@gmx.de - -- fix build for openSUSE >= 13.1 (inclusive SLE 12) -- drop build for openSUSE < 13.1 -- remove old build conditions: sysvinit_tools, enable_su and - enable_eject -- cosmetics: reorder configure options - -------------------------------------------------------------------- -Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de - -- Update to version 2.28 (bsc#974301): - * Many changes and improvements, most notably: - * Now cfdisk, sfdisk and fdisk wipe all filesystem and RAID - signatures when creating a new disk label in interactive - mode. See --wipe[=auto|never|always]. - * lsns -- this NEW COMMAND lists information about all - currently accessible namespaces or about the given namespace. - * The command sfdisk supports new operations --delete, - --move-data and --reorder. - * The command blkdiscard supports a new option --zeroout to - zero-fill rather than discard a specified area. - * The command cal supports a new option --span to span the date - when displaying multiple months. - * The command chrt supports the DEADLINE scheduling class and - the new options --sched-runtime --sched-period and - --sched-deadline. - * The command logger supports RFC 5424 structured data through - the new options --sd-id and --sd-param. - * The command losetup supports a new option --direct-io. - * The command lsblk allows to sort output by unprinted columns. - * The command mount applies the nofail mount option to - ENOMEDIUM errors. - * The commands nsenter and unshare support a new option - --cgroup for work with cgroups namespaces (CLONE_NEWCGROUP). - * The library libmount has been improved to properly detect - already mounted btrfs subvolumes (bsc#947494, bsc#972684). - * The library libsmartcols has been massively improved to print - table ranges, multi-line cells, table titles and to support - continuous printing. - * The package build system and code have been improved to be - more portable to non-Linux systems (BSD, OSX). - * The package does not provide fallback solutions for - openat-family functions anymore. - * The python binding for libsmartcols is available in separate - project at https://github.com/ignatenkobrain/python-smartcols - * Other bug fixes (bsc#970404, bsc#975082, FATE#318444). - * Security issue: CVE-2016-2779 is NOT FIXED yet. -- Remove old util-linux-noenc-suse.patch - -------------------------------------------------------------------- -Tue Dec 1 10:27:17 UTC 2015 - sweet_f_a@gmx.de - -- enable last binary - -------------------------------------------------------------------- -Wed Nov 11 15:46:46 UTC 2015 - sweet_f_a@gmx.de - -- Update to version 2.27.1, bugfix release, see - https://www.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes - (fixes bsc#950778, FATE#320552). - -------------------------------------------------------------------- -Wed Nov 11 11:25:25 UTC 2015 - schwab@suse.de - -- Change condition for known fail markers from test for armv6 and aarch64 - architecture to test for qemu user-space build - -------------------------------------------------------------------- -Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com - -- Update to version 2.27: - * Many changes and improvements, most notably: - * lsipc: new command - * unshare provides a new option --propagation= - * mount(8) supports read-only binds in one (not atomic) step by - "bind,ro". - * GNU readline support in fdisk and sfdisk. - * JSON support in libsmartcols and findmnt, losetup, lsblk, - lslocks, sfdisk and lsipc. - * script has been massively improved to be more robust and less - complex (bsc#888678, bsc#930236). - * sulogin supports locked root accounts by --force - (bsc#968733, bsc#963399). - * colors support by default. It is possible to change this - with --disable-colors-default. - * more information in cfdisk - * fdisk provides new commands 'F' and 'i' - * cal supports the new options --twelve and --months - * rtcwake supports a news option --list-modes and --date, no - support RTC_ALM_READ and RTC_ALM_SET fallbacks any more. - * Many fixes, most notably: - * fsck: now supports -r {fd} (bsc#923777, bsc#903738) - * Fix fsck -C {fd} parsing (bsc#923777, bsc#903738) - * better handling of multi-path devices - (bsc#880468, bsc#924994) - * flock: improve timeout handling (bsc#926945) - * lsblk: display mountpoint even for top-level device - (bsc#943415) - * colcrt: fix buffer overflow (bsc#949754, CVE-2015-5218) - -------------------------------------------------------------------- -Wed Aug 19 21:18:11 CEST 2015 - sbrabec@suse.com - -- Add licenses. - -------------------------------------------------------------------- -Tue Aug 4 20:31:55 CEST 2015 - sbrabec@suse.com - -- Add %systemd_preset_pre and %systemd_preset_posttrans that will - do one shot presetting of uuidd.service on upgrade. - (bnc#900935#c46, FATE#318949, FATE#317727). -- Remove one shot presetting hacks. - -------------------------------------------------------------------- -Mon May 25 16:26:01 UTC 2015 - crrodriguez@opensuse.org - -- Build with --enable-libmount-force-mountinfo the rationale is - identical to the following commit message --> http://bit.ly/1eqf5GO - The default behaviour is undesirable and fragile when using - systemd. - -------------------------------------------------------------------- -Fri May 1 11:30:09 UTC 2015 - sweet_f_a@gmx.de - -- Update to util-linux-2.26.2: - * many fixes, most notable for logger, *fdisks and mount - * (lib)mount, add support for MS_LAZYTIME -- disable libmount/lock test to avoid random timeouts -- socat is needed for logger tests - -------------------------------------------------------------------- -Fri Mar 13 15:57:56 UTC 2015 - sweet_f_a@gmx.de - -- Update to util-linux-2.26.1: - * cal(1): do not segfault when TERM is not defined or wrong - (bnc#903440) - * logger(1): major fixes and enhancements - * agetty(8): support /usr/lib/os-release too - * some more fixes, mostly minor ones, see ReleaseNotes -- re-enable fixed tests (fdisk/bsd, ppc64le) - -------------------------------------------------------------------- -Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz - -- Update to util-linux-2.26: - * based on the git master branch of util-linux, remove backported - patches (util-linux-libblkid-unsafe-chars.patch, - util-linux-libblkid-overflow.patch) - * zramctl(8): this NEW COMMAND allows to control /dev/zramN - devices - * agetty(8): supports new option --reload to force already - running agetty processes to reprint the /etc/issue file - * cfdisk(8), sfdisk(8) and fdisk(8): support sfdisk-compatible - scripts; it's possible to save your partitioning layout to text - files and (re)use it in all fdisks - * fdisk(8), sfdisk(8): support new command-line option "--output - " to specify output columns for --list or print commands, - do not abort when fdisk -l when device cannot be opened - [bnc#886790], [bnc#893712], [bnc#890351] - * nsenter(1): has been updated to work with the latest kernel - changes in user namespaces supports new command-line option - --preserve-credentials - * unshare(1): has been updated to work with the latest kernel - changes in user namespaces supports new command-line option - "--setgroups=" - * swapon(8): supports new command-line option "-o " with - the same semantics as -o for mount(8); it's now possible to - specify swap options on the command line by the same string as - in fstab - * fdformat(8): supports new command-line options --from and --to - to specify tracks and --repair for broken floppies - * getopt(1): has been updated to the latest version (originally - maintained outside of util-linux) and refactored - * ldattach(8): has been improved to support GSM0710 and intro - modem commands - * logger(1): supports new command-line option --id= to specify - PID (or another ID) allows to specify --rfc3164 or --rfc5424 - syslog protocols - * lscpu: recognizes Unisys s-Par as hypervisor (FATE#318231) - * libfdisk: the library is distributed as a shared library with a - stable API and a standard header file - * libmount: provides a new simple API to monitor mount-table - changes (including changes in userspace mount options) - * libmount: Fix mount point lookup (and mount -a) if the path - contains // (bsc#931955). -- Fix lack of I18N support in util-linux-systemd (mis-compilation). - -------------------------------------------------------------------- -Sun Feb 22 17:15:41 UTC 2015 - crrodriguez@opensuse.org - -- Build with FULL RELRO. - -------------------------------------------------------------------- -Tue Feb 10 15:26:55 UTC 2015 - sweet_f_a@gmx.de - -- define upstream source for klogconsole to remove patches - * klogconsole-quiet.patch - * klogconsole.diff -- remove openSUSE 13.1 specific eject permissions, did not worked - anyway since eject-fpie.patch was removed -- always call autoreconf, not only for splitted packages, skip - autopoint (gettext) - -------------------------------------------------------------------- -Fri Feb 6 17:01:02 UTC 2015 - dimstar@opensuse.org - -- Do not try to unregister an info file (ipc.info.gz) which we do - not own. Already in May 2011, we stopped registering it: "do not - register ipc.info.gz (not provided by this package)". - -------------------------------------------------------------------- -Wed Feb 4 19:08:43 CET 2015 - sbrabec@suse.cz - -- libblkid: care about unsafe chars and possible buffer overflow - in cache (CVE-2014-9114, util-linux-libblkid-unsafe-chars.patch, - util-linux-libblkid-overflow.patch, bsc#907434) - -------------------------------------------------------------------- -Thu Jan 29 14:13:41 UTC 2015 - sweet_f_a@gmx.de - -- Update to version 2.25.2: mostly minor fixes - (including boo#908742) -- re-enable utmpdump and ipcs tests for all archs - -------------------------------------------------------------------- -Thu Jan 15 17:15:47 UTC 2015 - schwab@linux-m68k.org - -- Use util-linux:/bin/logger as split-provide, - /usr/lib/systemd/system/fstrim.service didn't exist in 13.1 - -------------------------------------------------------------------- -Sat Jan 10 02:24:25 UTC 2015 - jengelh@inai.de - -- Remove pam_securetty.so from /etc/pam.d/login. By definition, - local logins are always secure. Remote logins actually use - /etc/pam.d/remote by way of `/bin/login -h` (such as rlogind). - This solves the problem that root logins are erroneously rejected - when using kmscon(8) or `machinectl login`, because they use - ptys. - -------------------------------------------------------------------- -Tue Nov 11 10:57:12 UTC 2014 - schwab@suse.de - -- Remove known fail marker for fdisk/bsd on ppc, ppc64, s390, s390x - -------------------------------------------------------------------- -Fri Oct 17 21:18:43 CEST 2014 - sbrabec@suse.cz - -- Fix mis-compilation of libuuid without uuidd support - (bnc#900935). -- Fix uuidd socket activation (bnc#900935). -- Remove obsolete sysvinit script for uuidd. -- Remove no more needed uuidd permissions stuff. -- Replace PreReq for obsolete pwdutils by names of binaries. -- Add fstrim service scripts and rcfstrim helper. - -------------------------------------------------------------------- -Mon Sep 8 21:04:34 CEST 2014 - sbrabec@suse.cz - -- Install runuser and runuser-l PAM file - (runuser.pamd, bnc#892079, bnc#894833). - -------------------------------------------------------------------- -Wed Sep 3 16:21:57 CEST 2014 - sbrabec@suse.cz - -- Update to version 2.25.1: - * bug fixes (removed util-linux-bash-completion-blockdev.patch, - util-linux-slash-in-format-string.patch) - * translation updates - * correct support for plurals - * gpt: use real sector size to set PTMAGIC_OFFSET - * gpt: add Microsoft Storage Spaces GUID - * libmount: use -t for type.subtype in helpers API - * erase all traces of the long-obsolete xiafs - -------------------------------------------------------------------- -Tue Aug 26 12:15:02 UTC 2014 - schwab@suse.de - -- Always mark ipcs/limits and misc/setarch as known failure - -------------------------------------------------------------------- -Tue Aug 26 07:43:16 UTC 2014 - pgajdos@suse.com - -- fix parsing of slash in the format string [bnc#889934] (internal) -- added patches: - * util-linux-slash-in-format-string.patch - -------------------------------------------------------------------- -Thu Aug 21 18:34:59 CEST 2014 - sbrabec@suse.cz - -- Remove hacks for format_spec_file and source_validator - (bnc#891152, bnc#891829). -- Use macro defined summary that passes both SLE and openSUSE - check-in QA scripts (invented by Ruediger Oertel). - -------------------------------------------------------------------- -Fri Aug 8 22:17:29 CEST 2014 - sbrabec@suse.cz - -- Update to version 2.25 - (using work of Ruediger Meier ): - * based on the git master branch of util-linux - * many fixes (including bnc#869355, bnc#871951 and - bnc#871698#c49) - * new Python binding sub-package for libmount: python-libmount - * new library: libsmartcols - * new commands: lslogins, setpriv - * add fstrim systemd timer - * better systemd integration - * DROPPED command: - * cytune: Upstream decided to remove tool untested for years - that supports this old hardware. -- Dropped patches included in the upstream: - (*git) Included with no changes - (+git) Included with improvements - (!git) Included with differences - * support-other-tty-lines-not-vconsole.patch (*b9c7390) - * agetty-fooled-on-serial-line-due-plymouth.patch, - * sulogin-fooled-on-tty-line-due-plymouth.patch (*bb280f7) - * agetty-on-s390-on-dev-3270-tty1-line.patch (*f2bcda5) - * sulogin-does-not-find-any-console.patch (*624b204) - * util-linux-setarch-uname26.patch (*f6eb160) - * util-linux-ng-2.16-squashfs3-detect.patch (*11402f5) - * util-linux-lscpu-improve-hypervisor-detection.patch - (!b774473, b32488c, 5bd31c6, 0f0c558, 96ce475) - WARNING, INCOMPATIBLE CHANGE: "lscpu -p" no more reports - hypervisor, as it breaks standard behavior. Use standard output - instead! (FATE#310255) - * blkid-stop-scanning-on-I-O-error.patch (+296d96e) - * blkid-convert-superblocks-to-new-calling-convention.patch - (+37f4060) - * util-linux-libblkid-ext-probe.patch (*a1ca32f) - * util-linux-hwclock-drift-check.patch (*f196fd1) - * util-linux-hwclock-adjtime-check.patch (*db8fc5f) -- Dropped obsolete patch: - * util-linux-2.23.1-eject-fpie.patch (eject is no more SUID) - * util-linux-2.24-fdisk_remove_bogus_warnings.patch - (upstream fixed it in a different way) - * util-linux-HACK-boot.localfs.diff - (MOUNT_PRINT_SOURCE is no more referenced) -- Ported and renamed: - * util-linux-2.23.1-noenc-suse.diff - -> util-linux-noenc-suse.patch -- Split spec file to three stages: - * util-linux.spec: Everything that do not need python or systemd. - * util-linux-systemd.spec: Stuff that needs systemd: - util-linux-systemd and uuidd - NOTE: Not building systemd-less variants of utilities. - * python-libmount.spec: Just python-libmount -- Move bash-completion files to correct packages. -- Add patch util-linux-bash-completion-blockdev.patch. -- Add hacks to prevent damaging of spec files by format_spec_file - (bnc#891152, also edited util-linux-rpmlintrc). - -------------------------------------------------------------------- -Sat Jul 26 11:44:57 UTC 2014 - dimstar@opensuse.org - -- Really fix devel-static requires (libblkid-devel-static). - -------------------------------------------------------------------- -Sat Jul 26 09:39:30 UTC 2014 - coolo@suse.com - -- fix requires of devel-static packages - -------------------------------------------------------------------- -Thu Jul 24 18:45:53 CEST 2014 - dsterba@suse.cz - -- enable build of libmount-devel-static, libuuid-devel-static and - libblkid-devel-static - -------------------------------------------------------------------- -Tue May 27 21:17:40 UTC 2014 - sweet_f_a@gmx.de - -- use nologin from upstream (was added in 2.24) -- remove unknown configure options -- remove unused and outdated suse READMEs -- require bc for checks - -------------------------------------------------------------------- -Fri May 16 15:10:53 UTC 2014 - sweet_f_a@gmx.de - -- Prevent excessive clock drift calculations (bnc#871698, - util-linux-prevent-excessive-clock-drift-calculations.patch), - committed by sbrabec@suse.cz - -------------------------------------------------------------------- -Thu May 8 08:15:04 UTC 2014 - werner@suse.de - -- Modify patch support-other-tty-lines-not-vconsole.patch to - make it work on virtual console -- Modify patch agetty-on-s390-on-dev-3270-tty1-line.patch - to add the missed 3270 support upstream - -------------------------------------------------------------------- -Wed May 7 14:12:32 UTC 2014 - werner@suse.de - -- Add patch support-other-tty-lines-not-vconsole.patch - to be able to support console lines like xvc and hvc - -------------------------------------------------------------------- -Thu Apr 24 11:33:36 UTC 2014 - sweet_f_a@gmx.de - -- Update to util-linux-2.24.2: - addpart: - * minor man page improvements - blockdev: - * Some minor corrections to the manual - build-sys: - * don't connect _DEPENDENCIES and _LIBADD - * fix .h.in usage in libblkid and libmount - * libmount/python/__init__.py is always a dist file - chcpu: - * cleanup return codes - * cleanup stdout/stderr usage - delpart: - * minor man page improvements - dmesg: - * -w output not line-buffered - * don't report EPIPE - docs: - * update AUTHORS file - fallocate: - * Clarify that space can also be deallocated - fdformat: - * Some minor change to the manual - fdisk: - * don't colorize "foo " prefixes - flock: - * use nfs4 fallback on EBADF too - fsck: - * Some typographical corrections to the manual - fsck.minix: - * A few typographical corrections to the manual - fstrim: - * add hint to man page - getopt: - * getopt.1 The usual doc dir is /usr/share/doc, not .../docs - hwclock: - * fix possible hang and other set_hardware_clock_exact() issues - include/closestream: - * don't wipe errno on EPIPE - ipcs: - * cleanup jumplabel stlyes - * fix ipc_msg_get_info fallback case - * fix ipc_sem_get_info fallback case - * fix ipc_shm_get_info fallback case - * fix memleak in ipc_*_get_info functions - isosize: - * A few typographical changes to the manual - last: - * fix minor typos in the man page - lib/sysfs: - * make dirent d_type usage more robust - libblkid: - * add extra checks to XFS prober - libfdisk: - * fix logical partition reorder command - * make qsort_r() optional - * properly implement read-only mode - libmount: - * FS id and parent ID could be zero - * accept (deleted) path suffix in mountinfo file - * initialize *root to NULL in mnt_table_get_root_fs - login: - * fix minor typos in the man page - losetup: - * wait for udev - lscpu: - * cleanup, use _PATH_SYS_CPU/NODE - * don't abort if cache size is unknown - * don't assume filesystem supports d_type when searching for NUMA nodes - * read_hypervisor_dmi only fallback to memory scan on x86/x86_64 - mkfs: - * Some typographical changes to the manual - mkfs.bfs: - * One typographical correction to the manual - mkfs.cramfs: - * Some typographical corrections to the manual - mkfs.minix: - * Some typographical changes in the manual - mkswap: - * Some minor typographical corrections to the manual - more: - * improve formatting and wording of man page and help text - mount: - * apply "nofail" to MNT_ERR_NOSOURCE libmount error - * fix --all and nofail return code - * mount.8 Some typographical and prefix corrections to the manual - * remove obsolete and confusing statement from mount.8 - * update mount.8 about barrier mount options defaults - nologin: - * minor man page improvements - nsenter: - * fix set{gid,uid} order,drop supplementary groups - partx: - * Improve the typesetting of the manual - * make dirent d_type usage more robust - po: - * merge changes - * update cs.po (from translationproject.org) - * update da.po (from translationproject.org) - * update de.po (from translationproject.org) - raw: - * Improve the typesetting of the manual - renice: - * correct max priority in renice man page - runuser: - * fix minor typos in the man page - script: - * Also flush writes to timing file. - * time from end of read() call partially fixes #58 - scriptreplay: - * no need to skip first time value or last bytes fixes #58 - setarch: - * Fix ppc64le architectures - setpriv: - * Fix --apparmor-profile - su: - * don't use kill(0, ...) when propagate signal - * fix minor typos in the man page - sulogin: - * minor man page improvements - swaplabel: - * Improve the typesetting of the manual - * wrong version number in check - switch_root: - * make dirent d_type usage more robust - * verify initramfs by f_type, not devno - tests: - * add fdisk 'f' command MBR test - * add lscpu dump for ppc cpu with no cache size - * clean up backport - * cleanup, remove unused lscpu output - * update Py parse mountinfo test - * update libmount tabdiff tests - * use old output format - umount: - * fix typo in usage - * more robust success message for --all - unshare: - * include libmount.h to provide missing MS_* defines - utmpdump: - * minor man page improvements - vipw: - * minor man page improvements -- remove tty3270-on-serial-line-of-s390.patch (was already upstream - since 2.24.1) -- remove barrier_documentation.patch (applied upstream) -- rebase blkid-convert-superblocks-to-new-calling-convention.patch - -------------------------------------------------------------------- -Thu Apr 17 22:43:31 CEST 2014 - sbrabec@suse.cz - -- Enable socket activation needed by systemd service (bnc#872807). - -------------------------------------------------------------------- -Fri Apr 11 16:45:03 CEST 2014 - sbrabec@suse.cz - -- libblkid: Drop the broken ext2/ext3/ext4 discrimination logic - (util-linux-libblkid-ext-probe.patch, bnc#864703). - -------------------------------------------------------------------- -Fri Apr 11 16:27:11 CEST 2014 - hare@suse.de - -- Abort blkid probing on I/O errors (bnc#859062, - blkid-stop-scanning-on-I-O-error.patch, - blkid-convert-superblocks-to-new-calling-convention.patch, - http://www.spinics.net/lists/util-linux-ng/msg08976.html) - -------------------------------------------------------------------- -Tue Apr 1 18:49:26 UTC 2014 - sweet_f_a@gmx.de - -- remove unnecessarily added patches from SLE11: - * util-linux-update-default-commit-interval.patch, openSUSE has - never changed the default and neither will SLE12 - * sfdisk-warn-about-2TB-limit.patch, fixed by upstream years ago - * umount-avoid-readlink.patch, this patch only affects unused - code and the used code does not have this bug -- edit util-linux-lscpu-improve-hypervisor-detection.patch to not - change the default behaviour of "lscpu -p" as documented in it's - man page. Now this patch only affects the summary output. - -------------------------------------------------------------------- -Mon Mar 17 22:36:58 CET 2014 - sbrabec@suse.cz - -- Merge fixes and features from SLE11 (bnc#831868): - * Detect squashfs version <= 3 as squashfs3 and version >= 4 as - squashfs. (mszeredi@suse.cz, - util-linux-ng-2.16-squashfs3-detect.patch, bnc#666893) - * add sfdisk-warn-about-2TB-limit.patch (puzel@novell.com, - bnc#495657) - * Document barrier option in mount.8 (jack@suse.cz, - hvogel@suse.de, - util-linux-ng-2.19.1-barrier_documentation.patch, bnc#489740) - * lscpu: improve hypervisor detection (puzel@novell.com, - fate#310255) - - util-linux-lscpu-improve-hypervisor-detection.patch - * umount: avoid calling readlink on mountpoints if not necessary - - add: umount-avoid-readlink.patch (puzel@suse.com, bnc#794529) - * fix file conflict between util-linux and s390-32 - (puzel@suse.com, bnc#805684) - * util-linux-update-default-commit-interval.patch: - mount(8): update default commit interval (puzel@suse.com, - bnc#809480) - * Obsolete no more packaged uuid-runtime. -- Add uname26 (util-linux-setarch-uname26.patch, FATE#313476). - -------------------------------------------------------------------- -Thu Mar 6 09:43:34 UTC 2014 - werner@suse.de - -- Modify the patches - agetty-fooled-on-serial-line-due-plymouth.patch - sulogin-fooled-on-tty-line-due-plymouth.patch - to be able to disable plymouth if not already terminated due to - a hanging network service (bnc#866860) - -------------------------------------------------------------------- -Sun Feb 9 21:20:31 UTC 2014 - andreas.stieger@gmx.de - -- util-linux 2.24.1 -- agetty: - * support the special terminal on first serial line on a S/390 -- blkdiscard: - * BLKSSZGET fills in an int, not a uint64 -- blkid: - * escape quotes in the output - * simple typo -- blockdev: - * don't use HDIO_GETGEO -- build-sys: - * add --with-smack to config-gen.d - * fstrim depends on libmount -- chsh, chfn: - * add info about non-local support to the man pages -- dmesg: - * fix --raw zero timestamp for kmsg -- docs: - * add patching process to howto-contribute.txt - * update AUTHORS file - * update links to http //git.kernel.org/ web repository views - -fdisk: - * don't care about partition type - * fix printf stuff - * fix usage(), -l [] -- flock: - * Change the 'exit status' man page section to make more sense -- fsck: - * add ext4 to list of filesystems with progress bars in fsck man page -- fstrim: - * add --all to discard all filesystem - * cleanup usage() -- lib/path: - * add path_strdup() -- libblkid: - * (nilfs2) check also backup superblock - * detect alone PMBR - * fix memory leak in blkid_parse_tag_string() - * fix swap-area version -- libfdisk: - * (dos) be more verbose when change bootable flag - * (dos) fix free part counter - * (dos) warn on type 0 - * (gpt) add /home GUID - * (gpt) improve and cleanup recovery code - * (gpt) recover from corrupted primary/backup PT - * (sgi) generate partname according to partition position - * (sun) fix end sectors with +1 error -- libmount: - * add efivarfs to the list of pseudo filesystems - * add mnt_tag_is_valid() - * cleanup fix_optstr() regards to selinux and smack - * fix typo in smack path - * remove smackfs* option when SMACK not enabled -- lsblk: - * fix -D segfault -- lscpu: - * sort NUMA nodes to keep output human readable - * support discontinuous NUMA nodes - * support non sequentially numbering of CPUs -- man: - * Syntax and spelling fixes -- mkfs.minix: - * fix fscanf() format string [coverity scan] -- mkswap: - * fix compiler warning [-Wunused-variable] - * remove cruft from the man page -- mount: - * add note about "noauto" to --all description - * correct mount man page default iso9660 permission - * fix man mount page type - * improve -s man mage info - * make NAME=value tags usable for non-root - * mount.8 fix grammar - * update man page ext3/4 mount options -- partx: - * fix --update ranges and out of order tables -- po: - * merge changes - * update da.po (from translationproject.org) - * update de.po (from translationproject.org) - * update pt_BR.po (from translationproject.org) - * update zh_CN.po (from translationproject.org) -- pylibmount: - * correctly import from pylibmount.so - * import directly from pylibmount in tests - * remove unncessary subdirectory -- script: - * don't call TIOCGWINSZ in signal handler - * restore errno in signal handler - * use poll() rather then O_NONBLOCK -- setpriv: - * simplify usage() -- setterm: - * fix -dump man page info -- sulogin: - * use dirent->d_type when scans /dev -- taskset: - * fix PERMISSIONS section of taskset man page -- tests: - * update blkid swap tests - * update build-sys tests - * update lscpu tests -- textual: - * small inprovements to usage and man page of fstrim -- umount: - * fix umount by tag for non-roots -- unshare: - * add more hints about mount namespaces to the man page -- wipefs: - * call BLKRRPART when erase partition table -- removed patches: - * blkdiscard-BLKSSZGET-fills-in-an-int.patch, applied upstream -- modified patches: - * tty3270-on-serial-line-of-s390.patch, one hunk applied - upstream - ------------------------------------------------------------------- -Fri Feb 7 15:59:20 UTC 2014 - werner@suse.de - -- Add patch sulogin-does-not-find-any-console.patch to enable sulogin - to find suitable console device even if first is not usable (bnc#862078) - -------------------------------------------------------------------- -Thu Feb 6 10:03:30 UTC 2014 - werner@suse.de - -- Avoid that hanging plymouth locks terminal lines that is - add patch sulogin-fooled-on-tty-line-due-plymouth.patch and - modify patch agetty-fooled-on-serial-line-due-plymouth.patch - to remove any lock which had been left over. - -------------------------------------------------------------------- -Tue Feb 4 10:24:02 UTC 2014 - werner@suse.de - -- Modify patch agetty-on-s390-on-dev--3270-tty1-line.patch and - patch tty3270-on-serial-line-of-s390.patch to handle 3270 - terminals -- Really do not verify /usr/bin/eject - -------------------------------------------------------------------- -Mon Feb 3 16:16:36 UTC 2014 - werner@suse.de - -- Add patch agetty-on-s390-on-dev--3270-tty1-line.patch - to let agetty detect /dev/3270/tty1 as device not as baud rate - -------------------------------------------------------------------- -Tue Jan 28 09:37:57 UTC 2014 - speilicke@suse.com - -- Don't verify /usr/bin/eject, it lost the SUID bit and was dropped - from /etc/permissions (bnc#824406) - -------------------------------------------------------------------- -Thu Jan 23 12:40:06 UTC 2014 - werner@suse.de - -- Change patch agetty-fooled-on-serial-line-due-plymouth.patch - to sleep instead of sending breaks to terminal (bnc#774126). - -------------------------------------------------------------------- -Mon Jan 13 10:45:54 CET 2014 - fcrozat@suse.com - -- Ensure localstatedir value used by configure is /run (changed to that - value upstream since 2012). - -------------------------------------------------------------------- -Fri Jan 10 13:08:45 UTC 2014 - werner@suse.de - -- Add patch - agetty-fooled-on-serial-line-due-plymouth.patch - even with TTYReset=no it seems with systemd or plymouth the termios - flags become changed from under the first agetty on a serial system - console as the flags are locked (bnc#774126). - -------------------------------------------------------------------- -Tue Dec 10 16:10:27 UTC 2013 - sweet_f_a@gmx.de - -- Update to util-linux-2.24 - + Release highlights (2.24) - fdisk(8): - * the code has been completely refactored and moved to libfdisk - (the library does not have a stable API yet) - * user interface has been unified for all label types and it - supports colors - * GPT disk UUID, partition UUID and partition name modification - is supported now - pylibmount: - * this new library provides PYTHON BINDINGS for libmount; - use --with-python[=2|3] to enable the bindings - last(1) and lastb(1): - * the NEW IMPLEMENTATION has been merged from sysvinit to - util-linux and extended; now it supports command line options - --present, --since, and --time-format - * use --enable-deprecated-last to enable the old util-linux - last(1) implementation - swapon(8): - * the option --discard= and fstab mount option discard= allow - to explicitly specify 'pages' or 'once' discard policy. If no - policy is selected, the default behavior is to enable both. - See swapon.8 man page for more details. - libblkid and blkid(8): - * supports LOGUUID= for external logs (e.g. extN and XFS) - * generates a pseudo PARTUUID= for MBR partitions (based on MBR - Id, Linux kernel supports the same concept for root= command - line option) - agetty(8): - * supportes new issue file \S escape code to read information - from /etc/os-release - * the option -L allows to completely control CLOCAL flag - dmesg(1): - * supports new command line option --time-format to specify - time format - * supports new iso-8601 time format - hexdump(1): - * supports long options now - wall(1): - * the command is compatible with sysvinit implementation now - logger(1): - * supports new command line option --prio-prefix when logging - stdin - lscpu(1): - * allows to detect more hypervisor types and provides info - about Max and Min CPU Mhz - unshare(8): - * supports new command line options --fork and --mount-proc for - pid namespaces - wipefs(8): - * now wipes superblocks with incorrect checksums too - * supports new command line option --backup to backup erased - data to $HOME/wipefs--.bak - nologin(8): - * this command has been merged into util-linux, the command - politely refuses a login. -- Removed following patches now upstream - * eject-scsi-check-host_status-and-driver_status.patch - * more-fix-buffer-overflow.patch - * more-check-for-buffer-size-when-write-multibyte-char.patch - * more-guarantee-space-for-multibyte.patch -- Removed following patch because now pkg-config does that - * fdisk-tinfo.patch -- Refreshed following patches with updating version string - * util-linux-2.23.1-fdisk_remove_bogus_warnings.patch -- Added enable_last condition in case we don't want to use the last - binary from sysvinit-tools in future -- Upstream moved getopt examples from datadir to docdir but we keep - the old location because we would need to fix the manpage first. - -------------------------------------------------------------------- -Fri Nov 29 13:46:21 UTC 2013 - werner@suse.de - -- Add patch - tty3270-on-serial-line-of-s390.patch - to better support the first and second serial line on s390/x - -------------------------------------------------------------------- -Sun Nov 3 12:53:34 UTC 2013 - schwab@linux-m68k.org - -- blkdiscard-BLKSSZGET-fills-in-an-int.patch: Fix type mismatch in - blkdiscard - -------------------------------------------------------------------- -Fri Oct 25 18:52:01 CEST 2013 - sbrabec@suse.cz - -- Drop SUID flag for eject (bnc#824406). - -------------------------------------------------------------------- -Wed Oct 9 10:00:55 UTC 2013 - schwab@suse.de - -- No *fdisk on m68k - -------------------------------------------------------------------- -Wed Oct 2 18:55:22 CEST 2013 - sbrabec@suse.cz - -- Safely migrate su config files from coreutils to util-linux - (bnc#814626#c18). - -------------------------------------------------------------------- -Fri Sep 27 21:58:03 UTC 2013 - mgorse@suse.com - -- Add more-check-for-buffer-size-when-write-multibyte-char.patch and - more-guarantee-space-for-multibyte.patch -- check for buffer space with - multi-byte chars (BNC#829720). - -------------------------------------------------------------------- -Fri Sep 27 16:58:40 UTC 2013 - mgorse@suse.com - -- Add more-fix-buffer-overflow.patch (bnc#829720). - -------------------------------------------------------------------- -Fri Sep 13 07:06:19 UTC 2013 - werner@suse.de - -- Avoid build require gpg-offline twice - -------------------------------------------------------------------- -Wed Sep 11 20:54:24 CEST 2013 - sbrabec@suse.cz - -- Update to version 2.23.2: - nsenter(1): - * this NEW COMMAND provides command line interface to setns() - Linux syscall and allows to run program with namespaces of - other processes - unshare(1): - * supports new PID and USER namespaces - fdisk(8): - * provides experimental support for GUID Partition Table (GPT), - the implementation is still not complete and some (unimportant) - features are missing. - * ~50% of fdisk code has been refactored, this task is going to - be complete in the next release. The goal is to have libfdisk - shared between all fdisks. - partx(8): - * supports new "update" command (implemented by - BLKPG_RESIZE_PARTITION ioctl) - mount(8): - * supports new userspace mount option x-mount.mkdir[=] to - create mountpoints on demand - * the support for propagation flags has been improved, now the - flags could be specified in /etc/fstab and used together with - regular mount options. It's also possible to specify more - propagation flags together. This EXPERIMENTAL feature is - implemented by additional mount(2) syscalls, because Linux does - not allow to use propagation flags with another options or more - flags together. - umount(8): - * supports new command line option --recursive to recursively - unmount all sub-mounts for the specified mountpoint * supports - new command line option --all-targets to unmount all - mountpoints in the current namespace for the specified - filesystem * the options --recursive and --all-targets could be - used together - dmesg(1): - * supports new command line options --color, --human and - --nopager, the --human option enables relative times, colors and - pager support. - su(1): - * supports new command line options --group and --supp-group to - specify primary and supplementary groups - chfn(1) and chsh(1): - * the commands could be linked with libuser to support non-local - accounts modification (e.g. LDAP, etc). - kill(1): - * the command has been improved to be compatible with procps - version, the procps version is deprecated now, the util-linux - version is enabled by default. - blkdiscard(8): - * this NEW COMMAND discard sectors on a device (for example on - SSD disks) - sulogin(8): - * provides multi-console feature from SysVinit - findmnt(8): - * provides new columns FREQ, PASSNO, ID, OPT-FIELDS, PROPAGATION - lslocks(8): - * provides new column BLOCKER and detects blocked locks - lsblk(8): - * supports new command line option --scsi and new columns HCTL, - TRANsport VENDOR and REVision - swapon(8) and losetup(8): - * the commands prints basic overview by default if no option - specified - column(1): - * supports new command line option --output-separator to specify - table output delimiter - rename(1): - * supports new command line option --symlink to rename symlink - target - hwclock(8): - * supports new command line option --compare to periodically - compare the Hardware Clock to the System Time (based on - adjtimex -c) - ipcs(1): - * supports new command line options --bytes and --human - wipefs(1): - * supports new command line option --force to force erase on used - devices -- Removed upstreamed patches (mkfs.bfs_cleanup_64bit.patch-Patch, - mkfs.bfs_cleanup_endian.patch) - -------------------------------------------------------------------- -Mon Jul 1 13:43:23 UTC 2013 - mail@bernhard-voelker.de - -- Correct condition for Conflicts of sysvinit-tools. - -------------------------------------------------------------------- -Mon Jul 1 07:08:46 UTC 2013 - werner@suse.de - -- Correct version in source URL path. - -------------------------------------------------------------------- -Fri Jun 28 17:42:14 CEST 2013 - sbrabec@suse.cz - -- Fix Provides and Obsoletes of eject. -- Conflict with old coreutils and sysvinit-tools with conflicting - files to guarantee seamless upgrade. -- Remove Provides and Obsoletes of packages that do not exist since - SuSE Linux 8. -- Include upstreamed patch from SUSE eject package: - Check eject host_status and driver_status when using SG_IO - (eject-scsi-check-host_status-and-driver_status.patch, - bnc#358033). - -------------------------------------------------------------------- -Wed Jun 19 10:58:17 UTC 2013 - coolo@suse.com - -- rely on systemd-rpm-macros instead of the full thing - -------------------------------------------------------------------- -Wed Jun 12 21:02:28 UTC 2013 - mail@bernhard-voelker.de - -- util-linux.spec: remove previously added "moving-su-trickery" again - as a su-less coreutils packet is in Base:Build and Factory now. - -------------------------------------------------------------------- -Fri Jun 7 00:13:25 UTC 2013 - mail@bernhard-voelker.de - -- util-linux.spec: work around su(1) PAM problems based on su(1) - being provided by both the coreutils and the util-linux package. - Fix macro typo in %post and %verifyscript sections related to su(1): - s/sysvinit_tools/enable_su/ - -------------------------------------------------------------------- -Thu Jun 6 08:27:43 UTC 2013 - werner@suse.de - -- Add make-sure-sbin-resp-usr-sbin-are-in-PATH.diff, that is include - the old "let `su' handle /sbin and /usr/sbin in path" -- Provide the new eject utility to avoid file conflict with old - eject package - -------------------------------------------------------------------- -Wed Jun 5 12:30:45 UTC 2013 - werner@suse.de - -- Update to util-linux-2.23.1 - + Release highlights (2.22) - su(1): - * has been merged from coreutils into util-linux - * utils-linux version uses /etc/pam.d/su-l PAM config file for --login - (e.g. "su -") session. - sulogin(8): - * has been merged from sysvinit into util-linux - utmpdump(1): - * has been merged from sysvinit into util-linux - eject(1): - * has been merged from inactive upstream from sf.net and Fedora into util-linux - * supports new options --manualeject, --force and --no-partitions-unmount - lslocks(1) - * this NEW COMMAND prints local system locks and it's replacement to very - long time unmaintained lslk(1) - wdctl(8): - * this NEW COMMAND shows hardware watchdog status - libuuid: - * does NOT EXECUTE uuidd on demand, the daemon has to be started by - init scripts / systemd - uuidd: - * supports socket activation (for systemd) - * supports new options -no-fork, --no-pid and --socket-activation - + Release highlights (2.23) - blkdiscard(8): - * this NEW COMMAND discard sectors on a device (for example on SSD disks) - sulogin(8): - * provides multi-console feature from SysVinit -- Removed following patches now upstream - * 0001-Test-for-secure_getenv-too.patch - * 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch - * add-canonicalize_path_restricted.patch - * fdiskbsdlabel.patch - * libmount-add-MNT_ERR_LOOPDEV.patch - * libmount-add-special-MNT_ERR-codes.patch - * libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch - * login-close-tty-before-vhangup.patch - * mount-new-add-loopdev-specific-error-message.patch - * mount-new-allow-sloppy-for-non-root.patch - * mount-new-improve-error-messages.patch - * mount-new-use-MNT_ERR-for-error-messages.patch - * mount-sanitize-paths-from-non-root-users.patch - * util-linux-2.21.2-noenc.diff - * umount-sanitize-paths-from-non-root-users.patch -- Removed following patch which otherwise cause to break build - * util-linux-2.20-libmount-deps.patch -- Refreshed following patches with updating version string - * util-linux-2.23.1-fdisk_remove_bogus_warnings.patch - * util-linux-2.23.1-noenc-suse.diff -- Add util-linux-2.23.1-eject-fpie.patch to compile and link eject - with PIE - -------------------------------------------------------------------- -Wed May 29 11:45:04 UTC 2013 - ihno@suse.com - -- fixing mkfs.bfs to make it 64bit and endian clean. - adding the patches mkfs.bfs_cleanup_64bit.patch and - mkfs.bfs_cleanup_endian.patch - -------------------------------------------------------------------- -Sun Mar 17 20:39:47 UTC 2013 - jengelh@inai.de - -- Split "which", "time" and "adjtimex" off util-linux - -------------------------------------------------------------------- -Sat Feb 16 17:48:29 UTC 2013 - schwab@suse.de - -- fdiskbsdlabel.patch: - Fix fdisk compilation on aarch64 - -------------------------------------------------------------------- -Tue Feb 5 14:32:49 UTC 2013 - crrodriguez@opensuse.org - -- 0001-Test-for-secure_getenv-too.patch: - Current glibc in 12.3/factory no longer exports internal - function __secure_getenv() but has secure_getenv() instead. - -------------------------------------------------------------------- -Mon Jan 7 13:26:15 UTC 2013 - puzel@suse.com - -- add-canonicalize_path_restricted.patch, - mount-sanitize-paths-from-non-root-users.patch, - umount-sanitize-paths-from-non-root-users.patch: - prevent leaking information about existence of folders - (bnc#797002, CVE-2013-0157) - -------------------------------------------------------------------- -Fri Dec 28 04:30:58 UTC 2012 - crrodriguez@opensuse.org - -- 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch - Use OS byteswapping macros, this patch is functionally identical - to the version submitted upstream with the exception it excludes - code that target non-linux systems. - -------------------------------------------------------------------- -Wed Sep 19 19:41:10 UTC 2012 - jslaby@suse.com - -- login: close tty before vhangup (bnc#778842) - login-close-tty-before-vhangup.patch - -------------------------------------------------------------------- -Fri Jun 22 09:37:20 CEST 2012 - kukuk@suse.de - -- Remove pam_lastlog from login.pamd, login is doing it itself. - [bnc#768067] - -------------------------------------------------------------------- -Wed Jun 20 09:22:50 UTC 2012 - lnussel@suse.de - -- add a hack for boot.localfs to determine the devices to wait for - -------------------------------------------------------------------- -Fri Jun 15 12:57:06 UTC 2012 - puzel@suse.com - -- improve error messages from new mount (bnc#767208) - - backport patches from upstream git: - - mount-new-add-loopdev-specific-error-message.patch - - mount-new-use-MNT_ERR-for-error-messages.patch - - libmount-add-special-MNT_ERR-codes.patch - - mount-new-improve-error-messages.patch - - libmount-add-MNT_ERR_LOOPDEV.patch - -------------------------------------------------------------------- -Fri Jun 15 10:07:26 UTC 2012 - lnussel@suse.de - -- remove encryption options completely as upstream will do that as - well in the next release (bnc#748879). - -------------------------------------------------------------------- -Thu Jun 14 13:04:40 UTC 2012 - puzel@suse.com - -- fix automount with quota (rh#825836) - - mount-new-allow-sloppy-for-non-root.patch -- fix wrong mount options for CIFS mounts (bnc#766157) - - libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch - -------------------------------------------------------------------- -Thu May 31 10:04:23 UTC 2012 - sweet_f_a@gmx.de - -- require binutils-devel because "which" wants to find libiberty.a -- remove which-lib64.patch because it's broken and couldn't find - libiberty.a whithin /usr/lib64 -- which doesn't need autoreconf anymore - -------------------------------------------------------------------- -Tue May 29 09:28:55 UTC 2012 - puzel@suse.com - -- switch to new libmount-based mount(8) - -------------------------------------------------------------------- -Fri May 25 12:12:09 UTC 2012 - puzel@suse.com - -- update to util-linux-2.21.2 - - bugfix release -- drop sfdisk-fix-calculation-due-to-type-mismatch.patch - (fixed upstream) - -------------------------------------------------------------------- -Fri May 25 12:03:07 UTC 2012 - puzel@suse.com - -- build with RPM_OPT_FLAGS again (removed by mistake) - -------------------------------------------------------------------- -Thu Apr 12 09:09:05 UTC 2012 - puzel@suse.com - -- fix miscalculation in sfdisk on ix86 (bnc#754789) - - add sfdisk-fix-calculation-due-to-type-mismatch.patch - -------------------------------------------------------------------- -Sat Mar 31 11:09:38 UTC 2012 - puzel@suse.com - -- update to util-linux-2.21.1 - - bugfix release - -------------------------------------------------------------------- -Fri Mar 16 09:56:21 UTC 2012 - fcrozat@suse.com - -- Fix Obsoletes / Provides for login. - -------------------------------------------------------------------- -Tue Mar 13 16:38:34 CET 2012 - kukuk@suse.de - -- Enable /bin/login and obsolete old fork now merged back - (not moved to /usr/bin until all problems are solved to - avoid that root is not able to login). - -------------------------------------------------------------------- -Tue Mar 6 21:18:56 UTC 2012 - rschweikert@suse.com - -- keep binaries in /usr tree (UsrMerge project) - -------------------------------------------------------------------- -Tue Feb 21 13:46:25 UTC 2012 - puzel@suse.com - -- update to util-linux-2.21 - chcpu(8): - - new command - prlimit(1): - - new command - losetup(8): - - the command has been rewritten, features: - * supports 64bit ioctls only - * losetup -a does not require root permissions - * uses new /dev/loop-control kernel API - * supports new command line option --partscan to enable - kernel partition table parser - agetty(8): - - supports new command line options --nohints to disable hints - about Num, Caps and Scroll Locks - - supports new command line option --remote to add a hostname - to the login(1) command line - dmesg(1): - - supports new command line options --file to read the log from - a file rather than from kernel buffer - fallocate(8): - - supports new command line options --punch-hole to punch holes - in the file - findmnt(8): - - supports alternative location of the fstab file - ipcrm(8): - - supports new command line option --all to remove all resources - lscpu(1): - - supports new command line options --all, --offline and - --online to list all, offline or online CPUs - - supports s390 topology description (polarization, books, ...) - partx(8): - - supports partitioned loop devices - wipefs(8): - - allows to zap partition tables - - supports new command line option "--type " to wipe only - specified filesystems, RAIDs or partition table types - libblkid: - - provides new function blkid_do_wipe() to remove all - signatures from the given block device. -- disable elvtune (works only with 2.4 kernel) -- drop patches which are upstream now: - - drop fsck-use-FS-blacklist-for-non-all-mode-too.patch - - drop util-linux-dmesg-fix-printing-of-multibyte-characters.patch - - libmount-ignore-tailing-slash-in-netfs-source-paths.patch - - libmount-fix-chdir-to-parent-for-restricted-user-umo.patch -- update to adjtimex-1.29 -- use fdupes to symlink duplicate manpages -- disabled make check for time (noop) -- libraries back to %{_libdir}, /usr merge project (by - crrodriguez@opensuse.org) -- drop cryptoloop support (provided by dm-crypt) - - util-linux-2.17.1-mount_losetup_crypto.patch - -------------------------------------------------------------------- -Tue Feb 7 14:48:23 UTC 2012 - jengelh@medozas.de - -- Remove redundant tags/sections - -------------------------------------------------------------------- -Sun Dec 25 22:19:44 UTC 2011 - coolo@suse.com - -- do not call %suse_update_config - -------------------------------------------------------------------- -Mon Nov 21 15:13:56 UTC 2011 - aj@suse.de - -- add fdisk-tinfo.patch to fix build with newer curses. - -------------------------------------------------------------------- -Tue Nov 15 13:15:19 UTC 2011 - coolo@suse.com - -- add libtool as buildrequire to avoid implicit dependency - -------------------------------------------------------------------- -Wed Nov 9 08:27:17 UTC 2011 - puzel@suse.com - -- add libmount-ignore-tailing-slash-in-netfs-source-paths.patch and - libmount-fix-chdir-to-parent-for-restricted-user-umo.patch: - fix umounting network filesystems as plain user (bnc#728480) - -------------------------------------------------------------------- -Tue Nov 8 09:36:41 UTC 2011 - puzel@suse.com - -- add fsck-use-FS-blacklist-for-non-all-mode-too.patch (bnc#728645) - -------------------------------------------------------------------- -Wed Nov 2 09:37:12 UTC 2011 - puzel@suse.com - -- add util-linux-dmesg-fix-printing-of-multibyte-characters.patch - (bnc#725993) - -------------------------------------------------------------------- -Thu Oct 20 13:01:22 UTC 2011 - puzel@suse.com - -- update to util-linux-2.20.1 - - bugfix release -- drop patches (in upstream): - - util-linux-sfdisk-manpage-fix.patch - - util-linux-lib-sysfs-deinit.patch - - fdisk-dont-shorten-long-path-to-disk.patch - -------------------------------------------------------------------- -Wed Oct 12 09:26:40 UTC 2011 - puzel@suse.com - -- add fdisk-dont-shorten-long-path-to-disk.patch (bnc#722959) - -------------------------------------------------------------------- -Tue Oct 4 11:32:11 UTC 2011 - uli@suse.com - -- cross-build fix: use %__cc, %configure macros -- set bindir explicitly when installing -- (cross-?)build fix: disable build dependency on SELINUX_LIBS - in libmount - -------------------------------------------------------------------- -Tue Sep 13 09:10:43 UTC 2011 - puzel@suse.com - -- add util-linux-lib-sysfs-deinit.patch (bnc#714151) - -------------------------------------------------------------------- -Mon Aug 29 14:57:57 UTC 2011 - puzel@suse.com - -- update to util-linux-2.20 - - cleanups, bugfixes -- build with --enable-ddate -- add util-linux-sfdisk-manpage-fix.patch - -------------------------------------------------------------------- -Thu Aug 25 14:12:15 UTC 2011 - rguenther@novell.com - -- BuildIgnore pwdutils. - -------------------------------------------------------------------- -Wed Aug 17 10:37:20 UTC 2011 - puzel@novell.com - -- update to util-linux-2.20-rc2 - - bugfixes -- drop patches: - - util-linux-fix-manpages.patch - - util-linux-wall-build-with-pie.patch - - util-linux-2.20-rc1-agetty-fixes.patch - - util-linux-2.20-rc1-hexdump-segfault.patch - - util-linux-2.20-rc-fix-dmesg.patch - -------------------------------------------------------------------- -Wed Aug 10 13:42:33 UTC 2011 - puzel@novell.com - -- add util-linux-2.20-rc1-hexdump-segfault.patch (bnc#710877) - -------------------------------------------------------------------- -Wed Aug 10 12:20:41 UTC 2011 - puzel@novell.com - -- add util-linux-2.20-rc-fix-dmesg.patch (bnc#710417) - -------------------------------------------------------------------- -Wed Aug 10 11:06:15 UTC 2011 - puzel@novell.com - -- add util-linux-2.20-rc1-agetty-fixes.patch (bnc#711240) - -------------------------------------------------------------------- -Mon Aug 1 13:44:21 UTC 2011 - puzel@novell.com - -- update to util-linux-2.20-rc1 - - Release highlights - agetty(8): - - mingetty features have been merged to agetty - chrt(1), taskset(1): - - supports new command line option "--all-tasks" to set or - retrieve the scheduling attributes of all the tasks (threads) - for a given PID - dmesg(1): - - supports new command line options: --clear, --console-on, - --console-off, --ctime, --decode, --facility=, - --level=, --show-delta, --notime, --kernel and - --userspace - fdisk(8): - - improved dialogs to be more user-friendly - findmnt(8), partx(8), lsblk(8) - - support new command line option "--pairs" to enable - key="value" output format - findmnt(8): - - supports new command line options "--poll" and "--timeout" to - monitor /proc/self/mountinfo changes - ionice(1): - - supports human-readable scheduling class names, for example: - ionice -c best-effort $PID - kill(1): - - supports new command line option "-q " to use - sigqueue(2) - - supports real-time signals in formats RT, RTMIN+ and - RTMAX- - lsblk(8): - - supports new columns - - supports new command line option "-D" to print device discard - topology - lscpu(8): - - improved support for s390 boxes - mkfs.minix: - - supports minix version 3 - simpleinit: - - this set of deprecated utils has been REMOVED - wall(1): - - support new command line option "--timeout" to specify write - timeout to terminals in seconds. -- add util-linux-fix-manpages.patch -- add util-linux-wall-build-with-pie.patch -- package /sbin/rcuuidd - -------------------------------------------------------------------- -Tue May 3 09:39:37 UTC 2011 - puzel@novell.com - -- update to util-linux-2.19.1 - - numerous bugfixes, including (bnc#690486 and bnc#690488) -- drop umount-by-imgname.patch (merged upstream) -- cleanup: do not register ipc.info.gz (not provided by - this package) - -------------------------------------------------------------------- -Thu Apr 14 16:27:27 UTC 2011 - puzel@novell.com - -- merge util-linux-2.17.1-losetup-honor-documented-c-option and - util-linux-2.17.1-mount_losetup_crypto.patch) - -------------------------------------------------------------------- -Mon Feb 21 16:28:38 UTC 2011 - puzel@novell.com - -- add umount-by-imgname.patch (bnc#666161) - -------------------------------------------------------------------- -Thu Feb 10 11:01:40 UTC 2011 - puzel@novell.com - -- update to util-linux-2.19 - - uuid fixes - - cleanups, documentation and translation updates -- drop util-linux-2.19-rc1-loop-offset.diff (fixed in upstream, by - different patch) - -------------------------------------------------------------------- -Wed Jan 26 11:47:55 UTC 2011 - puzel@novell.com - -- update to util-linux-2.19-rc3 - - bugfixes - -------------------------------------------------------------------- -Tue Jan 25 09:29:15 UTC 2011 - lnussel@suse.de - -- don't mess with /etc/mtab in %post. aaa_base does that for us - already. - -------------------------------------------------------------------- -Fri Jan 21 12:34:35 UTC 2011 - lnussel@suse.de - -- fix parsing offset= followed by more options (bnc#666150) - -------------------------------------------------------------------- -Tue Jan 18 09:47:11 UTC 2011 - bwiedemann@novell.com - -- fix bnc#664873 - -------------------------------------------------------------------- -Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com - -- update to util-linux-2.19-rc1 -- important changes: - * lsblk(8): - - this NEW COMMAND lists information about all or selected block - devices in tree-like format. - * partx(8): - - this command has been rewritten to use libblkid for partition - tables parsing. It supports aix, bsd, dos, gpt, mac, minix, - sgi, solaris_x86, sun, ultrix and unixware now. - - supports new command line option "--show" to list partitions in - new format - - prints UUID and name for GPT and mac partitions - * findmnt(8): - - supports new command line option "--submounts" to list all - submounts for selected mountpoint(s) - * agetty(8): - - supports new command line options "-c" and "-s" to reuse - already initialized tty cflags and existing baud rate - * mount(8), umount(8): - - could be linked with libmount (--enable-libmount-mount) to - manage userspace mount options outside /etc/mtab on systems - where the file is a symlink to /proc/mounts. (EXPERIMENTAL, - enabled in openSUSE package) - * losetup(8), mount(8): - - uses /sys/dev/block//loop/backing_file rather than - loopdev ioctls (requires kernel >= 2.6.37) - * fsck(8): - - supports new command line option "-l" to lock whole-disk device - by exclusive flock(2). This option is recommended when more - fsck(8) instances are executed in the same time. - * rtcwake(8): - - supports new mode "show" to print the current RTC alarm time - * fstrim(8): - - this NEW COMMAND allows to discard unused blocks on a mounted - filesystem (wrapper for FITRIM ioctl) - * swapon(8): - - supports new options "discard" and "nofail" - -- in post, replace /etc/mtab with a symlink to /proc/mounts/self -- drop following patches (in upstream) - - util-linux-swapon-btrfs-limitations - - util-linux-agetty-s-option.patch - - util-linux-fsck-l-option.patch - - util-linux-2.18-no-canonicalize-fix.patch - - util-linux-swapon-canonicalize-swap-device.patch -- fix uuidd Summary and Description -- build with --enable-libmount-mount (new option) -- use set_permissions macros -- run spec-cleaner - -------------------------------------------------------------------- -Tue Dec 14 16:11:34 UTC 2010 - puzel@novell.com - -- add util-linux-swapon-canonicalize-swap-device.patch - (bnc#641142) - -------------------------------------------------------------------- -Thu Dec 2 17:09:08 CET 2010 - mszeredi@suse.cz - -- mount: don't canonicalize "spec" with --no-canonicalize option - [bnc#651598] - -------------------------------------------------------------------- -Thu Dec 2 15:23:36 CET 2010 - mszeredi@suse.cz - -- add Provides: util-linux(fake+no-canonicalize) [bnc#651598] - -------------------------------------------------------------------- -Tue Nov 30 12:19:53 UTC 2010 - puzel@novell.com - -- update util-linux-2.17.1-mount_losetup_crypto.patch (bnc#655804) - -------------------------------------------------------------------- -Fri Nov 26 19:10:27 CET 2010 - kay.sievers@novell.com - -- add Provides: fsck-with-dev-lock - -------------------------------------------------------------------- -Thu Nov 25 13:37:43 CET 2010 - kay.sievers@novell.com - -- add 'fsck -l' option needed for systemd - -------------------------------------------------------------------- -Tue Nov 16 16:08:48 UTC 2010 - cristian.rodriguez@opensuse.org - -- disable silent rules - -------------------------------------------------------------------- -Thu Nov 11 10:36:35 CET 2010 - kay.sievers@novell.com - -- add 'agetty' -s option needed for systemd's serial console setup - -------------------------------------------------------------------- -Tue Sep 28 11:42:46 UTC 2010 - aj@suse.de - -- uuidd rc file already creates /var/run/uuidd, mark it as %ghost - in spec file. - -------------------------------------------------------------------- -Fri Jul 9 06:23:27 UTC 2010 - puzel@novell.com - -- update to util-linux-ng-2.18 - - do not provide rdev, ramsize, vidmode and rootflags commands - anymore - - fdisk does not use cylinders as display units by default - - libmount: new library; its API is still officially unstable - - new commands: findmnt, fsfreeze, swaplabel - - blkid: new option "-i" to print I/O limits - - full release notes: - https://www.kernel.org/pub/linux/utils/util-linux/v2.18/v2.18-ReleaseNotes -- update to adjtimex-1.28 -- update to which-2.20 -- drop util-linux-2.14.1-mount_skip_sync.patch (fixed upstream) -- drop util-linux-addpart-use-atoll.patch (fixed upstream) -- drop util-linux-mount-detect-ro-mount.patch (fixed upstream) -- drop adjtimex-1.20-nosyscall.diff (fixed upstream) -- cleanup specfile a bit - -------------------------------------------------------------------- -Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de - -- use %_smp_mflags - -------------------------------------------------------------------- -Thu Jun 24 23:24:41 CEST 2010 - jeffm@suse.de - -- document btrfs limitation with swapfiles (bnc#616617) - -------------------------------------------------------------------- -Tue Jun 22 16:48:29 UTC 2010 - bg@novell.com - -- hppa specific binaries are parisc{,32,64} - -------------------------------------------------------------------- -Tue Jun 1 14:23:23 UTC 2010 - puzel@novell.com - -- do not run uuidd as root, but uuidd:uuidd (bnc#604168) - -------------------------------------------------------------------- -Fri May 28 13:24:43 UTC 2010 - puzel@novell.com - -- add util-linux-mount-detect-ro-mount.patch (bnc#481123) - -------------------------------------------------------------------- -Tue May 11 13:58:49 UTC 2010 - puzel@novell.com - -- add util-linux-addpart-use-atoll.patch (bnc#603328) - -------------------------------------------------------------------- -Tue Apr 6 13:22:37 UTC 2010 - hvogel@novell.com - -- update to version 2.17.2 - - fix small typo in v2.17.1-ReleaseNotes - - fix -b fdisk - - fix typo in ionice - - fix display of device size, fix infinite loop when probe chain - bails out early, more robust minix probing, remove "0x" prefix - from DRBD UUID, reset BLKID_TINY_DEV flag in - blkid_probe_set_device, support alignment_offset=-1 in libblkid - - fix cpuid opcode detection in lscpu - - more explicitly explain fstab usage in mount.8, posix option - of vfat is obsolete, properly ignore comments in - /etc/filesystems in mount - - update ja.po, pl.po, update vi.po - - remove " (deleted)" from filenames from /proc/swaps - - cleanup usage() and man page of wipefs - -------------------------------------------------------------------- -Wed Mar 10 23:11:42 CET 2010 - jeffm@suse.de - -- Properly honor documented -c option (bnc#583677) - -------------------------------------------------------------------- -Tue Mar 2 09:53:04 UTC 2010 - lnussel@suse.de - -- drop freeramdisk (bnc#584565) -- drop hostid (bnc#584562) - -------------------------------------------------------------------- -Tue Feb 23 12:46:07 UTC 2010 - lnussel@suse.de - -- new version 2.17.1 - - new commands: wipefs, unshare, fallocate - - fdisk: DOS-compatible mode marked deprecated - - honor nofail option in fsck - - libblkid overhaul - - lots of bug fixes -- fix self-obsoletes -- compile suid programs using -fpie -- drop -DCONFIG_SMP for s390 as it doesn't seem to be used anyways - -------------------------------------------------------------------- -Sun Dec 13 15:19:16 CET 2009 - jengelh@medozas.de - -- add baselibs.conf as a source - -------------------------------------------------------------------- -Sun Dec 6 15:07:33 CET 2009 - jengelh@medozas.de - -- enabled parallel build - -------------------------------------------------------------------- -Mon Nov 30 17:05:38 CET 2009 - meissner@suse.de - -- exclude sparc correctly -> %sparc bnc#559180 - -------------------------------------------------------------------- -Sun Nov 15 14:04:48 CET 2009 - meissner@suse.de - -- refreshed patches with fuzz=0 - -------------------------------------------------------------------- -Mon Oct 26 17:45:53 UTC 2009 - crrodriguez@opensuse.org - -- fsck during boot up fails with Too many open files [bnc#503008] - -------------------------------------------------------------------- -Tue Oct 20 12:14:24 CEST 2009 - dmueller@suse.de - -- fix typo in baselibs.conf change - -------------------------------------------------------------------- -Tue Oct 13 11:23:07 UTC 2009 - aj@suse.de - -- Fix requires of 32-bit devel packages. - -------------------------------------------------------------------- -Tue Sep 29 12:58:37 UTC 2009 - hvogel@novell.com - -- finaly remove the mount mtab locking patch: - * util-linux-2.14.1-mount_race.patch - It causes too much regressions. - -------------------------------------------------------------------- -Mon Jul 13 14:21:07 CEST 2009 - kay.sievers@novell.com - -- update to final 2.16 release - - fix libdir issues in pkgconfig files - - fix location of uuidd run directory - - improve libuuid handling if uuidd is installed but not setuid -- add blkid.conf file to: - - disable the sequential /dev scanner - - move cache to /dev/.blkid.tab to get file out of /etc - and prevent the cache file to survive a reboot - -------------------------------------------------------------------- -Wed Jul 8 13:14:42 CEST 2009 - meissner@novell.com - -- added baselibs.conf for libblkid* and libuuid* - -------------------------------------------------------------------- -Sun Jun 28 21:36:57 CEST 2009 - kay.sievers@novell.com - -- update to version 2.16 -- switch from libvolume_id to new libblkid -- provide fsck -- provide libblkid -- provide libuuid -- provide setarch -- provide separate uuidd package -- remove patches: - util-linux-2.14.1-lscpu.patch (upstream) - util-linux-2.14.1-lscpu_add_hypervisor_detection.patch (upstream) - util-linux-2.14.1-lscpu_sysroot_option.patch (upstream) - util-linux-2.14.1-sys-utils_lscpu_exit.patch (upstream) - util-linux-2.14.2-schedutils_fix_email.patch (upstream) - util-linux-2.12r-fdisk_cyl.patch (upstream) - util-linux-2.14.1-mount_swap_pagesize.patch (--fixpg option) - util-linux-2.14.2-schedutils_ionice_enosys.patch (-t option) - util-linux-2.14.1-hwclock_adjust_and_hctosys.patch (--systz) - -------------------------------------------------------------------- -Thu Apr 16 14:55:22 CEST 2009 - werner@suse.de - -- Move /usr/sbin/adjtimex to /sbin/adjtimex to be able to check the - kernel time variables even without /usr mounted - -------------------------------------------------------------------- -Mon Feb 16 12:35:00 CET 2009 - mkoenig@suse.de - -- remove util-linux-2.14.1-fdisk_cylinder.patch - fixed upstream - -------------------------------------------------------------------- -Thu Feb 12 17:12:28 CET 2009 - mkoenig@suse.de - -- update to version 2.14.2 - chrt: - * support CFS SCHED_IDLE priority and document it - fdisk: - * cannot create partition with starting beyond 1 TB - * remove obsolete information from man page - hwclock: - * remove "cli" and "sti" from i386 CMOS code - * remove x86_64-specific bogon - losetup: - * add warning about read-only mode - * missing EBUSY error hint message - more: - * minor fixes to magic() - mount: - * add i_version support - * add info about /proc/mounts to mount.1 - * add info about semantics of read-only mount to mount.8 - * add rootcontext= SELinux mount option - * clean up SPEC canonicalization - * create separate section for fs-independent options in mount.8 - * finalize support of quoted LABELs/UUIDs - * mtab created multiple times with -a option - * suggest to use blockdev --setro rather than losetup -- catch ENOSYS in ionice to allow execution in virtualized - environments which don't support ioprio_{get,set} calls [bnc#444637] -- umount: fix suid check for user mounted loop devices [bnc#461732] -- fix doc [bnc#456375] -- remove patches: - util-linux-2.13.1-fdisk_cfdisk_yesno.patch - util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch - util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch - util-linux-2.14.1-fdisk_missing_include.patch - util-linux-2.14.1-mount_loop_ro_fix.patch - -------------------------------------------------------------------- -Sat Feb 7 18:28:58 CET 2009 - schwab@suse.de - -- Fix info dir entry for which. - -------------------------------------------------------------------- -Wed Jan 7 15:42:38 CET 2009 - mkoenig@suse.de - -- fix locking problem for external mount helpers when type - is not given [bnc#459839] - -------------------------------------------------------------------- -Tue Dec 2 12:23:37 CET 2008 - mkoenig@suse.de - -- raw: do not stat the raw devices when binding, since they - are created dynamically [bnc#450675] - -------------------------------------------------------------------- -Thu Nov 27 01:27:19 CET 2008 - dmueller@suse.de - -- mount: fix hang on trying to find a free loop device - if one of them has a stale nfs handle mounted (bnc#449646) - -------------------------------------------------------------------- -Mon Nov 24 15:24:11 CET 2008 - mkoenig@suse.de - -- mount: fix locking patch to not break -n [bnc#447937] - -------------------------------------------------------------------- -Thu Nov 20 18:08:33 CET 2008 - mkoenig@suse.de - -- mount: enhance mount/umount mtab locking and lock the whole - read mtab/syscall/write mtab process to avoid mtab corruption - with highly concurrent mount/umount calls [bnc#444966] -- add arch/powerpc/boot/addnote.c from kernel 2.6.27 - as /usr/bin/chrp-addnote [bnc#443859] -- umount: skip sync() in umount -a if no umount happened [bnc#447036] -- hwclock: allow --adjust and --hctosys simultaneously [bnc#441106] - -------------------------------------------------------------------- -Fri Nov 7 14:50:00 CET 2008 - mkoenig@suse.de - -- fdisk: support +cylinder notation [bnc#441871] -- check for EACCES when using ro fallback when loop mounting - a readonly image -- fix uninitialized variable in swapon pagesize detection - -------------------------------------------------------------------- -Mon Oct 27 17:33:01 CET 2008 - mkoenig@suse.de - -- fdisk: add missing includes [bnc#438670] - -------------------------------------------------------------------- -Thu Oct 23 17:58:28 CEST 2008 - mkoenig@suse.de - -- swapon: add swap pagesize detection [bnc#433028] -- lscpu: fix return code [bnc#437367] -- mkfs.minix: fix device size detection [bnc#437980] -- lscpu: update to most recent version for hypervisor detection - -------------------------------------------------------------------- -Thu Oct 2 11:10:11 CEST 2008 - mkoenig@suse.de - -- add lscpu tool from current util-linux-ng git, - needed for fate#303051 -- replace hypervisor detection tool with the solution blessed by - upstream, which adds hv detection as lscpu feature [fate#303051] - -------------------------------------------------------------------- -Wed Sep 24 11:28:07 CEST 2008 - mkoenig@suse.de - -- add new tool /bin/hypervisor for x86, x86_64 - from Ky Srinivasan - to detect the presence of a hypervisor [fate#303051] - -------------------------------------------------------------------- -Wed Sep 10 15:58:52 CEST 2008 - mkoenig@suse.de - -- update to version 2.14.1 - * fdisk: don't check for GPT when asked for disk size only - * losetup: remove unnecessary minor number check - * rtcwake: prefer RTC_WKALM_SET over RTC_ALM_SET - * scriptreplay: new implementation is out-of-sync - * selinux: is_selinux_enabled() returns 0, 1 and -1 - * umount: improve "-d" option for autoclear loops -- remove patch - util-linux-2.14-loop_autoclear.patch - -------------------------------------------------------------------- -Wed Aug 20 15:20:06 CEST 2008 - mkoenig@suse.de - -- enable SELinux support [fate#303662] - -------------------------------------------------------------------- -Mon Aug 18 18:13:10 CEST 2008 - mrueckert@suse.de - -- remove outdated options in the fillup_and_insserv call - -------------------------------------------------------------------- -Mon Aug 18 12:36:39 CEST 2008 - mkoenig@suse.de - -- raw: fix init script tags - -------------------------------------------------------------------- -Mon Jul 7 15:13:24 CEST 2008 - mkoenig@suse.de - -- update which to version 2.19 - * Upgraded code from bash to version 3.2. This DOES has influence - on how Which behaves under certain circumstances. - * When the environment variable HOME is not set, the home directory - is now read from /etc/passwd or set to '/' if no home directory - could be found (this now matches the tilde lib used in bash) - * Changed the license to GPLv3 - * Add support for shells that output '{' on the same line as the - function name in the output of 'declare -f' (ie zsh). -- fix build - -------------------------------------------------------------------- -Wed Jul 2 15:47:08 CEST 2008 - mkoenig@suse.de - -- replace util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch - with upstream version - util-linux-2.14-loop_autoclear.patch - -------------------------------------------------------------------- -Fri Jun 27 17:05:46 CEST 2008 - schwab@suse.de - -- Fix lib64 check. - -------------------------------------------------------------------- -Wed Jun 25 14:26:49 CEST 2008 - mkoenig@suse.de - -- update to version 2.14 - most important changes: - * new command ldattach - mount: - * support auto-destruction of loop devices - losetup: - * new option -j - * supports unlimited number of loop devices - * new option --sizelimit to set data end - * option -s (short form of --show) now deprecated - mkswap: - * new option -U to set UUID explicitly - fdisk: - * calculate partition size in 2^N [bnc#381270] - hwclock: - * new option --adjfile to override default /etc/adjtime -- readd scriptreplay, implemented now in C -- add retry for mount if ENOMEDIUM is returned [bnc#390204] -- ignore ENXIO in del_loop, because they might have been - auto-destructed -- removed patches: - util-linux-2.13.1-canonicalize_loopfile_name.patch - util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch - util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch - util-linux-2.13.1-mount_getfs_fix.patch - util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch - util-linux-2.13-fdisk_cfdisk_ncursesw.patch - util-linux-mount_opt_nofail.patch - util-linux-ng-2.13-swapon-swsuspend.patch - -------------------------------------------------------------------- -Thu Apr 3 17:11:53 CEST 2008 - mkoenig@suse.de - -- cfdisk: accept english answer [bnc#369043] -- use upstream getfs fix - -------------------------------------------------------------------- -Wed Mar 26 22:05:42 CET 2008 - coolo@suse.de - -- actually require the split out package - -------------------------------------------------------------------- -Sun Mar 23 11:13:13 CET 2008 - coolo@suse.de - -- splitting out 60% of the size of the package: - creating lang subpackage - -------------------------------------------------------------------- -Wed Feb 13 10:21:42 CET 2008 - bg@suse.de - -- don't try to package parisc*.8 manual pages - -------------------------------------------------------------------- -Mon Feb 11 17:49:04 CET 2008 - mkoenig@suse.de - -- update to version 2.13.1 again -- fix broken util-linux-2.13.1-getfs_fix.patch - -------------------------------------------------------------------- -Sun Feb 10 18:11:07 CET 2008 - lrupp@suse.de - -- revert to 2.13.0.1+git20071121 - breaks current 'mount' call in Buildservice - -------------------------------------------------------------------- -Thu Feb 7 12:41:25 CET 2008 - mkoenig@suse.de - -- update to version 2.13.1: - mount: - * -L|-U segfault when label or uuid doesn't exist - * chain of symlinks to fstab causes use of pointer after free - * don't call canonicalize(SPEC) for cifs, smbfs and nfs - * improve error message when helper program not present - losetup: - * fix errno usage - mkswap: - * possible to crash with SELinux relabeling support - sfdisk: - * allow partitioning drives of over 2^31 sectors - hwclock: - * check for ENODEV -- mount: fix problem with device canonicalization when using - persistent name in fstab but call mount with real bd name -- patches merged: - util-linux-2.13-mount_fd_leak.patch - -------------------------------------------------------------------- -Tue Dec 18 15:55:19 CET 2007 - mkoenig@suse.de - -- add temporary workaround for broken RTC update interrupts - [#338419] - -------------------------------------------------------------------- -Mon Dec 3 11:03:57 CET 2007 - ro@suse.de - -- remove "arch", in coreutils now - -------------------------------------------------------------------- -Thu Nov 29 17:51:17 CET 2007 - lnussel@suse.de - -- update crypto patch - * fix mount buffer overflow when reading the passphrase (#332148) - * add loop_fish2 compatability code to losetup/mount again (#332095) - * change default hash size for 128bit keys to sha256 again - - -------------------------------------------------------------------- -Wed Nov 21 13:43:31 CET 2007 - mkoenig@suse.de - -- update to git20071121: - add sector size check for mkfs.minix [#308256] - fix canonicalization for cifs [#338375] -- provide Short-Description for raw init script -- add rpmlintrc - -------------------------------------------------------------------- -Tue Nov 20 17:49:35 CET 2007 - mkoenig@suse.de - -- fix raw path in init script - -------------------------------------------------------------------- -Tue Nov 6 16:11:02 CET 2007 - mkoenig@suse.de - -- update to 2.13.0.1+git20071106 -- prevent loop mounting the same file twice [#240653] -- merged upstream: - util-linux-2.13-mount_helper_fix.patch - util-linux-2.13-hwclock_rtc_option.patch - -------------------------------------------------------------------- -Thu Oct 4 22:24:04 CEST 2007 - bg@suse.de - -- don't use parisc, parisc32 and parisc64. - -------------------------------------------------------------------- -Mon Oct 1 17:08:06 CEST 2007 - mkoenig@suse.de - -- update to version 2.13 - merged upstream: - util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch - util-linux-2.13-loop.patch - util-linux-2.13-mount_create_mtab.patch - util-linux-2.13-schedutils_error_handling.patch - util-linux-2.13-sys_utils_build_rdev_x86_64.patch -- fix hwclock --rtc option [#326106] -- fix setuid/setgid mixup and error checking [#327022] - -------------------------------------------------------------------- -Fri Sep 14 11:24:33 CEST 2007 - mkoenig@suse.de - -- link cfdisk against libncursesw instead libncurses to fix - broken utf-8 characters [#307353] - -------------------------------------------------------------------- -Wed Aug 29 12:22:21 CEST 2007 - mkoenig@suse.de - -- fix fd leaks in previous patch - -------------------------------------------------------------------- -Tue Aug 28 16:42:04 CEST 2007 - lnussel@suse.de - -- add support for specifying the key length and password hash - algorithm [#304861] - -------------------------------------------------------------------- -Fri Aug 24 14:09:19 CEST 2007 - mkoenig@suse.de - -- avoid duplicates of root fs if defined with LABEL in fstab - [#297959] -- fix ionice error handling [#301675] - -------------------------------------------------------------------- -Thu Aug 16 18:34:30 CEST 2007 - ssommer@suse.de - -- free loop devices when mount fails [#297172] - -------------------------------------------------------------------- -Wed Jul 25 18:43:42 CEST 2007 - mkoenig@suse.de - -- update to git20070725 -- removed patches (merged upstream): - util-linux-2.12r-mount_mount.8_xfs_update.patch - util-linux-2.12r-sys_utils_readprofile_mapfile.patch - util-linux-2.12r-disk_utils_mkswap_fix.patch - util-linux-2.13-schedutils_ionice_idle.patch - -------------------------------------------------------------------- -Tue Jul 17 10:44:18 CEST 2007 - mkoenig@suse.de - -- updated to version 2.13-rc2: - * add wakertc -- cleanup ionice usage [#270251] -- enable hwclock audit support [#280113] -- removed patches (merged/fixed upstream) - util-linux-login_utils_wall.patch - util-linux-mount_mount.8-acl.patch - util-linux-2.12r-mount_mtab_update.patch - util-linux-2.13-schedutils_chrt.patch - util-linux-2.13-sys_utils_arch.patch - util-linux-2.12a-mount_mountpointwithcolon.patch - util-linux-2.12a-mount_procswapcheck.patch - util-linux-2.12q-mount_umount2_not_static.patch - -------------------------------------------------------------------- -Fri Jul 13 12:31:56 CEST 2007 - mkoenig@suse.de - -- replace hotplug with nofail option and fix it to not use - syscall reserved values. -- removed patch - util-linux-2.11z-hwclock_geteuid.patch - it is intentional that suid hwclock capabilities are limited -- removed patch (fixed upstream) - util-linux-2.12q-mount_--move.patch - -------------------------------------------------------------------- -Mon Jul 9 11:34:33 CEST 2007 - mkoenig@suse.de - -- add libuuid-devel to BuildRequires to let mkswap use UUIDs - -------------------------------------------------------------------- -Thu Jul 5 16:08:58 CEST 2007 - mkoenig@suse.de - -- use %config(noreplace) for /etc/filesystems -- Keep rdev stuff for x86_64 - util-linux-2.13-sys_utils_build_rdev_x86_64.patch -- removed patches (merged upstream) - util-linux-2.12r-misc_utils_cal_formatting.patch - util-linux-2.12q-sys_utils_ionice.patch - -------------------------------------------------------------------- -Thu Jul 5 11:59:30 CEST 2007 - mkoenig@suse.de - -- update to 2.13-rc1: - * mount fixes - * agetty: add 'O' escape code to display domain name - * blockdev: add BLKFRAGET/BLKFRASET ioctls - * fdisk: many significant improvements and fixes to Sun label handling - * update po files -- removed patches (merged upstream): - util-linux-2.11q-fdisk_fs_mac.patch - util-linux-2.12r-fdisk_fdiskwrap.patch - util-linux-2.12r-mount_racy_loop.patch - util-linux-2.13-misc_utils_cal_ncurses.patch - util-linux-2.13-mount_volumeid_label.patch -- use %find_lang - -------------------------------------------------------------------- -Thu Jun 21 14:50:58 CEST 2007 - mkoenig@suse.de - -- use encoded label names with volume_id [#232929] - util-linux-2.13-mount_volumeid_label.patch - -------------------------------------------------------------------- -Thu Jun 14 10:52:25 CEST 2007 - mkoenig@suse.de - -- mkzimage_cmdline: activate commandline if used with -s [#279935] - -------------------------------------------------------------------- -Wed Jun 13 12:33:59 CEST 2007 - mkoenig@suse.de - -- schedutils: let chrt accept pid 0 for current process and - fix some documentation bugs [#266879] - util-linux-2.13-schedutils_chrt.patch - -------------------------------------------------------------------- -Wed Jun 6 16:15:43 CEST 2007 - mkoenig@suse.de - -- update to git20070530 -- removed patches - util-linux-2.13-mount_volume_id.patch - util-linux-2.12r-mount_by_uuid.patch - util-linux-2.13-build_gnu_source.patch -- fix build with ncurses - -------------------------------------------------------------------- -Tue Jun 5 17:01:48 CEST 2007 - mkoenig@suse.de - -- update to git20070509 - mount: NFS code removed (use mount.nfs{,4} from nfs-utils) -- remove sm-notify (nfs-utils) -- removed patches - util-linux-2.11u-mount_nfs_mount_acl.patch - util-linux-2.12-mount_base_nfsv4.patch - util-linux-2.12-mount_mountfallback.patch - util-linux-2.12-mount_nfs_tcp.patch - util-linux-2.12q-mount_strict_aliasing.patch - util-linux-2.12r-mount_nfs_remount_options.patch - util-linux-2.12r-mount_rpcsec_gss.patch - util-linux-2.12r-mount_sec_manpage.patch - util-linux-2.12r-mount_umount_nosysfs.patch - util-linux-2.13-mount_nfs_timeo.patch - util-linux-mount_nfs.8.patch - util-linux-mount_warn_nfsudp.patch - -------------------------------------------------------------------- -Tue Jun 5 14:34:49 CEST 2007 - pth@suse.de - -- Update to which-2.16, mainly because regenerating configure - with newer autotools works. -- Fix the patch for AC_CHECK_STATICLIB -- Our distribution doesn't install libiberty.a, so pass - --disable-iberty to configure of which to not use a libiberty from - somewhere else. - -------------------------------------------------------------------- -Mon Jun 4 17:06:47 CEST 2007 - pth@suse.de - -- Make configure of which search for static libs in lib64 subdirs. - -------------------------------------------------------------------- -Mon Apr 23 16:49:00 CEST 2007 - mkoenig@suse.de - -- update to git20070412 -- remove chkdupexe and scriptreplay to get rid of the - perl dependency [#265757] - util-linux-2.13-build_no_perl_dependency.patch -- upstream integration of umount helper support [#252089] -- merged patches: - util-linux-2.13-misc_utils_add_man_scriptreplay.patch - util-linux-2.13-tests_missing_include.patch - -------------------------------------------------------------------- -Mon Apr 16 17:20:16 CEST 2007 - mkoenig@suse.de - -- fix initialization of offset in - util-linux-2.12r-mount_racy_loop.patch [#264225] - -------------------------------------------------------------------- -Tue Apr 10 17:25:34 CEST 2007 - mkoenig@suse.de - -- update to version git20070330 of new forked development tree -- removed Suse crypto patches for losetup [FATE#302001] -- removed binaries: - /bin/guessfstype - /sbin/sln - /usr/bin/setfdprm -- removed obsolete patches: - * guessfstype2.patch - * loop-AES-v3.0a-util-linux-2.12p.diff - * mount-nfs-nonreserved - * stupid-programmer.diff - * util-linux-nodiratime.diff - * util-linux-2.12-multipleraw.diff - * util-linux-2.12-enablereplaybuild.diff - * util-linux-2.12-mount_guessfstype.diff - * util-linux-2.12h-mtablock.diff - * util-linux-2.12i-x86_64intel.diff - * util-linux-2.12q-null.diff - * util-linux-2.12r.diff - * util-linux-2.12r-fdisk_llseek.patch - * util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff - * util-linux-2.12r-mount_external_prog_on_guess.patch - * util-linux-2.12r-nonfsmountfallback.diff - * util-linux-2.12r-pagesize.patch - * util-linux-2.12r-partx_enable.patch - * util-linux-2.12r-partx_gpt_warning.patch -- add patches: - * util-linux-2.13-misc_utils_add_man_scriptreplay.patch - install man page for scriptreplay - * util-linux-2.13-tests_missing_include.patch - fix missing header in tests/mnt_test_sysinfo.c - * util-linux-2.13-sys_utils_arch.patch - keep /bin/arch - * util-linux-2.13-build_gnu_source.patch - build with _GNU_SOURCE - * util-linux-2.13-build_fix_intel_check.patch - detect also x86_64 as INTEL architecture -- rename patches to identify them clearly by subsystem -- schedutils now part of util-linux itself - -------------------------------------------------------------------- -Wed Apr 4 12:55:40 CEST 2007 - mkoenig@suse.de - -- add Supplements line [FATE#301966] - -------------------------------------------------------------------- -Mon Mar 26 15:49:09 CEST 2007 - rguenther@suse.de - -- add ncurses-devel and zlib-devel BuildRequires - -------------------------------------------------------------------- -Thu Mar 15 17:24:34 CET 2007 - mkoenig@suse.de - -- mount: Let swapon automatically reinitialize a suspended - swap partition [#254437] - -------------------------------------------------------------------- -Thu Mar 9 11:00:11 CET 2007 - mkoenig@suse.de - -- mount: fix mtablock patch to avoid mtab corruption [#226783] - -------------------------------------------------------------------- -Thu Mar 8 17:27:22 CET 2007 - mkoenig@suse.de - -- partx: fix warning for too long literal - -------------------------------------------------------------------- -Wed Mar 7 16:58:08 CET 2007 - rguenther@suse.de - -- fix changelog entry order - -------------------------------------------------------------------- -Tue Feb 27 10:58:46 CET 2007 - mkoenig@suse.de - -- fix missing return code in - util-linux-2.12r-losetup_password.patch -- mount: fix race condition in mount -o loop [#242750] - -------------------------------------------------------------------- -Mon Feb 12 17:22:45 CET 2007 - mkoenig@suse.de - -- remove legacy warnings from fdisk [#241372] - -------------------------------------------------------------------- -Fri Feb 2 13:27:31 CET 2007 - mkoenig@suse.de - -- do not use O_EXCL for mkfs.cramfs [#241466] - -------------------------------------------------------------------- -Wed Jan 31 12:06:55 CET 2007 - mkoenig@suse.de - -- let mkfs tools open with O_EXCL [#238687] - -------------------------------------------------------------------- -Tue Dec 12 11:04:07 CET 2006 - mkoenig@suse.de - -- provide different return codes for losetup with encryption - for empty and too short passwords. [#197493] - -------------------------------------------------------------------- -Tue Dec 5 18:13:32 CET 2006 - mkoenig@suse.de - -- default swap to V1 in any case [#205956] - patch: util-linux-2.12r-mkswap_fix.patch -- do not append addr option with each nfs remount [#130625] - patch: util-linux-2.12r-nfs_remount_options.patch -- add README.largedisk about fdisk partition size constraints - [#153657] - -------------------------------------------------------------------- -Tue Nov 7 13:09:45 CET 2006 - mkoenig@suse.de - -- enable partx [#214992] - -------------------------------------------------------------------- -Tue Oct 10 18:17:42 CEST 2006 - mkoenig@suse.de - -- Round up partition end LBA to a cylinder boundary during - add_partition() [#174892] -- Fix readprofile on ppc64 [#179122] -- Fix cal formatting bug [#203469] - -------------------------------------------------------------------- -Mon Oct 9 12:27:33 CEST 2006 - mkoenig@suse.de - -- Fix llseek issues. -- swapon.c: Do not use PAGE_SIZE macro. - -------------------------------------------------------------------- -Mon Aug 21 12:10:01 CEST 2006 - mkoenig@suse.de - -- Added sysfs to list of filesystems not to unmount with - umount -a, resolves #190385 - -------------------------------------------------------------------- -Mon Jun 12 14:08:25 CEST 2006 - kay.sievers@suse.de - -- use libvolume_id from provided as a rpm by udev 094 - -------------------------------------------------------------------- -Wed May 17 23:48:27 CEST 2006 - jeffm@suse.com - -- Fixed support for calling external programs w/o -t , - it would add mtab twice [#176582] - -------------------------------------------------------------------- -Mon Apr 24 14:33:20 CEST 2006 - hvogel@suse.de - -- document xfs dmapi mount options better [#158955] - -------------------------------------------------------------------- -Fri Apr 21 15:48:16 CEST 2006 - olh@suse.de - -- add mkzimage_cmdline to edit CHRP zImage kernel cmdline (168313) - -------------------------------------------------------------------- -Tue Apr 18 16:09:46 CEST 2006 - hvogel@suse.de - -- fix number of supported raw devices [#165570] - -------------------------------------------------------------------- -Wed Mar 29 13:54:32 CEST 2006 - olh@suse.de - -- clearify comments about mac disk label handling in fdisk - -------------------------------------------------------------------- -Tue Mar 28 17:53:46 CEST 2006 - hvogel@suse.de - -- more fixes for the fdiskwrap patch [#160822] - -------------------------------------------------------------------- -Tue Mar 21 11:35:26 CET 2006 - okir@suse.de - -- Update nfs(5) manpage to document security flavors [#159368] - -------------------------------------------------------------------- -Mon Mar 20 12:14:18 CET 2006 - hvogel@suse.de - -- fix numbers of supported raw devices to match the kernel - [#158203] -- make NFSv3 client support RPCSEC_GSS [#158401] -- fix that if the user doesn't specify -t - mount.fstype will never be called. [#155147] - -------------------------------------------------------------------- -Fri Mar 10 12:07:10 CET 2006 - hvogel@suse.de - -- Fix init.d/raw script to parse device names with , in them - correctly [#155653] - -------------------------------------------------------------------- -Thu Mar 9 12:28:04 CET 2006 - hare@suse.de - -- Fix potential security hole in libvolume_id (#133256) - -------------------------------------------------------------------- -Mon Mar 6 12:03:35 CET 2006 - hvogel@suse.de - -- patch fdiskmaclabel.h too - -------------------------------------------------------------------- -Thu Mar 2 15:49:06 CET 2006 - hvogel@suse.de - -- axboe made fdisk not wrap at 2TB [#153657] - -------------------------------------------------------------------- -Fri Feb 17 15:25:39 CET 2006 - lmuelle@suse.de - -- Use cifs instead of smbfs if the source starts with // and we do not set a - different fs type. - -------------------------------------------------------------------- -Sun Feb 12 12:40:21 CET 2006 - olh@suse.de - -- cosmetic fix for option_hotplug declaration - fix unininitalized string for unknown filesystems (#148855) - -------------------------------------------------------------------- -Fri Feb 10 14:00:48 CET 2006 - hvogel@suse.de - -- mount should not put / in the mtab twice if mount -f / is called - [#148409] -- fix hostid printf [#149163] - -------------------------------------------------------------------- -Wed Feb 1 03:58:58 CET 2006 - olh@suse.de - -- dont invent our own MS_FLAGS (#147132) - -------------------------------------------------------------------- -Wed Feb 1 02:20:17 CET 2006 - ro@suse.de - -- fix typo in previous change, binary negation is "~" - -------------------------------------------------------------------- -Fri Jan 27 13:02:36 CET 2006 - sscheler@suse.de - -- fixed mount hotplug option (#143352). now we don't send the - MS_HOTPLUG flag to the kernel any longer, because the kernel - doesn't know this option (EINVAL) and actually doesn't need to - know about it. - -------------------------------------------------------------------- -Fri Jan 27 12:55:29 CET 2006 - olh@suse.de - -- remove clock symlink, hwclock exists since 7 years - -------------------------------------------------------------------- -Fri Jan 27 11:46:17 CET 2006 - olh@suse.de - -- lsprop and nvsetenv moved to powerpc-utils [#144758] - -------------------------------------------------------------------- -Thu Jan 26 13:06:51 CET 2006 - hvogel@suse.de - -- Make nfsboot world readable [#145418] - -------------------------------------------------------------------- -Wed Jan 25 21:31:03 CET 2006 - mls@suse.de - -- converted neededforbuild to BuildRequires - -------------------------------------------------------------------- -Tue Jan 24 17:06:22 CET 2006 - mmj@suse.de - -- Remove faulty nfs fallback code [#139019] - -------------------------------------------------------------------- -Mon Jan 16 11:25:28 CET 2006 - mmj@suse.de - -- Add patch for nsetenv to fix short reads/short writes [#142546] - -------------------------------------------------------------------- -Wed Jan 11 12:46:28 CET 2006 - mmj@suse.de - -- Update sm-notify [#141542] - -------------------------------------------------------------------- -Wed Jan 4 13:52:31 CET 2006 - mmj@suse.de - -- Update to 2.12r including since 2.12q: - o cfdisk: fix a segfault with ReiserFS partitions - o umount: disallow -r option for non-root users - -------------------------------------------------------------------- -Tue Nov 22 11:49:39 CET 2005 - mmj@suse.de - -- install proper renice manpage [#132470] - -------------------------------------------------------------------- -Tue Nov 15 17:01:34 CET 2005 - uli@suse.de - -- umount2 is not static (only fails on ARM, surprisingly) -- added ARM ionice syscalls - -------------------------------------------------------------------- -Fri Nov 11 10:42:35 CET 2005 - hare@suse.de - -- Fix reverse-mapping of by-UUID and by-LABEL mounts. - -------------------------------------------------------------------- -Thu Nov 10 09:04:17 CET 2005 - hare@suse.de - -- Fix a mishandling of by-UUID mounts. -- Use libvolume_id from udev. - -------------------------------------------------------------------- -Sat Oct 22 17:55:16 CEST 2005 - mmj@suse.de - -- Increase lsprop.c max property size to 4k [#128155] - -------------------------------------------------------------------- -Mon Oct 10 12:44:05 CEST 2005 - mmj@suse.de - -- Add -fno-strict-aliasing to nfsmount_xdr.c - -------------------------------------------------------------------- -Mon Oct 3 09:55:56 CEST 2005 - mmj@suse.de - -- Teach the mount manual page about nodiratime [#118987] - -------------------------------------------------------------------- -Thu Sep 29 12:42:03 CEST 2005 - mmj@suse.de - -- Patch from jakub007@go2.pl to make mount --move update - /etc/mtab correctly [#115129] - -------------------------------------------------------------------- -Tue Sep 13 14:16:58 CEST 2005 - mmj@suse.de - -- Only allow root to pass -r to umount [#116741] - -------------------------------------------------------------------- -Mon Sep 5 13:18:27 CEST 2005 - mmj@suse.de - -- MAC -> Mac [#104081] - -------------------------------------------------------------------- -Fri Sep 2 13:48:17 CEST 2005 - mmj@suse.de - -- Don't package manual executable [#114849] - -------------------------------------------------------------------- -Thu Sep 1 10:56:25 CEST 2005 - mmj@suse.de - -- Add patch for device-mapper mount by label support [#75966] - -------------------------------------------------------------------- -Thu Sep 1 00:12:39 CEST 2005 - ro@suse.de - -- provide and obsolete schedutils - -------------------------------------------------------------------- -Tue Aug 23 18:00:01 CEST 2005 - hvogel@suse.de - -- update ionice patch by axboe so that ionice will complain about - missing sys_ioprio_set support, but it will still - execute the process. - -------------------------------------------------------------------- -Mon Aug 22 17:06:42 CEST 2005 - hvogel@suse.de - -- Fix rpm verify output [#105807] - (ghost entry for /var/lib/nfs/state) - -------------------------------------------------------------------- -Mon Aug 22 16:27:16 CEST 2005 - schwab@suse.de - -- Fix stupid buffer overflow bug in cfdisk [#66020]. - -------------------------------------------------------------------- -Wed Aug 17 12:59:24 CEST 2005 - hare@suse.de - -- Add option 'hotplug' to mount (#104405) - -------------------------------------------------------------------- -Mon Aug 15 16:33:48 CEST 2005 - schwab@suse.de - -- Always build with RPM_OPT_FLAGS. - -------------------------------------------------------------------- -Thu Aug 11 14:41:18 CEST 2005 - mmj@suse.de - -- Patch from Patrick Kirsch to make fdisk detect MAC-fs [#104081] - -------------------------------------------------------------------- -Wed Aug 3 20:50:59 CEST 2005 - mmj@suse.de - -- Merge schedutils to here (it's happened upstream already) - -------------------------------------------------------------------- -Tue Aug 2 08:47:47 CEST 2005 - mmj@suse.de - -- Support for s390 and s390x - -------------------------------------------------------------------- -Mon Aug 1 20:04:13 CEST 2005 - mmj@suse.de - -- It's not __ppc_ and __ppc64__ but __powerpc__ and __powerpc64__ - -------------------------------------------------------------------- -Mon Aug 1 12:17:39 CEST 2005 - mmj@suse.de - -- Add ionice binary from Jens Axboe - -------------------------------------------------------------------- -Wed Jun 29 11:26:31 CEST 2005 - mmj@suse.de - -- Document load and clearly issues about NFS over UDP [#80263] -- Don't compile with -fsigned-char [#93886] - -------------------------------------------------------------------- -Tue May 31 13:26:05 CEST 2005 - okir@suse.de - -- Added NFSv4 support - -------------------------------------------------------------------- -Mon May 9 17:27:59 CEST 2005 - hvogel@suse.de - -- move hashalot and cryptsetup tools to util-linux-crypto - -------------------------------------------------------------------- -Tue Apr 12 16:13:57 CEST 2005 - mmj@suse.de - -- bump TCP timeo to 600 [#76198] - -------------------------------------------------------------------- -Tue Mar 29 13:43:31 CEST 2005 - mmj@suse.de - -- Add awareness of twofishSL92 [#74359] -- Update hashalot to version 0.3 - -------------------------------------------------------------------- -Mon Mar 14 15:30:49 CET 2005 - okir@suse.de - -- Changed sm-notify to recognize host names as well as addresses. - -------------------------------------------------------------------- -Thu Mar 10 11:28:21 CET 2005 - mmj@suse.de - -- Don't strip anything explicitly -- Don't compile with -fno-strict-aliasing [#66020] - -------------------------------------------------------------------- -Fri Feb 4 14:48:27 CET 2005 - schwab@suse.de - -- Fix stupid programmer. - -------------------------------------------------------------------- -Mon Jan 24 17:01:51 CET 2005 - meissner@suse.de - -- implicit strcmp / strerror in setctsid fixed. -- 0 -> NULL in an execl - -------------------------------------------------------------------- -Fri Jan 21 14:37:21 CET 2005 - mmj@suse.de - -- Sleep after inserting the raw module to make sure it's ready [#49807] -- Update to 2.12q including since 2.12p: - o New upstream maintainer - Adrian Bunk - o sfdisk: add -G option - o Updated translations - -------------------------------------------------------------------- -Tue Jan 18 17:04:30 CET 2005 - okir@suse.de - -- Updated sm-notify; try not to stall bootup my moving the NSM - state update after we've backgrounded (#49072). - -------------------------------------------------------------------- -Mon Jan 10 14:45:12 CET 2005 - mmj@suse.de - -- Update adjtimex to 1.20 -- Update to util-linux-2.12p including since 2.12i: - o cfdisk: fix number of new partition when partitions not in disk order - o fdisk: fix Sun label handling in sector mode - o mkfs: never truncate filename (not that that ever happened) - o more: fix redraw flaw - o lomount: revert patch from 2.12j - o lptune.8: -T option is obsolete - o mkswap, mkswap.8, swapon: support labels - o umount: allow user unmounting repeatedly mounted nfs mounts - o cfdisk: recognize JFS, support reiserfs labels - o mount: fix option parsing bug - o mount.8: several updates - o swapon.8: document -v option - o Makefile: remove cat-id-tbl.c upon make clean - o fdisk: fixed a bug that would cause a non-update of a sun disklabel - o fdisk: use sectorsize instead of 512 for SGI - o hwclock: actually use HAVE_tm_gmtoff - o swapon: fix priority handling - o umount: refuse to unmount an empty string - o configure, MCONFIG: detect gcc 3.4.0 and use -mtune option - o configure: do not run ./conftest (for cross compilation) - o fsck.cramfs: try to get correct PAGE_CACHE_SIZE - o losetup: try to give better error messages - o readprofile: default map file is /boot/System.map - o rdev.8: added historical info on ramdisk - o cal: highlight today - o lomount: stop reading passwd at NUL, fix lo_encrypt key_size - o losetup: add -f option to find an unused loop device - o more: code cleanup - o mount: add "group" mount option - o sfdisk: fix 2.6.8 BLKRRPART ioctl damage - o swapon: let swapon -a skip the swapfiles marked "noauto" - o umount: fix problem with empty mtab - o umount: use special umount program if it exists - o new flock binary - o New messages - -------------------------------------------------------------------- -Tue Nov 30 11:02:32 CET 2004 - mmj@suse.de - -- Install ramsize, rdev, rootflags and vidmode on x86-64 [#48633] - -------------------------------------------------------------------- -Fri Nov 12 15:01:36 CET 2004 - schwab@suse.de - -- Don't install *fdisk on ia64. - -------------------------------------------------------------------- -Fri Nov 12 14:50:24 CET 2004 - ro@suse.de - -- correct permissions handling for wall and write - -------------------------------------------------------------------- -Tue Nov 9 16:00:23 CET 2004 - mmj@suse.de - -- Fix segfault with mount -l [#48029] - -------------------------------------------------------------------- -Fri Nov 5 11:36:16 CET 2004 - mmj@suse.de - -- Update to util-linux-2.12i including: - o MCONFIG: fix build conditions - o chfn, chsh: add error checking - o cytune: use local header cyclades.h - o fdisk: fix default SGI volume header size - o fstab.c: use strsignal() instead of sys_siglist[] - o hwclock: use when available on i386 - o hwclock: dont try KDGHWCLK on archs other than __m68k__ - o sfdisk: correct typo in __attribute__used nonsense - o sfdisk: use PACKED on __arm__ - o sfdisk: fix warning printout - -------------------------------------------------------------------- -Thu Nov 4 08:37:19 CET 2004 - mmj@suse.de - -- Update to util-linux-2.12h including: - o cfdisk: avoid crash if no partition table - o elvtune: tell user that this only works on 2.4 kernels - o lomount: clear passwords after use - o mount: accept comments (specified by comment=) in fstab - o mount: support ocfs, ocfs2 - o [u]mount: be more careful with malloc, try to avoid OOM with - many mounts - o sfdisk: __attribute__used nonsense to support gcc 3.4 - o shutdown: do not unmount various virtual filesystems - o mount.8: added recent ext2 mount options - o mount: support jfs mount-by-label, improve reiserfs support - o sfdisk: remove strange "ends in a digit" heuristic - o *fdisk: use common disksize() routine - -------------------------------------------------------------------- -Tue Oct 19 10:24:13 CEST 2004 - mmj@suse.de - -- Add patch from SGI for fdisk label [#47368] - -------------------------------------------------------------------- -Tue Sep 28 11:18:50 CEST 2004 - mmj@suse.de - -- And another one [#46201] - -------------------------------------------------------------------- -Wed Sep 15 23:11:56 CEST 2004 - mmj@suse.de - -- Add patch from Andries to fix cfdisk [#44996] - -------------------------------------------------------------------- -Tue Sep 7 07:32:39 CEST 2004 - mmj@suse.de - -- Update to util-linux-2.12c including: - o mount.8: added recent ext2 mount options - o mount: support jfs mount-by-label, improve reiserfs support - o sfdisk: remove strange "ends in a digit" heuristic - o *fdisk: use common disksize() routine [#44678] - -------------------------------------------------------------------- -Wed Aug 25 12:54:00 CEST 2004 - mmj@suse.de - -- Update to util-linux-2.12b including: - o chsh: improved error message - o dmesg: ask kernel proper buffer size - o losetup: handle 64-bit offsets - o blockdev: also report BLKGETSIZE64 result [#43464] - o blockdev, elvtune, fdisk: handle new kernel _IOR,_IOW defines - o fdisk: remove strange "ends in a digit" heuristic - o fdisk: also list Solaris as possible type for 0x82 - o mount: added --rbind option - o mount: use blkid library - o mount: support reiserfs mount by label - o mount: attempt to use the right definition of dev_t in struct - loopinfo - o mount.8: jfs mount options added - o readprofile: new -s option - o rename.1: added ref to mmv.1 - o replay: renamed to scriptreplay; correct typos - o script: do not use locale for time delay floating point number - format - o sfdisk: error messages to stderr - o New Catalan, Dutch, Finnish, French, German, Spanish, Swedish, - Turkish, Ukrainian messages -- Update the loop-AES patch, thanks to Sumit Bose -- Change the minimum password length to 8 chars - -------------------------------------------------------------------- -Tue Aug 24 08:03:24 CEST 2004 - mmj@suse.de - -- Fix signed/unsigned bug in lsprop [#44048] - -------------------------------------------------------------------- -Wed Aug 18 15:56:01 CEST 2004 - mmj@suse.de - -- Readd patch that got lost to make fdisk -l work better with - RAID controllers [#43485] - -------------------------------------------------------------------- -Mon Aug 9 11:06:34 CEST 2004 - mmj@suse.de - -- Add an improved version of the dmesg bufsize patch. - -------------------------------------------------------------------- -Tue Jun 22 15:50:05 CEST 2004 - mmj@suse.de - -- Add patch to try and guess a filesystem type before blindly - assuming it's nfs because of the colon [#42097] - -------------------------------------------------------------------- -Mon Jun 14 19:21:08 CEST 2004 - agruen@suse.de - -- Formatting error in mount.8 manual page. - -------------------------------------------------------------------- -Wed Jun 9 15:17:47 CEST 2004 - mmj@suse.de - -- Add patch from Olaf Kirch to make protocol selection for mount - independent of protocol selection for NFS, and picks what is - available (preferring TCP over UDP) [#41735] - -------------------------------------------------------------------- -Wed Jun 9 12:10:03 CEST 2004 - mls@suse.de - -- add '-f' option to setctsid - -------------------------------------------------------------------- -Thu May 27 15:07:13 CEST 2004 - okir@suse.de - -- sm-notify now binds to a reserved port - -------------------------------------------------------------------- -Sat May 15 16:15:00 CEST 2004 - mmj@suse.de - -- Add documentation about raw device handling [#39037] - -------------------------------------------------------------------- -Mon May 10 14:40:43 CEST 2004 - mmj@suse.de - -- Make dmesg dump entire buffer. Patch from Andries/odabrunz [#39761] - -------------------------------------------------------------------- -Wed May 6 10:05:16 CEST 2004 - mmj@suse.de - -- Also check if the device is the same when doing swapon. Could be - the same block device with 2 different names [#39436] - -------------------------------------------------------------------- -Wed May 5 11:12:47 CEST 2004 - mmj@suse.de - -- Do a /sbin/modprobe raw when invoking raw devices [#39037] - -------------------------------------------------------------------- -Tue Apr 20 09:28:09 CEST 2004 - mmj@suse.de - -- Update to 2.12a including: - o fdisk: fix for kernels 2.4.15-2.4.17 - o fdisk: fix when all partitions are in use - o hwclock: add a timeout when waiting for a clock update - o ipcs: compilation fix - o ipcs: shminfo.shmall gives pages - o mount: efs support - o partx: bigendian fix - o readprofile: support for 64-bit addresses - o setterm: fix klogctl error message - o setterm.1: clarification - o sfdisk: fix check for is_ide_cdrom_or_tape - o umount: skip proc, devfs, devpts on umount -a - -------------------------------------------------------------------- -Mon Apr 19 11:52:54 CEST 2004 - mmj@suse.de - -- Add patch for unlimited raw devices [#39037] - -------------------------------------------------------------------- -Thu Apr 15 11:08:50 CEST 2004 - mmj@suse.de - -- Make sm-notify be more quiet when nothing wrong, and log to sys- - log when something is. - -------------------------------------------------------------------- -Tue Apr 6 14:45:36 CEST 2004 - mmj@suse.de - -- Don't use startproc for sm-notify [#38481] - -------------------------------------------------------------------- -Mon Apr 5 14:55:39 CEST 2004 - mmj@suse.de - -- Removing elvtune alltogether was a bit drastic, since it of - course works fine with 2.4 kernels. So print a warning in case - the BLKELVGET ioctl returns something indicating 2.6 kernels. - -------------------------------------------------------------------- -Thu Apr 1 19:50:47 CEST 2004 - mmj@suse.de - -- Don't package elvtune anymore since it's obsolete now that io - scheduler can be tuned in /sys/block/hdX/queue/iosched/* [#37869] - -------------------------------------------------------------------- -Wed Mar 31 11:19:28 CEST 2004 - mmj@suse.de - -- Apply util-linux-2.12a fixes for hwclock and readprofile. The - hwclock bit is a timout fix which hopefully fixes [#35877] -- Move sm-notify to here from nfs-utils [#36737] - -------------------------------------------------------------------- -Mon Mar 29 13:26:20 CEST 2004 - mmj@suse.de - -- Adjust warnings about Crypto-API - -------------------------------------------------------------------- -Sun Mar 28 11:00:24 CEST 2004 - mmj@suse.de - -- Add patch to make script allways use the same LC_NUMERIC [#35476] - -------------------------------------------------------------------- -Fri Mar 26 21:38:27 CET 2004 - od@suse.de - -- Add setctsid by Werner Fink [#37177] - -------------------------------------------------------------------- -Fri Mar 26 15:07:00 CET 2004 - mmj@suse.de - -- Mount option "code" is now "codepage" so update /etc/fstab in - postinstall [#36950] - -------------------------------------------------------------------- -Fri Mar 26 11:49:01 CET 2004 - mmj@suse.de - -- Remove false statement in nfs.5 about the linux kernel not - supporting nfs over tcp [#37060] - -------------------------------------------------------------------- -Wed Mar 17 21:41:17 CET 2004 - mmj@suse.de - -- Use correct permissions for README.hashalot [#36303] - -------------------------------------------------------------------- -Mon Mar 8 10:51:46 CET 2004 - mmj@suse.de - -- Enable build of replay [#35434] - -------------------------------------------------------------------- -Wed Feb 25 14:07:15 CET 2004 - mmj@suse.de - -- Use loop-AES-v2.0f-util-linux-2.12.diff instead of losetup patch - added earlier. Thanks Sumit Bose! - -------------------------------------------------------------------- -Thu Feb 19 09:54:03 CET 2004 - mmj@suse.de - -- Add cryptsetup script from Christophe Saout, for usage with the - new dm-crypt. - -------------------------------------------------------------------- -Mon Feb 16 15:32:57 CET 2004 - mmj@suse.de - -- Add losetup patch and hashalot program from Ben Slusky - -------------------------------------------------------------------- -Sun Feb 1 14:11:51 CET 2004 - kukuk@suse.de - -- Remove newgrp again (will use POSIX conform version) - -------------------------------------------------------------------- -Fri Jan 16 13:26:55 CET 2004 - kukuk@suse.de - -- Add pam-devel to neededforbuild - -------------------------------------------------------------------- -Mon Jan 12 11:31:47 CET 2004 - mmj@suse.de - -- Adjust the nfs.5 manual page to reflect we're mounting nfs over - tcp pr. default. -- Collapse two similar patches 2 one. - -------------------------------------------------------------------- -Fri Dec 19 16:43:39 CET 2003 - garloff@suse.de - -- Fix by okir for previous patch. - -------------------------------------------------------------------- -Fri Dec 19 11:19:43 CET 2003 - garloff@suse.de - -- Add patch to fallback to UDP if TCP NFS mount fails. - -------------------------------------------------------------------- -Tue Dec 2 09:03:32 CET 2003 - mmj@suse.de - -- Make patch to guess if a CD is a CD-Extra [#30316] -- Adjust patch that moves ext2/3 in front of vfat -- Regenerate patches (filename still tells when they were added) - -------------------------------------------------------------------- -Tue Nov 18 13:57:28 CET 2003 - mmj@suse.de - -- Mount NFS over TCP pr. default [#33018] - -------------------------------------------------------------------- -Thu Nov 13 14:43:39 CET 2003 - mmj@suse.de - -- Update to util-linux-2.12 including: - o losetup: -p option specifies fd for passphrase - o fdisk: sgi layout fix - o mount: -p option specifies fd for passphrase - o mount: recognize some PCDOS floppies - o umount: in "umount name", first try to interpret "name" as a mount point - o translations updates for several languages - o cfdisk: localize the Y/N answer, improve printing localized messages - o cfdisk: make various variables long long - some disks are close to 2 TB - o cfdisk: use BLKGETSIZE64 - o fdisk: make various variables unsigned to lengthen the life of 32-bit vars - o fdisk: some sgi fixes - o fdisk: k=1000, K=1024 - o fdisk: removed last occurrences of HDIO_REQ - o fdisk: use BLKGETSIZE64 - o hwclock: fix rtc test - o login: set a timeout on printing the timeout message - o md5: x86_64 fix - o more: POSIX fixes - o mount: do not supply MS_MGC_VAL when there are conflicting flags - o mount: ncp and smb are called smbfs and ncpfs - global change - o mount: add support for xvm mount by label - o mount: correct hfs magic recognition - o mount: keep original umask - it influences the mount call - o raw.8: documented unbinding of raw devices - o readprofile: fixed off-by eight error - o script: add -c option - o sfdisk.8: added an example of partitioning with logical partitions - o sfdisk: only add a AA55 signature for DOS-type partition tables - o tailf: new - -------------------------------------------------------------------- -Tue Oct 21 15:49:01 CEST 2003 - mmj@suse.de - -- Correct permissions - -------------------------------------------------------------------- -Tue Oct 21 14:53:54 CEST 2003 - ja@suse.cz - -- added support for cryptoloop in 2.6.x kernels. - -------------------------------------------------------------------- -Wed Oct 15 13:20:54 CEST 2003 - mmj@suse.de - -- Don't build as root - -------------------------------------------------------------------- -Mon Oct 13 21:44:43 CEST 2003 - kukuk@suse.de - -- Enable newgrp - -------------------------------------------------------------------- -Thu Oct 2 11:31:14 CEST 2003 - kukuk@suse.de - -- Fix compiling with kernel 2.6.0-test6 header files - -------------------------------------------------------------------- -Tue Aug 12 15:27:20 CEST 2003 - mmj@suse.de - -- Update to pmac-utils-2.1 sources and only include nvsetenv - -------------------------------------------------------------------- -Tue Aug 12 12:38:18 CEST 2003 - mmj@suse.de - -- Add mount_guessfstype support for PCDOS [#27814] - -------------------------------------------------------------------- -Wed Jun 18 16:16:15 CEST 2003 - ak@suse.de - -- support noreserved option for NFS (#27428) - -------------------------------------------------------------------- -Thu Jun 5 14:06:51 CEST 2003 - mmj@suse.de - -- Rearrange the specfile wrt. archs - -------------------------------------------------------------------- -Tue May 13 11:20:26 CEST 2003 - mmj@suse.de - -- Use %defattr -- Remove files we don't package - -------------------------------------------------------------------- -Wed May 7 15:38:56 CEST 2003 - mmj@suse.de - -- Rearrange the do_guess_fstype() code to look for ext2/3 before - vfat [#26581] - -------------------------------------------------------------------- -Thu Apr 24 12:20:23 CEST 2003 - ro@suse.de - -- fix install_info --delete call and move from preun to postun - -------------------------------------------------------------------- -Mon Apr 14 15:12:27 CEST 2003 - pthomas@suse.de - -- Get rid of the syscall for adjtimex in selective cases and - just call the glibc wrapper. Fixes build on s390. - -------------------------------------------------------------------- -Mon Apr 14 10:35:38 CEST 2003 - pthomas@suse.de - -- Use geteuid instead of getuid in hwclock to enable making - hwclock suid root. - -------------------------------------------------------------------- -Mon Apr 7 15:40:54 CEST 2003 - mmj@suse.de - -- Only delete info entries when removing last version. - -------------------------------------------------------------------- -Thu Mar 13 11:29:54 CET 2003 - mmj@suse.de - -- Apply patch to make sfdisk not destroy BSD slices [#25093] - -------------------------------------------------------------------- -Mon Mar 3 16:19:04 CET 2003 - mmj@suse.de - -- Remove superflous umask(033); calls [#23292] - -------------------------------------------------------------------- -Mon Mar 3 12:27:01 CET 2003 - ro@suse.de - -- add missing info dir entries - -------------------------------------------------------------------- -Tue Feb 18 14:29:45 CET 2003 - agruen@suse.de - -- Add description of the effect of `mount -t nfs -o noacl' on - the use of the GETACL and SETACL remote procedure calls to - the nfs(5) manual page. - -------------------------------------------------------------------- -Mon Feb 17 15:44:28 CET 2003 - mmj@suse.de - -- It's called smbfs not smb [#23697] - -------------------------------------------------------------------- -Thu Feb 13 06:17:02 CET 2003 - mmj@suse.de - -- Readd patch for passphrase timeout that got lost [#23527] - -------------------------------------------------------------------- -Fri Feb 7 12:24:12 CET 2003 - mmj@suse.de - -- The install_info macros need PreReq: %install_info_prereq - -------------------------------------------------------------------- -Fri Feb 7 01:30:53 CET 2003 - ro@suse.de - -- added install_info macros - -------------------------------------------------------------------- -Tue Feb 4 22:34:10 CET 2003 - ro@suse.de - -- don't package /bin/kill (part of coreutils now) - -------------------------------------------------------------------- -Tue Feb 4 12:40:00 CET 2003 - meissner@suse.de - -- Include tarball with pmac-utils manpages, so we do not need - sgmltool and all its dependents. - -------------------------------------------------------------------- -Wed Jan 29 11:52:19 CET 2003 - mmj@suse.de - -- Update to util-linux-2.11z including: - * Translation updates - * mount: fix LABEL= handling for user umount, don't abort on read - error with photocds and add dmask and fmask vfat mount options - * setterm: accept devfs name - * simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails - * umount: allow user umount after mount by label or uuid - -------------------------------------------------------------------- -Wed Jan 22 15:10:24 CET 2003 - sf@suse.de - -- removed last patch, added new (correct) patch - -------------------------------------------------------------------- -Wed Jan 22 12:48:30 CET 2003 - sf@suse.de - -- removed eliminate_doubles() from mkfs.cramfs.c - for x86_64, as it segfaults. - (makes the images slightly larger, about 10%) - -------------------------------------------------------------------- -Tue Jan 21 14:51:29 CET 2003 - mmj@suse.de - -- Added description of ISO mount options to mount.8 [#22915] - -------------------------------------------------------------------- -Mon Dec 2 12:21:38 CET 2002 - mmj@suse.de - -- Update the ReiserFS patch from Chris Mason - -------------------------------------------------------------------- -Fri Nov 29 10:38:02 CET 2002 - mmj@suse.de - -- Fix missing #include - -------------------------------------------------------------------- -Thu Nov 28 15:03:05 CET 2002 - mmj@suse.de - -- Make readprofile also try to locate the System.map in - /boot/System.map-`uname -r` [#22168] - -------------------------------------------------------------------- -Wed Nov 27 11:01:52 CET 2002 - mmj@suse.de - -- Update to util-linux-2.11y including: - o Translation updates - o fdisk,cfdisk: cosmetic fixes - o mount,umount: fix LABEL= handling for non-root [#17322] - o more: kill external help file - o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC - fails (patch we had, now folded upstream) - -------------------------------------------------------------------- -Wed Nov 20 12:19:33 CET 2002 - mmj@suse.de - -- Update to util-linux-2.11x including: - o Translation updates for several languages - o cfdisk: correct error printout - o fdisk: allow addition of a new partition when logicals all used - but primary free - o hwclock: detect systime jumps backward during setting hwclock - o Merge of the cramfs bloksize patch - o mount: new --rbind flag, for recursive loopback mounts - o mount, umount: new -O option - o setpwnam.c: open temp pw file with O_EXCL - o simpleinit: fix for "spawn too fast" - o swapon: new -e option - -------------------------------------------------------------------- -Tue Nov 19 20:12:02 CET 2002 - mmj@suse.de - -- Fix multistring assignment in adjtimex - -------------------------------------------------------------------- -Mon Nov 11 11:26:14 CET 2002 - ro@suse.de - -- changed neededforbuild to -- changed neededforbuild to <> - -------------------------------------------------------------------- -Thu Oct 31 14:59:11 CET 2002 - mmj@suse.de - -- Add -b option to mkfs.cramfs (needed for biarch architectures) - -------------------------------------------------------------------- -Thu Oct 31 00:40:09 CET 2002 - ro@suse.de - -- hack time to build on alpha - -------------------------------------------------------------------- -Tue Oct 22 16:13:36 CEST 2002 - mmj@suse.de - -- Add correction to the ReiserFS patch that fixes the case where it - was possible but unlikely to detect a logged copy of a super on a - dedicated logging device as the real thing. From Chris Mason. - -------------------------------------------------------------------- -Tue Oct 22 14:13:30 CEST 2002 - mmj@suse.de - -- Update to util-linux-2.11w including: - o fdisk and cfdisk fixes - o more bigendian fix - o translation updates - o > 2GB swapspace - o mount umask, cramfs and ocfs stuff - -------------------------------------------------------------------- -Tue Oct 8 17:13:18 CEST 2002 - mmj@suse.de - -- Only enable below patch on ix86 and x86_64 - -------------------------------------------------------------------- -Mon Oct 7 16:35:24 CEST 2002 - mmj@suse.de - -- Make small bugfix to below patch - -------------------------------------------------------------------- -Sat Oct 5 01:27:51 CEST 2002 - mmj@suse.de - -- Apply patch to enable > 2GB swap (redhat) [#20533] - -------------------------------------------------------------------- -Wed Oct 2 15:27:47 CEST 2002 - mmj@suse.de - -- Add one-liner security fix to mount and umount. - -------------------------------------------------------------------- -Mon Sep 23 09:47:33 CEST 2002 - mmj@suse.de - -- Readd fix for klogconsole that got lost [#19834] - -------------------------------------------------------------------- -Fri Sep 13 12:55:24 CEST 2002 - mmj@suse.de - -- Added patch from Oracle to mount ocfs by label [#19262] - -------------------------------------------------------------------- -Thu Sep 12 18:06:21 CEST 2002 - mmj@suse.de - -- more: Do not cast char * to int and back [#18896] - -------------------------------------------------------------------- -Sat Aug 31 17:58:26 CEST 2002 - olh@suse.de - -- add mount_cramfs_be.diff to allow mount -oloop cramfsfile loopdir - -------------------------------------------------------------------- -Mon Aug 26 16:56:52 CEST 2002 - mmj@suse.de - -- Make mode not 666 when writing /etc/mtab [#18342] - -------------------------------------------------------------------- -Mon Aug 26 13:21:30 CEST 2002 - meissner@suse.de - -- quieten klogconsole if the console does not support TIOCLINUX [#12516] - -------------------------------------------------------------------- -Thu Aug 22 15:05:32 CEST 2002 - mmj@suse.de - -- Added patch from Andreas Gruenbacher for nfs-access-acl [#18183] - -------------------------------------------------------------------- -Wed Aug 21 10:33:05 CEST 2002 - mmj@suse.de - -- Fixed an mtab locking bug with patch from Olaf Kirch [#17637] - -------------------------------------------------------------------- -Mon Aug 19 16:46:54 CEST 2002 - mmj@suse.de - -- Updated reiserfs patch from Chris Mason -- Added patch for mount.8, thanks Andreas Gruenbacher - -------------------------------------------------------------------- -Thu Aug 15 19:56:31 CEST 2002 - mmj@suse.de - -- Correct PreReq: - -------------------------------------------------------------------- -Mon Aug 5 10:45:05 CEST 2002 - mmj@suse.de - -- Update to 2.11u which includes: - o Danish, German, Spanish, Swedish and Turkish updates. - o configure: for fsck.cramfs, mkfs.cramfs: add test for libz - o text-utils/Makefile: pg fix - o agetty: use same test as login does to find utmp entry - o fdisk: fix for fdisk on empty disk - o mount updates - -------------------------------------------------------------------- -Tue Jul 23 21:10:27 CEST 2002 - schwab@suse.de - -- Fix mkfs.cramfs for architectures with non-4k pages. - -------------------------------------------------------------------- -Wed Jul 17 00:34:49 CEST 2002 - mmj@suse.de - -- Merged base into util-linux - -------------------------------------------------------------------- -Mon Jul 15 10:23:51 CEST 2002 - mmj@suse.de - -- Added JFSv2 patch from Christoph Hellwig for volume label. Does - for JFS, what below patch does for ReiserFS. - -------------------------------------------------------------------- -Sun Jul 14 19:04:16 CEST 2002 - adrian@suse.de - -- fix ul-2.10m-sgi-fdisk.diff patch to apply again - -------------------------------------------------------------------- -Thu Jul 11 10:36:16 CEST 2002 - mmj@suse.de - -- Added patch from Chris Mason for volume label on reiserfs - -------------------------------------------------------------------- -Wed Jul 10 15:31:53 CEST 2002 - olh@suse.de - -- add mkfs.cramfs and fsck.cramfs to file list - -------------------------------------------------------------------- -Wed Jul 10 15:12:48 CEST 2002 - mmj@suse.de - -- Fixed nfs.5 to tell nfsver defaults to 3 [#16815] - -------------------------------------------------------------------- -Mon Jul 8 21:16:07 CEST 2002 - mmj@suse.de - -- Update to 2.11t which includes - * fdformat: remove test on major - * fdisk, hwclock and swap polishing - * Lots of translations - * cramfs tools includes from the kernel - * swap{on,off} honours /proc/swaps - * mount small fixups - -------------------------------------------------------------------- -Fri Jul 5 11:10:06 CEST 2002 - kukuk@suse.de - -- Use %ix86 macro - -------------------------------------------------------------------- -Mon Jul 1 14:23:38 CEST 2002 - bk@suse.de - -- get raw built on s390 and s390x -- remove %ifarchs s390 s390x for fdisk(needed for SCSI disks) - -------------------------------------------------------------------- -Mon Jun 17 10:52:49 CEST 2002 - mmj@suse.de - -- Added a fix for simpleinit exploit. - -------------------------------------------------------------------- -Thu Jun 13 17:01:38 CEST 2002 - olh@suse.de - -- disable hwclock ppc patch, maybe obsolete with recent kernels - -------------------------------------------------------------------- -Thu May 16 12:57:53 CEST 2002 - mmj@suse.de - -- Added manpage guessfstype(8) - -------------------------------------------------------------------- -Thu May 9 19:07:21 CEST 2002 - mmj@suse.de - -- Updated to util-linux-2.11r, including translations, x86-64 sup- - port and small bugfixes. - -------------------------------------------------------------------- -Sat Apr 13 14:19:46 CEST 2002 - mmj@suse.de - -- Updated to util-linux-2.11q, includes bugfixes. -- util-linux-mkswap.patch for ia64 was folded into mainline - -------------------------------------------------------------------- -Fri Apr 12 16:49:38 CEST 2002 - stepan@suse.de - -- added x86-64 support. - -------------------------------------------------------------------- -Thu Apr 4 20:06:09 CEST 2002 - ihno@suse.de - -- corrected printf to report shared memories sizes bigger than - 2 GByte correct (Bug #15585). It was reportet on s390x, but - should effect other 64-Bit systems as well. - -------------------------------------------------------------------- -Tue Mar 19 13:41:04 MET 2002 - mmj@suse.de - -- Updated to 2.11o. The hexdump patch have been dropped since it - was folded to mainline util-linux. - -------------------------------------------------------------------- -Fri Mar 15 12:08:15 CET 2002 - schwab@suse.de - -- Fix mkswap for ia64. - -------------------------------------------------------------------- -Mon Mar 4 16:21:41 MET 2002 - draht@suse.de - -- permissions fixes for write(1) and wall(1) - -------------------------------------------------------------------- -Fri Feb 1 14:46:45 CET 2002 - mmj@suse.de - -- Moved /usr/bin/logger to /bin/logger (needed by sysconfig) - -------------------------------------------------------------------- -Mon Jan 28 13:59:26 CET 2002 - mmj@suse.de - -- Added the guessfstype binary from msvec/fehr - -------------------------------------------------------------------- -Thu Jan 24 10:16:37 CET 2002 - ro@suse.de - -- modified fillup_and_insserv call (perl-hack not needed here) - -------------------------------------------------------------------- -Mon Jan 21 17:08:17 CET 2002 - mmj@suse.de - -- Merge NetBSD hexdump changes, fixes bugzilla #12801 - -------------------------------------------------------------------- -Thu Jan 10 14:18:21 CET 2002 - ro@suse.de - -- removed ACTIVATE_RAW_DEV - -------------------------------------------------------------------- -Mon Dec 31 19:05:45 UTC 2001 - adrian@suse.de - -- add patch for mips to create SGI partition tables with fdisk - -------------------------------------------------------------------- -Tue Dec 18 16:50:34 CET 2001 - bjacke@suse.de - -- add adjtimex - -------------------------------------------------------------------- -Mon Dec 10 18:22:06 CET 2001 - mmj@suse.de - -- Update to util-linux-2.11n - -------------------------------------------------------------------- -Tue Nov 20 14:48:25 CET 2001 - mmj@suse.de - -- Added a patch to 'wall' to remove unwanted newline (#12181) - -------------------------------------------------------------------- -Wed Nov 7 14:15:51 CET 2001 - kukuk@suse.de - -- Remove unneeded SPARC patch for hwclock - -------------------------------------------------------------------- -Sat Oct 13 20:59:29 CEST 2001 - kukuk@suse.de - -- Update to util-linux 2.11l - -------------------------------------------------------------------- -Wed Sep 12 00:13:22 MEST 2001 - garloff@suse.de - -- Fixed some dutch translations. (bug #10276) - -------------------------------------------------------------------- -Mon Sep 10 19:31:57 CEST 2001 - olh@suse.de - -- marry fdisk and AIX label again... - add lsprop for ppc - dumps the device tree in a human readable format - -------------------------------------------------------------------- -Mon Sep 3 09:50:11 CEST 2001 - kukuk@suse.de - -- Update to version 2.11i: - - blockdev: corrected ioctl numbers - - cal: fixed for multibyte locales - - line: new - - mount: added vxfs magic - -------------------------------------------------------------------- -Sat Sep 1 19:08:46 CEST 2001 - kukuk@suse.de - -- Let mount follow symlinks again - -------------------------------------------------------------------- -Wed Aug 29 16:00:18 CEST 2001 - kukuk@suse.de - -- Add new option to losetup manual page - -------------------------------------------------------------------- -Tue Aug 28 18:24:14 MEST 2001 - draht@suse.de - -- added timeout support for losetup (-t ) - -------------------------------------------------------------------- -Mon Aug 27 15:24:25 CEST 2001 - kukuk@suse.de - -- Add raw rc scripts, too - -------------------------------------------------------------------- -Sun Aug 26 08:51:29 CEST 2001 - bjacke@suse.de - -- added raw binary and put rawio into obsoletes and provides - -------------------------------------------------------------------- -Sat Aug 25 20:22:58 CEST 2001 - kukuk@suse.de - -- Fix path in getopt.1 manual page to example directory [Bug #9831] - -------------------------------------------------------------------- -Fri Aug 24 16:00:13 CEST 2001 - kukuk@suse.de - -- Small fix for hwclock on newer SPARCs - -------------------------------------------------------------------- -Mon Aug 13 15:51:59 CEST 2001 - ro@suse.de - -- changed neededforbuild to - -------------------------------------------------------------------- -Mon Jul 30 10:59:46 CEST 2001 - kukuk@suse.de - -- Update to util-linux-2.11h -- Add nologin program - -------------------------------------------------------------------- -Tue Jul 10 16:44:35 CEST 2001 - kukuk@suse.de - -- Remove swapdev from filelist - -------------------------------------------------------------------- -Tue Jul 10 13:10:23 CEST 2001 - kukuk@suse.de - -- Update to util-linux-2.11g - -------------------------------------------------------------------- -Wed Jun 6 17:25:33 EDT 2001 - bk@suse.de - -- added s390x to all ifnarch s390 - -------------------------------------------------------------------- -Fri Apr 20 12:09:40 CEST 2001 - kukuk@suse.de - -- Fix wall bug (character 80, 160, 240, are missing) [Bug #6962] - -------------------------------------------------------------------- -Mon Mar 26 10:24:40 CEST 2001 - kukuk@suse.de - -- Add exception for broken i2o disk device numbering scheme, kernel - hacker are not able to fix this and make it right [Bug #5881]. - -------------------------------------------------------------------- -Sat Mar 24 15:27:56 CET 2001 - kukuk@suse.de - -- Update to util-linux 2.11b - -------------------------------------------------------------------- -Thu Mar 15 15:47:34 CET 2001 - kukuk@suse.de - -- Fix changing of partitions with ID 0 on SPARC -- Remove duplicate mount patch - -------------------------------------------------------------------- -Wed Mar 14 21:29:23 CET 2001 - schwab@suse.de - -- Don't use _syscallX on ia64. -- Fix missing includes. - -------------------------------------------------------------------- -Wed Mar 14 11:05:22 CET 2001 - kukuk@suse.de - -- Update to version 2.11a - -------------------------------------------------------------------- -Fri Mar 2 17:05:01 CET 2001 - kukuk@suse.de - -- enable write again - -------------------------------------------------------------------- -Mon Feb 12 15:23:14 CET 2001 - kukuk@suse.de - -- cmos.c: Use sys/io.h, fix PowerPC hack - -------------------------------------------------------------------- -Tue Feb 6 11:54:34 CET 2001 - ro@suse.de - -- wall.c: include time.h - -------------------------------------------------------------------- -Mon Feb 5 11:13:56 CET 2001 - kukuk@suse.de - -- Split hex to extra package -- Update to util-linux-2.10s - -------------------------------------------------------------------- -Fri Feb 2 12:18:56 CET 2001 - werner@suse.de - -- Make swapon/swapoff more handy: - * Ignore swap files on ro mounted file systems - * If -a is given ignore already active devices at swapon - * If -a is given ignore not active devices at swapoff - -------------------------------------------------------------------- -Thu Jan 25 00:37:22 CET 2001 - ro@suse.de - -- added Provides: util - -------------------------------------------------------------------- -Fri Jan 12 10:08:29 MET 2001 - garloff@suse.de - -- Apply patch to lomount to allow all kerneli crypt algos to be - passed and allow to pass passwd with -k. -- losetup seems to support >2GB files just fine (#5433) - -------------------------------------------------------------------- -Tue Jan 2 12:04:33 CET 2001 - kukuk@suse.de - -- Save permissions of /etc/mtab [Bug #5027] - -------------------------------------------------------------------- -Tue Dec 5 15:25:45 CET 2000 - kukuk@suse.de - -- Search first in /etc/filesystems, then in /proc/filesystems - -------------------------------------------------------------------- -Tue Dec 5 11:24:34 CET 2000 - kukuk@suse.de - -- Use AIX/fdisk patch from util-linux-2.10r -- Backport "guess filesystems" from util-linux-2.10r - -------------------------------------------------------------------- -Tue Dec 5 11:10:10 CET 2000 - schwab@suse.de - -- Don't use _syscallX on ia64. - - -------------------------------------------------------------------- -Mon Dec 4 09:27:28 CET 2000 - olh@suse.de - -- fix diff again - -------------------------------------------------------------------- -Sun Dec 3 00:09:16 CET 2000 - olh@suse.de - -- no segfaults with AIX disklabels - -------------------------------------------------------------------- -Wed Nov 29 18:21:25 CET 2000 - uli@suse.de - -- fixed to build on PPC - -------------------------------------------------------------------- -Mon Nov 27 19:03:20 CET 2000 - schwab@suse.de - -- Fix broken casts in hwclock. - -------------------------------------------------------------------- -Thu Nov 23 15:48:35 CET 2000 - bk@suse.de - -- temporary disable pivot_root on s390(2.4 kernel is not yet built) - -------------------------------------------------------------------- -Wed Nov 22 13:28:06 CET 2000 - schwab@suse.de - -- Add pivot_root to file list. - -------------------------------------------------------------------- -Mon Nov 20 11:37:35 CET 2000 - kukuk@suse.de - -- Fix pmac-utils to compile with new kernel - -------------------------------------------------------------------- -Fri Nov 17 19:40:20 CET 2000 - kukuk@suse.de - -- Fix hwclock to compile on PPC - -------------------------------------------------------------------- -Wed Nov 15 12:39:13 CET 2000 - kukuk@suse.de - -- Update util-linux to 2.10q, merge flushb.diff - -------------------------------------------------------------------- -Thu Nov 2 10:21:12 CET 2000 - kukuk@suse.de - -- Remove some of the last specfile changes - -------------------------------------------------------------------- -Wed Nov 1 14:17:07 CET 2000 - olh@suse.de - -- update pmac-utils for new powermacs, cleanup specfile - -------------------------------------------------------------------- -Fri Oct 20 14:58:09 CEST 2000 - kukuk@suse.de - -- Update util-linux to 2.10p -- Rename package from util to util-linux - -------------------------------------------------------------------- -Wed Sep 27 11:30:21 CEST 2000 - kukuk@suse.de - -- Allow NFS v3 with 2.2.17.SuSE - -------------------------------------------------------------------- -Tue Sep 26 17:54:23 CEST 2000 - kukuk@suse.de - -- Fix mount for new NFS kernel patch - -------------------------------------------------------------------- -Sat Sep 9 17:36:24 CEST 2000 - kukuk@suse.de - -- Remove tcsh dependency -- Update to util-linux 2.10o, use of /etc/filesystems is still broken - -------------------------------------------------------------------- -Fri Aug 25 17:05:50 MEST 2000 - pthomas@suse.de - -- use %{_mandir} and %{_infodir} exclusively. This allows building - from source rpm on platforms other than 7.0. - -------------------------------------------------------------------- -Wed Jul 19 00:50:48 CEST 2000 - bk@suse.de - -- s390: removed dasdfmt and silo, %ifnarch s390 for some non-s390 things. - -------------------------------------------------------------------- -Tue May 30 18:45:56 CEST 2000 - bk@suse.de - -- added dasdfmt and silo on s390 - -------------------------------------------------------------------- -Mon May 15 18:15:05 CEST 2000 - kukuk@suse.de - -- util-linux: Update to 2.10m - -------------------------------------------------------------------- -Wed Apr 26 11:22:54 CEST 2000 - kukuk@suse.de - -- flusb: Don't use kernel headers, even if we don't need them! - -------------------------------------------------------------------- -Wed Apr 19 13:56:28 CEST 2000 - kukuk@suse.de - -- util-linux: Update to 2.10l - -------------------------------------------------------------------- -Mon Apr 17 15:06:51 CEST 2000 - kukuk@suse.de - -- util-linux: Update to 2.10k - -------------------------------------------------------------------- -Thu Apr 13 15:57:45 CEST 2000 - kukuk@suse.de - -- Move /sbin/setserial to /bin/setserial, add compat link to - /sbin. This fixes [Bug 1084] and is necessary for FHS 2.1 - -------------------------------------------------------------------- -Wed Apr 12 15:43:05 CEST 2000 - kukuk@suse.de - -- Fix util-linux for Alpha - -------------------------------------------------------------------- -Wed Apr 12 14:36:41 CEST 2000 - kukuk@suse.de - -- util-linux: Update to 2.10j - -------------------------------------------------------------------- -Sun Apr 2 01:08:05 CEST 2000 - bk@suse.de - -- suse s390 team added support for s390 - -------------------------------------------------------------------- -Thu Mar 30 21:31:15 CEST 2000 - uli@suse.de - -- hwclock/PPC: added support for MK48T559 RTC chip used in MTX+ boards - -------------------------------------------------------------------- -Fri Mar 24 11:49:25 CET 2000 - kukuk@suse.de - -- Add Linux LVM partition tag to fdisk -- Fix a lot of more possible buffer overruns -- Fix some fdisk sunlabel bugs -- added BuildRoot fixes from nadvorni@suse.cz - -------------------------------------------------------------------- -Wed Mar 22 14:28:27 CET 2000 - kukuk@suse.de - -- Update util-linux to 2.10h -- Add clock again for non PPC platforms - -------------------------------------------------------------------- -Fri Mar 17 15:10:50 CET 2000 - uli@suse.de - -- now contains both hwclock and clock on PPC (/sbin/init.d/boot - chooses what to run at runtime) - -------------------------------------------------------------------- -Tue Mar 14 19:23:26 CET 2000 - schwab@suse.de - -- Add support for ia64. - -------------------------------------------------------------------- -Thu Mar 9 21:25:15 CET 2000 - kukuk@suse.de - -- fdisk: Fix -l for Mylex RAID controller - -------------------------------------------------------------------- -Tue Mar 7 17:23:57 CET 2000 - kukuk@suse.de - -- etc/filesystems: Add minix and reiserfs - -------------------------------------------------------------------- -Tue Mar 7 11:49:23 CET 2000 - kukuk@suse.de - -- mount: fix endian problem with minix fs - -------------------------------------------------------------------- -Tue Feb 15 12:11:50 CET 2000 - kukuk@suse.de - -- mount: Add hack for PPC/syscall mount problem - -------------------------------------------------------------------- -Sun Feb 13 05:16:13 CET 2000 - bk@suse.de - -- let rdev continue in case it stubles over a bad file in /dev (/dev/snd fix) - -------------------------------------------------------------------- -Fri Feb 4 17:14:07 CET 2000 - kukuk@suse.de - -- Make PPC clock parameter compatible to hwclock - -------------------------------------------------------------------- -Thu Feb 3 14:42:23 CET 2000 - kukuk@suse.de - -- Fix filelist for SPARC - -------------------------------------------------------------------- -Thu Feb 3 11:14:29 CET 2000 - kukuk@suse.de - -- util-linux: Update to 2.10f (mount security fix) - -------------------------------------------------------------------- -Sun Jan 23 15:45:08 CET 2000 - kukuk@suse.de - -- util-linux: Update to 2.10e - -------------------------------------------------------------------- -Tue Jan 18 19:18:08 CET 2000 - kukuk@suse.de - -- mount now looks at first in /etc/filesystems and then in - /proc/filesystems - -------------------------------------------------------------------- -Tue Jan 18 16:32:05 CET 2000 - ro@suse.de - -- fixed pmac-utils to build with 2.3 as well - -------------------------------------------------------------------- -Tue Jan 18 14:56:22 CET 2000 - kukuk@suse.de - -- Fix a lot of fdisk buffer overruns [Bug 1642] - -------------------------------------------------------------------- -Mon Jan 17 18:23:56 CET 2000 - kukuk@suse.de - -- Fix setserial for Linux 2.3.40 -- Remove write, is now in nkitb -- Build minix and bfs tools for SPARC -- Fix some buffer overflows in fdisk - -------------------------------------------------------------------- -Fri Dec 17 15:00:19 MET 1999 - kukuk@suse.de - -- util-linux: Update to 2.10d -- hex: Update to 1.2 -- Move manual pages to /usr/share/man - -------------------------------------------------------------------- -Tue Nov 30 18:28:14 CET 1999 - uli@suse.de - -- re-added hwclock link for PPC (2nd try) - -------------------------------------------------------------------- -Tue Nov 30 17:49:27 MET 1999 - uli@suse.de - -- re-added hwclock link for PPC - -------------------------------------------------------------------- -Mon Nov 15 12:39:41 MET 1999 - kukuk@suse.de - -- util-linux: Update to 2.10b - -------------------------------------------------------------------- -Sat Nov 13 15:36:37 MET 1999 - kukuk@suse.de - -- setserial: Add Patch for Sparc -- Fix filelist for Sparc - -------------------------------------------------------------------- -Wed Oct 27 04:03:42 CEST 1999 - garloff@suse.de - -- added flushb (moved here from ddrescue). -- fix bug in logger (remove trailing newlines). - -------------------------------------------------------------------- -Fri Oct 22 11:29:51 MEST 1999 - kukuk@suse.de - -- util-linux: Remove old patches for mk_loop_h - -------------------------------------------------------------------- -Sat Oct 16 16:40:13 MEST 1999 - kukuk@suse.de - -- util-linux: Update to 2.9z - -------------------------------------------------------------------- -Fri Oct 8 10:58:48 MEST 1999 - kukuk@suse.de - -- Update to util-linux-2.9y (execpt fdisk) - -------------------------------------------------------------------- -Tue Sep 14 18:14:53 CEST 1999 - uli@suse.de - -- added PMac-specific utils for PPC - -------------------------------------------------------------------- -Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de - -- ran old prepare_spec on spec file to switch to new prepare_spec. - -------------------------------------------------------------------- -Thu Aug 26 15:05:03 CEST 1999 - uli@suse.de - -- disabled hayesesp for PPC - -------------------------------------------------------------------- -Wed Aug 25 18:04:35 MEST 1999 - kukuk@suse.de - -- Don't install tsort, its now in textutils 2.0 - -------------------------------------------------------------------- -Tue Aug 24 10:11:06 MEST 1999 - kukuk@suse.de - -- Update to util-linux-2.9w (execpt fdisk) - -------------------------------------------------------------------- -Mon Aug 9 10:55:48 MEST 1999 - kukuk@suse.de - -- Update to util-linux-2.9v (execpt fdisk) - -------------------------------------------------------------------- -Tue Jul 20 18:01:29 CEST 1999 - garloff@suse.de - -- Added hex from Erich S. Raymond - -------------------------------------------------------------------- -Mon Jul 12 12:11:45 MEST 1999 - kukuk@suse.de - -- Add fdisk patch from Klaus G. Wagner -- Add mount patch from util-linux 2.9u - -------------------------------------------------------------------- -Tue Jul 6 12:23:47 MEST 1999 - kukuk@suse.de - -- update to util-linux-2.9t - -------------------------------------------------------------------- -Fri Jun 25 14:44:30 MEST 1999 - kukuk@suse.de - -- update to util-linux-2.9s - -------------------------------------------------------------------- -Wed Mar 3 11:25:50 MET 1999 - ro@suse.de - -- hwclock.c: always use busywait to get rtctime - (it's hard to find out at runtime if we will get an irq) - -------------------------------------------------------------------- -Tue Mar 2 00:42:15 MET 1999 - ro@suse.de - -- update to util-linux-2.9i -- update to setserial-2.15 -- using diffs from jurix and add-ons from kgw for compaq smart raid - -------------------------------------------------------------------- -Mon Feb 1 10:22:10 MET 1999 - ro@suse.de - -- rdev is not built on alpha - -------------------------------------------------------------------- -Mon Jan 18 21:29:36 MET 1999 - florian@suse.de - -- fixed one broken case to delete a partition in fdisk - -------------------------------------------------------------------- -Sun Dec 13 22:20:16 MET 1998 - bs@suse.de - -- fixed file list - -------------------------------------------------------------------- -Thu Dec 10 16:38:08 MET 1998 - fehr@suse.de - -- fix bug in fdisk - -------------------------------------------------------------------- -Tue Dec 8 15:43:23 MET 1998 - ro@suse.de - -- removed last from filelist -- added link /sbin/clock -> hwclock - -------------------------------------------------------------------- -Wed Nov 4 00:23:02 MET 1998 - ro@suse.de - -- fdisksunlabel: don't include scsi/scsi.h for glibc-2.0 - -------------------------------------------------------------------- -Fri Oct 30 11:46:38 MET 1998 - ro@suse.de - -- update to 2.9 / added hostid from previous diff -- copied some glibc changes from previous diff (strcpy..) - -------------------------------------------------------------------- -Thu Sep 17 13:04:14 MEST 1998 - ro@suse.de - -- define _GNU_SOURCE when using getopt - -------------------------------------------------------------------- -Mon Aug 31 16:12:36 MEST 1998 - ro@suse.de - -- full switch to util-linux 2.8 --- sync has moved to pkg fileutils --- chroot has moved to pkg sh_utils (has been there for a while) --- adopted hostid from previous suse-pkg - -------------------------------------------------------------------- -Mon Aug 24 10:46:33 MEST 1998 - ro@suse.de - -- switched to use mount from util-linux-2.8 - -------------------------------------------------------------------- -Tue Jun 23 10:46:45 MEST 1998 - ro@suse.de - -- added fdisk, sfdisk, cfdisk from util-linux-2.8 - (including man-pages,readmes) - -------------------------------------------------------------------- -Mon Nov 17 14:14:47 MET 1997 - ro@suse.de - -- changed /local/bin/perl5 in chkdupexe to /usr/bin/perl - -------------------------------------------------------------------- -Fri Oct 31 13:38:58 MET 1997 - ro@suse.de - -- temporarily removed mount-hacker - -------------------------------------------------------------------- -Wed Oct 29 23:44:37 MET 1997 - florian@suse.de - -- add changes from ms@suse.de for hostid.c - - -------------------------------------------------------------------- -Tue May 20 14:10:37 MEST 1997 - florian@suse.de - - -- only support kernel 2.0.x for nfs mounts, please use /bin/mount-hacker - for kernel 2.1.x - - -------------------------------------------------------------------- -Wed Apr 30 15:57:14 CEST 1997 - florian@suse.de - - -- update to mount 2.6g - - -------------------------------------------------------------------- -Sun Apr 13 23:04:29 MEST 1997 - florian@suse.de - - -- update to new version util-linux 2.6 - -- update to new version mount 2.6e - - - -------------------------------------------------------------------- -Sat Nov 2 17:35:11 CET 1996 - florian@suse.de - - -- update to mount 2.5p - - -------------------------------------------------------------------- -Thu Oct 17 16:05:09 CEST 1996 - florian@suse.de - - -- Update auf neue Version von mount 2.5o. - - -------------------------------------------------------------------- -Tue Sep 3 17:01:45 MET DST 1996 - florian@suse.de - - -- updated to new version mount 2.5m -- (u)mount now gives much better error messages - - -------------------------------------------------------------------- -Sun Aug 25 19:28:50 MET DST 1996 - bs@suse.de - -compile setterm with libtermcap and not libncurses -use newer mount instead of the old version in util-linux -(security fix) diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec deleted file mode 100644 index aa78a04..0000000 --- a/util-linux-systemd.spec +++ /dev/null @@ -1,1335 +0,0 @@ -# -# spec file for package util-linux-systemd -# -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. -# -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -# Please submit bugfixes or comments via http://bugs.opensuse.org/ -# - - -%if 0%{?suse_version} >= 1330 -%bcond_without enable_last -%else -%bcond_with enable_last -%endif - -Name: util-linux-systemd -%define _name util-linux -# WARNING: Never edit this file!!! Edit util-linux.spec and call pre_checkin.sh to update spec files: -%define _name util-linux -# To prevent dependency loop in automatic build systems, we want to -# build util-linux in parts. To build all at once, set build_all to 1. -# -# build_util_linux: First stage build builds all except: -# build_util_linux_systemd: Builds util-linux-systemd and uuidd. -# build_python_libmount: Builds python-libmount. -%define build_all 0 -# definitions for the main packages -# This two level indirect definition of Summary and Group is needed to -# simplify parsing of spec file by format_spec_file, -# source_validator and check-in QA scripts). -%define summary_ul A collection of basic system utilities -%define summary_uls A collection of basic system utilities -%define summary_pl Python bindings for the libmount library -%define group_ul System/Base -%define group_uls System/Base -%define group_pl System/Filesystems -%if "%{name}" == "python-libmount" -%define build_util_linux 0 -%define build_util_linux_systemd 0 -%define build_python_libmount 1 -# To prevent dependency loops, verify signature only in third stage. -%define main_summary %summary_pl -%define main_group %group_pl -%else -%if "%{name}" == "util-linux-systemd" -%define build_util_linux 0 -%define build_util_linux_systemd 1 -%define build_python_libmount 0 -%define main_summary %summary_uls -%define main_group %group_uls -%else -%define main_summary %summary_ul -%define main_group %group_ul -%if %build_all -%define build_util_linux 1 -%define build_util_linux_systemd 1 -%define build_python_libmount 1 -%else -%define build_util_linux 1 -%define build_util_linux_systemd 0 -%define build_python_libmount 0 -%endif -%endif -%endif -Summary: %main_summary -License: GPL-2.0+ -Group: %main_group -BuildRequires: audit-devel -BuildRequires: bc -BuildRequires: binutils-devel -BuildRequires: fdupes -BuildRequires: gettext-devel -BuildRequires: libcap-ng-devel -BuildRequires: libselinux-devel -BuildRequires: libsepol-devel -BuildRequires: libtool -BuildRequires: ncurses-devel -BuildRequires: pam-devel -BuildRequires: pkg-config -BuildRequires: readline-devel -BuildRequires: utempter-devel -BuildRequires: zlib-devel -# util-linux is part of VMInstall, but we can well build without it -# Helps shorten a cycle and eliminate a bootstrap issue -#!BuildIgnore: util-linux -%ifarch ppc ppc64 ppc64le -BuildRequires: librtas-devel -%endif -%if %build_util_linux_systemd -BuildRequires: socat -BuildRequires: systemd-rpm-macros -BuildRequires: pkgconfig(libsystemd) -%endif -%if %build_python_libmount -BuildRequires: python-devel -%endif -#BEGIN SECOND STAGE DEPENDENCIES -%if !%build_util_linux -%if %build_util_linux_systemd -BuildRequires: libblkid-devel -BuildRequires: libmount-devel -BuildRequires: libsmartcols-devel -BuildRequires: libuuid-devel -%endif -%if %build_python_libmount -BuildRequires: libmount-devel -%endif -%endif -#END SECOND STAGE DEPENDENCIES -Version: 2.30 -Release: 0 -# util-linux is a base package and uuidd pre-requiring pwdutils pulls -# that into the core build cycle. pwdutils also pulls in the whole -# ldap stack into it. Avoid this whole mess which is done only to -# make the rpm install check of uuidd happy which has support to work without -# these tools as well -#!BuildIgnore: pwdutils -Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.30/util-linux-%{version}.tar.xz -Source1: util-linux-rpmlintrc -Source4: raw.service -Source5: etc.raw -Source6: etc_filesystems -Source7: baselibs.conf -Source8: login.pamd -Source9: remote.pamd -Source10: su.pamd -Source11: su.default -Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.30/util-linux-%{version}.tar.sign -Source13: %{_name}.keyring -Source14: runuser.pamd -# klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 -# TODO: split to separate package -Source40: klogconsole.tar.xz -# XXX: Run a program in a new session and with controlling tty -Source22: setctsid.c -Source23: setctsid.8 -# XXX: ppc specific, still needed? -Source28: mkzimage_cmdline.8 -Source29: mkzimage_cmdline.c -Source31: addnote.c -# -Source51: blkid.conf -## -## util-linux patches -## -# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path -Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff -# PATCH-FEATURE-SLE util-linux-losetup-Add-support-for-setting-logical-blocksize.patch bsc931634 FATE319010 hare@suse.de -- Add support for setting logical blocksizes. -Patch1: util-linux-losetup-Add-support-for-setting-logical-blocksize.patch -# PATCH-BUG-FIX util-linux-lscpu-cleanup-DMI-detection-return-codes.patch bsc#1039360 msuchanek@suse.de -- lscpu: cleanup DMI detection return codes -Patch2: util-linux-lscpu-cleanup-DMI-detection-return-codes.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build -# -%if %build_util_linux -Supplements: filesystem(minix) -%if 0%{?suse_version} >= 1330 -Requires: group(tty) -%endif -Provides: fsck-with-dev-lock = %{version} -# bnc#651598: -Provides: util-linux(fake+no-canonicalize) -PreReq: %install_info_prereq permissions -Recommends: %{name}-lang = %{version} -Provides: eject = 2.1.0-166.8 -Provides: login = 4.0-33.7 -# File conflict of eject (up to 12.3 and SLE11). -Obsoletes: eject < 2.1.0-166.8 -# File conflict of login (up to 12.1 and SLE11). -Obsoletes: login < 4.0-33.7 -# File conflict of su and kill (up to 12.3 and SLE11). -# It should be coreutils < 8.21-4, but coreutils provide Release-less symbol. -Conflicts: coreutils < 8.21 -%if 0%{?suse_version} < 1330 -# File conflict of sulogin and utmpdump (up to 12.3 and SLE11). -Conflicts: sysvinit-tools < 2.88+-87 -%endif -# File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3). -Conflicts: bash-completion <= 2.1-10 -# The preset is provided by the presets branding package since 0.4 (bsc#1012850) and since 12.2 in SLE (boo#1029775) -Conflicts: systemd-presets-branding < 12.2 -# bnc#805684: -%ifarch s390x -Obsoletes: s390-32 -Provides: s390-32 -%endif -# uuid-runtime appeared in SLE11 SP1 to SLE11 SP3 -Provides: uuid-runtime = %{version}-%{release} -Obsoletes: uuid-runtime < %{version}-%{release} -%if 0%{?suse_version} < 1330 -#BEGIN sysv compatibility hack -# After migration of raw init script to systemd, util-linux no more depends on -# fillup and insserv. Many poorly written packages implicitly depend on them -# without declaring it. Keep these dependencies in Leap 42 + SLE 12 line to -# prevent failures. -PreReq: %insserv_prereq %fillup_prereq -#END sysv compatibility hack -%endif -# -# Using "Requires" here would lend itself to help upgrading, but since -# util-linux is in the initial bootstrap, that is not a good thing to do: -# -Recommends: adjtimex -Recommends: time -Recommends: which -# -%if 0%{?suse_version} < 1330 -# Using Conflicts as util-linux-losetup-Add-support-for-setting-logical-blocksize -# now uses bit 5 of lo_flags with meaning LO_FLAGS_BLOCKSIZE bsc#966891 -# -Conflicts: kernel < 4.4 -%endif -%else -%if %build_python_libmount -%else -%if %build_util_linux_systemd -Supplements: packageand(util-linux:systemd) -# Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 -Provides: util-linux:/bin/logger -# Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 -Conflicts: util-linux < 2.25 -%systemd_requires -%else -# ERROR: No build_* variables are set. -%endif -%endif -%endif - -%if %build_util_linux -%description -This package contains a large variety of low-level system utilities -that are necessary for a Linux system to function. It contains the -mount program, the fdisk configuration tool, and more. - -%package -n libblkid1 -Summary: Filesystem detection library -Group: System/Filesystems - -%description -n libblkid1 -Library for filesystem detection. - -%package -n libblkid-devel -Summary: Development files for the filesystem detection library -Group: Development/Libraries/C and C++ -Requires: libblkid1 = %{version} - -%description -n libblkid-devel -Files needed to develop applications using the library for filesystem -detection. - -%package -n libblkid-devel-static -Summary: Development files for the filesystem detection library -Group: Development/Libraries/C and C++ -Requires: libblkid-devel = %{version} - -%description -n libblkid-devel-static -Files needed to develop applications using the library for filesystem -detection. - -%package -n libuuid1 -Summary: Library to generate UUIDs -Group: System/Filesystems - -%description -n libuuid1 -A library to generate universally unique IDs (UUIDs). - -%package -n libuuid-devel -Summary: Development files for libuuid1 -Group: Development/Libraries/C and C++ -Requires: libuuid1 = %{version} - -%description -n libuuid-devel -Files to develop applications using the library to generate universally -unique IDs (UUIDs). - -%package -n libuuid-devel-static -Summary: Development files for libuuid1 -Group: Development/Libraries/C and C++ -Requires: libuuid-devel = %{version} - -%description -n libuuid-devel-static -Files to develop applications using the library to generate universally -unique IDs (UUIDs). - -%package -n libmount1 -Summary: Device mount library -Group: System/Filesystems - -%description -n libmount1 -Library designed to be used in low-level utils like -mount(8) and /usr/sbin/mount. helpers. - -%package -n libmount-devel -Summary: Development files for libmount1 -Group: Development/Libraries/C and C++ -Requires: libmount1 = %{version} - -%package -n libmount-devel-static -Summary: Development files for libmount1 -Group: Development/Libraries/C and C++ -Requires: libmount-devel = %{version} - -%description -n libmount-devel-static -Files to develop applications using the libmount library. - -%description -n libmount-devel -Files to develop applications using the libmount library. - -%package -n libsmartcols1 -Summary: Column-based text sort engine -Group: System/Libraries - -%description -n libsmartcols1 -Library to sort human readable column-based text output. - -%package -n libsmartcols-devel -Summary: Development files for libsmartcols1 -Group: Development/Libraries/C and C++ -Requires: libsmartcols1 = %{version} - -%description -n libsmartcols-devel -Files to develop applications using the libsmartcols library. - -%package -n libsmartcols-devel-static -Summary: Development files for libsmartcols1 -Group: Development/Libraries/C and C++ -Requires: libsmartcols-devel = %{version} - -%description -n libsmartcols-devel-static -Files to develop applications using the libsmartcols library. - -%package -n libfdisk1 -Summary: Filesystem detection library -Group: System/Filesystems - -%description -n libfdisk1 -Library for filesystem detection. - -%package -n libfdisk-devel -Summary: Development files for the filesystem detection library -Group: Development/Libraries/C and C++ -Requires: libfdisk1 = %{version} - -%description -n libfdisk-devel -Files needed to develop applications using the library for filesystem -detection. - -%package -n libfdisk-devel-static -Summary: Development files for the filesystem detection library -Group: Development/Libraries/C and C++ -Requires: libfdisk-devel = %{version} - -%description -n libfdisk-devel-static -Files needed to develop applications using the library for filesystem -detection. - -%lang_package -%endif -%if %build_util_linux_systemd -%if %build_util_linux -%package systemd -Summary: %summary_uls -Group: %group_uls -Supplements: packageand(util-linux:systemd) -# Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 -Provides: util-linux:/usr/lib/systemd/system/fstrim.service -# Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 -Conflicts: util-linux < 2.25 - -%description systemd -%else -%description -%endif -This package contains low-level util-linux utilities that use systemd. - -%package -n uuidd -Summary: Helper daemon to guarantee uniqueness of time-based UUIDs -Group: System/Filesystems -Requires(pre): /usr/sbin/groupadd -Requires(pre): /usr/sbin/useradd -# uuidd bash-completion moved to a correct package -Conflicts: util-linux < 2.25 -%systemd_requires - -%description -n uuidd -The uuidd package contains a userspace daemon (uuidd) which guarantees -uniqueness of time-based UUID generation even at very high rates on -SMP systems. - -%endif -%if %build_python_libmount -%if %build_util_linux -%package -n python-libmount -Summary: %summary_pl -Group: %group_pl - -%description -n python-libmount -%else -%description -%endif -This package contains the python bindings for util-linux libmount -library. - -%endif -%prep -%setup -q -n %{_name}-%{version} -b 40 -%patch0 -p1 -%if 0%{?suse_version} < 1330 -# logical block size support in loop does not exist in Tumbleweed and upstream kernel yet -%patch1 -p1 -%endif -%patch2 -p1 -# -# setctsid -cp -p %{S:22} %{S:23} . - -%build -%if %build_util_linux -pushd ../klogconsole -# klogconsole build -make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" -popd -# setctsid build -rm -f setctsid -make %{?_smp_mflags} setctsid CFLAGS="%{optflags}" CC="%{__cc}" -# -#BEGIN SYSTEMD SAFETY CHECK -# With systemd, some utilities are built differently. Keep track of these -# sources to prevent building of systemd-less versions. -# -# WARNING: Never edit following line without doing all suggested in the echo below! -UTIL_LINUX_KNOWN_SYSTEMD_DEPS='./login-utils/lslogins.c ./misc-utils/logger.c ./misc-utils/uuidd.c ' -UTIL_LINUX_FOUND_SYSTEMD_DEPS=$(grep -rl 'HAVE_LIBSYSTEMD' . | fgrep '.c' | LC_ALL=C sort | tr '\n' ' ') -if test "$UTIL_LINUX_KNOWN_SYSTEMD_DEPS" != "$UTIL_LINUX_FOUND_SYSTEMD_DEPS" ; then - echo "List of utilities depending on systemd have changed. -Please check the new util-linux-systemd file list, file removal and update of Conflicts for safe update! -Then update configure options to build what needed. -Only then you can safely update following spec file line: -UTIL_LINUX_KNOWN_SYSTEMD_DEPS='$UTIL_LINUX_FOUND_SYSTEMD_DEPS'" - exit 1 -fi -#END SYSTEMD SAFETY CHECK -%else -#BEGIN SECOND STAGE MODIFICATIONS -# delete all make modules except wanted ones -sed -i '/^include/{ -%if %build_python_libmount - /libmount\/Makemodule.am/b 1 -%endif -%if %build_util_linux_systemd -# for lslogins - /login-utils/b 1 -# for logger and uuidd - /misc-utils/b 1 -# for fstrim.service and fstrim.timer - /sys-utils/b 1 -# for uninstalled libcommon required by uuidd - / lib\//b 1 -# for bash completions - /bash-completion/b 1 -# we always want tests (they are smart enough to skip irrelevant parts) - /tests/b 1 -%endif -%if %build_python_libmount - /libmount\/python/b 1 -%endif - d - :1 - }' Makefile.am libmount/Makemodule.am -%if %build_python_libmount -# trick: we do not want to build libmount, but include subdirs -# We close prefious if FALSE and open new pairing with endif -sed -i '/^if BUILD_LIBMOUNT/d -/^if ENABLE_GTK_DOC/i \ -if BUILD_LIBMOUNT -' libmount/Makemodule.am -# Do not install terminal-colors.d.5 -sed -i '/dist_man_MANS/d' lib/Makemodule.am -%endif -# disable all make modules except wanted ones -sed -i '/^if BUILD_/{ -%if %build_util_linux_systemd - /LSLOGINS/b 1 - /LOGGER/b 1 - /UUIDD/b 1 - /BASH_COMPLETION/b 1 -%endif - s/BUILD_.*/FALSE/ - :1 - } - ' libmount/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am sys-utils/Makemodule.am bash-completion/Makemodule.am -%if %build_util_linux_systemd -# trick: we do not want to build fstrim, but we want to install fstrim systemd connectors -# We close prefious if FALSE and open new pairing with endif -sed -i '/^if HAVE_SYSTEMD/i \ -endif\ -if TRUE -' sys-utils/Makemodule.am -# Do not install terminal-colors.d.5 -sed -i '/dist_man_MANS/d' lib/Makemodule.am -%endif -# Use installed first stage libraries -sed -i ' -# extra space to not replace pylibmount.la - s/ libmount\.la/ -lmount/g - s/libuuid\.la/-luuid/g - s/libblkid\.la/-lblkid/g - s/libsmartcols\.la/-lsmartcols/g - ' libmount/python/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am tests/helpers/Makemodule.am -# Ignore dependencies on optional (and not built in second stage) libraries -sed -i ' - s/UL_REQUIRES_BUILD(\[.*\], \[libuuid\])/dnl &/ - s/UL_REQUIRES_BUILD(\[.*\], \[libsmartcols\])/dnl &/ - ' configure.ac -sed -i ' - /SUBDIRS =/s/ po// - ' Makefile.am -#END SECOND STAGE MODIFICATIONS -%endif -# -# util-linux itself -# -# Version check for libutempter -# -uhead=$(find %_includedir -name utempter.h 2>/dev/null) -if test -n "$uhead" && grep -q utempter_add_record "$uhead" -then - uhead=--with-utempter -else - uhead=--without-utempter -fi -export SUID_CFLAGS="-fpie" -export SUID_LDFLAGS="-pie" -export LDFLAGS="-Wl,-z,relro,-z,now" -# override default localstatedir to /run -# only used for volatile data -# -# SUSE now supports only systemd based system. We do not build -# sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities. -AUTOPOINT=true autoreconf -vfi -%configure \ - --disable-silent-rules \ - --localstatedir=/run \ - --docdir=%{_docdir}/%{_name} \ - --with-audit \ - --with-gnu-ld \ - --with-ncursesw \ - --with-selinux \ - $uhead \ - --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ - --with-systemdsystemunitdir=%{_unitdir} \ - --enable-libuuid-force-uuidd \ - --enable-sulogin-emergency-mount \ - --disable-use-tty-group \ - --enable-static \ - --disable-rpath \ - --enable-all-programs \ - --disable-reset \ - --disable-chfn-chsh \ - --disable-newgrp \ - --disable-vipw \ - --disable-pg \ -%if %{without enable_last} - --disable-last \ -%endif -%if %build_util_linux_systemd - --with-systemd \ - --enable-logger \ - --enable-lslogins \ - --enable-uuidd \ -%else - --without-systemd \ - --disable-logger \ - --disable-lslogins \ - --disable-uuidd \ -%endif -%if %build_python_libmount - --with-python \ -%else - --without-python \ -%endif - -# -# Safety check: HAVE_UUIDD should be always 1: -grep -q 'HAVE_UUIDD 1' config.h -make %{?_smp_mflags} -# -%if %build_util_linux -%{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29} -%{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31} -%endif - -%check -# mark some tests "known_fail" -# -%if 0%{?qemu_user_space_build} -export TS_OPT_fdisk_gpt_known_fail="yes" -export TS_OPT_fdisk_oddinput_known_fail="yes" -export TS_OPT_fdisk_sunlabel_known_fail="yes" -export TS_OPT_fincore_count_known_fail="yes" -export TS_OPT_libfdisk_gpt_known_fail="yes" -export TS_OPT_misc_flock_known_fail="yes" -export TS_OPT_misc_ionice_known_fail="yes" -export TS_OPT_misc_swaplabel_known_fail="yes" -export TS_OPT_kill_name_to_number_known_fail="yes" -export TS_OPT_kill_print_pid_known_fail="yes" -export TS_OPT_kill_queue_known_fail="yes" -export TS_OPT_uuid_uuidd_known_fail="yes" -# unsupported syscall in script(1) ... might be fixed in qemu -export TS_OPT_script_known_fail="yes" -# may segfault on qemu-user-space -export TS_OPT_misc_setarch_known_fail="yes" -%endif -# -# hacks -export PATH="$PATH:/sbin:/usr/sbin" -# -# do the check but don't abort yet -result="0" -make %{?_smp_mflags} check || result="1" -# -# always show test diffs (inclusive known_fail) and exit result -diffs_files="$(find tests/diff -type f | sort)" -echo "$diffs_files" | xargs -r cat -exit "$result" - -%install -%if %build_util_linux -mkdir -p %{buildroot}{%{_sysconfdir}/{pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} -install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf -install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login -install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote -install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser -install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l -install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su -install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l -install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su -pushd ../klogconsole -# klogconsole install -make install DEST=%{buildroot} -popd -%endif -# -# util-linux install -# -%make_install -rm -f %{buildroot}%{python_sitearch}/libmount/*.*a -%if %build_util_linux -#UsrMerge -ln -s %{_bindir}/kill %{buildroot}/bin -ln -s %{_bindir}/su %{buildroot}/bin -ln -s %{_bindir}/dmesg %{buildroot}/bin -ln -s %{_bindir}/more %{buildroot}/bin -ln -s %{_bindir}/mount %{buildroot}/bin -ln -s %{_bindir}/umount %{buildroot}/bin -ln -s %{_bindir}/findmnt %{buildroot}/bin -ln -s %{_bindir}/lsblk %{buildroot}/bin -ln -s %{_sbindir}/agetty %{buildroot}/sbin -ln -s %{_sbindir}/blockdev %{buildroot}/sbin -ln -s %{_sbindir}/cfdisk %{buildroot}/sbin -ln -s %{_sbindir}/ctrlaltdel %{buildroot}/sbin -ln -s %{_sbindir}/fdisk %{buildroot}/sbin -ln -s %{_sbindir}/fsck.minix %{buildroot}/sbin -ln -s %{_sbindir}/fsck.cramfs %{buildroot}/sbin -ln -s %{_sbindir}/hwclock %{buildroot}/sbin -ln -s %{_sbindir}/losetup %{buildroot}/sbin -ln -s %{_sbindir}/mkfs %{buildroot}/sbin -ln -s %{_sbindir}/mkfs.bfs %{buildroot}/sbin -ln -s %{_sbindir}/mkfs.minix %{buildroot}/sbin -ln -s %{_sbindir}/mkfs.cramfs %{buildroot}/sbin -ln -s %{_sbindir}/mkswap %{buildroot}/sbin -ln -s %{_sbindir}/nologin %{buildroot}/sbin -ln -s %{_sbindir}/pivot_root %{buildroot}/sbin -ln -s %{_sbindir}/raw %{buildroot}/sbin -ln -s %{_sbindir}/sfdisk %{buildroot}/sbin -ln -s %{_sbindir}/swapoff %{buildroot}/sbin -ln -s %{_sbindir}/swapon %{buildroot}/sbin -ln -s %{_sbindir}/blkid %{buildroot}/sbin -ln -s %{_sbindir}/findfs %{buildroot}/sbin -ln -s %{_sbindir}/fsck %{buildroot}/sbin -ln -s %{_sbindir}/switch_root %{buildroot}/sbin -ln -s %{_sbindir}/wipefs %{buildroot}/sbin -ln -s %{_sbindir}/fsfreeze %{buildroot}/sbin -ln -s %{_sbindir}/swaplabel %{buildroot}/sbin -ln -s %{_sbindir}/fstrim %{buildroot}/sbin -ln -s %{_sbindir}/chcpu %{buildroot}/sbin -#EndUsrMerge -install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/filesystems -%ifnarch ppc ppc64 -install -m 755 mkzimage_cmdline %{buildroot}%{_bindir} -install -m 644 %{S:28} %{buildroot}%{_mandir}/man8 -install -m 755 chrp-addnote %{buildroot}%{_bindir} -%endif -# setctsid install -install -m 755 setctsid %{buildroot}%{_sbindir} -install -m 444 setctsid.8 %{buildroot}%{_mandir}/man8/ -echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir}/flushb -chmod 755 %{buildroot}%{_sbindir}/flushb -# Install scripts to configure raw devices at boot time -install -m 644 $RPM_SOURCE_DIR%{_sysconfdir}.raw %{buildroot}%{_sysconfdir}/raw -install -m 644 $RPM_SOURCE_DIR/raw.service %{buildroot}%{_unitdir} -ln -sf service %{buildroot}%{_sbindir}/rcraw -# upstream moved getopt examples from datadir to docdir but we keep -# the old location because we would need to fix the manpage first -mv %{buildroot}%{_docdir}/%{_name}/getopt %{buildroot}%{_datadir}/ -# Stupid hack so we don't have a tcsh dependency -chmod 644 %{buildroot}%{_datadir}/getopt/getopt*.tcsh -# login is always and only in /bin -mv %{buildroot}%{_bindir}/login %{buildroot}/bin/ -# arch dependent -%ifarch s390 s390x -rm -f %{buildroot}%{_sysconfdir}/fdprm -rm -f %{buildroot}%{_sbindir}/fdformat -rm -f %{buildroot}%{_sbindir}/hwclock -#UsrMerge -rm -f %{buildroot}/sbin/hwclock -#EndUsrMerge -rm -f %{buildroot}%{_sbindir}/klogconsole -rm -f %{buildroot}%{_bindir}/setterm -rm -f %{buildroot}%{_sbindir}/tunelp -rm -f %{buildroot}%{_mandir}/man8/fdformat.8* -rm -f %{buildroot}%{_mandir}/man8/hwclock.8* -rm -f %{buildroot}%{_mandir}/man8/klogconsole.8* -rm -f %{buildroot}%{_mandir}/man8/tunelp.8* -%endif -%ifarch ia64 %sparc m68k -rm -f %{buildroot}%{_mandir}/man8/cfdisk.8* -rm -f %{buildroot}%{_mandir}/man8/sfdisk.8* -rm -f %{buildroot}%{_sbindir}/cfdisk -#UsrMerge -rm -f %{buildroot}/sbin/cfdisk -#EndUsrMerge -rm -f %{buildroot}%{_sbindir}/sfdisk -#UsrMerge -rm -f %{buildroot}/sbin/sfdisk -#EndUsrMerge -%endif -%ifarch ia64 m68k -rm -f %{buildroot}%{_sbindir}/fdisk -#UsrMerge -rm -f %{buildroot}/sbin/fdisk -#EndUsrMerge -rm -f %{buildroot}%{_mandir}/man8/fdisk.8* -%endif -%find_lang %{name} %{name}.lang -# create list of setarch(8) symlinks -find %{buildroot}%{_bindir}/ -regextype posix-egrep -type l \ - -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)$" \ - -printf "%{_bindir}/%f\n" >> %{name}.files -find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ - -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)\.8.*" \ - -printf "%{_mandir}/man8/%f*\n" >> %{name}.files -%else -# install systemd files manually, don't use Makefile that expect build of utilities and its dependencies. -%endif -%if %build_util_linux_systemd -mkdir -p %{buildroot}/bin -mkdir -p %{buildroot}%{_sbindir} -mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid -mkdir -p %{buildroot}/run/uuidd -ln -s %{_bindir}/logger %{buildroot}/bin -# clock.txt from uuidd is a ghost file -touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt -ln -sf /sbin/service %{buildroot}/usr/sbin/rcuuidd -ln -sf /sbin/service %{buildroot}/usr/sbin/rcfstrim -%if !%build_util_linux -%make_install -%endif -%endif -# link duplicate manpages and python bindings -%fdupes -s %{buildroot}%{_prefix} - -%if %build_util_linux -%pre -%{service_add_pre raw.service} - -%post -%{service_add_post raw.service} -%set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount -%set_permissions %{_bindir}/su -# Safely migrate PAM files from coreutils to util-linux -# (openSUSE 12.3->13.1, SLE11->SLE12) -# -# coreutils with su were upgraded (and su removed) before util-linux -# with su was installed (see the Conflicts above). If the admin edited -# the PAM file, the seemingly no more used modified file was saved as -# .rpmsave and the new clean file was installed. As we want -# "noreplace" upgrade, and the contents of the clean file contents has -# no changes, we should restore admin modification, and rename the -# clean file to .rpmnew, as it would happen if the file was not moved -# from one package to another. -for PAM_FILE in default/su pam.d/su pam.d/su-l ; do - if test -f %{_sysconfdir}/$PAM_FILE.rpmsave ; then - mv %{_sysconfdir}/$PAM_FILE %{_sysconfdir}/$PAM_FILE.rpmnew - mv %{_sysconfdir}/$PAM_FILE.rpmsave %{_sysconfdir}/$PAM_FILE - fi -done - -%preun -%{service_del_preun raw.service} - -%postun -%{service_del_postun raw.service} - -%verifyscript -%verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount -%verify_permissions -e %{_bindir}/su - -%post -n libblkid1 -p /sbin/ldconfig - -%postun -n libblkid1 -p /sbin/ldconfig - -%post -n libmount1 -p /sbin/ldconfig - -%postun -n libmount1 -p /sbin/ldconfig - -%post -n libsmartcols1 -p /sbin/ldconfig - -%postun -n libsmartcols1 -p /sbin/ldconfig - -%post -n libuuid1 -p /sbin/ldconfig - -%postun -n libuuid1 -p /sbin/ldconfig - -%post -n libfdisk1 -p /sbin/ldconfig - -%postun -n libfdisk1 -p /sbin/ldconfig - -%files lang -f %{name}.lang -%endif - -%if %build_util_linux_systemd -# fstrim(8) and fstrim.service are from different packages. But it's a oneshot -# service (timer), no restart needed on binary updates (unless path is changed). -%pre -n util-linux-systemd -%{service_add_pre fstrim.service fstrim.timer} - -%post -n util-linux-systemd -%{service_add_post fstrim.service fstrim.timer} - -%preun -n util-linux-systemd -%{service_del_preun fstrim.service fstrim.timer} - -%postun -n util-linux-systemd -%{service_del_postun fstrim.service fstrim.timer} - -%pre -p /bin/bash -n uuidd -/usr/sbin/groupadd -r uuidd 2>/dev/null || : -/usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ - -d /var/run/uuidd uuidd 2>/dev/null || : -%{service_add_pre uuidd.socket uuidd.service} - -%post -n uuidd -%{service_add_post uuidd.socket uuidd.service} - -%preun -n uuidd -%{service_del_preun uuidd.socket uuidd.service} - -%postun -n uuidd -%{service_del_postun uuidd.socket uuidd.service} -%endif - -%if %build_util_linux -%files -f %{name}.files -# Common files for all archs -%defattr(-,root,root) -# util-linux documentation files -%doc README.licensing -%doc COPYING -%doc Documentation/licenses/COPYING.BSD-3 -%doc Documentation/licenses/COPYING.LGPLv2.1 -%doc Documentation/licenses/COPYING.UCB -%doc Documentation/blkid.txt -%doc Documentation/cal.txt -%doc Documentation/col.txt -%doc Documentation/deprecated.txt -%doc Documentation/getopt.txt -%doc Documentation/howto-debug.txt -%doc Documentation/hwclock.txt -%doc Documentation/modems-with-agetty.txt -%doc Documentation/mount.txt -%doc Documentation/pg.txt -%{_unitdir}/raw.service -%config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw -%config(noreplace) %{_sysconfdir}/filesystems -%config(noreplace) %{_sysconfdir}/blkid.conf -%config(noreplace) %{_sysconfdir}/pam.d/login -%config(noreplace) %{_sysconfdir}/pam.d/remote -%config(noreplace) %{_sysconfdir}/pam.d/runuser -%config(noreplace) %{_sysconfdir}/pam.d/runuser-l -%config(noreplace) %{_sysconfdir}/pam.d/su -%config(noreplace) %{_sysconfdir}/pam.d/su-l -%config(noreplace) %{_sysconfdir}/default/su -#UsrMerge -/bin/kill -/bin/su -/bin/dmesg -/bin/more -/bin/mount -/bin/umount -/bin/findmnt -/bin/login -/bin/lsblk -/sbin/agetty -/sbin/blockdev -/sbin/ctrlaltdel -/sbin/fsck.minix -/sbin/fsck.cramfs -/sbin/losetup -/sbin/mkfs -/sbin/mkfs.bfs -/sbin/mkfs.minix -/sbin/mkfs.cramfs -/sbin/mkswap -/sbin/nologin -/sbin/pivot_root -/sbin/raw -/sbin/swapoff -/sbin/swapon -/sbin/blkid -/sbin/findfs -/sbin/fsck -/sbin/switch_root -/sbin/wipefs -/sbin/fsfreeze -/sbin/swaplabel -/sbin/fstrim -/sbin/chcpu -#EndUsrMerge -%{_bindir}/kill -%{_bindir}/su -%{_bindir}/eject -%{_bindir}/cal -%{_bindir}/chmem -%{_bindir}/chrt -%{_bindir}/col -%{_bindir}/colcrt -%{_bindir}/colrm -%{_bindir}/column -%{_bindir}/dmesg -%{_bindir}/fallocate -%{_bindir}/fincore -%{_bindir}/findmnt -%{_bindir}/flock -%{_bindir}/getopt -%{_bindir}/hexdump -%{_bindir}/ionice -%{_bindir}/ipcmk -%{_bindir}/ipcrm -%{_bindir}/ipcs -%{_bindir}/isosize -%if %{with enable_last} -%{_bindir}/last -%{_bindir}/lastb -%endif -%{_bindir}/line -%{_bindir}/look -%{_bindir}/lsblk -%{_bindir}/lscpu -%{_bindir}/lsipc -%{_bindir}/lslocks -%{_bindir}/lsmem -%{_bindir}/lsns -%{_bindir}/mcookie -%{_bindir}/mesg -%{_bindir}/more -%{_bindir}/mount -%{_bindir}/namei -%{_bindir}/nsenter -%{_bindir}/prlimit -%{_bindir}/rename -%{_bindir}/renice -%{_bindir}/rev -%{_bindir}/script -%{_bindir}/scriptreplay -%{_bindir}/setarch -%{_bindir}/setpriv -%{_bindir}/setsid -%{_bindir}/taskset -%{_bindir}/ul -%{_bindir}/umount -%{_bindir}/unshare -%{_bindir}/mountpoint -%{_bindir}/utmpdump -%{_bindir}/uuidgen -%{_bindir}/uname26 -%ifnarch ppc ppc64 -%{_bindir}/chrp-addnote -%{_bindir}/mkzimage_cmdline -%endif -%{_bindir}/wdctl -%{_sbindir}/addpart -%{_sbindir}/agetty -%{_sbindir}/blkid -%{_sbindir}/blkdiscard -# blkzone depends on linux/blkzoned.h -%if 0%{?suse_version} >= 1330 -%{_sbindir}/blkzone -%endif -%{_sbindir}/blockdev -%{_sbindir}/chcpu -%{_sbindir}/ctrlaltdel -%{_sbindir}/delpart -%{_sbindir}/findfs -%{_sbindir}/fsck -%{_sbindir}/fsck.minix -%{_sbindir}/fsck.cramfs -%{_sbindir}/fsfreeze -%{_sbindir}/fstrim -%{_sbindir}/ldattach -%{_sbindir}/losetup -%{_sbindir}/mkfs -%{_sbindir}/mkfs.bfs -%{_sbindir}/mkfs.minix -%{_sbindir}/mkfs.cramfs -%{_sbindir}/mkswap -%{_sbindir}/nologin -%{_sbindir}/partx -%{_sbindir}/pivot_root -%{_sbindir}/raw -%{_sbindir}/rcraw -%{_sbindir}/resizepart -%{_sbindir}/rtcwake -%{_sbindir}/runuser -%{_sbindir}/setctsid -%{_sbindir}/sulogin -%{_sbindir}/swaplabel -%{_sbindir}/swapoff -%{_sbindir}/swapon -%{_sbindir}/switch_root -%{_sbindir}/wipefs -%verify(not mode) %attr(0755,root,tty) %{_bindir}/wall -%{_bindir}/whereis -%verify(not mode) %attr(0755,root,tty) %{_bindir}/write -%{_sbindir}/zramctl -%{_mandir}/man1/kill.1.gz -%{_mandir}/man1/su.1.gz -%{_mandir}/man1/cal.1.gz -%{_mandir}/man1/chrt.1.gz -%{_mandir}/man1/col.1.gz -%{_mandir}/man1/colcrt.1.gz -%{_mandir}/man1/colrm.1.gz -%{_mandir}/man1/column.1.gz -%{_mandir}/man1/dmesg.1.gz -%{_mandir}/man1/eject.1.gz -%{_mandir}/man1/fallocate.1.gz -%{_mandir}/man1/fincore.1.gz -%{_mandir}/man1/flock.1.gz -%{_mandir}/man1/getopt.1.gz -%{_mandir}/man1/hexdump.1.gz -%{_mandir}/man1/ipcrm.1.gz -%{_mandir}/man1/ipcs.1.gz -%if %{with enable_last} -%{_mandir}/man1/last.1.gz -%{_mandir}/man1/lastb.1.gz -%endif -%{_mandir}/man1/line.1.gz -%{_mandir}/man1/login.1.gz -%{_mandir}/man1/look.1.gz -%{_mandir}/man1/lscpu.1.gz -%{_mandir}/man1/lsipc.1.gz -%{_mandir}/man1/lsmem.1.gz -%{_mandir}/man1/mcookie.1.gz -%{_mandir}/man1/mesg.1.gz -%{_mandir}/man1/more.1.gz -%{_mandir}/man1/namei.1.gz -%{_mandir}/man1/nsenter.1.gz -%{_mandir}/man1/ionice.1.gz -%{_mandir}/man1/prlimit.1.gz -%{_mandir}/man1/rename.1.gz -%{_mandir}/man1/rev.1.gz -%{_mandir}/man1/renice.1.gz -%{_mandir}/man1/setpriv.1.gz -%{_mandir}/man1/setsid.1.gz -%{_mandir}/man1/script.1.gz -%{_mandir}/man1/scriptreplay.1.gz -%{_mandir}/man1/setterm.1.gz -%{_mandir}/man1/taskset.1.gz -%{_mandir}/man1/ul.1.gz -%{_mandir}/man1/unshare.1.gz -%{_mandir}/man1/wall.1.gz -%{_mandir}/man1/whereis.1.gz -%{_mandir}/man1/write.1.gz -%{_mandir}/man1/ipcmk.1.gz -%{_mandir}/man1/mountpoint.1.gz -%{_mandir}/man1/utmpdump.1.gz -%{_mandir}/man1/runuser.1.gz -%{_mandir}/man1/uuidgen.1.gz -%{_mandir}/man5/fstab.5.gz -%{_mandir}/man5/terminal-colors.d.5.gz -%{_mandir}/man8/addpart.8.gz -%{_mandir}/man8/agetty.8.gz -%if 0%{?suse_version} >= 1330 -%{_mandir}/man8/blkzone.8.gz -%endif -%{_mandir}/man8/blockdev.8.gz -%{_mandir}/man8/chmem.8.gz -%{_mandir}/man8/ctrlaltdel.8.gz -%{_mandir}/man8/delpart.8.gz -%{_mandir}/man8/blkid.8.gz -%{_mandir}/man8/blkdiscard.8.gz -%{_mandir}/man8/switch_root.8.gz -%{_mandir}/man8/mkfs.bfs.8.gz -%{_mandir}/man8/mkfs.minix.8.gz -%{_mandir}/man8/findfs.8.gz -%{_mandir}/man8/fsck.8.gz -%{_mandir}/man8/fsck.cramfs.8.gz -%{_mandir}/man8/fsck.minix.8.gz -%{_mandir}/man8/isosize.8.gz -%{_mandir}/man8/ldattach.8.gz -%{_mandir}/man8/losetup.8.gz -%{_mandir}/man8/lslocks.8.gz -%{_mandir}/man8/lsns.8.gz -%{_mandir}/man8/mkfs.8.gz -%{_mandir}/man8/mkfs.cramfs.8.gz -%{_mandir}/man8/mkswap.8.gz -%{_mandir}/man8/mount.8.gz -%{_mandir}/man8/nologin.8.gz -%{_mandir}/man8/findmnt.8.gz -%{_mandir}/man8/fsfreeze.8.gz -%{_mandir}/man8/swaplabel.8.gz -%{_mandir}/man8/readprofile.8.gz -%{_mandir}/man8/chcpu.8.gz -%ifnarch ppc ppc64 -%{_mandir}/man8/mkzimage_cmdline.8.gz -%endif -%{_mandir}/man8/partx.8.gz -%{_mandir}/man8/pivot_root.8.gz -%{_mandir}/man8/raw.8.gz -%{_mandir}/man8/rtcwake.8.gz -%{_mandir}/man8/setarch.8.gz -%{_mandir}/man8/swapoff.8.gz -%{_mandir}/man8/swapon.8.gz -%{_mandir}/man8/umount.8.gz -%{_mandir}/man8/uname26.8.gz -%{_mandir}/man8/setctsid.8.gz -%{_mandir}/man8/wipefs.8.gz -%{_mandir}/man8/zramctl.8.gz -%{_mandir}/man8/fstrim.8.gz -%{_mandir}/man8/lsblk.8.gz -%{_mandir}/man8/resizepart.8.gz -%{_mandir}/man8/sulogin.8.gz -%{_mandir}/man8/wdctl.8.gz -%{_sbindir}/flushb -%{_sbindir}/readprofile -%dir %{_datadir}/getopt -%attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash -%attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh -# These directories should be owned by bash-completion. But we don't want to -# install them on build, so own these two directories: -%dir %{_datadir}/bash-completion -%dir %{_datadir}/bash-completion/completions -%{_datadir}/bash-completion/completions/* -%if %build_util_linux_systemd -%exclude %{_datadir}/bash-completion/completions/logger -%exclude %{_datadir}/bash-completion/completions/lslogins -%exclude %{_datadir}/bash-completion/completions/uuidd -%endif -%ifnarch ia64 m68k -#XXX: post our patches upstream -#XXX: call fdupes on /usr/share/man -#UsrMerge -/sbin/fdisk -#EndUsrMerge -%{_sbindir}/fdisk -%{_mandir}/man8/fdisk.8.gz -%endif -%ifnarch %sparc ia64 m68k -%{_mandir}/man8/cfdisk.8.gz -%{_mandir}/man8/sfdisk.8.gz -#UsrMerge -/sbin/cfdisk -/sbin/sfdisk -#EndUsrMerge -%{_sbindir}/cfdisk -%{_sbindir}/sfdisk -%endif -%ifnarch s390 s390x -%{_sbindir}/fdformat -#UsrMerge -/sbin/hwclock -#EndUsrMerge -%{_sbindir}/hwclock -%attr(744,root,root) %{_sbindir}/klogconsole -%{_bindir}/setterm -%{_sbindir}/tunelp -%{_mandir}/man8/fdformat.8.gz -%{_mandir}/man8/hwclock.8.gz -%{_mandir}/man8/klogconsole.8.gz -%{_mandir}/man8/tunelp.8.gz -%endif - -%files -n libblkid1 -%defattr(-, root, root) -%{_libdir}/libblkid.so.1 -%{_libdir}/libblkid.so.1.* - -%files -n libblkid-devel -%defattr(-, root, root) -%{_libdir}/libblkid.so -%dir %{_includedir}/blkid -%{_includedir}/blkid/blkid.h -%{_libdir}/pkgconfig/blkid.pc -%{_mandir}/man3/libblkid.3.gz - -%files -n libblkid-devel-static -%defattr(-, root, root) -%{_libdir}/libblkid.*a - -%files -n libmount1 -%defattr(-, root, root) -%{_libdir}/libmount.so.1 -%{_libdir}/libmount.so.1.* - -%files -n libmount-devel -%defattr(-, root, root) -%{_libdir}/libmount.so -%dir %{_includedir}/libmount -%{_includedir}/libmount/libmount.h -%{_libdir}/pkgconfig/mount.pc - -%files -n libmount-devel-static -%defattr(-, root, root) -%{_libdir}/libmount.*a - -%files -n libsmartcols1 -%defattr(-, root, root) -%{_libdir}/libsmartcols.so.1 -%{_libdir}/libsmartcols.so.1.* - -%files -n libsmartcols-devel -%defattr(-, root, root) -%{_libdir}/libsmartcols.so -%dir %{_includedir}/libsmartcols -%{_includedir}/libsmartcols/libsmartcols.h -%{_libdir}/pkgconfig/smartcols.pc - -%files -n libsmartcols-devel-static -%defattr(-, root, root) -%{_libdir}/libsmartcols.*a - -%files -n libuuid1 -%defattr(-, root, root) -%{_libdir}/libuuid.so.1 -%{_libdir}/libuuid.so.1.* - -%files -n libuuid-devel -%defattr(-, root, root) -%{_libdir}/libuuid.so -%dir %{_includedir}/uuid -%{_includedir}/uuid/uuid.h -%{_libdir}/pkgconfig/uuid.pc -%{_mandir}/man3/uuid* - -%files -n libuuid-devel-static -%defattr(-, root, root) -%{_libdir}/libuuid.*a - -%files -n libfdisk1 -%defattr(-, root, root) -%{_libdir}/libfdisk.so.1 -%{_libdir}/libfdisk.so.1.* - -%files -n libfdisk-devel -%defattr(-, root, root) -%{_libdir}/libfdisk.so -%dir %{_includedir}/libfdisk -%{_includedir}/libfdisk/libfdisk.h -%{_libdir}/pkgconfig/fdisk.pc - -%files -n libfdisk-devel-static -%defattr(-, root, root) -%{_libdir}/libfdisk.*a -%endif - -%if %build_util_linux_systemd -%if %build_util_linux -%files systemd -%else -%files -%endif -%defattr(-, root, root) -/bin/logger -%{_bindir}/logger -%{_bindir}/lslogins -#BEGIN bootstrap_hack -%if 0%{?suse_version} < 1330 -# Build images of some products use util-linux that does not come from this -# spec and does not own bash-completion dir. So we have to own own these two -# directories in util-linux-systemd as well: -%dir %{_datadir}/bash-completion -%dir %{_datadir}/bash-completion/completions -%endif -#END bootstrap_hack -%{_datadir}/bash-completion/completions/logger -%{_datadir}/bash-completion/completions/lslogins -%{_mandir}/man1/logger.1.gz -%{_mandir}/man1/lslogins.1.gz -%{_sbindir}/rcfstrim -%{_unitdir}/fstrim.service -%{_unitdir}/fstrim.timer - -%files -n uuidd -%defattr(-, root, root) -%{_sbindir}/uuidd -%attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid -%ghost %{_localstatedir}/lib/libuuid/clock.txt -%attr(-,uuidd,uuidd) %ghost %dir /run/uuidd -%{_datadir}/bash-completion/completions/uuidd -%{_mandir}/man8/uuidd.8.gz -%{_sbindir}/rcuuidd -%{_unitdir}/uuidd.service -%{_unitdir}/uuidd.socket -%endif - -%if %build_python_libmount -%if %build_util_linux -%files -n python-libmount -%else -%files -%endif -%defattr(-, root, root) -%{python_sitearch}/libmount -%endif - -%changelog diff --git a/util-linux-wall.dif b/util-linux-wall.dif new file mode 100644 index 0000000..43faf7b --- /dev/null +++ b/util-linux-wall.dif @@ -0,0 +1,11 @@ +--- util-linux-2.12q/login-utils/wall.c ++++ util-linux-2.12q/login-utils/wall.c +@@ -217,8 +217,6 @@ + if (cnt == 79 || ch == '\n') { + for (; cnt < 79; ++cnt) + putc(' ', fp); +- putc('\r', fp); +- putc('\n', fp); + cnt = 0; + } + carefulputc(ch, fp); diff --git a/util-linux-warn-nfsudp.diff b/util-linux-warn-nfsudp.diff new file mode 100644 index 0000000..3841c8c --- /dev/null +++ b/util-linux-warn-nfsudp.diff @@ -0,0 +1,118 @@ +Index: util-linux-2.12/mount/nfs.5 +================================================================================ +--- util-linux-2.12q/mount/nfs.5 ++++ util-linux-2.12q/mount/nfs.5 +@@ -201,9 +201,13 @@ + Mount the NFS filesystem using the TCP protocol instead of the + UDP protocol. This is the default, but in case it fails (many NFS servers only + support UDP) it will fallback and try UDP. ++.IP ++.B Before using NFS over UDP, please refer to the section WARNINGS below. + .TP 1.5i + .I udp + Mount the NFS filesystem using the UDP protocol. ++.IP ++.B Before using NFS over UDP, please refer to the section WARNINGS below. + .TP 1.5i + .I noacl + Assume no extended access control mechanisms like POSIX ACLs are used +@@ -217,6 +221,83 @@ + All of the non-value options have corresponding nooption forms. + For example, nointr means don't allow file operations to be + interrupted. ++.SH WARNINGS ++Using NFS over UDP on high-speed links such as Gigabit ++.BR "can cause silent data corruption" . ++.P ++The problem can be triggered at high loads, and is caused by problems in ++IP fragment reassembly. NFS read and writes typically transmit UDP packets ++of 4 Kilobytes or more, which have to be broken up into several fragments ++in order to be sent over the Ethernet link, which limits packets to 1500 ++bytes by default. This process happens at the IP network layer and is ++called fragmentation. ++.P ++In order to identify fragments that belong together, IP assigns a 16bit ++.I IP ID ++value to each packet; fragments generated from the same UDP packet ++will have the same IP ID. The receiving system will collect these ++fragments and combine them to form the original UDP packet. This process ++is called reassembly. The default timeout for packet reassembly is ++30 seconds; if the network stack does not receive all fragments of ++a given packet within this interval, it assumes the missing fragment(s) ++got lost and discards those it already received. ++.P ++The problem this creates over high-speed links is that it is possible ++to send more than 65536 packets within 30 seconds. In fact, with ++heavy NFS traffic one can observe that the IP IDs repeat after about ++5 seconds. ++.P ++This has serious effects on reassembly: if one fragment gets lost, ++another fragment ++.I from a different packet ++but with the ++.I same IP ID ++will arrive within the 30 second timeout, and the network stack will ++combine these fragments to form a new packet. Most of the time, network ++layers above IP will detect this mismatched reassembly - in the case ++of UDP, the UDP checksum, which is a 16 bit checksum over the entire ++packet payload, will usually not match, and UDP will discard the ++bad packet. ++.P ++However, the UDP checksum is 16 bit only, so there is a chance of 1 in ++65536 that it will match even if the packet payload is completely ++random (which very often isn't the case). If that is the case, ++silent data corruption will occur. ++.P ++This potential should be taken seriously, at least on Gigabit ++Ethernet. ++Network speeds of 100Mbit/s should be considered less ++problematic, because with most traffic patterns IP ID wrap around ++will take much longer than 30 seconds. ++.P ++It is therefore strongly recommended to use ++.BR "NFS over TCP where possible" , ++since TCP does not perform fragmentation. ++.P ++If you absolutely have to use NFS over UDP over Gigabit Ethernet, ++some steps can be taken to mitigate the problem and reduce the ++probability of corruption: ++.TP +1.5i ++.I Jumbo frames: ++Many Gigabit network cards are capable of transmitting ++frames bigger than the 1500 byte limit of traditional Ethernet, typically ++9000 bytes. Using jumbo frames of 9000 bytes will allow you to run NFS over ++UDP at a page size of 8K without fragmentation. Of course, this is ++only feasible if all involved stations support jumbo frames. ++.IP ++To enable a machine to send jumbo frames on cards that support it, ++it is sufficient to configure the interface for a MTU value of 9000. ++.TP +1.5i ++.I Lower reassembly timeout: ++By lowering this timeout below the time it takes the IP ID counter ++to wrap around, incorrect reassembly of fragments can be prevented ++as well. To do so, simply write the new timeout value (in seconds) ++to the file ++.BR /proc/sys/net/ipv4/ipfrag_time . ++.IP ++A value of 2 seconds will greatly reduce the probability of IPID clashes on ++a single Gigabit link, while still allowing for a reasonable timeout ++when receiving fragmented traffic from distant peers. + .SH FILES + .I /etc/fstab + .SH "SEE ALSO" +--- util-linux-2.12q/mount/nfsmount.c ++++ util-linux-2.12q/mount/nfsmount.c +@@ -737,8 +737,12 @@ + goto fail; + } + fsock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); +- } else ++ } else { + fsock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); ++ fprintf(stderr, ++ "Using NFS over UDP can cause data corruption.\n" ++ "Please refer to the WARNINGS section of the nfs(5) manual page.\n"); ++ } + if (fsock < 0) { + perror(_("nfs socket")); + goto fail; diff --git a/util-linux.changes b/util-linux.changes index ba8d776..274fc7b 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,2673 +1,3 @@ -------------------------------------------------------------------- -Mon Jul 3 12:38:36 UTC 2017 - schwab@suse.de - -- Make sure group tty is defined - -------------------------------------------------------------------- -Sun Jun 11 12:12:44 UTC 2017 - lnussel@suse.de - -- don't conflict with sysvinit-tools in Tumblweed anymore. Needed for Leap 15 - which wants to use a different release number scheme (lp150.x which produces - lower numbers than the conflict). - -------------------------------------------------------------------- -Thu Jun 8 21:21:12 UTC 2017 - sweet_f_a@gmx.de - -- Update to version 2.30: - * Many changes and improvements, most notably: - * The libblkid library has been improved for hybrid CDROM/DVD - media. - * The deprecated command tailf has been removed. Use "tail -f" - from coreutils. - * blkzone -- NEW COMMAND to run zone commands on block devices - that support Zoned Block Commands (ZBC) or Zoned-device ATA - Commands (ZAC). - * fincore -- NEW COMMAND to count pages of file contents in - core (memory). - * lsmem -- NEW COMMAND to list the ranges of available memory - with their online status. - * The command fallocate -- supports an "insert range" operation - now. - * The command "column -t|--table" has been modified to use - libsmartcols. It now provides nearly all of that library's - functionality from the command line. - * Security issues: - * hwclock - no longer makes any internal permission checks. The - System Administrator must set proper permissions to control - user access to the RTC. It is NOT recommended to use SUID. - * CVE-2016-2779 - This security issue is NOT FIXED yet. - * More details at: - https://www.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30-ReleaseNotes -- Drop upstreamed patch - arm64-lscpu-use-sysfs-for-table-access-if-available.patch -- Refreshed patch - util-linux-losetup-Add-support-for-setting-logical-blocksize.patch -- fix compiler warnings for mkzimage_cmdline - -------------------------------------------------------------------- -Thu Jun 8 16:28:41 UTC 2017 - msuchanek@suse.com - -- When when hypervisor_decode_sysfw fails continue with other - detection methods (bsc#1042991, bsc#1039360, bsc#1033718) - + util-linux-lscpu-cleanup-DMI-detection-return-codes.patch - -------------------------------------------------------------------- -Wed Apr 12 09:19:21 UTC 2017 - agraf@suse.com - -- Prefer sysfs exported SMBIOS3 tables in lscu (bsc#1033718) - + arm64-lscpu-use-sysfs-for-table-access-if-available.patch - -------------------------------------------------------------------- -Thu Apr 6 17:35:34 CEST 2017 - sbrabec@suse.com - -- To cover release numbers of both SLE12 SP3 and Leap 42.3, relax - release based conflict with bash-completion from 13.1 to 10. - -------------------------------------------------------------------- -Tue Apr 4 14:51:09 UTC 2017 - sweet_f_a@gmx.de - -- fix util-linux-losetup-Add-support-for-setting-logical-blocksize.patch - --logical-blocksize was behaving like --nooverlap - -------------------------------------------------------------------- -Fri Mar 17 17:18:28 CET 2017 - sbrabec@suse.com - -- Conflict with old systemd-presets-branding to ensure correct - preset migration (boo#1029775, bsc#1012850). - -------------------------------------------------------------------- -Thu Mar 16 22:44:12 CET 2017 - sbrabec@suse.com - -- Drop "codepage" fstab migration needed for SuSE Linux < 9.1 - (bsc#51950 (suse#36950)). - -------------------------------------------------------------------- -Tue Feb 28 17:27:58 CET 2017 - sbrabec@suse.com - -- Keep dependency on insserv and fillup for compatibilitiy reasons - in Leap 42.3. Too many poorly written packages depend on it. - (Marked as "sysv compatibility hack".) - -------------------------------------------------------------------- -Wed Feb 22 22:00:05 UTC 2017 - sweet_f_a@gmx.de - -- Update to version 2.29.2: - * su(1) security issue CVE-2017-2616 (bsc#1023041) - * minor bugfixes and enhancements - -------------------------------------------------------------------- -Fri Feb 10 10:40:23 UTC 2017 - fbui@suse.com - -- presets are managed by the branding presets package (bsc#1012850) - - The default activation state is defined by the branding preset - package. - - This also get rid of the only use of the rpm preset macros so we can - kill them. - -------------------------------------------------------------------- -Wed Feb 8 18:16:22 CET 2017 - sbrabec@suse.com - -- Merge SLE12 SP3 changes to make the package compatible with - Tumbleweed, SLE12 SP3 and Leap 42.3. -- Drop patch tests-script-race-on-force-only.patch from SLE12 SP3 - and Leap 42.3. Upstream has a different workaround. - https://github.com/karelzak/util-linux/issues/296 -- INCOMPATIBLE CHANGE for SLE12 SP3 and Leap 42.3: - losetup -L changes its meaning from SLE12 SP1&SP2 specific - --logical-blocksize to the upstream --nooverlap). - --logical-blocksize can be used only with long option - (bsc#966891). -- Include SLE12 + Leap 42 exclusive feature, implemented by - hare@suse.de: - * losetup: Add support for setting logical blocksizes - (bsc#931634, FATE#319010) - + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch - SLE12 & Leap 42 specific changes: - * Fix for SLE12: bsc#956540, SLE12 SP1: bsc#953691, Leap 42.1: - boo#954482, was obsoleted by the systemd update, and skipped. - * Remove --enable-ncurses that is intended to force non-wide - ncurses (boo#978993). - * Make release-dependent conflict with old sysvinit-tools SLE - specific, as it is required only for SLE 11 upgrade, - and breaks openSUSE staging builds (boo#994399). - * Obsolete these patches, now upstreamed: - * Drop upstreamed patches - (tests-script-race-on-force-only.patch, - util-linux-libmount-ignore-redundant-slashes.patch, - util-linux-sfdisk-show-pt-geometry-1.patch, - util-linux-sfdisk-show-pt-geometry-2.patch, - util-linux-sfdisk-show-pt-geometry-3.patch, - util-linux-libblkid-partition-loop.patch, - util-linux-libblkid-wipe-offset.patch, - util-linux-mount-reuse-loop-1.patch, - util-linux-mount-reuse-loop-2.patch, - util-linux-mount-reuse-loop-3.patch, - util-linux-mount-reuse-loop-4.patch, - util-linux-loop-reuse-01.patch, util-linux-loop-reuse-02.patch, - util-linux-loop-reuse-03.patch, util-linux-loop-reuse-04.patch, - util-linux-loop-reuse-05.patch, util-linux-loop-reuse-06.patch, - util-linux-loop-reuse-07.patch, util-linux-loop-reuse-08.patch, - util-linux-loop-reuse-09.patch, util-linux-loop-reuse-10.patch, - util-linux-loop-reuse-12.patch, util-linux-loop-reuse-13.patch, - util-linux-loop-reuse-14.patch, util-linux-loop-reuse-15.patch, - util-linux-loop-reuse-16.patch, util-linux-loop-reuse-17.patch, - util-linux-loop-reuse-18.patch, util-linux-loop-reuse-19.patch, - util-linux-loop-reuse-20.patch, - util-linux-libmount-cifs-is_mounted.patch). - * Refreshed patches - (make-sure-sbin-resp-usr-sbin-are-in-PATH.diff, - util-linux-losetup-Add-support-for-setting-logical-blocksize.patch). - -------------------------------------------------------------------- -Tue Feb 7 20:07:55 CET 2017 - sbrabec@suse.com - -- Update to version 2.29.1: - * lscpu: add aarch64 specific names - * lubmount: Disable disable ro/rw mtab checks (bsc#1012632) - * More details at: - https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29.1-ReleaseNotes - -------------------------------------------------------------------- -Tue Feb 7 18:31:04 CET 2017 - sbrabec@suse.com - -- Replace raw initscript by a systemd service doing the same thing. - Based on previous work of fcrozat@suse.com (FATE#321122). - -------------------------------------------------------------------- -Thu Jan 5 12:34:33 UTC 2017 - sweet_f_a@gmx.de - -- don't install bash-completions for uninstalled binaries (chfn, - chsh, newgrp, pg) -- for now remove procps dependency which is only needed for tests - because it pulls systemd - -------------------------------------------------------------------- -Thu Dec 15 09:26:01 UTC 2016 - fbui@suse.com - -- Replace pkgconfig(libsystemd-*) with pkgconfig(libsystemd) - - libsystemd-* libs were deprecated and are gone now. - -------------------------------------------------------------------- -Wed Dec 7 16:12:55 CET 2016 - sbrabec@suse.com - -- Remove no more supported --enable-libmount-force-mountinfo. - There is --enable-libmount-support-mtab, disabled by default, - exactly as we need. - -------------------------------------------------------------------- -Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de - -- Update to version 2.29 (FATE#322090) - * cal: possible to specify month by name (e.g. "cal January - 2017") and use relative placeholders (cal "+1 month") - * fdisk(8) allows to wipe newly created partitions; the feature - is possible to control by new command line option - --wipe-partitions[==auto|never|default]. - * findmnt --verify: the command scans /etc/fstab and tries to - verify the configuration. - * mount(8) now rejects requests to create another device and - mount filesystem for the same backing file. The command - `losetup --nooverlap` reuses loop device if already exists - for the same backing file. All the functionality calculate - with offset and sizelimit options of course, so it's fine to - have multiple regions (partitions) in the same image file and - mount all of them in the same time. The restriction is that - the regions should not overlap. - * lscpu supports the "drawer" topology for IBM S/390. - * sfdisk: Support for deprecated --show-pt-geometry (bsc#990531). - * libmount: various issues with cifs mount - (bsc#982331, bsc#987176). - * libblkid: Prevent infinite loop DoS while parsing DOS partition - tables (bsc#988361, CVE-2016-5011). - * More details at: - http://karelzak.blogspot.de/2016/10/util-linux-v229-whats-new.html - https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes -- refresh make-sure-sbin-resp-usr-sbin-are-in-PATH.diff - -------------------------------------------------------------------- -Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de - -- Update to version 2.28.2, bugfix release, see - https://www.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes - -------------------------------------------------------------------- -Thu Aug 11 13:24:34 UTC 2016 - sweet_f_a@gmx.de - -- Update to version 2.28.1, bugfix release, see - https://www.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes -- Remove util-linux-libblkid-wipe-offset.patch (upstream) -- use the new configure option --enable-libuuid-force-uuidd - instead of sed'ing configure.ac - -------------------------------------------------------------------- -Thu Aug 11 10:21:35 UTC 2016 - olaf@aepfle.de - -- Install klogconsole with read permissions (bnc#990837) - -------------------------------------------------------------------- -Mon Jul 11 07:29:18 UTC 2016 - dimstar@opensuse.org - -- BuildIgnore util-linux: it's part of VMInstall, hence part of - every package build. util-linux itself can be built without its - own presence though. Helps with some rare bootstrap issues (when - librtas changes soname for example). -- Drop usage of gpg-offline: this has long been migrated to a - source service that checks signatures on checkin already (osc - service lr source_validatory). - -------------------------------------------------------------------- -Mon Jun 13 11:37:33 UTC 2016 - dimstar@opensuse.org - -- Do not BuildRequires bash-completion: this is tempting, but it - pulls bash-completion and its entire dependency stack into Ring0, - which is inacceptable. Pass the correct path - (%{_datdir}/bash-completion/completions) via - --with-bashcompletiondir to configure. - -------------------------------------------------------------------- -Thu May 19 14:29:27 CEST 2016 - sbrabec@suse.com - -- blkid: Wipe corect area for probes with offset (bsc#976141, - util-linux-libblkid-wipe-offset.patch). - -------------------------------------------------------------------- -Tue Apr 26 18:24:40 CEST 2016 - sbrabec@suse.com - -- Remove incorrect --with-bashcompletiondir that breaks - bash-completion, use path in bash-completion.pc instead - (boo#977259). - -------------------------------------------------------------------- -Fri Apr 22 16:41:34 CEST 2016 - sbrabec@suse.com - -- Add librtas-devel to BuildRequires on Power platforms. Needed for - proper function of lscpu (bsc#975082). - -------------------------------------------------------------------- -Wed Apr 13 21:29:00 UTC 2016 - sweet_f_a@gmx.de - -- fix build for openSUSE >= 13.1 (inclusive SLE 12) -- drop build for openSUSE < 13.1 -- remove old build conditions: sysvinit_tools, enable_su and - enable_eject -- cosmetics: reorder configure options - -------------------------------------------------------------------- -Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de - -- Update to version 2.28 (bsc#974301): - * Many changes and improvements, most notably: - * Now cfdisk, sfdisk and fdisk wipe all filesystem and RAID - signatures when creating a new disk label in interactive - mode. See --wipe[=auto|never|always]. - * lsns -- this NEW COMMAND lists information about all - currently accessible namespaces or about the given namespace. - * The command sfdisk supports new operations --delete, - --move-data and --reorder. - * The command blkdiscard supports a new option --zeroout to - zero-fill rather than discard a specified area. - * The command cal supports a new option --span to span the date - when displaying multiple months. - * The command chrt supports the DEADLINE scheduling class and - the new options --sched-runtime --sched-period and - --sched-deadline. - * The command logger supports RFC 5424 structured data through - the new options --sd-id and --sd-param. - * The command losetup supports a new option --direct-io. - * The command lsblk allows to sort output by unprinted columns. - * The command mount applies the nofail mount option to - ENOMEDIUM errors. - * The commands nsenter and unshare support a new option - --cgroup for work with cgroups namespaces (CLONE_NEWCGROUP). - * The library libmount has been improved to properly detect - already mounted btrfs subvolumes (bsc#947494, bsc#972684). - * The library libsmartcols has been massively improved to print - table ranges, multi-line cells, table titles and to support - continuous printing. - * The package build system and code have been improved to be - more portable to non-Linux systems (BSD, OSX). - * The package does not provide fallback solutions for - openat-family functions anymore. - * The python binding for libsmartcols is available in separate - project at https://github.com/ignatenkobrain/python-smartcols - * Other bug fixes (bsc#970404, bsc#975082, FATE#318444). - * Security issue: CVE-2016-2779 is NOT FIXED yet. -- Remove old util-linux-noenc-suse.patch - -------------------------------------------------------------------- -Tue Dec 1 10:27:17 UTC 2015 - sweet_f_a@gmx.de - -- enable last binary - -------------------------------------------------------------------- -Wed Nov 11 15:46:46 UTC 2015 - sweet_f_a@gmx.de - -- Update to version 2.27.1, bugfix release, see - https://www.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes - (fixes bsc#950778, FATE#320552). - -------------------------------------------------------------------- -Wed Nov 11 11:25:25 UTC 2015 - schwab@suse.de - -- Change condition for known fail markers from test for armv6 and aarch64 - architecture to test for qemu user-space build - -------------------------------------------------------------------- -Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com - -- Update to version 2.27: - * Many changes and improvements, most notably: - * lsipc: new command - * unshare provides a new option --propagation= - * mount(8) supports read-only binds in one (not atomic) step by - "bind,ro". - * GNU readline support in fdisk and sfdisk. - * JSON support in libsmartcols and findmnt, losetup, lsblk, - lslocks, sfdisk and lsipc. - * script has been massively improved to be more robust and less - complex (bsc#888678, bsc#930236). - * sulogin supports locked root accounts by --force - (bsc#968733, bsc#963399). - * colors support by default. It is possible to change this - with --disable-colors-default. - * more information in cfdisk - * fdisk provides new commands 'F' and 'i' - * cal supports the new options --twelve and --months - * rtcwake supports a news option --list-modes and --date, no - support RTC_ALM_READ and RTC_ALM_SET fallbacks any more. - * Many fixes, most notably: - * fsck: now supports -r {fd} (bsc#923777, bsc#903738) - * Fix fsck -C {fd} parsing (bsc#923777, bsc#903738) - * better handling of multi-path devices - (bsc#880468, bsc#924994) - * flock: improve timeout handling (bsc#926945) - * lsblk: display mountpoint even for top-level device - (bsc#943415) - * colcrt: fix buffer overflow (bsc#949754, CVE-2015-5218) - -------------------------------------------------------------------- -Wed Aug 19 21:18:11 CEST 2015 - sbrabec@suse.com - -- Add licenses. - -------------------------------------------------------------------- -Tue Aug 4 20:31:55 CEST 2015 - sbrabec@suse.com - -- Add %systemd_preset_pre and %systemd_preset_posttrans that will - do one shot presetting of uuidd.service on upgrade. - (bnc#900935#c46, FATE#318949, FATE#317727). -- Remove one shot presetting hacks. - -------------------------------------------------------------------- -Mon May 25 16:26:01 UTC 2015 - crrodriguez@opensuse.org - -- Build with --enable-libmount-force-mountinfo the rationale is - identical to the following commit message --> http://bit.ly/1eqf5GO - The default behaviour is undesirable and fragile when using - systemd. - -------------------------------------------------------------------- -Fri May 1 11:30:09 UTC 2015 - sweet_f_a@gmx.de - -- Update to util-linux-2.26.2: - * many fixes, most notable for logger, *fdisks and mount - * (lib)mount, add support for MS_LAZYTIME -- disable libmount/lock test to avoid random timeouts -- socat is needed for logger tests - -------------------------------------------------------------------- -Fri Mar 13 15:57:56 UTC 2015 - sweet_f_a@gmx.de - -- Update to util-linux-2.26.1: - * cal(1): do not segfault when TERM is not defined or wrong - (bnc#903440) - * logger(1): major fixes and enhancements - * agetty(8): support /usr/lib/os-release too - * some more fixes, mostly minor ones, see ReleaseNotes -- re-enable fixed tests (fdisk/bsd, ppc64le) - -------------------------------------------------------------------- -Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz - -- Update to util-linux-2.26: - * based on the git master branch of util-linux, remove backported - patches (util-linux-libblkid-unsafe-chars.patch, - util-linux-libblkid-overflow.patch) - * zramctl(8): this NEW COMMAND allows to control /dev/zramN - devices - * agetty(8): supports new option --reload to force already - running agetty processes to reprint the /etc/issue file - * cfdisk(8), sfdisk(8) and fdisk(8): support sfdisk-compatible - scripts; it's possible to save your partitioning layout to text - files and (re)use it in all fdisks - * fdisk(8), sfdisk(8): support new command-line option "--output - " to specify output columns for --list or print commands, - do not abort when fdisk -l when device cannot be opened - [bnc#886790], [bnc#893712], [bnc#890351] - * nsenter(1): has been updated to work with the latest kernel - changes in user namespaces supports new command-line option - --preserve-credentials - * unshare(1): has been updated to work with the latest kernel - changes in user namespaces supports new command-line option - "--setgroups=" - * swapon(8): supports new command-line option "-o " with - the same semantics as -o for mount(8); it's now possible to - specify swap options on the command line by the same string as - in fstab - * fdformat(8): supports new command-line options --from and --to - to specify tracks and --repair for broken floppies - * getopt(1): has been updated to the latest version (originally - maintained outside of util-linux) and refactored - * ldattach(8): has been improved to support GSM0710 and intro - modem commands - * logger(1): supports new command-line option --id= to specify - PID (or another ID) allows to specify --rfc3164 or --rfc5424 - syslog protocols - * lscpu: recognizes Unisys s-Par as hypervisor (FATE#318231) - * libfdisk: the library is distributed as a shared library with a - stable API and a standard header file - * libmount: provides a new simple API to monitor mount-table - changes (including changes in userspace mount options) - * libmount: Fix mount point lookup (and mount -a) if the path - contains // (bsc#931955). -- Fix lack of I18N support in util-linux-systemd (mis-compilation). - -------------------------------------------------------------------- -Sun Feb 22 17:15:41 UTC 2015 - crrodriguez@opensuse.org - -- Build with FULL RELRO. - -------------------------------------------------------------------- -Tue Feb 10 15:26:55 UTC 2015 - sweet_f_a@gmx.de - -- define upstream source for klogconsole to remove patches - * klogconsole-quiet.patch - * klogconsole.diff -- remove openSUSE 13.1 specific eject permissions, did not worked - anyway since eject-fpie.patch was removed -- always call autoreconf, not only for splitted packages, skip - autopoint (gettext) - -------------------------------------------------------------------- -Fri Feb 6 17:01:02 UTC 2015 - dimstar@opensuse.org - -- Do not try to unregister an info file (ipc.info.gz) which we do - not own. Already in May 2011, we stopped registering it: "do not - register ipc.info.gz (not provided by this package)". - -------------------------------------------------------------------- -Wed Feb 4 19:08:43 CET 2015 - sbrabec@suse.cz - -- libblkid: care about unsafe chars and possible buffer overflow - in cache (CVE-2014-9114, util-linux-libblkid-unsafe-chars.patch, - util-linux-libblkid-overflow.patch, bsc#907434) - -------------------------------------------------------------------- -Thu Jan 29 14:13:41 UTC 2015 - sweet_f_a@gmx.de - -- Update to version 2.25.2: mostly minor fixes - (including boo#908742) -- re-enable utmpdump and ipcs tests for all archs - -------------------------------------------------------------------- -Thu Jan 15 17:15:47 UTC 2015 - schwab@linux-m68k.org - -- Use util-linux:/bin/logger as split-provide, - /usr/lib/systemd/system/fstrim.service didn't exist in 13.1 - -------------------------------------------------------------------- -Sat Jan 10 02:24:25 UTC 2015 - jengelh@inai.de - -- Remove pam_securetty.so from /etc/pam.d/login. By definition, - local logins are always secure. Remote logins actually use - /etc/pam.d/remote by way of `/bin/login -h` (such as rlogind). - This solves the problem that root logins are erroneously rejected - when using kmscon(8) or `machinectl login`, because they use - ptys. - -------------------------------------------------------------------- -Tue Nov 11 10:57:12 UTC 2014 - schwab@suse.de - -- Remove known fail marker for fdisk/bsd on ppc, ppc64, s390, s390x - -------------------------------------------------------------------- -Fri Oct 17 21:18:43 CEST 2014 - sbrabec@suse.cz - -- Fix mis-compilation of libuuid without uuidd support - (bnc#900935). -- Fix uuidd socket activation (bnc#900935). -- Remove obsolete sysvinit script for uuidd. -- Remove no more needed uuidd permissions stuff. -- Replace PreReq for obsolete pwdutils by names of binaries. -- Add fstrim service scripts and rcfstrim helper. - -------------------------------------------------------------------- -Mon Sep 8 21:04:34 CEST 2014 - sbrabec@suse.cz - -- Install runuser and runuser-l PAM file - (runuser.pamd, bnc#892079, bnc#894833). - -------------------------------------------------------------------- -Wed Sep 3 16:21:57 CEST 2014 - sbrabec@suse.cz - -- Update to version 2.25.1: - * bug fixes (removed util-linux-bash-completion-blockdev.patch, - util-linux-slash-in-format-string.patch) - * translation updates - * correct support for plurals - * gpt: use real sector size to set PTMAGIC_OFFSET - * gpt: add Microsoft Storage Spaces GUID - * libmount: use -t for type.subtype in helpers API - * erase all traces of the long-obsolete xiafs - -------------------------------------------------------------------- -Tue Aug 26 12:15:02 UTC 2014 - schwab@suse.de - -- Always mark ipcs/limits and misc/setarch as known failure - -------------------------------------------------------------------- -Tue Aug 26 07:43:16 UTC 2014 - pgajdos@suse.com - -- fix parsing of slash in the format string [bnc#889934] (internal) -- added patches: - * util-linux-slash-in-format-string.patch - -------------------------------------------------------------------- -Thu Aug 21 18:34:59 CEST 2014 - sbrabec@suse.cz - -- Remove hacks for format_spec_file and source_validator - (bnc#891152, bnc#891829). -- Use macro defined summary that passes both SLE and openSUSE - check-in QA scripts (invented by Ruediger Oertel). - -------------------------------------------------------------------- -Fri Aug 8 22:17:29 CEST 2014 - sbrabec@suse.cz - -- Update to version 2.25 - (using work of Ruediger Meier ): - * based on the git master branch of util-linux - * many fixes (including bnc#869355, bnc#871951 and - bnc#871698#c49) - * new Python binding sub-package for libmount: python-libmount - * new library: libsmartcols - * new commands: lslogins, setpriv - * add fstrim systemd timer - * better systemd integration - * DROPPED command: - * cytune: Upstream decided to remove tool untested for years - that supports this old hardware. -- Dropped patches included in the upstream: - (*git) Included with no changes - (+git) Included with improvements - (!git) Included with differences - * support-other-tty-lines-not-vconsole.patch (*b9c7390) - * agetty-fooled-on-serial-line-due-plymouth.patch, - * sulogin-fooled-on-tty-line-due-plymouth.patch (*bb280f7) - * agetty-on-s390-on-dev-3270-tty1-line.patch (*f2bcda5) - * sulogin-does-not-find-any-console.patch (*624b204) - * util-linux-setarch-uname26.patch (*f6eb160) - * util-linux-ng-2.16-squashfs3-detect.patch (*11402f5) - * util-linux-lscpu-improve-hypervisor-detection.patch - (!b774473, b32488c, 5bd31c6, 0f0c558, 96ce475) - WARNING, INCOMPATIBLE CHANGE: "lscpu -p" no more reports - hypervisor, as it breaks standard behavior. Use standard output - instead! (FATE#310255) - * blkid-stop-scanning-on-I-O-error.patch (+296d96e) - * blkid-convert-superblocks-to-new-calling-convention.patch - (+37f4060) - * util-linux-libblkid-ext-probe.patch (*a1ca32f) - * util-linux-hwclock-drift-check.patch (*f196fd1) - * util-linux-hwclock-adjtime-check.patch (*db8fc5f) -- Dropped obsolete patch: - * util-linux-2.23.1-eject-fpie.patch (eject is no more SUID) - * util-linux-2.24-fdisk_remove_bogus_warnings.patch - (upstream fixed it in a different way) - * util-linux-HACK-boot.localfs.diff - (MOUNT_PRINT_SOURCE is no more referenced) -- Ported and renamed: - * util-linux-2.23.1-noenc-suse.diff - -> util-linux-noenc-suse.patch -- Split spec file to three stages: - * util-linux.spec: Everything that do not need python or systemd. - * util-linux-systemd.spec: Stuff that needs systemd: - util-linux-systemd and uuidd - NOTE: Not building systemd-less variants of utilities. - * python-libmount.spec: Just python-libmount -- Move bash-completion files to correct packages. -- Add patch util-linux-bash-completion-blockdev.patch. -- Add hacks to prevent damaging of spec files by format_spec_file - (bnc#891152, also edited util-linux-rpmlintrc). - -------------------------------------------------------------------- -Sat Jul 26 11:44:57 UTC 2014 - dimstar@opensuse.org - -- Really fix devel-static requires (libblkid-devel-static). - -------------------------------------------------------------------- -Sat Jul 26 09:39:30 UTC 2014 - coolo@suse.com - -- fix requires of devel-static packages - -------------------------------------------------------------------- -Thu Jul 24 18:45:53 CEST 2014 - dsterba@suse.cz - -- enable build of libmount-devel-static, libuuid-devel-static and - libblkid-devel-static - -------------------------------------------------------------------- -Tue May 27 21:17:40 UTC 2014 - sweet_f_a@gmx.de - -- use nologin from upstream (was added in 2.24) -- remove unknown configure options -- remove unused and outdated suse READMEs -- require bc for checks - -------------------------------------------------------------------- -Fri May 16 15:10:53 UTC 2014 - sweet_f_a@gmx.de - -- Prevent excessive clock drift calculations (bnc#871698, - util-linux-prevent-excessive-clock-drift-calculations.patch), - committed by sbrabec@suse.cz - -------------------------------------------------------------------- -Thu May 8 08:15:04 UTC 2014 - werner@suse.de - -- Modify patch support-other-tty-lines-not-vconsole.patch to - make it work on virtual console -- Modify patch agetty-on-s390-on-dev-3270-tty1-line.patch - to add the missed 3270 support upstream - -------------------------------------------------------------------- -Wed May 7 14:12:32 UTC 2014 - werner@suse.de - -- Add patch support-other-tty-lines-not-vconsole.patch - to be able to support console lines like xvc and hvc - -------------------------------------------------------------------- -Thu Apr 24 11:33:36 UTC 2014 - sweet_f_a@gmx.de - -- Update to util-linux-2.24.2: - addpart: - * minor man page improvements - blockdev: - * Some minor corrections to the manual - build-sys: - * don't connect _DEPENDENCIES and _LIBADD - * fix .h.in usage in libblkid and libmount - * libmount/python/__init__.py is always a dist file - chcpu: - * cleanup return codes - * cleanup stdout/stderr usage - delpart: - * minor man page improvements - dmesg: - * -w output not line-buffered - * don't report EPIPE - docs: - * update AUTHORS file - fallocate: - * Clarify that space can also be deallocated - fdformat: - * Some minor change to the manual - fdisk: - * don't colorize "foo " prefixes - flock: - * use nfs4 fallback on EBADF too - fsck: - * Some typographical corrections to the manual - fsck.minix: - * A few typographical corrections to the manual - fstrim: - * add hint to man page - getopt: - * getopt.1 The usual doc dir is /usr/share/doc, not .../docs - hwclock: - * fix possible hang and other set_hardware_clock_exact() issues - include/closestream: - * don't wipe errno on EPIPE - ipcs: - * cleanup jumplabel stlyes - * fix ipc_msg_get_info fallback case - * fix ipc_sem_get_info fallback case - * fix ipc_shm_get_info fallback case - * fix memleak in ipc_*_get_info functions - isosize: - * A few typographical changes to the manual - last: - * fix minor typos in the man page - lib/sysfs: - * make dirent d_type usage more robust - libblkid: - * add extra checks to XFS prober - libfdisk: - * fix logical partition reorder command - * make qsort_r() optional - * properly implement read-only mode - libmount: - * FS id and parent ID could be zero - * accept (deleted) path suffix in mountinfo file - * initialize *root to NULL in mnt_table_get_root_fs - login: - * fix minor typos in the man page - losetup: - * wait for udev - lscpu: - * cleanup, use _PATH_SYS_CPU/NODE - * don't abort if cache size is unknown - * don't assume filesystem supports d_type when searching for NUMA nodes - * read_hypervisor_dmi only fallback to memory scan on x86/x86_64 - mkfs: - * Some typographical changes to the manual - mkfs.bfs: - * One typographical correction to the manual - mkfs.cramfs: - * Some typographical corrections to the manual - mkfs.minix: - * Some typographical changes in the manual - mkswap: - * Some minor typographical corrections to the manual - more: - * improve formatting and wording of man page and help text - mount: - * apply "nofail" to MNT_ERR_NOSOURCE libmount error - * fix --all and nofail return code - * mount.8 Some typographical and prefix corrections to the manual - * remove obsolete and confusing statement from mount.8 - * update mount.8 about barrier mount options defaults - nologin: - * minor man page improvements - nsenter: - * fix set{gid,uid} order,drop supplementary groups - partx: - * Improve the typesetting of the manual - * make dirent d_type usage more robust - po: - * merge changes - * update cs.po (from translationproject.org) - * update da.po (from translationproject.org) - * update de.po (from translationproject.org) - raw: - * Improve the typesetting of the manual - renice: - * correct max priority in renice man page - runuser: - * fix minor typos in the man page - script: - * Also flush writes to timing file. - * time from end of read() call partially fixes #58 - scriptreplay: - * no need to skip first time value or last bytes fixes #58 - setarch: - * Fix ppc64le architectures - setpriv: - * Fix --apparmor-profile - su: - * don't use kill(0, ...) when propagate signal - * fix minor typos in the man page - sulogin: - * minor man page improvements - swaplabel: - * Improve the typesetting of the manual - * wrong version number in check - switch_root: - * make dirent d_type usage more robust - * verify initramfs by f_type, not devno - tests: - * add fdisk 'f' command MBR test - * add lscpu dump for ppc cpu with no cache size - * clean up backport - * cleanup, remove unused lscpu output - * update Py parse mountinfo test - * update libmount tabdiff tests - * use old output format - umount: - * fix typo in usage - * more robust success message for --all - unshare: - * include libmount.h to provide missing MS_* defines - utmpdump: - * minor man page improvements - vipw: - * minor man page improvements -- remove tty3270-on-serial-line-of-s390.patch (was already upstream - since 2.24.1) -- remove barrier_documentation.patch (applied upstream) -- rebase blkid-convert-superblocks-to-new-calling-convention.patch - -------------------------------------------------------------------- -Thu Apr 17 22:43:31 CEST 2014 - sbrabec@suse.cz - -- Enable socket activation needed by systemd service (bnc#872807). - -------------------------------------------------------------------- -Fri Apr 11 16:45:03 CEST 2014 - sbrabec@suse.cz - -- libblkid: Drop the broken ext2/ext3/ext4 discrimination logic - (util-linux-libblkid-ext-probe.patch, bnc#864703). - -------------------------------------------------------------------- -Fri Apr 11 16:27:11 CEST 2014 - hare@suse.de - -- Abort blkid probing on I/O errors (bnc#859062, - blkid-stop-scanning-on-I-O-error.patch, - blkid-convert-superblocks-to-new-calling-convention.patch, - http://www.spinics.net/lists/util-linux-ng/msg08976.html) - -------------------------------------------------------------------- -Tue Apr 1 18:49:26 UTC 2014 - sweet_f_a@gmx.de - -- remove unnecessarily added patches from SLE11: - * util-linux-update-default-commit-interval.patch, openSUSE has - never changed the default and neither will SLE12 - * sfdisk-warn-about-2TB-limit.patch, fixed by upstream years ago - * umount-avoid-readlink.patch, this patch only affects unused - code and the used code does not have this bug -- edit util-linux-lscpu-improve-hypervisor-detection.patch to not - change the default behaviour of "lscpu -p" as documented in it's - man page. Now this patch only affects the summary output. - -------------------------------------------------------------------- -Mon Mar 17 22:36:58 CET 2014 - sbrabec@suse.cz - -- Merge fixes and features from SLE11 (bnc#831868): - * Detect squashfs version <= 3 as squashfs3 and version >= 4 as - squashfs. (mszeredi@suse.cz, - util-linux-ng-2.16-squashfs3-detect.patch, bnc#666893) - * add sfdisk-warn-about-2TB-limit.patch (puzel@novell.com, - bnc#495657) - * Document barrier option in mount.8 (jack@suse.cz, - hvogel@suse.de, - util-linux-ng-2.19.1-barrier_documentation.patch, bnc#489740) - * lscpu: improve hypervisor detection (puzel@novell.com, - fate#310255) - - util-linux-lscpu-improve-hypervisor-detection.patch - * umount: avoid calling readlink on mountpoints if not necessary - - add: umount-avoid-readlink.patch (puzel@suse.com, bnc#794529) - * fix file conflict between util-linux and s390-32 - (puzel@suse.com, bnc#805684) - * util-linux-update-default-commit-interval.patch: - mount(8): update default commit interval (puzel@suse.com, - bnc#809480) - * Obsolete no more packaged uuid-runtime. -- Add uname26 (util-linux-setarch-uname26.patch, FATE#313476). - -------------------------------------------------------------------- -Thu Mar 6 09:43:34 UTC 2014 - werner@suse.de - -- Modify the patches - agetty-fooled-on-serial-line-due-plymouth.patch - sulogin-fooled-on-tty-line-due-plymouth.patch - to be able to disable plymouth if not already terminated due to - a hanging network service (bnc#866860) - -------------------------------------------------------------------- -Sun Feb 9 21:20:31 UTC 2014 - andreas.stieger@gmx.de - -- util-linux 2.24.1 -- agetty: - * support the special terminal on first serial line on a S/390 -- blkdiscard: - * BLKSSZGET fills in an int, not a uint64 -- blkid: - * escape quotes in the output - * simple typo -- blockdev: - * don't use HDIO_GETGEO -- build-sys: - * add --with-smack to config-gen.d - * fstrim depends on libmount -- chsh, chfn: - * add info about non-local support to the man pages -- dmesg: - * fix --raw zero timestamp for kmsg -- docs: - * add patching process to howto-contribute.txt - * update AUTHORS file - * update links to http //git.kernel.org/ web repository views - -fdisk: - * don't care about partition type - * fix printf stuff - * fix usage(), -l [] -- flock: - * Change the 'exit status' man page section to make more sense -- fsck: - * add ext4 to list of filesystems with progress bars in fsck man page -- fstrim: - * add --all to discard all filesystem - * cleanup usage() -- lib/path: - * add path_strdup() -- libblkid: - * (nilfs2) check also backup superblock - * detect alone PMBR - * fix memory leak in blkid_parse_tag_string() - * fix swap-area version -- libfdisk: - * (dos) be more verbose when change bootable flag - * (dos) fix free part counter - * (dos) warn on type 0 - * (gpt) add /home GUID - * (gpt) improve and cleanup recovery code - * (gpt) recover from corrupted primary/backup PT - * (sgi) generate partname according to partition position - * (sun) fix end sectors with +1 error -- libmount: - * add efivarfs to the list of pseudo filesystems - * add mnt_tag_is_valid() - * cleanup fix_optstr() regards to selinux and smack - * fix typo in smack path - * remove smackfs* option when SMACK not enabled -- lsblk: - * fix -D segfault -- lscpu: - * sort NUMA nodes to keep output human readable - * support discontinuous NUMA nodes - * support non sequentially numbering of CPUs -- man: - * Syntax and spelling fixes -- mkfs.minix: - * fix fscanf() format string [coverity scan] -- mkswap: - * fix compiler warning [-Wunused-variable] - * remove cruft from the man page -- mount: - * add note about "noauto" to --all description - * correct mount man page default iso9660 permission - * fix man mount page type - * improve -s man mage info - * make NAME=value tags usable for non-root - * mount.8 fix grammar - * update man page ext3/4 mount options -- partx: - * fix --update ranges and out of order tables -- po: - * merge changes - * update da.po (from translationproject.org) - * update de.po (from translationproject.org) - * update pt_BR.po (from translationproject.org) - * update zh_CN.po (from translationproject.org) -- pylibmount: - * correctly import from pylibmount.so - * import directly from pylibmount in tests - * remove unncessary subdirectory -- script: - * don't call TIOCGWINSZ in signal handler - * restore errno in signal handler - * use poll() rather then O_NONBLOCK -- setpriv: - * simplify usage() -- setterm: - * fix -dump man page info -- sulogin: - * use dirent->d_type when scans /dev -- taskset: - * fix PERMISSIONS section of taskset man page -- tests: - * update blkid swap tests - * update build-sys tests - * update lscpu tests -- textual: - * small inprovements to usage and man page of fstrim -- umount: - * fix umount by tag for non-roots -- unshare: - * add more hints about mount namespaces to the man page -- wipefs: - * call BLKRRPART when erase partition table -- removed patches: - * blkdiscard-BLKSSZGET-fills-in-an-int.patch, applied upstream -- modified patches: - * tty3270-on-serial-line-of-s390.patch, one hunk applied - upstream - ------------------------------------------------------------------- -Fri Feb 7 15:59:20 UTC 2014 - werner@suse.de - -- Add patch sulogin-does-not-find-any-console.patch to enable sulogin - to find suitable console device even if first is not usable (bnc#862078) - -------------------------------------------------------------------- -Thu Feb 6 10:03:30 UTC 2014 - werner@suse.de - -- Avoid that hanging plymouth locks terminal lines that is - add patch sulogin-fooled-on-tty-line-due-plymouth.patch and - modify patch agetty-fooled-on-serial-line-due-plymouth.patch - to remove any lock which had been left over. - -------------------------------------------------------------------- -Tue Feb 4 10:24:02 UTC 2014 - werner@suse.de - -- Modify patch agetty-on-s390-on-dev--3270-tty1-line.patch and - patch tty3270-on-serial-line-of-s390.patch to handle 3270 - terminals -- Really do not verify /usr/bin/eject - -------------------------------------------------------------------- -Mon Feb 3 16:16:36 UTC 2014 - werner@suse.de - -- Add patch agetty-on-s390-on-dev--3270-tty1-line.patch - to let agetty detect /dev/3270/tty1 as device not as baud rate - -------------------------------------------------------------------- -Tue Jan 28 09:37:57 UTC 2014 - speilicke@suse.com - -- Don't verify /usr/bin/eject, it lost the SUID bit and was dropped - from /etc/permissions (bnc#824406) - -------------------------------------------------------------------- -Thu Jan 23 12:40:06 UTC 2014 - werner@suse.de - -- Change patch agetty-fooled-on-serial-line-due-plymouth.patch - to sleep instead of sending breaks to terminal (bnc#774126). - -------------------------------------------------------------------- -Mon Jan 13 10:45:54 CET 2014 - fcrozat@suse.com - -- Ensure localstatedir value used by configure is /run (changed to that - value upstream since 2012). - -------------------------------------------------------------------- -Fri Jan 10 13:08:45 UTC 2014 - werner@suse.de - -- Add patch - agetty-fooled-on-serial-line-due-plymouth.patch - even with TTYReset=no it seems with systemd or plymouth the termios - flags become changed from under the first agetty on a serial system - console as the flags are locked (bnc#774126). - -------------------------------------------------------------------- -Tue Dec 10 16:10:27 UTC 2013 - sweet_f_a@gmx.de - -- Update to util-linux-2.24 - + Release highlights (2.24) - fdisk(8): - * the code has been completely refactored and moved to libfdisk - (the library does not have a stable API yet) - * user interface has been unified for all label types and it - supports colors - * GPT disk UUID, partition UUID and partition name modification - is supported now - pylibmount: - * this new library provides PYTHON BINDINGS for libmount; - use --with-python[=2|3] to enable the bindings - last(1) and lastb(1): - * the NEW IMPLEMENTATION has been merged from sysvinit to - util-linux and extended; now it supports command line options - --present, --since, and --time-format - * use --enable-deprecated-last to enable the old util-linux - last(1) implementation - swapon(8): - * the option --discard= and fstab mount option discard= allow - to explicitly specify 'pages' or 'once' discard policy. If no - policy is selected, the default behavior is to enable both. - See swapon.8 man page for more details. - libblkid and blkid(8): - * supports LOGUUID= for external logs (e.g. extN and XFS) - * generates a pseudo PARTUUID= for MBR partitions (based on MBR - Id, Linux kernel supports the same concept for root= command - line option) - agetty(8): - * supportes new issue file \S escape code to read information - from /etc/os-release - * the option -L allows to completely control CLOCAL flag - dmesg(1): - * supports new command line option --time-format to specify - time format - * supports new iso-8601 time format - hexdump(1): - * supports long options now - wall(1): - * the command is compatible with sysvinit implementation now - logger(1): - * supports new command line option --prio-prefix when logging - stdin - lscpu(1): - * allows to detect more hypervisor types and provides info - about Max and Min CPU Mhz - unshare(8): - * supports new command line options --fork and --mount-proc for - pid namespaces - wipefs(8): - * now wipes superblocks with incorrect checksums too - * supports new command line option --backup to backup erased - data to $HOME/wipefs--.bak - nologin(8): - * this command has been merged into util-linux, the command - politely refuses a login. -- Removed following patches now upstream - * eject-scsi-check-host_status-and-driver_status.patch - * more-fix-buffer-overflow.patch - * more-check-for-buffer-size-when-write-multibyte-char.patch - * more-guarantee-space-for-multibyte.patch -- Removed following patch because now pkg-config does that - * fdisk-tinfo.patch -- Refreshed following patches with updating version string - * util-linux-2.23.1-fdisk_remove_bogus_warnings.patch -- Added enable_last condition in case we don't want to use the last - binary from sysvinit-tools in future -- Upstream moved getopt examples from datadir to docdir but we keep - the old location because we would need to fix the manpage first. - -------------------------------------------------------------------- -Fri Nov 29 13:46:21 UTC 2013 - werner@suse.de - -- Add patch - tty3270-on-serial-line-of-s390.patch - to better support the first and second serial line on s390/x - -------------------------------------------------------------------- -Sun Nov 3 12:53:34 UTC 2013 - schwab@linux-m68k.org - -- blkdiscard-BLKSSZGET-fills-in-an-int.patch: Fix type mismatch in - blkdiscard - -------------------------------------------------------------------- -Fri Oct 25 18:52:01 CEST 2013 - sbrabec@suse.cz - -- Drop SUID flag for eject (bnc#824406). - -------------------------------------------------------------------- -Wed Oct 9 10:00:55 UTC 2013 - schwab@suse.de - -- No *fdisk on m68k - -------------------------------------------------------------------- -Wed Oct 2 18:55:22 CEST 2013 - sbrabec@suse.cz - -- Safely migrate su config files from coreutils to util-linux - (bnc#814626#c18). - -------------------------------------------------------------------- -Fri Sep 27 21:58:03 UTC 2013 - mgorse@suse.com - -- Add more-check-for-buffer-size-when-write-multibyte-char.patch and - more-guarantee-space-for-multibyte.patch -- check for buffer space with - multi-byte chars (BNC#829720). - -------------------------------------------------------------------- -Fri Sep 27 16:58:40 UTC 2013 - mgorse@suse.com - -- Add more-fix-buffer-overflow.patch (bnc#829720). - -------------------------------------------------------------------- -Fri Sep 13 07:06:19 UTC 2013 - werner@suse.de - -- Avoid build require gpg-offline twice - -------------------------------------------------------------------- -Wed Sep 11 20:54:24 CEST 2013 - sbrabec@suse.cz - -- Update to version 2.23.2: - nsenter(1): - * this NEW COMMAND provides command line interface to setns() - Linux syscall and allows to run program with namespaces of - other processes - unshare(1): - * supports new PID and USER namespaces - fdisk(8): - * provides experimental support for GUID Partition Table (GPT), - the implementation is still not complete and some (unimportant) - features are missing. - * ~50% of fdisk code has been refactored, this task is going to - be complete in the next release. The goal is to have libfdisk - shared between all fdisks. - partx(8): - * supports new "update" command (implemented by - BLKPG_RESIZE_PARTITION ioctl) - mount(8): - * supports new userspace mount option x-mount.mkdir[=] to - create mountpoints on demand - * the support for propagation flags has been improved, now the - flags could be specified in /etc/fstab and used together with - regular mount options. It's also possible to specify more - propagation flags together. This EXPERIMENTAL feature is - implemented by additional mount(2) syscalls, because Linux does - not allow to use propagation flags with another options or more - flags together. - umount(8): - * supports new command line option --recursive to recursively - unmount all sub-mounts for the specified mountpoint * supports - new command line option --all-targets to unmount all - mountpoints in the current namespace for the specified - filesystem * the options --recursive and --all-targets could be - used together - dmesg(1): - * supports new command line options --color, --human and - --nopager, the --human option enables relative times, colors and - pager support. - su(1): - * supports new command line options --group and --supp-group to - specify primary and supplementary groups - chfn(1) and chsh(1): - * the commands could be linked with libuser to support non-local - accounts modification (e.g. LDAP, etc). - kill(1): - * the command has been improved to be compatible with procps - version, the procps version is deprecated now, the util-linux - version is enabled by default. - blkdiscard(8): - * this NEW COMMAND discard sectors on a device (for example on - SSD disks) - sulogin(8): - * provides multi-console feature from SysVinit - findmnt(8): - * provides new columns FREQ, PASSNO, ID, OPT-FIELDS, PROPAGATION - lslocks(8): - * provides new column BLOCKER and detects blocked locks - lsblk(8): - * supports new command line option --scsi and new columns HCTL, - TRANsport VENDOR and REVision - swapon(8) and losetup(8): - * the commands prints basic overview by default if no option - specified - column(1): - * supports new command line option --output-separator to specify - table output delimiter - rename(1): - * supports new command line option --symlink to rename symlink - target - hwclock(8): - * supports new command line option --compare to periodically - compare the Hardware Clock to the System Time (based on - adjtimex -c) - ipcs(1): - * supports new command line options --bytes and --human - wipefs(1): - * supports new command line option --force to force erase on used - devices -- Removed upstreamed patches (mkfs.bfs_cleanup_64bit.patch-Patch, - mkfs.bfs_cleanup_endian.patch) - -------------------------------------------------------------------- -Mon Jul 1 13:43:23 UTC 2013 - mail@bernhard-voelker.de - -- Correct condition for Conflicts of sysvinit-tools. - -------------------------------------------------------------------- -Mon Jul 1 07:08:46 UTC 2013 - werner@suse.de - -- Correct version in source URL path. - -------------------------------------------------------------------- -Fri Jun 28 17:42:14 CEST 2013 - sbrabec@suse.cz - -- Fix Provides and Obsoletes of eject. -- Conflict with old coreutils and sysvinit-tools with conflicting - files to guarantee seamless upgrade. -- Remove Provides and Obsoletes of packages that do not exist since - SuSE Linux 8. -- Include upstreamed patch from SUSE eject package: - Check eject host_status and driver_status when using SG_IO - (eject-scsi-check-host_status-and-driver_status.patch, - bnc#358033). - -------------------------------------------------------------------- -Wed Jun 19 10:58:17 UTC 2013 - coolo@suse.com - -- rely on systemd-rpm-macros instead of the full thing - -------------------------------------------------------------------- -Wed Jun 12 21:02:28 UTC 2013 - mail@bernhard-voelker.de - -- util-linux.spec: remove previously added "moving-su-trickery" again - as a su-less coreutils packet is in Base:Build and Factory now. - -------------------------------------------------------------------- -Fri Jun 7 00:13:25 UTC 2013 - mail@bernhard-voelker.de - -- util-linux.spec: work around su(1) PAM problems based on su(1) - being provided by both the coreutils and the util-linux package. - Fix macro typo in %post and %verifyscript sections related to su(1): - s/sysvinit_tools/enable_su/ - -------------------------------------------------------------------- -Thu Jun 6 08:27:43 UTC 2013 - werner@suse.de - -- Add make-sure-sbin-resp-usr-sbin-are-in-PATH.diff, that is include - the old "let `su' handle /sbin and /usr/sbin in path" -- Provide the new eject utility to avoid file conflict with old - eject package - -------------------------------------------------------------------- -Wed Jun 5 12:30:45 UTC 2013 - werner@suse.de - -- Update to util-linux-2.23.1 - + Release highlights (2.22) - su(1): - * has been merged from coreutils into util-linux - * utils-linux version uses /etc/pam.d/su-l PAM config file for --login - (e.g. "su -") session. - sulogin(8): - * has been merged from sysvinit into util-linux - utmpdump(1): - * has been merged from sysvinit into util-linux - eject(1): - * has been merged from inactive upstream from sf.net and Fedora into util-linux - * supports new options --manualeject, --force and --no-partitions-unmount - lslocks(1) - * this NEW COMMAND prints local system locks and it's replacement to very - long time unmaintained lslk(1) - wdctl(8): - * this NEW COMMAND shows hardware watchdog status - libuuid: - * does NOT EXECUTE uuidd on demand, the daemon has to be started by - init scripts / systemd - uuidd: - * supports socket activation (for systemd) - * supports new options -no-fork, --no-pid and --socket-activation - + Release highlights (2.23) - blkdiscard(8): - * this NEW COMMAND discard sectors on a device (for example on SSD disks) - sulogin(8): - * provides multi-console feature from SysVinit -- Removed following patches now upstream - * 0001-Test-for-secure_getenv-too.patch - * 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch - * add-canonicalize_path_restricted.patch - * fdiskbsdlabel.patch - * libmount-add-MNT_ERR_LOOPDEV.patch - * libmount-add-special-MNT_ERR-codes.patch - * libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch - * login-close-tty-before-vhangup.patch - * mount-new-add-loopdev-specific-error-message.patch - * mount-new-allow-sloppy-for-non-root.patch - * mount-new-improve-error-messages.patch - * mount-new-use-MNT_ERR-for-error-messages.patch - * mount-sanitize-paths-from-non-root-users.patch - * util-linux-2.21.2-noenc.diff - * umount-sanitize-paths-from-non-root-users.patch -- Removed following patch which otherwise cause to break build - * util-linux-2.20-libmount-deps.patch -- Refreshed following patches with updating version string - * util-linux-2.23.1-fdisk_remove_bogus_warnings.patch - * util-linux-2.23.1-noenc-suse.diff -- Add util-linux-2.23.1-eject-fpie.patch to compile and link eject - with PIE - -------------------------------------------------------------------- -Wed May 29 11:45:04 UTC 2013 - ihno@suse.com - -- fixing mkfs.bfs to make it 64bit and endian clean. - adding the patches mkfs.bfs_cleanup_64bit.patch and - mkfs.bfs_cleanup_endian.patch - -------------------------------------------------------------------- -Sun Mar 17 20:39:47 UTC 2013 - jengelh@inai.de - -- Split "which", "time" and "adjtimex" off util-linux - -------------------------------------------------------------------- -Sat Feb 16 17:48:29 UTC 2013 - schwab@suse.de - -- fdiskbsdlabel.patch: - Fix fdisk compilation on aarch64 - -------------------------------------------------------------------- -Tue Feb 5 14:32:49 UTC 2013 - crrodriguez@opensuse.org - -- 0001-Test-for-secure_getenv-too.patch: - Current glibc in 12.3/factory no longer exports internal - function __secure_getenv() but has secure_getenv() instead. - -------------------------------------------------------------------- -Mon Jan 7 13:26:15 UTC 2013 - puzel@suse.com - -- add-canonicalize_path_restricted.patch, - mount-sanitize-paths-from-non-root-users.patch, - umount-sanitize-paths-from-non-root-users.patch: - prevent leaking information about existence of folders - (bnc#797002, CVE-2013-0157) - -------------------------------------------------------------------- -Fri Dec 28 04:30:58 UTC 2012 - crrodriguez@opensuse.org - -- 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch - Use OS byteswapping macros, this patch is functionally identical - to the version submitted upstream with the exception it excludes - code that target non-linux systems. - -------------------------------------------------------------------- -Wed Sep 19 19:41:10 UTC 2012 - jslaby@suse.com - -- login: close tty before vhangup (bnc#778842) - login-close-tty-before-vhangup.patch - -------------------------------------------------------------------- -Fri Jun 22 09:37:20 CEST 2012 - kukuk@suse.de - -- Remove pam_lastlog from login.pamd, login is doing it itself. - [bnc#768067] - -------------------------------------------------------------------- -Wed Jun 20 09:22:50 UTC 2012 - lnussel@suse.de - -- add a hack for boot.localfs to determine the devices to wait for - -------------------------------------------------------------------- -Fri Jun 15 12:57:06 UTC 2012 - puzel@suse.com - -- improve error messages from new mount (bnc#767208) - - backport patches from upstream git: - - mount-new-add-loopdev-specific-error-message.patch - - mount-new-use-MNT_ERR-for-error-messages.patch - - libmount-add-special-MNT_ERR-codes.patch - - mount-new-improve-error-messages.patch - - libmount-add-MNT_ERR_LOOPDEV.patch - -------------------------------------------------------------------- -Fri Jun 15 10:07:26 UTC 2012 - lnussel@suse.de - -- remove encryption options completely as upstream will do that as - well in the next release (bnc#748879). - -------------------------------------------------------------------- -Thu Jun 14 13:04:40 UTC 2012 - puzel@suse.com - -- fix automount with quota (rh#825836) - - mount-new-allow-sloppy-for-non-root.patch -- fix wrong mount options for CIFS mounts (bnc#766157) - - libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch - -------------------------------------------------------------------- -Thu May 31 10:04:23 UTC 2012 - sweet_f_a@gmx.de - -- require binutils-devel because "which" wants to find libiberty.a -- remove which-lib64.patch because it's broken and couldn't find - libiberty.a whithin /usr/lib64 -- which doesn't need autoreconf anymore - -------------------------------------------------------------------- -Tue May 29 09:28:55 UTC 2012 - puzel@suse.com - -- switch to new libmount-based mount(8) - -------------------------------------------------------------------- -Fri May 25 12:12:09 UTC 2012 - puzel@suse.com - -- update to util-linux-2.21.2 - - bugfix release -- drop sfdisk-fix-calculation-due-to-type-mismatch.patch - (fixed upstream) - -------------------------------------------------------------------- -Fri May 25 12:03:07 UTC 2012 - puzel@suse.com - -- build with RPM_OPT_FLAGS again (removed by mistake) - -------------------------------------------------------------------- -Thu Apr 12 09:09:05 UTC 2012 - puzel@suse.com - -- fix miscalculation in sfdisk on ix86 (bnc#754789) - - add sfdisk-fix-calculation-due-to-type-mismatch.patch - -------------------------------------------------------------------- -Sat Mar 31 11:09:38 UTC 2012 - puzel@suse.com - -- update to util-linux-2.21.1 - - bugfix release - -------------------------------------------------------------------- -Fri Mar 16 09:56:21 UTC 2012 - fcrozat@suse.com - -- Fix Obsoletes / Provides for login. - -------------------------------------------------------------------- -Tue Mar 13 16:38:34 CET 2012 - kukuk@suse.de - -- Enable /bin/login and obsolete old fork now merged back - (not moved to /usr/bin until all problems are solved to - avoid that root is not able to login). - -------------------------------------------------------------------- -Tue Mar 6 21:18:56 UTC 2012 - rschweikert@suse.com - -- keep binaries in /usr tree (UsrMerge project) - -------------------------------------------------------------------- -Tue Feb 21 13:46:25 UTC 2012 - puzel@suse.com - -- update to util-linux-2.21 - chcpu(8): - - new command - prlimit(1): - - new command - losetup(8): - - the command has been rewritten, features: - * supports 64bit ioctls only - * losetup -a does not require root permissions - * uses new /dev/loop-control kernel API - * supports new command line option --partscan to enable - kernel partition table parser - agetty(8): - - supports new command line options --nohints to disable hints - about Num, Caps and Scroll Locks - - supports new command line option --remote to add a hostname - to the login(1) command line - dmesg(1): - - supports new command line options --file to read the log from - a file rather than from kernel buffer - fallocate(8): - - supports new command line options --punch-hole to punch holes - in the file - findmnt(8): - - supports alternative location of the fstab file - ipcrm(8): - - supports new command line option --all to remove all resources - lscpu(1): - - supports new command line options --all, --offline and - --online to list all, offline or online CPUs - - supports s390 topology description (polarization, books, ...) - partx(8): - - supports partitioned loop devices - wipefs(8): - - allows to zap partition tables - - supports new command line option "--type " to wipe only - specified filesystems, RAIDs or partition table types - libblkid: - - provides new function blkid_do_wipe() to remove all - signatures from the given block device. -- disable elvtune (works only with 2.4 kernel) -- drop patches which are upstream now: - - drop fsck-use-FS-blacklist-for-non-all-mode-too.patch - - drop util-linux-dmesg-fix-printing-of-multibyte-characters.patch - - libmount-ignore-tailing-slash-in-netfs-source-paths.patch - - libmount-fix-chdir-to-parent-for-restricted-user-umo.patch -- update to adjtimex-1.29 -- use fdupes to symlink duplicate manpages -- disabled make check for time (noop) -- libraries back to %{_libdir}, /usr merge project (by - crrodriguez@opensuse.org) -- drop cryptoloop support (provided by dm-crypt) - - util-linux-2.17.1-mount_losetup_crypto.patch - -------------------------------------------------------------------- -Tue Feb 7 14:48:23 UTC 2012 - jengelh@medozas.de - -- Remove redundant tags/sections - -------------------------------------------------------------------- -Sun Dec 25 22:19:44 UTC 2011 - coolo@suse.com - -- do not call %suse_update_config - -------------------------------------------------------------------- -Mon Nov 21 15:13:56 UTC 2011 - aj@suse.de - -- add fdisk-tinfo.patch to fix build with newer curses. - -------------------------------------------------------------------- -Tue Nov 15 13:15:19 UTC 2011 - coolo@suse.com - -- add libtool as buildrequire to avoid implicit dependency - -------------------------------------------------------------------- -Wed Nov 9 08:27:17 UTC 2011 - puzel@suse.com - -- add libmount-ignore-tailing-slash-in-netfs-source-paths.patch and - libmount-fix-chdir-to-parent-for-restricted-user-umo.patch: - fix umounting network filesystems as plain user (bnc#728480) - -------------------------------------------------------------------- -Tue Nov 8 09:36:41 UTC 2011 - puzel@suse.com - -- add fsck-use-FS-blacklist-for-non-all-mode-too.patch (bnc#728645) - -------------------------------------------------------------------- -Wed Nov 2 09:37:12 UTC 2011 - puzel@suse.com - -- add util-linux-dmesg-fix-printing-of-multibyte-characters.patch - (bnc#725993) - -------------------------------------------------------------------- -Thu Oct 20 13:01:22 UTC 2011 - puzel@suse.com - -- update to util-linux-2.20.1 - - bugfix release -- drop patches (in upstream): - - util-linux-sfdisk-manpage-fix.patch - - util-linux-lib-sysfs-deinit.patch - - fdisk-dont-shorten-long-path-to-disk.patch - -------------------------------------------------------------------- -Wed Oct 12 09:26:40 UTC 2011 - puzel@suse.com - -- add fdisk-dont-shorten-long-path-to-disk.patch (bnc#722959) - -------------------------------------------------------------------- -Tue Oct 4 11:32:11 UTC 2011 - uli@suse.com - -- cross-build fix: use %__cc, %configure macros -- set bindir explicitly when installing -- (cross-?)build fix: disable build dependency on SELINUX_LIBS - in libmount - -------------------------------------------------------------------- -Tue Sep 13 09:10:43 UTC 2011 - puzel@suse.com - -- add util-linux-lib-sysfs-deinit.patch (bnc#714151) - -------------------------------------------------------------------- -Mon Aug 29 14:57:57 UTC 2011 - puzel@suse.com - -- update to util-linux-2.20 - - cleanups, bugfixes -- build with --enable-ddate -- add util-linux-sfdisk-manpage-fix.patch - -------------------------------------------------------------------- -Thu Aug 25 14:12:15 UTC 2011 - rguenther@novell.com - -- BuildIgnore pwdutils. - -------------------------------------------------------------------- -Wed Aug 17 10:37:20 UTC 2011 - puzel@novell.com - -- update to util-linux-2.20-rc2 - - bugfixes -- drop patches: - - util-linux-fix-manpages.patch - - util-linux-wall-build-with-pie.patch - - util-linux-2.20-rc1-agetty-fixes.patch - - util-linux-2.20-rc1-hexdump-segfault.patch - - util-linux-2.20-rc-fix-dmesg.patch - -------------------------------------------------------------------- -Wed Aug 10 13:42:33 UTC 2011 - puzel@novell.com - -- add util-linux-2.20-rc1-hexdump-segfault.patch (bnc#710877) - -------------------------------------------------------------------- -Wed Aug 10 12:20:41 UTC 2011 - puzel@novell.com - -- add util-linux-2.20-rc-fix-dmesg.patch (bnc#710417) - -------------------------------------------------------------------- -Wed Aug 10 11:06:15 UTC 2011 - puzel@novell.com - -- add util-linux-2.20-rc1-agetty-fixes.patch (bnc#711240) - -------------------------------------------------------------------- -Mon Aug 1 13:44:21 UTC 2011 - puzel@novell.com - -- update to util-linux-2.20-rc1 - - Release highlights - agetty(8): - - mingetty features have been merged to agetty - chrt(1), taskset(1): - - supports new command line option "--all-tasks" to set or - retrieve the scheduling attributes of all the tasks (threads) - for a given PID - dmesg(1): - - supports new command line options: --clear, --console-on, - --console-off, --ctime, --decode, --facility=, - --level=, --show-delta, --notime, --kernel and - --userspace - fdisk(8): - - improved dialogs to be more user-friendly - findmnt(8), partx(8), lsblk(8) - - support new command line option "--pairs" to enable - key="value" output format - findmnt(8): - - supports new command line options "--poll" and "--timeout" to - monitor /proc/self/mountinfo changes - ionice(1): - - supports human-readable scheduling class names, for example: - ionice -c best-effort $PID - kill(1): - - supports new command line option "-q " to use - sigqueue(2) - - supports real-time signals in formats RT, RTMIN+ and - RTMAX- - lsblk(8): - - supports new columns - - supports new command line option "-D" to print device discard - topology - lscpu(8): - - improved support for s390 boxes - mkfs.minix: - - supports minix version 3 - simpleinit: - - this set of deprecated utils has been REMOVED - wall(1): - - support new command line option "--timeout" to specify write - timeout to terminals in seconds. -- add util-linux-fix-manpages.patch -- add util-linux-wall-build-with-pie.patch -- package /sbin/rcuuidd - -------------------------------------------------------------------- -Tue May 3 09:39:37 UTC 2011 - puzel@novell.com - -- update to util-linux-2.19.1 - - numerous bugfixes, including (bnc#690486 and bnc#690488) -- drop umount-by-imgname.patch (merged upstream) -- cleanup: do not register ipc.info.gz (not provided by - this package) - -------------------------------------------------------------------- -Thu Apr 14 16:27:27 UTC 2011 - puzel@novell.com - -- merge util-linux-2.17.1-losetup-honor-documented-c-option and - util-linux-2.17.1-mount_losetup_crypto.patch) - -------------------------------------------------------------------- -Mon Feb 21 16:28:38 UTC 2011 - puzel@novell.com - -- add umount-by-imgname.patch (bnc#666161) - -------------------------------------------------------------------- -Thu Feb 10 11:01:40 UTC 2011 - puzel@novell.com - -- update to util-linux-2.19 - - uuid fixes - - cleanups, documentation and translation updates -- drop util-linux-2.19-rc1-loop-offset.diff (fixed in upstream, by - different patch) - -------------------------------------------------------------------- -Wed Jan 26 11:47:55 UTC 2011 - puzel@novell.com - -- update to util-linux-2.19-rc3 - - bugfixes - -------------------------------------------------------------------- -Tue Jan 25 09:29:15 UTC 2011 - lnussel@suse.de - -- don't mess with /etc/mtab in %post. aaa_base does that for us - already. - -------------------------------------------------------------------- -Fri Jan 21 12:34:35 UTC 2011 - lnussel@suse.de - -- fix parsing offset= followed by more options (bnc#666150) - -------------------------------------------------------------------- -Tue Jan 18 09:47:11 UTC 2011 - bwiedemann@novell.com - -- fix bnc#664873 - -------------------------------------------------------------------- -Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com - -- update to util-linux-2.19-rc1 -- important changes: - * lsblk(8): - - this NEW COMMAND lists information about all or selected block - devices in tree-like format. - * partx(8): - - this command has been rewritten to use libblkid for partition - tables parsing. It supports aix, bsd, dos, gpt, mac, minix, - sgi, solaris_x86, sun, ultrix and unixware now. - - supports new command line option "--show" to list partitions in - new format - - prints UUID and name for GPT and mac partitions - * findmnt(8): - - supports new command line option "--submounts" to list all - submounts for selected mountpoint(s) - * agetty(8): - - supports new command line options "-c" and "-s" to reuse - already initialized tty cflags and existing baud rate - * mount(8), umount(8): - - could be linked with libmount (--enable-libmount-mount) to - manage userspace mount options outside /etc/mtab on systems - where the file is a symlink to /proc/mounts. (EXPERIMENTAL, - enabled in openSUSE package) - * losetup(8), mount(8): - - uses /sys/dev/block//loop/backing_file rather than - loopdev ioctls (requires kernel >= 2.6.37) - * fsck(8): - - supports new command line option "-l" to lock whole-disk device - by exclusive flock(2). This option is recommended when more - fsck(8) instances are executed in the same time. - * rtcwake(8): - - supports new mode "show" to print the current RTC alarm time - * fstrim(8): - - this NEW COMMAND allows to discard unused blocks on a mounted - filesystem (wrapper for FITRIM ioctl) - * swapon(8): - - supports new options "discard" and "nofail" - -- in post, replace /etc/mtab with a symlink to /proc/mounts/self -- drop following patches (in upstream) - - util-linux-swapon-btrfs-limitations - - util-linux-agetty-s-option.patch - - util-linux-fsck-l-option.patch - - util-linux-2.18-no-canonicalize-fix.patch - - util-linux-swapon-canonicalize-swap-device.patch -- fix uuidd Summary and Description -- build with --enable-libmount-mount (new option) -- use set_permissions macros -- run spec-cleaner - -------------------------------------------------------------------- -Tue Dec 14 16:11:34 UTC 2010 - puzel@novell.com - -- add util-linux-swapon-canonicalize-swap-device.patch - (bnc#641142) - -------------------------------------------------------------------- -Thu Dec 2 17:09:08 CET 2010 - mszeredi@suse.cz - -- mount: don't canonicalize "spec" with --no-canonicalize option - [bnc#651598] - -------------------------------------------------------------------- -Thu Dec 2 15:23:36 CET 2010 - mszeredi@suse.cz - -- add Provides: util-linux(fake+no-canonicalize) [bnc#651598] - -------------------------------------------------------------------- -Tue Nov 30 12:19:53 UTC 2010 - puzel@novell.com - -- update util-linux-2.17.1-mount_losetup_crypto.patch (bnc#655804) - -------------------------------------------------------------------- -Fri Nov 26 19:10:27 CET 2010 - kay.sievers@novell.com - -- add Provides: fsck-with-dev-lock - -------------------------------------------------------------------- -Thu Nov 25 13:37:43 CET 2010 - kay.sievers@novell.com - -- add 'fsck -l' option needed for systemd - -------------------------------------------------------------------- -Tue Nov 16 16:08:48 UTC 2010 - cristian.rodriguez@opensuse.org - -- disable silent rules - -------------------------------------------------------------------- -Thu Nov 11 10:36:35 CET 2010 - kay.sievers@novell.com - -- add 'agetty' -s option needed for systemd's serial console setup - -------------------------------------------------------------------- -Tue Sep 28 11:42:46 UTC 2010 - aj@suse.de - -- uuidd rc file already creates /var/run/uuidd, mark it as %ghost - in spec file. - -------------------------------------------------------------------- -Fri Jul 9 06:23:27 UTC 2010 - puzel@novell.com - -- update to util-linux-ng-2.18 - - do not provide rdev, ramsize, vidmode and rootflags commands - anymore - - fdisk does not use cylinders as display units by default - - libmount: new library; its API is still officially unstable - - new commands: findmnt, fsfreeze, swaplabel - - blkid: new option "-i" to print I/O limits - - full release notes: - https://www.kernel.org/pub/linux/utils/util-linux/v2.18/v2.18-ReleaseNotes -- update to adjtimex-1.28 -- update to which-2.20 -- drop util-linux-2.14.1-mount_skip_sync.patch (fixed upstream) -- drop util-linux-addpart-use-atoll.patch (fixed upstream) -- drop util-linux-mount-detect-ro-mount.patch (fixed upstream) -- drop adjtimex-1.20-nosyscall.diff (fixed upstream) -- cleanup specfile a bit - -------------------------------------------------------------------- -Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de - -- use %_smp_mflags - -------------------------------------------------------------------- -Thu Jun 24 23:24:41 CEST 2010 - jeffm@suse.de - -- document btrfs limitation with swapfiles (bnc#616617) - -------------------------------------------------------------------- -Tue Jun 22 16:48:29 UTC 2010 - bg@novell.com - -- hppa specific binaries are parisc{,32,64} - -------------------------------------------------------------------- -Tue Jun 1 14:23:23 UTC 2010 - puzel@novell.com - -- do not run uuidd as root, but uuidd:uuidd (bnc#604168) - -------------------------------------------------------------------- -Fri May 28 13:24:43 UTC 2010 - puzel@novell.com - -- add util-linux-mount-detect-ro-mount.patch (bnc#481123) - -------------------------------------------------------------------- -Tue May 11 13:58:49 UTC 2010 - puzel@novell.com - -- add util-linux-addpart-use-atoll.patch (bnc#603328) - -------------------------------------------------------------------- -Tue Apr 6 13:22:37 UTC 2010 - hvogel@novell.com - -- update to version 2.17.2 - - fix small typo in v2.17.1-ReleaseNotes - - fix -b fdisk - - fix typo in ionice - - fix display of device size, fix infinite loop when probe chain - bails out early, more robust minix probing, remove "0x" prefix - from DRBD UUID, reset BLKID_TINY_DEV flag in - blkid_probe_set_device, support alignment_offset=-1 in libblkid - - fix cpuid opcode detection in lscpu - - more explicitly explain fstab usage in mount.8, posix option - of vfat is obsolete, properly ignore comments in - /etc/filesystems in mount - - update ja.po, pl.po, update vi.po - - remove " (deleted)" from filenames from /proc/swaps - - cleanup usage() and man page of wipefs - -------------------------------------------------------------------- -Wed Mar 10 23:11:42 CET 2010 - jeffm@suse.de - -- Properly honor documented -c option (bnc#583677) - -------------------------------------------------------------------- -Tue Mar 2 09:53:04 UTC 2010 - lnussel@suse.de - -- drop freeramdisk (bnc#584565) -- drop hostid (bnc#584562) - -------------------------------------------------------------------- -Tue Feb 23 12:46:07 UTC 2010 - lnussel@suse.de - -- new version 2.17.1 - - new commands: wipefs, unshare, fallocate - - fdisk: DOS-compatible mode marked deprecated - - honor nofail option in fsck - - libblkid overhaul - - lots of bug fixes -- fix self-obsoletes -- compile suid programs using -fpie -- drop -DCONFIG_SMP for s390 as it doesn't seem to be used anyways - -------------------------------------------------------------------- -Sun Dec 13 15:19:16 CET 2009 - jengelh@medozas.de - -- add baselibs.conf as a source - -------------------------------------------------------------------- -Sun Dec 6 15:07:33 CET 2009 - jengelh@medozas.de - -- enabled parallel build - -------------------------------------------------------------------- -Mon Nov 30 17:05:38 CET 2009 - meissner@suse.de - -- exclude sparc correctly -> %sparc bnc#559180 - -------------------------------------------------------------------- -Sun Nov 15 14:04:48 CET 2009 - meissner@suse.de - -- refreshed patches with fuzz=0 - -------------------------------------------------------------------- -Mon Oct 26 17:45:53 UTC 2009 - crrodriguez@opensuse.org - -- fsck during boot up fails with Too many open files [bnc#503008] - -------------------------------------------------------------------- -Tue Oct 20 12:14:24 CEST 2009 - dmueller@suse.de - -- fix typo in baselibs.conf change - -------------------------------------------------------------------- -Tue Oct 13 11:23:07 UTC 2009 - aj@suse.de - -- Fix requires of 32-bit devel packages. - -------------------------------------------------------------------- -Tue Sep 29 12:58:37 UTC 2009 - hvogel@novell.com - -- finaly remove the mount mtab locking patch: - * util-linux-2.14.1-mount_race.patch - It causes too much regressions. - -------------------------------------------------------------------- -Mon Jul 13 14:21:07 CEST 2009 - kay.sievers@novell.com - -- update to final 2.16 release - - fix libdir issues in pkgconfig files - - fix location of uuidd run directory - - improve libuuid handling if uuidd is installed but not setuid -- add blkid.conf file to: - - disable the sequential /dev scanner - - move cache to /dev/.blkid.tab to get file out of /etc - and prevent the cache file to survive a reboot - -------------------------------------------------------------------- -Wed Jul 8 13:14:42 CEST 2009 - meissner@novell.com - -- added baselibs.conf for libblkid* and libuuid* - -------------------------------------------------------------------- -Sun Jun 28 21:36:57 CEST 2009 - kay.sievers@novell.com - -- update to version 2.16 -- switch from libvolume_id to new libblkid -- provide fsck -- provide libblkid -- provide libuuid -- provide setarch -- provide separate uuidd package -- remove patches: - util-linux-2.14.1-lscpu.patch (upstream) - util-linux-2.14.1-lscpu_add_hypervisor_detection.patch (upstream) - util-linux-2.14.1-lscpu_sysroot_option.patch (upstream) - util-linux-2.14.1-sys-utils_lscpu_exit.patch (upstream) - util-linux-2.14.2-schedutils_fix_email.patch (upstream) - util-linux-2.12r-fdisk_cyl.patch (upstream) - util-linux-2.14.1-mount_swap_pagesize.patch (--fixpg option) - util-linux-2.14.2-schedutils_ionice_enosys.patch (-t option) - util-linux-2.14.1-hwclock_adjust_and_hctosys.patch (--systz) - -------------------------------------------------------------------- -Thu Apr 16 14:55:22 CEST 2009 - werner@suse.de - -- Move /usr/sbin/adjtimex to /sbin/adjtimex to be able to check the - kernel time variables even without /usr mounted - -------------------------------------------------------------------- -Mon Feb 16 12:35:00 CET 2009 - mkoenig@suse.de - -- remove util-linux-2.14.1-fdisk_cylinder.patch - fixed upstream - -------------------------------------------------------------------- -Thu Feb 12 17:12:28 CET 2009 - mkoenig@suse.de - -- update to version 2.14.2 - chrt: - * support CFS SCHED_IDLE priority and document it - fdisk: - * cannot create partition with starting beyond 1 TB - * remove obsolete information from man page - hwclock: - * remove "cli" and "sti" from i386 CMOS code - * remove x86_64-specific bogon - losetup: - * add warning about read-only mode - * missing EBUSY error hint message - more: - * minor fixes to magic() - mount: - * add i_version support - * add info about /proc/mounts to mount.1 - * add info about semantics of read-only mount to mount.8 - * add rootcontext= SELinux mount option - * clean up SPEC canonicalization - * create separate section for fs-independent options in mount.8 - * finalize support of quoted LABELs/UUIDs - * mtab created multiple times with -a option - * suggest to use blockdev --setro rather than losetup -- catch ENOSYS in ionice to allow execution in virtualized - environments which don't support ioprio_{get,set} calls [bnc#444637] -- umount: fix suid check for user mounted loop devices [bnc#461732] -- fix doc [bnc#456375] -- remove patches: - util-linux-2.13.1-fdisk_cfdisk_yesno.patch - util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch - util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch - util-linux-2.14.1-fdisk_missing_include.patch - util-linux-2.14.1-mount_loop_ro_fix.patch - -------------------------------------------------------------------- -Sat Feb 7 18:28:58 CET 2009 - schwab@suse.de - -- Fix info dir entry for which. - -------------------------------------------------------------------- -Wed Jan 7 15:42:38 CET 2009 - mkoenig@suse.de - -- fix locking problem for external mount helpers when type - is not given [bnc#459839] - -------------------------------------------------------------------- -Tue Dec 2 12:23:37 CET 2008 - mkoenig@suse.de - -- raw: do not stat the raw devices when binding, since they - are created dynamically [bnc#450675] - -------------------------------------------------------------------- -Thu Nov 27 01:27:19 CET 2008 - dmueller@suse.de - -- mount: fix hang on trying to find a free loop device - if one of them has a stale nfs handle mounted (bnc#449646) - -------------------------------------------------------------------- -Mon Nov 24 15:24:11 CET 2008 - mkoenig@suse.de - -- mount: fix locking patch to not break -n [bnc#447937] - -------------------------------------------------------------------- -Thu Nov 20 18:08:33 CET 2008 - mkoenig@suse.de - -- mount: enhance mount/umount mtab locking and lock the whole - read mtab/syscall/write mtab process to avoid mtab corruption - with highly concurrent mount/umount calls [bnc#444966] -- add arch/powerpc/boot/addnote.c from kernel 2.6.27 - as /usr/bin/chrp-addnote [bnc#443859] -- umount: skip sync() in umount -a if no umount happened [bnc#447036] -- hwclock: allow --adjust and --hctosys simultaneously [bnc#441106] - -------------------------------------------------------------------- -Fri Nov 7 14:50:00 CET 2008 - mkoenig@suse.de - -- fdisk: support +cylinder notation [bnc#441871] -- check for EACCES when using ro fallback when loop mounting - a readonly image -- fix uninitialized variable in swapon pagesize detection - -------------------------------------------------------------------- -Mon Oct 27 17:33:01 CET 2008 - mkoenig@suse.de - -- fdisk: add missing includes [bnc#438670] - -------------------------------------------------------------------- -Thu Oct 23 17:58:28 CEST 2008 - mkoenig@suse.de - -- swapon: add swap pagesize detection [bnc#433028] -- lscpu: fix return code [bnc#437367] -- mkfs.minix: fix device size detection [bnc#437980] -- lscpu: update to most recent version for hypervisor detection - -------------------------------------------------------------------- -Thu Oct 2 11:10:11 CEST 2008 - mkoenig@suse.de - -- add lscpu tool from current util-linux-ng git, - needed for fate#303051 -- replace hypervisor detection tool with the solution blessed by - upstream, which adds hv detection as lscpu feature [fate#303051] - -------------------------------------------------------------------- -Wed Sep 24 11:28:07 CEST 2008 - mkoenig@suse.de - -- add new tool /bin/hypervisor for x86, x86_64 - from Ky Srinivasan - to detect the presence of a hypervisor [fate#303051] - -------------------------------------------------------------------- -Wed Sep 10 15:58:52 CEST 2008 - mkoenig@suse.de - -- update to version 2.14.1 - * fdisk: don't check for GPT when asked for disk size only - * losetup: remove unnecessary minor number check - * rtcwake: prefer RTC_WKALM_SET over RTC_ALM_SET - * scriptreplay: new implementation is out-of-sync - * selinux: is_selinux_enabled() returns 0, 1 and -1 - * umount: improve "-d" option for autoclear loops -- remove patch - util-linux-2.14-loop_autoclear.patch - -------------------------------------------------------------------- -Wed Aug 20 15:20:06 CEST 2008 - mkoenig@suse.de - -- enable SELinux support [fate#303662] - -------------------------------------------------------------------- -Mon Aug 18 18:13:10 CEST 2008 - mrueckert@suse.de - -- remove outdated options in the fillup_and_insserv call - -------------------------------------------------------------------- -Mon Aug 18 12:36:39 CEST 2008 - mkoenig@suse.de - -- raw: fix init script tags - -------------------------------------------------------------------- -Mon Jul 7 15:13:24 CEST 2008 - mkoenig@suse.de - -- update which to version 2.19 - * Upgraded code from bash to version 3.2. This DOES has influence - on how Which behaves under certain circumstances. - * When the environment variable HOME is not set, the home directory - is now read from /etc/passwd or set to '/' if no home directory - could be found (this now matches the tilde lib used in bash) - * Changed the license to GPLv3 - * Add support for shells that output '{' on the same line as the - function name in the output of 'declare -f' (ie zsh). -- fix build - -------------------------------------------------------------------- -Wed Jul 2 15:47:08 CEST 2008 - mkoenig@suse.de - -- replace util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch - with upstream version - util-linux-2.14-loop_autoclear.patch - -------------------------------------------------------------------- -Fri Jun 27 17:05:46 CEST 2008 - schwab@suse.de - -- Fix lib64 check. - -------------------------------------------------------------------- -Wed Jun 25 14:26:49 CEST 2008 - mkoenig@suse.de - -- update to version 2.14 - most important changes: - * new command ldattach - mount: - * support auto-destruction of loop devices - losetup: - * new option -j - * supports unlimited number of loop devices - * new option --sizelimit to set data end - * option -s (short form of --show) now deprecated - mkswap: - * new option -U to set UUID explicitly - fdisk: - * calculate partition size in 2^N [bnc#381270] - hwclock: - * new option --adjfile to override default /etc/adjtime -- readd scriptreplay, implemented now in C -- add retry for mount if ENOMEDIUM is returned [bnc#390204] -- ignore ENXIO in del_loop, because they might have been - auto-destructed -- removed patches: - util-linux-2.13.1-canonicalize_loopfile_name.patch - util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch - util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch - util-linux-2.13.1-mount_getfs_fix.patch - util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch - util-linux-2.13-fdisk_cfdisk_ncursesw.patch - util-linux-mount_opt_nofail.patch - util-linux-ng-2.13-swapon-swsuspend.patch - -------------------------------------------------------------------- -Thu Apr 3 17:11:53 CEST 2008 - mkoenig@suse.de - -- cfdisk: accept english answer [bnc#369043] -- use upstream getfs fix - -------------------------------------------------------------------- -Wed Mar 26 22:05:42 CET 2008 - coolo@suse.de - -- actually require the split out package - -------------------------------------------------------------------- -Sun Mar 23 11:13:13 CET 2008 - coolo@suse.de - -- splitting out 60% of the size of the package: - creating lang subpackage - -------------------------------------------------------------------- -Wed Feb 13 10:21:42 CET 2008 - bg@suse.de - -- don't try to package parisc*.8 manual pages - -------------------------------------------------------------------- -Mon Feb 11 17:49:04 CET 2008 - mkoenig@suse.de - -- update to version 2.13.1 again -- fix broken util-linux-2.13.1-getfs_fix.patch - -------------------------------------------------------------------- -Sun Feb 10 18:11:07 CET 2008 - lrupp@suse.de - -- revert to 2.13.0.1+git20071121 - breaks current 'mount' call in Buildservice - -------------------------------------------------------------------- -Thu Feb 7 12:41:25 CET 2008 - mkoenig@suse.de - -- update to version 2.13.1: - mount: - * -L|-U segfault when label or uuid doesn't exist - * chain of symlinks to fstab causes use of pointer after free - * don't call canonicalize(SPEC) for cifs, smbfs and nfs - * improve error message when helper program not present - losetup: - * fix errno usage - mkswap: - * possible to crash with SELinux relabeling support - sfdisk: - * allow partitioning drives of over 2^31 sectors - hwclock: - * check for ENODEV -- mount: fix problem with device canonicalization when using - persistent name in fstab but call mount with real bd name -- patches merged: - util-linux-2.13-mount_fd_leak.patch - -------------------------------------------------------------------- -Tue Dec 18 15:55:19 CET 2007 - mkoenig@suse.de - -- add temporary workaround for broken RTC update interrupts - [#338419] - -------------------------------------------------------------------- -Mon Dec 3 11:03:57 CET 2007 - ro@suse.de - -- remove "arch", in coreutils now - -------------------------------------------------------------------- -Thu Nov 29 17:51:17 CET 2007 - lnussel@suse.de - -- update crypto patch - * fix mount buffer overflow when reading the passphrase (#332148) - * add loop_fish2 compatability code to losetup/mount again (#332095) - * change default hash size for 128bit keys to sha256 again - - -------------------------------------------------------------------- -Wed Nov 21 13:43:31 CET 2007 - mkoenig@suse.de - -- update to git20071121: - add sector size check for mkfs.minix [#308256] - fix canonicalization for cifs [#338375] -- provide Short-Description for raw init script -- add rpmlintrc - -------------------------------------------------------------------- -Tue Nov 20 17:49:35 CET 2007 - mkoenig@suse.de - -- fix raw path in init script - -------------------------------------------------------------------- -Tue Nov 6 16:11:02 CET 2007 - mkoenig@suse.de - -- update to 2.13.0.1+git20071106 -- prevent loop mounting the same file twice [#240653] -- merged upstream: - util-linux-2.13-mount_helper_fix.patch - util-linux-2.13-hwclock_rtc_option.patch - -------------------------------------------------------------------- -Thu Oct 4 22:24:04 CEST 2007 - bg@suse.de - -- don't use parisc, parisc32 and parisc64. - -------------------------------------------------------------------- -Mon Oct 1 17:08:06 CEST 2007 - mkoenig@suse.de - -- update to version 2.13 - merged upstream: - util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch - util-linux-2.13-loop.patch - util-linux-2.13-mount_create_mtab.patch - util-linux-2.13-schedutils_error_handling.patch - util-linux-2.13-sys_utils_build_rdev_x86_64.patch -- fix hwclock --rtc option [#326106] -- fix setuid/setgid mixup and error checking [#327022] - -------------------------------------------------------------------- -Fri Sep 14 11:24:33 CEST 2007 - mkoenig@suse.de - -- link cfdisk against libncursesw instead libncurses to fix - broken utf-8 characters [#307353] - -------------------------------------------------------------------- -Wed Aug 29 12:22:21 CEST 2007 - mkoenig@suse.de - -- fix fd leaks in previous patch - -------------------------------------------------------------------- -Tue Aug 28 16:42:04 CEST 2007 - lnussel@suse.de - -- add support for specifying the key length and password hash - algorithm [#304861] - -------------------------------------------------------------------- -Fri Aug 24 14:09:19 CEST 2007 - mkoenig@suse.de - -- avoid duplicates of root fs if defined with LABEL in fstab - [#297959] -- fix ionice error handling [#301675] - -------------------------------------------------------------------- -Thu Aug 16 18:34:30 CEST 2007 - ssommer@suse.de - -- free loop devices when mount fails [#297172] - -------------------------------------------------------------------- -Wed Jul 25 18:43:42 CEST 2007 - mkoenig@suse.de - -- update to git20070725 -- removed patches (merged upstream): - util-linux-2.12r-mount_mount.8_xfs_update.patch - util-linux-2.12r-sys_utils_readprofile_mapfile.patch - util-linux-2.12r-disk_utils_mkswap_fix.patch - util-linux-2.13-schedutils_ionice_idle.patch - -------------------------------------------------------------------- -Tue Jul 17 10:44:18 CEST 2007 - mkoenig@suse.de - -- updated to version 2.13-rc2: - * add wakertc -- cleanup ionice usage [#270251] -- enable hwclock audit support [#280113] -- removed patches (merged/fixed upstream) - util-linux-login_utils_wall.patch - util-linux-mount_mount.8-acl.patch - util-linux-2.12r-mount_mtab_update.patch - util-linux-2.13-schedutils_chrt.patch - util-linux-2.13-sys_utils_arch.patch - util-linux-2.12a-mount_mountpointwithcolon.patch - util-linux-2.12a-mount_procswapcheck.patch - util-linux-2.12q-mount_umount2_not_static.patch - -------------------------------------------------------------------- -Fri Jul 13 12:31:56 CEST 2007 - mkoenig@suse.de - -- replace hotplug with nofail option and fix it to not use - syscall reserved values. -- removed patch - util-linux-2.11z-hwclock_geteuid.patch - it is intentional that suid hwclock capabilities are limited -- removed patch (fixed upstream) - util-linux-2.12q-mount_--move.patch - -------------------------------------------------------------------- -Mon Jul 9 11:34:33 CEST 2007 - mkoenig@suse.de - -- add libuuid-devel to BuildRequires to let mkswap use UUIDs - -------------------------------------------------------------------- -Thu Jul 5 16:08:58 CEST 2007 - mkoenig@suse.de - -- use %config(noreplace) for /etc/filesystems -- Keep rdev stuff for x86_64 - util-linux-2.13-sys_utils_build_rdev_x86_64.patch -- removed patches (merged upstream) - util-linux-2.12r-misc_utils_cal_formatting.patch - util-linux-2.12q-sys_utils_ionice.patch - -------------------------------------------------------------------- -Thu Jul 5 11:59:30 CEST 2007 - mkoenig@suse.de - -- update to 2.13-rc1: - * mount fixes - * agetty: add 'O' escape code to display domain name - * blockdev: add BLKFRAGET/BLKFRASET ioctls - * fdisk: many significant improvements and fixes to Sun label handling - * update po files -- removed patches (merged upstream): - util-linux-2.11q-fdisk_fs_mac.patch - util-linux-2.12r-fdisk_fdiskwrap.patch - util-linux-2.12r-mount_racy_loop.patch - util-linux-2.13-misc_utils_cal_ncurses.patch - util-linux-2.13-mount_volumeid_label.patch -- use %find_lang - -------------------------------------------------------------------- -Thu Jun 21 14:50:58 CEST 2007 - mkoenig@suse.de - -- use encoded label names with volume_id [#232929] - util-linux-2.13-mount_volumeid_label.patch - -------------------------------------------------------------------- -Thu Jun 14 10:52:25 CEST 2007 - mkoenig@suse.de - -- mkzimage_cmdline: activate commandline if used with -s [#279935] - -------------------------------------------------------------------- -Wed Jun 13 12:33:59 CEST 2007 - mkoenig@suse.de - -- schedutils: let chrt accept pid 0 for current process and - fix some documentation bugs [#266879] - util-linux-2.13-schedutils_chrt.patch - -------------------------------------------------------------------- -Wed Jun 6 16:15:43 CEST 2007 - mkoenig@suse.de - -- update to git20070530 -- removed patches - util-linux-2.13-mount_volume_id.patch - util-linux-2.12r-mount_by_uuid.patch - util-linux-2.13-build_gnu_source.patch -- fix build with ncurses - -------------------------------------------------------------------- -Tue Jun 5 17:01:48 CEST 2007 - mkoenig@suse.de - -- update to git20070509 - mount: NFS code removed (use mount.nfs{,4} from nfs-utils) -- remove sm-notify (nfs-utils) -- removed patches - util-linux-2.11u-mount_nfs_mount_acl.patch - util-linux-2.12-mount_base_nfsv4.patch - util-linux-2.12-mount_mountfallback.patch - util-linux-2.12-mount_nfs_tcp.patch - util-linux-2.12q-mount_strict_aliasing.patch - util-linux-2.12r-mount_nfs_remount_options.patch - util-linux-2.12r-mount_rpcsec_gss.patch - util-linux-2.12r-mount_sec_manpage.patch - util-linux-2.12r-mount_umount_nosysfs.patch - util-linux-2.13-mount_nfs_timeo.patch - util-linux-mount_nfs.8.patch - util-linux-mount_warn_nfsudp.patch - -------------------------------------------------------------------- -Tue Jun 5 14:34:49 CEST 2007 - pth@suse.de - -- Update to which-2.16, mainly because regenerating configure - with newer autotools works. -- Fix the patch for AC_CHECK_STATICLIB -- Our distribution doesn't install libiberty.a, so pass - --disable-iberty to configure of which to not use a libiberty from - somewhere else. - -------------------------------------------------------------------- -Mon Jun 4 17:06:47 CEST 2007 - pth@suse.de - -- Make configure of which search for static libs in lib64 subdirs. - -------------------------------------------------------------------- -Mon Apr 23 16:49:00 CEST 2007 - mkoenig@suse.de - -- update to git20070412 -- remove chkdupexe and scriptreplay to get rid of the - perl dependency [#265757] - util-linux-2.13-build_no_perl_dependency.patch -- upstream integration of umount helper support [#252089] -- merged patches: - util-linux-2.13-misc_utils_add_man_scriptreplay.patch - util-linux-2.13-tests_missing_include.patch - -------------------------------------------------------------------- -Mon Apr 16 17:20:16 CEST 2007 - mkoenig@suse.de - -- fix initialization of offset in - util-linux-2.12r-mount_racy_loop.patch [#264225] - -------------------------------------------------------------------- -Tue Apr 10 17:25:34 CEST 2007 - mkoenig@suse.de - -- update to version git20070330 of new forked development tree -- removed Suse crypto patches for losetup [FATE#302001] -- removed binaries: - /bin/guessfstype - /sbin/sln - /usr/bin/setfdprm -- removed obsolete patches: - * guessfstype2.patch - * loop-AES-v3.0a-util-linux-2.12p.diff - * mount-nfs-nonreserved - * stupid-programmer.diff - * util-linux-nodiratime.diff - * util-linux-2.12-multipleraw.diff - * util-linux-2.12-enablereplaybuild.diff - * util-linux-2.12-mount_guessfstype.diff - * util-linux-2.12h-mtablock.diff - * util-linux-2.12i-x86_64intel.diff - * util-linux-2.12q-null.diff - * util-linux-2.12r.diff - * util-linux-2.12r-fdisk_llseek.patch - * util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff - * util-linux-2.12r-mount_external_prog_on_guess.patch - * util-linux-2.12r-nonfsmountfallback.diff - * util-linux-2.12r-pagesize.patch - * util-linux-2.12r-partx_enable.patch - * util-linux-2.12r-partx_gpt_warning.patch -- add patches: - * util-linux-2.13-misc_utils_add_man_scriptreplay.patch - install man page for scriptreplay - * util-linux-2.13-tests_missing_include.patch - fix missing header in tests/mnt_test_sysinfo.c - * util-linux-2.13-sys_utils_arch.patch - keep /bin/arch - * util-linux-2.13-build_gnu_source.patch - build with _GNU_SOURCE - * util-linux-2.13-build_fix_intel_check.patch - detect also x86_64 as INTEL architecture -- rename patches to identify them clearly by subsystem -- schedutils now part of util-linux itself - -------------------------------------------------------------------- -Wed Apr 4 12:55:40 CEST 2007 - mkoenig@suse.de - -- add Supplements line [FATE#301966] - -------------------------------------------------------------------- -Mon Mar 26 15:49:09 CEST 2007 - rguenther@suse.de - -- add ncurses-devel and zlib-devel BuildRequires - -------------------------------------------------------------------- -Thu Mar 15 17:24:34 CET 2007 - mkoenig@suse.de - -- mount: Let swapon automatically reinitialize a suspended - swap partition [#254437] - -------------------------------------------------------------------- -Thu Mar 9 11:00:11 CET 2007 - mkoenig@suse.de - -- mount: fix mtablock patch to avoid mtab corruption [#226783] - -------------------------------------------------------------------- -Thu Mar 8 17:27:22 CET 2007 - mkoenig@suse.de - -- partx: fix warning for too long literal - -------------------------------------------------------------------- -Wed Mar 7 16:58:08 CET 2007 - rguenther@suse.de - -- fix changelog entry order - -------------------------------------------------------------------- -Tue Feb 27 10:58:46 CET 2007 - mkoenig@suse.de - -- fix missing return code in - util-linux-2.12r-losetup_password.patch -- mount: fix race condition in mount -o loop [#242750] - -------------------------------------------------------------------- -Mon Feb 12 17:22:45 CET 2007 - mkoenig@suse.de - -- remove legacy warnings from fdisk [#241372] - -------------------------------------------------------------------- -Fri Feb 2 13:27:31 CET 2007 - mkoenig@suse.de - -- do not use O_EXCL for mkfs.cramfs [#241466] - -------------------------------------------------------------------- -Wed Jan 31 12:06:55 CET 2007 - mkoenig@suse.de - -- let mkfs tools open with O_EXCL [#238687] - ------------------------------------------------------------------- Tue Dec 12 11:04:07 CET 2006 - mkoenig@suse.de @@ -2687,14 +17,14 @@ Tue Dec 5 18:13:32 CET 2006 - mkoenig@suse.de ------------------------------------------------------------------- Tue Nov 7 13:09:45 CET 2006 - mkoenig@suse.de -- enable partx [#214992] +- enable partx [#214992] ------------------------------------------------------------------- Tue Oct 10 18:17:42 CEST 2006 - mkoenig@suse.de - Round up partition end LBA to a cylinder boundary during add_partition() [#174892] -- Fix readprofile on ppc64 [#179122] +- Fix readprofile on ppc64 [#179122] - Fix cal formatting bug [#203469] ------------------------------------------------------------------- @@ -2706,7 +36,7 @@ Mon Oct 9 12:27:33 CEST 2006 - mkoenig@suse.de ------------------------------------------------------------------- Mon Aug 21 12:10:01 CEST 2006 - mkoenig@suse.de -- Added sysfs to list of filesystems not to unmount with +- Added sysfs to list of filesystems not to unmount with umount -a, resolves #190385 ------------------------------------------------------------------- @@ -2807,14 +137,14 @@ Wed Feb 1 03:58:58 CET 2006 - olh@suse.de ------------------------------------------------------------------- Wed Feb 1 02:20:17 CET 2006 - ro@suse.de -- fix typo in previous change, binary negation is "~" +- fix typo in previous change, binary negation is "~" ------------------------------------------------------------------- Fri Jan 27 13:02:36 CET 2006 - sscheler@suse.de -- fixed mount hotplug option (#143352). now we don't send the - MS_HOTPLUG flag to the kernel any longer, because the kernel - doesn't know this option (EINVAL) and actually doesn't need to +- fixed mount hotplug option (#143352). now we don't send the + MS_HOTPLUG flag to the kernel any longer, because the kernel + doesn't know this option (EINVAL) and actually doesn't need to know about it. ------------------------------------------------------------------- @@ -3458,7 +788,7 @@ Mon Oct 13 21:44:43 CEST 2003 - kukuk@suse.de ------------------------------------------------------------------- Thu Oct 2 11:31:14 CEST 2003 - kukuk@suse.de -- Fix compiling with kernel 2.6.0-test6 header files +- Fix compiling with kernel 2.6.0-test6 header files ------------------------------------------------------------------- Tue Aug 12 15:27:20 CEST 2003 - mmj@suse.de @@ -3527,7 +857,7 @@ Mon Mar 3 16:19:04 CET 2003 - mmj@suse.de ------------------------------------------------------------------- Mon Mar 3 12:27:01 CET 2003 - ro@suse.de -- add missing info dir entries +- add missing info dir entries ------------------------------------------------------------------- Tue Feb 18 14:29:45 CET 2003 - agruen@suse.de @@ -3559,7 +889,7 @@ Fri Feb 7 01:30:53 CET 2003 - ro@suse.de ------------------------------------------------------------------- Tue Feb 4 22:34:10 CET 2003 - ro@suse.de -- don't package /bin/kill (part of coreutils now) +- don't package /bin/kill (part of coreutils now) ------------------------------------------------------------------- Tue Feb 4 12:40:00 CET 2003 - meissner@suse.de @@ -3571,12 +901,12 @@ Tue Feb 4 12:40:00 CET 2003 - meissner@suse.de Wed Jan 29 11:52:19 CET 2003 - mmj@suse.de - Update to util-linux-2.11z including: - * Translation updates - * mount: fix LABEL= handling for user umount, don't abort on read + · Translation updates + · mount: fix LABEL= handling for user umount, don't abort on read error with photocds and add dmask and fmask vfat mount options - * setterm: accept devfs name - * simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails - * umount: allow user umount after mount by label or uuid + · setterm: accept devfs name + · simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails + · umount: allow user umount after mount by label or uuid ------------------------------------------------------------------- Wed Jan 22 15:10:24 CET 2003 - sf@suse.de @@ -3619,7 +949,7 @@ Wed Nov 27 11:01:52 CET 2002 - mmj@suse.de o fdisk,cfdisk: cosmetic fixes o mount,umount: fix LABEL= handling for non-root [#17322] o more: kill external help file - o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC + o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC fails (patch we had, now folded upstream) ------------------------------------------------------------------- @@ -3657,7 +987,7 @@ Thu Oct 31 14:59:11 CET 2002 - mmj@suse.de ------------------------------------------------------------------- Thu Oct 31 00:40:09 CET 2002 - ro@suse.de -- hack time to build on alpha +- hack time to build on alpha ------------------------------------------------------------------- Tue Oct 22 16:13:36 CEST 2002 - mmj@suse.de @@ -3801,7 +1131,7 @@ Mon Jul 8 21:16:07 CEST 2002 - mmj@suse.de * fdformat: remove test on major * fdisk, hwclock and swap polishing * Lots of translations - * cramfs tools includes from the kernel + * cramfs tools includes from the kernel * swap{on,off} honours /proc/swaps * mount small fixups @@ -3884,7 +1214,7 @@ Mon Jan 28 13:59:26 CET 2002 - mmj@suse.de ------------------------------------------------------------------- Thu Jan 24 10:16:37 CET 2002 - ro@suse.de -- modified fillup_and_insserv call (perl-hack not needed here) +- modified fillup_and_insserv call (perl-hack not needed here) ------------------------------------------------------------------- Mon Jan 21 17:08:17 CET 2002 - mmj@suse.de @@ -3894,7 +1224,7 @@ Mon Jan 21 17:08:17 CET 2002 - mmj@suse.de ------------------------------------------------------------------- Thu Jan 10 14:18:21 CET 2002 - ro@suse.de -- removed ACTIVATE_RAW_DEV +- removed ACTIVATE_RAW_DEV ------------------------------------------------------------------- Mon Dec 31 19:05:45 UTC 2001 - adrian@suse.de @@ -4054,7 +1384,7 @@ Mon Feb 12 15:23:14 CET 2001 - kukuk@suse.de ------------------------------------------------------------------- Tue Feb 6 11:54:34 CET 2001 - ro@suse.de -- wall.c: include time.h +- wall.c: include time.h ------------------------------------------------------------------- Mon Feb 5 11:13:56 CET 2001 - kukuk@suse.de @@ -4073,14 +1403,14 @@ Fri Feb 2 12:18:56 CET 2001 - werner@suse.de ------------------------------------------------------------------- Thu Jan 25 00:37:22 CET 2001 - ro@suse.de -- added Provides: util +- added Provides: util ------------------------------------------------------------------- Fri Jan 12 10:08:29 MET 2001 - garloff@suse.de - Apply patch to lomount to allow all kerneli crypt algos to be passed and allow to pass passwd with -k. -- losetup seems to support >2GB files just fine (#5433) +- losetup seems to support >2GB files just fine (#5433) ------------------------------------------------------------------- Tue Jan 2 12:04:33 CET 2001 - kukuk@suse.de @@ -4093,17 +1423,17 @@ Tue Dec 5 15:25:45 CET 2000 - kukuk@suse.de - Search first in /etc/filesystems, then in /proc/filesystems ------------------------------------------------------------------- +Tue Dec 5 11:10:10 CET 2000 - schwab@suse.de + +- Don't use _syscallX on ia64. + +------------------------------------------------------------------- + Tue Dec 5 11:24:34 CET 2000 - kukuk@suse.de - Use AIX/fdisk patch from util-linux-2.10r - Backport "guess filesystems" from util-linux-2.10r -------------------------------------------------------------------- -Tue Dec 5 11:10:10 CET 2000 - schwab@suse.de - -- Don't use _syscallX on ia64. - - ------------------------------------------------------------------- Mon Dec 4 09:27:28 CET 2000 - olh@suse.de @@ -4112,7 +1442,7 @@ Mon Dec 4 09:27:28 CET 2000 - olh@suse.de ------------------------------------------------------------------- Sun Dec 3 00:09:16 CET 2000 - olh@suse.de -- no segfaults with AIX disklabels +- no segfaults with AIX disklabels ------------------------------------------------------------------- Wed Nov 29 18:21:25 CET 2000 - uli@suse.de @@ -4173,7 +1503,7 @@ Wed Sep 27 11:30:21 CEST 2000 - kukuk@suse.de ------------------------------------------------------------------- Tue Sep 26 17:54:23 CEST 2000 - kukuk@suse.de -- Fix mount for new NFS kernel patch +- Fix mount for new NFS kernel patch ------------------------------------------------------------------- Sat Sep 9 17:36:24 CEST 2000 - kukuk@suse.de @@ -4276,7 +1606,7 @@ Thu Mar 9 21:25:15 CET 2000 - kukuk@suse.de ------------------------------------------------------------------- Tue Mar 7 17:23:57 CET 2000 - kukuk@suse.de -- etc/filesystems: Add minix and reiserfs +- etc/filesystems: Add minix and reiserfs ------------------------------------------------------------------- Tue Mar 7 11:49:23 CET 2000 - kukuk@suse.de @@ -4306,23 +1636,23 @@ Thu Feb 3 14:42:23 CET 2000 - kukuk@suse.de ------------------------------------------------------------------- Thu Feb 3 11:14:29 CET 2000 - kukuk@suse.de -- util-linux: Update to 2.10f (mount security fix) +- util-linux: Update to 2.10f (mount security fix) ------------------------------------------------------------------- Sun Jan 23 15:45:08 CET 2000 - kukuk@suse.de -- util-linux: Update to 2.10e +- util-linux: Update to 2.10e ------------------------------------------------------------------- Tue Jan 18 19:18:08 CET 2000 - kukuk@suse.de - mount now looks at first in /etc/filesystems and then in - /proc/filesystems + /proc/filesystems ------------------------------------------------------------------- Tue Jan 18 16:32:05 CET 2000 - ro@suse.de -- fixed pmac-utils to build with 2.3 as well +- fixed pmac-utils to build with 2.3 as well ------------------------------------------------------------------- Tue Jan 18 14:56:22 CET 2000 - kukuk@suse.de @@ -4335,7 +1665,7 @@ Mon Jan 17 18:23:56 CET 2000 - kukuk@suse.de - Fix setserial for Linux 2.3.40 - Remove write, is now in nkitb - Build minix and bfs tools for SPARC -- Fix some buffer overflows in fdisk +- Fix some buffer overflows in fdisk ------------------------------------------------------------------- Fri Dec 17 15:00:19 MET 1999 - kukuk@suse.de @@ -4357,7 +1687,7 @@ Tue Nov 30 17:49:27 MET 1999 - uli@suse.de ------------------------------------------------------------------- Mon Nov 15 12:39:41 MET 1999 - kukuk@suse.de -- util-linux: Update to 2.10b +- util-linux: Update to 2.10b ------------------------------------------------------------------- Sat Nov 13 15:36:37 MET 1999 - kukuk@suse.de @@ -4384,7 +1714,7 @@ Sat Oct 16 16:40:13 MEST 1999 - kukuk@suse.de ------------------------------------------------------------------- Fri Oct 8 10:58:48 MEST 1999 - kukuk@suse.de -- Update to util-linux-2.9y (execpt fdisk) +- Update to util-linux-2.9y (execpt fdisk) ------------------------------------------------------------------- Tue Sep 14 18:14:53 CEST 1999 - uli@suse.de @@ -4399,12 +1729,12 @@ Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de ------------------------------------------------------------------- Thu Aug 26 15:05:03 CEST 1999 - uli@suse.de -- disabled hayesesp for PPC +- disabled hayesesp for PPC ------------------------------------------------------------------- Wed Aug 25 18:04:35 MEST 1999 - kukuk@suse.de -- Don't install tsort, its now in textutils 2.0 +- Don´t install tsort, its now in textutils 2.0 ------------------------------------------------------------------- Tue Aug 24 10:11:06 MEST 1999 - kukuk@suse.de @@ -4430,7 +1760,7 @@ Mon Jul 12 12:11:45 MEST 1999 - kukuk@suse.de ------------------------------------------------------------------- Tue Jul 6 12:23:47 MEST 1999 - kukuk@suse.de -- update to util-linux-2.9t +- update to util-linux-2.9t ------------------------------------------------------------------- Fri Jun 25 14:44:30 MEST 1999 - kukuk@suse.de @@ -4521,13 +1851,13 @@ Fri Oct 31 13:38:58 MET 1997 - ro@suse.de - temporarily removed mount-hacker -------------------------------------------------------------------- +---------------------------------------------------------------------------- Wed Oct 29 23:44:37 MET 1997 - florian@suse.de - add changes from ms@suse.de for hostid.c -------------------------------------------------------------------- +---------------------------------------------------------------------------- Tue May 20 14:10:37 MEST 1997 - florian@suse.de @@ -4535,14 +1865,14 @@ Tue May 20 14:10:37 MEST 1997 - florian@suse.de for kernel 2.1.x -------------------------------------------------------------------- +---------------------------------------------------------------------------- Wed Apr 30 15:57:14 CEST 1997 - florian@suse.de - update to mount 2.6g -------------------------------------------------------------------- +---------------------------------------------------------------------------- Sun Apr 13 23:04:29 MEST 1997 - florian@suse.de @@ -4552,21 +1882,21 @@ Sun Apr 13 23:04:29 MEST 1997 - florian@suse.de -------------------------------------------------------------------- +---------------------------------------------------------------------------- Sat Nov 2 17:35:11 CET 1996 - florian@suse.de - update to mount 2.5p -------------------------------------------------------------------- +---------------------------------------------------------------------------- Thu Oct 17 16:05:09 CEST 1996 - florian@suse.de - Update auf neue Version von mount 2.5o. -------------------------------------------------------------------- +---------------------------------------------------------------------------- Tue Sep 3 17:01:45 MET DST 1996 - florian@suse.de @@ -4574,7 +1904,7 @@ Tue Sep 3 17:01:45 MET DST 1996 - florian@suse.de - (u)mount now gives much better error messages -------------------------------------------------------------------- +---------------------------------------------------------------------- Sun Aug 25 19:28:50 MET DST 1996 - bs@suse.de compile setterm with libtermcap and not libncurses diff --git a/util-linux.keyring b/util-linux.keyring deleted file mode 100644 index a34bbee..0000000 --- a/util-linux.keyring +++ /dev/null @@ -1,56 +0,0 @@ -pub 4096R/EC39C284 2011-10-10 [expires: 2016-10-08] -uid Karel Zak -sub 4096R/7BA16CAC 2011-10-10 [expires: 2016-10-08] - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.20 (GNU/Linux) - -mQINBE6StA4BEACp9++Y+DgbBloJEuVhsDjDIvAR1n/aHPDyPQQzg/DkKtR3BXHn -dGfTL9/DR8y9YzLNwUf2lWsEAvwHZ2XfUTp5S5nVbgpAB0/Q2ebP0TnkNYaRkxq7 -VJF+kvUcA6hxYKYcIos2kJyfVytPE6FpFBqlgTmjcCTx4HHwePkVTVRyotOoA2V/ -UUwixgkyG7aVfy4QBKHAkATpTPC4l+ISaOHKUiajxRoa99rpmBPl4FhIw3b5rPYA -26q9Pz8q1AwbXA1PXxzwKVqqfwEkl6sxUVKiM8rUuhic2lnDMIXexNMvqznpFqtB -v7n+z/5N8RbB1DQjWpy/Z7OW6yyYXW9e33c6IgU5n46rIyTPYyzq3mDfOsJdvoG/ -nhF7VUkGDPYWfmx9ejvpKdoNCQ2q+MVp20msntcETcOq1r9SJwNXcsx+I/3ptbtX -Q+MQyA1L5FifkpA7+akITF5luOqUb2TToEBLiF/nn8y0sIUa/HGgcUrK2N9E1VNJ -tcIt/z0sZJUHYC+EBh/G0UNt9tRwPdnUks5sua1sCquXnkd9IS0Kr3Kq/C6JOKzz -UDGdFKVc6wExf70hX5h0g1kkypyjNwipGSdk+qVXO0IF/tKMToa8WZqoK3enzryI -Kmdq7IQ0ThdTTTC1ctVk4367/30prpNHF4/642G0OOiQCzWBrb0V217HvQARAQAB -tBtLYXJlbCBaYWsgPGt6YWtAcmVkaGF0LmNvbT6JAj4EEwECACgFAk6StA4CGwMF -CQlmAYAGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEOS3HV7sOcKETI8QAI0U -StG6dv1l9kqkmFpXPZJ75hf5SJA69+upcKeTg9BXKrEqjZLeyEn1OVPmfVGwWpz8 -SRbiYcHh8AhJaggAxKcIgQ/sAUBkmrTP6RyYEQUV6vFW5qv7dcEOs46d+LE/Wkxs -ymC2FSXxYOFiw7z27gkXQYq/IkdwfhRLFD6aD5egxcBVl91ZlRyklvPPW7qo046B -MWh2LaCVowYg+33GjS4A4JcF+tGkWZc0yqANwov93uhY0VXEdDsT4YWrTVdNDI3/ -lZ5u5k9sEUGR03oV336M/j0qNtMfAG5iDt2PFrzhJZcGcQPiGd/DeYuJeLVCd8Nl -jAwsnfGqu9VITgaDOreLbpSTNSj8egPqOoUBAGncMSfdiQ2ZEhluPyCTwspDy5Pa -dESyk0q2Z6tKG9ae01g/RzfTGCVN4GxkORPxcEHloa4XM3C9FBohM1LTWmsvnNXe -cPdbPyCoiFKio/yFZDt1CYDkols4uf/0ztCSH6pI874sCmYJVkYev2W9RCxE4aYK -KMb8XCUPec8L4C1mpmBiej0NT/d9GHQUnJUpRD4EG7UBxMwNWflhO4P4Q81uM0Kr -RMht0lS0EylZXuQPPG5C1nMsa1+eN0wjSTpy7232PTCxu+bhxA1HzvWXYuueUmp2 -QuV8PyA1lsfYI7PEgk2skfAvbP5vJszorklo2hVGuQINBE6StA4BEADG5Hind61Y -qoXXHotraJO2ejsPiy3BxSZTQet+IJO5tyURSXVIv+ZuV/MBRS/88fkBL2nHpK5b -BtJT11D2ZESmziZWGgMtZRV4va3fh3GaMeVdi5pXpmPZp4fBc60F3iCKfd1V8/1a -zwicZtdhTphkc6O7ETCr240OrJoOgvilbpv8WuVwhjfEOL2DwKITK6tzba1VScXi -ehDhhTssP14RQiH/OcMFuiHCHJeHQOH9ku4fzqT2/lxxSo4kMWKR2VslW17f3Zr3 -Zvrbi/b8UE/3T/RsoaQn2ml9BfDiMgNwT4l2ILlE7HpZMfD2WAP6itGHolcdbhNa -jxAMHdP5t64zSdwKmB8AbuIo7nbMKuJMiPdkOS/8x3YHRle4WEEeRWTEcqyzqkMq -MCqKLxc4SCuSMv+ingDrHr+d5usuMlQjT8c71PIipl9OpM8Jkl8CI2ToVF20wijY -Oof4T/jjObYiZk1KcqqKhQzMXEhKCt9hK5AaKMq5BiublS/Q5EXpzcRgVmG+SMHd -hUNLN7gilFx5939Ev+36TNE/f66r9aiF+WbiI1V1JGs0LYVyFzwmFMCgQUsnyqyA -RNREnLysdLE98PDSO2ESxu9BO7kTvlP0q5p+MKQiYj/s5wSqXw8EDCSBH9u0/FQi -gyV0a+J70WZZNpdi5wq+qVZ16LENQdxtKwARAQABiQIlBBgBAgAPBQJOkrQOAhsM -BQkJZgGAAAoJEOS3HV7sOcKEtCYP/3ji7Kt4+M0N6IOkh7wHfWk3HLqBa1XOD1Oz -X+rp79L1cDK8J1XUHoW/84bsS8Y3NsXlIej1wLOcaH0HOpEsPzqoqP1JxGilRkAu -Yazt3WhqdM2FcOQNEnuk66F8HnN/mD4vLzxdxuPlRtlCruUcDZlZlyzpywk6B7Gi -cVfh1CvUJsDA++aOlgYIHB4Z6nSJWYp64z+5QAVToBHzI7ywVyWTJbjO1RCR5QsV -fPD07p1deSW96QhqLSb2wQfk93I4YGshaVPwG01ZamxPEbspKqrEIG+5S6E4q/B+ -VF0zj5GU7jt/6M4qFzKbaY+vxsaqjgCOCPL5bCz5RFTHdtEmC/cmsvVbYuBD/5UY -D3JbyXt7KSG/a5Oel4ynK1pRQbnS6eNcGQqZPUop4PBouRKnUqv8uzljaiL9Wm3G -Hv9tn1L6ly86VcLt1ALTVuqwm5ci1fDVbddSliPv5atWNJ+So2MfEg3qbCzEC8Is -JNsVd4N6fSctYfFvBxsPjy7fw1iEqKq7SzTlHMO5hiKpS+8HSRVv6djHlj3aWtgy -u+BTXT/tRQ6c3TlZadqoyumX1U+Tflb6qMyJaZPsqv3bsOpXwjLAVfT4nPRXqbN6 -WWUhdompzuZufyCCL9Tc6lPDgVmuWyycHk4gbdfERodk4SEYJ0cEwFbl+GjL9XFZ -VeljfCzq -=8wc5 ------END PGP PUBLIC KEY BLOCK----- diff --git a/util-linux.spec b/util-linux.spec index bea859e..2fd8d73 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,917 +1,433 @@ # -# spec file for package util-linux +# spec file for package util-linux (Version 2.12r) # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. # -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - -%if 0%{?suse_version} >= 1330 -%bcond_without enable_last -%else -%bcond_with enable_last -%endif +# norootforbuild Name: util-linux -%define _name util-linux -# WARNING: After editing this file please call pre_checkin.sh to update spec files: -%define _name util-linux -# To prevent dependency loop in automatic build systems, we want to -# build util-linux in parts. To build all at once, set build_all to 1. -# -# build_util_linux: First stage build builds all except: -# build_util_linux_systemd: Builds util-linux-systemd and uuidd. -# build_python_libmount: Builds python-libmount. -%define build_all 0 -# definitions for the main packages -# This two level indirect definition of Summary and Group is needed to -# simplify parsing of spec file by format_spec_file, -# source_validator and check-in QA scripts). -%define summary_ul A collection of basic system utilities -%define summary_uls A collection of basic system utilities -%define summary_pl Python bindings for the libmount library -%define group_ul System/Base -%define group_uls System/Base -%define group_pl System/Filesystems -%if "%{name}" == "python-libmount" -%define build_util_linux 0 -%define build_util_linux_systemd 0 -%define build_python_libmount 1 -# To prevent dependency loops, verify signature only in third stage. -%define main_summary %summary_pl -%define main_group %group_pl -%else -%if "%{name}" == "util-linux-systemd" -%define build_util_linux 0 -%define build_util_linux_systemd 1 -%define build_python_libmount 0 -%define main_summary %summary_uls -%define main_group %group_uls -%else -%define main_summary %summary_ul -%define main_group %group_ul -%if %build_all -%define build_util_linux 1 -%define build_util_linux_systemd 1 -%define build_python_libmount 1 -%else -%define build_util_linux 1 -%define build_util_linux_systemd 0 -%define build_python_libmount 0 -%endif -%endif -%endif -Summary: %main_summary -License: GPL-2.0+ -Group: %main_group -BuildRequires: audit-devel -BuildRequires: bc -BuildRequires: binutils-devel -BuildRequires: fdupes -BuildRequires: gettext-devel -BuildRequires: libcap-ng-devel -BuildRequires: libselinux-devel -BuildRequires: libsepol-devel -BuildRequires: libtool -BuildRequires: ncurses-devel -BuildRequires: pam-devel -BuildRequires: pkg-config -BuildRequires: readline-devel -BuildRequires: utempter-devel -BuildRequires: zlib-devel -# util-linux is part of VMInstall, but we can well build without it -# Helps shorten a cycle and eliminate a bootstrap issue -#!BuildIgnore: util-linux -%ifarch ppc ppc64 ppc64le -BuildRequires: librtas-devel -%endif -%if %build_util_linux_systemd -BuildRequires: socat -BuildRequires: systemd-rpm-macros -BuildRequires: pkgconfig(libsystemd) -%endif -%if %build_python_libmount -BuildRequires: python-devel -%endif -#BEGIN SECOND STAGE DEPENDENCIES -%if !%build_util_linux -%if %build_util_linux_systemd -BuildRequires: libblkid-devel -BuildRequires: libmount-devel -BuildRequires: libsmartcols-devel -BuildRequires: libuuid-devel -%endif -%if %build_python_libmount -BuildRequires: libmount-devel -%endif -%endif -#END SECOND STAGE DEPENDENCIES -Version: 2.30 -Release: 0 -# util-linux is a base package and uuidd pre-requiring pwdutils pulls -# that into the core build cycle. pwdutils also pulls in the whole -# ldap stack into it. Avoid this whole mess which is done only to -# make the rpm install check of uuidd happy which has support to work without -# these tools as well -#!BuildIgnore: pwdutils -Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.30/util-linux-%{version}.tar.xz -Source1: util-linux-rpmlintrc -Source4: raw.service +BuildRequires: libvolume_id-devel pam-devel +URL: http://kernel.org/pub/linux/utils/util-linux +Provides: util rawio raw base schedutils +Obsoletes: util rawio raw base schedutils +PreReq: %install_info_prereq permissions +License: BSD License and BSD-like, GNU General Public License (GPL) +Group: System/Base +Autoreqprov: on +Version: 2.12r +Release: 64 +Summary: A collection of basic system utilities +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-%version.tar.bz2 +Source2: nologin.c +Source3: nologin.8 +Source4: raw.init Source5: etc.raw -Source6: etc_filesystems -Source7: baselibs.conf -Source8: login.pamd -Source9: remote.pamd -Source10: su.pamd -Source11: su.default -Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.30/util-linux-%{version}.tar.sign -Source13: %{_name}.keyring -Source14: runuser.pamd -# klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 -# TODO: split to separate package -Source40: klogconsole.tar.xz -# XXX: Run a program in a new session and with controlling tty +Source8: guessfstype.8 +%define time_ver 1.7 +%define which_ver 2.13 +%define adjtimex_ver 1.20 +Source9: adjtimex-%{adjtimex_ver}.tar.bz2 +Source10: freeramdisk.tar.bz2 +Source11: klogconsole.tar.bz2 +Source12: which-%{which_ver}.tar.gz +Source13: time-%{time_ver}.tar.gz +Source15: cryptoloop.txt +Source16: schedutils-1.4.0.tar.bz2 +Source20: README.loop-AES-v2.2d +Source21: README.loop-AES-v2.2d.SuSE Source22: setctsid.c Source23: setctsid.8 -# XXX: ppc specific, still needed? +Source24: sm-notify-20060111.tar.bz2 +Source25: nfsboot +Source26: README.raw +Source27: renice.8 Source28: mkzimage_cmdline.8 Source29: mkzimage_cmdline.c -Source31: addnote.c -# -Source51: blkid.conf -## -## util-linux patches -## -# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path -Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff -# PATCH-FEATURE-SLE util-linux-losetup-Add-support-for-setting-logical-blocksize.patch bsc931634 FATE319010 hare@suse.de -- Add support for setting logical blocksizes. -Patch1: util-linux-losetup-Add-support-for-setting-logical-blocksize.patch -# PATCH-BUG-FIX util-linux-lscpu-cleanup-DMI-detection-return-codes.patch bsc#1039360 msuchanek@suse.de -- lscpu: cleanup DMI detection return codes -Patch2: util-linux-lscpu-cleanup-DMI-detection-return-codes.patch +Source30: README.largedisk +Patch: util-linux-%version.diff +Patch2: loop-AES-v3.0a-util-linux-2.12p.diff +Patch3: util-linux-2.12-multipleraw.diff +Patch7: util-linux-2.12-hostid.diff +Patch8: util-linux-wall.dif +Patch10: util-linux-2.12-mount_guessfstype.diff +Patch11: guessfstype2.patch +Patch15: util-linux-nfs.8.diff +Patch23: util-linux-2.12h-mtablock.diff +Patch25: util-linux-2.11u-nfs-mount_acl.diff +Patch26: mount.8-acl.diff +Patch27: klogconsole-quiet.patch +Patch32: klogconsole.diff +Patch40: time-1.7.dif +Patch43: util-linux-2.11z-hwclock_geteuid.diff +Patch44: adjtimex-1.20-nosyscall.diff +Patch45: mount-nfs-nonreserved +Patch46: util-linux-2.12-nfs-tcp.diff +Patch51: util-linux-2.12-suse-compatibility.diff +Patch52: util-linux-2.12-enablereplaybuild.diff +Patch58: util-linux-2.12a-procswapscheck.diff +Patch61: util-linux-2.12-mountfallback.patch +Patch62: util-linux-2.12a-mountpointwithcolon.diff +Patch64: util-linux-2.12i-x86_64intel.diff +Patch70: util-linux-2.12h-short-passwords.diff +Patch71: util-linux-2.12q-null.diff +Patch72: stupid-programmer.diff +Patch74: util-linux-nfs-timeo.diff +Patch75: util-linux-2.12q-nfsv4.patch +Patch76: util-linux-warn-nfsudp.diff +Patch77: util-linux-2.12q-ionice.diff +Patch78: util-linux-2.11q-fs_mac.diff +Patch79: util-linux-opt-hotplug.diff +Patch81: util-linux-2.12a-mountbylabel-dm.patch +Patch83: util-linux-2.12q-mount--move.diff +Patch84: util-linux-nodiratime.diff +Patch85: util-linux-2.12q-strict-aliasing.diff +Patch86: util-linux-2.12r-mount-by-uuid.patch +Patch88: util-linux-2.12q-umount2-not-static.patch +Patch90: util-linux-2.12r-nonfsmountfallback.diff +Patch91: util-linux-2.12r-mount-mtab-update.patch +Patch92: util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff +Patch93: util-linux-2.12r-fdiskwrap.patch +Patch94: util-linux-2.12r-rawfixes.patch +Patch95: util-linux-2.12r-rpcsec-gss.patch +Patch96: util-linux-2.12r-external-prog-on-guess.diff +Patch97: util-linux-2.12r-sec-manpage.patch +Patch98: util-linux-2.12r-mount.8-xfs-update.patch +Patch99: util-linux-libvolume_id-support.patch +Patch100: util-linux-2.12r-umount_nosysfs.patch +Patch101: util-linux-2.12r-fdisk_llseek.patch +Patch102: util-linux-2.12r-pagesize.patch +Patch103: util-linux-2.12r-fdiskcyl.patch +Patch104: util-linux-2.12r-readprofile-mapfile.patch +Patch105: util-linux-2.12r-cal_formatting.patch +Patch106: util-linux-2.12r-partx.patch +Patch107: util-linux-2.12r-mkswap_fix.patch +Patch108: util-linux-2.12r-nfs_remount_options.patch +Patch109: util-linux-2.12r-losetup_password.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -# -%if %build_util_linux -Supplements: filesystem(minix) -%if 0%{?suse_version} >= 1330 -Requires: group(tty) -%endif -Provides: fsck-with-dev-lock = %{version} -# bnc#651598: -Provides: util-linux(fake+no-canonicalize) -PreReq: %install_info_prereq permissions -Recommends: %{name}-lang = %{version} -Provides: eject = 2.1.0-166.8 -Provides: login = 4.0-33.7 -# File conflict of eject (up to 12.3 and SLE11). -Obsoletes: eject < 2.1.0-166.8 -# File conflict of login (up to 12.1 and SLE11). -Obsoletes: login < 4.0-33.7 -# File conflict of su and kill (up to 12.3 and SLE11). -# It should be coreutils < 8.21-4, but coreutils provide Release-less symbol. -Conflicts: coreutils < 8.21 -%if 0%{?suse_version} < 1330 -# File conflict of sulogin and utmpdump (up to 12.3 and SLE11). -Conflicts: sysvinit-tools < 2.88+-87 -%endif -# File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3). -Conflicts: bash-completion <= 2.1-10 -# The preset is provided by the presets branding package since 0.4 (bsc#1012850) and since 12.2 in SLE (boo#1029775) -Conflicts: systemd-presets-branding < 12.2 -# bnc#805684: -%ifarch s390x -Obsoletes: s390-32 -Provides: s390-32 -%endif -# uuid-runtime appeared in SLE11 SP1 to SLE11 SP3 -Provides: uuid-runtime = %{version}-%{release} -Obsoletes: uuid-runtime < %{version}-%{release} -%if 0%{?suse_version} < 1330 -#BEGIN sysv compatibility hack -# After migration of raw init script to systemd, util-linux no more depends on -# fillup and insserv. Many poorly written packages implicitly depend on them -# without declaring it. Keep these dependencies in Leap 42 + SLE 12 line to -# prevent failures. -PreReq: %insserv_prereq %fillup_prereq -#END sysv compatibility hack -%endif -# -# Using "Requires" here would lend itself to help upgrading, but since -# util-linux is in the initial bootstrap, that is not a good thing to do: -# -Recommends: adjtimex -Recommends: time -Recommends: which -# -%if 0%{?suse_version} < 1330 -# Using Conflicts as util-linux-losetup-Add-support-for-setting-logical-blocksize -# now uses bit 5 of lo_flags with meaning LO_FLAGS_BLOCKSIZE bsc#966891 -# -Conflicts: kernel < 4.4 -%endif -%else -%if %build_python_libmount -%else -%if %build_util_linux_systemd -Supplements: packageand(util-linux:systemd) -# Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 -Provides: util-linux:/bin/logger -# Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 -Conflicts: util-linux < 2.25 -%systemd_requires -%else -# ERROR: No build_* variables are set. -%endif -%endif -%endif +PreReq: %insserv_prereq %fillup_prereq /bin/sed -%if %build_util_linux %description This package contains a large variety of low-level system utilities that are necessary for a Linux system to function. It contains the mount program, the fdisk configuration tool, and more. -%package -n libblkid1 -Summary: Filesystem detection library -Group: System/Filesystems -%description -n libblkid1 -Library for filesystem detection. -%package -n libblkid-devel -Summary: Development files for the filesystem detection library -Group: Development/Libraries/C and C++ -Requires: libblkid1 = %{version} +Authors: +-------- + Adrian Bunk -%description -n libblkid-devel -Files needed to develop applications using the library for filesystem -detection. - -%package -n libblkid-devel-static -Summary: Development files for the filesystem detection library -Group: Development/Libraries/C and C++ -Requires: libblkid-devel = %{version} - -%description -n libblkid-devel-static -Files needed to develop applications using the library for filesystem -detection. - -%package -n libuuid1 -Summary: Library to generate UUIDs -Group: System/Filesystems - -%description -n libuuid1 -A library to generate universally unique IDs (UUIDs). - -%package -n libuuid-devel -Summary: Development files for libuuid1 -Group: Development/Libraries/C and C++ -Requires: libuuid1 = %{version} - -%description -n libuuid-devel -Files to develop applications using the library to generate universally -unique IDs (UUIDs). - -%package -n libuuid-devel-static -Summary: Development files for libuuid1 -Group: Development/Libraries/C and C++ -Requires: libuuid-devel = %{version} - -%description -n libuuid-devel-static -Files to develop applications using the library to generate universally -unique IDs (UUIDs). - -%package -n libmount1 -Summary: Device mount library -Group: System/Filesystems - -%description -n libmount1 -Library designed to be used in low-level utils like -mount(8) and /usr/sbin/mount. helpers. - -%package -n libmount-devel -Summary: Development files for libmount1 -Group: Development/Libraries/C and C++ -Requires: libmount1 = %{version} - -%package -n libmount-devel-static -Summary: Development files for libmount1 -Group: Development/Libraries/C and C++ -Requires: libmount-devel = %{version} - -%description -n libmount-devel-static -Files to develop applications using the libmount library. - -%description -n libmount-devel -Files to develop applications using the libmount library. - -%package -n libsmartcols1 -Summary: Column-based text sort engine -Group: System/Libraries - -%description -n libsmartcols1 -Library to sort human readable column-based text output. - -%package -n libsmartcols-devel -Summary: Development files for libsmartcols1 -Group: Development/Libraries/C and C++ -Requires: libsmartcols1 = %{version} - -%description -n libsmartcols-devel -Files to develop applications using the libsmartcols library. - -%package -n libsmartcols-devel-static -Summary: Development files for libsmartcols1 -Group: Development/Libraries/C and C++ -Requires: libsmartcols-devel = %{version} - -%description -n libsmartcols-devel-static -Files to develop applications using the libsmartcols library. - -%package -n libfdisk1 -Summary: Filesystem detection library -Group: System/Filesystems - -%description -n libfdisk1 -Library for filesystem detection. - -%package -n libfdisk-devel -Summary: Development files for the filesystem detection library -Group: Development/Libraries/C and C++ -Requires: libfdisk1 = %{version} - -%description -n libfdisk-devel -Files needed to develop applications using the library for filesystem -detection. - -%package -n libfdisk-devel-static -Summary: Development files for the filesystem detection library -Group: Development/Libraries/C and C++ -Requires: libfdisk-devel = %{version} - -%description -n libfdisk-devel-static -Files needed to develop applications using the library for filesystem -detection. - -%lang_package -%endif -%if %build_util_linux_systemd -%if %build_util_linux -%package systemd -Summary: %summary_uls -Group: %group_uls -Supplements: packageand(util-linux:systemd) -# Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 -Provides: util-linux:/usr/lib/systemd/system/fstrim.service -# Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 -Conflicts: util-linux < 2.25 - -%description systemd -%else -%description -%endif -This package contains low-level util-linux utilities that use systemd. - -%package -n uuidd -Summary: Helper daemon to guarantee uniqueness of time-based UUIDs -Group: System/Filesystems -Requires(pre): /usr/sbin/groupadd -Requires(pre): /usr/sbin/useradd -# uuidd bash-completion moved to a correct package -Conflicts: util-linux < 2.25 -%systemd_requires - -%description -n uuidd -The uuidd package contains a userspace daemon (uuidd) which guarantees -uniqueness of time-based UUID generation even at very high rates on -SMP systems. - -%endif -%if %build_python_libmount -%if %build_util_linux -%package -n python-libmount -Summary: %summary_pl -Group: %group_pl - -%description -n python-libmount -%else -%description -%endif -This package contains the python bindings for util-linux libmount -library. - -%endif %prep -%setup -q -n %{_name}-%{version} -b 40 -%patch0 -p1 -%if 0%{?suse_version} < 1330 -# logical block size support in loop does not exist in Tumbleweed and upstream kernel yet -%patch1 -p1 -%endif +%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -b 16 -b 24 +%patch -p1 %patch2 -p1 -# +%patch3 -p0 +%patch7 -p1 +%patch8 -p1 +%patch10 -p1 +%patch11 -p1 +%patch43 +cd adjtimex-* +%patch44 -p1 +cd - +%patch15 -p1 +%patch23 -p1 +%patch25 -p1 +%patch26 -p0 +%patch46 -p1 +%patch51 -p1 +%patch52 -p0 +%patch58 -p1 +%patch61 -p1 +%patch62 -p1 +%patch64 -p1 +%patch70 -p1 +%patch71 -p1 +%patch72 +%patch74 -p1 +%patch75 -p1 +%patch76 -p1 +%patch77 -p1 +%patch78 -p1 +%patch79 -p1 +%patch81 -p1 +%patch83 +%patch84 -p1 +%patch85 -p1 +%patch86 -p1 +%patch88 +%patch90 -p1 +%patch91 +%patch92 -p1 +%patch93 -p1 +%patch94 -p1 +%patch95 +%patch96 -p1 +%patch97 -p1 +%patch98 +%patch99 -p0 +%patch100 +%patch101 +%patch102 +%patch103 -p1 +%patch104 -p1 +%patch105 +%patch106 -p1 +%patch107 -p1 +%patch108 -p1 +%patch109 -p1 # setctsid -cp -p %{S:22} %{S:23} . +cp %{S:22} %{S:23} . +# nologin and guessfstype +cp %{S:2} %{S:3} %{S:8} %{S:15} %{S:20} %{S:21} %{S:26} %{S:30} . +cd ../klogconsole +%patch27 -p1 -b .quiet +%patch32 -p1 +cd ../time-* +%patch40 %build -%if %build_util_linux -pushd ../klogconsole +# adjtimex build +cd adjtimex-%{adjtimex_ver} +CFLAGS="$RPM_OPT_FLAGS" ./configure +make +cd .. +pushd ../ +# freeramdisk build +cd freeramdisk +make CFLAGS="$RPM_OPT_FLAGS" freeramdisk +cd .. +# which build +cd which-%{which_ver} +%{?suse_update_config:%{suse_update_config}} +CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr \ + --mandir=%{_mandir} \ + --infodir=%{_infodir} \ + %{_target_cpu}-suse-linux +make +cd .. +# time build +cd time-%{time_ver} +%{?suse_update_config:%{suse_update_config}} +CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE " INSTALL_PROGRAM='$(INSTALL)' \ + ./configure --prefix=/usr \ + --mandir=%{_mandir} \ + --infodir=%{_infodir} \ + %{_target_cpu}-suse-linux +make +make check +cd .. # klogconsole build -make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" +cd klogconsole +make CFLAGS="$RPM_OPT_FLAGS" +cd .. +# sm-notify build +cd sm-notify* +make CFLAGS="$RPM_OPT_FLAGS" +cd .. +# schedutils build +cd schedutils-* +make CFLAGS="$RPM_OPT_FLAGS" popd # setctsid build rm -f setctsid -make %{?_smp_mflags} setctsid CFLAGS="%{optflags}" CC="%{__cc}" -# -#BEGIN SYSTEMD SAFETY CHECK -# With systemd, some utilities are built differently. Keep track of these -# sources to prevent building of systemd-less versions. -# -# WARNING: Never edit following line without doing all suggested in the echo below! -UTIL_LINUX_KNOWN_SYSTEMD_DEPS='./login-utils/lslogins.c ./misc-utils/logger.c ./misc-utils/uuidd.c ' -UTIL_LINUX_FOUND_SYSTEMD_DEPS=$(grep -rl 'HAVE_LIBSYSTEMD' . | fgrep '.c' | LC_ALL=C sort | tr '\n' ' ') -if test "$UTIL_LINUX_KNOWN_SYSTEMD_DEPS" != "$UTIL_LINUX_FOUND_SYSTEMD_DEPS" ; then - echo "List of utilities depending on systemd have changed. -Please check the new util-linux-systemd file list, file removal and update of Conflicts for safe update! -Then update configure options to build what needed. -Only then you can safely update following spec file line: -UTIL_LINUX_KNOWN_SYSTEMD_DEPS='$UTIL_LINUX_FOUND_SYSTEMD_DEPS'" - exit 1 -fi -#END SYSTEMD SAFETY CHECK -%else -#BEGIN SECOND STAGE MODIFICATIONS -# delete all make modules except wanted ones -sed -i '/^include/{ -%if %build_python_libmount - /libmount\/Makemodule.am/b 1 -%endif -%if %build_util_linux_systemd -# for lslogins - /login-utils/b 1 -# for logger and uuidd - /misc-utils/b 1 -# for fstrim.service and fstrim.timer - /sys-utils/b 1 -# for uninstalled libcommon required by uuidd - / lib\//b 1 -# for bash completions - /bash-completion/b 1 -# we always want tests (they are smart enough to skip irrelevant parts) - /tests/b 1 -%endif -%if %build_python_libmount - /libmount\/python/b 1 -%endif - d - :1 - }' Makefile.am libmount/Makemodule.am -%if %build_python_libmount -# trick: we do not want to build libmount, but include subdirs -# We close prefious if FALSE and open new pairing with endif -sed -i '/^if BUILD_LIBMOUNT/d -/^if ENABLE_GTK_DOC/i \ -if BUILD_LIBMOUNT -' libmount/Makemodule.am -# Do not install terminal-colors.d.5 -sed -i '/dist_man_MANS/d' lib/Makemodule.am -%endif -# disable all make modules except wanted ones -sed -i '/^if BUILD_/{ -%if %build_util_linux_systemd - /LSLOGINS/b 1 - /LOGGER/b 1 - /UUIDD/b 1 - /BASH_COMPLETION/b 1 -%endif - s/BUILD_.*/FALSE/ - :1 - } - ' libmount/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am sys-utils/Makemodule.am bash-completion/Makemodule.am -%if %build_util_linux_systemd -# trick: we do not want to build fstrim, but we want to install fstrim systemd connectors -# We close prefious if FALSE and open new pairing with endif -sed -i '/^if HAVE_SYSTEMD/i \ -endif\ -if TRUE -' sys-utils/Makemodule.am -# Do not install terminal-colors.d.5 -sed -i '/dist_man_MANS/d' lib/Makemodule.am -%endif -# Use installed first stage libraries -sed -i ' -# extra space to not replace pylibmount.la - s/ libmount\.la/ -lmount/g - s/libuuid\.la/-luuid/g - s/libblkid\.la/-lblkid/g - s/libsmartcols\.la/-lsmartcols/g - ' libmount/python/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am tests/helpers/Makemodule.am -# Ignore dependencies on optional (and not built in second stage) libraries -sed -i ' - s/UL_REQUIRES_BUILD(\[.*\], \[libuuid\])/dnl &/ - s/UL_REQUIRES_BUILD(\[.*\], \[libsmartcols\])/dnl &/ - ' configure.ac -sed -i ' - /SUBDIRS =/s/ po// - ' Makefile.am -#END SECOND STAGE MODIFICATIONS -%endif -# +make setctsid OPT="$RPM_OPT_FLAGS" # util-linux itself -# -# Version check for libutempter -# -uhead=$(find %_includedir -name utempter.h 2>/dev/null) -if test -n "$uhead" && grep -q utempter_add_record "$uhead" -then - uhead=--with-utempter -else - uhead=--without-utempter -fi -export SUID_CFLAGS="-fpie" -export SUID_LDFLAGS="-pie" -export LDFLAGS="-Wl,-z,relro,-z,now" -# override default localstatedir to /run -# only used for volatile data -# -# SUSE now supports only systemd based system. We do not build -# sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities. -AUTOPOINT=true autoreconf -vfi -%configure \ - --disable-silent-rules \ - --localstatedir=/run \ - --docdir=%{_docdir}/%{_name} \ - --with-audit \ - --with-gnu-ld \ - --with-ncursesw \ - --with-selinux \ - $uhead \ - --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ - --with-systemdsystemunitdir=%{_unitdir} \ - --enable-libuuid-force-uuidd \ - --enable-sulogin-emergency-mount \ - --disable-use-tty-group \ - --enable-static \ - --disable-rpath \ - --enable-all-programs \ - --disable-reset \ - --disable-chfn-chsh \ - --disable-newgrp \ - --disable-vipw \ - --disable-pg \ -%if %{without enable_last} - --disable-last \ +%ifarch s390 s390x +export CFLAGS=-DCONFIG_SMP %endif -%if %build_util_linux_systemd - --with-systemd \ - --enable-logger \ - --enable-lslogins \ - --enable-uuidd \ -%else - --without-systemd \ - --disable-logger \ - --disable-lslogins \ - --disable-uuidd \ -%endif -%if %build_python_libmount - --with-python \ -%else - --without-python \ -%endif - -# -# Safety check: HAVE_UUIDD should be always 1: -grep -q 'HAVE_UUIDD 1' config.h -make %{?_smp_mflags} -# -%if %build_util_linux -%{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29} -%{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31} -%endif - -%check -# mark some tests "known_fail" -# -%if 0%{?qemu_user_space_build} -export TS_OPT_fdisk_gpt_known_fail="yes" -export TS_OPT_fdisk_oddinput_known_fail="yes" -export TS_OPT_fdisk_sunlabel_known_fail="yes" -export TS_OPT_fincore_count_known_fail="yes" -export TS_OPT_libfdisk_gpt_known_fail="yes" -export TS_OPT_misc_flock_known_fail="yes" -export TS_OPT_misc_ionice_known_fail="yes" -export TS_OPT_misc_swaplabel_known_fail="yes" -export TS_OPT_kill_name_to_number_known_fail="yes" -export TS_OPT_kill_print_pid_known_fail="yes" -export TS_OPT_kill_queue_known_fail="yes" -export TS_OPT_uuid_uuidd_known_fail="yes" -# unsupported syscall in script(1) ... might be fixed in qemu -export TS_OPT_script_known_fail="yes" -# may segfault on qemu-user-space -export TS_OPT_misc_setarch_known_fail="yes" -%endif -# -# hacks -export PATH="$PATH:/sbin:/usr/sbin" -# -# do the check but don't abort yet -result="0" -make %{?_smp_mflags} check || result="1" -# -# always show test diffs (inclusive known_fail) and exit result -diffs_files="$(find tests/diff -type f | sort)" -echo "$diffs_files" | xargs -r cat -exit "$result" +export CFLAGS +./configure +make OPT="$RPM_OPT_FLAGS" +gcc $RPM_OPT_FLAGS -o nologin nologin.c +gcc $RPM_OPT_FLAGS -o mkzimage_cmdline %{S:29} %install -%if %build_util_linux -mkdir -p %{buildroot}{%{_sysconfdir}/{pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} -install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf -install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login -install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote -install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser -install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l -install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su -install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l -install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su -pushd ../klogconsole +mkdir -p "$RPM_BUILD_ROOT"{/etc/init.d,%{_mandir}/man{1,8},\ +/bin,/sbin,/usr/bin,/usr/sbin,%{_infodir}} +cp adjtimex-*/adjtimex %{buildroot}/usr/sbin/ +cp adjtimex-*/adjtimex.8 %{buildroot}%{_mandir}/man8/ +pushd .. +# freeramdisk install +cd freeramdisk +install freeramdisk $RPM_BUILD_ROOT/usr/sbin +install -m644 freeramdisk.info.gz $RPM_BUILD_ROOT%{_infodir} +cd .. +# which install +cd which-%{which_ver} +make install DESTDIR=$RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/which +install -m 0644 README $RPM_BUILD_ROOT%{_defaultdocdir}/which/ +install -m 0644 EXAMPLES $RPM_BUILD_ROOT%{_defaultdocdir}/which/ +install -m 0644 README.alias $RPM_BUILD_ROOT%{_defaultdocdir}/which/ +cd .. +# time install +cd time-%{time_ver} +mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/time +make install DESTDIR=$RPM_BUILD_ROOT \ + prefix=$RPM_BUILD_ROOT/usr \ + infodir=$RPM_BUILD_ROOT%{_infodir} \ + mandir=$RPM_BUILD_ROOT%{_mandir} +install -m 0644 README $RPM_BUILD_ROOT%{_defaultdocdir}/time/ +install -m 0644 AUTHORS $RPM_BUILD_ROOT%{_defaultdocdir}/time/ +install -m 0644 COPYING $RPM_BUILD_ROOT%{_defaultdocdir}/time/ +install -m 0644 NEWS $RPM_BUILD_ROOT%{_defaultdocdir}/time/ +cd .. # klogconsole install -make install DEST=%{buildroot} +cd klogconsole +make install DEST=$RPM_BUILD_ROOT +cd .. +# sm-notify install +cd sm-notify* +install sm-notify $RPM_BUILD_ROOT/sbin +install -m 0644 sm-notify.8 $RPM_BUILD_ROOT/%_mandir/man8 +install %SOURCE25 $RPM_BUILD_ROOT/etc/init.d +mkdir -p $RPM_BUILD_ROOT/var/lib/nfs/sm +chmod 700 $RPM_BUILD_ROOT/var/lib/nfs/sm +mkdir -p $RPM_BUILD_ROOT/var/lib/nfs/sm.bak +chmod 700 $RPM_BUILD_ROOT/var/lib/nfs/sm.bak +touch $RPM_BUILD_ROOT/var/lib/nfs/state +chmod 644 $RPM_BUILD_ROOT/var/lib/nfs/state +cd .. +# schedutils install +cd schedutils-* +make PREFIX=$RPM_BUILD_ROOT/usr \ + DOCDIR=$RPM_BUILD_ROOT%_docdir/schedutils \ + MANDIR=$RPM_BUILD_ROOT%_mandir install installdoc popd -%endif -# # util-linux install -# -%make_install -rm -f %{buildroot}%{python_sitearch}/libmount/*.*a -%if %build_util_linux -#UsrMerge -ln -s %{_bindir}/kill %{buildroot}/bin -ln -s %{_bindir}/su %{buildroot}/bin -ln -s %{_bindir}/dmesg %{buildroot}/bin -ln -s %{_bindir}/more %{buildroot}/bin -ln -s %{_bindir}/mount %{buildroot}/bin -ln -s %{_bindir}/umount %{buildroot}/bin -ln -s %{_bindir}/findmnt %{buildroot}/bin -ln -s %{_bindir}/lsblk %{buildroot}/bin -ln -s %{_sbindir}/agetty %{buildroot}/sbin -ln -s %{_sbindir}/blockdev %{buildroot}/sbin -ln -s %{_sbindir}/cfdisk %{buildroot}/sbin -ln -s %{_sbindir}/ctrlaltdel %{buildroot}/sbin -ln -s %{_sbindir}/fdisk %{buildroot}/sbin -ln -s %{_sbindir}/fsck.minix %{buildroot}/sbin -ln -s %{_sbindir}/fsck.cramfs %{buildroot}/sbin -ln -s %{_sbindir}/hwclock %{buildroot}/sbin -ln -s %{_sbindir}/losetup %{buildroot}/sbin -ln -s %{_sbindir}/mkfs %{buildroot}/sbin -ln -s %{_sbindir}/mkfs.bfs %{buildroot}/sbin -ln -s %{_sbindir}/mkfs.minix %{buildroot}/sbin -ln -s %{_sbindir}/mkfs.cramfs %{buildroot}/sbin -ln -s %{_sbindir}/mkswap %{buildroot}/sbin -ln -s %{_sbindir}/nologin %{buildroot}/sbin -ln -s %{_sbindir}/pivot_root %{buildroot}/sbin -ln -s %{_sbindir}/raw %{buildroot}/sbin -ln -s %{_sbindir}/sfdisk %{buildroot}/sbin -ln -s %{_sbindir}/swapoff %{buildroot}/sbin -ln -s %{_sbindir}/swapon %{buildroot}/sbin -ln -s %{_sbindir}/blkid %{buildroot}/sbin -ln -s %{_sbindir}/findfs %{buildroot}/sbin -ln -s %{_sbindir}/fsck %{buildroot}/sbin -ln -s %{_sbindir}/switch_root %{buildroot}/sbin -ln -s %{_sbindir}/wipefs %{buildroot}/sbin -ln -s %{_sbindir}/fsfreeze %{buildroot}/sbin -ln -s %{_sbindir}/swaplabel %{buildroot}/sbin -ln -s %{_sbindir}/fstrim %{buildroot}/sbin -ln -s %{_sbindir}/chcpu %{buildroot}/sbin -#EndUsrMerge -install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/filesystems +make DESTDIR=$RPM_BUILD_ROOT install +mv $RPM_BUILD_ROOT/usr/bin/logger $RPM_BUILD_ROOT/bin/logger +install -m 644 mount/filesystems $RPM_BUILD_ROOT/etc/filesystems +install -m 755 nologin $RPM_BUILD_ROOT/sbin %ifnarch ppc ppc64 -install -m 755 mkzimage_cmdline %{buildroot}%{_bindir} -install -m 644 %{S:28} %{buildroot}%{_mandir}/man8 -install -m 755 chrp-addnote %{buildroot}%{_bindir} +install -m 755 mkzimage_cmdline $RPM_BUILD_ROOT/usr/bin +install -m 644 %{S:28} $RPM_BUILD_ROOT%{_mandir}/man8 %endif +install -m 755 mount/guessfstype $RPM_BUILD_ROOT/bin +install -m 644 nologin.8 $RPM_BUILD_ROOT%{_mandir}/man8 +install -m 755 disk-utils/raw $RPM_BUILD_ROOT/usr/sbin +install -m 644 disk-utils/raw.8 $RPM_BUILD_ROOT%{_mandir}/man8 +install -m 644 guessfstype.8 $RPM_BUILD_ROOT%{_mandir}/man8 # setctsid install -install -m 755 setctsid %{buildroot}%{_sbindir} -install -m 444 setctsid.8 %{buildroot}%{_mandir}/man8/ -echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir}/flushb -chmod 755 %{buildroot}%{_sbindir}/flushb +install -m 755 setctsid $RPM_BUILD_ROOT/usr/sbin +install -m 444 setctsid.8 $RPM_BUILD_ROOT%{_mandir}/man8/ +install -m 444 %SOURCE27 $RPM_BUILD_ROOT%{_mandir}/man8/ +echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > $RPM_BUILD_ROOT/usr/sbin/flushb +chmod 755 $RPM_BUILD_ROOT/usr/sbin/flushb # Install scripts to configure raw devices at boot time -install -m 644 $RPM_SOURCE_DIR%{_sysconfdir}.raw %{buildroot}%{_sysconfdir}/raw -install -m 644 $RPM_SOURCE_DIR/raw.service %{buildroot}%{_unitdir} -ln -sf service %{buildroot}%{_sbindir}/rcraw -# upstream moved getopt examples from datadir to docdir but we keep -# the old location because we would need to fix the manpage first -mv %{buildroot}%{_docdir}/%{_name}/getopt %{buildroot}%{_datadir}/ +install -m 644 $RPM_SOURCE_DIR/etc.raw $RPM_BUILD_ROOT/etc/raw +install -m 755 $RPM_SOURCE_DIR/raw.init $RPM_BUILD_ROOT/etc/init.d/raw +ln -sf ../../etc/init.d/raw $RPM_BUILD_ROOT/usr/sbin/rcraw # Stupid hack so we don't have a tcsh dependency -chmod 644 %{buildroot}%{_datadir}/getopt/getopt*.tcsh -# login is always and only in /bin -mv %{buildroot}%{_bindir}/login %{buildroot}/bin/ -# arch dependent +chmod 644 $RPM_BUILD_ROOT/usr/share/misc/getopt/* +# Following files we don't want to package, so remove them +rm -f $RPM_BUILD_ROOT/bin/kill +rm -f $RPM_BUILD_ROOT/sbin/guessfstype # in /bin +rm -f $RPM_BUILD_ROOT/usr/bin/last +rm -f $RPM_BUILD_ROOT/usr/bin/raw +rm -f $RPM_BUILD_ROOT/usr/bin/pg +rm -f $RPM_BUILD_ROOT/usr/share/man/man1/kill.1* +rm -f $RPM_BUILD_ROOT/usr/share/man/man1/last.1* +rm -f $RPM_BUILD_ROOT/usr/share/man/man1/pg.1* %ifarch s390 s390x -rm -f %{buildroot}%{_sysconfdir}/fdprm -rm -f %{buildroot}%{_sbindir}/fdformat -rm -f %{buildroot}%{_sbindir}/hwclock -#UsrMerge -rm -f %{buildroot}/sbin/hwclock -#EndUsrMerge -rm -f %{buildroot}%{_sbindir}/klogconsole -rm -f %{buildroot}%{_bindir}/setterm -rm -f %{buildroot}%{_sbindir}/tunelp -rm -f %{buildroot}%{_mandir}/man8/fdformat.8* -rm -f %{buildroot}%{_mandir}/man8/hwclock.8* -rm -f %{buildroot}%{_mandir}/man8/klogconsole.8* -rm -f %{buildroot}%{_mandir}/man8/tunelp.8* +rm -f $RPM_BUILD_ROOT/etc/fdprm +rm -f $RPM_BUILD_ROOT/usr/bin/cytune +rm -f $RPM_BUILD_ROOT/usr/bin/fdformat +rm -f $RPM_BUILD_ROOT/sbin/hwclock +rm -f $RPM_BUILD_ROOT/usr/sbin/klogconsole +rm -f $RPM_BUILD_ROOT/usr/bin/setfdprm +rm -f $RPM_BUILD_ROOT/usr/bin/setterm +rm -f $RPM_BUILD_ROOT/usr/sbin/tunelp +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/cytune.8* +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/fdformat.8* +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/hwclock.8* +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/klogconsole.8* +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/setfdprm.8* +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/tunelp.8* %endif -%ifarch ia64 %sparc m68k -rm -f %{buildroot}%{_mandir}/man8/cfdisk.8* -rm -f %{buildroot}%{_mandir}/man8/sfdisk.8* -rm -f %{buildroot}%{_sbindir}/cfdisk -#UsrMerge -rm -f %{buildroot}/sbin/cfdisk -#EndUsrMerge -rm -f %{buildroot}%{_sbindir}/sfdisk -#UsrMerge -rm -f %{buildroot}/sbin/sfdisk -#EndUsrMerge +%ifnarch %ix86 x86_64 +rm -f $RPM_BUILD_ROOT/usr/sbin/ramsize +rm -f $RPM_BUILD_ROOT/usr/sbin/rdev +rm -f $RPM_BUILD_ROOT/usr/sbin/rootflags +rm -f $RPM_BUILD_ROOT/usr/sbin/vidmode +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/ramsize.8* +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/rdev.8* +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/rootflags.8* +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/vidmode.8* %endif -%ifarch ia64 m68k -rm -f %{buildroot}%{_sbindir}/fdisk -#UsrMerge -rm -f %{buildroot}/sbin/fdisk -#EndUsrMerge -rm -f %{buildroot}%{_mandir}/man8/fdisk.8* +%ifarch ia64 sparc +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/cfdisk.8* +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/sfdisk.8* +rm -f $RPM_BUILD_ROOT/sbin/cfdisk +rm -f $RPM_BUILD_ROOT/sbin/sfdisk %endif -%find_lang %{name} %{name}.lang -# create list of setarch(8) symlinks -find %{buildroot}%{_bindir}/ -regextype posix-egrep -type l \ - -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)$" \ - -printf "%{_bindir}/%f\n" >> %{name}.files -find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ - -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)\.8.*" \ - -printf "%{_mandir}/man8/%f*\n" >> %{name}.files -%else -# install systemd files manually, don't use Makefile that expect build of utilities and its dependencies. +%ifarch ia64 +rm -f $RPM_BUILD_ROOT/sbin/fdisk +rm -f $RPM_BUILD_ROOT%{_mandir}/man8/fdisk.8* %endif -%if %build_util_linux_systemd -mkdir -p %{buildroot}/bin -mkdir -p %{buildroot}%{_sbindir} -mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid -mkdir -p %{buildroot}/run/uuidd -ln -s %{_bindir}/logger %{buildroot}/bin -# clock.txt from uuidd is a ghost file -touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt -ln -sf /sbin/service %{buildroot}/usr/sbin/rcuuidd -ln -sf /sbin/service %{buildroot}/usr/sbin/rcfstrim -%if !%build_util_linux -%make_install -%endif -%endif -# link duplicate manpages and python bindings -%fdupes -s %{buildroot}%{_prefix} -%if %build_util_linux -%pre -%{service_add_pre raw.service} +%clean +rm -rf $RPM_BUILD_ROOT %post -%{service_add_post raw.service} -%set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount -%set_permissions %{_bindir}/su -# Safely migrate PAM files from coreutils to util-linux -# (openSUSE 12.3->13.1, SLE11->SLE12) -# -# coreutils with su were upgraded (and su removed) before util-linux -# with su was installed (see the Conflicts above). If the admin edited -# the PAM file, the seemingly no more used modified file was saved as -# .rpmsave and the new clean file was installed. As we want -# "noreplace" upgrade, and the contents of the clean file contents has -# no changes, we should restore admin modification, and rename the -# clean file to .rpmnew, as it would happen if the file was not moved -# from one package to another. -for PAM_FILE in default/su pam.d/su pam.d/su-l ; do - if test -f %{_sysconfdir}/$PAM_FILE.rpmsave ; then - mv %{_sysconfdir}/$PAM_FILE %{_sysconfdir}/$PAM_FILE.rpmnew - mv %{_sysconfdir}/$PAM_FILE.rpmsave %{_sysconfdir}/$PAM_FILE - fi -done - -%preun -%{service_del_preun raw.service} +%{fillup_and_insserv -ps raw ACTIVATE_RAW_DEV} +%{fillup_and_insserv -fY nfsboot} +%install_info --entry="* freeramdisk: (freeramdisk). tell kernel to free allocated memory for ramdisk" --info-dir=%{_infodir} %{_infodir}/freeramdisk.info.gz +%install_info --info-dir=%{_infodir} %{_infodir}/ipc.info.gz +%install_info --entry="* time: (time). summarizing used system resources" --info-dir=%{_infodir} %{_infodir}/time.info.gz +%install_info --entry="* which: (which). show the full path of (shell) commands" --info-dir=%{_infodir} %{_infodir}/which.info.gz +%run_permissions +# mount option 'code=' is now called 'codepage=' so change fstab +if [ -f etc/fstab ]; then + sed -i 's:code=:codepage=:' etc/fstab +fi + %postun -%{service_del_postun raw.service} +%install_info_delete --info-dir=%{_infodir} %{_infodir}/freeramdisk.info.gz +%install_info_delete --info-dir=%{_infodir} %{_infodir}/ipc.info.gz +%install_info_delete --info-dir=%{_infodir} %{_infodir}/time.info.gz +%install_info_delete --info-dir=%{_infodir} %{_infodir}/which.info.gz +%{insserv_cleanup} %verifyscript -%verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount -%verify_permissions -e %{_bindir}/su +%verify_permissions -e /usr/bin/wall -e /usr/bin/write -%post -n libblkid1 -p /sbin/ldconfig - -%postun -n libblkid1 -p /sbin/ldconfig - -%post -n libmount1 -p /sbin/ldconfig - -%postun -n libmount1 -p /sbin/ldconfig - -%post -n libsmartcols1 -p /sbin/ldconfig - -%postun -n libsmartcols1 -p /sbin/ldconfig - -%post -n libuuid1 -p /sbin/ldconfig - -%postun -n libuuid1 -p /sbin/ldconfig - -%post -n libfdisk1 -p /sbin/ldconfig - -%postun -n libfdisk1 -p /sbin/ldconfig - -%files lang -f %{name}.lang -%endif - -%if %build_util_linux_systemd -# fstrim(8) and fstrim.service are from different packages. But it's a oneshot -# service (timer), no restart needed on binary updates (unless path is changed). -%pre -n util-linux-systemd -%{service_add_pre fstrim.service fstrim.timer} - -%post -n util-linux-systemd -%{service_add_post fstrim.service fstrim.timer} - -%preun -n util-linux-systemd -%{service_del_preun fstrim.service fstrim.timer} - -%postun -n util-linux-systemd -%{service_del_postun fstrim.service fstrim.timer} - -%pre -p /bin/bash -n uuidd -/usr/sbin/groupadd -r uuidd 2>/dev/null || : -/usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ - -d /var/run/uuidd uuidd 2>/dev/null || : -%{service_add_pre uuidd.socket uuidd.service} - -%post -n uuidd -%{service_add_post uuidd.socket uuidd.service} - -%preun -n uuidd -%{service_del_preun uuidd.socket uuidd.service} - -%postun -n uuidd -%{service_del_postun uuidd.socket uuidd.service} -%endif - -%if %build_util_linux -%files -f %{name}.files +%files # Common files for all archs %defattr(-,root,root) -# util-linux documentation files -%doc README.licensing -%doc COPYING -%doc Documentation/licenses/COPYING.BSD-3 -%doc Documentation/licenses/COPYING.LGPLv2.1 -%doc Documentation/licenses/COPYING.UCB -%doc Documentation/blkid.txt -%doc Documentation/cal.txt -%doc Documentation/col.txt -%doc Documentation/deprecated.txt -%doc Documentation/getopt.txt -%doc Documentation/howto-debug.txt -%doc Documentation/hwclock.txt -%doc Documentation/modems-with-agetty.txt -%doc Documentation/mount.txt -%doc Documentation/pg.txt -%{_unitdir}/raw.service -%config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw -%config(noreplace) %{_sysconfdir}/filesystems -%config(noreplace) %{_sysconfdir}/blkid.conf -%config(noreplace) %{_sysconfdir}/pam.d/login -%config(noreplace) %{_sysconfdir}/pam.d/remote -%config(noreplace) %{_sysconfdir}/pam.d/runuser -%config(noreplace) %{_sysconfdir}/pam.d/runuser-l -%config(noreplace) %{_sysconfdir}/pam.d/su -%config(noreplace) %{_sysconfdir}/pam.d/su-l -%config(noreplace) %{_sysconfdir}/default/su -#UsrMerge -/bin/kill -/bin/su +%doc HISTORY INSTALL +%doc login-utils/README.getty +%doc login-utils/README.modems-with-agetty +%doc login-utils/README.poeigl +%doc misc-utils/README.cal +%doc misc-utils/README.namei +%doc misc-utils/README1.namei +%doc mount/README.mount +%doc hwclock/README.hwclock +%doc text-utils/README.col +%doc README.loop-AES-v2.2d README.loop-AES-v2.2d.SuSE +%doc README.largedisk +%config %attr(744,root,root) /etc/init.d/raw +%attr(755,root,root) /etc/init.d/nfsboot +%config(noreplace) %attr(644,root,root) /etc/raw +/usr/sbin/rcraw +/bin/arch /bin/dmesg +/bin/guessfstype /bin/more /bin/mount /bin/umount -/bin/findmnt -/bin/login -/bin/lsblk +%config /etc/filesystems /sbin/agetty /sbin/blockdev +/sbin/elvtune /sbin/ctrlaltdel /sbin/fsck.minix /sbin/fsck.cramfs @@ -922,414 +438,1116 @@ done /sbin/mkfs.cramfs /sbin/mkswap /sbin/nologin +/sbin/partx /sbin/pivot_root -/sbin/raw +/sbin/sln +/sbin/sm-notify /sbin/swapoff /sbin/swapon -/sbin/blkid -/sbin/findfs -/sbin/fsck -/sbin/switch_root -/sbin/wipefs -/sbin/fsfreeze -/sbin/swaplabel -/sbin/fstrim -/sbin/chcpu -#EndUsrMerge -%{_bindir}/kill -%{_bindir}/su -%{_bindir}/eject -%{_bindir}/cal -%{_bindir}/chmem -%{_bindir}/chrt -%{_bindir}/col -%{_bindir}/colcrt -%{_bindir}/colrm -%{_bindir}/column -%{_bindir}/dmesg -%{_bindir}/fallocate -%{_bindir}/fincore -%{_bindir}/findmnt -%{_bindir}/flock -%{_bindir}/getopt -%{_bindir}/hexdump -%{_bindir}/ionice -%{_bindir}/ipcmk -%{_bindir}/ipcrm -%{_bindir}/ipcs -%{_bindir}/isosize -%if %{with enable_last} -%{_bindir}/last -%{_bindir}/lastb -%endif -%{_bindir}/line -%{_bindir}/look -%{_bindir}/lsblk -%{_bindir}/lscpu -%{_bindir}/lsipc -%{_bindir}/lslocks -%{_bindir}/lsmem -%{_bindir}/lsns -%{_bindir}/mcookie -%{_bindir}/mesg -%{_bindir}/more -%{_bindir}/mount -%{_bindir}/namei -%{_bindir}/nsenter -%{_bindir}/prlimit -%{_bindir}/rename -%{_bindir}/renice -%{_bindir}/rev -%{_bindir}/script -%{_bindir}/scriptreplay -%{_bindir}/setarch -%{_bindir}/setpriv -%{_bindir}/setsid -%{_bindir}/taskset -%{_bindir}/ul -%{_bindir}/umount -%{_bindir}/unshare -%{_bindir}/mountpoint -%{_bindir}/utmpdump -%{_bindir}/uuidgen -%{_bindir}/uname26 +/bin/logger +/usr/bin/cal +/usr/bin/chkdupexe +/usr/bin/chrt +/usr/bin/col +/usr/bin/colcrt +/usr/bin/colrm +/usr/bin/column +/usr/bin/ddate +/usr/bin/flock +/usr/bin/getopt +/usr/bin/hexdump +/usr/bin/hostid +/usr/bin/ionice +/usr/bin/ipcrm +/usr/bin/ipcs +/usr/bin/isosize +/usr/bin/line +/usr/bin/look +/usr/bin/mcookie +/usr/bin/mesg %ifnarch ppc ppc64 -%{_bindir}/chrp-addnote -%{_bindir}/mkzimage_cmdline +/usr/bin/mkzimage_cmdline %endif -%{_bindir}/wdctl -%{_sbindir}/addpart -%{_sbindir}/agetty -%{_sbindir}/blkid -%{_sbindir}/blkdiscard -# blkzone depends on linux/blkzoned.h -%if 0%{?suse_version} >= 1330 -%{_sbindir}/blkzone -%endif -%{_sbindir}/blockdev -%{_sbindir}/chcpu -%{_sbindir}/ctrlaltdel -%{_sbindir}/delpart -%{_sbindir}/findfs -%{_sbindir}/fsck -%{_sbindir}/fsck.minix -%{_sbindir}/fsck.cramfs -%{_sbindir}/fsfreeze -%{_sbindir}/fstrim -%{_sbindir}/ldattach -%{_sbindir}/losetup -%{_sbindir}/mkfs -%{_sbindir}/mkfs.bfs -%{_sbindir}/mkfs.minix -%{_sbindir}/mkfs.cramfs -%{_sbindir}/mkswap -%{_sbindir}/nologin -%{_sbindir}/partx -%{_sbindir}/pivot_root -%{_sbindir}/raw -%{_sbindir}/rcraw -%{_sbindir}/resizepart -%{_sbindir}/rtcwake -%{_sbindir}/runuser -%{_sbindir}/setctsid -%{_sbindir}/sulogin -%{_sbindir}/swaplabel -%{_sbindir}/swapoff -%{_sbindir}/swapon -%{_sbindir}/switch_root -%{_sbindir}/wipefs -%verify(not mode) %attr(0755,root,tty) %{_bindir}/wall -%{_bindir}/whereis -%verify(not mode) %attr(0755,root,tty) %{_bindir}/write -%{_sbindir}/zramctl -%{_mandir}/man1/kill.1.gz -%{_mandir}/man1/su.1.gz +/usr/bin/namei +/usr/bin/rename +/usr/bin/renice +/usr/bin/scriptreplay +/usr/bin/rev +/usr/bin/script +/usr/bin/setsid +/usr/bin/ul +/usr/bin/tailf +/usr/bin/taskset +/usr/bin/time +/usr/bin/which +/usr/sbin/freeramdisk +/usr/sbin/setctsid +%verify(not mode) %attr(0755,root,tty) /usr/bin/wall +/usr/bin/whereis +/usr/sbin/adjtimex +%verify(not mode) %attr(0755,root,tty) /usr/bin/write +%dir %{_defaultdocdir}/schedutils +%dir %{_defaultdocdir}/time +%dir %{_defaultdocdir}/which +/var/lib/nfs +%ghost /var/lib/nfs/state +%{_defaultdocdir}/schedutils/* +%{_defaultdocdir}/time/* +%{_defaultdocdir}/which/* +%{_infodir}/ipc.info.gz +%{_infodir}/freeramdisk.info*.gz +%{_infodir}/time.info*.gz +%{_infodir}/which.info*.gz +%{_mandir}/man1/arch.1.gz %{_mandir}/man1/cal.1.gz +%{_mandir}/man1/chkdupexe.1.gz %{_mandir}/man1/chrt.1.gz %{_mandir}/man1/col.1.gz %{_mandir}/man1/colcrt.1.gz %{_mandir}/man1/colrm.1.gz %{_mandir}/man1/column.1.gz -%{_mandir}/man1/dmesg.1.gz -%{_mandir}/man1/eject.1.gz -%{_mandir}/man1/fallocate.1.gz -%{_mandir}/man1/fincore.1.gz +%{_mandir}/man1/ddate.1.gz %{_mandir}/man1/flock.1.gz %{_mandir}/man1/getopt.1.gz %{_mandir}/man1/hexdump.1.gz -%{_mandir}/man1/ipcrm.1.gz -%{_mandir}/man1/ipcs.1.gz -%if %{with enable_last} -%{_mandir}/man1/last.1.gz -%{_mandir}/man1/lastb.1.gz -%endif +%{_mandir}/man1/hostid.1.gz %{_mandir}/man1/line.1.gz -%{_mandir}/man1/login.1.gz +%{_mandir}/man1/logger.1.gz %{_mandir}/man1/look.1.gz -%{_mandir}/man1/lscpu.1.gz -%{_mandir}/man1/lsipc.1.gz -%{_mandir}/man1/lsmem.1.gz %{_mandir}/man1/mcookie.1.gz %{_mandir}/man1/mesg.1.gz %{_mandir}/man1/more.1.gz %{_mandir}/man1/namei.1.gz -%{_mandir}/man1/nsenter.1.gz %{_mandir}/man1/ionice.1.gz -%{_mandir}/man1/prlimit.1.gz +%{_mandir}/man1/readprofile.1.gz %{_mandir}/man1/rename.1.gz -%{_mandir}/man1/rev.1.gz -%{_mandir}/man1/renice.1.gz -%{_mandir}/man1/setpriv.1.gz -%{_mandir}/man1/setsid.1.gz -%{_mandir}/man1/script.1.gz %{_mandir}/man1/scriptreplay.1.gz -%{_mandir}/man1/setterm.1.gz +%{_mandir}/man1/rev.1.gz +%{_mandir}/man1/script.1.gz +%{_mandir}/man1/tailf.1.gz %{_mandir}/man1/taskset.1.gz %{_mandir}/man1/ul.1.gz -%{_mandir}/man1/unshare.1.gz %{_mandir}/man1/wall.1.gz %{_mandir}/man1/whereis.1.gz %{_mandir}/man1/write.1.gz -%{_mandir}/man1/ipcmk.1.gz -%{_mandir}/man1/mountpoint.1.gz -%{_mandir}/man1/utmpdump.1.gz -%{_mandir}/man1/runuser.1.gz -%{_mandir}/man1/uuidgen.1.gz +%{_mandir}/man1/which.1.gz %{_mandir}/man5/fstab.5.gz -%{_mandir}/man5/terminal-colors.d.5.gz -%{_mandir}/man8/addpart.8.gz +%{_mandir}/man5/nfs.5.gz %{_mandir}/man8/agetty.8.gz -%if 0%{?suse_version} >= 1330 -%{_mandir}/man8/blkzone.8.gz -%endif %{_mandir}/man8/blockdev.8.gz -%{_mandir}/man8/chmem.8.gz +%{_mandir}/man1/setterm.1.gz +%{_mandir}/man8/elvtune.8* %{_mandir}/man8/ctrlaltdel.8.gz -%{_mandir}/man8/delpart.8.gz -%{_mandir}/man8/blkid.8.gz -%{_mandir}/man8/blkdiscard.8.gz -%{_mandir}/man8/switch_root.8.gz +%{_mandir}/man8/adjtimex.8.gz %{_mandir}/man8/mkfs.bfs.8.gz %{_mandir}/man8/mkfs.minix.8.gz -%{_mandir}/man8/findfs.8.gz -%{_mandir}/man8/fsck.8.gz -%{_mandir}/man8/fsck.cramfs.8.gz %{_mandir}/man8/fsck.minix.8.gz +%{_mandir}/man8/dmesg.8.gz +%{_mandir}/man8/ipcrm.8.gz +%{_mandir}/man8/ipcs.8.gz %{_mandir}/man8/isosize.8.gz -%{_mandir}/man8/ldattach.8.gz %{_mandir}/man8/losetup.8.gz -%{_mandir}/man8/lslocks.8.gz -%{_mandir}/man8/lsns.8.gz %{_mandir}/man8/mkfs.8.gz -%{_mandir}/man8/mkfs.cramfs.8.gz %{_mandir}/man8/mkswap.8.gz %{_mandir}/man8/mount.8.gz %{_mandir}/man8/nologin.8.gz -%{_mandir}/man8/findmnt.8.gz -%{_mandir}/man8/fsfreeze.8.gz -%{_mandir}/man8/swaplabel.8.gz -%{_mandir}/man8/readprofile.8.gz -%{_mandir}/man8/chcpu.8.gz %ifnarch ppc ppc64 %{_mandir}/man8/mkzimage_cmdline.8.gz %endif -%{_mandir}/man8/partx.8.gz %{_mandir}/man8/pivot_root.8.gz %{_mandir}/man8/raw.8.gz -%{_mandir}/man8/rtcwake.8.gz -%{_mandir}/man8/setarch.8.gz +%{_mandir}/man8/renice.8.gz +%{_mandir}/man8/setsid.8.gz +%{_mandir}/man8/sln.8.gz +%{_mandir}/man8/sm-notify.8.gz %{_mandir}/man8/swapoff.8.gz %{_mandir}/man8/swapon.8.gz %{_mandir}/man8/umount.8.gz -%{_mandir}/man8/uname26.8.gz +%{_mandir}/man8/guessfstype.8.gz %{_mandir}/man8/setctsid.8.gz -%{_mandir}/man8/wipefs.8.gz -%{_mandir}/man8/zramctl.8.gz -%{_mandir}/man8/fstrim.8.gz -%{_mandir}/man8/lsblk.8.gz -%{_mandir}/man8/resizepart.8.gz -%{_mandir}/man8/sulogin.8.gz -%{_mandir}/man8/wdctl.8.gz -%{_sbindir}/flushb -%{_sbindir}/readprofile -%dir %{_datadir}/getopt -%attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash -%attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh -# These directories should be owned by bash-completion. But we don't want to -# install them on build, so own these two directories: -%dir %{_datadir}/bash-completion -%dir %{_datadir}/bash-completion/completions -%{_datadir}/bash-completion/completions/* -%if %build_util_linux_systemd -%exclude %{_datadir}/bash-completion/completions/logger -%exclude %{_datadir}/bash-completion/completions/lslogins -%exclude %{_datadir}/bash-completion/completions/uuidd -%endif -%ifnarch ia64 m68k -#XXX: post our patches upstream -#XXX: call fdupes on /usr/share/man -#UsrMerge +/usr/sbin/raw +/usr/sbin/flushb +/usr/sbin/readprofile +%dir /usr/share/misc/getopt +%attr (755,root,root) /usr/share/misc/getopt/getopt-parse.bash +%attr (755,root,root) /usr/share/misc/getopt/getopt-parse.tcsh +%attr (755,root,root) /usr/share/misc/getopt/getopt-test.bash +%attr (755,root,root) /usr/share/misc/getopt/getopt-test.tcsh +/usr/share/locale/*/LC_MESSAGES/util-linux.mo +%ifnarch ia64 +%doc fdisk/README.fdisk /sbin/fdisk -#EndUsrMerge -%{_sbindir}/fdisk %{_mandir}/man8/fdisk.8.gz %endif -%ifnarch %sparc ia64 m68k +%ifnarch sparc ia64 +%doc fdisk/README.cfdisk %{_mandir}/man8/cfdisk.8.gz %{_mandir}/man8/sfdisk.8.gz -#UsrMerge /sbin/cfdisk /sbin/sfdisk -#EndUsrMerge -%{_sbindir}/cfdisk -%{_sbindir}/sfdisk +%endif +%ifarch %ix86 x86_64 +/usr/sbin/ramsize +/usr/sbin/rdev +/usr/sbin/rootflags +/usr/sbin/vidmode +%{_mandir}/man8/ramsize.8.gz +%{_mandir}/man8/rdev.8.gz +%{_mandir}/man8/rootflags.8.gz +%{_mandir}/man8/vidmode.8.gz %endif %ifnarch s390 s390x -%{_sbindir}/fdformat -#UsrMerge +%config(noreplace) /etc/fdprm +/usr/bin/cytune +/usr/bin/fdformat /sbin/hwclock -#EndUsrMerge -%{_sbindir}/hwclock -%attr(744,root,root) %{_sbindir}/klogconsole -%{_bindir}/setterm -%{_sbindir}/tunelp +/usr/sbin/klogconsole +/usr/bin/setfdprm +/usr/bin/setterm +/usr/sbin/tunelp +%{_mandir}/man8/cytune.8.gz %{_mandir}/man8/fdformat.8.gz %{_mandir}/man8/hwclock.8.gz %{_mandir}/man8/klogconsole.8.gz +%{_mandir}/man8/setfdprm.8.gz %{_mandir}/man8/tunelp.8.gz %endif -%files -n libblkid1 -%defattr(-, root, root) -%{_libdir}/libblkid.so.1 -%{_libdir}/libblkid.so.1.* - -%files -n libblkid-devel -%defattr(-, root, root) -%{_libdir}/libblkid.so -%dir %{_includedir}/blkid -%{_includedir}/blkid/blkid.h -%{_libdir}/pkgconfig/blkid.pc -%{_mandir}/man3/libblkid.3.gz - -%files -n libblkid-devel-static -%defattr(-, root, root) -%{_libdir}/libblkid.*a - -%files -n libmount1 -%defattr(-, root, root) -%{_libdir}/libmount.so.1 -%{_libdir}/libmount.so.1.* - -%files -n libmount-devel -%defattr(-, root, root) -%{_libdir}/libmount.so -%dir %{_includedir}/libmount -%{_includedir}/libmount/libmount.h -%{_libdir}/pkgconfig/mount.pc - -%files -n libmount-devel-static -%defattr(-, root, root) -%{_libdir}/libmount.*a - -%files -n libsmartcols1 -%defattr(-, root, root) -%{_libdir}/libsmartcols.so.1 -%{_libdir}/libsmartcols.so.1.* - -%files -n libsmartcols-devel -%defattr(-, root, root) -%{_libdir}/libsmartcols.so -%dir %{_includedir}/libsmartcols -%{_includedir}/libsmartcols/libsmartcols.h -%{_libdir}/pkgconfig/smartcols.pc - -%files -n libsmartcols-devel-static -%defattr(-, root, root) -%{_libdir}/libsmartcols.*a - -%files -n libuuid1 -%defattr(-, root, root) -%{_libdir}/libuuid.so.1 -%{_libdir}/libuuid.so.1.* - -%files -n libuuid-devel -%defattr(-, root, root) -%{_libdir}/libuuid.so -%dir %{_includedir}/uuid -%{_includedir}/uuid/uuid.h -%{_libdir}/pkgconfig/uuid.pc -%{_mandir}/man3/uuid* - -%files -n libuuid-devel-static -%defattr(-, root, root) -%{_libdir}/libuuid.*a - -%files -n libfdisk1 -%defattr(-, root, root) -%{_libdir}/libfdisk.so.1 -%{_libdir}/libfdisk.so.1.* - -%files -n libfdisk-devel -%defattr(-, root, root) -%{_libdir}/libfdisk.so -%dir %{_includedir}/libfdisk -%{_includedir}/libfdisk/libfdisk.h -%{_libdir}/pkgconfig/fdisk.pc - -%files -n libfdisk-devel-static -%defattr(-, root, root) -%{_libdir}/libfdisk.*a -%endif - -%if %build_util_linux_systemd -%if %build_util_linux -%files systemd -%else -%files -%endif -%defattr(-, root, root) -/bin/logger -%{_bindir}/logger -%{_bindir}/lslogins -#BEGIN bootstrap_hack -%if 0%{?suse_version} < 1330 -# Build images of some products use util-linux that does not come from this -# spec and does not own bash-completion dir. So we have to own own these two -# directories in util-linux-systemd as well: -%dir %{_datadir}/bash-completion -%dir %{_datadir}/bash-completion/completions -%endif -#END bootstrap_hack -%{_datadir}/bash-completion/completions/logger -%{_datadir}/bash-completion/completions/lslogins -%{_mandir}/man1/logger.1.gz -%{_mandir}/man1/lslogins.1.gz -%{_sbindir}/rcfstrim -%{_unitdir}/fstrim.service -%{_unitdir}/fstrim.timer - -%files -n uuidd -%defattr(-, root, root) -%{_sbindir}/uuidd -%attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid -%ghost %{_localstatedir}/lib/libuuid/clock.txt -%attr(-,uuidd,uuidd) %ghost %dir /run/uuidd -%{_datadir}/bash-completion/completions/uuidd -%{_mandir}/man8/uuidd.8.gz -%{_sbindir}/rcuuidd -%{_unitdir}/uuidd.service -%{_unitdir}/uuidd.socket -%endif - -%if %build_python_libmount -%if %build_util_linux -%files -n python-libmount -%else -%files -%endif -%defattr(-, root, root) -%{python_sitearch}/libmount -%endif - -%changelog +%changelog -n util-linux +* Tue Dec 12 2006 - mkoenig@suse.de +- provide different return codes for losetup with encryption + for empty and too short passwords. [#197493] +* Tue Dec 05 2006 - mkoenig@suse.de +- default swap to V1 in any case [#205956] + patch: util-linux-2.12r-mkswap_fix.patch +- do not append addr option with each nfs remount [#130625] + patch: util-linux-2.12r-nfs_remount_options.patch +- add README.largedisk about fdisk partition size constraints + [#153657] +* Tue Nov 07 2006 - mkoenig@suse.de +- enable partx [#214992] +* Tue Oct 10 2006 - mkoenig@suse.de +- Round up partition end LBA to a cylinder boundary during + add_partition() [#174892] +- Fix readprofile on ppc64 [#179122] +- Fix cal formatting bug [#203469] +* Mon Oct 09 2006 - mkoenig@suse.de +- Fix llseek issues. +- swapon.c: Do not use PAGE_SIZE macro. +* Mon Aug 21 2006 - mkoenig@suse.de +- Added sysfs to list of filesystems not to unmount with + umount -a, resolves #190385 +* Mon Jun 12 2006 - kay.sievers@suse.de +- use libvolume_id from provided as a rpm by udev 094 +* Wed May 17 2006 - jeffm@suse.com +- Fixed support for calling external programs w/o -t , + it would add mtab twice [#176582] +* Mon Apr 24 2006 - hvogel@suse.de +- document xfs dmapi mount options better [#158955] +* Fri Apr 21 2006 - olh@suse.de +- add mkzimage_cmdline to edit CHRP zImage kernel cmdline (168313) +* Tue Apr 18 2006 - hvogel@suse.de +- fix number of supported raw devices [#165570] +* Wed Mar 29 2006 - olh@suse.de +- clearify comments about mac disk label handling in fdisk +* Tue Mar 28 2006 - hvogel@suse.de +- more fixes for the fdiskwrap patch [#160822] +* Tue Mar 21 2006 - okir@suse.de +- Update nfs(5) manpage to document security flavors [#159368] +* Mon Mar 20 2006 - hvogel@suse.de +- fix numbers of supported raw devices to match the kernel + [#158203] +- make NFSv3 client support RPCSEC_GSS [#158401] +- fix that if the user doesn't specify -t + mount.fstype will never be called. [#155147] +* Fri Mar 10 2006 - hvogel@suse.de +- Fix init.d/raw script to parse device names with , in them + correctly [#155653] +* Thu Mar 09 2006 - hare@suse.de +- Fix potential security hole in libvolume_id (#133256) +* Mon Mar 06 2006 - hvogel@suse.de +- patch fdiskmaclabel.h too +* Thu Mar 02 2006 - hvogel@suse.de +- axboe made fdisk not wrap at 2TB [#153657] +* Fri Feb 17 2006 - lmuelle@suse.de +- Use cifs instead of smbfs if the source starts with // and we do not set a + different fs type. +* Sun Feb 12 2006 - olh@suse.de +- cosmetic fix for option_hotplug declaration + fix unininitalized string for unknown filesystems (#148855) +* Fri Feb 10 2006 - hvogel@suse.de +- mount should not put / in the mtab twice if mount -f / is called + [#148409] +- fix hostid printf [#149163] +* Wed Feb 01 2006 - olh@suse.de +- dont invent our own MS_FLAGS (#147132) +* Wed Feb 01 2006 - ro@suse.de +- fix typo in previous change, binary negation is "~" +* Fri Jan 27 2006 - sscheler@suse.de +- fixed mount hotplug option (#143352). now we don't send the + MS_HOTPLUG flag to the kernel any longer, because the kernel + doesn't know this option (EINVAL) and actually doesn't need to + know about it. +* Fri Jan 27 2006 - olh@suse.de +- remove clock symlink, hwclock exists since 7 years +* Fri Jan 27 2006 - olh@suse.de +- lsprop and nvsetenv moved to powerpc-utils [#144758] +* Thu Jan 26 2006 - hvogel@suse.de +- Make nfsboot world readable [#145418] +* Wed Jan 25 2006 - mls@suse.de +- converted neededforbuild to BuildRequires +* Tue Jan 24 2006 - mmj@suse.de +- Remove faulty nfs fallback code [#139019] +* Mon Jan 16 2006 - mmj@suse.de +- Add patch for nsetenv to fix short reads/short writes [#142546] +* Wed Jan 11 2006 - mmj@suse.de +- Update sm-notify [#141542] +* Wed Jan 04 2006 - mmj@suse.de +- Update to 2.12r including since 2.12q: + o cfdisk: fix a segfault with ReiserFS partitions + o umount: disallow -r option for non-root users +* Tue Nov 22 2005 - mmj@suse.de +- install proper renice manpage [#132470] +* Tue Nov 15 2005 - uli@suse.de +- umount2 is not static (only fails on ARM, surprisingly) +- added ARM ionice syscalls +* Fri Nov 11 2005 - hare@suse.de +- Fix reverse-mapping of by-UUID and by-LABEL mounts. +* Thu Nov 10 2005 - hare@suse.de +- Fix a mishandling of by-UUID mounts. +- Use libvolume_id from udev. +* Sat Oct 22 2005 - mmj@suse.de +- Increase lsprop.c max property size to 4k [#128155] +* Mon Oct 10 2005 - mmj@suse.de +- Add -fno-strict-aliasing to nfsmount_xdr.c +* Mon Oct 03 2005 - mmj@suse.de +- Teach the mount manual page about nodiratime [#118987] +* Thu Sep 29 2005 - mmj@suse.de +- Patch from jakub007@go2.pl to make mount --move update + /etc/mtab correctly [#115129] +* Tue Sep 13 2005 - mmj@suse.de +- Only allow root to pass -r to umount [#116741] +* Mon Sep 05 2005 - mmj@suse.de +- MAC -> Mac [#104081] +* Fri Sep 02 2005 - mmj@suse.de +- Don't package manual executable [#114849] +* Thu Sep 01 2005 - mmj@suse.de +- Add patch for device-mapper mount by label support [#75966] +* Thu Sep 01 2005 - ro@suse.de +- provide and obsolete schedutils +* Tue Aug 23 2005 - hvogel@suse.de +- update ionice patch by axboe so that ionice will complain about + missing sys_ioprio_set support, but it will still + execute the process. +* Mon Aug 22 2005 - hvogel@suse.de +- Fix rpm verify output [#105807] + (ghost entry for /var/lib/nfs/state) +* Mon Aug 22 2005 - schwab@suse.de +- Fix stupid buffer overflow bug in cfdisk [#66020]. +* Wed Aug 17 2005 - hare@suse.de +- Add option 'hotplug' to mount (#104405) +* Mon Aug 15 2005 - schwab@suse.de +- Always build with RPM_OPT_FLAGS. +* Thu Aug 11 2005 - mmj@suse.de +- Patch from Patrick Kirsch to make fdisk detect MAC-fs [#104081] +* Wed Aug 03 2005 - mmj@suse.de +- Merge schedutils to here (it's happened upstream already) +* Tue Aug 02 2005 - mmj@suse.de +- Support for s390 and s390x +* Mon Aug 01 2005 - mmj@suse.de +- It's not __ppc_ and __ppc64__ but __powerpc__ and __powerpc64__ +* Mon Aug 01 2005 - mmj@suse.de +- Add ionice binary from Jens Axboe +* Wed Jun 29 2005 - mmj@suse.de +- Document load and clearly issues about NFS over UDP [#80263] +- Don't compile with -fsigned-char [#93886] +* Tue May 31 2005 - okir@suse.de +- Added NFSv4 support +* Mon May 09 2005 - hvogel@suse.de +- move hashalot and cryptsetup tools to util-linux-crypto +* Tue Apr 12 2005 - mmj@suse.de +- bump TCP timeo to 600 [#76198] +* Tue Mar 29 2005 - mmj@suse.de +- Add awareness of twofishSL92 [#74359] +- Update hashalot to version 0.3 +* Mon Mar 14 2005 - okir@suse.de +- Changed sm-notify to recognize host names as well as addresses. +* Thu Mar 10 2005 - mmj@suse.de +- Don't strip anything explicitly +- Don't compile with -fno-strict-aliasing [#66020] +* Fri Feb 04 2005 - schwab@suse.de +- Fix stupid programmer. +* Mon Jan 24 2005 - meissner@suse.de +- implicit strcmp / strerror in setctsid fixed. +- 0 -> NULL in an execl +* Fri Jan 21 2005 - mmj@suse.de +- Sleep after inserting the raw module to make sure it's ready [#49807] +- Update to 2.12q including since 2.12p: + o New upstream maintainer - Adrian Bunk + o sfdisk: add -G option + o Updated translations +* Tue Jan 18 2005 - okir@suse.de +- Updated sm-notify; try not to stall bootup my moving the NSM + state update after we've backgrounded (#49072). +* Mon Jan 10 2005 - mmj@suse.de +- Update adjtimex to 1.20 +- Update to util-linux-2.12p including since 2.12i: + o cfdisk: fix number of new partition when partitions not in disk order + o fdisk: fix Sun label handling in sector mode + o mkfs: never truncate filename (not that that ever happened) + o more: fix redraw flaw + o lomount: revert patch from 2.12j + o lptune.8: -T option is obsolete + o mkswap, mkswap.8, swapon: support labels + o umount: allow user unmounting repeatedly mounted nfs mounts + o cfdisk: recognize JFS, support reiserfs labels + o mount: fix option parsing bug + o mount.8: several updates + o swapon.8: document -v option + o Makefile: remove cat-id-tbl.c upon make clean + o fdisk: fixed a bug that would cause a non-update of a sun disklabel + o fdisk: use sectorsize instead of 512 for SGI + o hwclock: actually use HAVE_tm_gmtoff + o swapon: fix priority handling + o umount: refuse to unmount an empty string + o configure, MCONFIG: detect gcc 3.4.0 and use -mtune option + o configure: do not run ./conftest (for cross compilation) + o fsck.cramfs: try to get correct PAGE_CACHE_SIZE + o losetup: try to give better error messages + o readprofile: default map file is /boot/System.map + o rdev.8: added historical info on ramdisk + o cal: highlight today + o lomount: stop reading passwd at NUL, fix lo_encrypt key_size + o losetup: add -f option to find an unused loop device + o more: code cleanup + o mount: add "group" mount option + o sfdisk: fix 2.6.8 BLKRRPART ioctl damage + o swapon: let swapon -a skip the swapfiles marked "noauto" + o umount: fix problem with empty mtab + o umount: use special umount program if it exists + o new flock binary + o New messages +* Tue Nov 30 2004 - mmj@suse.de +- Install ramsize, rdev, rootflags and vidmode on x86-64 [#48633] +* Fri Nov 12 2004 - schwab@suse.de +- Don't install *fdisk on ia64. +* Fri Nov 12 2004 - ro@suse.de +- correct permissions handling for wall and write +* Tue Nov 09 2004 - mmj@suse.de +- Fix segfault with mount -l [#48029] +* Fri Nov 05 2004 - mmj@suse.de +- Update to util-linux-2.12i including: + o MCONFIG: fix build conditions + o chfn, chsh: add error checking + o cytune: use local header cyclades.h + o fdisk: fix default SGI volume header size + o fstab.c: use strsignal() instead of sys_siglist[] + o hwclock: use when available on i386 + o hwclock: dont try KDGHWCLK on archs other than __m68k__ + o sfdisk: correct typo in __attribute__used nonsense + o sfdisk: use PACKED on __arm__ + o sfdisk: fix warning printout +* Thu Nov 04 2004 - mmj@suse.de +- Update to util-linux-2.12h including: + o cfdisk: avoid crash if no partition table + o elvtune: tell user that this only works on 2.4 kernels + o lomount: clear passwords after use + o mount: accept comments (specified by comment=) in fstab + o mount: support ocfs, ocfs2 + o [u]mount: be more careful with malloc, try to avoid OOM with + many mounts + o sfdisk: __attribute__used nonsense to support gcc 3.4 + o shutdown: do not unmount various virtual filesystems + o mount.8: added recent ext2 mount options + o mount: support jfs mount-by-label, improve reiserfs support + o sfdisk: remove strange "ends in a digit" heuristic + o *fdisk: use common disksize() routine +* Tue Oct 19 2004 - mmj@suse.de +- Add patch from SGI for fdisk label [#47368] +* Tue Sep 28 2004 - mmj@suse.de +- And another one [#46201] +* Wed Sep 15 2004 - mmj@suse.de +- Add patch from Andries to fix cfdisk [#44996] +* Tue Sep 07 2004 - mmj@suse.de +- Update to util-linux-2.12c including: + o mount.8: added recent ext2 mount options + o mount: support jfs mount-by-label, improve reiserfs support + o sfdisk: remove strange "ends in a digit" heuristic + o *fdisk: use common disksize() routine [#44678] +* Wed Aug 25 2004 - mmj@suse.de +- Update to util-linux-2.12b including: + o chsh: improved error message + o dmesg: ask kernel proper buffer size + o losetup: handle 64-bit offsets + o blockdev: also report BLKGETSIZE64 result [#43464] + o blockdev, elvtune, fdisk: handle new kernel _IOR,_IOW defines + o fdisk: remove strange "ends in a digit" heuristic + o fdisk: also list Solaris as possible type for 0x82 + o mount: added --rbind option + o mount: use blkid library + o mount: support reiserfs mount by label + o mount: attempt to use the right definition of dev_t in struct + loopinfo + o mount.8: jfs mount options added + o readprofile: new -s option + o rename.1: added ref to mmv.1 + o replay: renamed to scriptreplay; correct typos + o script: do not use locale for time delay floating point number + format + o sfdisk: error messages to stderr + o New Catalan, Dutch, Finnish, French, German, Spanish, Swedish, + Turkish, Ukrainian messages +- Update the loop-AES patch, thanks to Sumit Bose +- Change the minimum password length to 8 chars +* Tue Aug 24 2004 - mmj@suse.de +- Fix signed/unsigned bug in lsprop [#44048] +* Wed Aug 18 2004 - mmj@suse.de +- Readd patch that got lost to make fdisk -l work better with + RAID controllers [#43485] +* Mon Aug 09 2004 - mmj@suse.de +- Add an improved version of the dmesg bufsize patch. +* Tue Jun 22 2004 - mmj@suse.de +- Add patch to try and guess a filesystem type before blindly + assuming it's nfs because of the colon [#42097] +* Mon Jun 14 2004 - agruen@suse.de +- Formatting error in mount.8 manual page. +* Wed Jun 09 2004 - mmj@suse.de +- Add patch from Olaf Kirch to make protocol selection for mount + independent of protocol selection for NFS, and picks what is + available (preferring TCP over UDP) [#41735] +* Wed Jun 09 2004 - mls@suse.de +- add '-f' option to setctsid +* Thu May 27 2004 - okir@suse.de +- sm-notify now binds to a reserved port +* Sat May 15 2004 - mmj@suse.de +- Add documentation about raw device handling [#39037] +* Mon May 10 2004 - mmj@suse.de +- Make dmesg dump entire buffer. Patch from Andries/odabrunz [#39761] +* Thu May 06 2004 - mmj@suse.de +- Also check if the device is the same when doing swapon. Could be + the same block device with 2 different names [#39436] +* Wed May 05 2004 - mmj@suse.de +- Do a /sbin/modprobe raw when invoking raw devices [#39037] +* Tue Apr 20 2004 - mmj@suse.de +- Update to 2.12a including: + o fdisk: fix for kernels 2.4.15-2.4.17 + o fdisk: fix when all partitions are in use + o hwclock: add a timeout when waiting for a clock update + o ipcs: compilation fix + o ipcs: shminfo.shmall gives pages + o mount: efs support + o partx: bigendian fix + o readprofile: support for 64-bit addresses + o setterm: fix klogctl error message + o setterm.1: clarification + o sfdisk: fix check for is_ide_cdrom_or_tape + o umount: skip proc, devfs, devpts on umount -a +* Mon Apr 19 2004 - mmj@suse.de +- Add patch for unlimited raw devices [#39037] +* Thu Apr 15 2004 - mmj@suse.de +- Make sm-notify be more quiet when nothing wrong, and log to sys- + log when something is. +* Tue Apr 06 2004 - mmj@suse.de +- Don't use startproc for sm-notify [#38481] +* Mon Apr 05 2004 - mmj@suse.de +- Removing elvtune alltogether was a bit drastic, since it of + course works fine with 2.4 kernels. So print a warning in case + the BLKELVGET ioctl returns something indicating 2.6 kernels. +* Thu Apr 01 2004 - mmj@suse.de +- Don't package elvtune anymore since it's obsolete now that io + scheduler can be tuned in /sys/block/hdX/queue/iosched/* [#37869] +* Wed Mar 31 2004 - mmj@suse.de +- Apply util-linux-2.12a fixes for hwclock and readprofile. The + hwclock bit is a timout fix which hopefully fixes [#35877] +- Move sm-notify to here from nfs-utils [#36737] +* Mon Mar 29 2004 - mmj@suse.de +- Adjust warnings about Crypto-API +* Sun Mar 28 2004 - mmj@suse.de +- Add patch to make script allways use the same LC_NUMERIC [#35476] +* Fri Mar 26 2004 - od@suse.de +- Add setctsid by Werner Fink [#37177] +* Fri Mar 26 2004 - mmj@suse.de +- Mount option "code" is now "codepage" so update /etc/fstab in + postinstall [#36950] +* Fri Mar 26 2004 - mmj@suse.de +- Remove false statement in nfs.5 about the linux kernel not + supporting nfs over tcp [#37060] +* Wed Mar 17 2004 - mmj@suse.de +- Use correct permissions for README.hashalot [#36303] +* Mon Mar 08 2004 - mmj@suse.de +- Enable build of replay [#35434] +* Wed Feb 25 2004 - mmj@suse.de +- Use loop-AES-v2.0f-util-linux-2.12.diff instead of losetup patch + added earlier. Thanks Sumit Bose! +* Thu Feb 19 2004 - mmj@suse.de +- Add cryptsetup script from Christophe Saout, for usage with the + new dm-crypt. +* Mon Feb 16 2004 - mmj@suse.de +- Add losetup patch and hashalot program from Ben Slusky +* Sun Feb 01 2004 - kukuk@suse.de +- Remove newgrp again (will use POSIX conform version) +* Fri Jan 16 2004 - kukuk@suse.de +- Add pam-devel to neededforbuild +* Mon Jan 12 2004 - mmj@suse.de +- Adjust the nfs.5 manual page to reflect we're mounting nfs over + tcp pr. default. +- Collapse two similar patches 2 one. +* Fri Dec 19 2003 - garloff@suse.de +- Fix by okir for previous patch. +* Fri Dec 19 2003 - garloff@suse.de +- Add patch to fallback to UDP if TCP NFS mount fails. +* Tue Dec 02 2003 - mmj@suse.de +- Make patch to guess if a CD is a CD-Extra [#30316] +- Adjust patch that moves ext2/3 in front of vfat +- Regenerate patches (filename still tells when they were added) +* Tue Nov 18 2003 - mmj@suse.de +- Mount NFS over TCP pr. default [#33018] +* Thu Nov 13 2003 - mmj@suse.de +- Update to util-linux-2.12 including: + o losetup: -p option specifies fd for passphrase + o fdisk: sgi layout fix + o mount: -p option specifies fd for passphrase + o mount: recognize some PCDOS floppies + o umount: in "umount name", first try to interpret "name" as a mount point + o translations updates for several languages + o cfdisk: localize the Y/N answer, improve printing localized messages + o cfdisk: make various variables long long - some disks are close to 2 TB + o cfdisk: use BLKGETSIZE64 + o fdisk: make various variables unsigned to lengthen the life of 32-bit vars + o fdisk: some sgi fixes + o fdisk: k=1000, K=1024 + o fdisk: removed last occurrences of HDIO_REQ + o fdisk: use BLKGETSIZE64 + o hwclock: fix rtc test + o login: set a timeout on printing the timeout message + o md5: x86_64 fix + o more: POSIX fixes + o mount: do not supply MS_MGC_VAL when there are conflicting flags + o mount: ncp and smb are called smbfs and ncpfs - global change + o mount: add support for xvm mount by label + o mount: correct hfs magic recognition + o mount: keep original umask - it influences the mount call + o raw.8: documented unbinding of raw devices + o readprofile: fixed off-by eight error + o script: add -c option + o sfdisk.8: added an example of partitioning with logical partitions + o sfdisk: only add a AA55 signature for DOS-type partition tables + o tailf: new +* Tue Oct 21 2003 - mmj@suse.de +- Correct permissions +* Tue Oct 21 2003 - ja@suse.cz +- added support for cryptoloop in 2.6.x kernels. +* Wed Oct 15 2003 - mmj@suse.de +- Don't build as root +* Mon Oct 13 2003 - kukuk@suse.de +- Enable newgrp +* Thu Oct 02 2003 - kukuk@suse.de +- Fix compiling with kernel 2.6.0-test6 header files +* Tue Aug 12 2003 - mmj@suse.de +- Update to pmac-utils-2.1 sources and only include nvsetenv +* Tue Aug 12 2003 - mmj@suse.de +- Add mount_guessfstype support for PCDOS [#27814] +* Wed Jun 18 2003 - ak@suse.de +- support noreserved option for NFS (#27428) +* Thu Jun 05 2003 - mmj@suse.de +- Rearrange the specfile wrt. archs +* Tue May 13 2003 - mmj@suse.de +- Use %%defattr +- Remove files we don't package +* Wed May 07 2003 - mmj@suse.de +- Rearrange the do_guess_fstype() code to look for ext2/3 before + vfat [#26581] +* Thu Apr 24 2003 - ro@suse.de +- fix install_info --delete call and move from preun to postun +* Mon Apr 14 2003 - pthomas@suse.de +- Get rid of the syscall for adjtimex in selective cases and + just call the glibc wrapper. Fixes build on s390. +* Mon Apr 14 2003 - pthomas@suse.de +- Use geteuid instead of getuid in hwclock to enable making + hwclock suid root. +* Mon Apr 07 2003 - mmj@suse.de +- Only delete info entries when removing last version. +* Thu Mar 13 2003 - mmj@suse.de +- Apply patch to make sfdisk not destroy BSD slices [#25093] +* Mon Mar 03 2003 - mmj@suse.de +- Remove superflous umask(033); calls [#23292] +* Mon Mar 03 2003 - ro@suse.de +- add missing info dir entries +* Tue Feb 18 2003 - agruen@suse.de +- Add description of the effect of `mount -t nfs -o noacl' on + the use of the GETACL and SETACL remote procedure calls to + the nfs(5) manual page. +* Mon Feb 17 2003 - mmj@suse.de +- It's called smbfs not smb [#23697] +* Thu Feb 13 2003 - mmj@suse.de +- Readd patch for passphrase timeout that got lost [#23527] +* Fri Feb 07 2003 - mmj@suse.de +- The install_info macros need PreReq: %%install_info_prereq +* Fri Feb 07 2003 - ro@suse.de +- added install_info macros +* Tue Feb 04 2003 - ro@suse.de +- don't package /bin/kill (part of coreutils now) +* Tue Feb 04 2003 - meissner@suse.de +- Include tarball with pmac-utils manpages, so we do not need + sgmltool and all its dependents. +* Wed Jan 29 2003 - mmj@suse.de +- Update to util-linux-2.11z including: + · Translation updates + · mount: fix LABEL= handling for user umount, don't abort on read + error with photocds and add dmask and fmask vfat mount options + · setterm: accept devfs name + · simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails + · umount: allow user umount after mount by label or uuid +* Wed Jan 22 2003 - sf@suse.de +- removed last patch, added new (correct) patch +* Wed Jan 22 2003 - sf@suse.de +- removed eliminate_doubles() from mkfs.cramfs.c + for x86_64, as it segfaults. + (makes the images slightly larger, about 10%%) +* Tue Jan 21 2003 - mmj@suse.de +- Added description of ISO mount options to mount.8 [#22915] +* Mon Dec 02 2002 - mmj@suse.de +- Update the ReiserFS patch from Chris Mason +* Fri Nov 29 2002 - mmj@suse.de +- Fix missing #include +* Thu Nov 28 2002 - mmj@suse.de +- Make readprofile also try to locate the System.map in + /boot/System.map-`uname -r` [#22168] +* Wed Nov 27 2002 - mmj@suse.de +- Update to util-linux-2.11y including: + o Translation updates + o fdisk,cfdisk: cosmetic fixes + o mount,umount: fix LABEL= handling for non-root [#17322] + o more: kill external help file + o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC + fails (patch we had, now folded upstream) +* Wed Nov 20 2002 - mmj@suse.de +- Update to util-linux-2.11x including: + o Translation updates for several languages + o cfdisk: correct error printout + o fdisk: allow addition of a new partition when logicals all used + but primary free + o hwclock: detect systime jumps backward during setting hwclock + o Merge of the cramfs bloksize patch + o mount: new --rbind flag, for recursive loopback mounts + o mount, umount: new -O option + o setpwnam.c: open temp pw file with O_EXCL + o simpleinit: fix for "spawn too fast" + o swapon: new -e option +* Tue Nov 19 2002 - mmj@suse.de +- Fix multistring assignment in adjtimex +* Mon Nov 11 2002 - ro@suse.de +- changed neededforbuild to +- changed neededforbuild to <> +* Thu Oct 31 2002 - mmj@suse.de +- Add -b option to mkfs.cramfs (needed for biarch architectures) +* Thu Oct 31 2002 - ro@suse.de +- hack time to build on alpha +* Tue Oct 22 2002 - mmj@suse.de +- Add correction to the ReiserFS patch that fixes the case where it + was possible but unlikely to detect a logged copy of a super on a + dedicated logging device as the real thing. From Chris Mason. +* Tue Oct 22 2002 - mmj@suse.de +- Update to util-linux-2.11w including: + o fdisk and cfdisk fixes + o more bigendian fix + o translation updates + o > 2GB swapspace + o mount umask, cramfs and ocfs stuff +* Tue Oct 08 2002 - mmj@suse.de +- Only enable below patch on ix86 and x86_64 +* Mon Oct 07 2002 - mmj@suse.de +- Make small bugfix to below patch +* Sat Oct 05 2002 - mmj@suse.de +- Apply patch to enable > 2GB swap (redhat) [#20533] +* Wed Oct 02 2002 - mmj@suse.de +- Add one-liner security fix to mount and umount. +* Mon Sep 23 2002 - mmj@suse.de +- Readd fix for klogconsole that got lost [#19834] +* Fri Sep 13 2002 - mmj@suse.de +- Added patch from Oracle to mount ocfs by label [#19262] +* Thu Sep 12 2002 - mmj@suse.de +- more: Do not cast char * to int and back [#18896] +* Sat Aug 31 2002 - olh@suse.de +- add mount_cramfs_be.diff to allow mount -oloop cramfsfile loopdir +* Mon Aug 26 2002 - mmj@suse.de +- Make mode not 666 when writing /etc/mtab [#18342] +* Mon Aug 26 2002 - meissner@suse.de +- quieten klogconsole if the console does not support TIOCLINUX [#12516] +* Thu Aug 22 2002 - mmj@suse.de +- Added patch from Andreas Gruenbacher for nfs-access-acl [#18183] +* Wed Aug 21 2002 - mmj@suse.de +- Fixed an mtab locking bug with patch from Olaf Kirch [#17637] +* Mon Aug 19 2002 - mmj@suse.de +- Updated reiserfs patch from Chris Mason +- Added patch for mount.8, thanks Andreas Gruenbacher +* Thu Aug 15 2002 - mmj@suse.de +- Correct PreReq: +* Mon Aug 05 2002 - mmj@suse.de +- Update to 2.11u which includes: + o Danish, German, Spanish, Swedish and Turkish updates. + o configure: for fsck.cramfs, mkfs.cramfs: add test for libz + o text-utils/Makefile: pg fix + o agetty: use same test as login does to find utmp entry + o fdisk: fix for fdisk on empty disk + o mount updates +* Tue Jul 23 2002 - schwab@suse.de +- Fix mkfs.cramfs for architectures with non-4k pages. +* Wed Jul 17 2002 - mmj@suse.de +- Merged base into util-linux +* Mon Jul 15 2002 - mmj@suse.de +- Added JFSv2 patch from Christoph Hellwig for volume label. Does + for JFS, what below patch does for ReiserFS. +* Sun Jul 14 2002 - adrian@suse.de +- fix ul-2.10m-sgi-fdisk.diff patch to apply again +* Thu Jul 11 2002 - mmj@suse.de +- Added patch from Chris Mason for volume label on reiserfs +* Wed Jul 10 2002 - olh@suse.de +- add mkfs.cramfs and fsck.cramfs to file list +* Wed Jul 10 2002 - mmj@suse.de +- Fixed nfs.5 to tell nfsver defaults to 3 [#16815] +* Mon Jul 08 2002 - mmj@suse.de +- Update to 2.11t which includes + * fdformat: remove test on major + * fdisk, hwclock and swap polishing + * Lots of translations + * cramfs tools includes from the kernel + * swap{on,off} honours /proc/swaps + * mount small fixups +* Fri Jul 05 2002 - kukuk@suse.de +- Use %%ix86 macro +* Mon Jul 01 2002 - bk@suse.de +- get raw built on s390 and s390x +- remove %%ifarchs s390 s390x for fdisk(needed for SCSI disks) +* Mon Jun 17 2002 - mmj@suse.de +- Added a fix for simpleinit exploit. +* Thu Jun 13 2002 - olh@suse.de +- disable hwclock ppc patch, maybe obsolete with recent kernels +* Thu May 16 2002 - mmj@suse.de +- Added manpage guessfstype(8) +* Thu May 09 2002 - mmj@suse.de +- Updated to util-linux-2.11r, including translations, x86-64 sup- + port and small bugfixes. +* Sat Apr 13 2002 - mmj@suse.de +- Updated to util-linux-2.11q, includes bugfixes. +- util-linux-mkswap.patch for ia64 was folded into mainline +* Fri Apr 12 2002 - stepan@suse.de +- added x86-64 support. +* Thu Apr 04 2002 - ihno@suse.de +- corrected printf to report shared memories sizes bigger than + 2 GByte correct (Bug #15585). It was reportet on s390x, but + should effect other 64-Bit systems as well. +* Tue Mar 19 2002 - mmj@suse.de +- Updated to 2.11o. The hexdump patch have been dropped since it + was folded to mainline util-linux. +* Fri Mar 15 2002 - schwab@suse.de +- Fix mkswap for ia64. +* Mon Mar 04 2002 - draht@suse.de +- permissions fixes for write(1) and wall(1) +* Fri Feb 01 2002 - mmj@suse.de +- Moved /usr/bin/logger to /bin/logger (needed by sysconfig) +* Mon Jan 28 2002 - mmj@suse.de +- Added the guessfstype binary from msvec/fehr +* Thu Jan 24 2002 - ro@suse.de +- modified fillup_and_insserv call (perl-hack not needed here) +* Mon Jan 21 2002 - mmj@suse.de +- Merge NetBSD hexdump changes, fixes bugzilla #12801 +* Thu Jan 10 2002 - ro@suse.de +- removed ACTIVATE_RAW_DEV +* Mon Dec 31 2001 - adrian@suse.de +- add patch for mips to create SGI partition tables with fdisk +* Tue Dec 18 2001 - bjacke@suse.de +- add adjtimex +* Mon Dec 10 2001 - mmj@suse.de +- Update to util-linux-2.11n +* Tue Nov 20 2001 - mmj@suse.de +- Added a patch to 'wall' to remove unwanted newline (#12181) +* Wed Nov 07 2001 - kukuk@suse.de +- Remove unneeded SPARC patch for hwclock +* Sat Oct 13 2001 - kukuk@suse.de +- Update to util-linux 2.11l +* Wed Sep 12 2001 - garloff@suse.de +- Fixed some dutch translations. (bug #10276) +* Mon Sep 10 2001 - olh@suse.de +- marry fdisk and AIX label again... + add lsprop for ppc + dumps the device tree in a human readable format +* Mon Sep 03 2001 - kukuk@suse.de +- Update to version 2.11i: + - blockdev: corrected ioctl numbers + - cal: fixed for multibyte locales + - line: new + - mount: added vxfs magic +* Sat Sep 01 2001 - kukuk@suse.de +- Let mount follow symlinks again +* Wed Aug 29 2001 - kukuk@suse.de +- Add new option to losetup manual page +* Tue Aug 28 2001 - draht@suse.de +- added timeout support for losetup (-t ) +* Mon Aug 27 2001 - kukuk@suse.de +- Add raw rc scripts, too +* Sun Aug 26 2001 - bjacke@suse.de +- added raw binary and put rawio into obsoletes and provides +* Sat Aug 25 2001 - kukuk@suse.de +- Fix path in getopt.1 manual page to example directory [Bug #9831] +* Fri Aug 24 2001 - kukuk@suse.de +- Small fix for hwclock on newer SPARCs +* Mon Aug 13 2001 - ro@suse.de +- changed neededforbuild to +* Mon Jul 30 2001 - kukuk@suse.de +- Update to util-linux-2.11h +- Add nologin program +* Tue Jul 10 2001 - kukuk@suse.de +- Remove swapdev from filelist +* Tue Jul 10 2001 - kukuk@suse.de +- Update to util-linux-2.11g +* Wed Jun 06 2001 - bk@suse.de +- added s390x to all ifnarch s390 +* Fri Apr 20 2001 - kukuk@suse.de +- Fix wall bug (character 80, 160, 240, are missing) [Bug #6962] +* Mon Mar 26 2001 - kukuk@suse.de +- Add exception for broken i2o disk device numbering scheme, kernel + hacker are not able to fix this and make it right [Bug #5881]. +* Sat Mar 24 2001 - kukuk@suse.de +- Update to util-linux 2.11b +* Thu Mar 15 2001 - kukuk@suse.de +- Fix changing of partitions with ID 0 on SPARC +- Remove duplicate mount patch +* Wed Mar 14 2001 - schwab@suse.de +- Don't use _syscallX on ia64. +- Fix missing includes. +* Wed Mar 14 2001 - kukuk@suse.de +- Update to version 2.11a +* Fri Mar 02 2001 - kukuk@suse.de +- enable write again +* Mon Feb 12 2001 - kukuk@suse.de +- cmos.c: Use sys/io.h, fix PowerPC hack +* Tue Feb 06 2001 - ro@suse.de +- wall.c: include time.h +* Mon Feb 05 2001 - kukuk@suse.de +- Split hex to extra package +- Update to util-linux-2.10s +* Fri Feb 02 2001 - werner@suse.de +- Make swapon/swapoff more handy: + * Ignore swap files on ro mounted file systems + * If -a is given ignore already active devices at swapon + * If -a is given ignore not active devices at swapoff +* Thu Jan 25 2001 - ro@suse.de +- added Provides: util +* Fri Jan 12 2001 - garloff@suse.de +- Apply patch to lomount to allow all kerneli crypt algos to be + passed and allow to pass passwd with -k. +- losetup seems to support >2GB files just fine (#5433) +* Tue Jan 02 2001 - kukuk@suse.de +- Save permissions of /etc/mtab [Bug #5027] +* Tue Dec 05 2000 - kukuk@suse.de +- Search first in /etc/filesystems, then in /proc/filesystems +* Tue Dec 05 2000 - kukuk@suse.de +- Use AIX/fdisk patch from util-linux-2.10r +- Backport "guess filesystems" from util-linux-2.10r +* Tue Dec 05 2000 - schwab@suse.de +- Don't use _syscallX on ia64. +* Mon Dec 04 2000 - olh@suse.de +- fix diff again +* Sun Dec 03 2000 - olh@suse.de +- no segfaults with AIX disklabels +* Wed Nov 29 2000 - uli@suse.de +- fixed to build on PPC +* Mon Nov 27 2000 - schwab@suse.de +- Fix broken casts in hwclock. +* Thu Nov 23 2000 - bk@suse.de +- temporary disable pivot_root on s390(2.4 kernel is not yet built) +* Wed Nov 22 2000 - schwab@suse.de +- Add pivot_root to file list. +* Mon Nov 20 2000 - kukuk@suse.de +- Fix pmac-utils to compile with new kernel +* Fri Nov 17 2000 - kukuk@suse.de +- Fix hwclock to compile on PPC +* Wed Nov 15 2000 - kukuk@suse.de +- Update util-linux to 2.10q, merge flushb.diff +* Thu Nov 02 2000 - kukuk@suse.de +- Remove some of the last specfile changes +* Wed Nov 01 2000 - olh@suse.de +- update pmac-utils for new powermacs, cleanup specfile +* Fri Oct 20 2000 - kukuk@suse.de +- Update util-linux to 2.10p +- Rename package from util to util-linux +* Wed Sep 27 2000 - kukuk@suse.de +- Allow NFS v3 with 2.2.17.SuSE +* Tue Sep 26 2000 - kukuk@suse.de +- Fix mount for new NFS kernel patch +* Sat Sep 09 2000 - kukuk@suse.de +- Remove tcsh dependency +- Update to util-linux 2.10o, use of /etc/filesystems is still broken +* Fri Aug 25 2000 - pthomas@suse.de +- use %%{_mandir} and %%{_infodir} exclusively. This allows building + from source rpm on platforms other than 7.0. +* Wed Jul 19 2000 - bk@suse.de +- s390: removed dasdfmt and silo, %%ifnarch s390 for some non-s390 things. +* Tue May 30 2000 - bk@suse.de +- added dasdfmt and silo on s390 +* Mon May 15 2000 - kukuk@suse.de +- util-linux: Update to 2.10m +* Wed Apr 26 2000 - kukuk@suse.de +- flusb: Don't use kernel headers, even if we don't need them! +* Wed Apr 19 2000 - kukuk@suse.de +- util-linux: Update to 2.10l +* Mon Apr 17 2000 - kukuk@suse.de +- util-linux: Update to 2.10k +* Thu Apr 13 2000 - kukuk@suse.de +- Move /sbin/setserial to /bin/setserial, add compat link to + /sbin. This fixes [Bug 1084] and is necessary for FHS 2.1 +* Wed Apr 12 2000 - kukuk@suse.de +- Fix util-linux for Alpha +* Wed Apr 12 2000 - kukuk@suse.de +- util-linux: Update to 2.10j +* Sun Apr 02 2000 - bk@suse.de +- suse s390 team added support for s390 +* Thu Mar 30 2000 - uli@suse.de +- hwclock/PPC: added support for MK48T559 RTC chip used in MTX+ boards +* Fri Mar 24 2000 - kukuk@suse.de +- Add Linux LVM partition tag to fdisk +- Fix a lot of more possible buffer overruns +- Fix some fdisk sunlabel bugs +- added BuildRoot fixes from nadvorni@suse.cz +* Wed Mar 22 2000 - kukuk@suse.de +- Update util-linux to 2.10h +- Add clock again for non PPC platforms +* Fri Mar 17 2000 - uli@suse.de +- now contains both hwclock and clock on PPC (/sbin/init.d/boot + chooses what to run at runtime) +* Tue Mar 14 2000 - schwab@suse.de +- Add support for ia64. +* Thu Mar 09 2000 - kukuk@suse.de +- fdisk: Fix -l for Mylex RAID controller +* Tue Mar 07 2000 - kukuk@suse.de +- etc/filesystems: Add minix and reiserfs +* Tue Mar 07 2000 - kukuk@suse.de +- mount: fix endian problem with minix fs +* Tue Feb 15 2000 - kukuk@suse.de +- mount: Add hack for PPC/syscall mount problem +* Sun Feb 13 2000 - bk@suse.de +- let rdev continue in case it stubles over a bad file in /dev (/dev/snd fix) +* Fri Feb 04 2000 - kukuk@suse.de +- Make PPC clock parameter compatible to hwclock +* Thu Feb 03 2000 - kukuk@suse.de +- Fix filelist for SPARC +* Thu Feb 03 2000 - kukuk@suse.de +- util-linux: Update to 2.10f (mount security fix) +* Sun Jan 23 2000 - kukuk@suse.de +- util-linux: Update to 2.10e +* Tue Jan 18 2000 - kukuk@suse.de +- mount now looks at first in /etc/filesystems and then in + /proc/filesystems +* Tue Jan 18 2000 - ro@suse.de +- fixed pmac-utils to build with 2.3 as well +* Tue Jan 18 2000 - kukuk@suse.de +- Fix a lot of fdisk buffer overruns [Bug 1642] +* Mon Jan 17 2000 - kukuk@suse.de +- Fix setserial for Linux 2.3.40 +- Remove write, is now in nkitb +- Build minix and bfs tools for SPARC +- Fix some buffer overflows in fdisk +* Fri Dec 17 1999 - kukuk@suse.de +- util-linux: Update to 2.10d +- hex: Update to 1.2 +- Move manual pages to /usr/share/man +* Tue Nov 30 1999 - uli@suse.de +- re-added hwclock link for PPC (2nd try) +* Tue Nov 30 1999 - uli@suse.de +- re-added hwclock link for PPC +* Mon Nov 15 1999 - kukuk@suse.de +- util-linux: Update to 2.10b +* Sat Nov 13 1999 - kukuk@suse.de +- setserial: Add Patch for Sparc +- Fix filelist for Sparc +* Wed Oct 27 1999 - garloff@suse.de +- added flushb (moved here from ddrescue). +- fix bug in logger (remove trailing newlines). +* Fri Oct 22 1999 - kukuk@suse.de +- util-linux: Remove old patches for mk_loop_h +* Sat Oct 16 1999 - kukuk@suse.de +- util-linux: Update to 2.9z +* Fri Oct 08 1999 - kukuk@suse.de +- Update to util-linux-2.9y (execpt fdisk) +* Tue Sep 14 1999 - uli@suse.de +- added PMac-specific utils for PPC +* Mon Sep 13 1999 - bs@suse.de +- ran old prepare_spec on spec file to switch to new prepare_spec. +* Thu Aug 26 1999 - uli@suse.de +- disabled hayesesp for PPC +* Wed Aug 25 1999 - kukuk@suse.de +- Don´t install tsort, its now in textutils 2.0 +* Tue Aug 24 1999 - kukuk@suse.de +- Update to util-linux-2.9w (execpt fdisk) +* Mon Aug 09 1999 - kukuk@suse.de +- Update to util-linux-2.9v (execpt fdisk) +* Tue Jul 20 1999 - garloff@suse.de +- Added hex from Erich S. Raymond +* Mon Jul 12 1999 - kukuk@suse.de +- Add fdisk patch from Klaus G. Wagner +- Add mount patch from util-linux 2.9u +* Tue Jul 06 1999 - kukuk@suse.de +- update to util-linux-2.9t +* Fri Jun 25 1999 - kukuk@suse.de +- update to util-linux-2.9s +* Wed Mar 03 1999 - ro@suse.de +- hwclock.c: always use busywait to get rtctime + (it's hard to find out at runtime if we will get an irq) +* Tue Mar 02 1999 - ro@suse.de +- update to util-linux-2.9i +- update to setserial-2.15 +- using diffs from jurix and add-ons from kgw for compaq smart raid +* Mon Feb 01 1999 - ro@suse.de +- rdev is not built on alpha +* Mon Jan 18 1999 - florian@suse.de +- fixed one broken case to delete a partition in fdisk +* Sun Dec 13 1998 - bs@suse.de +- fixed file list +* Thu Dec 10 1998 - fehr@suse.de +- fix bug in fdisk +* Tue Dec 08 1998 - ro@suse.de +- removed last from filelist +- added link /sbin/clock -> hwclock +* Wed Nov 04 1998 - ro@suse.de +- fdisksunlabel: don't include scsi/scsi.h for glibc-2.0 +* Fri Oct 30 1998 - ro@suse.de +- update to 2.9 / added hostid from previous diff +- copied some glibc changes from previous diff (strcpy..) +* Thu Sep 17 1998 - ro@suse.de +- define _GNU_SOURCE when using getopt +* Mon Aug 31 1998 - ro@suse.de +- full switch to util-linux 2.8 +-- sync has moved to pkg fileutils +-- chroot has moved to pkg sh_utils (has been there for a while) +-- adopted hostid from previous suse-pkg +* Mon Aug 24 1998 - ro@suse.de +- switched to use mount from util-linux-2.8 +* Tue Jun 23 1998 - ro@suse.de +- added fdisk, sfdisk, cfdisk from util-linux-2.8 + (including man-pages,readmes) +* Mon Nov 17 1997 - ro@suse.de +- changed /local/bin/perl5 in chkdupexe to /usr/bin/perl +* Fri Oct 31 1997 - ro@suse.de +- temporarily removed mount-hacker +* Wed Oct 29 1997 - florian@suse.de +- add changes from ms@suse.de for hostid.c +* Tue May 20 1997 - florian@suse.de +- only support kernel 2.0.x for nfs mounts, please use /bin/mount-hacker + for kernel 2.1.x +* Wed Apr 30 1997 - florian@suse.de +- update to mount 2.6g +* Sun Apr 13 1997 - florian@suse.de +- update to new version util-linux 2.6 +- update to new version mount 2.6e +* Thu Jan 02 1997 - florian@suse.de +- update to mount 2.5p +* Thu Jan 02 1997 - florian@suse.de +- Update auf neue Version von mount 2.5o. +* Thu Jan 02 1997 - florian@suse.de +- updated to new version mount 2.5m +- (u)mount now gives much better error messages +* Thu Jan 02 1997 - bs@suse.de + compile setterm with libtermcap and not libncurses + use newer mount instead of the old version in util-linux + (security fix) diff --git a/which-2.13.tar.gz b/which-2.13.tar.gz new file mode 100644 index 0000000..7d80d61 --- /dev/null +++ b/which-2.13.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6763cd994fcc825dbd420495af5b9e16f455a353ebbd15f502a49943c581045 +size 106270 From aa477c8c9fc2d7704430eb82625cf1d8b1a73bab5f1e337569a10c923f8330d4 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 2 Feb 2007 14:55:36 +0000 Subject: [PATCH 002/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=2 --- util-linux-2.12r-mkfs_open_exclusive.patch | 39 ++++++++++++++++++++++ util-linux.changes | 10 ++++++ util-linux.spec | 10 ++++-- 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 util-linux-2.12r-mkfs_open_exclusive.patch diff --git a/util-linux-2.12r-mkfs_open_exclusive.patch b/util-linux-2.12r-mkfs_open_exclusive.patch new file mode 100644 index 0000000..f94d3b2 --- /dev/null +++ b/util-linux-2.12r-mkfs_open_exclusive.patch @@ -0,0 +1,39 @@ +Index: util-linux-2.12r/disk-utils/mkswap.c +=================================================================== +--- util-linux-2.12r.orig/disk-utils/mkswap.c ++++ util-linux-2.12r/disk-utils/mkswap.c +@@ -645,7 +645,7 @@ main(int argc, char ** argv) { + usage(); + } + +- DEV = open(device_name,O_RDWR); ++ DEV = open(device_name, O_RDWR | O_EXCL); + if (DEV < 0 || fstat(DEV, &statbuf) < 0) { + perror(device_name); + exit(1); +Index: util-linux-2.12r/disk-utils/mkfs.minix.c +=================================================================== +--- util-linux-2.12r.orig/disk-utils/mkfs.minix.c ++++ util-linux-2.12r/disk-utils/mkfs.minix.c +@@ -699,7 +699,7 @@ main(int argc, char ** argv) { + tmp += dirsize; + *(short *)tmp = 2; + strcpy(tmp+2,".badblocks"); +- DEV = open(device_name,O_RDWR ); ++ DEV = open(device_name,O_RDWR | O_EXCL); + if (DEV<0) + die(_("unable to open %s")); + if (fstat(DEV,&statbuf)<0) +Index: util-linux-2.12r/disk-utils/mkfs.bfs.c +=================================================================== +--- util-linux-2.12r.orig/disk-utils/mkfs.bfs.c ++++ util-linux-2.12r/disk-utils/mkfs.bfs.c +@@ -170,7 +170,7 @@ main(int argc, char *argv[]) { + if (!S_ISBLK(statbuf.st_mode)) + fatal(_("%s is not a block special device"), device); + +- fd = open(device, O_RDWR); ++ fd = open(device, O_RDWR | O_EXCL); + if (fd == -1) { + perror(device); + fatal(_("cannot open %s"), device); diff --git a/util-linux.changes b/util-linux.changes index 274fc7b..ff33713 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Feb 2 13:27:31 CET 2007 - mkoenig@suse.de + +- do not use O_EXCL for mkfs.cramfs [#241466] + +------------------------------------------------------------------- +Wed Jan 31 12:06:55 CET 2007 - mkoenig@suse.de + +- let mkfs tools open with O_EXCL [#238687] + ------------------------------------------------------------------- Tue Dec 12 11:04:07 CET 2006 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 2fd8d73..ed1e651 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux (Version 2.12r) # -# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -20,7 +20,7 @@ License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on Version: 2.12r -Release: 64 +Release: 70 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-%version.tar.bz2 Source2: nologin.c @@ -108,6 +108,7 @@ Patch106: util-linux-2.12r-partx.patch Patch107: util-linux-2.12r-mkswap_fix.patch Patch108: util-linux-2.12r-nfs_remount_options.patch Patch109: util-linux-2.12r-losetup_password.patch +Patch110: util-linux-2.12r-mkfs_open_exclusive.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed @@ -181,6 +182,7 @@ cd - %patch107 -p1 %patch108 -p1 %patch109 -p1 +%patch110 -p1 # setctsid cp %{S:22} %{S:23} . # nologin and guessfstype @@ -614,6 +616,10 @@ fi %endif %changelog -n util-linux +* Fri Feb 02 2007 - mkoenig@suse.de +- do not use O_EXCL for mkfs.cramfs [#241466] +* Wed Jan 31 2007 - mkoenig@suse.de +- let mkfs tools open with O_EXCL [#238687] * Tue Dec 12 2006 - mkoenig@suse.de - provide different return codes for losetup with encryption for empty and too short passwords. [#197493] From d34689d58be6a8c2c922074cec5d609771df87a74c9c8df7ccce55f066988f5c Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 12 Feb 2007 17:38:45 +0000 Subject: [PATCH 003/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=3 --- ...ux-2.12r-fdisk_remove_bogus_warnings.patch | 20 +++++++++++++++++++ util-linux.changes | 5 +++++ util-linux.spec | 6 +++++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.12r-fdisk_remove_bogus_warnings.patch diff --git a/util-linux-2.12r-fdisk_remove_bogus_warnings.patch b/util-linux-2.12r-fdisk_remove_bogus_warnings.patch new file mode 100644 index 0000000..ed08fe1 --- /dev/null +++ b/util-linux-2.12r-fdisk_remove_bogus_warnings.patch @@ -0,0 +1,20 @@ +Index: util-linux-2.12r/fdisk/fdisk.c +=================================================================== +--- util-linux-2.12r.orig/fdisk/fdisk.c ++++ util-linux-2.12r/fdisk/fdisk.c +@@ -1496,6 +1496,7 @@ static void check_consistency(struct par + /* compute logical ending (c, h, s) */ + long2chs(get_start_sect(p) + get_nr_sects(p) - 1, &lec, &leh, &les); + ++#if 0 + /* Same physical / logical beginning? */ + if (cylinders <= 1024 && (pbc != lbc || pbh != lbh || pbs != lbs)) { + printf(_("Partition %d has different physical/logical " +@@ -1512,7 +1513,6 @@ static void check_consistency(struct par + printf(_("logical=(%d, %d, %d)\n"),lec, leh, les); + } + +-#if 0 + /* Beginning on cylinder boundary? */ + if (pbh != !pbc || pbs != 1) { + printf(_("Partition %i does not start on cylinder " diff --git a/util-linux.changes b/util-linux.changes index ff33713..a388eb5 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 12 17:22:45 CET 2007 - mkoenig@suse.de + +- remove legacy warnings from fdisk [#241372] + ------------------------------------------------------------------- Fri Feb 2 13:27:31 CET 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index ed1e651..88a8e90 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -20,7 +20,7 @@ License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on Version: 2.12r -Release: 70 +Release: 73 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-%version.tar.bz2 Source2: nologin.c @@ -109,6 +109,7 @@ Patch107: util-linux-2.12r-mkswap_fix.patch Patch108: util-linux-2.12r-nfs_remount_options.patch Patch109: util-linux-2.12r-losetup_password.patch Patch110: util-linux-2.12r-mkfs_open_exclusive.patch +Patch111: util-linux-2.12r-fdisk_remove_bogus_warnings.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed @@ -183,6 +184,7 @@ cd - %patch108 -p1 %patch109 -p1 %patch110 -p1 +%patch111 -p1 # setctsid cp %{S:22} %{S:23} . # nologin and guessfstype @@ -616,6 +618,8 @@ fi %endif %changelog -n util-linux +* Mon Feb 12 2007 - mkoenig@suse.de +- remove legacy warnings from fdisk [#241372] * Fri Feb 02 2007 - mkoenig@suse.de - do not use O_EXCL for mkfs.cramfs [#241466] * Wed Jan 31 2007 - mkoenig@suse.de From 8a9d3be9eac60f083c031d71cb6d72119c02545356ba4dc37bcc470f02589f1b Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 1 Mar 2007 20:08:53 +0000 Subject: [PATCH 004/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=4 --- util-linux-2.12r-losetup_password.patch | 28 +++++++--- util-linux-2.12r-mount_racy_loop.patch | 70 +++++++++++++++++++++++++ util-linux.changes | 7 +++ util-linux.spec | 10 +++- 4 files changed, 107 insertions(+), 8 deletions(-) create mode 100644 util-linux-2.12r-mount_racy_loop.patch diff --git a/util-linux-2.12r-losetup_password.patch b/util-linux-2.12r-losetup_password.patch index 8098f68..2eea2b4 100644 --- a/util-linux-2.12r-losetup_password.patch +++ b/util-linux-2.12r-losetup_password.patch @@ -159,7 +159,15 @@ Index: util-linux-2.12r/mount/lomount.c loopFileName = (char *)file; multiKeyMode = 0; -@@ -848,8 +872,8 @@ set_loop(const char *device, const char +@@ -802,6 +826,7 @@ set_loop(const char *device, const char + } + if ((fd = open(device, mode)) < 0) { + perror (device); ++ ret = 1; + goto close_ffd_return1; + } + *loopro = (mode == O_RDONLY); +@@ -848,8 +873,8 @@ set_loop(const char *device, const char loopinfo.lo_encrypt_key_size = 0; break; case LO_CRYPT_XOR: @@ -170,7 +178,7 @@ Index: util-linux-2.12r/mount/lomount.c xstrncpy (loopinfo.lo_encrypt_key, pass, LO_KEY_SIZE); loopinfo.lo_encrypt_key_size = strlen(loopinfo.lo_encrypt_key); break; -@@ -886,6 +910,7 @@ set_loop(const char *device, const char +@@ -886,6 +911,7 @@ set_loop(const char *device, const char /* This is not compatible with gpgkey= mount option */ if(rd_wr_retry(atoi(passFDnumber), (char *)&loopinfo.lo_encrypt_key[0], LO_KEY_SIZE, 0) < 1) { fprintf(stderr, _("Error: couldn't read binary key\n")); @@ -178,7 +186,7 @@ Index: util-linux-2.12r/mount/lomount.c goto close_fd_ffd_return1; } break; /* out of switch(loopinfo.lo_encrypt_type) */ -@@ -894,6 +919,7 @@ set_loop(const char *device, const char +@@ -894,6 +920,7 @@ set_loop(const char *device, const char /* WARNING! DO NOT USE RANDOM HASH TYPE ON PARTITION WITH EXISTING */ /* IMPORTANT DATA ON IT. RANDOM HASH TYPE WILL DESTROY YOUR DATA. */ if(loop_create_random_keys((char*)file, *loopro, &multiKeyBits[0][0])) { @@ -186,7 +194,7 @@ Index: util-linux-2.12r/mount/lomount.c goto close_fd_ffd_return1; } memcpy(&loopinfo.lo_encrypt_key[0], &multiKeyBits[0][0], sizeof(loopinfo.lo_encrypt_key)); -@@ -901,8 +927,8 @@ set_loop(const char *device, const char +@@ -901,8 +928,8 @@ set_loop(const char *device, const char break; /* out of switch(loopinfo.lo_encrypt_type) */ } } @@ -197,7 +205,7 @@ Index: util-linux-2.12r/mount/lomount.c i = strlen(pass); if(hashFunc == unhashed1_key_setup) { /* this is for compatibility with historic loop-AES version */ -@@ -966,6 +992,7 @@ set_loop(const char *device, const char +@@ -966,6 +993,7 @@ set_loop(const char *device, const char break; default: fprintf (stderr, _("Error: don't know how to get key for encryption system %d\n"), loopinfo.lo_encrypt_type); @@ -205,7 +213,7 @@ Index: util-linux-2.12r/mount/lomount.c goto close_fd_ffd_return1; } -@@ -985,7 +1012,7 @@ close_fd_ffd_return1: +@@ -985,7 +1013,7 @@ close_fd_ffd_return1: close (fd); close_ffd_return1: close (ffd); @@ -214,6 +222,14 @@ Index: util-linux-2.12r/mount/lomount.c } /* type 18 == LO_CRYPT_CRYPTOAPI */ +@@ -995,6 +1023,7 @@ close_ffd_return1: + fprintf(stderr, _("ioctl: LOOP_SET_STATUS: %s, requested cipher or key length (%d bits) not supported by kernel\n"), strerror(errno), loopinfo.lo_encrypt_key_size << 3); + loop_clr_fd_out: + (void) ioctl (fd, LOOP_CLR_FD, 0); ++ ret = 1; + goto keyclean_close_fd_ffd_return1; + } + } Index: util-linux-2.12r/mount/losetup.8 =================================================================== --- util-linux-2.12r.orig/mount/losetup.8 diff --git a/util-linux-2.12r-mount_racy_loop.patch b/util-linux-2.12r-mount_racy_loop.patch new file mode 100644 index 0000000..cba877a --- /dev/null +++ b/util-linux-2.12r-mount_racy_loop.patch @@ -0,0 +1,70 @@ +Index: util-linux-2.12r/mount/lomount.c +=================================================================== +--- util-linux-2.12r.orig/mount/lomount.c ++++ util-linux-2.12r/mount/lomount.c +@@ -1005,7 +1005,17 @@ set_loop(const char *device, const char + } + + if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { +- perror("ioctl: LOOP_SET_FD"); ++ switch (errno) { ++ case EBUSY: ++ ret = 2; ++ if (verbose) ++ perror("ioctl: LOOP_SET_FD"); ++ break; ++ default: ++ ret = 1; ++ perror("ioctl: LOOP_SET_FD"); ++ break; ++ } + keyclean_close_fd_ffd_return1: + memset(loopinfo.lo_encrypt_key, 0, sizeof(loopinfo.lo_encrypt_key)); + memset(&multiKeyBits[0][0], 0, sizeof(multiKeyBits)); +Index: util-linux-2.12r/mount/mount.c +=================================================================== +--- util-linux-2.12r.orig/mount/mount.c ++++ util-linux-2.12r/mount/mount.c +@@ -653,18 +653,32 @@ loop_check(const char **spec, const char + printf(_("mount: skipping the setup of a loop device\n")); + } else { + int loopro = (*flags & MS_RDONLY); ++ int res; + +- if (!*loopdev || !**loopdev) +- *loopdev = find_unused_loop_device(); +- if (!*loopdev) +- return EX_SYSERR; /* no more loop devices */ +- if (verbose) +- printf(_("mount: going to use the loop device %s\n"), *loopdev); +- if (set_loop (*loopdev, *loopfile, &loopro, type, AutoChmodPtr)) { ++ do { ++ if (!*loopdev || !**loopdev) ++ *loopdev = find_unused_loop_device(); ++ if (!*loopdev) ++ return EX_SYSERR; /* no more loop devices */ + if (verbose) +- printf(_("mount: failed setting up loop device\n")); +- return EX_FAIL; +- } ++ printf(_("mount: going to use the loop device %s\n"), *loopdev); ++ if (res = set_loop (*loopdev, *loopfile, &loopro, type, AutoChmodPtr)) { ++ switch(res) { ++ case 2: ++ /* loop dev has been grabbed by some other process, ++ try again */ ++ if (verbose) ++ printf("mount: stolen loop=%s ...trying again\n", *loopdev); ++ *loopdev = NULL; ++ continue; ++ default: ++ if (verbose) ++ printf(_("mount: failed setting up loop device\n")); ++ return EX_FAIL; ++ } ++ } ++ } while (!*loopdev); ++ + if (verbose > 1) + printf(_("mount: setup loop device successfully\n")); + *spec = *loopdev; diff --git a/util-linux.changes b/util-linux.changes index a388eb5..d778b78 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Feb 27 10:58:46 CET 2007 - mkoenig@suse.de + +- fix missing return code in + util-linux-2.12r-losetup_password.patch +- mount: fix race condition in mount -o loop [#242750] + ------------------------------------------------------------------- Mon Feb 12 17:22:45 CET 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 88a8e90..3e76241 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -20,7 +20,7 @@ License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on Version: 2.12r -Release: 73 +Release: 76 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-%version.tar.bz2 Source2: nologin.c @@ -110,6 +110,7 @@ Patch108: util-linux-2.12r-nfs_remount_options.patch Patch109: util-linux-2.12r-losetup_password.patch Patch110: util-linux-2.12r-mkfs_open_exclusive.patch Patch111: util-linux-2.12r-fdisk_remove_bogus_warnings.patch +Patch112: util-linux-2.12r-mount_racy_loop.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed @@ -185,6 +186,7 @@ cd - %patch109 -p1 %patch110 -p1 %patch111 -p1 +%patch112 -p1 # setctsid cp %{S:22} %{S:23} . # nologin and guessfstype @@ -617,7 +619,11 @@ fi %{_mandir}/man8/tunelp.8.gz %endif -%changelog -n util-linux +%changelog +* Tue Feb 27 2007 - mkoenig@suse.de +- fix missing return code in + util-linux-2.12r-losetup_password.patch +- mount: fix race condition in mount -o loop [#242750] * Mon Feb 12 2007 - mkoenig@suse.de - remove legacy warnings from fdisk [#241372] * Fri Feb 02 2007 - mkoenig@suse.de From 08d8e78157f9dc526c5cf654facc18729b8bde6f3851b2985b138726251e9a1a Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 7 Mar 2007 21:51:39 +0000 Subject: [PATCH 005/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=5 --- util-linux.changes | 33 +++++++++++++++++++-------------- util-linux.spec | 4 +++- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index d778b78..4c2e5e0 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 7 16:58:08 CET 2007 - rguenther@suse.de + +- fix changelog entry order + ------------------------------------------------------------------- Tue Feb 27 10:58:46 CET 2007 - mkoenig@suse.de @@ -1445,17 +1450,17 @@ Tue Dec 5 15:25:45 CET 2000 - kukuk@suse.de - Search first in /etc/filesystems, then in /proc/filesystems ------------------------------------------------------------------- -Tue Dec 5 11:10:10 CET 2000 - schwab@suse.de - -- Don't use _syscallX on ia64. - -------------------------------------------------------------------- - Tue Dec 5 11:24:34 CET 2000 - kukuk@suse.de - Use AIX/fdisk patch from util-linux-2.10r - Backport "guess filesystems" from util-linux-2.10r +------------------------------------------------------------------- +Tue Dec 5 11:10:10 CET 2000 - schwab@suse.de + +- Don't use _syscallX on ia64. + + ------------------------------------------------------------------- Mon Dec 4 09:27:28 CET 2000 - olh@suse.de @@ -1873,13 +1878,13 @@ Fri Oct 31 13:38:58 MET 1997 - ro@suse.de - temporarily removed mount-hacker ----------------------------------------------------------------------------- +------------------------------------------------------------------- Wed Oct 29 23:44:37 MET 1997 - florian@suse.de - add changes from ms@suse.de for hostid.c ----------------------------------------------------------------------------- +------------------------------------------------------------------- Tue May 20 14:10:37 MEST 1997 - florian@suse.de @@ -1887,14 +1892,14 @@ Tue May 20 14:10:37 MEST 1997 - florian@suse.de for kernel 2.1.x ----------------------------------------------------------------------------- +------------------------------------------------------------------- Wed Apr 30 15:57:14 CEST 1997 - florian@suse.de - update to mount 2.6g ----------------------------------------------------------------------------- +------------------------------------------------------------------- Sun Apr 13 23:04:29 MEST 1997 - florian@suse.de @@ -1904,21 +1909,21 @@ Sun Apr 13 23:04:29 MEST 1997 - florian@suse.de ----------------------------------------------------------------------------- +------------------------------------------------------------------- Sat Nov 2 17:35:11 CET 1996 - florian@suse.de - update to mount 2.5p ----------------------------------------------------------------------------- +------------------------------------------------------------------- Thu Oct 17 16:05:09 CEST 1996 - florian@suse.de - Update auf neue Version von mount 2.5o. ----------------------------------------------------------------------------- +------------------------------------------------------------------- Tue Sep 3 17:01:45 MET DST 1996 - florian@suse.de @@ -1926,7 +1931,7 @@ Tue Sep 3 17:01:45 MET DST 1996 - florian@suse.de - (u)mount now gives much better error messages ----------------------------------------------------------------------- +------------------------------------------------------------------- Sun Aug 25 19:28:50 MET DST 1996 - bs@suse.de compile setterm with libtermcap and not libncurses diff --git a/util-linux.spec b/util-linux.spec index 3e76241..c05f8aa 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -20,7 +20,7 @@ License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on Version: 2.12r -Release: 76 +Release: 77 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-%version.tar.bz2 Source2: nologin.c @@ -620,6 +620,8 @@ fi %endif %changelog +* Wed Mar 07 2007 - rguenther@suse.de +- fix changelog entry order * Tue Feb 27 2007 - mkoenig@suse.de - fix missing return code in util-linux-2.12r-losetup_password.patch From 442556f14933bf75ca2ae5519591e375f14ce23237a530885b8f92bcb0ea4221 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 9 Mar 2007 00:51:42 +0000 Subject: [PATCH 006/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=6 --- util-linux-2.12r-partx_gpt_warning.patch | 13 +++++++++++++ util-linux.changes | 5 +++++ util-linux.spec | 6 +++++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.12r-partx_gpt_warning.patch diff --git a/util-linux-2.12r-partx_gpt_warning.patch b/util-linux-2.12r-partx_gpt_warning.patch new file mode 100644 index 0000000..eff2e26 --- /dev/null +++ b/util-linux-2.12r-partx_gpt_warning.patch @@ -0,0 +1,13 @@ +Index: util-linux-2.12r/partx/gpt.h +=================================================================== +--- util-linux-2.12r.orig/partx/gpt.h ++++ util-linux-2.12r/partx/gpt.h +@@ -36,7 +36,7 @@ + #define MSDOS_MBR_SIGNATURE 0xaa55 + #define GPT_BLOCK_SIZE 512 + +-#define GPT_HEADER_SIGNATURE 0x5452415020494645 ++#define GPT_HEADER_SIGNATURE 0x5452415020494645LL + #define GPT_HEADER_REVISION_V1_02 0x00010200 + #define GPT_HEADER_REVISION_V1_00 0x00010000 + #define GPT_HEADER_REVISION_V0_99 0x00009900 diff --git a/util-linux.changes b/util-linux.changes index 4c2e5e0..3693702 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 8 17:27:22 CET 2007 - mkoenig@suse.de + +- partx: fix warning for too long literal + ------------------------------------------------------------------- Wed Mar 7 16:58:08 CET 2007 - rguenther@suse.de diff --git a/util-linux.spec b/util-linux.spec index c05f8aa..4edab4e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -20,7 +20,7 @@ License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on Version: 2.12r -Release: 77 +Release: 78 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-%version.tar.bz2 Source2: nologin.c @@ -111,6 +111,7 @@ Patch109: util-linux-2.12r-losetup_password.patch Patch110: util-linux-2.12r-mkfs_open_exclusive.patch Patch111: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch112: util-linux-2.12r-mount_racy_loop.patch +Patch113: util-linux-2.12r-partx_gpt_warning.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed @@ -187,6 +188,7 @@ cd - %patch110 -p1 %patch111 -p1 %patch112 -p1 +%patch113 -p1 # setctsid cp %{S:22} %{S:23} . # nologin and guessfstype @@ -620,6 +622,8 @@ fi %endif %changelog +* Thu Mar 08 2007 - mkoenig@suse.de +- partx: fix warning for too long literal * Wed Mar 07 2007 - rguenther@suse.de - fix changelog entry order * Tue Feb 27 2007 - mkoenig@suse.de From 5b2f241eb7c173c4c83fe447ebfb07337b5853c1cca1a9010a0279d7b1c3b0d1 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sat, 10 Mar 2007 23:11:31 +0000 Subject: [PATCH 007/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=7 --- util-linux-2.12h-mtablock.diff | 186 ++++++++++++++++++++++----------- util-linux.changes | 5 + util-linux.spec | 4 +- 3 files changed, 134 insertions(+), 61 deletions(-) diff --git a/util-linux-2.12h-mtablock.diff b/util-linux-2.12h-mtablock.diff index 1ae109c..b23560c 100644 --- a/util-linux-2.12h-mtablock.diff +++ b/util-linux-2.12h-mtablock.diff @@ -1,86 +1,152 @@ ---- util-linux-2.12q/mount/fstab.c -+++ util-linux-2.12q/mount/fstab.c -@@ -395,6 +395,7 @@ +Index: util-linux-2.12r/mount/fstab.c +=================================================================== +--- util-linux-2.12r.orig/mount/fstab.c ++++ util-linux-2.12r/mount/fstab.c +@@ -395,6 +395,7 @@ getfsvolspec (const char *label) { /* Flag for already existing lock file. */ static int we_created_lockfile = 0; -+static int lock_file_desc = -1; ++static int lockfile_fd = -1; /* Flag to indicate that signals have been set up. */ static int signals_have_been_setup = 0; -@@ -417,6 +418,8 @@ +@@ -416,6 +417,8 @@ setlkw_timeout (int sig) { + void unlock_mtab (void) { if (we_created_lockfile) { ++ close(lockfile_fd); ++ lockfile_fd = -1; unlink (MOUNTED_LOCK); -+ close(lock_file_desc); -+ lock_file_desc = -1; we_created_lockfile = 0; } - } -@@ -443,6 +446,7 @@ +@@ -443,7 +446,7 @@ unlock_mtab (void) { void lock_mtab (void) { -+ sigset_t sigmask; - int tries = 3; +- int tries = 3; ++ int tries = 100000, i; char linktargetfile[MOUNTLOCK_LINKTARGET_LTH]; -@@ -467,6 +471,10 @@ - signals_have_been_setup = 1; - } + at_die = unlock_mtab; +@@ -469,45 +472,48 @@ lock_mtab (void) { -+ /* Allow all signals while trying to lock mtab */ -+ sigemptyset(&sigmask); -+ sigprocmask(SIG_SETMASK, &sigmask, &sigmask); -+ sprintf(linktargetfile, MOUNTLOCK_LINKTARGET, getpid ()); ++ i = open (linktargetfile, O_WRONLY|O_CREAT, 0); ++ if (i < 0) { ++ int errsv = errno; ++ /* linktargetfile does not exist (as a file) ++ and we cannot create it. Read-only filesystem? ++ Too many files open in the system? ++ Filesystem full? */ ++ die (EX_FILEIO, _("can't create lock file %s: %s " ++ "(use -n flag to override)"), ++ linktargetfile, strerror (errsv)); ++ } ++ close(i); ++ /* Repeat until it was us who made the link */ -@@ -521,12 +529,21 @@ - if (j == 0) { - /* We made the link. Now claim the lock. */ - if (fcntl (fd, F_SETLK, &flock) == -1) { -+ int errsv = errno; -+ if (!tries--) -+ die(EX_FILEIO, -+ _("Can't lock lock file %s: %s\n"), -+ MOUNTED_LOCK, strerror (errsv)); - if (verbose) { -- int errsv = errno; - printf(_("Can't lock lock file %s: %s\n"), - MOUNTED_LOCK, strerror (errsv)); - } -- /* proceed anyway */ -+ /* bummer - someone raced us to the file -+ * lock. Start all over again. */ -+ unlink(MOUNTED_LOCK); -+ } else { -+ we_created_lockfile = 1; -+ lock_file_desc = fd; - } - } else { - static int tries = 0; -@@ -551,8 +568,14 @@ - } + while (!we_created_lockfile) { + struct flock flock; +- int errsv, fd, i, j; +- +- i = open (linktargetfile, O_WRONLY|O_CREAT, 0); +- if (i < 0) { +- int errsv = errno; +- /* linktargetfile does not exist (as a file) +- and we cannot create it. Read-only filesystem? +- Too many files open in the system? +- Filesystem full? */ +- die (EX_FILEIO, _("can't create lock file %s: %s " +- "(use -n flag to override)"), +- linktargetfile, strerror (errsv)); +- } +- close(i); ++ int errsv, j; + + j = link(linktargetfile, MOUNTED_LOCK); + errsv = errno; + +- (void) unlink(linktargetfile); +- + if (j == 0) + we_created_lockfile = 1; + + if (j < 0 && errsv != EEXIST) { ++ (void) unlink(linktargetfile); + die (EX_FILEIO, _("can't link lock file %s: %s " + "(use -n flag to override)"), + MOUNTED_LOCK, strerror (errsv)); } +- fd = open (MOUNTED_LOCK, O_WRONLY); ++ lockfile_fd = open (MOUNTED_LOCK, O_WRONLY); + +- if (fd < 0) { ++ if (lockfile_fd < 0) { + int errsv = errno; + /* Strange... Maybe the file was just deleted? */ +- if (errno == ENOENT && tries-- > 0) ++ if (errno == ENOENT && tries-- > 0) { ++ if (tries % 200 == 0) ++ usleep(30); + continue; ++ } ++ (void) unlink(linktargetfile); + die (EX_FILEIO, _("can't open lock file %s: %s " + "(use -n flag to override)"), + MOUNTED_LOCK, strerror (errsv)); +@@ -520,7 +526,7 @@ lock_mtab (void) { + + if (j == 0) { + /* We made the link. Now claim the lock. */ +- if (fcntl (fd, F_SETLK, &flock) == -1) { ++ if (fcntl (lockfile_fd, F_SETLK, &flock) == -1) { + if (verbose) { + int errsv = errno; + printf(_("Can't lock lock file %s: %s\n"), +@@ -528,13 +534,15 @@ lock_mtab (void) { + } + /* proceed anyway */ + } ++ (void) unlink(linktargetfile); + } else { + static int tries = 0; + + /* Someone else made the link. Wait. */ + alarm(LOCK_TIMEOUT); +- if (fcntl (fd, F_SETLKW, &flock) == -1) { ++ if (fcntl (lockfile_fd, F_SETLKW, &flock) == -1) { + int errsv = errno; ++ (void) unlink(linktargetfile); + die (EX_FILEIO, _("can't lock lock file %s: %s"), + MOUNTED_LOCK, (errno == EINTR) ? + _("timed out") : strerror (errsv)); +@@ -542,16 +550,18 @@ lock_mtab (void) { + alarm(0); + /* Limit the number of iterations - maybe there + still is some old /etc/mtab~ */ +- if (tries++ > 3) { +- if (tries > 5) +- die (EX_FILEIO, _("Cannot create link %s\n" +- "Perhaps there is a stale lock file?\n"), +- MOUNTED_LOCK); +- sleep(1); +- } ++ ++tries; ++ if (tries % 200 == 0) ++ usleep(30); ++ if (tries > 100000) { ++ (void) unlink(linktargetfile); ++ close(lockfile_fd); ++ die (EX_FILEIO, _("Cannot create link %s\n" ++ "Perhaps there is a stale lock file?\n"), ++ MOUNTED_LOCK); ++ } ++ close(lockfile_fd); + } +- - close(fd); -+ /* If we created the lock file, keep the fd else -+ * our POSIX lock will go away immediately */ -+ if (!we_created_lockfile) -+ close(fd); } -+ -+ /* Restore original signal mask */ -+ sigprocmask(SIG_SETMASK, &sigmask, NULL); } - /* ---- util-linux-2.12q/mount/paths.h -+++ util-linux-2.12q/mount/paths.h -@@ -7,4 +7,4 @@ - #define MOUNTED_LOCK "/etc/mtab~" - #define MOUNTED_TEMP "/etc/mtab.tmp" - #endif --#define LOCK_TIMEOUT 10 -+#define LOCK_TIMEOUT 30 diff --git a/util-linux.changes b/util-linux.changes index 3693702..5249a73 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 9 11:00:11 CET 2007 - mkoenig@suse.de + +- mount: fix mtablock patch to avoid mtab corruption [#226783] + ------------------------------------------------------------------- Thu Mar 8 17:27:22 CET 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 4edab4e..85b572a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -20,7 +20,7 @@ License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on Version: 2.12r -Release: 78 +Release: 80 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-%version.tar.bz2 Source2: nologin.c @@ -622,6 +622,8 @@ fi %endif %changelog +* Fri Mar 09 2007 - mkoenig@suse.de +- mount: fix mtablock patch to avoid mtab corruption [#226783] * Thu Mar 08 2007 - mkoenig@suse.de - partx: fix warning for too long literal * Wed Mar 07 2007 - rguenther@suse.de From 3c70abba43339dbb2c6a9bda23b995c142d90a9a4ee4ceb164b185469febe500 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 15 Mar 2007 17:12:45 +0000 Subject: [PATCH 008/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=8 --- ...-2.12r-mount_swapon_swsuspend_resume.patch | 156 ++++++++++++++++++ util-linux.changes | 6 + util-linux.spec | 7 +- 3 files changed, 168 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.12r-mount_swapon_swsuspend_resume.patch diff --git a/util-linux-2.12r-mount_swapon_swsuspend_resume.patch b/util-linux-2.12r-mount_swapon_swsuspend_resume.patch new file mode 100644 index 0000000..32ebc77 --- /dev/null +++ b/util-linux-2.12r-mount_swapon_swsuspend_resume.patch @@ -0,0 +1,156 @@ +## 30swsusp-resume.dpatch by Jeff Bailey +diff -urNad --exclude=CVS --exclude=.svn ./mount/get_label_uuid.c /tmp/dpep-work.5ak7Cm/util-linux/mount/get_label_uuid.c +--- ./mount/get_label_uuid.c 2004-12-22 08:44:32.000000000 -0700 ++++ /tmp/dpep-work.5ak7Cm/util-linux/mount/get_label_uuid.c 2005-12-06 11:54:33.000000000 -0700 +@@ -93,7 +93,25 @@ + } + return 0; + } +- ++ ++static int ++is_swsuspend_partition(int fd, char **label, char *uuid) { ++ int n = getpagesize(); ++ char *buf = xmalloc(n); ++ struct swap_header_v1_2 *p = (struct swap_header_v1_2 *) buf; ++ ++ if (lseek(fd, 0, SEEK_SET) == 0 ++ && read(fd, buf, n) == n ++ && (strncmp(buf+n-10, "S1SUSPEND", 9)==0 || ++ strncmp(buf+n-10, "S2SUSPEND", 9)==0 || ++ strncmp(buf+n-10, "ULSUSPEND", 9)==0) ++ && p->version == 1) { ++ store_uuid(uuid, p->uuid); ++ store_label(label, p->volume_name, 16); ++ return 1; ++ } ++ return 0; ++} + + /* + * Get both label and uuid. +@@ -126,6 +143,8 @@ + + if (is_v1_swap_partition(fd, label, uuid)) + goto done; ++ if (is_swsuspend_partition(fd, label, uuid)) ++ goto done; + + if (lseek(fd, 1024, SEEK_SET) == 1024 + && read(fd, (char *) &e2sb, sizeof(e2sb)) == sizeof(e2sb) +diff -urNad --exclude=CVS --exclude=.svn ./mount/swapon.c /tmp/dpep-work.5ak7Cm/util-linux/mount/swapon.c +--- ./mount/swapon.c 2004-12-22 08:44:32.000000000 -0700 ++++ /tmp/dpep-work.5ak7Cm/util-linux/mount/swapon.c 2005-12-06 11:54:33.000000000 -0700 +@@ -22,6 +25,7 @@ + + #define _PATH_FSTAB "/etc/fstab" + #define PROC_SWAPS "/proc/swaps" ++#define PATH_MKSWAP "/sbin/mkswap" + + #define SWAPON_NEEDS_TWO_ARGS + +@@ -164,6 +168,85 @@ + return 0 ; + } + ++/* ++ * It's better do swsuspend detection by follow routine than ++ * include huge mount_guess_fstype.o to swapon. We need only ++ * swsuspend and no the others filesystems. ++ */ ++#ifdef HAVE_LIBBLKID ++static int ++swap_is_swsuspend(const char *device) { ++ const char *type = blkid_get_tag_value(blkid, "TYPE", device); ++ ++ if (type && strcmp(type, "swsuspend")==0) ++ return 0; ++ return 1; ++} ++#else ++static int ++swap_is_swsuspend(const char *device) { ++ int fd, re = 1, n = getpagesize() - 10; ++ char buf[10]; ++ ++ fd = open(device, O_RDONLY); ++ if (fd < 0) ++ return -1; ++ ++ if (lseek(fd, n, SEEK_SET) >= 0 && ++ read(fd, buf, sizeof buf) == sizeof buf && ++ (memcmp("S1SUSPEND", buf, 9)==0 || ++ memcmp("S2SUSPEND", buf, 9)==0 || ++ memcmp("ULSUSPEND", buf, 9)==0)) ++ re = 0; ++ ++ close(fd); ++ return re; ++} ++#endif ++ ++/* calls mkswap */ ++static int ++swap_reinitialize(const char *device) { ++ const char *label = mount_get_volume_label_by_spec(device); ++ pid_t pid; ++ ++ switch((pid=fork())) { ++ case -1: /* fork error */ ++ fprintf(stderr, _("%s: cannot fork: %s\n"), ++ progname, strerror(errno)); ++ return -1; ++ ++ case 0: /* child */ ++ if (label && *label) ++ execl(PATH_MKSWAP, PATH_MKSWAP, "-L", label, device, NULL); ++ else ++ execl(PATH_MKSWAP, PATH_MKSWAP, device, NULL); ++ exit(1); /* error */ ++ ++ default: /* parent */ ++ { ++ int status; ++ int ret; ++ ++ do { ++ if ((ret = waitpid(pid, &status, 0)) < 0 ++ && errno == EINTR) ++ continue; ++ else if (ret < 0) { ++ fprintf(stderr, _("%s: waitpid: %s\n"), ++ progname, strerror(errno)); ++ return -1; ++ } ++ } while (0); ++ ++ /* mkswap returns: 0=suss, 1=error */ ++ if (WIFEXITED(status) && WEXITSTATUS(status)==0) ++ return 0; /* ok */ ++ } ++ } ++ return -1; /* error */ ++} ++ + static int + do_swapon(const char *orig_special, int prio) { + int status; +@@ -187,6 +269,18 @@ + return -1; + } + ++ /* We have to reinitialize swap with old (=useless) software suspend ++ * data. The problem is that if we don't do it, then we get data ++ * corruption the next time with suspended on. ++ */ ++ if (swap_is_swsuspend(special)==0) { ++ fprintf(stdout, _("%s: %s: software suspend data detected. " ++ "Reinitializing the swap.\n"), ++ progname, special); ++ if (swap_reinitialize(special) < 0) ++ return -1; ++ } ++ + /* people generally dislike this warning - now it is printed + only when `verbose' is set */ + if (verbose) { diff --git a/util-linux.changes b/util-linux.changes index 5249a73..5bc7c13 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 15 17:24:34 CET 2007 - mkoenig@suse.de + +- mount: Let swapon automatically reinitialize a suspended + swap partition [#254437] + ------------------------------------------------------------------- Thu Mar 9 11:00:11 CET 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 85b572a..d331f68 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -20,7 +20,7 @@ License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on Version: 2.12r -Release: 80 +Release: 82 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-%version.tar.bz2 Source2: nologin.c @@ -112,6 +112,7 @@ Patch110: util-linux-2.12r-mkfs_open_exclusive.patch Patch111: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch112: util-linux-2.12r-mount_racy_loop.patch Patch113: util-linux-2.12r-partx_gpt_warning.patch +Patch114: util-linux-2.12r-mount_swapon_swsuspend_resume.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed @@ -189,6 +190,7 @@ cd - %patch111 -p1 %patch112 -p1 %patch113 -p1 +%patch114 -p1 # setctsid cp %{S:22} %{S:23} . # nologin and guessfstype @@ -622,6 +624,9 @@ fi %endif %changelog +* Thu Mar 15 2007 - mkoenig@suse.de +- mount: Let swapon automatically reinitialize a suspended + swap partition [#254437] * Fri Mar 09 2007 - mkoenig@suse.de - mount: fix mtablock patch to avoid mtab corruption [#226783] * Thu Mar 08 2007 - mkoenig@suse.de From 0f2fad81562c524c7a9a4b20815a5d3f559a244612f1980ff4c808011bfe40a8 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 26 Mar 2007 23:48:38 +0000 Subject: [PATCH 009/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=9 --- util-linux.changes | 5 +++++ util-linux.spec | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index 5bc7c13..b6213d5 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 26 15:49:09 CEST 2007 - rguenther@suse.de + +- add ncurses-devel and zlib-devel BuildRequires + ------------------------------------------------------------------- Thu Mar 15 17:24:34 CET 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index d331f68..8390217 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -11,7 +11,7 @@ # norootforbuild Name: util-linux -BuildRequires: libvolume_id-devel pam-devel +BuildRequires: libvolume_id-devel ncurses-devel pam-devel zlib-devel URL: http://kernel.org/pub/linux/utils/util-linux Provides: util rawio raw base schedutils Obsoletes: util rawio raw base schedutils @@ -20,7 +20,7 @@ License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on Version: 2.12r -Release: 82 +Release: 84 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-%version.tar.bz2 Source2: nologin.c @@ -624,6 +624,8 @@ fi %endif %changelog +* Mon Mar 26 2007 - rguenther@suse.de +- add ncurses-devel and zlib-devel BuildRequires * Thu Mar 15 2007 - mkoenig@suse.de - mount: Let swapon automatically reinitialize a suspended swap partition [#254437] From 2d968d25882b2c02af48a5d63bab06d0229082619b9d92a32717306c839a4104 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 4 Apr 2007 18:44:32 +0000 Subject: [PATCH 010/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=10 --- util-linux.changes | 5 +++++ util-linux.spec | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/util-linux.changes b/util-linux.changes index b6213d5..ea863de 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 4 12:55:40 CEST 2007 - mkoenig@suse.de + +- add Supplements line [FATE#301966] + ------------------------------------------------------------------- Mon Mar 26 15:49:09 CEST 2007 - rguenther@suse.de diff --git a/util-linux.spec b/util-linux.spec index 8390217..b9dd15f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -14,13 +14,14 @@ Name: util-linux BuildRequires: libvolume_id-devel ncurses-devel pam-devel zlib-devel URL: http://kernel.org/pub/linux/utils/util-linux Provides: util rawio raw base schedutils +Supplements: filesystem(minix) Obsoletes: util rawio raw base schedutils PreReq: %install_info_prereq permissions License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on Version: 2.12r -Release: 84 +Release: 87 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-%version.tar.bz2 Source2: nologin.c @@ -624,6 +625,8 @@ fi %endif %changelog +* Wed Apr 04 2007 - mkoenig@suse.de +- add Supplements line [FATE#301966] * Mon Mar 26 2007 - rguenther@suse.de - add ncurses-devel and zlib-devel BuildRequires * Thu Mar 15 2007 - mkoenig@suse.de From e5c2fcfe9abe3b31e89ff5c2dd172a029d03bc47304bf74b8558d81b3bc97072 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 12 Apr 2007 16:31:42 +0000 Subject: [PATCH 011/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=11 --- README.loop-AES-v2.2d | 1231 ----- README.loop-AES-v2.2d.SuSE | 11 - etc_filesystems | 5 + guessfstype.8 | 13 - guessfstype2.patch | 48 - loop-AES-v3.0a-util-linux-2.12p.diff | 4345 ----------------- mount-nfs-nonreserved | 61 - schedutils-1.4.0.tar.bz2 | 3 - stupid-programmer.diff | 38 - ...iff => util-linux-2.11q-fdisk_fs_mac.patch | 111 +- ...util-linux-2.11u-mount_nfs_mount_acl.patch | 38 +- ... => util-linux-2.11z-hwclock_geteuid.patch | 8 +- util-linux-2.12-enablereplaybuild.diff | 20 - ...=> util-linux-2.12-misc_utils_hostid.patch | 43 +- util-linux-2.12-mount_base_nfsv4.patch | 859 ++++ util-linux-2.12-mount_guessfstype.diff | 183 - ... util-linux-2.12-mount_mountfallback.patch | 10 +- ...iff => util-linux-2.12-mount_nfs_tcp.patch | 22 +- util-linux-2.12-multipleraw.diff | 65 - util-linux-2.12-suse-compatibility.diff | 149 - ...il-linux-2.12a-mount_mountbylabel-dm.patch | 18 +- ...inux-2.12a-mount_mountpointwithcolon.patch | 10 +- util-linux-2.12a-mount_procswapcheck.patch | 31 + util-linux-2.12a-procswapscheck.diff | 24 - util-linux-2.12h-mtablock.diff | 152 - util-linux-2.12h-short-passwords.diff | 55 - util-linux-2.12i-x86_64intel.diff | 22 - ...iff => util-linux-2.12q-mount_--move.patch | 7 +- util-linux-2.12q-mount_strict_aliasing.patch | 28 + ...linux-2.12q-mount_umount2_not_static.patch | 6 +- util-linux-2.12q-nfsv4.patch | 628 --- util-linux-2.12q-null.diff | 14 - util-linux-2.12q-strict-aliasing.diff | 11 - ...=> util-linux-2.12q-sys_utils_ionice.patch | 64 +- ...2.12r-disk_utils_mkfs_open_exclusive.patch | 20 +- ...il-linux-2.12r-disk_utils_mkswap_fix.patch | 10 +- util-linux-2.12r-external-prog-on-guess.diff | 133 - ....patch => util-linux-2.12r-fdisk_cyl.patch | 11 +- ... => util-linux-2.12r-fdisk_fdiskwrap.patch | 116 +- util-linux-2.12r-fdisk_llseek.patch | 234 - ...ux-2.12r-fdisk_remove_bogus_warnings.patch | 10 +- util-linux-2.12r-losetup_password.patch | 247 - ...inux-2.12r-misc_utils_cal_formatting.patch | 0 ...-mount-doubleslashessourceprefix-cifs.diff | 58 - ...ch => util-linux-2.12r-mount_by_uuid.patch | 26 +- ...linux-2.12r-mount_mount.8_xfs_update.patch | 6 +- ...> util-linux-2.12r-mount_mtab_update.patch | 8 +- ...inux-2.12r-mount_nfs_remount_options.patch | 10 +- util-linux-2.12r-mount_racy_loop.patch | 80 +- ...=> util-linux-2.12r-mount_rpcsec_gss.patch | 18 +- ...> util-linux-2.12r-mount_sec_manpage.patch | 10 +- ...-2.12r-mount_swapon_swsuspend_resume.patch | 56 +- ...til-linux-2.12r-mount_umount_nosysfs.patch | 8 +- util-linux-2.12r-nonfsmountfallback.diff | 31 - util-linux-2.12r-pagesize.patch | 12 - util-linux-2.12r-partx.patch | 118 - util-linux-2.12r-partx_gpt_warning.patch | 13 - util-linux-2.12r-rawfixes.patch | 19 - ...-2.12r-sys_utils_readprofile_mapfile.patch | 0 util-linux-2.12r.diff | 86 - util-linux-2.12r.tar.bz2 | 3 - util-linux-2.13-build_fix_intel_check.patch | 13 + util-linux-2.13-build_gnu_source.patch | 12 + ...2.13-misc_utils_add_man_scriptreplay.patch | 13 + util-linux-2.13-mount_nfs_timeo.patch | 13 + util-linux-2.13-sys_utils_arch.patch | 105 + util-linux-2.13-tests_missing_include.patch | 12 + ...l.dif => util-linux-login_utils_wall.patch | 2 + ...til-linux-mount_libvolume_id_support.patch | 296 +- ...diff => util-linux-mount_mount.8-acl.patch | 0 ...nfs.8.diff => util-linux-mount_nfs.8.patch | 0 ...diff => util-linux-mount_opt_hotplug.patch | 28 +- ...diff => util-linux-mount_warn_nfsudp.patch | 20 +- util-linux-nfs-timeo.diff | 11 - util-linux-ng-2.12r+git20070330.tar.bz2 | 3 + util-linux-nodiratime.diff | 14 - util-linux.changes | 43 + util-linux.spec | 415 +- 78 files changed, 1907 insertions(+), 8769 deletions(-) delete mode 100644 README.loop-AES-v2.2d delete mode 100644 README.loop-AES-v2.2d.SuSE create mode 100644 etc_filesystems delete mode 100644 guessfstype.8 delete mode 100644 guessfstype2.patch delete mode 100644 loop-AES-v3.0a-util-linux-2.12p.diff delete mode 100644 mount-nfs-nonreserved delete mode 100644 schedutils-1.4.0.tar.bz2 delete mode 100644 stupid-programmer.diff rename util-linux-2.11q-fs_mac.diff => util-linux-2.11q-fdisk_fs_mac.patch (71%) rename util-linux-2.11u-nfs-mount_acl.diff => util-linux-2.11u-mount_nfs_mount_acl.patch (64%) rename util-linux-2.11z-hwclock_geteuid.diff => util-linux-2.11z-hwclock_geteuid.patch (52%) delete mode 100644 util-linux-2.12-enablereplaybuild.diff rename util-linux-2.12-hostid.diff => util-linux-2.12-misc_utils_hostid.patch (70%) create mode 100644 util-linux-2.12-mount_base_nfsv4.patch delete mode 100644 util-linux-2.12-mount_guessfstype.diff rename util-linux-2.12-mountfallback.patch => util-linux-2.12-mount_mountfallback.patch (73%) rename util-linux-2.12-nfs-tcp.diff => util-linux-2.12-mount_nfs_tcp.patch (66%) delete mode 100644 util-linux-2.12-multipleraw.diff delete mode 100644 util-linux-2.12-suse-compatibility.diff rename util-linux-2.12a-mountbylabel-dm.patch => util-linux-2.12a-mount_mountbylabel-dm.patch (76%) rename util-linux-2.12a-mountpointwithcolon.diff => util-linux-2.12a-mount_mountpointwithcolon.patch (59%) create mode 100644 util-linux-2.12a-mount_procswapcheck.patch delete mode 100644 util-linux-2.12a-procswapscheck.diff delete mode 100644 util-linux-2.12h-mtablock.diff delete mode 100644 util-linux-2.12h-short-passwords.diff delete mode 100644 util-linux-2.12i-x86_64intel.diff rename util-linux-2.12q-mount--move.diff => util-linux-2.12q-mount_--move.patch (82%) create mode 100644 util-linux-2.12q-mount_strict_aliasing.patch rename util-linux-2.12q-umount2-not-static.patch => util-linux-2.12q-mount_umount2_not_static.patch (62%) delete mode 100644 util-linux-2.12q-nfsv4.patch delete mode 100644 util-linux-2.12q-null.diff delete mode 100644 util-linux-2.12q-strict-aliasing.diff rename util-linux-2.12q-ionice.diff => util-linux-2.12q-sys_utils_ionice.patch (84%) rename util-linux-2.12r-mkfs_open_exclusive.patch => util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch (61%) rename util-linux-2.12r-mkswap_fix.patch => util-linux-2.12r-disk_utils_mkswap_fix.patch (58%) delete mode 100644 util-linux-2.12r-external-prog-on-guess.diff rename util-linux-2.12r-fdiskcyl.patch => util-linux-2.12r-fdisk_cyl.patch (71%) rename util-linux-2.12r-fdiskwrap.patch => util-linux-2.12r-fdisk_fdiskwrap.patch (75%) delete mode 100644 util-linux-2.12r-fdisk_llseek.patch delete mode 100644 util-linux-2.12r-losetup_password.patch rename util-linux-2.12r-cal_formatting.patch => util-linux-2.12r-misc_utils_cal_formatting.patch (100%) delete mode 100644 util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff rename util-linux-2.12r-mount-by-uuid.patch => util-linux-2.12r-mount_by_uuid.patch (58%) rename util-linux-2.12r-mount.8-xfs-update.patch => util-linux-2.12r-mount_mount.8_xfs_update.patch (72%) rename util-linux-2.12r-mount-mtab-update.patch => util-linux-2.12r-mount_mtab_update.patch (76%) rename util-linux-2.12r-nfs_remount_options.patch => util-linux-2.12r-mount_nfs_remount_options.patch (59%) rename util-linux-2.12r-rpcsec-gss.patch => util-linux-2.12r-mount_rpcsec_gss.patch (88%) rename util-linux-2.12r-sec-manpage.patch => util-linux-2.12r-mount_sec_manpage.patch (88%) rename util-linux-2.12r-umount_nosysfs.patch => util-linux-2.12r-mount_umount_nosysfs.patch (53%) delete mode 100644 util-linux-2.12r-nonfsmountfallback.diff delete mode 100644 util-linux-2.12r-pagesize.patch delete mode 100644 util-linux-2.12r-partx.patch delete mode 100644 util-linux-2.12r-partx_gpt_warning.patch delete mode 100644 util-linux-2.12r-rawfixes.patch rename util-linux-2.12r-readprofile-mapfile.patch => util-linux-2.12r-sys_utils_readprofile_mapfile.patch (100%) delete mode 100644 util-linux-2.12r.diff delete mode 100644 util-linux-2.12r.tar.bz2 create mode 100644 util-linux-2.13-build_fix_intel_check.patch create mode 100644 util-linux-2.13-build_gnu_source.patch create mode 100644 util-linux-2.13-misc_utils_add_man_scriptreplay.patch create mode 100644 util-linux-2.13-mount_nfs_timeo.patch create mode 100644 util-linux-2.13-sys_utils_arch.patch create mode 100644 util-linux-2.13-tests_missing_include.patch rename util-linux-wall.dif => util-linux-login_utils_wall.patch (88%) rename util-linux-libvolume_id-support.patch => util-linux-mount_libvolume_id_support.patch (57%) rename mount.8-acl.diff => util-linux-mount_mount.8-acl.patch (100%) rename util-linux-nfs.8.diff => util-linux-mount_nfs.8.patch (100%) rename util-linux-opt-hotplug.diff => util-linux-mount_opt_hotplug.patch (73%) rename util-linux-warn-nfsudp.diff => util-linux-mount_warn_nfsudp.patch (89%) delete mode 100644 util-linux-nfs-timeo.diff create mode 100644 util-linux-ng-2.12r+git20070330.tar.bz2 delete mode 100644 util-linux-nodiratime.diff diff --git a/README.loop-AES-v2.2d b/README.loop-AES-v2.2d deleted file mode 100644 index c3903f9..0000000 --- a/README.loop-AES-v2.2d +++ /dev/null @@ -1,1231 +0,0 @@ -Written by Jari Ruusu , October 26 2004 - -Copyright 2001,2002,2003,2004 by Jari Ruusu. -Redistribution of this file is permitted under the GNU Public License. - - -Table of Contents -~~~~~~~~~~~~~~~~~ -1. Loop device primer -2. General information -2.1. Key setup and IV modes -2.2. Use of journaling file systems on loop device -2.3. Use of offsets and sizelimits -2.4. Use of software suspend -2.5. File system soft block sizes -2.6. Compatibility with earlier versions -3. Instructions for building loop.o driver -4. Instructions for building new mount, umount, losetup, swapon and swapoff -5. Instructions for building new gpg -6. Testing the loop.o driver and losetup program -7. Examples -7.1 Example 1 - Encrypting swap on 2.4 and newer kernels -7.2. Example 2 - Partition backed loop with gpg encrypted key file -7.3. Example 3 - Encrypted partition that multiple users can mount -7.4. Example 4 - Encrypting /tmp partition with random keys -7.5. Example 5 - Encrypting root partition -7.6. Example 6 - Boot from CD-ROM + encrypted root partition -8. Security levels -9. Performance tuning for 2.4 and newer kernels -10. Files -11. Credits - - -1. Loop device primer -~~~~~~~~~~~~~~~~~~~~~ -Loop devices are block devices that do not store any data directly but loop -all reads and writes to underlying block device or file, possibly encrypting -and decrypting data in the process. Normally you don't write to a loop -device directly, but set up a file system on it. The file system will then -read from and write to loop device. - -By default, 8 loop devices are available: /dev/loop0, /dev/loop1 ... -/dev/loop7 (on devfs /dev/loop/0 ... /dev/loop/7). All devices are -identical, and each can be tied to one real block device or one file on some -file system. You have to decide and allocate which loop to use for which -purpose. - -losetup(8) program is used to make and tear down the connection between a -loop device and underlying device or file. You don't have to specify type of -underlying device as loop driver detects that automatically. mount(8), -umount(8), swapon(8) and swapoff(8) programs can also set up and tear down -loop devices. - -File backed loops may deadlock under some kernel + file system combinations. -So, if you can choose between device backed and file backed, choose device -backed even if it means that you have to re-partition your disks. - - -2. General information -~~~~~~~~~~~~~~~~~~~~~~ -This package provides loadable Linux kernel module (loop.o or loop.ko on 2.6 -kernels) that has AES cipher built-in. The AES cipher can be used to encrypt -local file systems and disk partitions. - -Loop device encrypts data but does not authenticate ciphertext. In other -words, it delivers data privacy, but does not guarantee that data has not -been tampered with. Admins setting up encrypted file systems should ensure -that neither ciphertext, nor tools used to access ciphertext (kernel + -kernel modules, mount, losetup, and other utilities) can be trojaned or -tampered. - -This package does *not* modify your kernel in any way, so you are free to -use kernels of your choice, with or without cool patches. This package works -with 2.0.x, 2.2.x, 2.4.x (2.4.7 or later) and 2.6.x kernels. - -Latest version of this package can be found at: - - http://loop-aes.sourceforge.net/ - http://members.tiscali.fi/ce6c8edf/ (limited downloads) - -New versions are announced to linux-crypto mailing list: - - http://mail.nl.linux.org/linux-crypto/ - http://www.spinics.net/lists/crypto/ - -List-subscribe: - - -2.1. Key setup and IV modes -~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The AES cipher is used in CBC (cipher block chaining) mode. Data is -encrypted and decrypted in 512 byte chains. Two key setup modes are -supported; single-key mode and multi-key mode. Single-key mode uses simple -sector IV and one AES key to encrypt and decrypt all sectors in the loop -device. Multi-key mode uses cryptographically more secure MD5 IV and 64 -different AES keys to encrypt and decrypt sectors in the loop device. In -multi-key mode first key is used for first sector, second key for second -sector, and so on. - -Password string has a minimum length of 20 characters. Optional password -seed (salt) and key iteration count can be used to slow down dictionary -attacks. Password seed is appended to user supplied password before password -is hashed using one way hash. If password iteration count is specified, -password hash output is encrypted N thousand times using AES-256. Unique -seed prevents an adversary from precomputing hashes of passwords in his -dictionary in advance, and thus making an optimized attack slower. Large -password iteration count makes dictionary attack painfully slow. - -If encryption type is specified as AES128 or AES, password string is hashed -with SHA-256, and 128 bit AES encryption is used. If encryption type is -specified as AES192, password string is hashed with SHA-384, and 192 bit AES -encryption is used. If encryption type is specified as AES256, password -string is hashed with SHA-512, and 256 bit AES encryption is used. - - -2.2. Use of journaling file systems on loop device -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Don't use a journaling file system on top of file backed loop device. Device -backed loop device can be used with journaling file systems as device backed -loops guarantee that writes reach disk platters in order required by -journaling file system (write caching must be disabled on the disk drive, of -course). With file backed loop devices, correct write ordering may extend -only to page cache (which resides in RAM) of underlying file system. VM can -write such pages to disk in any order it wishes, and thus break write order -expectation of journaling file system. - - -2.3. Use of offsets and sizelimits -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -losetup and mount programs support using offset to underlying device or -file. 2.4.x and later kernels also support use of sizelimit that limit size -of device to some subset of full underlying device or file size. Both offset -and sizelimit are specified in bytes. If no offset is specified, zero offset -is used. If no sizelimit is specified, full device/file size is used. If you -do use nonzero offsets, make sure offset is integer multiple of 512 bytes. -Nonzero offsets that are not integer multiple of 512 bytes are NOT supported -as they may be nonportable and/or nonworking. - - -2.4. Use of software suspend -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Encryption keys are kept in kernel RAM while loop is active. Key is -immediately erased when loop is deactivated. Use of suspend-to-disk while -there are active encrypted loops should be used with caution: it would be -really bad security wise because encryption keys are written to disk when -kernel RAM is saved to disk. Once key is written to disk it may be -recoverable from that disk pretty much forever. Security of data encrypted -with such recoverable key is void. - - -2.5. File system soft block sizes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you intend to move encrypted file system to some other device (CD-ROM for -example), be sure to create file system with soft block size that is integer -multiple of device hard sector size. CD-ROMs have 2048 byte sectors. File -system with 1024 byte soft block size is not going to work with all CD-ROM -drives and/or drivers. - - -2.6. Compatibility with earlier versions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This version is compatible with on-disk formats of all previous relased -versions. This version is compatible with recommended mount, losetup and -swapon command line syntax and /etc/fstab option syntax since -loop-AES-v1.1b. - -Unhashed encryption type as created using ancient loop-AES-v1.0c, now needs -'mount -o phash=unhashed1' or 'losetup -H unhashed1' options. - -Mount and losetup programs from loop-AES-v2.0g and older accepted unlimited -long passphrase when passphrase was read from a file descriptor using '-p 0' -option. To prevent abuse of mlock()ed RAM by non-root users, mount and -losetup programs from loop-AES-v2.1a and newer limit max passphrase length -to 4094 bytes. - - -3. Instructions for building loop.o driver -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Before you attempt to build loop.o driver (loop.ko on 2.6 kernels), you -*must* configure, compile and install new kernel so that CONFIG_MODULES=y -and CONFIG_BLK_DEV_LOOP=n. Also, CONFIG_KMOD=y is recommended but not -required (kernel 2.0 doesn't have CONFIG_KMOD, set CONFIG_KERNELD=y -instead). Configuring your kernel so that loop driver is built-in -(CONFIG_BLK_DEV_LOOP=y) or module (CONFIG_BLK_DEV_LOOP=m) will *not* work. -After building and installing your new kernel, do not attempt to clean -kernel tree, or rename path to kernel sources. - -(Re)configuring and (re)compiling your kernel are required for following -reasons: (1) to disable loop driver in your kernel, (2) to get your kernel -sources to match your running kernel, (3) to get your kernel .config to -match your running kernel, (4) to set up configure time generated links -properly, (5) to generate compile time created header files properly to -match your kernel configuration. Failure to fulfill *all* above requirements -may cause loop.o driver compilation to fail or generate incorrectly -operating code. If you are just upgrading existing loop-AES with newer -version, there is no need to recompile kernel or reboot. Just unmount all -file systems using old loop driver, and remove loop driver from kernel with -rmmod command before compiling new loop driver. - -This is how loop.o is compiled and installed: - -2.2 and older kernels: Makefile copies your kernel's loop.c to this - directory. Then, Makefile patches that copy with a - kernel version specific patch. If patching a copy of - your kernel's loop.c fails, then a local copy of - known-to-work and patch-able loop.c-2.X.original is - used instead. - -2.4 and newer kernels: Makefile copies pre-patched loop.c-2.X.patched to - file called patched-loop.c. - -Resulting patched-loop.c along with other source files is then compiled and -linked to form a new loop.o driver that is (usually) installed in -/lib/modules/`uname -r`/block directory. AES cipher is permanently glued to -loop.o driver so that when loop.o is loaded it automagically has AES support -built in. There is no need to define any aliases in /etc/modules.conf file. - -To compile and install loop.o driver, as root, use commands: - - make clean - make - -Makefile tries to locate running kernel source directory, steal definitions -from kernel Makefile, and build a version that matches your running kernel. -Following directories are tried, in this order: - - /lib/modules/`uname -r`/source - /lib/modules/`uname -r`/build - /usr/src/linux - /usr/src/linux-`uname -r` - /usr/src/kernel-source-`uname -r` - -You can override automatic kernel source directory detection by specifying -LINUX_SOURCE like this: make LINUX_SOURCE=/usr/src/linux-2.4.22aa1 - -Both LINUX_SOURCE and KBUILD_OUTPUT must be specified when compiling for -2.6.x kernel with separate object directory. - -You can disable automatic module installation and creation of module -dependencies by specifying MODINST=n RUNDM=n on make command line. - -Automatic kernel source directory detection is not foolproof. For best -results, always specify LINUX_SOURCE, especially if loop.o module appears to -compile for wrong kernel. Observe last five lines of make output for clues. - -If you are upgrading your kernel and you need loop.o module during boot, you -probably need to build new version of loop.o module that matches your new -kernel *before* you boot the new kernel. To build loop.o module for other -kernel than running kernel, you *must* specify LINUX_SOURCE parameter to -make. - -You can override default installation root directory by specifying -INSTALL_MOD_PATH like this: make INSTALL_MOD_PATH=/path/to/destination/root - -Makefile detects processor type from kernel configuration. If selected -processor type is x86 processor or AMD64 processor, optimized assembler -implementations of AES and MD5 are used instead of C implementations. If you -want to unconditionally disable x86 assembler AES and MD5 implementations, -specify X86_ASM=n on make command line. If you want to unconditionally -disable AMD64 assembler AES and MD5 implementations, specify AMD64_ASM=n on -make command line. - -If you want to enable encryption key scrubbing, specify KEYSCRUB=y on make -command line. Loop encryption key scrubbing moves and inverts key bits in -kernel RAM so that the thin oxide which forms the storage capacitor -dielectric of DRAM cells is not permitted to develop detectable property. -For more info, see Peter Gutmann's paper: -http://www.cs.auckland.ac.nz/~pgut001/pubs/secure_del.html - -Note: If your patch program is very old, it may not understand the --dry-run -option, and may puke lengthy error messages. Even if that happens, the build -process should still produce a working loop driver. - - -4. Instructions for building new mount, umount, losetup, swapon and swapoff -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -In order to support AES and other ciphers, mount, umount, losetup, swapon -and swapoff need to be patched and recompiled. A patch is included. Mount, -umount, losetup, swapon and swapoff sources are in util-linux package which -you can get from: - - ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/ - or - ftp://ftp.kernel.org/pub/linux/utils/util-linux/ - -Just in case if the tarball is not properly signed, the md5 sum of -util-linux-2.12h.tar.gz is f8f1b2096abbf52fadf86d470c5035dd - -Do *not* install all the utilities in the util-linux package without -thinking. You may ruin your system if you do that. Read the INSTALL file -provided with util-linux tarball. - -These commands, as root user, will recompile and install mount, umount, -losetup, swapon, swapoff and their man pages: - - zcat util-linux-2.12h.tar.gz | tar xvf - - cd util-linux-2.12h - patch -p1 <../util-linux-2.12h.diff - CFLAGS=-O2 ./configure - make SUBDIRS="lib mount" - cd mount - install -m 4755 -o root mount umount /bin - install -m 755 losetup swapon /sbin - rm -f /sbin/swapoff && ( cd /sbin && ln -s swapon swapoff ) - rm -f /usr/share/man/man8/{mount,umount,losetup,swapon,swapoff}.8.gz - install -m 644 mount.8 umount.8 losetup.8 /usr/share/man/man8 - install -m 644 swapon.8 swapoff.8 /usr/share/man/man8 - rm -f /usr/share/man/man5/fstab.5.gz - install -m 644 fstab.5 /usr/share/man/man5 - mandb - cd ../.. - -Debian users may want to put mount package on hold like this: - - echo mount hold | dpkg --set-selections - - -5. Instructions for building new gpg -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When gpg encrypts data with symmetric cipher only or when gpg encrypts -secret keyring keys with secret passphrase, gpg uses seeded (salted) and -iterated key setup. However, default amount of iteration is tuned for slow -processors and can be increased for better resistance against dictionary -attacks. Larger key iteration makes key setup much slower, but also makes -dictionary attacks much slower too. - -Included optional gpg patch makes gpg password iteration 128 times slower. -gpg stores new iteration value along with seed bytes into symmetric cipher -encrypted output file or secret keyring, so unpatched gpg versions will read -and decrypt the data just fine. - -gpg sources are available from: - - ftp://ftp.gnupg.org/gcrypt/gnupg/ - -These commands, as root user, will recompile and install gpg and gpgv and -their man pages: - - zcat gnupg-1.2.6.tar.gz | tar xvf - - cd gnupg-1.2.6 - patch -p1 <../gnupg-1.2.6.diff - CFLAGS="-O2" LDFLAGS="-static -s" ./configure --prefix=/usr --enable-static-rnd=linux - make - rm -f /usr/share/man/man1/{gpg,gpgv}.1.gz - make install - chown root.root /usr/bin/gpg - chmod 4755 /usr/bin/gpg - -Note: Above instructions create statically linked version of gpg. Static -linking is necessary if you ever decide to encrypt your root partition. - -If /usr/bin directory is not on your root partition, then it is necessary to -move gpg to /bin directory on your root partition: - - cd /usr/bin - mv gpg ../../bin - ln -s ../../bin/gpg gpg - -Debian users may want to put gnupg package on hold like this: - - echo gnupg hold | dpkg --set-selections - - -6. Testing the loop.o driver and losetup program -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Run this command, as root, and Makefile will run series of tests. - - make tests - -Makefile will display "*** Test results ok ***" message if tests are -completed successfully. If tests fail, do not use the driver as it is -broken. - -If gpg isn't available, then tests that involve decrypting gpg encrypted key -files will fail. You can skip gpg key file tests by specifying -TEST_GPG_TYPES=n on make command line. - - -7. Examples -~~~~~~~~~~~ -Many of following examples depend on gpg encrypted key file. gpg appears to -prevent its own keys from being leaked to swap, but does not appear to -prevent data handled by it from being leaked to swap. In gpg encrypted key -file cases, the data handled by gpg are loop encryption keys, and they may -leak to swap. Therefore, use of gpg encrypted key file depends on encrypted -swap. - -When using gpg encrypted key file, the password that is used to encrypt the -key file is the password that losetup and mount programs want. losetup and -mount programs run gpg to decrypt the key file, and pipe the password to -gpg. gpg then decrypts the file and pipes the real loop keys back to losetup -or mount program. - -Many of following examples need uuencode program. Not all boxes have it -installed by default. If you need to install uuencode program, it is usually -part of sharutils package. - -Many of following examples attempt to use loop in multi-key mode and thus -*require* losetup/mount programs from loop-AES-v2.0b or later. Setting up -multi-key gpg key-file and using that key-file with old single-key only -aware losetup/mount programs is *dangerous*. In multi-key loop cases -"losetup -a" command run by root user should output "multi-key" indicating -that loop is really in multi-key mode. If no "multi-key" string shows up, -your loop setup is a time bomb. If you later upgrade your losetup/mount -programs to version that can understand multi-key mode, those new -losetup/mount programs will correctly setup loop in multi-key mode instead -of single-key mode, and you may not be able to access your data any more. -New losetup/mount programs are compatible with both single-key and multi-key -key-files. New losetup/mount programs will recognize single-key key-files -and set up loop in single-key mode in those cases. Old single-key only aware -losetup/mount programs need single-key examples. None of the following gpg -key-file examples are such. - - -7.1. Example 1 - Encrypting swap on 2.4 and newer kernels -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Device backed (partition backed) loop is capable of encrypting swap on 2.4 -and newer kernels. File backed loops can't be used for swap. - -First, run "swapoff -a" to turn off swap devices in your /etc/fstab file. -Second, add "loop=/dev/loop?" and "encryption=AES128" options to swap lines -in your /etc/fstab file. Example: - - /dev/hda666 none swap sw,loop=/dev/loop6,encryption=AES128 0 0 - ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ -Third, there may be old unencrypted data on your swap devices, in which case -you can try to overwrite that data with command like this: - - dd if=/dev/zero of=/dev/hda666 bs=64k conv=notrunc - mkswap /dev/hda666 - -Fourth, run "swapon -a" and "rm -rf /var/log/ksymoops" and you are done. - -Running "swapon -a" will set up loop devices using random keys, run mkswap -on them, and enable encrypted swap on specified loop devices. Usually your -distro's startup scripts will run the "swapon -a" command so you don't need -to change your startup scripts at all. As expected, "swapoff -a" will tear -down such loop devices. - -Removing /var/log/ksymoops directory is often required because some versions -of modprobe (part of modutils package) try to log loaded modules to -/var/log/ksymoops/*.log files. This is bad because swap is often enabled -(and loop.o modprobe'd to kernel) before any partitions are mounted -writable. Without /var/log/ksymoops directory on root partition, modprobe -will not try to log loaded modules, and you won't see annoying error -messages. - -Note: If you are using encrypted swap and you are upgrading your kernel, you -probably need to build new version of loop.o module that matches your new -kernel *before* you boot the new kernel. See "Instructions for building -loop.o driver" section for more details. - - -7.2. Example 2 - Partition backed loop with gpg encrypted key file -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This example, originally from Michael H. Warfield, shows how to create an -ext2 file system on encrypted hard disk partition, and creates 64 random -encryption keys that are encrypted using gpg. Store the key file where ever -you like, on separate removable media, USB dongle, or on a smart card if you -like. You have to have both your passphrase and that key file in order to -mount that file system. - -This example uses a fictitious partition /dev/hda666 for storage and -fictitious directory /mnt666 as mount point. A removable USB dongle is -assumed to be (auto-)mounted at /a/usbdongle directory. - -Create 64 random encryption keys and encrypt those keys using gpg. Reading -from /dev/random may take indefinitely long if kernel's random entropy pool -is empty. If that happens, do some other work on some other console (use -keyboard, mouse and disks). Use of gpg encrypted key file depends on -encrypted swap. - - head -c 2880 /dev/random | uuencode -m - | head -n 65 | tail -n 64 \ - | gpg --symmetric -a >/a/usbdongle/keyfile.gpg - -Fill the partition with random looking data. "dd" command may take a while -to execute if partition is large. - - head -c 15 /dev/urandom | uuencode -m - | head -n 2 | tail -n 1 \ - | losetup -p 0 -e AES128 /dev/loop3 /dev/hda666 - dd if=/dev/zero of=/dev/loop3 bs=4k conv=notrunc 2>/dev/null - losetup -d /dev/loop3 - -Add this to your /etc/fstab file: - - /dev/hda666 /mnt666 ext2 defaults,noauto,loop=/dev/loop3,encryption=AES128,gpgkey=/a/usbdongle/keyfile.gpg 0 0 - -The "losetup -F" command asks for passphrase to unlock your key file. -Losetup -F option reads loop related options from /etc/fstab. Partition name -/dev/hda666, encryption=AES128 and gpgkey=/a/usbdongle/keyfile.gpg come from -/etc/fstab. - - losetup -F /dev/loop3 - mkfs -t ext2 /dev/loop3 - losetup -d /dev/loop3 - mkdir /mnt666 - -Now you should be able to mount the file system like this. The "mount" -command asks for passphrase to unlock your key file. - - mount /mnt666 - -Check that loop is really in multi-key mode. Losetup -a output should -include string "multi-key" indicating that loop is really in multi-key mode. -If no "multi-key" string shows up, you somehow managed to mess up gpg key -file generation part or you are trying to use old losetup/mount programs -that only understand single-key mode. - - losetup -a - -You can unmount partition like this: - - umount /mnt666 - -Unmounted filesystem can be fsck'ed like this. -F option reads loop related -options from /etc/fstab. Partition name /dev/hda666, encryption=AES128 and -gpgkey=/a/usbdongle/keyfile.gpg come from /etc/fstab. - - losetup -F /dev/loop3 - fsck -t ext2 -f -y /dev/loop3 - losetup -d /dev/loop3 - - -7.3. Example 3 - Encrypted partition that multiple users can mount -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This example shows how to create encrypted partition that multiple non-root -users can mount, each with their own gpg key. Non-root users don't have -access to file system key that is actually used to encrypt data. Root can -add or remove user's permission to mount encrypted partition at any time. -This example uses a fictitious partition /dev/hda666 for storage and -fictitious directory /secret1 as mount point. - -Create 64 random file system keys and encrypt those keys using root's gpg -public key. Reading from /dev/random may take indefinitely long if kernel's -random entropy pool is empty. If that happens, do some other work on some -other console (use keyboard, mouse and disks). Use of gpg encrypted key file -depends on encrypted swap. - - umask 077 - head -c 2880 /dev/random | uuencode -m - | head -n 65 | tail -n 64 \ - | gpg -e -a -r "Superuser" > /root/masterkey-secret1.gpg - -Fill the partition with random looking data. "dd" command may take a while -to execute if partition is large. - - head -c 15 /dev/urandom | uuencode -m - | head -n 2 | tail -n 1 \ - | losetup -p 0 -e AES128 /dev/loop0 /dev/hda666 - dd if=/dev/zero of=/dev/loop0 bs=4k conv=notrunc 2>/dev/null - losetup -d /dev/loop0 - -Use file system keys to setup /dev/loop0 to partition /dev/hda666 and create -encrypted ext2 file system. The "losetup -e" command asks for root's gpg -passphrase to unlock root's secret gpg key. - - losetup -e AES128 -K /root/masterkey-secret1.gpg /dev/loop0 /dev/hda666 - mkfs -t ext2 /dev/loop0 - losetup -d /dev/loop0 - mkdir /secret1 - -Add mount information to /etc/fstab file. Something like this: - - /dev/hda666 /secret1 ext2 defaults,user,noauto,encryption=AES128,loop=/dev/loop0,gpgkey=/etc/userkey-secret1.gpg 0 0 - ^^^^ -You may want to check non-obvious side effects of above "user" mount option. -It's all explained in mount man page. - -Create root-only-readable /etc/userkey-secret1.gpg file which contains file -system key encrypted with each user's public key. List all users as -recipient who should be able to mount /secret1 encrypted partition. Repeat -this every time you want to add or remove users. - - umask 077 - gpg --decrypt < /root/masterkey-secret1.gpg | gpg -e -a --always-trust \ - -r "Superuser" -r "John Doe" -r "Tea Lipton" > /etc/userkey-secret1.gpg - -Users can mount encrypted partition like this. mount asks for gpg passphrase -to unlock user's secret gpg key. Each user can use their own gpg key. - - mount /secret1 - -Root user can check that loop is really in multi-key mode. Losetup -a output -should include string "multi-key" indicating that loop is really in -multi-key mode. If no "multi-key" string shows up, you somehow managed to -mess up gpg key file generation part or you are trying to use old -losetup/mount programs that only understand single-key mode. - - losetup -a - -You can unmount partition like this: - - umount /secret1 - -Root user can fsck unmounted filesystem like this. -F option reads loop -related options from /etc/fstab. Partition name /dev/hda666, -encryption=AES128 and gpgkey=/etc/userkey-secret1.gpg come from /etc/fstab. - - losetup -F /dev/loop0 - fsck -t ext2 -f -y /dev/loop0 - losetup -d /dev/loop0 - - -7.4. Example 4 - Encrypting /tmp partition with random keys -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When mount passphrase hash function is specified as random, mount does not -ask for password but sets up 64 random keys and attempts to put loop to -multi-key mode and creates new file system on that encrypted loop device -before that file system is mounted. - -First, unmount your existing /tmp partition by running "umount /tmp". There -may be open files in there, so you may have to do this from single user -mode. - -Second, add loop= encryption= and phash=random mount options to /etc/fstab -file. The sixth /etc/fstab field (fs_passno) must be zero so that fcsk will -not attempt to check this partition. - - /dev/hda555 /tmp ext2 defaults,loop=/dev/loop2,encryption=AES128,phash=random/1777 0 0 - ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^ -Third, run "mount /tmp" command and you are done. - -Octal digits after phash=random/ mount option specify initial permissions of -file system root directory that gets created on the loop device. 1777 means -read+write+search permissions for all and sticky bit set. Type "man 2 stat" -for more info about what each bit stands for. - -Encryption keys and plaintext data on above type mount vanish on unmount or -power off. Using journaled file system in such case does not make much -sense, because file system is re-created with different encryption keys on -each mount, and file system jounal is never used. - -This example requires that mount program is derived from util-linux patch -found in loop-AES-v2.2d or later version. - - -7.5. Example 5 - Encrypting root partition -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Encrypting root partition requires a small unencrypted /boot partition. -Everything else (root, swap and other partitions) can be encrypted. Kernels -and tools required to boot kernels reside in the /boot partition. Included -build-initrd.sh script builds a small "initrd" ram-disk that works with 2.2 -2.4, and 2.6 kernels. build-initrd.sh script depends on having minix file -system support in the kernel and working mkfs.minix program binary. -Util-linux includes source for mkfs.minix if you don't have it and need to -build it yourself. You need to temporarily boot from rescue floppy/CD-ROM or -other partition to do the actual encrypting work. The rescue floppy/CD-ROM -or other partition kernel doesn't need to support loop crypto, so just about -anything that boots will work. - -1) build-initrd.sh script needs dietlibc. Dietlibc source is available - from: - - http://www.fefe.de/dietlibc/ - ftp://ftp.kernel.org/pub/linux/libs/dietlibc/ - - To compile and install dietlibc, follow instructions in the dietlibc - README file. For example, on a x86 box, do this: - - make - install bin-i386/diet /usr/local/bin - -2) You need to use aespipe program (v2.2a or later) with your rescue - floppy/CD-ROM or other partition. aespipe source is available from: - - http://loop-aes.sourceforge.net/ - http://members.tiscali.fi/ce6c8edf/ (limited downloads) - - Download latest version of aespipe-*.tar.bz2 - - Dynamically linked aespipe program may have library dependency problems - with rescue floppy/CD-ROM or other partition C library. To avoid such - trouble, aespipe program needs to be linked statically. Static linking - with glibc makes aespipe much bigger (hundreds of kilobytes), and may - also create link warning about 'getpwuid'. Big program size and link - warning can be ignored here. - - Compile aespipe program like this: - - CFLAGS="-O2" LDFLAGS="-static -s" ./configure - make - make tests - - Copy statically linked aespipe program to /boot partition. - - cp -p aespipe /boot - -3) If you followed advise about recompiling and statically linking gpg - program, you don't need to do that again. However, if you don't have - statically linked gpg, you need to do that now because later steps in - root partition encryption depend on it. - -4) Backup all important data before proceeding with root partition - encryption. - -5) Recompile your kernel. These are required: CONFIG_BLK_DEV_RAM=y - CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_MINIX_FS=y - CONFIG_PROC_FS=y CONFIG_CRAMFS=n (or CONFIG_CRAMFS=m) - - CONFIG_BLK_DEV_{RAM,INITRD}=y are needed because kernel needs to support - initial ramdisk. CONFIG_MINIX_FS=y is needed because file system on - initrd is minix. CONFIG_CRAMFS=n is needed because cramfs code may - incorrectly detect initrd's compressed minix file system as cramfs file - system. If cramfs must be built-in, then build-initrd.sh must be - configured with USEPIVOT=1, and kernel parameter "rootfstype=minix" must - be added to bootloader configuration file. 2.2.x and older kernels have - neither CONFIG_CRAMFS nor cramfs, so that kernel configuration setting - can be ignored on those kernels. - - All kernel subsystems needed by root and /boot file systems must be - compiled directly into kernel (and not be modules). - - cd /usr/src/linux-2.4.22aa1 - cp .config ../somewhere/somename.config - make distclean - cp ../somewhere/somename.config .config - make config - make dep && make clean && make bzImage - make modules && make modules_install - cat arch/i386/boot/bzImage >/boot/vmlinuz - cp System.map /boot/System.map-2.4.22aa1 - -6) Compile loop-AES loop.o module for your kernel. - - cd ../loop-AES-* - make LINUX_SOURCE=/usr/src/linux-2.4.22aa1 - -7) Copy kernel version specific loop.o (2.4 and older kernels) or loop.ko - (2.6 kernels) to /boot/modules-KERNELRELEASE/ - - mkdir /boot/modules-2.4.22aa1 - ^^^^^^^^^ - cp -p /lib/modules/2.4.22aa1/block/loop.*o /boot/modules-2.4.22aa1/ - ^^^^^^^^^ ^^^^^^^^^ - Note: You need to have a kernel version specific loop.o or loop.ko - module in /boot/modules-KERNELRELEASE/ directory for every kernel you - intend to use. - -8) If your boot scripts automatically run "umount /initrd" and "blockdev - --flushbufs /dev/ram0" commands, you may want to disable those commands. - If you don't disable them, you may see annoying error messages when - booting to encrypted root partition. - - Root partition loop device node is inside initrd, and that device node - will remain busy forever. This means that encrypted root initrd can't be - unmounted and RAM used by initrd file system can't be freed. This - unable-to-unmount side effect is the reason why initrd is intentionally - made as small as possible. - -9) Create 64 random encryption keys and encrypt those keys using gpg. - Reading from /dev/random may take indefinitely long if kernel's random - entropy pool is empty. If that happens, do some other work on some other - console (use keyboard, mouse and disks). Use of gpg encrypted key file - depends on encrypted swap. - - umask 077 - head -c 2880 /dev/random | uuencode -m - | head -n 65 | tail -n 64 \ - | gpg --symmetric -a >/boot/rootkey.gpg - -10) Edit build-initrd.sh to match your setup. Set BOOTDEV, BOOTTYPE, - CRYPTROOT and ROOTTYPE variables to correct values. If you are using 2.2 - or older kernels, set USEPIVOT=0 because 2.2 and older kernels do not - have pivot_root functionality. You may also want to set - LOADNATIONALKEYB=1 and manually copy your uncompressed national keyboard - layout file (in "loadkeys" format) to /boot/default.kmap - - loadkeys configuration files for some popular distros: - - Debian: /etc/console/boottime.kmap.gz - Mandrake: /usr/lib/kbd/keymaps/i386/qwert[yz]/*.kmap.gz - Red Hat: /lib/kbd/keymaps/i386/qwert[yz]/*.kmap.gz - SuSE: /usr/lib/kbd/keymaps/i386/qwert[yz]/*.map.gz - Slackware: /usr/share/kbd/keymaps/i386/qwert[yz]/*.map.gz - - Or alternatively, you can create keyboard map using your current - keyboard layout. Like this: - - dumpkeys >/boot/default.kmap - - devfs enabled kernel users (CONFIG_DEVFS_FS=y and CONFIG_DEVFS_MOUNT=y - in kernel configuration) need to pay special attention to comments above - these build-initrd.sh options: USEDEVFS, BOOTDEV, CRYPTROOT and - EXTERNALGPGDEV. - -11) Edit /etc/lilo.conf (or whatever) and set root= initrd= and append= as - explained in comments at beginning of build-initrd.sh script. - -12) Build a new /boot/initrd.gz - - ./build-initrd.sh - - Note: /boot/initrd.gz is supposed to be small (2 KB to 3 KB). All other - utilities (loop.o module, insmod, losetup, loadkeys and possibly - libraries) are copied to /boot directory. Libraries are not copied if - programs are statically linked. - -13) Run lilo (or whatever) - - lilo - -14) Reboot your computer from rescue floppy/CD-ROM or other partition, so - that the partition you are about to encrypt is *not* mounted. - -15) Now you should be running a shell from rescue floppy/CD-ROM or other - partition. This example assumes that /dev/hda1 is your /boot partition - and /dev/hda2 is your root partition. Temporarily mount your root - partition under /mnt - - mount -t ext2 /dev/hda2 /mnt - -16) Edit root partition entry in /mnt/etc/fstab file. Replace old /dev/hda2 - with /dev/loop5 or whatever loop you are using for root partition. Loop - device number must match ROOTLOOPINDEX= in build-initrd.sh - configuration. The default in build-initrd.sh is 5, meaning /dev/loop5. - - Old /etc/fstab line: - /dev/hda2 / ext2 defaults 0 1 - New /etc/fstab line: - /dev/loop5 / ext2 defaults 0 1 - - devfs enabled kernel users (CONFIG_DEVFS_FS=y and CONFIG_DEVFS_MOUNT=y - in kernel configuration) need to substitute /dev/loop5 with /dev/loop/5 - -17) Unmount your root partition (and sync for extra safety). - - umount /mnt - sync - -18) Mount your normal /boot partition under /mnt so that you can use - previously built statically linked aespipe and gpg programs and read gpg - encrypted key file 'rootkey.gpg'. Statically linked gpg program was - copied there by build-initrd.sh script. - - mount -r -t ext2 /dev/hda1 /mnt - -19) Use dd program to read your root partition contents, pipe that data - through aespipe program, and finally write encrypted data back to same - partition with another dd program. This is going to take a while if - partition is large. - - dd if=/dev/hda2 bs=64k \ - | /mnt/aespipe -e AES128 -K /mnt/rootkey.gpg -G / \ - | dd of=/dev/hda2 bs=64k conv=notrunc - - aespipe program tries to run gpg from obvious locations on your rescue - floppy/CD-ROM file system, but if it can't find gpg from those obvious - locations, aespipe finally tries to run gpg from same directory that - aespipe was run from (/mnt/) and should find statically linked gpg - program there. - -20) Clean up and reboot your computer. - - umount /mnt - sync - reboot - -If you are upgrading kernel of a system where root partition is already -encrypted, only steps 5 to 7 and 13 are needed. /boot/initrd.gz is kernel -independent and there is no need to re-create it for each kernel. However, -if you are upgrading from 2.4 kernel to 2.6 kernel, new insmod may need to -be copied to /boot directory by running step 12 before running step 13. - -If you want to fsck and mount partitions automatically and are indeed -encrypting root partition, it may be easier to just losetup required -partitions early in init scripts (before partitions are fsck'ed and -mounted). Don't losetup root partition again, as root partition has already -been losetup'ed by /linuxrc program in the "initrd" ram-disk. - -Init scripts reside on root partition and encryption keys within such init -scripts are protected by root partition encryption. Of course, init scripts -containing sensitive keys must be readable only by root user: - - -rwx------ 1 root root 162 Nov 24 19:23 /etc/rcS.d/S07losetup.sh - -Here is an example of /etc/rcS.d/S07losetup.sh Debian init script. Other -distros may store such init scripts in different directory under different -name. On SuSE, /etc/init.d/boot.d/S01losetup.sh may be more appropriate. - -#!/bin/sh -echo "Pd1eXapMJk0XAJnNSIzE" | losetup -p 0 -e AES128 -K /etc/swapkey.gpg /dev/loop6 /dev/hda666 -echo "D0aZNSNnu6FdAph+zrHt" | losetup -p 0 -e AES128 -K /etc/homekey.gpg /dev/loop4 /dev/hdd666 - -Above partitions use gpg encrypted key files. Having encrypted files on -encrypted partition may seem little bit silly, but currently -K option is -the easiest way to activate multi-key mode with more secure MD5 IV -computation. - -Here are example lines of /etc/fstab file. It's not necessary to give -"loop=/dev/loop4,encryption=AES128" mount options as loop devices are -already losetup'ed and there is no need for mount program to do that again. - - /dev/loop5 / ext2 defaults 0 1 - /dev/loop6 none swap sw 0 0 - /dev/loop4 /home ext2 defaults 0 2 - -In above example, device /dev/hda666 is used as encrypted swap with fixed -key. If you set up swap with fixed key like in above example, don't forget -to initialize swap space by running "mkswap /dev/loop6" once. /dev/hdd666 is -used as encrypted /home partition. /dev/loop5 is encrypted root partition, -and it set up by /linuxrc program in "initrd" ram-disk. - - -7.6. Example 6 - Boot from CD-ROM + encrypted root partition -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Here is slight variation of above 'encrypting root partition' instructions. -Computer gets booted from read-only CD-ROM and there is no need for any -unencrypted partitions on the hard disk. - -1-6) Same as above 'encrypting root partition' steps 1-6. - -7) Copy kernel version specific loop.o or loop.ko module to CD-ROM source - directory - - rm -r -f /boot/iso/modules-* - mkdir -p /boot/iso/modules-2.4.22aa1 - ^^^^^^^^^ - cp -p /lib/modules/2.4.22aa1/block/loop.*o /boot/iso/modules-2.4.22aa1/ - ^^^^^^^^^ ^^^^^^^^^ -8-9) Same as above 'encrypting root partition' steps 8-9, with exception - that in step 9 you must write rootkey.gpg to /boot/iso directory instead - of /boot directory. - -10a) Contents of /boot/initrd.conf configuration file are below. - - BOOTDEV=/dev/hdc # CD-ROM device - BOOTTYPE=iso9660 - CRYPTROOT=/dev/hda2 - ROOTTYPE=ext2 - CIPHERTYPE=AES128 - DESTINATIONPREFIX=/boot/iso - INITRDGZNAME=../initrd.gz - LOADNATIONALKEYB=1 - - devfs enabled kernel users (CONFIG_DEVFS_FS=y and CONFIG_DEVFS_MOUNT=y - in kernel configuration) need to pay special attention to comments above - these build-initrd.sh options: USEDEVFS, BOOTDEV, CRYPTROOT and - EXTERNALGPGDEV. - -10b) Copy your national keyboard layout to CD-ROM source directory in - uncompressed form. - - dumpkeys >/boot/iso/default.kmap - -11) Contents of /etc/lilo.conf configuration file are below. Two copies of - '/dev/loop7' on first two lines refer to temporary file backed loop - mount that is mounted on /mnt later in step 13a. - - boot=/dev/loop7 - disk=/dev/loop7 - bios=0x00 - sectors=36 - heads=2 - cylinders=80 - geometric - compact - read-only - prompt - timeout=30 - vga=normal - backup=/dev/null - install=text - map=/mnt/map - image=/mnt/vmlinuz - label=Linux - append="init=/linuxrc rootfstype=minix" - initrd=/mnt/initrd.gz - root=/dev/ram0 - -12) Build new /boot/initrd.gz - - ./build-initrd.sh /boot/initrd.conf - -13a) Build and mount minix file system on floppy image - - dd if=/dev/zero of=/boot/iso/fdimage.bin bs=1024 count=2880 - mkfs -t minix -i 32 /boot/iso/fdimage.bin 2880 - mount -t minix /boot/iso/fdimage.bin /mnt -o loop=/dev/loop7 - -13b) Copy kernel and initrd.gz to floppy image - - cp -p /boot/vmlinuz /mnt/vmlinuz - cp -p /boot/initrd.gz /mnt/initrd.gz - -13c) Run lilo and unmount floppy image - - lilo - umount /mnt - sync - -13d) Create boot CD-ROM image - - mkisofs -r -b fdimage.bin /boot/iso >/boot/bootcdimage.iso - -13e) Burn /boot/bootcdimage.iso to CD-R. Resulting CD-ROM is your boot - CD-ROM that you use to boot to encrypted root, not the rescue CD-ROM - referred to in above 'encrypting root partition' step 14. - - You may want to burn two copies or at least archive bootcdimage.iso to - some unencrypted partition so that you can burn new copy if original - CD-ROM gets damaged. - -13f) Temporarily disable swap partitions and put a "temporary file system on - swap" into one of swap partitions. This example assumes that /dev/hda3 - is such swap partition. The 'dd' command clears first 64KB of that - partition so that dangerously buggy rescue floppies/CD-ROMs don't enable - swap on it. - - swapoff -a - dd if=/dev/zero of=/dev/hda3 bs=64k count=1 conv=notrunc - mkfs -t ext2 /dev/hda3 - mount -t ext2 /dev/hda3 /mnt - -13g) Copy statically linked aespipe and gpg programs and rootkey.gpg file to - "temporary file system on swap" partition. - - cp -p /boot/aespipe /boot/iso/rootkey.gpg /usr/bin/gpg /mnt - umount /mnt - -14-19) Same as above 'encrypting root partition' steps 14-19, with exception - that in step 18 you must rw mount (no -r option to mount) "temporary - file system on swap" /dev/hda3 instead of /boot partition. - -20) Clean up and reboot your computer. The 'dd' command attempts to - overwrite gpg encrypted root partition key file and 'mkswap' command - restores "temporary file system on swap" /dev/hda3 back to swap usage. - - dd if=/dev/zero of=/mnt/rootkey.gpg bs=64k count=1 conv=notrunc - umount /mnt - sync - mkswap /dev/hda3 - sync - reboot - -If you are upgrading kernel of a system where root partition is already -encrypted, only steps 5 to 7 and 13a to 13e are needed. However, if you are -upgrading from 2.4 kernel to 2.6 kernel, new insmod may need to be copied to -/boot/iso directory by running step 12 before running step 13a. - - -8. Security levels -~~~~~~~~~~~~~~~~~~ -Loop encryption key can be set up in different ways. Just in case it isn't -obvious how these different ways rank security wise, here is a list of -security levels from 1 (highest security) to 4 (lowest security). - -1) gpg encrypted 'multi-key' key file and/or gpg public+private keys are - stored on separate removable USB dongle that is not available to - attacker. If USB dongle and its key files are available to attacker, - security level is equivalent to level 2. (Example 2) - -2) gpg encrypted 'multi-key' key file and gpg public+private keys are - stored on disk that is available to attacker. This assumes that included - gpg patch is applied to gpg and symmetric cipher encrypted key file or - private keyring password was created/changed with patched version. - (Example 3) - -3) Loop is used in single-key mode. Random password seed and iteration - count are used to slow down optimized dictionary attacks. This level is - vulnerable to watermark attacks. Watermarked files contain special bit - patterns that can be detected without decryption. - -4) Loop is used in single-key mode. Neither password seed nor gpg encrypted - key file are used. This level is vulnerable to optimized dictionary - attacks as well as watermark attacks. (mainline linux cryptoloop is - example of this type of backdoored crypto) - - -9. Performance tuning for 2.4 and newer kernels -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Loop-AES driver for 2.4 and newer kernels understand two additional options: -lo_prealloc and lo_nice. First number of 'lo_prealloc' is the default number -of RAM pages to pre-allocate for each device backed (partition backed) loop. -Every configured device backed loop pre-allocates this amount of RAM pages -unless later 'lo_prealloc' numbers provide an override. 'lo_prealloc' -overrides are defined in pairs: loop_index,number_of_pages. If 'lo_prealloc' -is undefined, all pre-allocations default to 125 pages. A maximum of four -overrides (four number pairs) can be used. - -This example line added to your /etc/modules.conf file means that each -device backed loop device pre-allocates 100 pages of RAM at losetup/mount -time, except that /dev/loop6 allocates 200 pages, and /dev/loop5 allocates -250 pages. - - options loop lo_prealloc=100,6,200,5,250 - -On x86 systems page size is 4 Kbytes, some other architectures have 8 Kbyte -page size. - -lo_nice option sets scheduler nice for loop helper threads. Values between 0 -(low priority) to -20 (high priority) can be used. If loop transfers are -disk transfer rate limited, lowering loop thread priority may improve -performance. If loop transfers are CPU processing power limited, increasing -loop thread priority may improve performance. renice(8) command can be used -to alter nice values of loop helper threads while loop is being used. -Example /etc/modules.conf line: - - options loop lo_nice=-4 - -If lo_nice is not set, default nice value for kernels with old scheduler is --20. For kernels with O(1) scheduler, default nice value is -1. - -2.6 kernels include anticipatory (the default) and deadline I/O schedulers. -Deadline I/O scheduler may improve performance of device backed loop -devices. Please read kernel's Documentation/as-iosched.txt file for more -information. - - -10. Files -~~~~~~~~~ -ChangeLog History of changes and public releases. - -Makefile Makefile to build and install loop.o module. - -README This README file. - -aes-GPL.diff A patch for aes-amd64.S and aes-x86.S files that - updates licenses to be fully GPL compatible. - aes-amd64.S and aes-x86.S files are derived from - Brian Gladman's December 2001 published version - that had no mention of GPL, but both Brian - Gladman and Jari Ruusu permit this license - change. - -aes-amd64.S Optimized assembler implementation of AES cipher - for AMD64 and compatible processors. - -aes-x86.S Optimized assembler implementation of AES cipher - for x86 processors. - -aes.[ch] AES encryption functions, portable and usable in - kernel and in user space, as well as in other - operating systems. - -build-initrd.sh Bash shell script to build a small initrd - ram-disk that can be used when root partition is - encrypted. - -dkms.conf Configuration file for Dynamic Kernel Module - Support. http://linux.dell.com/dkms/dkms.html - for more info. This dkms.conf can't be used to - compile loop module with partial kernel sources - that some distros provide. Build procedure - depends on presence of full kernel sources, and - using partial kernel source to build loop module - will guarantee miscompiled loop module. - -glue.c Glue logic between loop driver and encryption - functions in aes.c / aes-*.S and md5.c / md5-*.S - -gnupg-*.diff Optional patch for gpg that increases password - iteration and thus slows down dictionary attacks - against gpg encrypted key files. - -gpgkey[12].asc gpg encrypted key files that are used by - Makefile when "make tests" command is run. These - key files are encrypted with symmetric cipher - using 12345678901234567890 password. - -kernel-2.[46].*.diff Kernel patch for those people who prefer not to - use modules. Before this patch can be applied to - your kernel, drivers/block/loop.c and - include/linux/loop.h source files must be - removed using 'rm' command. Obviously applying - this patch changes your kernel sources, so this - is not entirely hassle free. This patch is - against recent mainline kernel. If this patch - doesn't apply cleanly to your kernel, I don't - want to know about it. Note: you only need to - build loop.o module or apply this patch but not - both. - -loop.c-2.[02].diff Kernel version specific patches that fix bugs - and preregisters AES cipher transfer to latest - loop.c source. - -loop.c-2.[02].original Unmodified loop.c sources that are used as - secondary source if patch does not apply cleanly - to primary source. Primary source is the loop.c - of your kernel. - -loop.c-2.[46].patched Pre-patched loop.c sources for kernels where - changes are so extensive that distributing - *.original plus *.diff does not make sense. - -md5-amd64.S Optimized assembler implementation of MD5 - transform function for AMD64 and compatible - processors. - -md5-x86.S Optimized assembler implementation of MD5 - transform function for x86 processors. - -md5.[ch] MD5 transform function implementation that is - used to compute IVs. This source code was copied - from Linux kernel CryptoAPI implementation. - -util-linux-2.12*.diff Util-linux patch that adds support for AES and - other ciphers. - - -11. Credits -~~~~~~~~~~~ -This package uses AES cipher sources that were originally written by -Dr Brian Gladman: - -// Copyright (c) 2001, Dr Brian Gladman , Worcester, UK. -// All rights reserved. -// -// TERMS -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted subject to the following conditions: -// -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. The copyright holder's name must not be used to endorse or promote -// any products derived from this software without his specific prior -// written permission. -// -// This software is provided 'as is' with no express or implied warranties -// of correctness or fitness for purpose. - -Util-linux patch has few lines of documentation copied from international -crypto patch: -p option documentation in losetup and mount man pages were -written by Marc Mutz. - -Util-linux patch includes rmd160.[ch] files that were copied from -international crypto patch: they were originally written by GnuPG team and -modified by Marc Mutz. diff --git a/README.loop-AES-v2.2d.SuSE b/README.loop-AES-v2.2d.SuSE deleted file mode 100644 index 9ba6775..0000000 --- a/README.loop-AES-v2.2d.SuSE +++ /dev/null @@ -1,11 +0,0 @@ -loop-AES patch in util-linux -============================ - -To enhance the feature of mount, umount, losetup, swapon and swapoff we have -included the patch to util-linux from Jari Ruusu's loop-AES package -(http://loop-aes.sourceforge.net/). More details about this patch can be found -in /usr/share/doc/packages/util-linux/README.loop-AES-* -Please note, that we have only used the patch to util-linux and not the ones -for gpg or the new kernel loop driver. - -Your SuSE team diff --git a/etc_filesystems b/etc_filesystems new file mode 100644 index 0000000..a0d3c30 --- /dev/null +++ b/etc_filesystems @@ -0,0 +1,5 @@ +vfat +hfs +minix +reiserfs +* diff --git a/guessfstype.8 b/guessfstype.8 deleted file mode 100644 index 35bf2fd..0000000 --- a/guessfstype.8 +++ /dev/null @@ -1,13 +0,0 @@ -.\" Michal Svec -.TH GUESSFSTYPE 8 "25 January 2002" "Linux 2.4" "Linux Programmer's Manual" -.SH NAME -guessfstype \- guess the device file system type -.SH SYNOPSIS -.BI guessfstype " device" -.SH DESCRIPTION -.B guessfstype -guess the device file system type from the device super block -.SH "SEE ALSO" -.BR mount (8) -.SH AUTHOR -Michal Svec diff --git a/guessfstype2.patch b/guessfstype2.patch deleted file mode 100644 index 24c4593..0000000 --- a/guessfstype2.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- util-linux-2.12q/mount/guessfstype.c -+++ util-linux-2.12q/mount/guessfstype.c -@@ -0,0 +1,22 @@ -+#include -+#include "mount_guess_fstype.h" -+ -+int verbose = 0; -+int mount_quiet=0; -+int sloppy = 0; -+ -+char *progname; -+ -+int main(int argc, char *argv[]) { -+ char *device, *type; -+ -+ if(argc != 2) return 1; -+ -+ progname = argv[0]; -+ device = argv[1]; -+ -+ type = do_guess_fstype(device); -+ printf("%s *appears* to be: %s\n", device, type); -+ -+ return 0; -+} ---- util-linux-2.12q/mount/Makefile -+++ util-linux-2.12q/mount/Makefile -@@ -11,7 +11,7 @@ - LINK = $(CC) $(LDFLAGS) - - SUID_PROGS = mount umount --NOSUID_PROGS = swapon losetup -+NOSUID_PROGS = swapon losetup guessfstype - MAN5 = fstab.5 nfs.5 - MAN8 = mount.8 swapoff.8 swapon.8 umount.8 losetup.8 - -@@ -57,6 +57,11 @@ - version.o $(LIB)/env.o loumount.o - $(LINK) $^ -o $@ $(BLKID_LIB) - -+guessfstype: guessfstype.o mount_guess_fstype.o sundries.o realpath.o \ -+ fstab.o mntent.o get_label_uuid.o mount_blkid.o mount_by_label.o \ -+ xmalloc.o -+ $(LINK) $^ -o $@ -+ - swapon: swapon.o version.o xmalloc.o \ - get_label_uuid.o mount_by_label.o mount_blkid.o loop.o sha512.o $(LIB)/xstrncpy.o - $(LINK) $^ -o $@ $(BLKID_LIB) diff --git a/loop-AES-v3.0a-util-linux-2.12p.diff b/loop-AES-v3.0a-util-linux-2.12p.diff deleted file mode 100644 index 6301224..0000000 --- a/loop-AES-v3.0a-util-linux-2.12p.diff +++ /dev/null @@ -1,4345 +0,0 @@ -If this patch does not apply cleanly to newer version of util-linux, try -replacing original lomount.c lomount.h loop.h losetup.8 files in mount -subdirectory with versions from util-linux that the patch is for. And then -apply this patch. - -================================================================================ ---- util-linux-2.12q/mount/aes.c -+++ util-linux-2.12q/mount/aes.c -@@ -0,0 +1,299 @@ -+// I retain copyright in this code but I encourage its free use provided -+// that I don't carry any responsibility for the results. I am especially -+// happy to see it used in free and open source software. If you do use -+// it I would appreciate an acknowledgement of its origin in the code or -+// the product that results and I would also appreciate knowing a little -+// about the use to which it is being put. I am grateful to Frank Yellin -+// for some ideas that are used in this implementation. -+// -+// Dr B. R. Gladman 6th April 2001. -+// -+// This is an implementation of the AES encryption algorithm (Rijndael) -+// designed by Joan Daemen and Vincent Rijmen. This version is designed -+// to provide both fixed and dynamic block and key lengths and can also -+// run with either big or little endian internal byte order (see aes.h). -+// It inputs block and key lengths in bytes with the legal values being -+// 16, 24 and 32. -+ -+/* -+ * Modified by Jari Ruusu, May 1 2001 -+ * - Fixed some compile warnings, code was ok but gcc warned anyway. -+ * - Changed basic types: byte -> unsigned char, word -> u_int32_t -+ * - Major name space cleanup: Names visible to outside now begin -+ * with "aes_" or "AES_". A lot of stuff moved from aes.h to aes.c -+ * - Removed C++ and DLL support as part of name space cleanup. -+ * - Eliminated unnecessary recomputation of tables. (actual bug fix) -+ * - Merged precomputed constant tables to aes.c file. -+ * - Removed data alignment restrictions for portability reasons. -+ * - Made block and key lengths accept bit count (128/192/256) -+ * as well byte count (16/24/32). -+ * - Removed all error checks. This change also eliminated the need -+ * to preinitialize the context struct to zero. -+ * - Removed some totally unused constants. -+ */ -+ -+/* -+ * Modified by Jari Ruusu, June 9 2003 -+ * - Removed all code not necessary for small size -+ * optimized encryption using 256 bit keys. -+ */ -+ -+#include "aes.h" -+ -+#if AES_BLOCK_SIZE != 16 -+#error an illegal block size has been specified -+#endif -+ -+// upr(x,n): rotates bytes within words by n positions, moving bytes -+// to higher index positions with wrap around into low positions -+// bval(x,n): extracts a byte from a word -+ -+#define upr(x,n) (((x) << 8 * (n)) | ((x) >> (32 - 8 * (n)))) -+#define bval(x,n) ((unsigned char)((x) >> 8 * (n))) -+#define bytes2word(b0, b1, b2, b3) \ -+ ((u_int32_t)(b3) << 24 | (u_int32_t)(b2) << 16 | (u_int32_t)(b1) << 8 | (b0)) -+ -+#if defined(i386) || defined(_I386) || defined(__i386__) || defined(__i386) -+/* little endian processor without data alignment restrictions */ -+#define word_in(x) *(u_int32_t*)(x) -+#define word_out(x,v) *(u_int32_t*)(x) = (v) -+#else -+/* slower but generic big endian or with data alignment restrictions */ -+#define word_in(x) ((u_int32_t)(((unsigned char *)(x))[0])|((u_int32_t)(((unsigned char *)(x))[1])<<8)|((u_int32_t)(((unsigned char *)(x))[2])<<16)|((u_int32_t)(((unsigned char *)(x))[3])<<24)) -+#define word_out(x,v) ((unsigned char *)(x))[0]=(v),((unsigned char *)(x))[1]=((v)>>8),((unsigned char *)(x))[2]=((v)>>16),((unsigned char *)(x))[3]=((v)>>24) -+#endif -+ -+// the finite field modular polynomial and elements -+ -+#define ff_poly 0x011b -+#define ff_hi 0x80 -+ -+static int tab_gen = 0; -+static unsigned char s_box[256]; // the S box -+static u_int32_t rcon_tab[AES_RC_LENGTH]; // table of round constants -+static u_int32_t ft_tab[4][256]; -+static u_int32_t fl_tab[4][256]; -+ -+// Generate the tables for the dynamic table option -+ -+// It will generally be sensible to use tables to compute finite -+// field multiplies and inverses but where memory is scarse this -+// code might sometimes be better. -+ -+// return 2 ^ (n - 1) where n is the bit number of the highest bit -+// set in x with x in the range 1 < x < 0x00000200. This form is -+// used so that locals within FFinv can be bytes rather than words -+ -+static unsigned char hibit(const u_int32_t x) -+{ unsigned char r = (unsigned char)((x >> 1) | (x >> 2)); -+ -+ r |= (r >> 2); -+ r |= (r >> 4); -+ return (r + 1) >> 1; -+} -+ -+// return the inverse of the finite field element x -+ -+static unsigned char FFinv(const unsigned char x) -+{ unsigned char p1 = x, p2 = 0x1b, n1 = hibit(x), n2 = 0x80, v1 = 1, v2 = 0; -+ -+ if(x < 2) return x; -+ -+ for(;;) -+ { -+ if(!n1) return v1; -+ -+ while(n2 >= n1) -+ { -+ n2 /= n1; p2 ^= p1 * n2; v2 ^= v1 * n2; n2 = hibit(p2); -+ } -+ -+ if(!n2) return v2; -+ -+ while(n1 >= n2) -+ { -+ n1 /= n2; p1 ^= p2 * n1; v1 ^= v2 * n1; n1 = hibit(p1); -+ } -+ } -+} -+ -+// define the finite field multiplies required for Rijndael -+ -+#define FFmul02(x) ((((x) & 0x7f) << 1) ^ ((x) & 0x80 ? 0x1b : 0)) -+#define FFmul03(x) ((x) ^ FFmul02(x)) -+ -+// The forward and inverse affine transformations used in the S-box -+ -+#define fwd_affine(x) \ -+ (w = (u_int32_t)x, w ^= (w<<1)^(w<<2)^(w<<3)^(w<<4), 0x63^(unsigned char)(w^(w>>8))) -+ -+static void gen_tabs(void) -+{ u_int32_t i, w; -+ -+ for(i = 0, w = 1; i < AES_RC_LENGTH; ++i) -+ { -+ rcon_tab[i] = bytes2word(w, 0, 0, 0); -+ w = (w << 1) ^ (w & ff_hi ? ff_poly : 0); -+ } -+ -+ for(i = 0; i < 256; ++i) -+ { unsigned char b; -+ -+ s_box[i] = b = fwd_affine(FFinv((unsigned char)i)); -+ -+ w = bytes2word(b, 0, 0, 0); -+ fl_tab[0][i] = w; -+ fl_tab[1][i] = upr(w,1); -+ fl_tab[2][i] = upr(w,2); -+ fl_tab[3][i] = upr(w,3); -+ w = bytes2word(FFmul02(b), b, b, FFmul03(b)); -+ ft_tab[0][i] = w; -+ ft_tab[1][i] = upr(w,1); -+ ft_tab[2][i] = upr(w,2); -+ ft_tab[3][i] = upr(w,3); -+ } -+} -+ -+#define four_tables(x,tab,vf,rf,c) \ -+ ( tab[0][bval(vf(x,0,c),rf(0,c))] \ -+ ^ tab[1][bval(vf(x,1,c),rf(1,c))] \ -+ ^ tab[2][bval(vf(x,2,c),rf(2,c))] \ -+ ^ tab[3][bval(vf(x,3,c),rf(3,c))]) -+ -+#define vf1(x,r,c) (x) -+#define rf1(r,c) (r) -+#define rf2(r,c) ((r-c)&3) -+ -+#define ls_box(x,c) four_tables(x,fl_tab,vf1,rf2,c) -+ -+#define nc (AES_BLOCK_SIZE / 4) -+ -+// Initialise the key schedule from the user supplied key. -+// The key length is now specified in bytes, 32. -+// This corresponds to bit length of 256 bits, and -+// to Nk value of 8 respectively. -+ -+void aes_set_key(aes_context *cx, const unsigned char in_key[], int n_bytes, const int f) -+{ u_int32_t *kf, *kt, rci; -+ -+ if(!tab_gen) { gen_tabs(); tab_gen = 1; } -+ -+ cx->aes_Nkey = 8; -+ cx->aes_Nrnd = (cx->aes_Nkey > nc ? cx->aes_Nkey : nc) + 6; -+ -+ cx->aes_e_key[0] = word_in(in_key ); -+ cx->aes_e_key[1] = word_in(in_key + 4); -+ cx->aes_e_key[2] = word_in(in_key + 8); -+ cx->aes_e_key[3] = word_in(in_key + 12); -+ -+ kf = cx->aes_e_key; -+ kt = kf + nc * (cx->aes_Nrnd + 1) - cx->aes_Nkey; -+ rci = 0; -+ -+ switch(cx->aes_Nkey) -+ { -+ case 8: cx->aes_e_key[4] = word_in(in_key + 16); -+ cx->aes_e_key[5] = word_in(in_key + 20); -+ cx->aes_e_key[6] = word_in(in_key + 24); -+ cx->aes_e_key[7] = word_in(in_key + 28); -+ do -+ { kf[ 8] = kf[0] ^ ls_box(kf[7],3) ^ rcon_tab[rci++]; -+ kf[ 9] = kf[1] ^ kf[ 8]; -+ kf[10] = kf[2] ^ kf[ 9]; -+ kf[11] = kf[3] ^ kf[10]; -+ kf[12] = kf[4] ^ ls_box(kf[11],0); -+ kf[13] = kf[5] ^ kf[12]; -+ kf[14] = kf[6] ^ kf[13]; -+ kf[15] = kf[7] ^ kf[14]; -+ kf += 8; -+ } -+ while (kf < kt); -+ break; -+ } -+} -+ -+// y = output word, x = input word, r = row, c = column -+// for r = 0, 1, 2 and 3 = column accessed for row r -+ -+#define s(x,c) x[c] -+ -+// I am grateful to Frank Yellin for the following constructions -+// which, given the column (c) of the output state variable that -+// is being computed, return the input state variables which are -+// needed for each row (r) of the state -+ -+// For the fixed block size options, compilers reduce these two -+// expressions to fixed variable references. For variable block -+// size code conditional clauses will sometimes be returned -+ -+#define fwd_var(x,r,c) \ -+ ( r==0 ? \ -+ ( c==0 ? s(x,0) \ -+ : c==1 ? s(x,1) \ -+ : c==2 ? s(x,2) \ -+ : c==3 ? s(x,3) \ -+ : c==4 ? s(x,4) \ -+ : c==5 ? s(x,5) \ -+ : c==6 ? s(x,6) \ -+ : s(x,7)) \ -+ : r==1 ? \ -+ ( c==0 ? s(x,1) \ -+ : c==1 ? s(x,2) \ -+ : c==2 ? s(x,3) \ -+ : c==3 ? nc==4 ? s(x,0) : s(x,4) \ -+ : c==4 ? s(x,5) \ -+ : c==5 ? nc==8 ? s(x,6) : s(x,0) \ -+ : c==6 ? s(x,7) \ -+ : s(x,0)) \ -+ : r==2 ? \ -+ ( c==0 ? nc==8 ? s(x,3) : s(x,2) \ -+ : c==1 ? nc==8 ? s(x,4) : s(x,3) \ -+ : c==2 ? nc==4 ? s(x,0) : nc==8 ? s(x,5) : s(x,4) \ -+ : c==3 ? nc==4 ? s(x,1) : nc==8 ? s(x,6) : s(x,5) \ -+ : c==4 ? nc==8 ? s(x,7) : s(x,0) \ -+ : c==5 ? nc==8 ? s(x,0) : s(x,1) \ -+ : c==6 ? s(x,1) \ -+ : s(x,2)) \ -+ : \ -+ ( c==0 ? nc==8 ? s(x,4) : s(x,3) \ -+ : c==1 ? nc==4 ? s(x,0) : nc==8 ? s(x,5) : s(x,4) \ -+ : c==2 ? nc==4 ? s(x,1) : nc==8 ? s(x,6) : s(x,5) \ -+ : c==3 ? nc==4 ? s(x,2) : nc==8 ? s(x,7) : s(x,0) \ -+ : c==4 ? nc==8 ? s(x,0) : s(x,1) \ -+ : c==5 ? nc==8 ? s(x,1) : s(x,2) \ -+ : c==6 ? s(x,2) \ -+ : s(x,3))) -+ -+#define si(y,x,k,c) s(y,c) = word_in(x + 4 * c) ^ k[c] -+#define so(y,x,c) word_out(y + 4 * c, s(x,c)) -+ -+#define fwd_rnd(y,x,k,c) s(y,c)= (k)[c] ^ four_tables(x,ft_tab,fwd_var,rf1,c) -+#define fwd_lrnd(y,x,k,c) s(y,c)= (k)[c] ^ four_tables(x,fl_tab,fwd_var,rf1,c) -+ -+#define locals(y,x) x[4],y[4] -+ -+#define l_copy(y, x) s(y,0) = s(x,0); s(y,1) = s(x,1); \ -+ s(y,2) = s(x,2); s(y,3) = s(x,3); -+#define state_in(y,x,k) si(y,x,k,0); si(y,x,k,1); si(y,x,k,2); si(y,x,k,3) -+#define state_out(y,x) so(y,x,0); so(y,x,1); so(y,x,2); so(y,x,3) -+#define round(rm,y,x,k) rm(y,x,k,0); rm(y,x,k,1); rm(y,x,k,2); rm(y,x,k,3) -+ -+void aes_encrypt(const aes_context *cx, const unsigned char in_blk[], unsigned char out_blk[]) -+{ u_int32_t locals(b0, b1); -+ const u_int32_t *kp = cx->aes_e_key; -+ -+ state_in(b0, in_blk, kp); kp += nc; -+ -+ { u_int32_t rnd; -+ -+ for(rnd = 0; rnd < cx->aes_Nrnd - 1; ++rnd) -+ { -+ round(fwd_rnd, b1, b0, kp); -+ l_copy(b0, b1); kp += nc; -+ } -+ -+ round(fwd_lrnd, b0, b1, kp); -+ } -+ -+ state_out(out_blk, b0); -+} ---- util-linux-2.12q/mount/aes.h -+++ util-linux-2.12q/mount/aes.h -@@ -0,0 +1,97 @@ -+// I retain copyright in this code but I encourage its free use provided -+// that I don't carry any responsibility for the results. I am especially -+// happy to see it used in free and open source software. If you do use -+// it I would appreciate an acknowledgement of its origin in the code or -+// the product that results and I would also appreciate knowing a little -+// about the use to which it is being put. I am grateful to Frank Yellin -+// for some ideas that are used in this implementation. -+// -+// Dr B. R. Gladman 6th April 2001. -+// -+// This is an implementation of the AES encryption algorithm (Rijndael) -+// designed by Joan Daemen and Vincent Rijmen. This version is designed -+// to provide both fixed and dynamic block and key lengths and can also -+// run with either big or little endian internal byte order (see aes.h). -+// It inputs block and key lengths in bytes with the legal values being -+// 16, 24 and 32. -+ -+/* -+ * Modified by Jari Ruusu, May 1 2001 -+ * - Fixed some compile warnings, code was ok but gcc warned anyway. -+ * - Changed basic types: byte -> unsigned char, word -> u_int32_t -+ * - Major name space cleanup: Names visible to outside now begin -+ * with "aes_" or "AES_". A lot of stuff moved from aes.h to aes.c -+ * - Removed C++ and DLL support as part of name space cleanup. -+ * - Eliminated unnecessary recomputation of tables. (actual bug fix) -+ * - Merged precomputed constant tables to aes.c file. -+ * - Removed data alignment restrictions for portability reasons. -+ * - Made block and key lengths accept bit count (128/192/256) -+ * as well byte count (16/24/32). -+ * - Removed all error checks. This change also eliminated the need -+ * to preinitialize the context struct to zero. -+ * - Removed some totally unused constants. -+ */ -+ -+#ifndef _AES_H -+#define _AES_H -+ -+#if defined(__linux__) && defined(__KERNEL__) -+# include -+#else -+# include -+#endif -+ -+// CONFIGURATION OPTIONS (see also aes.c) -+// -+// Define AES_BLOCK_SIZE to set the cipher block size (16, 24 or 32) or -+// leave this undefined for dynamically variable block size (this will -+// result in much slower code). -+// IMPORTANT NOTE: AES_BLOCK_SIZE is in BYTES (16, 24, 32 or undefined). If -+// left undefined a slower version providing variable block length is compiled -+ -+#define AES_BLOCK_SIZE 16 -+ -+// The number of key schedule words for different block and key lengths -+// allowing for method of computation which requires the length to be a -+// multiple of the key length -+// -+// Nk = 4 6 8 -+// ------------- -+// Nb = 4 | 60 60 64 -+// 6 | 96 90 96 -+// 8 | 120 120 120 -+ -+#if !defined(AES_BLOCK_SIZE) || (AES_BLOCK_SIZE == 32) -+#define AES_KS_LENGTH 120 -+#define AES_RC_LENGTH 29 -+#else -+#define AES_KS_LENGTH 4 * AES_BLOCK_SIZE -+#define AES_RC_LENGTH (9 * AES_BLOCK_SIZE) / 8 - 8 -+#endif -+ -+typedef struct -+{ -+ u_int32_t aes_Nkey; // the number of words in the key input block -+ u_int32_t aes_Nrnd; // the number of cipher rounds -+ u_int32_t aes_e_key[AES_KS_LENGTH]; // the encryption key schedule -+ u_int32_t aes_d_key[AES_KS_LENGTH]; // the decryption key schedule -+#if !defined(AES_BLOCK_SIZE) -+ u_int32_t aes_Ncol; // the number of columns in the cipher state -+#endif -+} aes_context; -+ -+// THE CIPHER INTERFACE -+ -+#if !defined(AES_BLOCK_SIZE) -+extern void aes_set_blk(aes_context *, const int); -+#endif -+extern void aes_set_key(aes_context *, const unsigned char [], const int, const int); -+extern void aes_encrypt(const aes_context *, const unsigned char [], unsigned char []); -+extern void aes_decrypt(const aes_context *, const unsigned char [], unsigned char []); -+ -+// The block length inputs to aes_set_block and aes_set_key are in numbers -+// of bytes or bits. The calls to subroutines must be made in the above -+// order but multiple calls can be made without repeating earlier calls -+// if their parameters have not changed. -+ -+#endif // _AES_H ---- util-linux-2.12q/mount/lomount.c -+++ util-linux-2.12q/mount/lomount.c -@@ -1,4 +1,15 @@ --/* Originally from Ted's losetup.c */ -+/* Taken from Ted's losetup.c - Mitch */ -+/* Added vfs mount options - aeb - 960223 */ -+/* Removed lomount - aeb - 960224 */ -+ -+/* -+ * 1999-02-22 Arkadiusz Mi¶kiewicz -+ * - added Native Language Support -+ * 1999-03-21 Arnaldo Carvalho de Melo -+ * - fixed strerr(errno) in gettext calls -+ * 2001-04-11 Jari Ruusu -+ * - added AES support -+ */ - - #define LOOPMAJOR 7 - -@@ -13,60 +24,74 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include - #include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - - #include "loop.h" - #include "lomount.h" - #include "xstrncpy.h" - #include "nls.h" -+#include "sha512.h" -+#include "rmd160.h" -+#include "aes.h" - - extern int verbose; --extern char *progname; - extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ - extern void error (const char *fmt, ...); /* idem */ -+extern void show_all_loops(void); -+extern int read_options_from_fstab(char *, char **); - --#ifdef LOOP_SET_FD -- --static int --loop_info64_to_old(const struct loop_info64 *info64, struct loop_info *info) --{ -- memset(info, 0, sizeof(*info)); -- info->lo_number = info64->lo_number; -- info->lo_device = info64->lo_device; -- info->lo_inode = info64->lo_inode; -- info->lo_rdevice = info64->lo_rdevice; -- info->lo_offset = info64->lo_offset; -- info->lo_encrypt_type = info64->lo_encrypt_type; -- info->lo_encrypt_key_size = info64->lo_encrypt_key_size; -- info->lo_flags = info64->lo_flags; -- info->lo_init[0] = info64->lo_init[0]; -- info->lo_init[1] = info64->lo_init[1]; -- if (info->lo_encrypt_type == LO_CRYPT_CRYPTOAPI) -- memcpy(info->lo_name, info64->lo_crypt_name, LO_NAME_SIZE); -- else -- memcpy(info->lo_name, info64->lo_file_name, LO_NAME_SIZE); -- memcpy(info->lo_encrypt_key, info64->lo_encrypt_key, LO_KEY_SIZE); -- -- /* error in case values were truncated */ -- if (info->lo_device != info64->lo_device || -- info->lo_rdevice != info64->lo_rdevice || -- info->lo_inode != info64->lo_inode || -- info->lo_offset != info64->lo_offset) -- return -EOVERFLOW; -+#if !defined(LOOP_PASSWORD_MIN_LENGTH) -+# define LOOP_PASSWORD_MIN_LENGTH 20 -+#endif - -- return 0; --} -+char *passFDnumber = (char *)0; -+char *passAskTwice = (char *)0; -+char *passSeedString = (char *)0; -+char *passHashFuncName = (char *)0; -+char *passIterThousands = (char *)0; -+char *loInitValue = (char *)0; -+char *gpgKeyFile = (char *)0; -+char *gpgHomeDir = (char *)0; -+char *loopOffsetBytes = (char *)0; -+char *loopSizeBytes = (char *)0; -+char *loopEncryptionType = (char *)0; -+ -+static int multiKeyMode = 0; /* 0=single-key 64=multi-key-v2 65=multi-key-v3 1000=any */ -+static char *multiKeyPass[65]; -+static char *loopFileName; - - #ifdef MAIN -+static char * -+crypt_name (int id, int *flags) { -+ int i; -+ -+ for (i = 0; loop_crypt_type_tbl[i].id != -1; i++) -+ if(id == loop_crypt_type_tbl[i].id) { -+ *flags = loop_crypt_type_tbl[i].flags; -+ return loop_crypt_type_tbl[i].name; -+ } -+ *flags = 0; -+ if(id == 18) -+ return "CryptoAPI"; -+ return "undefined"; -+} - - static int - show_loop(char *device) { -- struct loop_info loopinfo; -- struct loop_info64 loopinfo64; -- int fd, errsv; -+ struct loop_info64 loopinfo; -+ int fd; - - if ((fd = open(device, O_RDONLY)) < 0) { - int errsv = errno; -@@ -74,70 +99,60 @@ - device, strerror (errsv)); - return 2; - } -- -- if (ioctl(fd, LOOP_GET_STATUS64, &loopinfo64) == 0) { -- -- loopinfo64.lo_file_name[LO_NAME_SIZE-2] = '*'; -- loopinfo64.lo_file_name[LO_NAME_SIZE-1] = 0; -- loopinfo64.lo_crypt_name[LO_NAME_SIZE-1] = 0; -- -- printf("%s: [%04llx]:%llu (%s)", -- device, loopinfo64.lo_device, loopinfo64.lo_inode, -- loopinfo64.lo_file_name); -- -- if (loopinfo64.lo_offset) -- printf(_(", offset %lld"), loopinfo64.lo_offset); -- -- if (loopinfo64.lo_sizelimit) -- printf(_(", sizelimit %lld"), loopinfo64.lo_sizelimit); -- -- if (loopinfo64.lo_encrypt_type || -- loopinfo64.lo_crypt_name[0]) { -- char *e = loopinfo64.lo_crypt_name; -- -- if (*e == 0 && loopinfo64.lo_encrypt_type == 1) -- e = "XOR"; -- printf(_(", encryption %s (type %d)"), -- e, loopinfo64.lo_encrypt_type); -- } -- printf("\n"); -+ if (loop_get_status64_ioctl(fd, &loopinfo) < 0) { -+ int errsv = errno; -+ fprintf(stderr, _("loop: can't get info on device %s: %s\n"), -+ device, strerror (errsv)); - close (fd); -- return 0; -+ return 1; - } -- -- if (ioctl(fd, LOOP_GET_STATUS, &loopinfo) == 0) { -- printf ("%s: [%04x]:%ld (%s)", -- device, loopinfo.lo_device, loopinfo.lo_inode, -- loopinfo.lo_name); -- -- if (loopinfo.lo_offset) -- printf(_(", offset %d"), loopinfo.lo_offset); -- -- if (loopinfo.lo_encrypt_type) -- printf(_(", encryption type %d\n"), -- loopinfo.lo_encrypt_type); -- -- printf("\n"); -- close (fd); -- return 0; -+ loopinfo.lo_file_name[LO_NAME_SIZE-1] = 0; -+ loopinfo.lo_crypt_name[LO_NAME_SIZE-1] = 0; -+ printf("%s: [%04llx]:%llu (%s)", device, (unsigned long long)loopinfo.lo_device, -+ (unsigned long long)loopinfo.lo_inode, loopinfo.lo_file_name); -+ if (loopinfo.lo_offset) { -+ if ((long long)loopinfo.lo_offset < 0) { -+ printf(_(" offset=@%llu"), -((unsigned long long)loopinfo.lo_offset)); -+ } else { -+ printf(_(" offset=%llu"), (unsigned long long)loopinfo.lo_offset); -+ } - } -- -- errsv = errno; -- fprintf(stderr, _("loop: can't get info on device %s: %s\n"), -- device, strerror (errsv)); -+ if (loopinfo.lo_sizelimit) -+ printf(_(" sizelimit=%llu"), (unsigned long long)loopinfo.lo_sizelimit); -+ if (loopinfo.lo_encrypt_type) { -+ int flags; -+ unsigned char *s = crypt_name (loopinfo.lo_encrypt_type, &flags); -+ -+ printf(_(" encryption=%s"), s); -+ /* type 18 == LO_CRYPT_CRYPTOAPI */ -+ if (loopinfo.lo_encrypt_type == 18) { -+ printf("/%s", loopinfo.lo_crypt_name); -+ } else { -+ if(flags & 2) -+ printf("-"); -+ if(flags & 1) -+ printf("%u", (unsigned int)loopinfo.lo_encrypt_key_size << 3); -+ } -+ } -+ switch(loopinfo.lo_flags & 0x180000) { -+ case 0x180000: -+ printf(_(" multi-key-v3")); -+ break; -+ case 0x100000: -+ printf(_(" multi-key-v2")); -+ break; -+ } -+ /* type 2 == LO_CRYPT_DES */ -+ if (loopinfo.lo_init[0] && (loopinfo.lo_encrypt_type != 2)) -+ printf(_(" loinit=%llu"), (unsigned long long)loopinfo.lo_init[0]); -+ if (loopinfo.lo_flags & 0x200000) -+ printf(_(" read-only")); -+ printf("\n"); - close (fd); -- return 1; --} --#endif -- --int --is_loop_device (const char *device) { -- struct stat statbuf; - -- return (stat(device, &statbuf) == 0 && -- S_ISBLK(statbuf.st_mode) && -- major(statbuf.st_rdev) == LOOPMAJOR); -+ return 0; - } -+#endif - - #define SIZE(a) (sizeof(a)/sizeof(a[0])) - -@@ -148,9 +163,8 @@ - So, we just try /dev/loop[0-7]. */ - char dev[20]; - char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" }; -- int i, j, fd, somedev = 0, someloop = 0, permission = 0; -+ int i, j, fd, somedev = 0, someloop = 0; - struct stat statbuf; -- struct loop_info loopinfo; - - for (j = 0; j < SIZE(loop_formats); j++) { - for(i = 0; i < 256; i++) { -@@ -159,16 +173,14 @@ - somedev++; - fd = open (dev, O_RDONLY); - if (fd >= 0) { -- if(ioctl (fd, LOOP_GET_STATUS, &loopinfo) == 0) -+ if (is_unused_loop_device(fd) == 0) - someloop++; /* in use */ - else if (errno == ENXIO) { - close (fd); - return xstrdup(dev);/* probably free */ - } - close (fd); -- } else if (errno == EACCES) -- permission++; -- -+ } - continue;/* continue trying as long as devices exist */ - } - break; -@@ -176,75 +188,563 @@ - } - - if (!somedev) -- error(_("%s: could not find any device /dev/loop#"), progname); -- else if (!someloop && permission) -- error(_("%s: no permission to look at /dev/loop#"), progname); -+ error(_("mount: could not find any device /dev/loop#")); - else if (!someloop) -- error(_( -- "%s: Could not find any loop device. Maybe this kernel " -- "does not know\n" -- " about the loop device? (If so, recompile or " -- "`modprobe loop'.)"), progname); -+ error(_("mount: Could not find any loop device. Maybe this kernel does not know\n" -+ " about the loop device? (If so, recompile or `modprobe loop'.)")); - else -- error(_("%s: could not find any free loop device"), progname); -+ error(_("mount: could not find any free loop device")); - return 0; - } - --/* -- * A function to read the passphrase either from the terminal or from -- * an open file descriptor. -- */ --static char * --xgetpass(int pfd, const char *prompt) { -- char *pass; -- int buflen, i; -- -- if (pfd < 0) /* terminal */ -- return getpass(prompt); -- -- pass = NULL; -- buflen = 0; -- for (i=0; ; i++) { -- if (i >= buflen-1) { -- /* we're running out of space in the buffer. -- * Make it bigger: */ -- char *tmppass = pass; -- buflen += 128; -- pass = realloc(tmppass, buflen); -- if (pass == NULL) { -- /* realloc failed. Stop reading. */ -- error("Out of memory while reading passphrase"); -- pass = tmppass; /* the old buffer hasn't changed */ -- break; -- } -- } -- if (read(pfd, pass+i, 1) != 1 || -- pass[i] == '\n' || pass[i] == 0) -+static int rd_wr_retry(int fd, char *buf, int cnt, int w) -+{ -+ int x, y, z; -+ -+ x = 0; -+ while(x < cnt) { -+ y = cnt - x; -+ if(w) { -+ z = write(fd, buf + x, y); -+ } else { -+ z = read(fd, buf + x, y); -+ if (!z) return x; -+ } -+ if(z < 0) { -+ if ((errno == EAGAIN) || (errno == ENOMEM) || (errno == ERESTART) || (errno == EINTR)) { -+ continue; -+ } -+ return x; -+ } -+ x += z; -+ } -+ return x; -+} -+ -+static char *get_FD_pass(int fd) -+{ -+ char *p = NULL, *n; -+ int x = 0, y = 0; -+ -+ do { -+ if(y >= (x - 1)) { -+ x += 128; -+ /* Must enforce some max limit here -- this code */ -+ /* runs as part of mount, and mount is setuid root */ -+ /* and has used mlockall(MCL_CURRENT | MCL_FUTURE) */ -+ if(x > (4*1024)) return(NULL); -+ n = malloc(x); -+ if(!n) return(NULL); -+ if(p) { -+ memcpy(n, p, y); -+ memset(p, 0, y); -+ free(p); -+ } -+ p = n; -+ } -+ if(rd_wr_retry(fd, p + y, 1, 0) != 1) break; -+ if((p[y] == '\n') || !p[y]) break; -+ y++; -+ } while(1); -+ if(p) p[y] = 0; -+ return p; -+} -+ -+static unsigned long long mystrtoull(char *s, int acceptAT) -+{ -+ unsigned long long v = 0; -+ int negative = 0; -+ -+ while ((*s == ' ') || (*s == '\t')) -+ s++; -+ if (acceptAT && (*s == '@')) { -+ s++; -+ negative = 1; -+ } -+ if (*s == '0') { -+ s++; -+ if ((*s == 'x') || (*s == 'X')) { -+ s++; -+ sscanf(s, "%llx", &v); -+ } else { -+ sscanf(s, "%llo", &v); -+ } -+ } else { -+ sscanf(s, "%llu", &v); -+ } -+ return negative ? -v : v; -+} -+ -+static char *do_GPG_pipe(char *pass) -+{ -+ int x, pfdi[2], pfdo[2]; -+ char str[10], *a[16], *e[2], *h; -+ pid_t gpid; -+ struct passwd *p; -+ -+ if((getuid() == 0) && gpgHomeDir && gpgHomeDir[0]) { -+ h = gpgHomeDir; -+ } else { -+ if(!(p = getpwuid(getuid()))) { -+ fprintf(stderr, _("Error: Unable to detect home directory for uid %d\n"), (int)getuid()); -+ return NULL; -+ } -+ h = p->pw_dir; -+ } -+ if(!(e[0] = malloc(strlen(h) + 6))) { -+ nomem1: -+ fprintf(stderr, _("Error: Unable to allocate memory\n")); -+ return NULL; -+ } -+ sprintf(e[0], "HOME=%s", h); -+ e[1] = 0; -+ -+ if(pipe(&pfdi[0])) { -+ nomem2: -+ free(e[0]); -+ goto nomem1; -+ } -+ if(pipe(&pfdo[0])) { -+ close(pfdi[0]); -+ close(pfdi[1]); -+ goto nomem2; -+ } -+ -+ /* -+ * When this code is run as part of losetup, normal read permissions -+ * affect the open() below because losetup is not setuid-root. -+ * -+ * When this code is run as part of mount, only root can set -+ * 'gpgKeyFile' and as such, only root can decide what file is opened -+ * below. However, since mount is usually setuid-root all non-root -+ * users can also open() the file too, but that file's contents are -+ * only piped to gpg. This readable-for-all is intended behaviour, -+ * and is very useful in situations where non-root users mount loop -+ * devices with their own gpg private key, and yet don't have access -+ * to the actual key used to encrypt loop device. -+ */ -+ if((x = open(gpgKeyFile, O_RDONLY)) == -1) { -+ fprintf(stderr, _("Error: unable to open %s for reading\n"), gpgKeyFile); -+ nomem3: -+ free(e[0]); -+ close(pfdo[0]); -+ close(pfdo[1]); -+ close(pfdi[0]); -+ close(pfdi[1]); -+ return NULL; -+ } -+ -+ /* -+ * If someone puts a gpg key file at beginning of device and -+ * puts the real file system at some offset into the device, -+ * this code extracts that gpg key file into a temp file so gpg -+ * won't end up reading whole device when decrypting the key file. -+ * -+ * Example of encrypted cdrom mount with 8192 bytes reserved for gpg key file: -+ * mount -t iso9660 /dev/cdrom /cdrom -o loop=/dev/loop0,encryption=AES128,gpgkey=/dev/cdrom,offset=8192 -+ * ^^^^^^^^^^ ^^^^^^^^^^ ^^^^ -+ */ -+ if(loopOffsetBytes && !strcmp(loopFileName, gpgKeyFile)) { -+ FILE *f; -+ char b[1024]; -+ long long cnt; -+ int cnt2, cnt3; -+ -+ cnt = mystrtoull(loopOffsetBytes, 1); -+ if(cnt < 0) cnt = -cnt; -+ if(cnt > (1024 * 1024)) cnt = 1024 * 1024; /* sanity check */ -+ f = tmpfile(); -+ if(!f) { -+ fprintf(stderr, _("Error: unable to create temp file\n")); -+ close(x); -+ goto nomem3; -+ } -+ while(cnt > 0) { -+ cnt2 = sizeof(b); -+ if(cnt < cnt2) cnt2 = cnt; -+ cnt3 = rd_wr_retry(x, b, cnt2, 0); -+ if(cnt3 && (fwrite(b, cnt3, 1, f) != 1)) { -+ tmpWrErr: -+ fprintf(stderr, _("Error: unable to write to temp file\n")); -+ fclose(f); -+ close(x); -+ goto nomem3; -+ } -+ if(cnt2 != cnt3) break; -+ cnt -= cnt3; -+ } -+ if(fflush(f)) goto tmpWrErr; -+ close(x); -+ x = dup(fileno(f)); -+ fclose(f); -+ lseek(x, 0L, SEEK_SET); -+ } -+ -+ sprintf(str, "%d", pfdi[0]); -+ if(!(gpid = fork())) { -+ dup2(x, 0); -+ dup2(pfdo[1], 1); -+ close(x); -+ close(pfdi[1]); -+ close(pfdo[0]); -+ close(pfdo[1]); -+ if((x = open("/dev/null", O_WRONLY)) >= 0) { -+ dup2(x, 2); -+ close(x); -+ } -+ x = 0; -+ a[x++] = "gpg"; -+ if(gpgHomeDir && gpgHomeDir[0]) { -+ a[x++] = "--homedir"; -+ a[x++] = gpgHomeDir; -+ } -+ a[x++] = "--options"; -+ a[x++] = "/dev/null"; -+ a[x++] = "--quiet"; -+ a[x++] = "--batch"; -+ a[x++] = "--no-tty"; -+ a[x++] = "--passphrase-fd"; -+ a[x++] = str; -+ a[x++] = "--decrypt"; -+ a[x] = 0; -+ setgid(getgid()); -+ setuid(getuid()); -+ for(x = 3; x < 1024; x++) { -+ if(x == pfdi[0]) continue; -+ close(x); -+ } -+ execve("/bin/gpg", &a[0], &e[0]); -+ execve("/usr/bin/gpg", &a[0], &e[0]); -+ execve("/usr/local/bin/gpg", &a[0], &e[0]); -+ exit(1); -+ } -+ free(e[0]); -+ close(x); -+ close(pfdi[0]); -+ close(pfdo[1]); -+ if(gpid == -1) { -+ close(pfdi[1]); -+ close(pfdo[0]); -+ goto nomem1; -+ } -+ -+ x = strlen(pass); -+ rd_wr_retry(pfdi[1], pass, x, 1); -+ rd_wr_retry(pfdi[1], "\n", 1, 1); -+ close(pfdi[1]); -+ memset(pass, 0, x); -+ x = 0; -+ while(x < 65) { -+ multiKeyPass[x] = get_FD_pass(pfdo[0]); -+ if(!multiKeyPass[x]) { -+ /* mem alloc failed - abort */ -+ multiKeyPass[0] = 0; - break; -+ } -+ if(strlen(multiKeyPass[x]) < LOOP_PASSWORD_MIN_LENGTH) break; -+ x++; -+ } -+ if(x == 65) -+ multiKeyMode = 65; -+ if(x == 64) -+ multiKeyMode = 64; -+ close(pfdo[0]); -+ waitpid(gpid, &x, 0); -+ if(!multiKeyPass[0]) goto nomem1; -+ return multiKeyPass[0]; -+} -+ -+static char *sGetPass(int minLen, int warnLen) -+{ -+ char *p, *s, *seed; -+ int i, ask2; -+ -+ if(!passFDnumber) { -+ p = getpass(_("Password: ")); -+ ask2 = passAskTwice ? 1 : 0; -+ } else { -+ i = atoi(passFDnumber); -+ if(gpgKeyFile && gpgKeyFile[0]) { -+ p = get_FD_pass(i); -+ } else { -+ int x = 0; -+ while(x < 65) { -+ multiKeyPass[x] = get_FD_pass(i); -+ if(!multiKeyPass[x]) goto nomem; -+ if(strlen(multiKeyPass[x]) < LOOP_PASSWORD_MIN_LENGTH) break; -+ x++; -+ } -+ if(x == 65) { -+ multiKeyMode = 65; -+ return multiKeyPass[0]; -+ } -+ if(x == 64) { -+ multiKeyMode = 64; -+ return multiKeyPass[0]; -+ } -+ p = multiKeyPass[0]; -+ } -+ ask2 = 0; -+ } -+ if(!p) goto nomem; -+ if(gpgKeyFile && gpgKeyFile[0]) { -+ if(ask2) { -+ i = strlen(p); -+ s = malloc(i + 1); -+ if(!s) goto nomem; -+ strcpy(s, p); -+ p = getpass(_("Retype password: ")); -+ if(!p) goto nomem; -+ if(strcmp(s, p)) goto compareErr; -+ memset(s, 0, i); -+ free(s); -+ ask2 = 0; -+ } -+ p = do_GPG_pipe(p); -+ if(!p) return(NULL); -+ if(!p[0]) { -+ fprintf(stderr, _("Error: gpg key file decryption failed\n")); -+ return(NULL); -+ } -+ if(multiKeyMode) return(p); -+ } -+ i = strlen(p); -+ if(i < minLen) { -+ fprintf(stderr, _("Error: Password must be at least %d characters.\n"), minLen); -+ return(NULL); -+ } -+ seed = passSeedString; -+ if(!seed) seed = ""; -+ s = malloc(i + strlen(seed) + 1); -+ if(!s) { -+ nomem: -+ fprintf(stderr, _("Error: Unable to allocate memory\n")); -+ return(NULL); -+ } -+ strcpy(s, p); -+ memset(p, 0, i); -+ if(ask2) { -+ p = getpass(_("Retype password: ")); -+ if(!p) goto nomem; -+ if(strcmp(s, p)) { -+ compareErr: -+ fprintf(stderr, _("Error: Passwords are not identical\n")); -+ return(NULL); -+ } -+ memset(p, 0, i); - } -+ if(i < warnLen) { -+ fprintf(stderr, _("WARNING - Please use longer password (%d or more characters)\n"), LOOP_PASSWORD_MIN_LENGTH); -+ } -+ strcat(s, seed); -+ return(s); -+} - -- if (pass == NULL) -- return ""; -+/* this is for compatibility with historic loop-AES version */ -+static void unhashed1_key_setup(unsigned char *keyStr, int ile, unsigned char *keyBuf, int bufSize) -+{ -+ register int x, y, z, cnt = ile; -+ unsigned char *kp; - -- pass[i] = 0; -- return pass; -+ memset(keyBuf, 0, bufSize); -+ kp = keyStr; -+ for(x = 0; x < (bufSize * 8); x += 6) { -+ y = *kp++; -+ if(--cnt <= 0) { -+ kp = keyStr; -+ cnt = ile; -+ } -+ if((y >= '0') && (y <= '9')) y -= '0'; -+ else if((y >= 'A') && (y <= 'Z')) y -= ('A' - 10); -+ else if((y >= 'a') && (y <= 'z')) y -= ('a' - 36); -+ else if((y == '.') || (y == '/')) y += (62 - '.'); -+ else y &= 63; -+ z = x >> 3; -+ if(z < bufSize) { -+ keyBuf[z] |= y << (x & 7); -+ } -+ z++; -+ if(z < bufSize) { -+ keyBuf[z] |= y >> (8 - (x & 7)); -+ } -+ } - } - --static int --digits_only(const char *s) { -- while (*s) -- if (!isdigit(*s++)) -- return 0; -- return 1; -+/* this is for compatibility with mainline mount */ -+static void unhashed2_key_setup(unsigned char *keyStr, int ile, unsigned char *keyBuf, int bufSize) -+{ -+ memset(keyBuf, 0, bufSize); -+ strncpy(keyBuf, keyStr, bufSize - 1); -+ keyBuf[bufSize - 1] = 0; -+} -+ -+static void rmd160HashTwiceWithA(unsigned char *ib, int ile, unsigned char *ob, int ole) -+{ -+ char tmpBuf[20 + 20]; -+ char pwdCopy[130]; -+ -+ if(ole < 1) return; -+ memset(ob, 0, ole); -+ if(ole > 40) ole = 40; -+ rmd160_hash_buffer(&tmpBuf[0], ib, ile); -+ pwdCopy[0] = 'A'; -+ if(ile > sizeof(pwdCopy) - 1) ile = sizeof(pwdCopy) - 1; -+ memcpy(pwdCopy + 1, ib, ile); -+ rmd160_hash_buffer(&tmpBuf[20], pwdCopy, ile + 1); -+ memcpy(ob, tmpBuf, ole); -+ memset(tmpBuf, 0, sizeof(tmpBuf)); -+ memset(pwdCopy, 0, sizeof(pwdCopy)); -+} -+ -+static int loop_create_random_keys(char *partition, int loopro, unsigned char *k) -+{ -+ int x, y; -+ sha512_context s; -+ unsigned char b[4096]; -+ FILE *f; -+ -+ if(loopro) { -+ fprintf(stderr, _("Error: read-only device %s\n"), partition); -+ return 1; -+ } -+ -+ /* -+ * Compute SHA-512 over first 40 KB of old fs data. SHA-512 hash -+ * output is then used as entropy for new fs encryption key. -+ */ -+ if(!(f = fopen(partition, "r+"))) { -+ fprintf(stderr, _("Error: unable to open device %s\n"), partition); -+ return 1; -+ } -+ fseek(f, (long)0, SEEK_SET); -+ sha512_init(&s); -+ for(x = 0; x < 10; x++) { -+ if(fread(&b[0], sizeof(b), 1, f) != 1) break; -+ sha512_write(&s, &b[0], sizeof(b)); -+ } -+ sha512_final(&s); -+ -+ /* -+ * Overwrite 40 KB of old fs data 20 times so that recovering -+ * SHA-512 output beyond this point is difficult and expensive. -+ */ -+ for(y = 0; y < 20; y++) { -+ int z; -+ struct { -+ struct timeval tv; -+ unsigned char h[64]; -+ int x,y,z; -+ } j; -+ if(fseek(f, (long)0, SEEK_SET)) break; -+ memcpy(&j.h[0], &s.sha_out[0], 64); -+ gettimeofday(&j.tv, NULL); -+ j.y = y; -+ for(x = 0; x < 10; x++) { -+ j.x = x; -+ for(z = 0; z < sizeof(b); z += 64) { -+ j.z = z; -+ sha512_hash_buffer((unsigned char *)&j, sizeof(j), &b[z], 64); -+ } -+ if(fwrite(&b[0], sizeof(b), 1, f) != 1) break; -+ } -+ memset(&j, 0, sizeof(j)); -+ if(fflush(f)) break; -+ if(fsync(fileno(f))) break; -+ } -+ fclose(f); -+ -+ /* -+ * Use all 512 bits of hash output -+ */ -+ memcpy(&b[0], &s.sha_out[0], 64); -+ memset(&s, 0, sizeof(s)); -+ -+ /* -+ * Read 32 bytes of random entropy from kernel's random -+ * number generator. This code may be executed early on startup -+ * scripts and amount of random entropy may be non-existent. -+ * SHA-512 of old fs data is used as workaround for missing -+ * entropy in kernel's random number generator. -+ */ -+ if(!(f = fopen("/dev/urandom", "r"))) { -+ fprintf(stderr, _("Error: unable to open /dev/urandom\n")); -+ return 1; -+ } -+ fread(&b[64], 32, 1, f); -+ -+ /* generate multi-key hashes */ -+ x = 0; -+ while(x < 65) { -+ fread(&b[64+32], 16, 1, f); -+ sha512_hash_buffer(&b[0], 64+32+16, k, 32); -+ k += 32; -+ x++; -+ } -+ -+ fclose(f); -+ memset(&b[0], 0, sizeof(b)); -+ return 0; -+} -+ -+#if !defined(MAIN) -+static int loop_fork_mkfs_command(char *device, char *fstype) -+{ -+ int x, y = 0; -+ char *a[10], *e[1]; -+ -+ sync(); -+ if(!(x = fork())) { -+ if((x = open("/dev/null", O_WRONLY)) >= 0) { -+ dup2(x, 0); -+ dup2(x, 1); -+ dup2(x, 2); -+ close(x); -+ } -+ x = 0; -+ a[x++] = "mkfs"; -+ a[x++] = "-t"; -+ a[x++] = fstype; -+ /* mkfs.reiserfs and mkfs.xfs need -f option */ -+ if(!strcmp(fstype, "reiserfs") || !strcmp(fstype, "xfs")) { -+ a[x++] = "-f"; -+ } -+ a[x++] = device; -+ a[x] = 0; -+ e[0] = 0; -+ setgid(getgid()); -+ setuid(getuid()); -+ for(x = 3; x < 1024; x++) { -+ close(x); -+ } -+ execve("/sbin/mkfs", &a[0], &e[0]); -+ exit(1); -+ } -+ if(x == -1) { -+ fprintf(stderr, _("Error: fork failed\n")); -+ return 1; -+ } -+ waitpid(x, &y, 0); -+ sync(); -+ if(!WIFEXITED(y) || (WEXITSTATUS(y) != 0)) { -+ fprintf(stderr, _("Error: encrypted file system mkfs failed\n")); -+ return 1; -+ } -+ return 0; - } -+#endif - - int --set_loop(const char *device, const char *file, unsigned long long offset, -- const char *encryption, int pfd, int *loopro) { -- struct loop_info64 loopinfo64; -+set_loop(const char *device, const char *file, int *loopro, const char **fstype, unsigned int *AutoChmodPtr) { -+ struct loop_info64 loopinfo; - int fd, ffd, mode, i; -- char *pass; -+ char *pass, *apiName = NULL; -+ void (*hashFunc)(unsigned char *, int, unsigned char *, int); -+ unsigned char multiKeyBits[65][32]; -+ int minPassLen = LOOP_PASSWORD_MIN_LENGTH; -+ int run_mkfs_command = 0; - -+ loopFileName = (char *)file; -+ multiKeyMode = 0; - mode = (*loopro ? O_RDONLY : O_RDWR); - if ((ffd = open(file, mode)) < 0) { - if (!*loopro && errno == EROFS) -@@ -256,32 +756,25 @@ - } - if ((fd = open(device, mode)) < 0) { - perror (device); -- return 1; -+ goto close_ffd_return1; - } - *loopro = (mode == O_RDONLY); - -- memset(&loopinfo64, 0, sizeof(loopinfo64)); -- -- xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE); -+ memset (&loopinfo, 0, sizeof (loopinfo)); -+ xstrncpy (loopinfo.lo_file_name, file, LO_NAME_SIZE); -+ if (loopEncryptionType) -+ loopinfo.lo_encrypt_type = loop_crypt_type (loopEncryptionType, &loopinfo.lo_encrypt_key_size, &apiName); -+ if (loopOffsetBytes) -+ loopinfo.lo_offset = mystrtoull(loopOffsetBytes, 1); -+ if (loopSizeBytes) -+ loopinfo.lo_sizelimit = mystrtoull(loopSizeBytes, 0); - -- if (encryption && *encryption) { -- if (digits_only(encryption)) { -- loopinfo64.lo_encrypt_type = atoi(encryption); -- } else { -- loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI; -- snprintf(loopinfo64.lo_crypt_name, LO_NAME_SIZE, -- "%s", encryption); -- } -- } -- -- loopinfo64.lo_offset = offset; -- --#ifdef MCL_FUTURE -+#ifdef MCL_FUTURE - /* - * Oh-oh, sensitive data coming up. Better lock into memory to prevent - * passwd etc being swapped out and left somewhere on disk. - */ -- -+ - if(mlockall(MCL_CURRENT | MCL_FUTURE)) { - perror("memlock"); - fprintf(stderr, _("Couldn't lock into memory, exiting.\n")); -@@ -289,126 +782,222 @@ - } - #endif - -- switch (loopinfo64.lo_encrypt_type) { -+ switch (loopinfo.lo_encrypt_type) { - case LO_CRYPT_NONE: -- loopinfo64.lo_encrypt_key_size = 0; -+ loopinfo.lo_encrypt_key_size = 0; - break; - case LO_CRYPT_XOR: -- pass = getpass(_("Password: ")); -- goto gotpass; -+ pass = sGetPass (1, 0); -+ if(!pass) goto close_fd_ffd_return1; -+ xstrncpy (loopinfo.lo_encrypt_key, pass, LO_KEY_SIZE); -+ loopinfo.lo_encrypt_key_size = strlen(loopinfo.lo_encrypt_key); -+ break; -+ case 3: /* LO_CRYPT_FISH2 */ -+ case 4: /* LO_CRYPT_BLOW */ -+ case 7: /* LO_CRYPT_SERPENT */ -+ case 8: /* LO_CRYPT_MARS */ -+ case 11: /* LO_CRYPT_RC6 */ -+ case 12: /* LO_CRYPT_DES_EDE3 */ -+ case 16: /* LO_CRYPT_AES */ -+ case 18: /* LO_CRYPT_CRYPTOAPI */ -+ /* set default hash function */ -+ hashFunc = sha256_hash_buffer; -+ if(loopinfo.lo_encrypt_key_size == 24) hashFunc = sha384_hash_buffer; -+ if(loopinfo.lo_encrypt_key_size == 32) hashFunc = sha512_hash_buffer; -+ /* possibly override default hash function */ -+ if(passHashFuncName) { -+ if(!strcasecmp(passHashFuncName, "sha256")) { -+ hashFunc = sha256_hash_buffer; -+ } else if(!strcasecmp(passHashFuncName, "sha384")) { -+ hashFunc = sha384_hash_buffer; -+ } else if(!strcasecmp(passHashFuncName, "sha512")) { -+ hashFunc = sha512_hash_buffer; -+ } else if(!strcasecmp(passHashFuncName, "rmd160")) { -+ hashFunc = rmd160HashTwiceWithA; -+ minPassLen = 1; -+ } else if(!strcasecmp(passHashFuncName, "unhashed1")) { -+ hashFunc = unhashed1_key_setup; -+ } else if(!strcasecmp(passHashFuncName, "unhashed2")) { -+ hashFunc = unhashed2_key_setup; -+ minPassLen = 1; -+ } else if(!strcasecmp(passHashFuncName, "unhashed3") && passFDnumber && !gpgKeyFile) { -+ /* unhashed3 hash type reads binary key from file descriptor. */ -+ /* This is not compatible with gpgkey= mount option */ -+ if(rd_wr_retry(atoi(passFDnumber), (char *)&loopinfo.lo_encrypt_key[0], LO_KEY_SIZE, 0) < 1) { -+ fprintf(stderr, _("Error: couldn't read binary key\n")); -+ goto close_fd_ffd_return1; -+ } -+ break; /* out of switch(loopinfo.lo_encrypt_type) */ -+ } else if(!strncasecmp(passHashFuncName, "random", 6) && ((passHashFuncName[6] == 0) || (passHashFuncName[6] == '/'))) { -+ /* random hash type sets up 65 random keys */ -+ /* WARNING! DO NOT USE RANDOM HASH TYPE ON PARTITION WITH EXISTING */ -+ /* IMPORTANT DATA ON IT. RANDOM HASH TYPE WILL DESTROY YOUR DATA. */ -+ if(loop_create_random_keys((char*)file, *loopro, &multiKeyBits[0][0])) { -+ goto close_fd_ffd_return1; -+ } -+ memcpy(&loopinfo.lo_encrypt_key[0], &multiKeyBits[0][0], sizeof(loopinfo.lo_encrypt_key)); -+ run_mkfs_command = multiKeyMode = 1000; -+ break; /* out of switch(loopinfo.lo_encrypt_type) */ -+ } -+ } -+ pass = sGetPass (minPassLen, LOOP_PASSWORD_MIN_LENGTH); -+ if(!pass) goto close_fd_ffd_return1; -+ i = strlen(pass); -+ if(hashFunc == unhashed1_key_setup) { -+ /* this is for compatibility with historic loop-AES version */ -+ loopinfo.lo_encrypt_key_size = 16; /* 128 bits */ -+ if(i >= 32) loopinfo.lo_encrypt_key_size = 24; /* 192 bits */ -+ if(i >= 43) loopinfo.lo_encrypt_key_size = 32; /* 256 bits */ -+ } -+ (*hashFunc)(pass, i, &loopinfo.lo_encrypt_key[0], sizeof(loopinfo.lo_encrypt_key)); -+ if(multiKeyMode) { -+ int r = 0, t; -+ while(r < multiKeyMode) { -+ t = strlen(multiKeyPass[r]); -+ (*hashFunc)(multiKeyPass[r], t, &multiKeyBits[r][0], 32); -+ memset(multiKeyPass[r], 0, t); -+ /* -+ * MultiKeyMode uses md5 IV. One key mode uses sector IV. Sector IV -+ * and md5 IV v2 and v3 are all computed differently. This first key -+ * byte XOR with 0x55/0xF4 is needed to cause complete decrypt failure -+ * in cases where data is encrypted with one type of IV and decrypted -+ * with another type IV. If identical key was used but only IV was -+ * computed differently, only first plaintext block of 512 byte CBC -+ * chain would decrypt incorrectly and rest would decrypt correctly. -+ * Partially correct decryption is dangerous. Decrypting all blocks -+ * incorrectly is safer because file system mount will simply fail. -+ */ -+ if(multiKeyMode == 65) { -+ multiKeyBits[r][0] ^= 0xF4; /* version 3 */ -+ } else { -+ multiKeyBits[r][0] ^= 0x55; /* version 2 */ -+ } -+ r++; -+ } -+ } else if(passIterThousands) { -+ aes_context ctx; -+ unsigned long iter = 0; -+ unsigned char tempkey[32]; -+ /* -+ * Set up AES-256 encryption key using same password and hash function -+ * as before but with password bit 0 flipped before hashing. That key -+ * is then used to encrypt actual loop key 'itercountk' thousand times. -+ */ -+ pass[0] ^= 1; -+ (*hashFunc)(pass, i, &tempkey[0], 32); -+ aes_set_key(&ctx, &tempkey[0], 32, 0); -+ sscanf(passIterThousands, "%lu", &iter); -+ iter *= 1000; -+ while(iter > 0) { -+ /* encrypt both 128bit blocks with AES-256 */ -+ aes_encrypt(&ctx, &loopinfo.lo_encrypt_key[ 0], &loopinfo.lo_encrypt_key[ 0]); -+ aes_encrypt(&ctx, &loopinfo.lo_encrypt_key[16], &loopinfo.lo_encrypt_key[16]); -+ /* exchange upper half of first block with lower half of second block */ -+ memcpy(&tempkey[0], &loopinfo.lo_encrypt_key[8], 8); -+ memcpy(&loopinfo.lo_encrypt_key[8], &loopinfo.lo_encrypt_key[16], 8); -+ memcpy(&loopinfo.lo_encrypt_key[16], &tempkey[0], 8); -+ iter--; -+ } -+ memset(&ctx, 0, sizeof(ctx)); -+ memset(&tempkey[0], 0, sizeof(tempkey)); -+ } -+ memset(pass, 0, i); /* erase original password */ -+ break; - default: -- pass = xgetpass(pfd, _("Password: ")); -- gotpass: -- memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE); -- xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE); -- memset(pass, 0, strlen(pass)); -- loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE; -+ fprintf (stderr, _("Error: don't know how to get key for encryption system %d\n"), loopinfo.lo_encrypt_type); -+ goto close_fd_ffd_return1; -+ } -+ -+ if(loInitValue) { -+ /* cipher modules are free to do whatever they want with this value */ -+ i = 0; -+ sscanf(loInitValue, "%d", &i); -+ loopinfo.lo_init[0] = i; - } - - if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { - perror("ioctl: LOOP_SET_FD"); -+keyclean_close_fd_ffd_return1: -+ memset(loopinfo.lo_encrypt_key, 0, sizeof(loopinfo.lo_encrypt_key)); -+ memset(&multiKeyBits[0][0], 0, sizeof(multiKeyBits)); -+close_fd_ffd_return1: -+ close (fd); -+close_ffd_return1: -+ close (ffd); - return 1; - } -- close (ffd); - -- i = ioctl(fd, LOOP_SET_STATUS64, &loopinfo64); -- if (i) { -- struct loop_info loopinfo; -- int errsv = errno; -- -- i = loop_info64_to_old(&loopinfo64, &loopinfo); -- if (i) { -- errno = errsv; -- perror("ioctl: LOOP_SET_STATUS64"); -- } else { -- i = ioctl(fd, LOOP_SET_STATUS, &loopinfo); -- if (i) -- perror("ioctl: LOOP_SET_STATUS"); -+ /* type 18 == LO_CRYPT_CRYPTOAPI */ -+ if ((loopinfo.lo_encrypt_type == 18) || (loop_set_status64_ioctl(fd, &loopinfo) < 0)) { -+ /* direct cipher interface failed - try CryptoAPI interface now */ -+ if(!apiName || (try_cryptoapi_loop_interface(fd, &loopinfo, apiName) < 0)) { -+ fprintf(stderr, _("ioctl: LOOP_SET_STATUS: %s, requested cipher or key length (%d bits) not supported by kernel\n"), strerror(errno), loopinfo.lo_encrypt_key_size << 3); -+ loop_clr_fd_out: -+ (void) ioctl (fd, LOOP_CLR_FD, 0); -+ goto keyclean_close_fd_ffd_return1; - } -- memset(&loopinfo, 0, sizeof(loopinfo)); - } -- memset(&loopinfo64, 0, sizeof(loopinfo64)); -- -- if (i) { -- ioctl (fd, LOOP_CLR_FD, 0); -- close (fd); -- return 1; -+ if(multiKeyMode >= 65) { -+ if(ioctl(fd, LOOP_MULTI_KEY_SETUP_V3, &multiKeyBits[0][0]) < 0) { -+ if(multiKeyMode == 1000) goto try_v2_setup; -+ perror("ioctl: LOOP_MULTI_KEY_SETUP_V3"); -+ goto loop_clr_fd_out; -+ } -+ } else if(multiKeyMode == 64) { -+ try_v2_setup: -+ if((ioctl(fd, LOOP_MULTI_KEY_SETUP, &multiKeyBits[0][0]) < 0) && (multiKeyMode != 1000)) { -+ perror("ioctl: LOOP_MULTI_KEY_SETUP"); -+ goto loop_clr_fd_out; -+ } - } -- close (fd); - -- if (verbose > 1) -- printf(_("set_loop(%s,%s,%llu): success\n"), -- device, file, offset); -- return 0; --} -- --int --del_loop (const char *device) { -- int fd; -- -- if ((fd = open (device, O_RDONLY)) < 0) { -- int errsv = errno; -- fprintf(stderr, _("loop: can't delete device %s: %s\n"), -- device, strerror (errsv)); -- return 1; -- } -- if (ioctl (fd, LOOP_CLR_FD, 0) < 0) { -- perror ("ioctl: LOOP_CLR_FD"); -- return 1; -- } -+ memset(loopinfo.lo_encrypt_key, 0, sizeof(loopinfo.lo_encrypt_key)); -+ memset(&multiKeyBits[0][0], 0, sizeof(multiKeyBits)); - close (fd); -- if (verbose > 1) -- printf(_("del_loop(%s): success\n"), device); -- return 0; --} -- --#else /* no LOOP_SET_FD defined */ --static void --mutter(void) { -- fprintf(stderr, -- _("This mount was compiled without loop support. " -- "Please recompile.\n")); --} -- --int --set_loop (const char *device, const char *file, unsigned long long offset, -- const char *encryption, int *loopro) { -- mutter(); -- return 1; --} -+ close (ffd); - --int --del_loop (const char *device) { -- mutter(); -- return 1; --} -+#if !defined(MAIN) -+ if(run_mkfs_command && fstype && *fstype && **fstype && (getuid() == 0)) { -+ if(!loop_fork_mkfs_command((char *)device, (char *)(*fstype))) { -+ /* !strncasecmp(passHashFuncName, "random", 6) test matched */ -+ /* This reads octal mode for newly created file system root */ -+ /* directory node from '-o phash=random/1777' mount option. */ -+ /* octal mode--^^^^ */ -+ sscanf(passHashFuncName + 6, "/%o", AutoChmodPtr); -+ } else { -+ if((fd = open(device, mode)) >= 0) { -+ ioctl(fd, LOOP_CLR_FD, 0); -+ close(fd); -+ return 1; -+ } -+ } -+ } -+#endif - --char * --find_unused_loop_device (void) { -- mutter(); -+ if (verbose > 1) -+ printf(_("set_loop(%s,%s): success\n"), device, file); - return 0; - } - --#endif -- - #ifdef MAIN - --#ifdef LOOP_SET_FD -- - #include - #include - - int verbose = 0; --char *progname; -+static char *progname; - - static void - usage(void) { - fprintf(stderr, _("usage:\n\ -- %s loop_device # give info\n\ -- %s -d loop_device # delete\n\ -- %s -f # find unused\n\ -- %s [-e encryption] [-o offset] {-f|loop_device} file # setup\n"), -- progname, progname, progname, progname); -+ %s [-e encryption] [options] loop_device file # setup\n\ -+ %s -F [options] loop_device [file] # setup, read /etc/fstab\n\ -+ %s loop_device # give info\n\ -+ %s -a # give info of all loops\n\ -+ %s -d loop_device # delete\n\ -+options: -o offset -s sizelimit -p passwdfd -S pseed -H phash\n\ -+ -I loinit -T -K gpgkey -G gpghome -C itercountk -v -r\n"), -+ progname, progname, progname, progname, progname); - exit(1); - } - -@@ -439,107 +1028,191 @@ - fprintf (stderr, "\n"); - } - -+void -+show_all_loops(void) -+{ -+ char dev[20]; -+ char *lfmt[] = { "/dev/loop%d", "/dev/loop/%d" }; -+ int i, j, fd, x; -+ struct stat statbuf; -+ -+ for(i = 0; i < 256; i++) { -+ for(j = (sizeof(lfmt) / sizeof(lfmt[0])) - 1; j >= 0; j--) { -+ sprintf(dev, lfmt[j], i); -+ if(stat(dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) { -+ fd = open(dev, O_RDONLY); -+ if(fd >= 0) { -+ x = is_unused_loop_device(fd); -+ close(fd); -+ if(x == 0) { -+ show_loop(dev); -+ j = 0; -+ } -+ } -+ } -+ } -+ } -+} -+ -+int -+read_options_from_fstab(char *loopToFind, char **partitionPtr) -+{ -+ FILE *f; -+ struct mntent *m; -+ int y, foundMatch = 0; -+ char *opt, *fr1, *fr2; -+ struct options { -+ char *name; /* name of /etc/fstab option */ -+ char **dest; /* destination where it is written to */ -+ char *line; /* temp */ -+ }; -+ struct options tbl[] = { -+ { "device/file name ", partitionPtr }, /* must be index 0 */ -+ { "loop=", &loopToFind }, /* must be index 1 */ -+ { "offset=", &loopOffsetBytes }, -+ { "sizelimit=", &loopSizeBytes }, -+ { "encryption=", &loopEncryptionType }, -+ { "pseed=", &passSeedString }, -+ { "phash=", &passHashFuncName }, -+ { "loinit=", &loInitValue }, -+ { "gpgkey=", &gpgKeyFile }, -+ { "gpghome=", &gpgHomeDir }, -+ { "itercountk=", &passIterThousands }, -+ }; -+ struct options *p; -+ -+ if (!(f = setmntent("/etc/fstab", "r"))) { -+ fprintf(stderr, _("Error: unable to open /etc/fstab for reading\n")); -+ return 0; -+ } -+ while ((m = getmntent(f)) != NULL) { -+ tbl[0].line = fr1 = xstrdup(m->mnt_fsname); -+ p = &tbl[1]; -+ do { -+ p->line = NULL; -+ } while (++p < &tbl[sizeof(tbl) / sizeof(struct options)]); -+ opt = fr2 = xstrdup(m->mnt_opts); -+ for (opt = strtok(opt, ","); opt != NULL; opt = strtok(NULL, ",")) { -+ p = &tbl[1]; -+ do { -+ y = strlen(p->name); -+ if (!strncmp(opt, p->name, y)) -+ p->line = opt + y; -+ } while (++p < &tbl[sizeof(tbl) / sizeof(struct options)]); -+ } -+ if (tbl[1].line && !strcmp(loopToFind, tbl[1].line)) { -+ if (++foundMatch > 1) { -+ fprintf(stderr, _("Error: multiple loop=%s options found in /etc/fstab\n"), loopToFind); -+ endmntent(f); -+ return 0; -+ } -+ p = &tbl[0]; -+ do { -+ if (!*p->dest && p->line) { -+ *p->dest = p->line; -+ if (verbose) -+ printf(_("using %s%s from /etc/fstab\n"), p->name, p->line); -+ } -+ } while (++p < &tbl[sizeof(tbl) / sizeof(struct options)]); -+ fr1 = fr2 = NULL; -+ } -+ if(fr1) free(fr1); -+ if(fr2) free(fr2); -+ } -+ endmntent(f); -+ if (foundMatch == 0) { -+ fprintf(stderr, _("Error: loop=%s option not found in /etc/fstab\n"), loopToFind); -+ } -+ return foundMatch; -+} -+ - int - main(int argc, char **argv) { -- char *p, *offset, *encryption, *passfd, *device, *file; -- int delete, find, c; -+ char *partitionName = NULL; -+ int delete,c,option_a=0,option_F=0; - int res = 0; - int ro = 0; -- int pfd = -1; -- unsigned long long off; - - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - -- delete = find = 0; -- off = 0; -- offset = encryption = passfd = NULL; -- -+ delete = 0; - progname = argv[0]; -- if ((p = strrchr(progname, '/')) != NULL) -- progname = p+1; -- -- while ((c = getopt(argc, argv, "de:E:fo:p:v")) != -1) { -+ while ((c = getopt(argc,argv,"aC:de:FG:H:I:K:o:p:rs:S:Tv")) != -1) { - switch (c) { -+ case 'a': /* show status of all loops */ -+ option_a = 1; -+ break; -+ case 'C': -+ passIterThousands = optarg; -+ break; - case 'd': - delete = 1; - break; -- case 'E': - case 'e': -- encryption = optarg; -+ loopEncryptionType = optarg; - break; -- case 'f': -- find = 1; -+ case 'F': /* read loop related options from /etc/fstab */ -+ option_F = 1; -+ break; -+ case 'G': /* GnuPG home dir */ -+ gpgHomeDir = optarg; -+ break; -+ case 'H': /* passphrase hash function name */ -+ passHashFuncName = optarg; -+ break; -+ case 'I': /* lo_init[0] value (in string form) */ -+ loInitValue = optarg; -+ break; -+ case 'K': /* GnuPG key file name */ -+ gpgKeyFile = optarg; - break; - case 'o': -- offset = optarg; -+ loopOffsetBytes = optarg; -+ break; -+ case 'p': /* read passphrase from given fd */ -+ passFDnumber = optarg; - break; -- case 'p': -- passfd = optarg; -+ case 'r': /* read-only */ -+ ro = 1; -+ break; -+ case 's': -+ loopSizeBytes = optarg; -+ break; -+ case 'S': /* optional seed for passphrase */ -+ passSeedString = optarg; -+ break; -+ case 'T': /* ask passphrase _twice_ */ -+ passAskTwice = "T"; - break; - case 'v': -- verbose = 1; -+ verbose++; - break; - default: - usage(); - } - } -- -- if (argc == 1) { -- usage(); -- } else if (delete) { -- if (argc != optind+1 || encryption || offset || find) -- usage(); -- } else if (find) { -- if (argc < optind || argc > optind+1) -- usage(); -- } else { -- if (argc < optind+1 || argc > optind+2) -- usage(); -+ if (argc == 1) usage(); -+ if (option_a) { -+ if (delete || (argc != optind)) usage(); -+ show_all_loops(); -+ exit(0); - } -- -- if (find) { -- device = find_unused_loop_device(); -- if (device == NULL) -- return -1; -- if (verbose) -- printf("Loop device is %s\n", device); -- if (argc == optind) { -- printf("%s\n", device); -- return 0; -- } -- file = argv[optind]; -+ if ((delete && (argc != optind+1 || loopEncryptionType || loopOffsetBytes || loopSizeBytes || option_F)) || -+ (!delete && (argc < optind+1 || argc > optind+2))) -+ usage(); -+ if (argc > optind+1) -+ partitionName = argv[optind+1]; -+ if (option_F && (read_options_from_fstab(argv[optind], &partitionName) != 1)) -+ exit(1); -+ if (delete) { -+ res = del_loop(argv[optind]); -+ } else if ((argc == optind+1) && !option_F) { -+ res = show_loop(argv[optind]); - } else { -- device = argv[optind]; -- if (argc == optind+1) -- file = NULL; -- else -- file = argv[optind+1]; -- } -- -- if (delete) -- res = del_loop(device); -- else if (file == NULL) -- res = show_loop(device); -- else { -- if (offset && sscanf(offset, "%llu", &off) != 1) -- usage(); -- if (passfd && sscanf(passfd, "%d", &pfd) != 1) -- usage(); -- res = set_loop(device, file, off, encryption, pfd, &ro); -+ res = set_loop(argv[optind],partitionName,&ro,(const char**)0,(unsigned int *)0); - } - return res; - } -- --#else /* LOOP_SET_FD not defined */ -- --int --main(int argc, char **argv) { -- fprintf(stderr, -- _("No loop support was available at compile time. " -- "Please recompile.\n")); -- return -1; --} --#endif - #endif ---- util-linux-2.12q/mount/lomount.h -+++ util-linux-2.12q/mount/lomount.h -@@ -1,6 +1,17 @@ - extern int verbose; --extern int set_loop(const char *, const char *, unsigned long long, -- const char *, int, int *); -+extern int set_loop(const char *, const char *, int *, const char **, unsigned int *); - extern int del_loop(const char *); - extern int is_loop_device(const char *); - extern char * find_unused_loop_device(void); -+ -+extern char *passFDnumber; -+extern char *passAskTwice; -+extern char *passSeedString; -+extern char *passHashFuncName; -+extern char *passIterThousands; -+extern char *loInitValue; -+extern char *gpgKeyFile; -+extern char *gpgHomeDir; -+extern char *loopOffsetBytes; -+extern char *loopSizeBytes; -+extern char *loopEncryptionType; ---- util-linux-2.12q/mount/loop.c -+++ util-linux-2.12q/mount/loop.c -@@ -0,0 +1,221 @@ -+/* -+ * loop.c -+ * -+ * Copyright 2003 by Jari Ruusu. -+ * Redistribution of this file is permitted under the GNU GPL -+ */ -+ -+/* collection of loop helper functions used by losetup, mount and swapon */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include "loop.h" -+ -+static void convert_info_to_info64(struct loop_info *info, struct loop_info64 *info64) -+{ -+ memset(info64, 0, sizeof(*info64)); -+ info64->lo_number = info->lo_number; -+ info64->lo_device = info->lo_device; -+ info64->lo_inode = info->lo_inode; -+ info64->lo_rdevice = info->lo_rdevice; -+ info64->lo_offset = info->lo_offset; -+ info64->lo_encrypt_type = info->lo_encrypt_type; -+ info64->lo_encrypt_key_size = info->lo_encrypt_key_size; -+ info64->lo_flags = info->lo_flags; -+ info64->lo_init[0] = info->lo_init[0]; -+ info64->lo_init[1] = info->lo_init[1]; -+ info64->lo_sizelimit = 0; -+ if (info->lo_encrypt_type == 18) /* LO_CRYPT_CRYPTOAPI */ -+ memcpy(info64->lo_crypt_name, info->lo_name, sizeof(info64->lo_crypt_name)); -+ else -+ memcpy(info64->lo_file_name, info->lo_name, sizeof(info64->lo_file_name)); -+ memcpy(info64->lo_encrypt_key, info->lo_encrypt_key, sizeof(info64->lo_encrypt_key)); -+} -+ -+static int convert_info64_to_info(struct loop_info64 *info64, struct loop_info *info) -+{ -+ memset(info, 0, sizeof(*info)); -+ info->lo_number = info64->lo_number; -+ info->lo_device = info64->lo_device; -+ info->lo_inode = info64->lo_inode; -+ info->lo_rdevice = info64->lo_rdevice; -+ info->lo_offset = info64->lo_offset; -+ info->lo_encrypt_type = info64->lo_encrypt_type; -+ info->lo_encrypt_key_size = info64->lo_encrypt_key_size; -+ info->lo_flags = info64->lo_flags; -+ info->lo_init[0] = info64->lo_init[0]; -+ info->lo_init[1] = info64->lo_init[1]; -+ if (info->lo_encrypt_type == 18) /* LO_CRYPT_CRYPTOAPI */ -+ memcpy(info->lo_name, info64->lo_crypt_name, sizeof(info->lo_name)); -+ else -+ memcpy(info->lo_name, info64->lo_file_name, sizeof(info->lo_name)); -+ memcpy(info->lo_encrypt_key, info64->lo_encrypt_key, sizeof(info->lo_encrypt_key)); -+ -+ /* error in case values were truncated */ -+ if (info->lo_device != info64->lo_device || -+ info->lo_rdevice != info64->lo_rdevice || -+ info->lo_inode != info64->lo_inode || -+ info->lo_offset != info64->lo_offset || -+ info64->lo_sizelimit) { -+ errno = EOVERFLOW; -+ return -1; -+ } -+ return 0; -+} -+ -+int loop_set_status64_ioctl(int fd, struct loop_info64 *info64) -+{ -+ struct loop_info info; -+ struct loop_info64 tmp; -+ int r; -+ -+ /* -+ * This ugly work around is needed because some -+ * Red Hat kernels are using same ioctl code: -+ * #define LOOP_CHANGE_FD 0x4C04 -+ * vs. -+ * #define LOOP_SET_STATUS64 0x4C04 -+ * that is used by modern loop driver. -+ * -+ * Attempt to detect presense of LOOP_GET_STATUS64 -+ * ioctl before issuing LOOP_SET_STATUS64 ioctl. -+ * Red Hat kernels with above LOOP_CHANGE_FD damage -+ * should return -1 and set errno to EINVAL. -+ */ -+ r = ioctl(fd, LOOP_GET_STATUS64, &tmp); -+ memset(&tmp, 0, sizeof(tmp)); -+ if ((r == 0) || (errno != EINVAL)) { -+ r = ioctl(fd, LOOP_SET_STATUS64, info64); -+ if (!r) -+ return 0; -+ } -+ r = convert_info64_to_info(info64, &info); -+ if (!r) -+ r = ioctl(fd, LOOP_SET_STATUS, &info); -+ -+ /* don't leave copies of encryption key on stack */ -+ memset(&info, 0, sizeof(info)); -+ return r; -+} -+ -+int loop_get_status64_ioctl(int fd, struct loop_info64 *info64) -+{ -+ struct loop_info info; -+ int r; -+ -+ memset(info64, 0, sizeof(*info64)); -+ r = ioctl(fd, LOOP_GET_STATUS64, info64); -+ if (!r) -+ return 0; -+ r = ioctl(fd, LOOP_GET_STATUS, &info); -+ if (!r) -+ convert_info_to_info64(&info, info64); -+ -+ /* don't leave copies of encryption key on stack */ -+ memset(&info, 0, sizeof(info)); -+ return r; -+} -+ -+/* returns: 1=unused 0=busy */ -+int is_unused_loop_device(int fd) -+{ -+ struct loop_info64 info64; -+ struct loop_info info; -+ int r; -+ -+ r = ioctl(fd, LOOP_GET_STATUS64, &info64); -+ memset(&info64, 0, sizeof(info64)); -+ if (!r) -+ return 0; -+ if (errno == ENXIO) -+ return 1; -+ -+ r = ioctl(fd, LOOP_GET_STATUS, &info); -+ memset(&info, 0, sizeof(info)); -+ if (!r) -+ return 0; -+ if (errno == ENXIO) -+ return 1; -+ if (errno == EOVERFLOW) -+ return 0; -+ return 1; -+} -+ -+struct loop_crypt_type_struct loop_crypt_type_tbl[] = { -+ { 0, 0, 0, "no" }, -+ { 0, 0, 0, "none" }, -+ { 1, 0, 0, "xor" }, -+ { 3, 1, 16, "twofish" }, -+ { 4, 1, 16, "blowfish" }, -+ { 7, 1, 16, "serpent" }, -+ { 8, 1, 16, "mars" }, -+ { 11, 3, 16, "rc6" }, -+ { 12, 0, 21, "tripleDES" }, -+ { 12, 0, 24, "3des" }, -+ { 12, 0, 24, "des3_ede" }, -+ { 16, 1, 16, "AES" }, -+ { -1, 0, 0, NULL } -+}; -+ -+static char *getApiName(char *e, int *len) -+{ -+ int x, y, z = 1, q = -1; -+ unsigned char *s; -+ -+ *len = y = 0; -+ s = strdup(e); -+ if(!s) -+ return ""; -+ x = strlen(s); -+ while(x > 0) { -+ x--; -+ if(!isdigit(s[x])) -+ break; -+ y += (s[x] - '0') * z; -+ z *= 10; -+ q = x; -+ } -+ while(x >= 0) { -+ s[x] = tolower(s[x]); -+ if(s[x] == '-') -+ s[x] = 0; -+ x--; -+ } -+ if(y >= 40) { -+ if(q >= 0) -+ s[q] = 0; -+ *len = y; -+ } -+ return(s); -+} -+ -+int loop_crypt_type(const char *name, u_int32_t *kbyp, char **apiName) -+{ -+ int i, k; -+ -+ *apiName = getApiName((char *)name, &k); -+ if(k < 0) -+ k = 0; -+ if(k > 256) -+ k = 256; -+ for (i = 0; loop_crypt_type_tbl[i].id != -1; i++) { -+ if (!strcasecmp (*apiName , loop_crypt_type_tbl[i].name)) { -+ *kbyp = k ? k >> 3 : loop_crypt_type_tbl[i].keyBytes; -+ return loop_crypt_type_tbl[i].id; -+ } -+ } -+ *kbyp = 16; /* 128 bits */ -+ return 18; /* LO_CRYPT_CRYPTOAPI */ -+} -+ -+int try_cryptoapi_loop_interface(int fd, struct loop_info64 *loopinfo, char *apiName) -+{ -+ snprintf(loopinfo->lo_crypt_name, sizeof(loopinfo->lo_crypt_name), "%s-cbc", apiName); -+ loopinfo->lo_crypt_name[LO_NAME_SIZE - 1] = 0; -+ loopinfo->lo_encrypt_type = 18; /* LO_CRYPT_CRYPTOAPI */ -+ return(loop_set_status64_ioctl(fd, loopinfo)); -+} ---- util-linux-2.12q/mount/loop.h -+++ util-linux-2.12q/mount/loop.h -@@ -1,6 +1,20 @@ --#define LO_CRYPT_NONE 0 --#define LO_CRYPT_XOR 1 --#define LO_CRYPT_DES 2 -+/* -+ * loop.h -+ * -+ * Copyright 2003 by Jari Ruusu. -+ * Redistribution of this file is permitted under the GNU GPL -+ */ -+ -+#ifndef _LOOP_H -+#define _LOOP_H 1 -+ -+#include -+#include -+#include -+ -+#define LO_CRYPT_NONE 0 -+#define LO_CRYPT_XOR 1 -+#define LO_CRYPT_DES 2 - #define LO_CRYPT_CRYPTOAPI 18 - - #define LOOP_SET_FD 0x4C00 -@@ -9,17 +23,25 @@ - #define LOOP_GET_STATUS 0x4C03 - #define LOOP_SET_STATUS64 0x4C04 - #define LOOP_GET_STATUS64 0x4C05 -+#define LOOP_MULTI_KEY_SETUP 0x4C4D -+#define LOOP_MULTI_KEY_SETUP_V3 0x4C4E - --#define LO_NAME_SIZE 64 --#define LO_KEY_SIZE 32 -- --#include "my_dev_t.h" -+#define LO_NAME_SIZE 64 -+#define LO_KEY_SIZE 32 - - struct loop_info { - int lo_number; -- my_dev_t lo_device; -+#if LINUX_VERSION_CODE >= 0x20600 -+ __kernel_old_dev_t lo_device; -+#else -+ __kernel_dev_t lo_device; -+#endif - unsigned long lo_inode; -- my_dev_t lo_rdevice; -+#if LINUX_VERSION_CODE >= 0x20600 -+ __kernel_old_dev_t lo_rdevice; -+#else -+ __kernel_dev_t lo_rdevice; -+#endif - int lo_offset; - int lo_encrypt_type; - int lo_encrypt_key_size; -@@ -30,22 +52,35 @@ - char reserved[4]; - }; - --/* -- * Where to get __u8, __u32, __u64? Let us use unsigned char/int/long long -- * and get punished when someone comes with 128-bit long longs. -- */ - struct loop_info64 { -- unsigned long long lo_device; -- unsigned long long lo_inode; -- unsigned long long lo_rdevice; -- unsigned long long lo_offset; -- unsigned long long lo_sizelimit; /* bytes, 0 == max available */ -- unsigned int lo_number; -- unsigned int lo_encrypt_type; -- unsigned int lo_encrypt_key_size; -- unsigned int lo_flags; -- unsigned char lo_file_name[LO_NAME_SIZE]; -- unsigned char lo_crypt_name[LO_NAME_SIZE]; -- unsigned char lo_encrypt_key[LO_KEY_SIZE]; -- unsigned long long lo_init[2]; -+ u_int64_t lo_device; /* ioctl r/o */ -+ u_int64_t lo_inode; /* ioctl r/o */ -+ u_int64_t lo_rdevice; /* ioctl r/o */ -+ u_int64_t lo_offset; /* bytes */ -+ u_int64_t lo_sizelimit; /* bytes, 0 == max available */ -+ u_int32_t lo_number; /* ioctl r/o */ -+ u_int32_t lo_encrypt_type; -+ u_int32_t lo_encrypt_key_size; /* ioctl w/o */ -+ u_int32_t lo_flags; /* ioctl r/o */ -+ unsigned char lo_file_name[LO_NAME_SIZE]; -+ unsigned char lo_crypt_name[LO_NAME_SIZE]; -+ unsigned char lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */ -+ u_int64_t lo_init[2]; -+}; -+ -+extern int loop_set_status64_ioctl(int, struct loop_info64 *); -+extern int loop_get_status64_ioctl(int, struct loop_info64 *); -+extern int is_unused_loop_device(int); -+ -+struct loop_crypt_type_struct { -+ short int id; -+ unsigned char flags; /* bit0 = show keybits, bit1 = add '-' before keybits */ -+ unsigned char keyBytes; -+ char *name; - }; -+ -+extern struct loop_crypt_type_struct loop_crypt_type_tbl[]; -+extern int loop_crypt_type(const char *, u_int32_t *, char **); -+extern int try_cryptoapi_loop_interface(int, struct loop_info64 *, char *); -+ -+#endif ---- util-linux-2.12q/mount/losetup.8 -+++ util-linux-2.12q/mount/losetup.8 -@@ -1,42 +1,28 @@ --.TH LOSETUP 8 "2003-07-01" "Linux" "MAINTENANCE COMMANDS" -+.TH LOSETUP 8 "2004-11-25" "Linux" "MAINTENANCE COMMANDS" - .SH NAME - losetup \- set up and control loop devices - .SH SYNOPSIS - .ad l --Get info: --.sp --.in +5 - .B losetup -+[ -+.B \-e -+.I encryption -+] [options] -+.I loop_device -+file -+.br -+.B losetup -F -+[options] - .I loop_device --.sp --.in -5 --Delete loop: --.sp --.in +5 --.B "losetup \-d" -+[file] -+.br -+.B losetup -+[ -+.B \-d -+] - .I loop_device --.sp --.in -5 --Print name of first unused loop device: --.sp --.in +5 --.B "losetup \-f" --.sp --.in -5 --Setup loop device: --.sp --.in +5 --.B losetup --.RB [{\-e | \-E} --.IR encryption ] --.RB [ \-o --.IR offset ] --.RB [ \-p --.IR pfd ] --.in +8 --.RB { \-f | \fIloop_device\fP } --.I file --.in -13 -+.br -+.B losetup -a - .ad b - .SH DESCRIPTION - .B losetup -@@ -44,45 +30,108 @@ - to detach loop devices and to query the status of a loop device. If only the - \fIloop_device\fP argument is given, the status of the corresponding loop - device is shown. -- --.SS "Encryption" --It is possible to specify transfer functions (for encryption/decryption --or other purposes) using one of the --.B \-E --and --.B \-e --options. --There are two mechanisms to specify the desired encryption: by number --and by name. If an encryption is specified by number then one --has to make sure that the Linux kernel knows about the encryption with that --number, probably by patching the kernel. Standard numbers that are --always present are 0 (no encryption) and 1 (XOR encryption). --When the cryptoloop module is loaded (or compiled in), it uses number 18. --This cryptoloop module wil take the name of an arbitrary encryption type --and finds the module that knows how to perform that encryption. --(Thus, either one uses a number different from 18 with the --.B \-E --option, or one uses a name with the --.B \-e --option.) - .SH OPTIONS --.IP \fB\-d\fP -+.IP \fB\-a\fP -+Show status of all loop devices. -+.IP "\fB\-C \fIitercountk\fP" -+Runs hashed password through \fIitercountk\fP thousand iterations of AES-256 -+before using it for loop encryption. This consumes lots of CPU cycles at -+loop setup/mount time but not thereafter. In combination with password seed -+this slows down dictionary attacks. Iteration is not done in multi-key mode. -+.IP "\fB\-d\fP" - Detach the file or device associated with the specified loop device. --.IP "\fB\-E \fIencryption_type\fP" --Enable data encryption with specified number. --.IP "\fB\-e \fIencryption_name\fP" --Enable data encryption with specified name. --.IP "\fB\-f\fP" --Find the first unused loop device. If a --.I file --argument is present, use this device. Otherwise, print its name. -+.IP "\fB\-e \fIencryption\fP" -+.RS -+Enable data encryption. Following encryption types are recognized: -+.IP \fBNONE\fP -+Use no encryption (default). -+.PD 0 -+.IP \fBXOR\fP -+Use a simple XOR encryption. -+.IP "\fBAES128 AES\fP" -+Use 128 bit AES encryption. Password is hashed with SHA-256 by default. -+.IP \fBAES192\fP -+Use 192 bit AES encryption. Password is hashed with SHA-384 by default. -+.IP \fBAES256\fP -+Use 256 bit AES encryption. Password is hashed with SHA-512 by default. -+ -+.IP "\fBtwofish128 twofish160 twofish192 twofish256\fP" -+.IP "\fBblowfish128 blowfish160 blowfish192 blowfish256\fP" -+.IP "\fBserpent128 serpent192 serpent256 mars128 mars192\fP" -+.IP "\fBmars256 rc6-128 rc6-192 rc6-256 tripleDES\fP" -+These encryption types are available if they are enabled in kernel -+configuration or corresponding modules have been loaded to kernel. -+.PD -+.RE -+.IP "\fB\-F\fP" -+Reads and uses mount options from /etc/fstab that match specified loop -+device, including offset= sizelimit= encryption= pseed= phash= loinit= -+gpgkey= gpghome= itercountk= and looped to device/file name. loop= option in -+/etc/fstab must match specified loop device name. Command line options take -+precedence in case of conflict. -+.IP "\fB\-G \fIgpghome\fP" -+Set gpg home directory to \fIgpghome\fP, so that gpg uses public/private -+keys on \fIgpghome\fP directory. This is only used when gpgkey file needs to -+be decrypted using public/private keys. If gpgkey file is encrypted with -+symmetric cipher only, public/private keys are not required and this option -+has no effect. -+.IP "\fB\-H \fIphash\fP" -+Uses \fIphash\fP function to hash password. Available hash functions are -+sha256, sha384, sha512 and rmd160. unhashed1, unhashed2 and unhashed3 -+functions also exist for compatibility with some obsolete implementations. -+ -+Hash function random does not ask for password but sets up random keys and -+attempts to put loop to multi-key mode. When random/1777 hash type is used -+as mount option for mount program, mount program will create new file system -+on the loop device and construct initial permissions of file system root -+directory from octal digits that follow the slash character. -+ -+WARNING! DO NOT USE RANDOM HASH TYPE ON PARTITION WITH EXISTING IMPORTANT -+DATA ON IT. RANDOM HASH TYPE WILL DESTROY YOUR DATA. -+.IP "\fB\-I \fIloinit\fP" -+Passes a numeric value of \fIloinit\fP as a parameter to cipher transfer -+function. Cipher transfer functions are free to interpret value as they -+want. -+.IP "\fB\-K \fIgpgkey\fP" -+Password is piped to gpg so that gpg can decrypt file \fIgpgkey\fP which -+contains the real keys that are used to encrypt loop device. If decryption -+requires public/private keys and gpghome is not specified, all users use -+their own gpg public/private keys to decrypt \fIgpgkey\fP. Decrypted -+\fIgpgkey\fP should contain 1 or 64 or 65 keys, each key at least 20 -+characters and separated by newline. If decrypted \fIgpgkey\fP contains 64 -+or 65 keys, then loop device is put to multi-key mode. In multi-key mode -+first key is used for first sector, second key for second sector, and so on. -+65th key, if present, is used as additional input to MD5 IV computation. - .IP "\fB\-o \fIoffset\fP" - The data start is moved \fIoffset\fP bytes into the specified file or --device. --.IP "\fB\-p \fInum\fP" --Read the passphrase from file descriptor with number --.I num --instead of from the terminal. -+device. Normally offset is included in IV (initialization vector) -+computations. If offset is prefixed with @ character, then offset is not -+included in IV computations. @ prefix functionality may not be supported on -+some older kernels and/or loop drivers. -+.IP "\fB\-p \fIpasswdfd\fP" -+Read the passphrase from file descriptor \fIpasswdfd\fP instead of the -+terminal. If -K option is not being used (no gpg key file), then losetup -+attempts to read 65 keys from \fIpasswdfd\fP, each key at least 20 -+characters and separated by newline. If losetup successfully reads 64 or 65 -+keys, then loop device is put to multi-key mode. If losetup encounters -+end-of-file before 64 keys are read, then only first key is used in -+single-key mode. -+.IP "\fB\-r\fP" -+Read-only mode. -+.IP "\fB\-s \fIsizelimit\fP" -+Size of loop device is limited to \fIsizelimit\fP bytes. If unspecified or -+set to zero, loop device size is set to maximum available (file size minus -+offset). This option may not be supported on some older kernels and/or loop -+drivers. -+.IP "\fB\-S \fIpseed\fP" -+Sets encryption password seed \fIpseed\fP which is appended to user supplied -+password before hashing. Using different seeds for different partitions -+makes dictionary attacks slower but does not prevent them if user supplied -+password is guessable. Seed is not used in multi-key mode. -+.IP "\fB\-T\fP" -+Asks password twice. -+.IP "\fB\-v\fP" -+Verbose mode. - .SH RETURN VALUE - .B losetup - returns 0 on success, nonzero on failure. When -@@ -94,43 +143,26 @@ - - .SH FILES - .nf --/dev/loop0, /dev/loop1, ... loop devices (major=7) -+/dev/loop0,/dev/loop1,... loop devices (major=7) - .fi - .SH EXAMPLE --If you are using the loadable module you must have the module loaded --first with the command --.IP --# insmod loop.o --.LP --Maybe also encryption modules are needed. --.IP --# insmod des.o --# insmod cryptoloop.o --.LP - The following commands can be used as an example of using the loop device. - .nf --.IP --# dd if=/dev/zero of=/file bs=1k count=100 --# losetup -e des /dev/loop0 /file --Password: --Init (up to 16 hex digits): --# mkfs -t ext2 /dev/loop0 100 --# mount -t ext2 /dev/loop0 /mnt -+ -+dd if=/dev/zero of=/file bs=1k count=500 -+head -c 2925 /dev/random | uuencode -m - | head -n 66 \\ -+ | tail -n 65 | gpg --symmetric -a >/etc/fskey9.gpg -+losetup -e AES128 -K /etc/fskey9.gpg /dev/loop0 /file -+mkfs -t ext2 /dev/loop0 -+mount -t ext2 /dev/loop0 /mnt - ... --# umount /dev/loop0 --# losetup -d /dev/loop0 --.fi --.LP --If you are using the loadable module you may remove the module with --the command --.IP --# rmmod loop --.LP -+umount /dev/loop0 -+losetup -d /dev/loop0 - .fi - .SH RESTRICTION --DES encryption is painfully slow. On the other hand, XOR is terribly weak. --.\" .SH AUTHORS --.\" .nf --.\" Original version: Theodore Ts'o --.\" Original DES by: Eric Young --.\" .fi -+XOR encryption is terribly weak. -+.SH AUTHORS -+.nf -+Original version: Theodore Ts'o -+AES support: Jari Ruusu -+.fi ---- util-linux-2.12q/mount/loumount.c -+++ util-linux-2.12q/mount/loumount.c -@@ -0,0 +1,60 @@ -+/* -+ * loumount.c -+ * -+ * This code was extracted to separate file from lomount.c so that umount -+ * program doesn't have to link with all loop related setup code -+ */ -+ -+#define LOOPMAJOR 7 -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "loop.h" -+#include "lomount.h" -+#include "xstrncpy.h" -+#include "nls.h" -+ -+int -+is_loop_device (const char *device) { -+ struct stat statbuf; -+ -+ return (stat(device, &statbuf) == 0 && -+ S_ISBLK(statbuf.st_mode) && -+ major(statbuf.st_rdev) == LOOPMAJOR); -+} -+ -+int -+del_loop (const char *device) { -+ int fd; -+ -+ if ((fd = open (device, O_RDONLY)) < 0) { -+ int errsv = errno; -+ fprintf(stderr, _("loop: can't delete device %s: %s\n"), -+ device, strerror (errsv)); -+ return 1; -+ } -+ if (ioctl (fd, LOOP_CLR_FD, 0) < 0) { -+ perror ("ioctl: LOOP_CLR_FD"); -+ return 1; -+ } -+ close (fd); -+ if (verbose > 1) -+ printf(_("del_loop(%s): success\n"), device); -+ return 0; -+} ---- util-linux-2.12q/mount/Makefile -+++ util-linux-2.12q/mount/Makefile -@@ -29,7 +29,6 @@ - - MAYBE = pivot_root swapoff - --LO_OBJS = lomount.o $(LIB)/xstrncpy.o - NFS_OBJS = nfsmount.o nfsmount_xdr.o nfsmount_clnt.o - GEN_FILES = nfsmount.h nfsmount_xdr.c nfsmount_clnt.c - -@@ -49,24 +48,33 @@ - - mount: mount.o fstab.o sundries.o xmalloc.o realpath.o mntent.o version.o \ - get_label_uuid.o mount_by_label.o mount_blkid.o mount_guess_fstype.o \ -- getusername.o $(LIB)/setproctitle.o $(LIB)/env.o $(NFS_OBJS) $(LO_OBJS) -+ getusername.o $(LIB)/setproctitle.o $(LIB)/env.o $(NFS_OBJS) lomount.o \ -+ loumount.o loop.o sha512.o rmd160.o aes.o $(LIB)/xstrncpy.o - $(LINK) $^ -o $@ $(BLKID_LIB) - - umount: umount.o fstab.o sundries.o xmalloc.o realpath.o mntent.o \ - getusername.o get_label_uuid.o mount_by_label.o mount_blkid.o \ -- version.o $(LIB)/env.o $(LO_OBJS) -+ version.o $(LIB)/env.o loumount.o - $(LINK) $^ -o $@ $(BLKID_LIB) - - swapon: swapon.o version.o xmalloc.o \ -- get_label_uuid.o mount_by_label.o mount_blkid.o -+ get_label_uuid.o mount_by_label.o mount_blkid.o loop.o sha512.o $(LIB)/xstrncpy.o - $(LINK) $^ -o $@ $(BLKID_LIB) - - main_losetup.o: lomount.c - $(COMPILE) -DMAIN lomount.c -o $@ - --losetup: main_losetup.o $(LIB)/xstrncpy.o -+losetup: main_losetup.o loumount.o loop.o sha512.o rmd160.o aes.o $(LIB)/xstrncpy.o - $(LINK) $^ -o $@ - -+loop.o lomount.o main_losetup.o swapon.o: loop.h -+ -+sha512.o lomount.o main_losetup.o swapon.o: sha512.h -+ -+rmd160.o lomount.o main_losetup.o: rmd160.h -+ -+aes.o lomount.o main_losetup.o: aes.h -+ - mount.o umount.o nfsmount.o losetup.o fstab.o realpath.o sundries.o: sundries.h - - mount.o umount.o fstab.o sundries.o: fstab.h -@@ -79,9 +87,9 @@ - - mount.o umount.o getusername.o: getusername.h - --mount.o umount.o losetup.o lomount.o: lomount.h loop.h my_dev_t.h -+mount.o umount.o losetup.o lomount.o loumount.o: lomount.h loop.h - --swapon.o: swap_constants.h swapargs.h -+swapon.o: swap_constants.h swapargs.h loop.h - - sundries.o nfsmount.o nfsmount_xdr.o nfsmount_clnt.o: nfsmount.h - ---- util-linux-2.12q/mount/mount.8 -+++ util-linux-2.12q/mount/mount.8 -@@ -281,6 +281,16 @@ - .B \-v - Verbose mode. - .TP -+.B \-p "\fIpasswdfd\fP" -+If the mount requires a passphrase to be entered, read it from file -+descriptor \fIpasswdfd\fP instead of from the terminal. If mount uses -+encrypted loop device and gpgkey= mount option is not being used (no gpg key -+file), then mount attempts to read 65 keys from \fIpasswdfd\fP, each key at -+least 20 characters and separated by newline. If mount successfully reads 64 -+or 65 keys, then loop device is put to multi-key mode. If mount encounters -+end-of-file before 64 keys are read, then only first key is used in -+single-key mode. -+.TP - .B \-a - Mount all filesystems (of the given types) mentioned in - .IR fstab . -@@ -328,12 +338,6 @@ - .I /etc - is on a read-only file system. - .TP --.BI \-p " num" --In case of a loop mount with encryption, read the passphrase from --file descriptor --.I num --instead of from the terminal. --.TP - .B \-s - Tolerate sloppy mount options rather than failing. This will ignore - mount options not supported by a filesystem type. Not all filesystems -@@ -1841,13 +1845,17 @@ - and then mount this device on - .IR /mnt . - --This type of mount knows about three options, namely --.BR loop ", " offset " and " encryption , -+This type of mount knows about 10 options, namely -+.BR loop ", " offset ", " sizelimit ", " encryption ", " pseed ", " phash ", " loinit ", " gpgkey ", " gpghome " and " itercountk - that are really options to - .BR \%losetup (8). - (These options can be used in addition to those specific - to the filesystem type.) - -+If the mount requires a passphrase, you will be prompted for one unless you -+specify a file descriptor to read from instead with the -+.BR \-p -+option. - If no explicit loop device is mentioned - (but just an option `\fB\-o loop\fP' is given), then - .B mount ---- util-linux-2.12q/mount/mount.c -+++ util-linux-2.12q/mount/mount.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -80,9 +81,6 @@ - /* True if ruid != euid. */ - static int suid = 0; - --/* Contains the fd to read the passphrase from, if any. */ --static int pfd = -1; -- - /* Map from -o and fstab option strings to the flag argument to mount(2). */ - struct opt_map { - const char *opt; /* option name */ -@@ -167,7 +165,7 @@ - { NULL, 0, 0, 0 } - }; - --static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, -+static const char *opt_loopdev, *opt_vfstype, - *opt_speed, *opt_comment; - - static struct string_opt_map { -@@ -177,8 +175,15 @@ - } string_opt_map[] = { - { "loop=", 0, &opt_loopdev }, - { "vfs=", 1, &opt_vfstype }, -- { "offset=", 0, &opt_offset }, -- { "encryption=", 0, &opt_encryption }, -+ { "pseed=", 1, (const char **)&passSeedString }, -+ { "phash=", 0, (const char **)&passHashFuncName }, -+ { "loinit=", 0, (const char **)&loInitValue }, -+ { "gpgkey=", 0, (const char **)&gpgKeyFile }, -+ { "gpghome=", 0, (const char **)&gpgHomeDir }, -+ { "itercountk=", 1, (const char **)&passIterThousands }, -+ { "offset=", 0, (const char **)&loopOffsetBytes }, -+ { "sizelimit=", 0, (const char **)&loopSizeBytes }, -+ { "encryption=", 0, (const char **)&loopEncryptionType }, - { "speed=", 0, &opt_speed }, - { "comment=", 1, &opt_comment }, - { NULL, 0, NULL } -@@ -580,9 +585,8 @@ - - static int - loop_check(const char **spec, const char **type, int *flags, -- int *loop, const char **loopdev, const char **loopfile) { -+ int *loop, const char **loopdev, const char **loopfile, unsigned int *AutoChmodPtr) { - int looptype; -- unsigned long long offset; - - /* - * In the case of a loop mount, either type is of the form lo@/dev/loop5 -@@ -607,7 +611,7 @@ - *type = opt_vfstype; - } - -- *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_encryption); -+ *loop = ((*flags & MS_LOOP) || *loopdev || loopOffsetBytes || loopSizeBytes || loopEncryptionType); - *loopfile = *spec; - - if (*loop) { -@@ -624,9 +628,7 @@ - return EX_SYSERR; /* no more loop devices */ - if (verbose) - printf(_("mount: going to use the loop device %s\n"), *loopdev); -- offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0; -- if (set_loop(*loopdev, *loopfile, offset, -- opt_encryption, pfd, &loopro)) { -+ if (set_loop (*loopdev, *loopfile, &loopro, type, AutoChmodPtr)) { - if (verbose) - printf(_("mount: failed setting up loop device\n")); - return EX_FAIL; -@@ -687,14 +689,6 @@ - } - - static void --set_pfd(char *s) { -- if (!isdigit(*s)) -- die(EX_USAGE, -- _("mount: argument to -p or --pass-fd must be a number")); -- pfd = atoi(optarg); --} -- --static void - cdrom_setspeed(const char *spec) { - #define CDROM_SELECT_SPEED 0x5322 /* Set the CD-ROM speed */ - if (opt_speed) { -@@ -788,6 +782,7 @@ - const char *opts, *spec, *node, *types; - char *user = 0; - int loop = 0; -+ unsigned int LoopMountAutomaticChmod = 0; - const char *loopdev = 0, *loopfile = 0; - struct stat statbuf; - int nfs_mount_version = 0; /* any version */ -@@ -820,7 +815,7 @@ - * stale assignments of files to loop devices. Nasty when used for - * encryption. - */ -- res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile); -+ res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile, &LoopMountAutomaticChmod); - if (res) - goto out; - } -@@ -855,9 +850,20 @@ - - block_signals (SIG_BLOCK); - -- if (!fake) -+ if (!fake) { - mnt5_res = guess_fstype_and_mount (spec, node, &types, flags & ~MS_NOSYS, - mount_opts); -+ if(!mnt5_res && LoopMountAutomaticChmod && (getuid() == 0)) { -+ /* -+ * If loop was set up using random keys and new file system -+ * was created on the loop device, initial permissions for -+ * file system root directory need to be set here. -+ */ -+ if(chmod(node, LoopMountAutomaticChmod)) { -+ error (_("Error: encrypted file system chmod() failed")); -+ } -+ } -+ } - - if (fake || mnt5_res == 0) { - /* Mount succeeded, report this (if verbose) and write mtab entry. */ -@@ -1530,8 +1536,8 @@ - else - test_opts = xstrdup(optarg); - break; -- case 'p': /* fd on which to read passwd */ -- set_pfd(optarg); -+ case 'p': /* read passphrase from given fd */ -+ passFDnumber = optarg; - break; - case 'r': /* mount readonly */ - readonly = 1; ---- util-linux-2.12q/mount/rmd160.c -+++ util-linux-2.12q/mount/rmd160.c -@@ -0,0 +1,532 @@ -+/* rmd160.c - RIPE-MD160 -+ * Copyright (C) 1998 Free Software Foundation, Inc. -+ */ -+ -+/* This file was part of GnuPG. Modified for use within the Linux -+ * mount utility by Marc Mutz . None of this code is -+ * by myself. I just removed everything that you don't need when all -+ * you want to do is to use rmd160_hash_buffer(). -+ * My comments are marked with (mm). */ -+ -+/* GnuPG is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * GnuPG is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -+ -+#include /* (mm) for memcpy */ -+#include /* (mm) for BIG_ENDIAN and BYTE_ORDER */ -+#include "rmd160.h" -+ -+/* (mm) these are used by the original GnuPG file. In order to modify -+ * that file not too much, we keep the notations. maybe it would be -+ * better to include linux/types.h and typedef __u32 to u32 and __u8 -+ * to byte? */ -+typedef unsigned int u32; /* taken from e.g. util-linux's minix.h */ -+typedef unsigned char byte; -+ -+typedef struct { -+ u32 h0,h1,h2,h3,h4; -+ u32 nblocks; -+ byte buf[64]; -+ int count; -+} RMD160_CONTEXT; -+ -+/**************** -+ * Rotate a 32 bit integer by n bytes -+ */ -+#if defined(__GNUC__) && defined(__i386__) -+static inline u32 -+rol( u32 x, int n) -+{ -+ __asm__("roll %%cl,%0" -+ :"=r" (x) -+ :"0" (x),"c" (n)); -+ return x; -+} -+#else -+ #define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) ) -+#endif -+ -+/********************************* -+ * RIPEMD-160 is not patented, see (as of 25.10.97) -+ * http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html -+ * Note that the code uses Little Endian byteorder, which is good for -+ * 386 etc, but we must add some conversion when used on a big endian box. -+ * -+ * -+ * Pseudo-code for RIPEMD-160 -+ * -+ * RIPEMD-160 is an iterative hash function that operates on 32-bit words. -+ * The round function takes as input a 5-word chaining variable and a 16-word -+ * message block and maps this to a new chaining variable. All operations are -+ * defined on 32-bit words. Padding is identical to that of MD4. -+ * -+ * -+ * RIPEMD-160: definitions -+ * -+ * -+ * nonlinear functions at bit level: exor, mux, -, mux, - -+ * -+ * f(j, x, y, z) = x XOR y XOR z (0 <= j <= 15) -+ * f(j, x, y, z) = (x AND y) OR (NOT(x) AND z) (16 <= j <= 31) -+ * f(j, x, y, z) = (x OR NOT(y)) XOR z (32 <= j <= 47) -+ * f(j, x, y, z) = (x AND z) OR (y AND NOT(z)) (48 <= j <= 63) -+ * f(j, x, y, z) = x XOR (y OR NOT(z)) (64 <= j <= 79) -+ * -+ * -+ * added constants (hexadecimal) -+ * -+ * K(j) = 0x00000000 (0 <= j <= 15) -+ * K(j) = 0x5A827999 (16 <= j <= 31) int(2**30 x sqrt(2)) -+ * K(j) = 0x6ED9EBA1 (32 <= j <= 47) int(2**30 x sqrt(3)) -+ * K(j) = 0x8F1BBCDC (48 <= j <= 63) int(2**30 x sqrt(5)) -+ * K(j) = 0xA953FD4E (64 <= j <= 79) int(2**30 x sqrt(7)) -+ * K'(j) = 0x50A28BE6 (0 <= j <= 15) int(2**30 x cbrt(2)) -+ * K'(j) = 0x5C4DD124 (16 <= j <= 31) int(2**30 x cbrt(3)) -+ * K'(j) = 0x6D703EF3 (32 <= j <= 47) int(2**30 x cbrt(5)) -+ * K'(j) = 0x7A6D76E9 (48 <= j <= 63) int(2**30 x cbrt(7)) -+ * K'(j) = 0x00000000 (64 <= j <= 79) -+ * -+ * -+ * selection of message word -+ * -+ * r(j) = j (0 <= j <= 15) -+ * r(16..31) = 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8 -+ * r(32..47) = 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12 -+ * r(48..63) = 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2 -+ * r(64..79) = 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 -+ * r0(0..15) = 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12 -+ * r0(16..31)= 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2 -+ * r0(32..47)= 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13 -+ * r0(48..63)= 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14 -+ * r0(64..79)= 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 -+ * -+ * -+ * amount for rotate left (rol) -+ * -+ * s(0..15) = 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8 -+ * s(16..31) = 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12 -+ * s(32..47) = 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5 -+ * s(48..63) = 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12 -+ * s(64..79) = 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 -+ * s'(0..15) = 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6 -+ * s'(16..31)= 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11 -+ * s'(32..47)= 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5 -+ * s'(48..63)= 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8 -+ * s'(64..79)= 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 -+ * -+ * -+ * initial value (hexadecimal) -+ * -+ * h0 = 0x67452301; h1 = 0xEFCDAB89; h2 = 0x98BADCFE; h3 = 0x10325476; -+ * h4 = 0xC3D2E1F0; -+ * -+ * -+ * RIPEMD-160: pseudo-code -+ * -+ * It is assumed that the message after padding consists of t 16-word blocks -+ * that will be denoted with X[i][j], with 0 <= i <= t-1 and 0 <= j <= 15. -+ * The symbol [+] denotes addition modulo 2**32 and rol_s denotes cyclic left -+ * shift (rotate) over s positions. -+ * -+ * -+ * for i := 0 to t-1 { -+ * A := h0; B := h1; C := h2; D = h3; E = h4; -+ * A' := h0; B' := h1; C' := h2; D' = h3; E' = h4; -+ * for j := 0 to 79 { -+ * T := rol_s(j)(A [+] f(j, B, C, D) [+] X[i][r(j)] [+] K(j)) [+] E; -+ * A := E; E := D; D := rol_10(C); C := B; B := T; -+ * T := rol_s'(j)(A' [+] f(79-j, B', C', D') [+] X[i][r'(j)] -+ [+] K'(j)) [+] E'; -+ * A' := E'; E' := D'; D' := rol_10(C'); C' := B'; B' := T; -+ * } -+ * T := h1 [+] C [+] D'; h1 := h2 [+] D [+] E'; h2 := h3 [+] E [+] A'; -+ * h3 := h4 [+] A [+] B'; h4 := h0 [+] B [+] C'; h0 := T; -+ * } -+ */ -+ -+/* Some examples: -+ * "" 9c1185a5c5e9fc54612808977ee8f548b2258d31 -+ * "a" 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe -+ * "abc" 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc -+ * "message digest" 5d0689ef49d2fae572b881b123a85ffa21595f36 -+ * "a...z" f71c27109c692c1b56bbdceb5b9d2865b3708dbc -+ * "abcdbcde...nopq" 12a053384a9c0c88e405a06c27dcf49ada62eb2b -+ * "A...Za...z0...9" b0e20b6e3116640286ed3a87a5713079b21f5189 -+ * 8 times "1234567890" 9b752e45573d4b39f4dbd3323cab82bf63326bfb -+ * 1 million times "a" 52783243c1697bdbe16d37f97f68f08325dc1528 -+ */ -+ -+ -+static void -+rmd160_init( RMD160_CONTEXT *hd ) -+{ -+ hd->h0 = 0x67452301; -+ hd->h1 = 0xEFCDAB89; -+ hd->h2 = 0x98BADCFE; -+ hd->h3 = 0x10325476; -+ hd->h4 = 0xC3D2E1F0; -+ hd->nblocks = 0; -+ hd->count = 0; -+} -+ -+ -+ -+/**************** -+ * Transform the message X which consists of 16 32-bit-words -+ */ -+static void -+transform( RMD160_CONTEXT *hd, byte *data ) -+{ -+ u32 a,b,c,d,e,aa,bb,cc,dd,ee,t; -+ #if BYTE_ORDER == BIG_ENDIAN -+ u32 x[16]; -+ { int i; -+ byte *p2, *p1; -+ for(i=0, p1=data, p2=(byte*)x; i < 16; i++, p2 += 4 ) { -+ p2[3] = *p1++; -+ p2[2] = *p1++; -+ p2[1] = *p1++; -+ p2[0] = *p1++; -+ } -+ } -+ #else -+ #if 0 -+ u32 *x =(u32*)data; -+ #else -+ /* this version is better because it is always aligned; -+ * The performance penalty on a 586-100 is about 6% which -+ * is acceptable - because the data is more local it might -+ * also be possible that this is faster on some machines. -+ * This function (when compiled with -02 on gcc 2.7.2) -+ * executes on a 586-100 (39.73 bogomips) at about 1900kb/sec; -+ * [measured with a 4MB data and "gpgm --print-md rmd160"] */ -+ u32 x[16]; -+ memcpy( x, data, 64 ); -+ #endif -+ #endif -+ -+ -+#define K0 0x00000000 -+#define K1 0x5A827999 -+#define K2 0x6ED9EBA1 -+#define K3 0x8F1BBCDC -+#define K4 0xA953FD4E -+#define KK0 0x50A28BE6 -+#define KK1 0x5C4DD124 -+#define KK2 0x6D703EF3 -+#define KK3 0x7A6D76E9 -+#define KK4 0x00000000 -+#define F0(x,y,z) ( (x) ^ (y) ^ (z) ) -+#define F1(x,y,z) ( ((x) & (y)) | (~(x) & (z)) ) -+#define F2(x,y,z) ( ((x) | ~(y)) ^ (z) ) -+#define F3(x,y,z) ( ((x) & (z)) | ((y) & ~(z)) ) -+#define F4(x,y,z) ( (x) ^ ((y) | ~(z)) ) -+#define R(a,b,c,d,e,f,k,r,s) do { t = a + f(b,c,d) + k + x[r]; \ -+ a = rol(t,s) + e; \ -+ c = rol(c,10); \ -+ } while(0) -+ -+ /* left lane */ -+ a = hd->h0; -+ b = hd->h1; -+ c = hd->h2; -+ d = hd->h3; -+ e = hd->h4; -+ R( a, b, c, d, e, F0, K0, 0, 11 ); -+ R( e, a, b, c, d, F0, K0, 1, 14 ); -+ R( d, e, a, b, c, F0, K0, 2, 15 ); -+ R( c, d, e, a, b, F0, K0, 3, 12 ); -+ R( b, c, d, e, a, F0, K0, 4, 5 ); -+ R( a, b, c, d, e, F0, K0, 5, 8 ); -+ R( e, a, b, c, d, F0, K0, 6, 7 ); -+ R( d, e, a, b, c, F0, K0, 7, 9 ); -+ R( c, d, e, a, b, F0, K0, 8, 11 ); -+ R( b, c, d, e, a, F0, K0, 9, 13 ); -+ R( a, b, c, d, e, F0, K0, 10, 14 ); -+ R( e, a, b, c, d, F0, K0, 11, 15 ); -+ R( d, e, a, b, c, F0, K0, 12, 6 ); -+ R( c, d, e, a, b, F0, K0, 13, 7 ); -+ R( b, c, d, e, a, F0, K0, 14, 9 ); -+ R( a, b, c, d, e, F0, K0, 15, 8 ); -+ R( e, a, b, c, d, F1, K1, 7, 7 ); -+ R( d, e, a, b, c, F1, K1, 4, 6 ); -+ R( c, d, e, a, b, F1, K1, 13, 8 ); -+ R( b, c, d, e, a, F1, K1, 1, 13 ); -+ R( a, b, c, d, e, F1, K1, 10, 11 ); -+ R( e, a, b, c, d, F1, K1, 6, 9 ); -+ R( d, e, a, b, c, F1, K1, 15, 7 ); -+ R( c, d, e, a, b, F1, K1, 3, 15 ); -+ R( b, c, d, e, a, F1, K1, 12, 7 ); -+ R( a, b, c, d, e, F1, K1, 0, 12 ); -+ R( e, a, b, c, d, F1, K1, 9, 15 ); -+ R( d, e, a, b, c, F1, K1, 5, 9 ); -+ R( c, d, e, a, b, F1, K1, 2, 11 ); -+ R( b, c, d, e, a, F1, K1, 14, 7 ); -+ R( a, b, c, d, e, F1, K1, 11, 13 ); -+ R( e, a, b, c, d, F1, K1, 8, 12 ); -+ R( d, e, a, b, c, F2, K2, 3, 11 ); -+ R( c, d, e, a, b, F2, K2, 10, 13 ); -+ R( b, c, d, e, a, F2, K2, 14, 6 ); -+ R( a, b, c, d, e, F2, K2, 4, 7 ); -+ R( e, a, b, c, d, F2, K2, 9, 14 ); -+ R( d, e, a, b, c, F2, K2, 15, 9 ); -+ R( c, d, e, a, b, F2, K2, 8, 13 ); -+ R( b, c, d, e, a, F2, K2, 1, 15 ); -+ R( a, b, c, d, e, F2, K2, 2, 14 ); -+ R( e, a, b, c, d, F2, K2, 7, 8 ); -+ R( d, e, a, b, c, F2, K2, 0, 13 ); -+ R( c, d, e, a, b, F2, K2, 6, 6 ); -+ R( b, c, d, e, a, F2, K2, 13, 5 ); -+ R( a, b, c, d, e, F2, K2, 11, 12 ); -+ R( e, a, b, c, d, F2, K2, 5, 7 ); -+ R( d, e, a, b, c, F2, K2, 12, 5 ); -+ R( c, d, e, a, b, F3, K3, 1, 11 ); -+ R( b, c, d, e, a, F3, K3, 9, 12 ); -+ R( a, b, c, d, e, F3, K3, 11, 14 ); -+ R( e, a, b, c, d, F3, K3, 10, 15 ); -+ R( d, e, a, b, c, F3, K3, 0, 14 ); -+ R( c, d, e, a, b, F3, K3, 8, 15 ); -+ R( b, c, d, e, a, F3, K3, 12, 9 ); -+ R( a, b, c, d, e, F3, K3, 4, 8 ); -+ R( e, a, b, c, d, F3, K3, 13, 9 ); -+ R( d, e, a, b, c, F3, K3, 3, 14 ); -+ R( c, d, e, a, b, F3, K3, 7, 5 ); -+ R( b, c, d, e, a, F3, K3, 15, 6 ); -+ R( a, b, c, d, e, F3, K3, 14, 8 ); -+ R( e, a, b, c, d, F3, K3, 5, 6 ); -+ R( d, e, a, b, c, F3, K3, 6, 5 ); -+ R( c, d, e, a, b, F3, K3, 2, 12 ); -+ R( b, c, d, e, a, F4, K4, 4, 9 ); -+ R( a, b, c, d, e, F4, K4, 0, 15 ); -+ R( e, a, b, c, d, F4, K4, 5, 5 ); -+ R( d, e, a, b, c, F4, K4, 9, 11 ); -+ R( c, d, e, a, b, F4, K4, 7, 6 ); -+ R( b, c, d, e, a, F4, K4, 12, 8 ); -+ R( a, b, c, d, e, F4, K4, 2, 13 ); -+ R( e, a, b, c, d, F4, K4, 10, 12 ); -+ R( d, e, a, b, c, F4, K4, 14, 5 ); -+ R( c, d, e, a, b, F4, K4, 1, 12 ); -+ R( b, c, d, e, a, F4, K4, 3, 13 ); -+ R( a, b, c, d, e, F4, K4, 8, 14 ); -+ R( e, a, b, c, d, F4, K4, 11, 11 ); -+ R( d, e, a, b, c, F4, K4, 6, 8 ); -+ R( c, d, e, a, b, F4, K4, 15, 5 ); -+ R( b, c, d, e, a, F4, K4, 13, 6 ); -+ -+ aa = a; bb = b; cc = c; dd = d; ee = e; -+ -+ /* right lane */ -+ a = hd->h0; -+ b = hd->h1; -+ c = hd->h2; -+ d = hd->h3; -+ e = hd->h4; -+ R( a, b, c, d, e, F4, KK0, 5, 8); -+ R( e, a, b, c, d, F4, KK0, 14, 9); -+ R( d, e, a, b, c, F4, KK0, 7, 9); -+ R( c, d, e, a, b, F4, KK0, 0, 11); -+ R( b, c, d, e, a, F4, KK0, 9, 13); -+ R( a, b, c, d, e, F4, KK0, 2, 15); -+ R( e, a, b, c, d, F4, KK0, 11, 15); -+ R( d, e, a, b, c, F4, KK0, 4, 5); -+ R( c, d, e, a, b, F4, KK0, 13, 7); -+ R( b, c, d, e, a, F4, KK0, 6, 7); -+ R( a, b, c, d, e, F4, KK0, 15, 8); -+ R( e, a, b, c, d, F4, KK0, 8, 11); -+ R( d, e, a, b, c, F4, KK0, 1, 14); -+ R( c, d, e, a, b, F4, KK0, 10, 14); -+ R( b, c, d, e, a, F4, KK0, 3, 12); -+ R( a, b, c, d, e, F4, KK0, 12, 6); -+ R( e, a, b, c, d, F3, KK1, 6, 9); -+ R( d, e, a, b, c, F3, KK1, 11, 13); -+ R( c, d, e, a, b, F3, KK1, 3, 15); -+ R( b, c, d, e, a, F3, KK1, 7, 7); -+ R( a, b, c, d, e, F3, KK1, 0, 12); -+ R( e, a, b, c, d, F3, KK1, 13, 8); -+ R( d, e, a, b, c, F3, KK1, 5, 9); -+ R( c, d, e, a, b, F3, KK1, 10, 11); -+ R( b, c, d, e, a, F3, KK1, 14, 7); -+ R( a, b, c, d, e, F3, KK1, 15, 7); -+ R( e, a, b, c, d, F3, KK1, 8, 12); -+ R( d, e, a, b, c, F3, KK1, 12, 7); -+ R( c, d, e, a, b, F3, KK1, 4, 6); -+ R( b, c, d, e, a, F3, KK1, 9, 15); -+ R( a, b, c, d, e, F3, KK1, 1, 13); -+ R( e, a, b, c, d, F3, KK1, 2, 11); -+ R( d, e, a, b, c, F2, KK2, 15, 9); -+ R( c, d, e, a, b, F2, KK2, 5, 7); -+ R( b, c, d, e, a, F2, KK2, 1, 15); -+ R( a, b, c, d, e, F2, KK2, 3, 11); -+ R( e, a, b, c, d, F2, KK2, 7, 8); -+ R( d, e, a, b, c, F2, KK2, 14, 6); -+ R( c, d, e, a, b, F2, KK2, 6, 6); -+ R( b, c, d, e, a, F2, KK2, 9, 14); -+ R( a, b, c, d, e, F2, KK2, 11, 12); -+ R( e, a, b, c, d, F2, KK2, 8, 13); -+ R( d, e, a, b, c, F2, KK2, 12, 5); -+ R( c, d, e, a, b, F2, KK2, 2, 14); -+ R( b, c, d, e, a, F2, KK2, 10, 13); -+ R( a, b, c, d, e, F2, KK2, 0, 13); -+ R( e, a, b, c, d, F2, KK2, 4, 7); -+ R( d, e, a, b, c, F2, KK2, 13, 5); -+ R( c, d, e, a, b, F1, KK3, 8, 15); -+ R( b, c, d, e, a, F1, KK3, 6, 5); -+ R( a, b, c, d, e, F1, KK3, 4, 8); -+ R( e, a, b, c, d, F1, KK3, 1, 11); -+ R( d, e, a, b, c, F1, KK3, 3, 14); -+ R( c, d, e, a, b, F1, KK3, 11, 14); -+ R( b, c, d, e, a, F1, KK3, 15, 6); -+ R( a, b, c, d, e, F1, KK3, 0, 14); -+ R( e, a, b, c, d, F1, KK3, 5, 6); -+ R( d, e, a, b, c, F1, KK3, 12, 9); -+ R( c, d, e, a, b, F1, KK3, 2, 12); -+ R( b, c, d, e, a, F1, KK3, 13, 9); -+ R( a, b, c, d, e, F1, KK3, 9, 12); -+ R( e, a, b, c, d, F1, KK3, 7, 5); -+ R( d, e, a, b, c, F1, KK3, 10, 15); -+ R( c, d, e, a, b, F1, KK3, 14, 8); -+ R( b, c, d, e, a, F0, KK4, 12, 8); -+ R( a, b, c, d, e, F0, KK4, 15, 5); -+ R( e, a, b, c, d, F0, KK4, 10, 12); -+ R( d, e, a, b, c, F0, KK4, 4, 9); -+ R( c, d, e, a, b, F0, KK4, 1, 12); -+ R( b, c, d, e, a, F0, KK4, 5, 5); -+ R( a, b, c, d, e, F0, KK4, 8, 14); -+ R( e, a, b, c, d, F0, KK4, 7, 6); -+ R( d, e, a, b, c, F0, KK4, 6, 8); -+ R( c, d, e, a, b, F0, KK4, 2, 13); -+ R( b, c, d, e, a, F0, KK4, 13, 6); -+ R( a, b, c, d, e, F0, KK4, 14, 5); -+ R( e, a, b, c, d, F0, KK4, 0, 15); -+ R( d, e, a, b, c, F0, KK4, 3, 13); -+ R( c, d, e, a, b, F0, KK4, 9, 11); -+ R( b, c, d, e, a, F0, KK4, 11, 11); -+ -+ -+ t = hd->h1 + d + cc; -+ hd->h1 = hd->h2 + e + dd; -+ hd->h2 = hd->h3 + a + ee; -+ hd->h3 = hd->h4 + b + aa; -+ hd->h4 = hd->h0 + c + bb; -+ hd->h0 = t; -+} -+ -+ -+/* Update the message digest with the contents -+ * of INBUF with length INLEN. -+ */ -+static void -+rmd160_write( RMD160_CONTEXT *hd, byte *inbuf, size_t inlen) -+{ -+ if( hd->count == 64 ) { /* flush the buffer */ -+ transform( hd, hd->buf ); -+ hd->count = 0; -+ hd->nblocks++; -+ } -+ if( !inbuf ) -+ return; -+ if( hd->count ) { -+ for( ; inlen && hd->count < 64; inlen-- ) -+ hd->buf[hd->count++] = *inbuf++; -+ rmd160_write( hd, NULL, 0 ); -+ if( !inlen ) -+ return; -+ } -+ -+ while( inlen >= 64 ) { -+ transform( hd, inbuf ); -+ hd->count = 0; -+ hd->nblocks++; -+ inlen -= 64; -+ inbuf += 64; -+ } -+ for( ; inlen && hd->count < 64; inlen-- ) -+ hd->buf[hd->count++] = *inbuf++; -+} -+ -+/* The routine terminates the computation -+ */ -+ -+static void -+rmd160_final( RMD160_CONTEXT *hd ) -+{ -+ u32 t, msb, lsb; -+ byte *p; -+ -+ rmd160_write(hd, NULL, 0); /* flush */; -+ -+ msb = 0; -+ t = hd->nblocks; -+ if( (lsb = t << 6) < t ) /* multiply by 64 to make a byte count */ -+ msb++; -+ msb += t >> 26; -+ t = lsb; -+ if( (lsb = t + hd->count) < t ) /* add the count */ -+ msb++; -+ t = lsb; -+ if( (lsb = t << 3) < t ) /* multiply by 8 to make a bit count */ -+ msb++; -+ msb += t >> 29; -+ -+ if( hd->count < 56 ) { /* enough room */ -+ hd->buf[hd->count++] = 0x80; /* pad */ -+ while( hd->count < 56 ) -+ hd->buf[hd->count++] = 0; /* pad */ -+ } -+ else { /* need one extra block */ -+ hd->buf[hd->count++] = 0x80; /* pad character */ -+ while( hd->count < 64 ) -+ hd->buf[hd->count++] = 0; -+ rmd160_write(hd, NULL, 0); /* flush */; -+ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */ -+ } -+ /* append the 64 bit count */ -+ hd->buf[56] = lsb ; -+ hd->buf[57] = lsb >> 8; -+ hd->buf[58] = lsb >> 16; -+ hd->buf[59] = lsb >> 24; -+ hd->buf[60] = msb ; -+ hd->buf[61] = msb >> 8; -+ hd->buf[62] = msb >> 16; -+ hd->buf[63] = msb >> 24; -+ transform( hd, hd->buf ); -+ -+ p = hd->buf; -+ #if BYTE_ORDER == BIG_ENDIAN -+ #define X(a) do { *p++ = hd->h##a ; *p++ = hd->h##a >> 8; \ -+ *p++ = hd->h##a >> 16; *p++ = hd->h##a >> 24; } while(0) -+ #else /* little endian */ -+ #define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0) -+ #endif -+ X(0); -+ X(1); -+ X(2); -+ X(3); -+ X(4); -+ #undef X -+} -+ -+/**************** -+ * Shortcut functions which puts the hash value of the supplied buffer -+ * into outbuf which must have a size of 20 bytes. -+ */ -+void -+rmd160_hash_buffer( char *outbuf, const char *buffer, size_t length ) -+{ -+ RMD160_CONTEXT hd; -+ -+ rmd160_init( &hd ); -+ rmd160_write( &hd, (byte*)buffer, length ); -+ rmd160_final( &hd ); -+ memcpy( outbuf, hd.buf, 20 ); -+} ---- util-linux-2.12q/mount/rmd160.h -+++ util-linux-2.12q/mount/rmd160.h -@@ -0,0 +1,9 @@ -+#ifndef RMD160_H -+#define RMD160_H -+ -+void -+rmd160_hash_buffer( char *outbuf, const char *buffer, size_t length ); -+ -+#endif /*RMD160_H*/ -+ -+ ---- util-linux-2.12q/mount/sha512.c -+++ util-linux-2.12q/mount/sha512.c -@@ -0,0 +1,432 @@ -+/* -+ * sha512.c -+ * -+ * Written by Jari Ruusu, April 16 2001 -+ * -+ * Copyright 2001 by Jari Ruusu. -+ * Redistribution of this file is permitted under the GNU Public License. -+ */ -+ -+#include -+#include -+#include "sha512.h" -+ -+/* Define one or more of these. If none is defined, you get all of them */ -+#if !defined(SHA256_NEEDED)&&!defined(SHA512_NEEDED)&&!defined(SHA384_NEEDED) -+# define SHA256_NEEDED 1 -+# define SHA512_NEEDED 1 -+# define SHA384_NEEDED 1 -+#endif -+ -+#if defined(SHA256_NEEDED) -+static const u_int32_t sha256_hashInit[8] = { -+ 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, -+ 0x1f83d9ab, 0x5be0cd19 -+}; -+static const u_int32_t sha256_K[64] = { -+ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, -+ 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, -+ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, -+ 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, -+ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, -+ 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, -+ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, -+ 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, -+ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, -+ 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, -+ 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 -+}; -+#endif -+ -+#if defined(SHA512_NEEDED) -+static const u_int64_t sha512_hashInit[8] = { -+ 0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, 0x3c6ef372fe94f82bULL, -+ 0xa54ff53a5f1d36f1ULL, 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, -+ 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL -+}; -+#endif -+ -+#if defined(SHA384_NEEDED) -+static const u_int64_t sha384_hashInit[8] = { -+ 0xcbbb9d5dc1059ed8ULL, 0x629a292a367cd507ULL, 0x9159015a3070dd17ULL, -+ 0x152fecd8f70e5939ULL, 0x67332667ffc00b31ULL, 0x8eb44a8768581511ULL, -+ 0xdb0c2e0d64f98fa7ULL, 0x47b5481dbefa4fa4ULL -+}; -+#endif -+ -+#if defined(SHA512_NEEDED) || defined(SHA384_NEEDED) -+static const u_int64_t sha512_K[80] = { -+ 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL, -+ 0xe9b5dba58189dbbcULL, 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL, -+ 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL, 0xd807aa98a3030242ULL, -+ 0x12835b0145706fbeULL, 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL, -+ 0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL, 0x9bdc06a725c71235ULL, -+ 0xc19bf174cf692694ULL, 0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL, -+ 0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL, 0x2de92c6f592b0275ULL, -+ 0x4a7484aa6ea6e483ULL, 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL, -+ 0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL, 0xb00327c898fb213fULL, -+ 0xbf597fc7beef0ee4ULL, 0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL, -+ 0x06ca6351e003826fULL, 0x142929670a0e6e70ULL, 0x27b70a8546d22ffcULL, -+ 0x2e1b21385c26c926ULL, 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL, -+ 0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL, 0x81c2c92e47edaee6ULL, -+ 0x92722c851482353bULL, 0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL, -+ 0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL, 0xd192e819d6ef5218ULL, -+ 0xd69906245565a910ULL, 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL, -+ 0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL, 0x2748774cdf8eeb99ULL, -+ 0x34b0bcb5e19b48a8ULL, 0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL, -+ 0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL, 0x748f82ee5defb2fcULL, -+ 0x78a5636f43172f60ULL, 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL, -+ 0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL, 0xbef9a3f7b2c67915ULL, -+ 0xc67178f2e372532bULL, 0xca273eceea26619cULL, 0xd186b8c721c0c207ULL, -+ 0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL, 0x06f067aa72176fbaULL, -+ 0x0a637dc5a2c898a6ULL, 0x113f9804bef90daeULL, 0x1b710b35131c471bULL, -+ 0x28db77f523047d84ULL, 0x32caab7b40c72493ULL, 0x3c9ebe0a15c9bebcULL, -+ 0x431d67c49c100d4cULL, 0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL, -+ 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL -+}; -+#endif -+ -+#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z))) -+#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) -+#define R(x,y) ((y) >> (x)) -+ -+#if defined(SHA256_NEEDED) -+void sha256_init(sha256_context *ctx) -+{ -+ memcpy(&ctx->sha_H[0], &sha256_hashInit[0], sizeof(ctx->sha_H)); -+ ctx->sha_blocks = 0; -+ ctx->sha_bufCnt = 0; -+} -+ -+#define S(x,y) (((y) >> (x)) | ((y) << (32 - (x)))) -+#define uSig0(x) ((S(2,(x))) ^ (S(13,(x))) ^ (S(22,(x)))) -+#define uSig1(x) ((S(6,(x))) ^ (S(11,(x))) ^ (S(25,(x)))) -+#define lSig0(x) ((S(7,(x))) ^ (S(18,(x))) ^ (R(3,(x)))) -+#define lSig1(x) ((S(17,(x))) ^ (S(19,(x))) ^ (R(10,(x)))) -+ -+static void sha256_transform(sha256_context *ctx, unsigned char *datap) -+{ -+ register int j; -+ u_int32_t a, b, c, d, e, f, g, h; -+ u_int32_t T1, T2, W[64], Wm2, Wm15; -+ -+ /* read the data, big endian byte order */ -+ j = 0; -+ do { -+ W[j] = (((u_int32_t)(datap[0]))<<24) | (((u_int32_t)(datap[1]))<<16) | -+ (((u_int32_t)(datap[2]))<<8 ) | ((u_int32_t)(datap[3])); -+ datap += 4; -+ } while(++j < 16); -+ -+ /* initialize variables a...h */ -+ a = ctx->sha_H[0]; -+ b = ctx->sha_H[1]; -+ c = ctx->sha_H[2]; -+ d = ctx->sha_H[3]; -+ e = ctx->sha_H[4]; -+ f = ctx->sha_H[5]; -+ g = ctx->sha_H[6]; -+ h = ctx->sha_H[7]; -+ -+ /* apply compression function */ -+ j = 0; -+ do { -+ if(j >= 16) { -+ Wm2 = W[j - 2]; -+ Wm15 = W[j - 15]; -+ W[j] = lSig1(Wm2) + W[j - 7] + lSig0(Wm15) + W[j - 16]; -+ } -+ T1 = h + uSig1(e) + Ch(e,f,g) + sha256_K[j] + W[j]; -+ T2 = uSig0(a) + Maj(a,b,c); -+ h = g; g = f; f = e; -+ e = d + T1; -+ d = c; c = b; b = a; -+ a = T1 + T2; -+ } while(++j < 64); -+ -+ /* compute intermediate hash value */ -+ ctx->sha_H[0] += a; -+ ctx->sha_H[1] += b; -+ ctx->sha_H[2] += c; -+ ctx->sha_H[3] += d; -+ ctx->sha_H[4] += e; -+ ctx->sha_H[5] += f; -+ ctx->sha_H[6] += g; -+ ctx->sha_H[7] += h; -+ -+ ctx->sha_blocks++; -+} -+ -+void sha256_write(sha256_context *ctx, unsigned char *datap, int length) -+{ -+ while(length > 0) { -+ if(!ctx->sha_bufCnt) { -+ while(length >= sizeof(ctx->sha_out)) { -+ sha256_transform(ctx, datap); -+ datap += sizeof(ctx->sha_out); -+ length -= sizeof(ctx->sha_out); -+ } -+ if(!length) return; -+ } -+ ctx->sha_out[ctx->sha_bufCnt] = *datap++; -+ length--; -+ if(++ctx->sha_bufCnt == sizeof(ctx->sha_out)) { -+ sha256_transform(ctx, &ctx->sha_out[0]); -+ ctx->sha_bufCnt = 0; -+ } -+ } -+} -+ -+void sha256_final(sha256_context *ctx) -+{ -+ register int j; -+ u_int64_t bitLength; -+ u_int32_t i; -+ unsigned char padByte, *datap; -+ -+ bitLength = (ctx->sha_blocks << 9) | (ctx->sha_bufCnt << 3); -+ padByte = 0x80; -+ sha256_write(ctx, &padByte, 1); -+ -+ /* pad extra space with zeroes */ -+ padByte = 0; -+ while(ctx->sha_bufCnt != 56) { -+ sha256_write(ctx, &padByte, 1); -+ } -+ -+ /* write bit length, big endian byte order */ -+ ctx->sha_out[56] = bitLength >> 56; -+ ctx->sha_out[57] = bitLength >> 48; -+ ctx->sha_out[58] = bitLength >> 40; -+ ctx->sha_out[59] = bitLength >> 32; -+ ctx->sha_out[60] = bitLength >> 24; -+ ctx->sha_out[61] = bitLength >> 16; -+ ctx->sha_out[62] = bitLength >> 8; -+ ctx->sha_out[63] = bitLength; -+ sha256_transform(ctx, &ctx->sha_out[0]); -+ -+ /* return results in ctx->sha_out[0...31] */ -+ datap = &ctx->sha_out[0]; -+ j = 0; -+ do { -+ i = ctx->sha_H[j]; -+ datap[0] = i >> 24; -+ datap[1] = i >> 16; -+ datap[2] = i >> 8; -+ datap[3] = i; -+ datap += 4; -+ } while(++j < 8); -+ -+ /* clear sensitive information */ -+ memset(&ctx->sha_out[32], 0, sizeof(sha256_context) - 32); -+} -+ -+void sha256_hash_buffer(unsigned char *ib, int ile, unsigned char *ob, int ole) -+{ -+ sha256_context ctx; -+ -+ if(ole < 1) return; -+ memset(ob, 0, ole); -+ if(ole > 32) ole = 32; -+ sha256_init(&ctx); -+ sha256_write(&ctx, ib, ile); -+ sha256_final(&ctx); -+ memcpy(ob, &ctx.sha_out[0], ole); -+ memset(&ctx, 0, sizeof(ctx)); -+} -+ -+#endif -+ -+#if defined(SHA512_NEEDED) -+void sha512_init(sha512_context *ctx) -+{ -+ memcpy(&ctx->sha_H[0], &sha512_hashInit[0], sizeof(ctx->sha_H)); -+ ctx->sha_blocks = 0; -+ ctx->sha_blocksMSB = 0; -+ ctx->sha_bufCnt = 0; -+} -+#endif -+ -+#if defined(SHA512_NEEDED) || defined(SHA384_NEEDED) -+#undef S -+#undef uSig0 -+#undef uSig1 -+#undef lSig0 -+#undef lSig1 -+#define S(x,y) (((y) >> (x)) | ((y) << (64 - (x)))) -+#define uSig0(x) ((S(28,(x))) ^ (S(34,(x))) ^ (S(39,(x)))) -+#define uSig1(x) ((S(14,(x))) ^ (S(18,(x))) ^ (S(41,(x)))) -+#define lSig0(x) ((S(1,(x))) ^ (S(8,(x))) ^ (R(7,(x)))) -+#define lSig1(x) ((S(19,(x))) ^ (S(61,(x))) ^ (R(6,(x)))) -+ -+static void sha512_transform(sha512_context *ctx, unsigned char *datap) -+{ -+ register int j; -+ u_int64_t a, b, c, d, e, f, g, h; -+ u_int64_t T1, T2, W[80], Wm2, Wm15; -+ -+ /* read the data, big endian byte order */ -+ j = 0; -+ do { -+ W[j] = (((u_int64_t)(datap[0]))<<56) | (((u_int64_t)(datap[1]))<<48) | -+ (((u_int64_t)(datap[2]))<<40) | (((u_int64_t)(datap[3]))<<32) | -+ (((u_int64_t)(datap[4]))<<24) | (((u_int64_t)(datap[5]))<<16) | -+ (((u_int64_t)(datap[6]))<<8 ) | ((u_int64_t)(datap[7])); -+ datap += 8; -+ } while(++j < 16); -+ -+ /* initialize variables a...h */ -+ a = ctx->sha_H[0]; -+ b = ctx->sha_H[1]; -+ c = ctx->sha_H[2]; -+ d = ctx->sha_H[3]; -+ e = ctx->sha_H[4]; -+ f = ctx->sha_H[5]; -+ g = ctx->sha_H[6]; -+ h = ctx->sha_H[7]; -+ -+ /* apply compression function */ -+ j = 0; -+ do { -+ if(j >= 16) { -+ Wm2 = W[j - 2]; -+ Wm15 = W[j - 15]; -+ W[j] = lSig1(Wm2) + W[j - 7] + lSig0(Wm15) + W[j - 16]; -+ } -+ T1 = h + uSig1(e) + Ch(e,f,g) + sha512_K[j] + W[j]; -+ T2 = uSig0(a) + Maj(a,b,c); -+ h = g; g = f; f = e; -+ e = d + T1; -+ d = c; c = b; b = a; -+ a = T1 + T2; -+ } while(++j < 80); -+ -+ /* compute intermediate hash value */ -+ ctx->sha_H[0] += a; -+ ctx->sha_H[1] += b; -+ ctx->sha_H[2] += c; -+ ctx->sha_H[3] += d; -+ ctx->sha_H[4] += e; -+ ctx->sha_H[5] += f; -+ ctx->sha_H[6] += g; -+ ctx->sha_H[7] += h; -+ -+ ctx->sha_blocks++; -+ if(!ctx->sha_blocks) ctx->sha_blocksMSB++; -+} -+ -+void sha512_write(sha512_context *ctx, unsigned char *datap, int length) -+{ -+ while(length > 0) { -+ if(!ctx->sha_bufCnt) { -+ while(length >= sizeof(ctx->sha_out)) { -+ sha512_transform(ctx, datap); -+ datap += sizeof(ctx->sha_out); -+ length -= sizeof(ctx->sha_out); -+ } -+ if(!length) return; -+ } -+ ctx->sha_out[ctx->sha_bufCnt] = *datap++; -+ length--; -+ if(++ctx->sha_bufCnt == sizeof(ctx->sha_out)) { -+ sha512_transform(ctx, &ctx->sha_out[0]); -+ ctx->sha_bufCnt = 0; -+ } -+ } -+} -+ -+void sha512_final(sha512_context *ctx) -+{ -+ register int j; -+ u_int64_t bitLength, bitLengthMSB; -+ u_int64_t i; -+ unsigned char padByte, *datap; -+ -+ bitLength = (ctx->sha_blocks << 10) | (ctx->sha_bufCnt << 3); -+ bitLengthMSB = (ctx->sha_blocksMSB << 10) | (ctx->sha_blocks >> 54); -+ padByte = 0x80; -+ sha512_write(ctx, &padByte, 1); -+ -+ /* pad extra space with zeroes */ -+ padByte = 0; -+ while(ctx->sha_bufCnt != 112) { -+ sha512_write(ctx, &padByte, 1); -+ } -+ -+ /* write bit length, big endian byte order */ -+ ctx->sha_out[112] = bitLengthMSB >> 56; -+ ctx->sha_out[113] = bitLengthMSB >> 48; -+ ctx->sha_out[114] = bitLengthMSB >> 40; -+ ctx->sha_out[115] = bitLengthMSB >> 32; -+ ctx->sha_out[116] = bitLengthMSB >> 24; -+ ctx->sha_out[117] = bitLengthMSB >> 16; -+ ctx->sha_out[118] = bitLengthMSB >> 8; -+ ctx->sha_out[119] = bitLengthMSB; -+ ctx->sha_out[120] = bitLength >> 56; -+ ctx->sha_out[121] = bitLength >> 48; -+ ctx->sha_out[122] = bitLength >> 40; -+ ctx->sha_out[123] = bitLength >> 32; -+ ctx->sha_out[124] = bitLength >> 24; -+ ctx->sha_out[125] = bitLength >> 16; -+ ctx->sha_out[126] = bitLength >> 8; -+ ctx->sha_out[127] = bitLength; -+ sha512_transform(ctx, &ctx->sha_out[0]); -+ -+ /* return results in ctx->sha_out[0...63] */ -+ datap = &ctx->sha_out[0]; -+ j = 0; -+ do { -+ i = ctx->sha_H[j]; -+ datap[0] = i >> 56; -+ datap[1] = i >> 48; -+ datap[2] = i >> 40; -+ datap[3] = i >> 32; -+ datap[4] = i >> 24; -+ datap[5] = i >> 16; -+ datap[6] = i >> 8; -+ datap[7] = i; -+ datap += 8; -+ } while(++j < 8); -+ -+ /* clear sensitive information */ -+ memset(&ctx->sha_out[64], 0, sizeof(sha512_context) - 64); -+} -+ -+void sha512_hash_buffer(unsigned char *ib, int ile, unsigned char *ob, int ole) -+{ -+ sha512_context ctx; -+ -+ if(ole < 1) return; -+ memset(ob, 0, ole); -+ if(ole > 64) ole = 64; -+ sha512_init(&ctx); -+ sha512_write(&ctx, ib, ile); -+ sha512_final(&ctx); -+ memcpy(ob, &ctx.sha_out[0], ole); -+ memset(&ctx, 0, sizeof(ctx)); -+} -+#endif -+ -+#if defined(SHA384_NEEDED) -+void sha384_init(sha512_context *ctx) -+{ -+ memcpy(&ctx->sha_H[0], &sha384_hashInit[0], sizeof(ctx->sha_H)); -+ ctx->sha_blocks = 0; -+ ctx->sha_blocksMSB = 0; -+ ctx->sha_bufCnt = 0; -+} -+ -+void sha384_hash_buffer(unsigned char *ib, int ile, unsigned char *ob, int ole) -+{ -+ sha512_context ctx; -+ -+ if(ole < 1) return; -+ memset(ob, 0, ole); -+ if(ole > 48) ole = 48; -+ sha384_init(&ctx); -+ sha512_write(&ctx, ib, ile); -+ sha512_final(&ctx); -+ memcpy(ob, &ctx.sha_out[0], ole); -+ memset(&ctx, 0, sizeof(ctx)); -+} -+#endif ---- util-linux-2.12q/mount/sha512.h -+++ util-linux-2.12q/mount/sha512.h -@@ -0,0 +1,45 @@ -+/* -+ * sha512.h -+ * -+ * Written by Jari Ruusu, April 16 2001 -+ * -+ * Copyright 2001 by Jari Ruusu. -+ * Redistribution of this file is permitted under the GNU Public License. -+ */ -+ -+#include -+ -+typedef struct { -+ unsigned char sha_out[64]; /* results are here, bytes 0...31 */ -+ u_int32_t sha_H[8]; -+ u_int64_t sha_blocks; -+ int sha_bufCnt; -+} sha256_context; -+ -+typedef struct { -+ unsigned char sha_out[128]; /* results are here, bytes 0...63 */ -+ u_int64_t sha_H[8]; -+ u_int64_t sha_blocks; -+ u_int64_t sha_blocksMSB; -+ int sha_bufCnt; -+} sha512_context; -+ -+/* no sha384_context, use sha512_context */ -+ -+/* 256 bit hash, provides 128 bits of security against collision attacks */ -+extern void sha256_init(sha256_context *); -+extern void sha256_write(sha256_context *, unsigned char *, int); -+extern void sha256_final(sha256_context *); -+extern void sha256_hash_buffer(unsigned char *, int, unsigned char *, int); -+ -+/* 512 bit hash, provides 256 bits of security against collision attacks */ -+extern void sha512_init(sha512_context *); -+extern void sha512_write(sha512_context *, unsigned char *, int); -+extern void sha512_final(sha512_context *); -+extern void sha512_hash_buffer(unsigned char *, int, unsigned char *, int); -+ -+/* 384 bit hash, provides 192 bits of security against collision attacks */ -+extern void sha384_init(sha512_context *); -+/* no sha384_write(), use sha512_write() */ -+/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ -+extern void sha384_hash_buffer(unsigned char *, int, unsigned char *, int); ---- util-linux-2.12q/mount/swapon.8 -+++ util-linux-2.12q/mount/swapon.8 -@@ -142,6 +142,22 @@ - .I /proc/swaps - or - .IR /etc/fstab ). -+.PP -+If -+.I loop=/dev/loop? -+and -+.I encryption=AES128 -+options are present in -+.I /etc/fstab -+then -+.BR "swapon -a" -+will set up loop devices using random keys, run -+.BR "mkswap" -+on them, and enable encrypted swap on specified loop devices. Encrypted loop -+devices are set up with page size offset so that unencrypted swap signatures -+on first page of swap devices are not touched. -+.BR "swapoff -a" -+will tear down such loop devices. - .SH NOTE - You should not use - .B swapon ---- util-linux-2.12q/mount/swapon.c -+++ util-linux-2.12q/mount/swapon.c -@@ -1,22 +1,45 @@ - /* - * A swapon(8)/swapoff(8) for Linux 0.99. - * swapon.c,v 1.1.1.1 1993/11/18 08:40:51 jrs Exp -+ * -+ * 1997-02-xx -+ * - added '-s' (summary option) -+ * 1999-02-22 Arkadiusz Mi¶kiewicz -+ * - added Native Language Support -+ * 1999-03-21 Arnaldo Carvalho de Melo -+ * - fixed strerr(errno) in gettext calls -+ * 2001-03-22 Erik Troan -+ * - added -e option for -a -+ * - -a shouldn't try to add swaps that are already enabled -+ * 2002-04-14 Jari Ruusu -+ * - added encrypted swap support - */ - - #include - #include - #include -+#include - #include - #include - #include - #include -+#include -+#include - #include -+#include -+#include -+#include -+#include -+#include - #include "xmalloc.h" - #include "swap_constants.h" - #include "swapargs.h" - #include "nls.h" - #include "mount_blkid.h" - #include "mount_by_label.h" -+#include "loop.h" -+#include "xstrncpy.h" -+#include "sha512.h" - - #define streq(s, t) (strcmp ((s), (t)) == 0) - -@@ -297,6 +320,260 @@ - } - - static int -+prepare_encrypted_swap(const char *partition, char *loop, char *encryption) -+{ -+ int x, y, fd, ffd; -+ sha512_context s; -+ unsigned char b[4096], multiKeyBits[65][32]; -+ char *a[10], *apiName; -+ struct loop_info64 loopinfo; -+ FILE *f; -+ -+ /* -+ * Some sanity checks -+ */ -+ if(strlen(partition) < 1) { -+ fprintf(stderr, _("swapon: invalid swap device name\n")); -+ return 0; -+ } -+ if(strlen(loop) < 1) { -+ fprintf(stderr, _("swapon: invalid loop device name\n")); -+ return 0; -+ } -+ if(strlen(encryption) < 1) { -+ fprintf(stderr, _("swapon: invalid encryption type\n")); -+ return 0; -+ } -+ -+ /* -+ * Abort if loop device does not exist or is already in use -+ */ -+ if((fd = open(loop, O_RDWR)) == -1) { -+ fprintf(stderr, _("swapon: unable to open loop device %s\n"), loop); -+ return 0; -+ } -+ if(is_unused_loop_device(fd) == 0) { -+ fprintf(stderr, _("swapon: loop device %s already in use\n"), loop); -+ goto errout0; -+ } -+ -+ /* -+ * Compute SHA-512 over first 40 KB of old swap data. This data -+ * is mostly unknown data encrypted using unknown key. SHA-512 hash -+ * output is then used as entropy for new swap encryption key. -+ */ -+ if(!(f = fopen(partition, "r+"))) { -+ fprintf(stderr, _("swapon: unable to open swap device %s\n"), partition); -+ goto errout0; -+ } -+ fseek(f, (long)PAGE_SIZE, SEEK_SET); -+ sha512_init(&s); -+ for(x = 0; x < 10; x++) { -+ if(fread(&b[0], sizeof(b), 1, f) != 1) break; -+ sha512_write(&s, &b[0], sizeof(b)); -+ } -+ sha512_final(&s); -+ -+ /* -+ * Overwrite 40 KB of old swap data 20 times so that recovering -+ * SHA-512 output beyond this point is difficult and expensive. -+ */ -+ for(y = 0; y < 20; y++) { -+ int z; -+ struct { -+ struct timeval tv; -+ unsigned char h[64]; -+ int x,y,z; -+ } j; -+ if(fseek(f, (long)PAGE_SIZE, SEEK_SET)) break; -+ memcpy(&j.h[0], &s.sha_out[0], 64); -+ gettimeofday(&j.tv, NULL); -+ j.y = y; -+ for(x = 0; x < 10; x++) { -+ j.x = x; -+ for(z = 0; z < sizeof(b); z += 64) { -+ j.z = z; -+ sha512_hash_buffer((unsigned char *)&j, sizeof(j), &b[z], 64); -+ } -+ if(fwrite(&b[0], sizeof(b), 1, f) != 1) break; -+ } -+ memset(&j, 0, sizeof(j)); -+ if(fflush(f)) break; -+ if(fsync(fileno(f))) break; -+ } -+ fclose(f); -+ -+ /* -+ * Use all 512 bits of hash output -+ */ -+ memcpy(&b[0], &s.sha_out[0], 64); -+ memset(&s, 0, sizeof(s)); -+ -+ /* -+ * Read 32 bytes of random entropy from kernel's random -+ * number generator. This code may be executed early on startup -+ * scripts and amount of random entropy may be non-existent. -+ * SHA-512 of old swap data is used as workaround for missing -+ * entropy in kernel's random number generator. -+ */ -+ if(!(f = fopen("/dev/urandom", "r"))) { -+ fprintf(stderr, _("swapon: unable to open /dev/urandom\n")); -+ goto errout0; -+ } -+ fread(&b[64], 32, 1, f); -+ -+ /* -+ * Set up struct loop_info64 -+ */ -+ if((ffd = open(partition, O_RDWR)) < 0) { -+ fprintf(stderr, _("swapon: unable to open swap device %s\n"), partition); -+ goto errout1; -+ } -+ memset(&loopinfo, 0, sizeof(loopinfo)); -+ xstrncpy(loopinfo.lo_file_name, partition, LO_NAME_SIZE); -+ loopinfo.lo_encrypt_type = loop_crypt_type(encryption, &loopinfo.lo_encrypt_key_size, &apiName); -+ if(loopinfo.lo_encrypt_type <= 1) { -+ fprintf(stderr, _("swapon: unsupported swap encryption type %s\n"), encryption); -+errout2: -+ close(ffd); -+errout1: -+ fclose(f); -+errout0: -+ close(fd); -+ memset(&loopinfo.lo_encrypt_key[0], 0, sizeof(loopinfo.lo_encrypt_key)); -+ memset(&multiKeyBits[0][0], 0, sizeof(multiKeyBits)); -+ return 0; -+ } -+ loopinfo.lo_offset = PAGE_SIZE; -+ /* single-key hash */ -+ sha512_hash_buffer(&b[0], 64+32, &loopinfo.lo_encrypt_key[0], sizeof(loopinfo.lo_encrypt_key)); -+ /* multi-key hash */ -+ x = 0; -+ while(x < 65) { -+ fread(&b[64+32], 16, 1, f); -+ sha512_hash_buffer(&b[0], 64+32+16, &multiKeyBits[x][0], 32); -+ x++; -+ } -+ -+ /* -+ * Try to set up single-key loop -+ */ -+ if(ioctl(fd, LOOP_SET_FD, ffd) < 0) { -+ fprintf(stderr, _("swapon: LOOP_SET_FD failed\n")); -+ goto errout2; -+ } -+ if ((loopinfo.lo_encrypt_type == 18) || (loop_set_status64_ioctl(fd, &loopinfo) < 0)) { -+ if(try_cryptoapi_loop_interface(fd, &loopinfo, apiName) < 0) { -+ fprintf(stderr, _("swapon: LOOP_SET_STATUS failed\n")); -+ ioctl(fd, LOOP_CLR_FD, 0); -+ goto errout2; -+ } -+ } -+ -+ /* -+ * Try to put loop to multi-key v3 or v2 mode. -+ * If this fails, then let it operate in single-key mode. -+ */ -+ if(ioctl(fd, LOOP_MULTI_KEY_SETUP_V3, &multiKeyBits[0][0]) < 0) { -+ ioctl(fd, LOOP_MULTI_KEY_SETUP, &multiKeyBits[0][0]); -+ } -+ -+ /* -+ * Loop is now set up. Clean up the keys. -+ */ -+ memset(&loopinfo.lo_encrypt_key[0], 0, sizeof(loopinfo.lo_encrypt_key)); -+ memset(&multiKeyBits[0][0], 0, sizeof(multiKeyBits)); -+ close(ffd); -+ fclose(f); -+ close(fd); -+ -+ /* -+ * Write 40 KB of zeroes to loop device. That same data is written -+ * to underlying partition in encrypted form. This is done to guarantee -+ * that next time encrypted swap is initialized, the SHA-512 hash will -+ * be different. And, if encrypted swap data writes over this data, that's -+ * even better. -+ */ -+ if(!(f = fopen(loop, "r+"))) { -+ fprintf(stderr, _("swapon: unable to open loop device %s\n"), loop); -+ return 0; -+ } -+ memset(&b[0], 0, sizeof(b)); -+ for(x = 0; x < 10; x++) { -+ if(fwrite(&b[0], sizeof(b), 1, f) != 1) break; -+ } -+ fflush(f); -+ fsync(fileno(f)); -+ fclose(f); -+ sync(); -+ -+ /* -+ * Run mkswap on loop device so that kernel understands it as swap. -+ * Redirect stderr to /dev/null and ignore exit value. -+ */ -+ if(!(x = fork())) { -+ if((x = open("/dev/null", O_WRONLY)) >= 0) { -+ dup2(x, 2); -+ close(x); -+ } -+ a[0] = "mkswap"; -+ a[1] = loop; -+ a[2] = 0; -+ execvp(a[0], &a[0]); -+ execv("/sbin/mkswap", &a[0]); -+ /* error to stdout, stderr is directed to /dev/null */ -+ printf(_("swapon: unable to execute mkswap\n")); -+ exit(1); -+ } -+ if(x == -1) { -+ fprintf(stderr, _("swapon: fork failed\n")); -+ return 0; -+ } -+ waitpid(x, &y, 0); -+ sync(); -+ -+ return 1; -+} -+ -+static void -+shutdown_encrypted_swap(char *loop) -+{ -+ int fd; -+ struct stat statbuf; -+ struct loop_info64 loopinfo; -+ unsigned char b[32]; -+ FILE *f; -+ -+ if(stat(loop, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) { -+ if((fd = open(loop, O_RDWR)) >= 0) { -+ if(!loop_get_status64_ioctl(fd, &loopinfo)) { -+ /* -+ * Read 32 bytes of random data from kernel's random -+ * number generator and write that to loop device. -+ * This preserves some of kernel's random entropy -+ * to next activation of encrypted swap on this -+ * partition. -+ */ -+ if((f = fopen("/dev/urandom", "r")) != NULL) { -+ fread(&b[0], 32, 1, f); -+ fclose(f); -+ write(fd, &b[0], 32); -+ fsync(fd); -+ } -+ } -+ close(fd); -+ } -+ sync(); -+ if((fd = open(loop, O_RDONLY)) >= 0) { -+ if(!loop_get_status64_ioctl(fd, &loopinfo)) { -+ ioctl(fd, LOOP_CLR_FD, 0); -+ } -+ close(fd); -+ } -+ } -+} -+ -+static int - swapon_all(void) { - FILE *fp; - struct mntent *fstab; -@@ -317,6 +594,8 @@ - const char *special; - int skip = 0; - int pri = priority; -+ char *opt, *opts; -+ char *loop = NULL, *encryption = NULL; - - if (!streq(fstab->mnt_type, MNTTYPE_SWAP)) - continue; -@@ -325,23 +604,39 @@ - if (!special) - continue; - -- if (!is_in_proc_swaps(special) && -- (!ifexists || !access(special, R_OK))) { -- /* parse mount options; */ -- char *opt, *opts = strdup(fstab->mnt_opts); -- -- for (opt = strtok(opts, ","); opt != NULL; -- opt = strtok(NULL, ",")) { -- if (strncmp(opt, "pri=", 4) == 0) -- pri = atoi(opt+4); -- if (strcmp(opt, "noauto") == 0) -- skip = 1; -+ /* parse mount options; */ -+ opts = strdup(fstab->mnt_opts); -+ if (!opts) { -+ fprintf(stderr, "not enough memory"); -+ exit(1); -+ } -+ for (opt = strtok(opts, ","); opt != NULL; opt = strtok(NULL, ",")) { -+ if (strncmp(opt, "pri=", 4) == 0) -+ pri = atoi(opt+4); -+ if (strcmp(opt, "noauto") == 0) -+ skip = 1; -+ if (strncmp(opt, "loop=", 5) == 0) -+ loop = opt + 5; -+ if (strncmp(opt, "encryption=", 11) == 0) -+ encryption = opt + 11; -+ } -+ if(skip) -+ continue; -+ if (loop && encryption) { -+ if(!is_in_proc_swaps(loop) && (!ifexists || !access(special, R_OK))) { -+ if (!prepare_encrypted_swap(special, loop, encryption)) { -+ status |= -1; -+ continue; -+ } -+ status |= do_swapon(loop, pri); - } -- if (!skip) -- status |= do_swapon(special, pri); -+ continue; -+ } -+ if (!is_in_proc_swaps(special) && (!ifexists || !access(special, R_OK))) { -+ status |= do_swapon(special, pri); - } - } -- fclose(fp); -+ endmntent(fp); - - return status; - } -@@ -504,11 +799,49 @@ - exit(2); - } - while ((fstab = getmntent(fp)) != NULL) { -- if (streq(fstab->mnt_type, MNTTYPE_SWAP) && -- !is_in_proc_swaps(fstab->mnt_fsname)) -- do_swapoff(fstab->mnt_fsname, QUIET); -+ const char *orig_special = fstab->mnt_fsname; -+ const char *special; -+ int skip = 0; -+ char *opt, *opts; -+ char *loop = NULL, *encryption = NULL; -+ -+ if (!streq(fstab->mnt_type, MNTTYPE_SWAP)) -+ continue; -+ -+ special = mount_get_devname(orig_special); -+ if (!special) -+ continue; -+ -+ /* parse mount options; */ -+ opts = strdup(fstab->mnt_opts); -+ if (!opts) { -+ fprintf(stderr, "not enough memory"); -+ exit(1); -+ } -+ for (opt = strtok(opts, ","); opt != NULL; opt = strtok(NULL, ",")) { -+ if (strcmp(opt, "noauto") == 0) -+ skip = 1; -+ if (strncmp(opt, "loop=", 5) == 0) -+ loop = opt + 5; -+ if (strncmp(opt, "encryption=", 11) == 0) -+ encryption = opt + 11; -+ } -+ if (loop && encryption) { -+ if (!is_in_proc_swaps(loop)) { -+ if(skip) -+ continue; -+ do_swapoff(loop, QUIET); -+ } -+ shutdown_encrypted_swap(loop); -+ continue; -+ } -+ if(skip) -+ continue; -+ if (!is_in_proc_swaps(special)) { -+ do_swapoff(special, QUIET); -+ } - } -- fclose(fp); -+ endmntent(fp); - } - - return status; diff --git a/mount-nfs-nonreserved b/mount-nfs-nonreserved deleted file mode 100644 index 58be497..0000000 --- a/mount-nfs-nonreserved +++ /dev/null @@ -1,61 +0,0 @@ -diff -u util-linux-2.11z/mount/nfsmount.c-o util-linux-2.11z/mount/nfsmount.c ---- util-linux-2.11z/mount/nfsmount.c-o 2003-06-18 15:23:06.000000000 +0200 -+++ util-linux-2.11z/mount/nfsmount.c 2003-06-18 15:25:35.000000000 +0200 -@@ -215,7 +215,7 @@ - } status; - struct stat statbuf; - char *s; -- int port, mountport, proto, bg, soft, intr; -+ int port, mountport, proto, bg, soft, intr, nonreserved; - int posix, nocto, noac, nolock, broken_suid, noacl; - int retry, tcp; - int mountprog, mountvers, nfsprog, nfsvers; -@@ -320,6 +320,7 @@ - noac = 0; - retry = 10000; /* 10000 minutes ~ 1 week */ - tcp = 0; -+ nonreserved = 0; - - mountprog = MOUNTPROG; - mountvers = 0; -@@ -411,6 +412,8 @@ - soft = !val; - else if (!strcmp(opt, "intr")) - intr = val; -+ else if (!strcmp(opt, "reserved")) -+ nonreserved = !val; - else if (!strcmp(opt, "posix")) - posix = val; - else if (!strcmp(opt, "cto")) -@@ -445,7 +448,8 @@ - | (intr ? NFS_MOUNT_INTR : 0) - | (posix ? NFS_MOUNT_POSIX : 0) - | (nocto ? NFS_MOUNT_NOCTO : 0) -- | (noac ? NFS_MOUNT_NOAC : 0); -+ | (noac ? NFS_MOUNT_NOAC : 0) -+ | (nonreserved ? NFS_MOUNT_NONRESERVED : 0); - #if NFS_MOUNT_VERSION >= 2 - if (nfs_mount_version >= 2) - data.flags |= (tcp ? NFS_MOUNT_TCP : 0); -diff -u util-linux-2.11z/mount/nfs_mount4.h-o util-linux-2.11z/mount/nfs_mount4.h ---- util-linux-2.11z/mount/nfs_mount4.h-o 2003-06-18 15:23:06.000000000 +0200 -+++ util-linux-2.11z/mount/nfs_mount4.h 2003-06-18 15:26:04.000000000 +0200 -@@ -52,3 +52,4 @@ - #define NFS_MOUNT_NONLM 0x0200 /* 3 */ - #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */ - #define NFS_MOUNT_NOACL 0x0800 /* 4 */ -+#define NFS_MOUNT_NONRESERVED 0x1000 ---- util-linux-2.11z/mount/nfs.5-o 2003-06-18 07:10:54.000000000 -0700 -+++ util-linux-2.11z/mount/nfs.5 2003-06-18 07:14:05.000000000 -0700 -@@ -213,6 +213,11 @@ - NFS version 3. (On NFS version 2 filesystems this option has no effect.) - This option also deactivates the GETACL and SETACL remote procedure calls - which are otherwise used to manipulate ACLs. -+.TP 1.5i -+.I noreserved -+Don't use a reserved source port. This usually requires special options -+on the NFS server (insecure for linux knfsd), but allows more than 1024 -+mounts from a single IP address. - .P - All of the non-value options have corresponding nooption forms. - For example, nointr means don't allow file operations to be diff --git a/schedutils-1.4.0.tar.bz2 b/schedutils-1.4.0.tar.bz2 deleted file mode 100644 index f046c5a..0000000 --- a/schedutils-1.4.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:84038ab2b3ea6ff4b31b46638b9ceae56aebc95742e9b75276c6e6f5465f05b1 -size 15930 diff --git a/stupid-programmer.diff b/stupid-programmer.diff deleted file mode 100644 index 6b4f2ee..0000000 --- a/stupid-programmer.diff +++ /dev/null @@ -1,38 +0,0 @@ ---- disk-utils/fsck.cramfs.c -+++ disk-utils/fsck.cramfs.c -@@ -76,16 +76,7 @@ - - #define PAD_SIZE 512 - --#include --#ifdef PAGE_SIZE --#define PAGE_CACHE_SIZE ((int) PAGE_SIZE) --#elif defined __ia64__ --#define PAGE_CACHE_SIZE (16384) --#elif defined __alpha__ --#define PAGE_CACHE_SIZE (8192) --#else --#define PAGE_CACHE_SIZE (4096) --#endif -+#define PAGE_CACHE_SIZE getpagesize() /* Stupid programmer */ - - /* Guarantee access to at least 8kB at a time */ - #define ROMBUFFER_BITS 13 -@@ -95,7 +86,7 @@ - static unsigned long read_buffer_block = ~0UL; - - /* Uncompressing data structures... */ --static char outbuffer[PAGE_CACHE_SIZE*2]; -+static char *outbuffer; /* Stupid programmer */ - z_stream stream; - - #endif /* INCLUDE_FS_TESTS */ -@@ -464,6 +455,8 @@ - int c; /* for getopt */ - int start = 0; - -+ outbuffer = malloc(PAGE_CACHE_SIZE); /* Stupid programmer */ -+ - if (argc) - progname = argv[0]; - diff --git a/util-linux-2.11q-fs_mac.diff b/util-linux-2.11q-fdisk_fs_mac.patch similarity index 71% rename from util-linux-2.11q-fs_mac.diff rename to util-linux-2.11q-fdisk_fs_mac.patch index 58bc11d..c4a27c0 100644 --- a/util-linux-2.11q-fs_mac.diff +++ b/util-linux-2.11q-fdisk_fs_mac.patch @@ -1,5 +1,7 @@ ---- util-linux-2.12q/fdisk/fdiskmaclabel.c -+++ util-linux-2.12q/fdisk/fdiskmaclabel.c +Index: util-linux-ng-2.12r+git20070330/fdisk/fdiskmaclabel.c +=================================================================== +--- /dev/null ++++ util-linux-ng-2.12r+git20070330/fdisk/fdiskmaclabel.c @@ -0,0 +1,87 @@ +/* + Changes: @@ -38,7 +40,7 @@ + "\t2. Be sure that this disk is NOT a still vital\n" + "\t part of a volume group. (Otherwise you may\n" + "\t erase the other disks as well, if unmirrored.)\n") -+ ++ + ); +} + @@ -59,13 +61,13 @@ + Conversion: only 16 bit should compared + e.g.: HFS Label is only 16bit long + */ -+ ++ + int magic_masked = 0 ; + magic_masked = maclabel->magic & MAC_BITMASK ; -+ ++ + switch (magic_masked) { -+ case MAC_LABEL_MAGIC : -+ case MAC_LABEL_MAGIC_2: ++ case MAC_LABEL_MAGIC : ++ case MAC_LABEL_MAGIC_2: + case MAC_LABEL_MAGIC_3: + goto IS_MAC; + break; @@ -88,8 +90,10 @@ + mac_label = 1; /* %% */ + return 1; +} ---- util-linux-2.12q/fdisk/fdiskmaclabel.h -+++ util-linux-2.12q/fdisk/fdiskmaclabel.h +Index: util-linux-ng-2.12r+git20070330/fdisk/fdiskmaclabel.h +=================================================================== +--- /dev/null ++++ util-linux-ng-2.12r+git20070330/fdisk/fdiskmaclabel.h @@ -0,0 +1,40 @@ +#include /* for __u32 etc */ +/* @@ -105,17 +109,17 @@ + unsigned int fillbytes2[124]; +} mac_partition; + -+#define MAC_LABEL_MAGIC 0x45520000 // MAC magic number only 16bits, do i always know that there are 0200 following ? Problem, after magic the uint16_t res1; follows, i donnno know about the 200k -+#define MAC_LABEL_MAGIC_2 0x50530000 -+#define MAC_LABEL_MAGIC_3 0x504d0000 ++#define MAC_LABEL_MAGIC 0x45520000 // MAC magic number only 16bits, do i always know that there are 0200 following ? Problem, after magic the uint16_t res1; follows, i donnno know about the 200k ++#define MAC_LABEL_MAGIC_2 0x50530000 ++#define MAC_LABEL_MAGIC_3 0x504d0000 + + +#define MAC_LABEL_MAGIC_SWAPPED 0x00002554 + -+#define MAC_LABEL_MAGIC_2_SWAPPED 0x00003505 -+#define MAC_LABEL_MAGIC_3_SWAPPED 0x0000d405 ++#define MAC_LABEL_MAGIC_2_SWAPPED 0x00003505 ++#define MAC_LABEL_MAGIC_3_SWAPPED 0x0000d405 ++ + -+ +/* fdisk.c */ +#define maclabel ((mac_partition *)MBRbuffer) +extern char MBRbuffer[MAX_SECTOR_SIZE]; @@ -131,50 +135,19 @@ +extern struct systypes mac_sys_types[]; +extern void mac_nolabel( void ); +extern int check_mac_label( void ); ---- util-linux-2.12q/fdisk/Makefile -+++ util-linux-2.12q/fdisk/Makefile -@@ -39,7 +39,7 @@ - endif - endif - --cfdisk: cfdisk.o llseek.o disksize.o i386_sys_types.o $(LIB)/xstrncpy.o -+cfdisk: cfdisk.o llseek.o disksize.o i386_sys_types.o $(LIB)/xstrncpy.o - ifeq "$(HAVE_SLANG)" "yes" - $(CC) $(LDFLAGS) $^ -o $@ $(LIBSLANG) - else -@@ -55,15 +55,17 @@ - rm -f activate - ln -s sfdisk activate - --fdisk: fdisk.o llseek.o disksize.o fdiskbsdlabel.o fdisksgilabel.o \ -- fdisksunlabel.o fdiskaixlabel.o i386_sys_types.o partname.o -+fdisk: fdisk.o llseek.o disksize.o fdiskbsdlabel.o fdisksgilabel.o fdisksunlabel.o \ -+ fdiskmaclabel.o fdiskaixlabel.o i386_sys_types.o partname.o - fdisk.o: fdisk.c fdisk.h - fdiskbsdlabel.o: fdiskbsdlabel.c fdisk.h fdiskbsdlabel.h - fdisksunlabel.o: fdisksunlabel.c fdisksunlabel.h fdisk.h - fdiskaixlabel.o: fdiskaixlabel.c fdiskaixlabel.h fdisk.h -+fdiskmaclabel.o: fdiskmaclabel.c fdiskmaclabel.h fdisk.h -+ - fdisk.o cfdisk.o sfdisk.o fdiskbsdlabel.o fdisksunlabel.o \ -- fdisksgilabel.o fdiskaixlabel.o i386_sys_types.o partname.o: common.h --sfdisk: sfdisk.o disksize.o i386_sys_types.o partname.o -+ fdisksgilabel.o fdiskaixlabel.o fdiskmaclabel.o i386_sys_types.o partname.o: common.h -+sfdisk: sfdisk.o disksize.o i386_sys_types.o partname.o - - install: all - $(INSTALLDIR) $(SBINDIR) ---- util-linux-2.12q/fdisk/fdisk.c -+++ util-linux-2.12q/fdisk/fdisk.c +Index: util-linux-ng-2.12r+git20070330/fdisk/fdisk.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/fdisk/fdisk.c ++++ util-linux-ng-2.12r+git20070330/fdisk/fdisk.c @@ -26,6 +26,7 @@ #include "fdisksunlabel.h" #include "fdisksgilabel.h" #include "fdiskaixlabel.h" +#include "fdiskmaclabel.h" - #include "../defines.h" - #ifdef HAVE_blkpg_h -@@ -165,11 +166,12 @@ + #ifdef HAVE_LINUX_COMPILER_H + #include +@@ -167,11 +168,12 @@ unsigned int heads, unsigned long long total_number_of_sectors; @@ -188,18 +161,18 @@ int possibly_osf_label = 0; jmp_buf listingbuf; -@@ -363,6 +365,10 @@ +@@ -365,6 +367,10 @@ menu(void) { puts(_(" v verify the partition table")); puts(_(" w write table to disk and exit")); } + else if (mac_label) { + puts(_("no Commands available")); -+ ++ + } else if (aix_label) { puts(_("Command action")); puts(_(" m print this menu")); -@@ -443,6 +449,9 @@ +@@ -445,6 +451,9 @@ xmenu(void) { puts(_(" v verify the partition table")); puts(_(" w write table to disk and exit")); } @@ -209,7 +182,7 @@ else { puts(_("Command action")); puts(_(" b move beginning of data in a partition")); /* !sun */ -@@ -943,6 +952,9 @@ +@@ -945,6 +954,9 @@ get_boot(enum action what) { if (check_aix_label()) return 0; @@ -219,11 +192,10 @@ if (check_osf_label()) { possibly_osf_label = 1; if (!valid_part_table_flag(MBRbuffer)) { -@@ -2074,6 +2086,15 @@ - "This will destroy the present disk contents.\n")); +@@ -2077,6 +2089,15 @@ new_partition(void) { return; } -+ + + if (mac_label) { + printf(_("\tSorry - this fdisk cannot handle Mac disk labels." + "\n\tIf you want to add DOS-type partitions, create" @@ -232,10 +204,11 @@ + "This will destroy the present disk contents.\n")); + return; + } - ++ for (i = 0; i < 4; i++) free_primary += !ptes[i].part_table->sys_ind; -@@ -2404,7 +2425,11 @@ + +@@ -2406,7 +2427,11 @@ try(char *device, int user_specified) { if (gb > 0) { /* I/O error */ } else if (gb < 0) { /* no DOS signature */ list_disk_geometry(); @@ -244,7 +217,19 @@ + return; + if (mac_label) + return; -+ if (btrydev(device) < 0) ++ if (btrydev(device) < 0) fprintf(stderr, _("Disk %s doesn't contain a valid " "partition table\n"), device); +Index: util-linux-ng-2.12r+git20070330/fdisk/Makefile.am +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/fdisk/Makefile.am ++++ util-linux-ng-2.12r+git20070330/fdisk/Makefile.am +@@ -8,6 +8,7 @@ sbin_PROGRAMS = fdisk + man_MANS = fdisk.8 + fdisk_SOURCES = fdisk.c disksize.c fdiskbsdlabel.c fdisksgilabel.c \ + fdisksunlabel.c fdiskaixlabel.c i386_sys_types.c partname.c \ ++ fdiskmaclabel.c \ + common.h fdisk.h fdisksunlabel.h fdisksgilabel.h fdiskaixlabel.h \ + fdiskbsdlabel.h + diff --git a/util-linux-2.11u-nfs-mount_acl.diff b/util-linux-2.11u-mount_nfs_mount_acl.patch similarity index 64% rename from util-linux-2.11u-nfs-mount_acl.diff rename to util-linux-2.11u-mount_nfs_mount_acl.patch index 8977f08..83a4cca 100644 --- a/util-linux-2.11u-nfs-mount_acl.diff +++ b/util-linux-2.11u-mount_nfs_mount_acl.patch @@ -5,9 +5,11 @@ change has been discussed and accepted by Trond Myklebust -- Andreas Gruenbacher ================================================================================ ---- util-linux-2.12q/mount/mount.8 -+++ util-linux-2.12q/mount/mount.8 -@@ -1335,7 +1335,8 @@ +Index: util-linux-ng-2.12r+2.13pre7/mount/mount.8 +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/mount/mount.8 ++++ util-linux-ng-2.12r+2.13pre7/mount/mount.8 +@@ -1335,7 +1335,8 @@ are recognized: .BR ac , .BR tcp , .BR udp , @@ -17,9 +19,11 @@ change has been discussed and accepted by Trond Myklebust For details, see .BR nfs (5). ---- util-linux-2.12q/mount/nfs.5 -+++ util-linux-2.12q/mount/nfs.5 -@@ -204,6 +204,15 @@ +Index: util-linux-ng-2.12r+2.13pre7/mount/nfs.5 +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/mount/nfs.5 ++++ util-linux-ng-2.12r+2.13pre7/mount/nfs.5 +@@ -204,6 +204,15 @@ default UDP protocol. Many NFS servers .I udp Mount the NFS filesystem using the UDP protocol. This is the default. @@ -35,17 +39,21 @@ change has been discussed and accepted by Trond Myklebust .P All of the non-value options have corresponding nooption forms. For example, nointr means don't allow file operations to be ---- util-linux-2.12q/mount/nfs_mount4.h -+++ util-linux-2.12q/mount/nfs_mount4.h -@@ -51,4 +51,4 @@ +Index: util-linux-ng-2.12r+2.13pre7/mount/nfs_mount4.h +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/mount/nfs_mount4.h ++++ util-linux-ng-2.12r+2.13pre7/mount/nfs_mount4.h +@@ -51,4 +51,4 @@ struct nfs_mount_data { #define NFS_MOUNT_KERBEROS 0x0100 /* 3 */ #define NFS_MOUNT_NONLM 0x0200 /* 3 */ #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */ - +#define NFS_MOUNT_NOACL 0x0800 /* 4 */ ---- util-linux-2.12q/mount/nfsmount.c -+++ util-linux-2.12q/mount/nfsmount.c -@@ -216,7 +216,7 @@ +Index: util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/mount/nfsmount.c ++++ util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c +@@ -214,7 +214,7 @@ int nfsmount(const char *spec, const cha struct stat statbuf; char *s; int port, mountport, proto, bg, soft, intr; @@ -54,7 +62,7 @@ change has been discussed and accepted by Trond Myklebust int retry, tcp; int mountprog, mountvers, nfsprog, nfsvers; int retval; -@@ -316,6 +316,7 @@ +@@ -314,6 +314,7 @@ int nfsmount(const char *spec, const cha nocto = 0; nolock = 0; broken_suid = 0; @@ -62,7 +70,7 @@ change has been discussed and accepted by Trond Myklebust noac = 0; retry = 10000; /* 10000 minutes ~ 1 week */ tcp = 0; -@@ -427,6 +428,8 @@ +@@ -425,6 +426,8 @@ int nfsmount(const char *spec, const cha printf(_("Warning: option nolock is not supported.\n")); } else if (!strcmp(opt, "broken_suid")) { broken_suid = val; @@ -71,7 +79,7 @@ change has been discussed and accepted by Trond Myklebust } else { if (!sloppy) { printf(_("unknown nfs mount option: " -@@ -452,8 +455,10 @@ +@@ -450,8 +453,10 @@ int nfsmount(const char *spec, const cha data.flags |= (nolock ? NFS_MOUNT_NONLM : 0); #endif #if NFS_MOUNT_VERSION >= 4 diff --git a/util-linux-2.11z-hwclock_geteuid.diff b/util-linux-2.11z-hwclock_geteuid.patch similarity index 52% rename from util-linux-2.11z-hwclock_geteuid.diff rename to util-linux-2.11z-hwclock_geteuid.patch index aa0ed74..b022f41 100644 --- a/util-linux-2.11z-hwclock_geteuid.diff +++ b/util-linux-2.11z-hwclock_geteuid.patch @@ -1,9 +1,11 @@ ---- hwclock/hwclock.c +Index: hwclock/hwclock.c +=================================================================== +--- hwclock/hwclock.c.orig +++ hwclock/hwclock.c -@@ -1446,7 +1446,7 @@ +@@ -1480,7 +1480,7 @@ main(int argc, char **argv) { show = 1; /* default to show */ - + - if (getuid() == 0) + if (geteuid() == 0) permitted = TRUE; diff --git a/util-linux-2.12-enablereplaybuild.diff b/util-linux-2.12-enablereplaybuild.diff deleted file mode 100644 index f824893..0000000 --- a/util-linux-2.12-enablereplaybuild.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- misc-utils/Makefile -+++ misc-utils/Makefile -@@ -12,7 +12,7 @@ - # Where to put man pages? - - MAN1= cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \ -- namei.1 rename.1 script.1 whereis.1 hostid.1 -+ namei.1 rename.1 script.1 whereis.1 hostid.1 scriptreplay.1 - - # Where to put binaries? - # See the "install" rule for the links. . . -@@ -20,7 +20,7 @@ - BIN= - - USRBIN= cal chkdupexe ddate hostid logger look mcookie \ -- namei rename script whereis -+ namei rename script scriptreplay whereis - - MAYBE= reset setterm - diff --git a/util-linux-2.12-hostid.diff b/util-linux-2.12-misc_utils_hostid.patch similarity index 70% rename from util-linux-2.12-hostid.diff rename to util-linux-2.12-misc_utils_hostid.patch index 0a9423c..170046d 100644 --- a/util-linux-2.12-hostid.diff +++ b/util-linux-2.12-misc_utils_hostid.patch @@ -1,5 +1,7 @@ ---- util-linux-2.12q/misc-utils/hostid.1 -+++ util-linux-2.12q/misc-utils/hostid.1 +Index: util-linux-ng-2.12r+git20070330/misc-utils/hostid.1 +=================================================================== +--- /dev/null ++++ util-linux-ng-2.12r+git20070330/misc-utils/hostid.1 @@ -0,0 +1,24 @@ +.TH hostid 1 +.SH NAME @@ -25,8 +27,10 @@ +.SH SEE ALSO +gethostid(2), sethostid(2) + ---- util-linux-2.12q/misc-utils/hostid.c -+++ util-linux-2.12q/misc-utils/hostid.c +Index: util-linux-ng-2.12r+git20070330/misc-utils/hostid.c +=================================================================== +--- /dev/null ++++ util-linux-ng-2.12r+git20070330/misc-utils/hostid.c @@ -0,0 +1,88 @@ +/* Program hostid. Changed on 7.10.1997 + New: - Hostid 0 is not permitted. @@ -116,22 +120,25 @@ + + return 0; +} ---- util-linux-2.12q/misc-utils/Makefile -+++ util-linux-2.12q/misc-utils/Makefile -@@ -12,14 +12,14 @@ - # Where to put man pages? +Index: util-linux-ng-2.12r+git20070330/misc-utils/Makefile.am +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/misc-utils/Makefile.am ++++ util-linux-ng-2.12r+git20070330/misc-utils/Makefile.am +@@ -9,7 +9,7 @@ EXTRA_DIST = README.* \ + bin_PROGRAMS = - MAN1= cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \ -- namei.1 rename.1 script.1 whereis.1 -+ namei.1 rename.1 script.1 whereis.1 hostid.1 + usrbinexec_PROGRAMS = cal ddate logger look mcookie \ +- namei script whereis ++ namei script whereis hostid - # Where to put binaries? - # See the "install" rule for the links. . . + mcookie_LDADD = $(top_srcdir)/lib/libmd5.a - BIN= +@@ -24,7 +24,7 @@ scriptreplay: scriptreplay.pl + CLEANFILES = chkdupexe scriptreplay --USRBIN= cal chkdupexe ddate logger look mcookie \ -+USRBIN= cal chkdupexe ddate hostid logger look mcookie \ - namei rename script whereis + man_MANS = cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \ +- namei.1 script.1 whereis.1 ++ namei.1 script.1 whereis.1 hostid.1 - MAYBE= reset setterm + if HAVE_NCURSES + cal_LDADD = -lncurses diff --git a/util-linux-2.12-mount_base_nfsv4.patch b/util-linux-2.12-mount_base_nfsv4.patch new file mode 100644 index 0000000..ead5f2f --- /dev/null +++ b/util-linux-2.12-mount_base_nfsv4.patch @@ -0,0 +1,859 @@ + +Add basic nfsv4 support + +--- + + util-linux-2.12-bfields/mount/Makefile | 2 + util-linux-2.12-bfields/mount/fstab.5 | 1 + util-linux-2.12-bfields/mount/mount.8 | 75 ++++++ + util-linux-2.12-bfields/mount/mount.c | 13 + + util-linux-2.12-bfields/mount/nfs.5 | 200 +++++++++++++++++ + util-linux-2.12-bfields/mount/nfs4_mount.h | 82 +++++++ + util-linux-2.12-bfields/mount/nfs4mount.c | 335 +++++++++++++++++++++++++++++ + util-linux-2.12-bfields/mount/nfsmount.c | 5 + util-linux-2.12-bfields/mount/sundries.h | 2 + util-linux-2.12-bfields/mount/umount.c | 3 + 10 files changed, 710 insertions(+), 8 deletions(-) + +Index: util-linux-ng-2.12r+git20070330/mount/fstab.5 +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/fstab.5 ++++ util-linux-ng-2.12r+git20070330/mount/fstab.5 +@@ -115,6 +115,7 @@ of filesystem types, such as + .IR msdos , + .IR ncpfs , + .IR nfs , ++.IR nfs4 , + .IR ntfs , + .IR proc , + .IR qnx4 , +Index: util-linux-ng-2.12r+git20070330/mount/mount.8 +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/mount.8 ++++ util-linux-ng-2.12r+git20070330/mount/mount.8 +@@ -385,6 +385,7 @@ currently supported include: + .IR msdos , + .IR ncpfs , + .IR nfs , ++.IR nfs4 , + .IR ntfs , + .IR proc , + .IR qnx4 , +@@ -422,7 +423,7 @@ For most types all the + program has to do is issue a simple + .IR mount (2) + system call, and no detailed knowledge of the filesystem type is required. +-For a few types however (like nfs, cifs, smbfs, ncpfs) ad hoc code is ++For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) ad hoc code is + necessary. The nfs ad hoc code is built in, but cifs, smbfs, and ncpfs + have a separate mount program. In order to make it possible to + treat all types in a uniform way, mount will execute the program +@@ -450,9 +451,10 @@ or, if that does not exist, + All of the filesystem types listed there will be tried, + except for those that are labeled "nodev" (e.g., + .IR devpts , +-.I proc ++.IR proc , ++.IR nfs , + and +-.IR nfs ). ++.IR nfs4 ). + If + .I /etc/filesystems + ends in a line with a single * only, mount will read +@@ -1380,6 +1382,73 @@ Usually it just causes lots of trouble. + .B nolock + Do not use locking. Do not start lockd. + ++.SH "Mount options for nfs4" ++Instead of a textual option string, parsed by the kernel, the ++.I nfs4 ++file system expects a binary argument of type ++.IR "struct nfs4_mount_data" . ++The program ++.B mount ++itself parses the following options of the form `tag=value', ++and puts them in the structure mentioned: ++.BI rsize= n, ++.BI wsize= n, ++.BI timeo= n, ++.BI retrans= n, ++.BI acregmin= n, ++.BI acregmax= n, ++.BI acdirmin= n, ++.BI acdirmax= n, ++.BI actimeo= n, ++.BI retry= n, ++.BI port= n, ++.BI proto= n, ++.BI clientaddr= n, ++.BI sec= n. ++The option ++.BI addr= n ++is accepted but ignored. ++Also the following Boolean options, possibly preceded by ++.B no ++are recognized: ++.BR bg , ++.BR fg , ++.BR soft , ++.BR hard , ++.BR intr , ++.BR cto , ++.BR ac , ++For details, see ++.BR nfs (5). ++ ++Especially useful options include ++.TP ++.B rsize=32768,wsize=32768 ++This will make your NFS connection faster than with the default ++buffer size of 4096. ++.TP ++.B hard ++The program accessing a file on a NFS mounted file system will hang ++when the server crashes. The process cannot be interrupted or ++killed unless you also specify ++.BR intr . ++When the NFS server is back online the program will continue undisturbed ++from where it was. This is probably what you want. ++.TP ++.B soft ++This option allows the kernel to time out if the NFS server is not ++responding for some time. The time can be ++specified with ++.BR timeo=time . ++This timeout value is expressed in tenths of a second. ++The ++.BR soft ++option might be useful if your NFS server sometimes doesn't respond ++or will be rebooted while some process tries to get a file from the server. ++Avoid using this option with ++.BR proto=udp ++or with a short timeout. ++ + .SH "Mount options for ntfs" + .TP + .BI iocharset= name +Index: util-linux-ng-2.12r+git20070330/mount/mount.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/mount.c ++++ util-linux-ng-2.12r+git20070330/mount/mount.c +@@ -860,6 +860,19 @@ try_mount_one (const char *spec0, const + if (res) + goto out; + } ++#ifdef HAVE_NFS ++ /* ++ * NFSv4 support ++ */ ++ if (!fake && types && streq (types, "nfs4")) { ++ mnt_err = nfs4mount(spec, node, &flags, &extra_opts, &mount_opts, bg); ++ if (mnt_err) ++ return mnt_err; ++#else ++ die (EX_SOFTWARE, _("mount: this version was compiled " ++ "without support for the type `nfs4'")); ++#endif ++ } + + /* + * Call mount.TYPE for types that require a separate mount program. +Index: util-linux-ng-2.12r+git20070330/mount/nfs4mount.c +=================================================================== +--- /dev/null ++++ util-linux-ng-2.12r+git20070330/mount/nfs4mount.c +@@ -0,0 +1,335 @@ ++/* ++ * nfs4mount.c -- Linux NFS mount ++ * Copyright (C) 2002 Trond Myklebust ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * Note: this file based on the original nfsmount.c ++ */ ++ ++#include "../config.h" ++ ++#include ++#include ++#undef __FD_CLR ++#undef __FD_SET ++#undef __FD_ISSET ++#undef __FD_ZERO ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "sundries.h" ++ ++#include "mount_constants.h" ++#include "nfs4_mount.h" ++ ++#include "nls.h" ++ ++#ifndef NFS_PORT ++#define NFS_PORT 2049 ++#endif ++ ++static int parse_devname(char *hostdir, char **hostname, char **dirname) ++{ ++ char *s; ++ ++ if (!(s = strchr(hostdir, ':'))) { ++ fprintf(stderr, ++ _("mount: " ++ "directory to mount not in host:dir format\n")); ++ return -1; ++ } ++ *hostname = hostdir; ++ *dirname = s + 1; ++ *s = '\0'; ++ /* Ignore all but first hostname in replicated mounts ++ until they can be fully supported. (mack@sgi.com) */ ++ if ((s = strchr(hostdir, ','))) { ++ *s = '\0'; ++ fprintf(stderr, ++ _("mount: warning: " ++ "multiple hostnames not supported\n")); ++ } ++ return 0; ++} ++ ++static int fill_ipv4_sockaddr(const char *hostname, struct sockaddr_in *addr) ++{ ++ struct hostent *hp; ++ addr->sin_family = AF_INET; ++ ++ if (inet_aton(hostname, &addr->sin_addr)) ++ return 0; ++ if ((hp = gethostbyname(hostname)) == NULL) { ++ fprintf(stderr, _("mount: can't get address for %s\n"), ++ hostname); ++ return -1; ++ } ++ if (hp->h_length > sizeof(struct in_addr)) { ++ fprintf(stderr, ++ _("mount: got bad hp->h_length\n")); ++ hp->h_length = sizeof(struct in_addr); ++ } ++ memcpy(&addr->sin_addr, hp->h_addr, hp->h_length); ++ return 0; ++} ++ ++static int get_my_ipv4addr(char *ip_addr, int len) ++{ ++ char myname[1024]; ++ struct sockaddr_in myaddr; ++ ++ if (gethostname(myname, sizeof(myname))) { ++ fprintf(stderr, _("mount: can't determine client address\n")); ++ return -1; ++ } ++ if (fill_ipv4_sockaddr(myname, &myaddr)) ++ return -1; ++ snprintf(ip_addr, len, "%s", inet_ntoa(myaddr.sin_addr)); ++ ip_addr[len-1] = '\0'; ++ return 0; ++} ++ ++int nfs4mount(const char *spec, const char *node, int *flags, ++ char **extra_opts, char **mount_opts, ++ int running_bg) ++{ ++ static struct nfs4_mount_data data; ++ static char hostdir[1024]; ++ static char ip_addr[16] = "127.0.0.1"; ++ static struct sockaddr_in server_addr; ++ static int pseudoflavour = 0; ++ ++ char *hostname, *dirname, *old_opts; ++ char new_opts[1024]; ++ char *opt, *opteq; ++ char *s; ++ int val; ++ int bg, soft, intr; ++ int nocto, noac; ++ int retry; ++ int retval; ++ ++ retval = EX_FAIL; ++ if (strlen(spec) >= sizeof(hostdir)) { ++ fprintf(stderr, _("mount: " ++ "excessively long host:dir argument\n")); ++ goto fail; ++ } ++ strcpy(hostdir, spec); ++ if (parse_devname(hostdir, &hostname, &dirname)) ++ goto fail; ++ ++ if (fill_ipv4_sockaddr(hostname, &server_addr)) ++ goto fail; ++ if (get_my_ipv4addr(ip_addr, sizeof(ip_addr))) ++ goto fail; ++ ++ /* add IP address to mtab options for use when unmounting */ ++ s = inet_ntoa(server_addr.sin_addr); ++ old_opts = *extra_opts; ++ if (!old_opts) ++ old_opts = ""; ++ if (strlen(old_opts) + strlen(s) + 10 >= sizeof(new_opts)) { ++ fprintf(stderr, _("mount: " ++ "excessively long option argument\n")); ++ goto fail; ++ } ++ snprintf(new_opts, sizeof(new_opts), "%s%saddr=%s", ++ old_opts, *old_opts ? "," : "", s); ++ *extra_opts = xstrdup(new_opts); ++ ++ /* Set default options. ++ * rsize/wsize and timeo are left 0 in order to ++ * let the kernel decide. ++ */ ++ memset(&data, 0, sizeof(data)); ++ data.retrans = 3; ++ data.acregmin = 3; ++ data.acregmax = 60; ++ data.acdirmin = 30; ++ data.acdirmax = 60; ++ data.proto = IPPROTO_TCP; ++ ++ bg = 0; ++ soft = 0; ++ intr = 0; ++ nocto = 0; ++ noac = 0; ++ retry = 10000; /* 10000 minutes ~ 1 week */ ++ ++ /* ++ * NFSv4 specifies that the default port should be 2049 ++ */ ++ server_addr.sin_port = htons(NFS_PORT); ++ ++ /* parse options */ ++ ++ for (opt = strtok(old_opts, ","); opt; opt = strtok(NULL, ",")) { ++ if ((opteq = strchr(opt, '='))) { ++ val = atoi(opteq + 1); ++ *opteq = '\0'; ++ if (!strcmp(opt, "rsize")) ++ data.rsize = val; ++ else if (!strcmp(opt, "wsize")) ++ data.wsize = val; ++ else if (!strcmp(opt, "timeo")) ++ data.timeo = val; ++ else if (!strcmp(opt, "retrans")) ++ data.retrans = val; ++ else if (!strcmp(opt, "acregmin")) ++ data.acregmin = val; ++ else if (!strcmp(opt, "acregmax")) ++ data.acregmax = val; ++ else if (!strcmp(opt, "acdirmin")) ++ data.acdirmin = val; ++ else if (!strcmp(opt, "acdirmax")) ++ data.acdirmax = val; ++ else if (!strcmp(opt, "actimeo")) { ++ data.acregmin = val; ++ data.acregmax = val; ++ data.acdirmin = val; ++ data.acdirmax = val; ++ } ++ else if (!strcmp(opt, "retry")) ++ retry = val; ++ else if (!strcmp(opt, "port")) ++ server_addr.sin_port = htons(val); ++ else if (!strcmp(opt, "proto")) { ++ if (!strncmp(opteq+1, "tcp", 3)) ++ data.proto = IPPROTO_TCP; ++ else if (!strncmp(opteq+1, "udp", 3)) ++ data.proto = IPPROTO_UDP; ++ else ++ printf(_("Warning: Unrecognized proto= option.\n")); ++ } else if (!strcmp(opt, "clientaddr")) { ++ if (strlen(opteq+1) >= sizeof(ip_addr)) ++ printf(_("Invalid client address %s"), ++ opteq+1); ++ strncpy(ip_addr,opteq+1, sizeof(ip_addr)); ++ ip_addr[sizeof(ip_addr)-1] = '\0'; ++ } else if (!strcmp(opt, "sec")) { ++ if (!strcmp(opteq+1, "krb5")) ++ pseudoflavour = 390003; ++ else if (!strcmp(opteq+1, "krb5i")) ++ pseudoflavour = 390004; ++ else if (!strcmp(opteq+1, "krb5p")) ++ pseudoflavour = 390005; ++ else if (!strcmp(opteq+1, "lipkey")) ++ pseudoflavour = 390006; ++ else if (!strcmp(opteq+1, "lipkey-i")) ++ pseudoflavour = 390007; ++ else if (!strcmp(opteq+1, "lipkey-p")) ++ pseudoflavour = 390008; ++ else if (!strcmp(opteq+1, "spkm3")) ++ pseudoflavour = 390009; ++ else if (!strcmp(opteq+1, "spkm3i")) ++ pseudoflavour = 390010; ++ else if (!strcmp(opteq+1, "spkm3p")) ++ pseudoflavour = 390011; ++ else { ++ printf(_("unknown security type %s\n"), ++ opteq+1); ++ goto fail; ++ } ++ } else if (!strcmp(opt, "addr")) { ++ /* ignore */; ++ } else { ++ printf(_("unknown nfs mount parameter: " ++ "%s=%d\n"), opt, val); ++ goto fail; ++ } ++ } else { ++ val = 1; ++ if (!strncmp(opt, "no", 2)) { ++ val = 0; ++ opt += 2; ++ } ++ if (!strcmp(opt, "bg")) ++ bg = val; ++ else if (!strcmp(opt, "fg")) ++ bg = !val; ++ else if (!strcmp(opt, "soft")) ++ soft = val; ++ else if (!strcmp(opt, "hard")) ++ soft = !val; ++ else if (!strcmp(opt, "intr")) ++ intr = val; ++ else if (!strcmp(opt, "cto")) ++ nocto = !val; ++ else if (!strcmp(opt, "ac")) ++ noac = !val; ++ else { ++ if (!sloppy) { ++ printf(_("unknown nfs mount option: " ++ "%s%s\n"), val ? "" : "no", opt); ++ goto fail; ++ } ++ } ++ } ++ } ++ ++ data.flags = (soft ? NFS4_MOUNT_SOFT : 0) ++ | (intr ? NFS4_MOUNT_INTR : 0) ++ | (nocto ? NFS4_MOUNT_NOCTO : 0) ++ | (noac ? NFS4_MOUNT_NOAC : 0); ++ ++ if (pseudoflavour != 0) { ++ data.auth_flavourlen = 1; ++ data.auth_flavours = &pseudoflavour; ++ } ++ ++ data.client_addr.data = ip_addr; ++ data.client_addr.len = strlen(ip_addr); ++ ++ data.mnt_path.data = dirname; ++ data.mnt_path.len = strlen(dirname); ++ ++ data.hostname.data = hostname; ++ data.hostname.len = strlen(hostname); ++ data.host_addr = (struct sockaddr *)&server_addr; ++ data.host_addrlen = sizeof(server_addr); ++ ++#ifdef NFS_MOUNT_DEBUG ++ printf("rsize = %d, wsize = %d, timeo = %d, retrans = %d\n", ++ data.rsize, data.wsize, data.timeo, data.retrans); ++ printf("acreg (min, max) = (%d, %d), acdir (min, max) = (%d, %d)\n", ++ data.acregmin, data.acregmax, data.acdirmin, data.acdirmax); ++ printf("port = %d, bg = %d, retry = %d, flags = %.8x\n", ++ ntohs(server_addr.sin_port), bg, retry, data.flags); ++ printf("soft = %d, intr = %d, nocto = %d, noac = %d\n", ++ (data.flags & NFS4_MOUNT_SOFT) != 0, ++ (data.flags & NFS4_MOUNT_INTR) != 0, ++ (data.flags & NFS4_MOUNT_NOCTO) != 0, ++ (data.flags & NFS4_MOUNT_NOAC) != 0); ++ printf("proto = %s\n", (data.proto == IPPROTO_TCP) ? "tcp" : "udp"); ++#endif ++ ++ data.version = NFS4_MOUNT_VERSION; ++ ++ *mount_opts = (char *) &data; ++ /* clean up */ ++ return 0; ++ ++fail: ++ return retval; ++} +Index: util-linux-ng-2.12r+git20070330/mount/nfs4_mount.h +=================================================================== +--- /dev/null ++++ util-linux-ng-2.12r+git20070330/mount/nfs4_mount.h +@@ -0,0 +1,82 @@ ++#ifndef _LINUX_NFS4_MOUNT_H ++#define _LINUX_NFS4_MOUNT_H ++ ++/* ++ * linux/include/linux/nfs4_mount.h ++ * ++ * Copyright (C) 2002 Trond Myklebust ++ * ++ * structure passed from user-space to kernel-space during an nfsv4 mount ++ */ ++ ++/* ++ * WARNING! Do not delete or change the order of these fields. If ++ * a new field is required then add it to the end. The version field ++ * tracks which fields are present. This will ensure some measure of ++ * mount-to-kernel version compatibility. Some of these aren't used yet ++ * but here they are anyway. ++ */ ++#define NFS4_MOUNT_VERSION 1 ++ ++struct nfs_string { ++ unsigned int len; ++ const char* data; ++}; ++ ++struct nfs4_mount_data { ++ int version; /* 1 */ ++ int flags; /* 1 */ ++ int rsize; /* 1 */ ++ int wsize; /* 1 */ ++ int timeo; /* 1 */ ++ int retrans; /* 1 */ ++ int acregmin; /* 1 */ ++ int acregmax; /* 1 */ ++ int acdirmin; /* 1 */ ++ int acdirmax; /* 1 */ ++ ++ /* see the definition of 'struct clientaddr4' in RFC3010 */ ++ struct nfs_string client_addr; /* 1 */ ++ ++ /* Mount path */ ++ struct nfs_string mnt_path; /* 1 */ ++ ++ /* Server details */ ++ struct nfs_string hostname; /* 1 */ ++ /* Server IP address */ ++ unsigned int host_addrlen; /* 1 */ ++ struct sockaddr* host_addr; /* 1 */ ++ ++ /* Transport protocol to use */ ++ int proto; /* 1 */ ++ ++ /* Pseudo-flavours to use for authentication. See RFC2623 */ ++ int auth_flavourlen; /* 1 */ ++ int *auth_flavours; /* 1 */ ++}; ++ ++/* bits in the flags field */ ++/* Note: the fields that correspond to existing NFSv2/v3 mount options ++ * should mirror the values from include/linux/nfs_mount.h ++ */ ++ ++#define NFS4_MOUNT_SOFT 0x0001 /* 1 */ ++#define NFS4_MOUNT_INTR 0x0002 /* 1 */ ++#define NFS4_MOUNT_NOCTO 0x0010 /* 1 */ ++#define NFS4_MOUNT_NOAC 0x0020 /* 1 */ ++#define NFS4_MOUNT_STRICTLOCK 0x1000 /* 1 */ ++#define NFS4_MOUNT_FLAGMASK 0xFFFF ++ ++/* pseudoflavors: */ ++ ++#define RPC_AUTH_GSS_KRB5 390003 ++#define RPC_AUTH_GSS_KRB5I 390004 ++#define RPC_AUTH_GSS_KRB5P 390005 ++#define RPC_AUTH_GSS_LKEY 390006 ++#define RPC_AUTH_GSS_LKEYI 390007 ++#define RPC_AUTH_GSS_LKEYP 390008 ++#define RPC_AUTH_GSS_SPKM 390009 ++#define RPC_AUTH_GSS_SPKMI 390010 ++#define RPC_AUTH_GSS_SPKMP 390011 ++ ++#endif +Index: util-linux-ng-2.12r+git20070330/mount/nfs.5 +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/nfs.5 ++++ util-linux-ng-2.12r+git20070330/mount/nfs.5 +@@ -3,7 +3,7 @@ + .\" patches. " + .TH NFS 5 "20 November 1993" "Linux 0.99" "Linux Programmer's Manual" + .SH NAME +-nfs \- nfs fstab format and options ++nfs \- nfs and nfs4 fstab format and options + .SH SYNOPSIS + .B /etc/fstab + .SH DESCRIPTION +@@ -17,14 +17,51 @@ the local directory that is the mount po + and the NFS specific options that control + the way the filesystem is mounted. + .P +-Here is an example from an \fI/etc/fstab\fP file from an NFS mount. ++Three different versions of the NFS protocol are ++supported by the Linux NFS client: ++NFS version 2, NFS version 3, and NFS version 4. ++To mount via NFS version 2, use the ++.BR nfs ++file system type and specify ++.BR nfsvers=2 . ++Version 2 is the default protocol version for the ++.BR nfs ++file system type when ++.BR nfsvers= ++is not specified on the mount command. ++To mount via NFS version 3, use the ++.BR nfs ++file system type and specify ++.BR nfsvers=3 . ++To mount via NFS version 4, use the ++.BR nfs4 ++file system type. ++The ++.BR nfsvers= ++keyword is not supported for the ++.BR nfs4 ++file system type. ++.P ++These file system types share similar mount options; ++the differences are listed below. ++.P ++Here is an example from an \fI/etc/fstab\fP file for an NFSv2 mount ++over UDP. + .sp + .nf + .ta 2.5i +0.75i +0.75i +1.0i + server:/usr/local/pub /pub nfs rsize=8192,wsize=8192,timeo=14,intr + .fi ++.P ++Here is an example for an NFSv4 mount over TCP using Kerberos ++5 mutual authentication. ++.sp ++.nf ++.ta 2.5i +0.75i +0.75i +1.0i ++server:/usr/local/pub /pub nfs4 proto=tcp,sec=krb5,hard,intr ++.fi + .DT +-.SS Options ++.SS Options for the nfs file system type + .TP 1.5i + .I rsize=n + The number of bytes NFS uses when reading files from an NFS server. +@@ -217,6 +254,163 @@ which are otherwise used to manipulate A + All of the non-value options have corresponding nooption forms. + For example, nointr means don't allow file operations to be + interrupted. ++.SS Options for the nfs4 file system type ++.TP 1.5i ++.I rsize=n ++The number of bytes NFS uses when reading files from an NFS server. ++The default value is dependent on the kernel, currently 4096 bytes. ++(However, throughput is improved greatly by asking for ++.IR rsize=32768 .) ++This value is negotiated with the server. ++.TP 1.5i ++.I wsize=n ++The number of bytes NFS uses when writing files to an NFS server. ++The default value is dependent on the kernel, currently 4096 bytes. ++(However, throughput is improved greatly by asking for ++.IR wsize=32768 .) ++This value is negotiated with the server. ++.TP 1.5i ++.I timeo=n ++The value in tenths of a second before sending the ++first retransmission after an RPC timeout. ++The default value depends on whether ++.IR proto=udp ++or ++.IR proto=tcp ++is in effect (see below). ++The default value for UDP is 7 tenths of a second. ++The default value for TCP is 60 seconds. ++After the first timeout, ++the timeout is doubled after each successive timeout until a maximum ++timeout of 60 seconds is reached or the enough retransmissions ++have occured to cause a major timeout. Then, if the filesystem ++is hard mounted, each new timeout cascade restarts at twice the ++initial value of the previous cascade, again doubling at each ++retransmission. The maximum timeout is always 60 seconds. ++.TP 1.5i ++.I retrans=n ++The number of minor timeouts and retransmissions that must occur before ++a major timeout occurs. The default is 5 timeouts for ++.IR proto=udp ++and 2 timeouts for ++.IR proto=tcp . ++When a major timeout ++occurs, the file operation is either aborted or a "server not responding" ++message is printed on the console. ++.TP 1.5i ++.I acregmin=n ++The minimum time in seconds that attributes of a regular file should ++be cached before requesting fresh information from a server. ++The default is 3 seconds. ++.TP 1.5i ++.I acregmax=n ++The maximum time in seconds that attributes of a regular file can ++be cached before requesting fresh information from a server. ++The default is 60 seconds. ++.TP 1.5i ++.I acdirmin=n ++The minimum time in seconds that attributes of a directory should ++be cached before requesting fresh information from a server. ++The default is 30 seconds. ++.TP 1.5i ++.I acdirmax=n ++The maximum time in seconds that attributes of a directory can ++be cached before requesting fresh information from a server. ++The default is 60 seconds. ++.TP 1.5i ++.I actimeo=n ++Using actimeo sets all of ++.I acregmin, ++.I acregmax, ++.I acdirmin, ++and ++.I acdirmax ++to the same value. ++There is no default value. ++.TP 1.5i ++.I retry=n ++The number of minutes to retry an NFS mount operation ++in the foreground or background before giving up. ++The default value is 10000 minutes, which is roughly one week. ++.TP 1.5i ++.I port=n ++The numeric value of the port to connect to the NFS server on. ++If the port number is 0 (the default) then query the ++remote host's portmapper for the port number to use. ++If the remote host's NFS daemon is not registered with ++its portmapper, the standard NFS port number 2049 is ++used instead. ++.TP 1.5i ++.I proto=n ++Mount the NFS filesystem using a specific network protocol ++instead of the default UDP protocol. ++Many NFS version 4 servers only support TCP. ++Valid protocol types are ++.IR udp ++and ++.IR tcp . ++.TP 1.5i ++.I clientaddr=n ++On a multi-homed client, this ++causes the client to use a specific callback address when ++communicating with an NFS version 4 server. ++This option is currently ignored. ++.TP 1.5i ++.I sec=n ++Specify an advanced security mechanism for this file system. ++To use Kerberos 5 mutual authentication, specify ++.IR krb5 . ++Kerberos 5 integrity checking is specified with ++.IR krb5i , ++and Kerberos 5 privacy is specified with ++.IR krb5p . ++Other security mechanisms may become available in the future. ++.TP 1.5i ++.I bg ++If an NFS mount attempt times out, retry the mount ++in the background. ++After a mount operation is backgrounded, all subsequent mounts ++on the same NFS server will be backgrounded immediately, without ++first attempting the mount. ++A missing mount point is treated as a timeout, ++to allow for nested NFS mounts. ++.TP 1.5i ++.I fg ++If the first NFS mount attempt times out, retry the mount ++in the foreground. ++This is the complement of the ++.I bg ++option, and also the default behavior. ++.TP 1.5i ++.I soft ++If an NFS file operation has a major timeout then report an I/O error to ++the calling program. ++The default is to continue retrying NFS file operations indefinitely. ++.TP 1.5i ++.I hard ++If an NFS file operation has a major timeout then report ++"server not responding" on the console and continue retrying indefinitely. ++This is the default. ++.TP 1.5i ++.I intr ++If an NFS file operation has a major timeout and it is hard mounted, ++then allow signals to interupt the file operation and cause it to ++return EINTR to the calling program. The default is to not ++allow file operations to be interrupted. ++.TP 1.5i ++.I nocto ++Suppress the retrieval of new attributes when creating a file. ++.TP 1.5i ++.I noac ++Disable attribute caching, and force synchronous writes. ++This extracts a ++server performance penalty but it allows two different NFS clients ++to get reasonable good results when both clients are actively ++writing to common filesystem on the server. ++.P ++All of the non-value options have corresponding nooption forms. ++For example, nointr means don't allow file operations to be ++interrupted. + .SH FILES + .I /etc/fstab + .SH "SEE ALSO" +Index: util-linux-ng-2.12r+git20070330/mount/sundries.h +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/sundries.h ++++ util-linux-ng-2.12r+git20070330/mount/sundries.h +@@ -40,6 +40,8 @@ void die (int errcode, const char *fmt, + + int nfsmount (const char *spec, const char *node, int *flags, + char **orig_opts, char **opt_args, int *version, int running_bg); ++int nfs4mount (const char *spec, const char *node, int *flags, ++ char **orig_opts, char **opt_args, int running_bg); + + /* exit status - bits below are ORed */ + #define EX_USAGE 1 /* incorrect invocation or permission */ +Index: util-linux-ng-2.12r+git20070330/mount/umount.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/umount.c ++++ util-linux-ng-2.12r+git20070330/mount/umount.c +@@ -88,6 +88,9 @@ int verbose = 0; + /* True if ruid != euid. */ + int suid = 0; + ++/* Needed by nfs4mount.c */ ++int sloppy = 0; ++ + /* + * check_special_umountprog() + * If there is a special umount program for this type, exec it. +Index: util-linux-ng-2.12r+git20070330/mount/Makefile.am +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/Makefile.am ++++ util-linux-ng-2.12r+git20070330/mount/Makefile.am +@@ -17,7 +17,7 @@ MNTHDRS = fstab.h linux_fs.h mount_mnten + mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ + get_label_uuid.c mount_by_label.c mount_blkid.c mount_guess_fstype.c \ + getusername.c \ +- nfsmount.c nfsmount_xdr.c nfsmount_clnt.c \ ++ nfsmount.c nfsmount_xdr.c nfsmount_clnt.c nfs4mount.c \ + lomount.c \ + $(MNTHDRS) + diff --git a/util-linux-2.12-mount_guessfstype.diff b/util-linux-2.12-mount_guessfstype.diff deleted file mode 100644 index 2dbf0d7..0000000 --- a/util-linux-2.12-mount_guessfstype.diff +++ /dev/null @@ -1,183 +0,0 @@ ---- util-linux-2.12q/configure -+++ util-linux-2.12q/configure -@@ -190,6 +190,7 @@ - - # - # H9. For raw.c: do we have ? -+# H10. For guessfstype of CD-Extra, do we have ? - # - if ./testincl "linux/raw.h"; then - echo "HAVE_RAW_H=yes" >> make_include -@@ -552,6 +553,12 @@ - echo "HAVE_XGETTEXT=no" >> make_include - fi - -+# -+# H10. For guessfstype of CD-Extra, do we have -+# -+if ./testincl "linux/cdrom.h"; then -+ echo "#define HAVE_cdrom_h" >> defines.h -+fi - - # - # 8. For err.c: do we have __progname? ---- util-linux-2.12q/mount/mount_guess_fstype.c -+++ util-linux-2.12q/mount/mount_guess_fstype.c -@@ -26,6 +26,9 @@ - * 2001-10-26 Tim Launchbury - * added sysv magic. - * -+ * 2003-11-21 Mads Martin Joergensen -+ * added guessfstype support for CD-Extra -+ * - * aeb - many changes. - * - */ -@@ -37,11 +40,16 @@ - #include - #include - #include -+#include - #include "linux_fs.h" - #include "mount_blkid.h" - #include "mount_guess_fstype.h" - #include "sundries.h" /* for xstrdup */ - #include "nls.h" -+#include "../defines.h" -+#ifdef HAVE_cdrom_h -+#include -+#endif - - #define ETC_FILESYSTEMS "/etc/filesystems" - #define PROC_FILESYSTEMS "/proc/filesystems" -@@ -249,7 +257,51 @@ - return 0; - - /* do seeks and reads in disk order, otherwise a very short -- partition may cause a failure because of read error */ -+ partition may cause a failure because of read error -+ Rearranged a tiny bit to check ext2/3 before vfat. We still -+ have to make sure it's not iso9660 first, or otherwise we -+ might bail out wrongly due to an io-error */ -+ -+ if (!type) { -+ /* block 0 */ -+ if (lseek(fd, 0, SEEK_SET) != 0 -+ || read(fd, (char *) &xsb, sizeof(xsb)) != sizeof(xsb)) -+ goto try_iso9660; -+ } -+ -+ if (!type) { -+ /* block 1 */ -+ if (lseek(fd, 1024, SEEK_SET) != 1024 || -+ read(fd, (char *) &sb, sizeof(sb)) != sizeof(sb)) -+ goto io_error; -+ -+ /* ext2 has magic in little-endian on disk, so "swapped" is -+ superfluous; however, there have existed strange byteswapped -+ PPC ext2 systems */ -+ if (ext2magic(sb.e2s) == EXT2_SUPER_MAGIC || -+ ext2magic(sb.e2s) == EXT2_PRE_02B_MAGIC || -+ ext2magic(sb.e2s) == swapped(EXT2_SUPER_MAGIC)) { -+ type = "ext2"; -+ -+ /* maybe even ext3? */ -+ if ((assemble4le(sb.e2s.s_feature_compat) -+ & EXT3_FEATURE_COMPAT_HAS_JOURNAL) && -+ assemble4le(sb.e2s.s_journal_inum) != 0) -+ type = "ext3"; /* "ext3,ext2" */ -+ } -+ -+ else if (minixmagic(sb.ms) == MINIX_SUPER_MAGIC || -+ minixmagic(sb.ms) == MINIX_SUPER_MAGIC2 || -+ minixmagic(sb.ms) == MINIX2_SUPER_MAGIC || -+ minixmagic(sb.ms) == MINIX2_SUPER_MAGIC2) -+ type = "minix"; -+ -+ else if (extmagic(sb.es) == EXT_SUPER_MAGIC) -+ type = "ext"; -+ -+ else if (vxfsmagic(sb.vs) == VXFS_SUPER_MAGIC) -+ type = "vxfs"; -+ } - - if (!type) { - /* block 0 */ -@@ -307,40 +359,6 @@ - type = "sysv"; - } - -- if (!type) { -- /* block 1 */ -- if (lseek(fd, 1024, SEEK_SET) != 1024 || -- read(fd, (char *) &sb, sizeof(sb)) != sizeof(sb)) -- goto io_error; -- -- /* ext2 has magic in little-endian on disk, so "swapped" is -- superfluous; however, there have existed strange byteswapped -- PPC ext2 systems */ -- if (ext2magic(sb.e2s) == EXT2_SUPER_MAGIC || -- ext2magic(sb.e2s) == EXT2_PRE_02B_MAGIC || -- ext2magic(sb.e2s) == swapped(EXT2_SUPER_MAGIC)) { -- type = "ext2"; -- -- /* maybe even ext3? */ -- if ((assemble4le(sb.e2s.s_feature_compat) -- & EXT3_FEATURE_COMPAT_HAS_JOURNAL) && -- assemble4le(sb.e2s.s_journal_inum) != 0) -- type = "ext3"; /* "ext3,ext2" */ -- } -- -- else if (minixmagic(sb.ms) == MINIX_SUPER_MAGIC || -- minixmagic(sb.ms) == MINIX_SUPER_MAGIC2 || -- minixmagic(sb.ms) == swapped(MINIX_SUPER_MAGIC2) || -- minixmagic(sb.ms) == MINIX2_SUPER_MAGIC || -- minixmagic(sb.ms) == MINIX2_SUPER_MAGIC2) -- type = "minix"; -- -- else if (extmagic(sb.es) == EXT_SUPER_MAGIC) -- type = "ext"; -- -- else if (vxfsmagic(sb.vs) == VXFS_SUPER_MAGIC) -- type = "vxfs"; -- } - - if (!type) { - /* block 1 */ -@@ -416,8 +434,34 @@ - /* block 32 */ - try_iso9660: - if (lseek(fd, 0x8000, SEEK_SET) != 0x8000 -- || read(fd, (char *) &isosb, sizeof(isosb)) != sizeof(isosb)) -- goto io_error; -+ || read(fd, (char *) &isosb, sizeof(isosb)) != sizeof(isosb)) { -+#ifdef HAVE_cdrom_h -+ /* Try and see if we have an iso9660 data track later on */ -+ char toc_header[2]; -+ struct cdrom_tocentry *toc[CDROM_LEADOUT + 1]; -+ int i, offset; -+ -+ if (ioctl(fd, CDROMREADTOCHDR, &toc_header)) -+ goto io_error; -+ for (i = toc_header[0]; i <= toc_header[1]; i++) { -+ toc[i] = malloc(sizeof(struct cdrom_tocentry)); -+ memset(toc[i],0,sizeof(struct cdrom_tocentry)); -+ toc[i]->cdte_track = i; -+ toc[i]->cdte_format = CDROM_LBA; -+ if(ioctl(fd,CDROMREADTOCENTRY,toc[i])) -+ goto io_error; -+ if((toc[i]->cdte_ctrl & CDROM_DATA_TRACK)) { -+ offset = 2048 * (toc[i]->cdte_addr.lba + 16); -+ if(lseek(fd, offset, SEEK_SET) != offset) -+ goto io_error; -+ if(read(fd,(char *) &isosb,sizeof(isosb))==-1) -+ goto io_error; -+ } -+ } -+#else -+ goto io_error; -+#endif -+ } - - if (strncmp(isosb.hs.id, HS_STANDARD_ID, sizeof(isosb.hs.id)) == 0) { - /* "CDROM" */ diff --git a/util-linux-2.12-mountfallback.patch b/util-linux-2.12-mount_mountfallback.patch similarity index 73% rename from util-linux-2.12-mountfallback.patch rename to util-linux-2.12-mount_mountfallback.patch index 5ffd6c7..23a04f1 100644 --- a/util-linux-2.12-mountfallback.patch +++ b/util-linux-2.12-mount_mountfallback.patch @@ -1,6 +1,8 @@ ---- util-linux-2.12q/mount/nfsmount.c -+++ util-linux-2.12q/mount/nfsmount.c -@@ -169,8 +169,20 @@ +Index: util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/mount/nfsmount.c ++++ util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c +@@ -167,8 +167,20 @@ get_mountport(struct sockaddr_in *server } if (!p.pm_vers) p.pm_vers = MOUNTVERS; @@ -22,7 +24,7 @@ #if 0 if (!p.pm_port) { p.pm_port = pmap_getport(server_addr, p.pm_prog, p.pm_vers, -@@ -584,7 +596,8 @@ +@@ -582,7 +594,8 @@ retry_udp: pm_mnt = get_mountport(&mount_server_addr, mountprog, mountvers, diff --git a/util-linux-2.12-nfs-tcp.diff b/util-linux-2.12-mount_nfs_tcp.patch similarity index 66% rename from util-linux-2.12-nfs-tcp.diff rename to util-linux-2.12-mount_nfs_tcp.patch index 06ff169..69943e1 100644 --- a/util-linux-2.12-nfs-tcp.diff +++ b/util-linux-2.12-mount_nfs_tcp.patch @@ -1,6 +1,8 @@ ---- util-linux-2.12q/mount/nfs.5 -+++ util-linux-2.12q/mount/nfs.5 -@@ -199,11 +199,11 @@ +Index: util-linux-ng-2.12r+2.13pre7/mount/nfs.5 +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/mount/nfs.5 ++++ util-linux-ng-2.12r+2.13pre7/mount/nfs.5 +@@ -199,11 +199,11 @@ writing to common filesystem on the serv .TP 1.5i .I tcp Mount the NFS filesystem using the TCP protocol instead of the @@ -15,7 +17,7 @@ .TP 1.5i .I noacl Assume no extended access control mechanisms like POSIX ACLs are used -@@ -227,8 +227,5 @@ +@@ -227,8 +227,5 @@ interrupted. The posix, and nocto options are parsed by mount but currently are silently ignored. .P @@ -24,9 +26,11 @@ -.P The umount command should notify the server when an NFS filesystem is unmounted. ---- util-linux-2.12q/mount/nfsmount.c -+++ util-linux-2.12q/mount/nfsmount.c -@@ -319,7 +319,7 @@ +Index: util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/mount/nfsmount.c ++++ util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c +@@ -317,7 +317,7 @@ int nfsmount(const char *spec, const cha noacl = 0; noac = 0; retry = 10000; /* 10000 minutes ~ 1 week */ @@ -35,7 +39,7 @@ mountprog = MOUNTPROG; mountvers = 0; -@@ -439,6 +439,8 @@ +@@ -437,6 +437,8 @@ int nfsmount(const char *spec, const cha } } } @@ -44,7 +48,7 @@ proto = (tcp) ? IPPROTO_TCP : IPPROTO_UDP; data.flags = (soft ? NFS_MOUNT_SOFT : 0) -@@ -742,7 +744,13 @@ +@@ -740,7 +742,13 @@ int nfsmount(const char *spec, const cha * '0' for port (service unavailable), we then exit, * notifying the user, rather than hanging up mount. */ diff --git a/util-linux-2.12-multipleraw.diff b/util-linux-2.12-multipleraw.diff deleted file mode 100644 index 9e38775..0000000 --- a/util-linux-2.12-multipleraw.diff +++ /dev/null @@ -1,65 +0,0 @@ ---- disk-utils/raw.c -+++ disk-utils/raw.c -@@ -100,7 +100,7 @@ - } - - /* -- * It's a bind or a single query. Either way we need a raw device. -+ * It's a bind or a single query. - */ - - if (optind >= argc) -@@ -108,27 +108,38 @@ - raw_name = argv[optind++]; - - err = stat(raw_name, &statbuf); -- if (err) { -+ if (err && do_query) { - fprintf (stderr, "Cannot locate raw device '%s' (%s)\n", - raw_name, strerror(errno)); - exit(2); - } - -- if (!S_ISCHR(statbuf.st_mode)) { -- fprintf (stderr, "raw device '%s' is not a character dev\n", -- raw_name); -- exit(2); -- } -- if (major(statbuf.st_rdev) != RAW_MAJOR) { -- fprintf (stderr, "Device '%s' is not a raw dev\n", -- raw_name); -- exit(2); -- } -- -- raw_minor = minor(statbuf.st_rdev); -+ if (!err) { -+ if (!S_ISCHR(statbuf.st_mode)) { -+ fprintf (stderr, "raw device '%s' is not a character dev\n", -+ raw_name); -+ exit(2); -+ } -+ if (major(statbuf.st_rdev) != RAW_MAJOR) { -+ fprintf (stderr, "Device '%s' is not a raw dev\n", -+ raw_name); -+ exit(2); -+ } - -- if (do_query) -- return query(raw_minor, 0); -+ raw_minor = minor(statbuf.st_rdev); -+ if (do_query) -+ return query(raw_minor, 0); -+ } else { -+ char *p; -+ p = strrchr(raw_name, '/'); -+ if (p) { -+ p = strpbrk(p, "0123456789"); -+ if (p) -+ raw_minor = atoi(p); -+ } -+ if (!p) -+ raw_minor = -1; -+ } - - /* - * It's not a query, so we still have some parsing to do. Have diff --git a/util-linux-2.12-suse-compatibility.diff b/util-linux-2.12-suse-compatibility.diff deleted file mode 100644 index 0da6c54..0000000 --- a/util-linux-2.12-suse-compatibility.diff +++ /dev/null @@ -1,149 +0,0 @@ ---- util-linux-2.12q/mount/lomount.c -+++ util-linux-2.12q/mount/lomount.c -@@ -52,6 +52,24 @@ - extern void show_all_loops(void); - extern int read_options_from_fstab(char *, char **); - -+int passphrase_timeout=0; -+struct sigaction alrmact; -+ -+static void -+alrmhandler() { -+ /* let the SIGINT handler do the work: */ -+ kill(getpid(),SIGINT); -+ usleep(1000000); -+ kill(getpid(),SIGTERM); -+ usleep(1000000); -+ /* stubborn... */ -+ exit(0); -+} -+ -+ -+ -+ -+ - #if !defined(LOOP_PASSWORD_MIN_LENGTH) - # define LOOP_PASSWORD_MIN_LENGTH 20 - #endif -@@ -460,6 +478,15 @@ - int i, ask2; - - if(!passFDnumber) { -+ -+ if(passphrase_timeout) { -+ alrmact.sa_handler = &alrmhandler; -+ memset(&alrmact.sa_mask, 0, sizeof(alrmact.sa_mask)); -+ alrmact.sa_flags = 0; -+ sigaction(SIGALRM, &alrmact, NULL); -+ alarm(passphrase_timeout); -+ } -+ - p = getpass(_("Password: ")); - ask2 = passAskTwice ? 1 : 0; - } else { -@@ -493,6 +520,15 @@ - s = malloc(i + 1); - if(!s) goto nomem; - strcpy(s, p); -+ -+ if(passphrase_timeout) { -+ alrmact.sa_handler = &alrmhandler; -+ memset(&alrmact.sa_mask, 0, sizeof(alrmact.sa_mask)); -+ alrmact.sa_flags = 0; -+ sigaction(SIGALRM, &alrmact, NULL); -+ alarm(passphrase_timeout); -+ } -+ - p = getpass(_("Retype password: ")); - if(!p) goto nomem; - if(strcmp(s, p)) goto compareErr; -@@ -524,6 +560,15 @@ - strcpy(s, p); - memset(p, 0, i); - if(ask2) { -+ -+ if(passphrase_timeout) { -+ alrmact.sa_handler = &alrmhandler; -+ memset(&alrmact.sa_mask, 0, sizeof(alrmact.sa_mask)); -+ alrmact.sa_flags = 0; -+ sigaction(SIGALRM, &alrmact, NULL); -+ alarm(passphrase_timeout); -+ } -+ - p = getpass(_("Retype password: ")); - if(!p) goto nomem; - if(strcmp(s, p)) { -@@ -738,7 +783,7 @@ - struct loop_info64 loopinfo; - int fd, ffd, mode, i; - char *pass, *apiName = NULL; -- void (*hashFunc)(unsigned char *, int, unsigned char *, int); -+ void (*hashFunc)(unsigned char *, int, unsigned char *, int) = NULL; - unsigned char multiKeyBits[65][32]; - int minPassLen = LOOP_PASSWORD_MIN_LENGTH; - int run_mkfs_command = 0; -@@ -762,8 +807,23 @@ - - memset (&loopinfo, 0, sizeof (loopinfo)); - xstrncpy (loopinfo.lo_file_name, file, LO_NAME_SIZE); -- if (loopEncryptionType) -+ if (loopEncryptionType) { -+ if (strcasecmp(loopEncryptionType,"twofish")==0 -+ && !passHashFuncName) { -+ loopinfo.lo_encrypt_type = 3; /*LO_CRYPT_FISH*/ -+ loopinfo.lo_encrypt_key_size = 20; -+ passHashFuncName = strdup("rmd160"); -+ fprintf(stderr,"Switching to old S.u.S.E. loop_fish2 compatibility mode.\n"); -+ } else if (strcasecmp(loopEncryptionType,"twofishSL92")==0 -+ && !passHashFuncName) { -+ loopinfo.lo_encrypt_type = 3; /*LO_CRYPT_FISH*/ -+ loopinfo.lo_encrypt_key_size = 32; -+ passHashFuncName = strdup("sha512"); -+ fprintf(stderr,"Switching to SuSE 9.2 loop_fish2 compatibility mode.\n"); -+ } else { - loopinfo.lo_encrypt_type = loop_crypt_type (loopEncryptionType, &loopinfo.lo_encrypt_key_size, &apiName); -+ } -+ } - if (loopOffsetBytes) - loopinfo.lo_offset = mystrtoull(loopOffsetBytes, 1); - if (loopSizeBytes) -@@ -995,7 +1055,7 @@ - %s loop_device # give info\n\ - %s -a # give info of all loops\n\ - %s -d loop_device # delete\n\ --options: -o offset -s sizelimit -p passwdfd -S pseed -H phash\n\ -+options: -o offset -s sizelimit -p passwdfd -S pseed -H phash -t timeout\n\ - -I loinit -T -K gpgkey -G gpghome -C itercountk -v -r\n"), - progname, progname, progname, progname, progname); - exit(1); -@@ -1139,7 +1199,7 @@ - - delete = 0; - progname = argv[0]; -- while ((c = getopt(argc,argv,"aC:de:FG:H:I:K:o:p:rs:S:Tv")) != -1) { -+ while ((c = getopt(argc,argv,"aC:de:FG:H:I:K:o:p:rs:S:t:Tv")) != -1) { - switch (c) { - case 'a': /* show status of all loops */ - option_a = 1; -@@ -1183,6 +1243,9 @@ - case 'S': /* optional seed for passphrase */ - passSeedString = optarg; - break; -+ case 't': -+ passphrase_timeout = atoi(optarg); -+ break; - case 'T': /* ask passphrase _twice_ */ - passAskTwice = "T"; - break; ---- util-linux-2.12q/mount/losetup.8 -+++ util-linux-2.12q/mount/losetup.8 -@@ -128,6 +128,9 @@ - password before hashing. Using different seeds for different partitions - makes dictionary attacks slower but does not prevent them if user supplied - password is guessable. Seed is not used in multi-key mode. -+.IP "\fB\-t \fItimeout\fP" -+make the password prompt time out after \fItimeout\fP seconds have -+passed by. - .IP "\fB\-T\fP" - Asks password twice. - .IP "\fB\-v\fP" diff --git a/util-linux-2.12a-mountbylabel-dm.patch b/util-linux-2.12a-mount_mountbylabel-dm.patch similarity index 76% rename from util-linux-2.12a-mountbylabel-dm.patch rename to util-linux-2.12a-mount_mountbylabel-dm.patch index 2969097..c39636d 100644 --- a/util-linux-2.12a-mountbylabel-dm.patch +++ b/util-linux-2.12a-mount_mountbylabel-dm.patch @@ -1,6 +1,8 @@ ---- util-linux-2.12a/mount/mount_by_label.c.old 2004-08-11 22:25:06.000000000 +0100 -+++ util-linux-2.12a/mount/mount_by_label.c 2004-08-11 22:25:21.000000000 +0100 -@@ -17,6 +17,8 @@ +Index: util-linux-ng-2.12r+2.13pre7/mount/mount_by_label.c +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/mount/mount_by_label.c ++++ util-linux-ng-2.12r+2.13pre7/mount/mount_by_label.c +@@ -18,6 +18,8 @@ * - Added JFS v2 format support * 2002-07-26 Luciano Chavez * - Added EVMS support @@ -9,15 +11,15 @@ */ #include -@@ -38,6 +40,7 @@ +@@ -39,6 +41,7 @@ #define VG_DIR "/proc/lvm/VGs" #define EVMS_VOLUME_NAME_SIZE 127 #define PROC_EVMS_VOLUMES "/proc/evms/volumes" +#define DEVICEMAPPERDIR "/dev/mapper" - static struct uuidCache_s { - struct uuidCache_s *next; -@@ -101,6 +104,34 @@ + extern char *progname; + +@@ -104,6 +107,34 @@ uuidcache_init_lvm(void) { closedir(vg_dir); } @@ -52,7 +54,7 @@ static int uuidcache_init_evms(void) { FILE *procvol; -@@ -250,6 +281,8 @@ +@@ -256,6 +287,8 @@ uuidcache_init(void) { fclose(procpt); uuidcache_init_lvm(); diff --git a/util-linux-2.12a-mountpointwithcolon.diff b/util-linux-2.12a-mount_mountpointwithcolon.patch similarity index 59% rename from util-linux-2.12a-mountpointwithcolon.diff rename to util-linux-2.12a-mount_mountpointwithcolon.patch index d3aca72..aecc7d7 100644 --- a/util-linux-2.12a-mountpointwithcolon.diff +++ b/util-linux-2.12a-mount_mountpointwithcolon.patch @@ -1,6 +1,8 @@ ---- util-linux-2.12q/mount/mount.c -+++ util-linux-2.12q/mount/mount.c -@@ -1178,11 +1178,15 @@ +Index: util-linux-ng-2.12r+git20070330/mount/mount.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/mount.c ++++ util-linux-ng-2.12r+git20070330/mount/mount.c +@@ -1207,11 +1207,15 @@ mount_one (const char *spec, const char if (types == NULL && !mounttype && !is_existing_file(spec)) { if (strchr (spec, ':') != NULL) { @@ -17,5 +19,5 @@ + } + } } else if(!strncmp(spec, "//", 2)) { - types = "smbfs"; + types = "cifs"; if (verbose) diff --git a/util-linux-2.12a-mount_procswapcheck.patch b/util-linux-2.12a-mount_procswapcheck.patch new file mode 100644 index 0000000..43f0e9d --- /dev/null +++ b/util-linux-2.12a-mount_procswapcheck.patch @@ -0,0 +1,31 @@ +Index: util-linux-ng-2.12r+git20070330/mount/swapon.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/swapon.c ++++ util-linux-ng-2.12r+git20070330/mount/swapon.c +@@ -138,6 +138,7 @@ static int + is_in_proc_swaps(const char *fname) { + int i; + char canonical[PATH_MAX + 2]; ++ struct stat stfname, stswapFile; + + if (!myrealpath(fname, canonical, PATH_MAX + 1)) { + fprintf(stderr, _("%s: cannot canonicalize %s: %s\n"), +@@ -146,9 +147,15 @@ is_in_proc_swaps(const char *fname) { + *(canonical + (PATH_MAX + 1)) = '\0'; + } + +- for (i = 0; i < numSwaps; i++) +- if (swapFiles[i] && !strcmp(canonical, swapFiles[i])) +- return 1; ++ for (i = 0; i < numSwaps; i++) { ++ if(S_ISBLK(stfname.st_mode)) { ++ stat(swapFiles[i], &stswapFile); ++ if(S_ISBLK(stswapFile.st_mode)) ++ if(stfname.st_rdev == stswapFile.st_rdev) ++ return 1; ++ } else if (swapFiles[i] && !strcmp(canonical, swapFiles[i])) ++ return 1; ++ } + return 0; + } + diff --git a/util-linux-2.12a-procswapscheck.diff b/util-linux-2.12a-procswapscheck.diff deleted file mode 100644 index 208c7fd..0000000 --- a/util-linux-2.12a-procswapscheck.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- util-linux-2.12q/mount/swapon.c -+++ util-linux-2.12q/mount/swapon.c -@@ -160,10 +160,19 @@ - static int - is_in_proc_swaps(const char *fname) { - int i; -+ struct stat stfname, stswapFile; - -- for (i = 0; i < numSwaps; i++) -- if (swapFiles[i] && !strcmp(fname, swapFiles[i])) -+ stat(fname, &stfname); -+ -+ for (i = 0; i < numSwaps; i++) { -+ if(S_ISBLK(stfname.st_mode)) { -+ stat(swapFiles[i], &stswapFile); -+ if(S_ISBLK(stswapFile.st_mode)) -+ if(stfname.st_rdev == stswapFile.st_rdev) -+ return 1; -+ } else if (swapFiles[i] && !strcmp(fname, swapFiles[i])) - return 1; -+ } - return 0; - } - diff --git a/util-linux-2.12h-mtablock.diff b/util-linux-2.12h-mtablock.diff deleted file mode 100644 index b23560c..0000000 --- a/util-linux-2.12h-mtablock.diff +++ /dev/null @@ -1,152 +0,0 @@ -Index: util-linux-2.12r/mount/fstab.c -=================================================================== ---- util-linux-2.12r.orig/mount/fstab.c -+++ util-linux-2.12r/mount/fstab.c -@@ -395,6 +395,7 @@ getfsvolspec (const char *label) { - - /* Flag for already existing lock file. */ - static int we_created_lockfile = 0; -+static int lockfile_fd = -1; - - /* Flag to indicate that signals have been set up. */ - static int signals_have_been_setup = 0; -@@ -416,6 +417,8 @@ setlkw_timeout (int sig) { - void - unlock_mtab (void) { - if (we_created_lockfile) { -+ close(lockfile_fd); -+ lockfile_fd = -1; - unlink (MOUNTED_LOCK); - we_created_lockfile = 0; - } -@@ -443,7 +446,7 @@ unlock_mtab (void) { - - void - lock_mtab (void) { -- int tries = 3; -+ int tries = 100000, i; - char linktargetfile[MOUNTLOCK_LINKTARGET_LTH]; - - at_die = unlock_mtab; -@@ -469,45 +472,48 @@ lock_mtab (void) { - - sprintf(linktargetfile, MOUNTLOCK_LINKTARGET, getpid ()); - -+ i = open (linktargetfile, O_WRONLY|O_CREAT, 0); -+ if (i < 0) { -+ int errsv = errno; -+ /* linktargetfile does not exist (as a file) -+ and we cannot create it. Read-only filesystem? -+ Too many files open in the system? -+ Filesystem full? */ -+ die (EX_FILEIO, _("can't create lock file %s: %s " -+ "(use -n flag to override)"), -+ linktargetfile, strerror (errsv)); -+ } -+ close(i); -+ - /* Repeat until it was us who made the link */ - while (!we_created_lockfile) { - struct flock flock; -- int errsv, fd, i, j; -- -- i = open (linktargetfile, O_WRONLY|O_CREAT, 0); -- if (i < 0) { -- int errsv = errno; -- /* linktargetfile does not exist (as a file) -- and we cannot create it. Read-only filesystem? -- Too many files open in the system? -- Filesystem full? */ -- die (EX_FILEIO, _("can't create lock file %s: %s " -- "(use -n flag to override)"), -- linktargetfile, strerror (errsv)); -- } -- close(i); -+ int errsv, j; - - j = link(linktargetfile, MOUNTED_LOCK); - errsv = errno; - -- (void) unlink(linktargetfile); -- - if (j == 0) - we_created_lockfile = 1; - - if (j < 0 && errsv != EEXIST) { -+ (void) unlink(linktargetfile); - die (EX_FILEIO, _("can't link lock file %s: %s " - "(use -n flag to override)"), - MOUNTED_LOCK, strerror (errsv)); - } - -- fd = open (MOUNTED_LOCK, O_WRONLY); -+ lockfile_fd = open (MOUNTED_LOCK, O_WRONLY); - -- if (fd < 0) { -+ if (lockfile_fd < 0) { - int errsv = errno; - /* Strange... Maybe the file was just deleted? */ -- if (errno == ENOENT && tries-- > 0) -+ if (errno == ENOENT && tries-- > 0) { -+ if (tries % 200 == 0) -+ usleep(30); - continue; -+ } -+ (void) unlink(linktargetfile); - die (EX_FILEIO, _("can't open lock file %s: %s " - "(use -n flag to override)"), - MOUNTED_LOCK, strerror (errsv)); -@@ -520,7 +526,7 @@ lock_mtab (void) { - - if (j == 0) { - /* We made the link. Now claim the lock. */ -- if (fcntl (fd, F_SETLK, &flock) == -1) { -+ if (fcntl (lockfile_fd, F_SETLK, &flock) == -1) { - if (verbose) { - int errsv = errno; - printf(_("Can't lock lock file %s: %s\n"), -@@ -528,13 +534,15 @@ lock_mtab (void) { - } - /* proceed anyway */ - } -+ (void) unlink(linktargetfile); - } else { - static int tries = 0; - - /* Someone else made the link. Wait. */ - alarm(LOCK_TIMEOUT); -- if (fcntl (fd, F_SETLKW, &flock) == -1) { -+ if (fcntl (lockfile_fd, F_SETLKW, &flock) == -1) { - int errsv = errno; -+ (void) unlink(linktargetfile); - die (EX_FILEIO, _("can't lock lock file %s: %s"), - MOUNTED_LOCK, (errno == EINTR) ? - _("timed out") : strerror (errsv)); -@@ -542,16 +550,18 @@ lock_mtab (void) { - alarm(0); - /* Limit the number of iterations - maybe there - still is some old /etc/mtab~ */ -- if (tries++ > 3) { -- if (tries > 5) -- die (EX_FILEIO, _("Cannot create link %s\n" -- "Perhaps there is a stale lock file?\n"), -- MOUNTED_LOCK); -- sleep(1); -- } -+ ++tries; -+ if (tries % 200 == 0) -+ usleep(30); -+ if (tries > 100000) { -+ (void) unlink(linktargetfile); -+ close(lockfile_fd); -+ die (EX_FILEIO, _("Cannot create link %s\n" -+ "Perhaps there is a stale lock file?\n"), -+ MOUNTED_LOCK); -+ } -+ close(lockfile_fd); - } -- -- close(fd); - } - } - diff --git a/util-linux-2.12h-short-passwords.diff b/util-linux-2.12h-short-passwords.diff deleted file mode 100644 index ee917b1..0000000 --- a/util-linux-2.12h-short-passwords.diff +++ /dev/null @@ -1,55 +0,0 @@ ---- util-linux-2.12q/mount/lomount.c -+++ util-linux-2.12q/mount/lomount.c -@@ -73,6 +73,7 @@ - #if !defined(LOOP_PASSWORD_MIN_LENGTH) - # define LOOP_PASSWORD_MIN_LENGTH 20 - #endif -+#define SUSE_PASSWORD_MIN_LENGTH 8 - - char *passFDnumber = (char *)0; - char *passAskTwice = (char *)0; -@@ -459,7 +460,7 @@ - multiKeyPass[0] = 0; - break; - } -- if(strlen(multiKeyPass[x]) < LOOP_PASSWORD_MIN_LENGTH) break; -+ if(strlen(multiKeyPass[x]) < SUSE_PASSWORD_MIN_LENGTH) break; - x++; - } - if(x == 65) -@@ -498,7 +499,7 @@ - while(x < 65) { - multiKeyPass[x] = get_FD_pass(i); - if(!multiKeyPass[x]) goto nomem; -- if(strlen(multiKeyPass[x]) < LOOP_PASSWORD_MIN_LENGTH) break; -+ if(strlen(multiKeyPass[x]) < SUSE_PASSWORD_MIN_LENGTH) break; - x++; - } - if(x == 65) { -@@ -579,7 +580,7 @@ - memset(p, 0, i); - } - if(i < warnLen) { -- fprintf(stderr, _("WARNING - Please use longer password (%d or more characters)\n"), LOOP_PASSWORD_MIN_LENGTH); -+ fprintf(stderr, _("WARNING - Please use longer password (%d or more characters)\n"), SUSE_PASSWORD_MIN_LENGTH); - } - strcat(s, seed); - return(s); -@@ -785,7 +786,7 @@ - char *pass, *apiName = NULL; - void (*hashFunc)(unsigned char *, int, unsigned char *, int) = NULL; - unsigned char multiKeyBits[65][32]; -- int minPassLen = LOOP_PASSWORD_MIN_LENGTH; -+ int minPassLen = SUSE_PASSWORD_MIN_LENGTH; - int run_mkfs_command = 0; - - loopFileName = (char *)file; -@@ -900,7 +901,7 @@ - break; /* out of switch(loopinfo.lo_encrypt_type) */ - } - } -- pass = sGetPass (minPassLen, LOOP_PASSWORD_MIN_LENGTH); -+ pass = sGetPass (minPassLen, SUSE_PASSWORD_MIN_LENGTH); - if(!pass) goto close_fd_ffd_return1; - i = strlen(pass); - if(hashFunc == unhashed1_key_setup) { diff --git a/util-linux-2.12i-x86_64intel.diff b/util-linux-2.12i-x86_64intel.diff deleted file mode 100644 index ac7f2f1..0000000 --- a/util-linux-2.12i-x86_64intel.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- util-linux-2.12q/MCONFIG -+++ util-linux-2.12q/MCONFIG -@@ -17,7 +17,7 @@ - # Select for CPU i386 if the binaries must be able to run on an intel 386 - # (by default i486 code is generated, see below) - CPU=$(shell uname -m) --ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/') -+ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/;s/x86_64/intel/') - - # If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp - # will use PAM for authentication. Additionally, passwd will not be -@@ -137,6 +137,10 @@ - else - CPUTAIL=486 - endif -+ ifeq "$(CPU)" "x86_64" -+ CPUHEAD=-mcpu= -+ CPUTAIL=nocona -+ endif - CPUOPT= $(CPUHEAD)$(CPUTAIL) - OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer - else diff --git a/util-linux-2.12q-mount--move.diff b/util-linux-2.12q-mount_--move.patch similarity index 82% rename from util-linux-2.12q-mount--move.diff rename to util-linux-2.12q-mount_--move.patch index 9060495..0b926d3 100644 --- a/util-linux-2.12q-mount--move.diff +++ b/util-linux-2.12q-mount_--move.patch @@ -1,6 +1,8 @@ ---- mount/mount.c +Index: mount/mount.c +=================================================================== +--- mount/mount.c.orig +++ mount/mount.c -@@ -665,6 +665,25 @@ +@@ -760,6 +760,25 @@ update_mtab_entry(const char *spec, cons else { mntFILE *mfp; @@ -26,4 +28,3 @@ lock_mtab(); mfp = my_setmntent(MOUNTED, "a+"); if (mfp == NULL || mfp->mntent_fp == NULL) { - diff --git a/util-linux-2.12q-mount_strict_aliasing.patch b/util-linux-2.12q-mount_strict_aliasing.patch new file mode 100644 index 0000000..fe53e6d --- /dev/null +++ b/util-linux-2.12q-mount_strict_aliasing.patch @@ -0,0 +1,28 @@ +Index: util-linux-ng-2.12r+git20070330/mount/Makefile.am +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/Makefile.am ++++ util-linux-ng-2.12r+git20070330/mount/Makefile.am +@@ -17,11 +17,11 @@ MNTHDRS = fstab.h linux_fs.h mount_mnten + mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ + get_label_uuid.c mount_by_label.c mount_blkid.c mount_guess_fstype.c \ + getusername.c \ +- nfsmount.c nfsmount_xdr.c nfsmount_clnt.c nfs4mount.c \ ++ nfsmount.c nfsmount_clnt.c nfs4mount.c \ + lomount.c \ + $(MNTHDRS) + +-mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a ++mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a libnfsmount_xdr.a + + umount_SOURCES = umount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ + getusername.c get_label_uuid.c mount_by_label.c mount_blkid.c \ +@@ -60,6 +60,9 @@ swapargs.h: + clean-local: + rm -f swapargs.h + ++noinst_LIBRARIES = libnfsmount_xdr.a ++libnfsmount_xdr_a_SOURCES = nfsmount_xdr.c ++libnfsmount_xdr_a_CFLAGS = -fno-strict-aliasing + + install-exec-hook: + chmod 4755 $(DESTDIR)$(bindir)/mount diff --git a/util-linux-2.12q-umount2-not-static.patch b/util-linux-2.12q-mount_umount2_not_static.patch similarity index 62% rename from util-linux-2.12q-umount2-not-static.patch rename to util-linux-2.12q-mount_umount2_not_static.patch index e07c3d1..6dead01 100644 --- a/util-linux-2.12q-umount2-not-static.patch +++ b/util-linux-2.12q-mount_umount2_not_static.patch @@ -1,6 +1,8 @@ ---- mount/umount.c +Index: mount/umount.c +=================================================================== +--- mount/umount.c.orig +++ mount/umount.c -@@ -40,7 +40,7 @@ +@@ -38,7 +38,7 @@ #include #ifdef __NR_umount2 diff --git a/util-linux-2.12q-nfsv4.patch b/util-linux-2.12q-nfsv4.patch deleted file mode 100644 index d33aaaf..0000000 --- a/util-linux-2.12q-nfsv4.patch +++ /dev/null @@ -1,628 +0,0 @@ ---- util-linux-2.12q/mount/Makefile -+++ util-linux-2.12q/mount/Makefile -@@ -29,7 +29,7 @@ - - MAYBE = pivot_root swapoff - --NFS_OBJS = nfsmount.o nfsmount_xdr.o nfsmount_clnt.o -+NFS_OBJS = nfsmount.o nfsmount_xdr.o nfsmount_clnt.o nfs4mount.o - GEN_FILES = nfsmount.h nfsmount_xdr.c nfsmount_clnt.c - - all: $(PROGS) ---- util-linux-2.12q/mount/mount.c -+++ util-linux-2.12q/mount/mount.c -@@ -847,8 +847,23 @@ - "without support for the type `nfs'")); - #endif - } -+#ifdef HAVE_NFS -+ /* -+ * NFSv4 support -+ */ -+ if (!fake && types && streq (types, "nfs4")) { -+ mnt_err = nfs4mount(spec, node, &flags, &extra_opts, &mount_opts, bg); -+ if (mnt_err) -+ return mnt_err; -+ goto nosigblock; -+#else -+ die (EX_SOFTWARE, _("mount: this version was compiled " -+ "without support for the type `nfs4'")); -+#endif -+ } - - block_signals (SIG_BLOCK); -+nosigblock: - - if (!fake) { - mnt5_res = guess_fstype_and_mount (spec, node, &types, flags & ~MS_NOSYS, ---- util-linux-2.12q/mount/nfs4mount.c -+++ util-linux-2.12q/mount/nfs4mount.c -@@ -0,0 +1,460 @@ -+/* -+ * nfs4mount.c -- Linux NFS mount -+ * Copyright (C) 2002 Trond Myklebust -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Note: this file based on the original nfsmount.c -+ */ -+ -+#include "../defines.h" /* for HAVE_rpcsvc_nfs_prot_h and HAVE_inet_aton */ -+ -+#include -+#include -+#undef __FD_CLR -+#undef __FD_SET -+#undef __FD_ISSET -+#undef __FD_ZERO -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#ifdef HAVE_rpcsvc_nfs_prot_h -+#include -+#else -+#include -+#define nfsstat nfs_stat -+#endif -+ -+#include "sundries.h" -+ -+#include "mount_constants.h" -+#include "nfs4_mount.h" -+ -+#include "nls.h" -+ -+#ifndef NFS_PORT -+#define NFS_PORT 2049 -+#endif -+ -+extern int clnt_ping(struct sockaddr_in *, const u_long, const u_long, const u_int); -+extern void rpc_strerror(void); -+ -+struct { -+ char *flavour; -+ int fnum; -+} flav_map[] = { -+ { "krb5", RPC_AUTH_GSS_KRB5 }, -+ { "krb5i", RPC_AUTH_GSS_KRB5I }, -+ { "krb5p", RPC_AUTH_GSS_KRB5P }, -+ { "lipkey", RPC_AUTH_GSS_LKEY }, -+ { "lipkey-i", RPC_AUTH_GSS_LKEYI }, -+ { "lipkey-p", RPC_AUTH_GSS_LKEYP }, -+ { "spkm3", RPC_AUTH_GSS_SPKM }, -+ { "spkm3i", RPC_AUTH_GSS_SPKMI }, -+ { "spkm3p", RPC_AUTH_GSS_SPKMP }, -+ { "unix", AUTH_UNIX }, -+ { "sys", AUTH_SYS }, -+ { "null", AUTH_NULL }, -+ { "none", AUTH_NONE }, -+}; -+ -+#define FMAPSIZE (sizeof(flav_map)/sizeof(flav_map[0])) -+#define MAX_USER_FLAVOUR 16 -+ -+static int parse_sec(char *sec, int *pseudoflavour) -+{ -+ int i, num_flavour = 0; -+ -+ for (sec = strtok(sec, ":"); sec; sec = strtok(NULL, ":")) { -+ if (num_flavour >= MAX_USER_FLAVOUR) { -+ fprintf(stderr, -+ _("mount: maximum number of security flavors " -+ "exceeded\n")); -+ return 0; -+ } -+ for (i = 0; i < FMAPSIZE; i++) { -+ if (strcmp(sec, flav_map[i].flavour) == 0) { -+ pseudoflavour[num_flavour++] = flav_map[i].fnum; -+ break; -+ } -+ } -+ if (i == FMAPSIZE) { -+ fprintf(stderr, -+ _("mount: unknown security type %s\n"), sec); -+ return 0; -+ } -+ } -+ if (!num_flavour) -+ fprintf(stderr, -+ _("mount: no security flavors passed to sec= option\n")); -+ return num_flavour; -+} -+ -+static int parse_devname(char *hostdir, char **hostname, char **dirname) -+{ -+ char *s; -+ -+ if (!(s = strchr(hostdir, ':'))) { -+ fprintf(stderr, -+ _("mount: " -+ "directory to mount not in host:dir format\n")); -+ return -1; -+ } -+ *hostname = hostdir; -+ *dirname = s + 1; -+ *s = '\0'; -+ /* Ignore all but first hostname in replicated mounts -+ until they can be fully supported. (mack@sgi.com) */ -+ if ((s = strchr(hostdir, ','))) { -+ *s = '\0'; -+ fprintf(stderr, -+ _("mount: warning: " -+ "multiple hostnames not supported\n")); -+ } -+ return 0; -+} -+ -+static int fill_ipv4_sockaddr(const char *hostname, struct sockaddr_in *addr) -+{ -+ struct hostent *hp; -+ addr->sin_family = AF_INET; -+ -+ if (inet_aton(hostname, &addr->sin_addr)) -+ return 0; -+ if ((hp = gethostbyname(hostname)) == NULL) { -+ fprintf(stderr, _("mount: can't get address for %s\n"), -+ hostname); -+ return -1; -+ } -+ if (hp->h_length > sizeof(struct in_addr)) { -+ fprintf(stderr, -+ _("mount: got bad hp->h_length\n")); -+ hp->h_length = sizeof(struct in_addr); -+ } -+ memcpy(&addr->sin_addr, hp->h_addr, hp->h_length); -+ return 0; -+} -+ -+static int get_my_ipv4addr(char *ip_addr, int len) -+{ -+ char myname[1024]; -+ struct sockaddr_in myaddr; -+ -+ if (gethostname(myname, sizeof(myname))) { -+ fprintf(stderr, _("mount: can't determine client address\n")); -+ return -1; -+ } -+ if (fill_ipv4_sockaddr(myname, &myaddr)) -+ return -1; -+ snprintf(ip_addr, len, "%s", inet_ntoa(myaddr.sin_addr)); -+ ip_addr[len-1] = '\0'; -+ return 0; -+} -+ -+/* Convert RPC errors into strings */ -+void rpc_strerror(void) -+{ -+ int cf_stat = rpc_createerr.cf_stat; -+ int cf_errno = rpc_createerr.cf_error.re_errno; -+ char *ptr, *estr = clnt_sperrno(cf_stat); -+ -+ if (estr) { -+ if ((ptr = index(estr, ':'))) -+ estr = ++ptr; -+ -+ fprintf(stderr, "RPC Error: %d (%s )\n", cf_stat, estr); -+ if (cf_stat == RPC_SYSTEMERROR) -+ fprintf(stderr, "System Error: %d (%s)\n", cf_errno, strerror(cf_errno)); -+ } -+} -+ -+int -+clnt_ping(struct sockaddr_in *saddr, const u_long prog, const u_long vers, -+ const u_int prot) -+{ -+ static const struct timeval TIMEOUT = { 20, 0 }; -+ static const struct timeval RETRY_TIMEOUT = { 3, 0 }; -+ CLIENT *clnt=NULL; -+ int sock, stat; -+ static char clnt_res; -+ -+ rpc_createerr.cf_stat = stat = 0; -+ sock = RPC_ANYSOCK; -+ switch(prot) { -+ case IPPROTO_UDP: -+ clnt = clntudp_bufcreate(saddr, prog, vers, -+ RETRY_TIMEOUT, &sock, -+ RPCSMALLMSGSIZE, RPCSMALLMSGSIZE); -+ break; -+ case IPPROTO_TCP: -+ clnt = clnttcp_create(saddr, prog, vers, &sock, -+ RPCSMALLMSGSIZE, RPCSMALLMSGSIZE); -+ break; -+ default: -+ goto out_bad; -+ } -+ if (!clnt) -+ goto out_bad; -+ memset(&clnt_res, 0, sizeof(clnt_res)); -+ stat = clnt_call(clnt, NULLPROC, -+ (xdrproc_t)xdr_void, (caddr_t)NULL, -+ (xdrproc_t)xdr_void, (caddr_t)&clnt_res, -+ TIMEOUT); -+ clnt_destroy(clnt); -+ close(sock); -+ if (stat != RPC_PROGVERSMISMATCH) -+ return 1; -+ -+ out_bad: -+ return 0; -+} -+ -+ -+int nfs4mount(const char *spec, const char *node, int *flags, -+ char **extra_opts, char **mount_opts, -+ int running_bg) -+{ -+ static struct nfs4_mount_data data; -+ static char hostdir[1024]; -+ static char ip_addr[16] = "127.0.0.1"; -+ static struct sockaddr_in server_addr; -+ static int pseudoflavour[MAX_USER_FLAVOUR]; -+ int num_flavour = 0; -+ -+ char *hostname, *dirname, *old_opts; -+ char new_opts[1024]; -+ char *opt, *opteq; -+ char *s; -+ int val; -+ int bg, soft, intr; -+ int nocto, noac; -+ int retry; -+ int retval; -+ -+ retval = EX_FAIL; -+ if (strlen(spec) >= sizeof(hostdir)) { -+ fprintf(stderr, _("mount: " -+ "excessively long host:dir argument\n")); -+ goto fail; -+ } -+ strcpy(hostdir, spec); -+ if (parse_devname(hostdir, &hostname, &dirname)) -+ goto fail; -+ -+ if (fill_ipv4_sockaddr(hostname, &server_addr)) -+ goto fail; -+ if (get_my_ipv4addr(ip_addr, sizeof(ip_addr))) -+ goto fail; -+ -+ /* add IP address to mtab options for use when unmounting */ -+ s = inet_ntoa(server_addr.sin_addr); -+ old_opts = *extra_opts; -+ if (!old_opts) -+ old_opts = ""; -+ if (strlen(old_opts) + strlen(s) + 10 >= sizeof(new_opts)) { -+ fprintf(stderr, _("mount: " -+ "excessively long option argument\n")); -+ goto fail; -+ } -+ snprintf(new_opts, sizeof(new_opts), "%s%saddr=%s", -+ old_opts, *old_opts ? "," : "", s); -+ *extra_opts = xstrdup(new_opts); -+ -+ /* Set default options. -+ * rsize/wsize and timeo are left 0 in order to -+ * let the kernel decide. -+ */ -+ memset(&data, 0, sizeof(data)); -+ data.retrans = 3; -+ data.acregmin = 3; -+ data.acregmax = 60; -+ data.acdirmin = 30; -+ data.acdirmax = 60; -+ data.proto = IPPROTO_TCP; -+ -+ bg = 0; -+ soft = 0; -+ intr = NFS4_MOUNT_INTR; -+ nocto = 0; -+ noac = 0; -+ retry = 10000; /* 10000 minutes ~ 1 week */ -+ -+ /* -+ * NFSv4 specifies that the default port should be 2049 -+ */ -+ server_addr.sin_port = htons(NFS_PORT); -+ -+ /* parse options */ -+ -+ for (opt = strtok(old_opts, ","); opt; opt = strtok(NULL, ",")) { -+ if ((opteq = strchr(opt, '='))) { -+ val = atoi(opteq + 1); -+ *opteq = '\0'; -+ if (!strcmp(opt, "rsize")) -+ data.rsize = val; -+ else if (!strcmp(opt, "wsize")) -+ data.wsize = val; -+ else if (!strcmp(opt, "timeo")) -+ data.timeo = val; -+ else if (!strcmp(opt, "retrans")) -+ data.retrans = val; -+ else if (!strcmp(opt, "acregmin")) -+ data.acregmin = val; -+ else if (!strcmp(opt, "acregmax")) -+ data.acregmax = val; -+ else if (!strcmp(opt, "acdirmin")) -+ data.acdirmin = val; -+ else if (!strcmp(opt, "acdirmax")) -+ data.acdirmax = val; -+ else if (!strcmp(opt, "actimeo")) { -+ data.acregmin = val; -+ data.acregmax = val; -+ data.acdirmin = val; -+ data.acdirmax = val; -+ } -+ else if (!strcmp(opt, "retry")) -+ retry = val; -+ else if (!strcmp(opt, "port")) -+ server_addr.sin_port = htons(val); -+ else if (!strcmp(opt, "proto")) { -+ if (!strncmp(opteq+1, "tcp", 3)) -+ data.proto = IPPROTO_TCP; -+ else if (!strncmp(opteq+1, "udp", 3)) -+ data.proto = IPPROTO_UDP; -+ else -+ printf(_("Warning: Unrecognized proto= option.\n")); -+ } else if (!strcmp(opt, "clientaddr")) { -+ if (strlen(opteq+1) >= sizeof(ip_addr)) -+ printf(_("Invalid client address %s"), -+ opteq+1); -+ strncpy(ip_addr,opteq+1, sizeof(ip_addr)); -+ ip_addr[sizeof(ip_addr)-1] = '\0'; -+ } else if (!strcmp(opt, "sec")) { -+ num_flavour = parse_sec(opteq+1, pseudoflavour); -+ if (!num_flavour) -+ goto fail; -+ } else if (!strcmp(opt, "addr")) { -+ /* ignore */; -+ } else { -+ printf(_("unknown nfs mount parameter: " -+ "%s=%d\n"), opt, val); -+ goto fail; -+ } -+ } else { -+ val = 1; -+ if (!strncmp(opt, "no", 2)) { -+ val = 0; -+ opt += 2; -+ } -+ if (!strcmp(opt, "bg")) -+ bg = val; -+ else if (!strcmp(opt, "fg")) -+ bg = !val; -+ else if (!strcmp(opt, "soft")) -+ soft = val; -+ else if (!strcmp(opt, "hard")) -+ soft = !val; -+ else if (!strcmp(opt, "intr")) -+ intr = val; -+ else if (!strcmp(opt, "cto")) -+ nocto = !val; -+ else if (!strcmp(opt, "ac")) -+ noac = !val; -+ else { -+ if (!sloppy) { -+ printf(_("unknown nfs mount option: " -+ "%s%s\n"), val ? "" : "no", opt); -+ goto fail; -+ } -+ } -+ } -+ } -+ -+ data.flags = (soft ? NFS4_MOUNT_SOFT : 0) -+ | (intr ? NFS4_MOUNT_INTR : 0) -+ | (nocto ? NFS4_MOUNT_NOCTO : 0) -+ | (noac ? NFS4_MOUNT_NOAC : 0); -+ -+ if (num_flavour == 0) -+ pseudoflavour[num_flavour++] = AUTH_UNIX; -+ data.auth_flavourlen = num_flavour; -+ data.auth_flavours = pseudoflavour; -+ -+ data.client_addr.data = ip_addr; -+ data.client_addr.len = strlen(ip_addr); -+ -+ data.mnt_path.data = dirname; -+ data.mnt_path.len = strlen(dirname); -+ -+ data.hostname.data = hostname; -+ data.hostname.len = strlen(hostname); -+ data.host_addr = (struct sockaddr *)&server_addr; -+ data.host_addrlen = sizeof(server_addr); -+ -+#ifdef NFS_MOUNT_DEBUG -+ printf("rsize = %d, wsize = %d, timeo = %d, retrans = %d\n", -+ data.rsize, data.wsize, data.timeo, data.retrans); -+ printf("acreg (min, max) = (%d, %d), acdir (min, max) = (%d, %d)\n", -+ data.acregmin, data.acregmax, data.acdirmin, data.acdirmax); -+ printf("port = %d, bg = %d, retry = %d, flags = %.8x\n", -+ ntohs(server_addr.sin_port), bg, retry, data.flags); -+ printf("soft = %d, intr = %d, nocto = %d, noac = %d\n", -+ (data.flags & NFS4_MOUNT_SOFT) != 0, -+ (data.flags & NFS4_MOUNT_INTR) != 0, -+ (data.flags & NFS4_MOUNT_NOCTO) != 0, -+ (data.flags & NFS4_MOUNT_NOAC) != 0); -+ -+ if (num_flavour > 0) { -+ int pf_cnt, i; -+ -+ printf("sec = "); -+ for (pf_cnt = 0; pf_cnt < num_flavour; pf_cnt++) { -+ for (i = 0; i < FMAPSIZE; i++) { -+ if (flav_map[i].fnum == pseudoflavour[pf_cnt]) { -+ printf("%s", flav_map[i].flavour); -+ break; -+ } -+ } -+ printf("%s", (pf_cnt < num_flavour-1) ? ":" : "\n"); -+ } -+ } -+ printf("proto = %s\n", (data.proto == IPPROTO_TCP) ? "tcp" : "udp"); -+#endif -+ -+ data.version = NFS4_MOUNT_VERSION; -+ -+ clnt_ping(&server_addr, NFS_PROGRAM, 4, data.proto); -+ if (rpc_createerr.cf_stat) { -+ fprintf(stderr, "mount to NFS server '%s' failed.\n", data.hostname.data); -+ goto fail; -+ } -+ -+ *mount_opts = (char *) &data; -+ /* clean up */ -+ return 0; -+ -+fail: -+ if (verbose) { -+ rpc_strerror(); -+ } -+ return retval; -+} ---- util-linux-2.12q/mount/nfs4_mount.h -+++ util-linux-2.12q/mount/nfs4_mount.h -@@ -0,0 +1,82 @@ -+#ifndef _LINUX_NFS4_MOUNT_H -+#define _LINUX_NFS4_MOUNT_H -+ -+/* -+ * linux/include/linux/nfs4_mount.h -+ * -+ * Copyright (C) 2002 Trond Myklebust -+ * -+ * structure passed from user-space to kernel-space during an nfsv4 mount -+ */ -+ -+/* -+ * WARNING! Do not delete or change the order of these fields. If -+ * a new field is required then add it to the end. The version field -+ * tracks which fields are present. This will ensure some measure of -+ * mount-to-kernel version compatibility. Some of these aren't used yet -+ * but here they are anyway. -+ */ -+#define NFS4_MOUNT_VERSION 1 -+ -+struct nfs_string { -+ unsigned int len; -+ const char* data; -+}; -+ -+struct nfs4_mount_data { -+ int version; /* 1 */ -+ int flags; /* 1 */ -+ int rsize; /* 1 */ -+ int wsize; /* 1 */ -+ int timeo; /* 1 */ -+ int retrans; /* 1 */ -+ int acregmin; /* 1 */ -+ int acregmax; /* 1 */ -+ int acdirmin; /* 1 */ -+ int acdirmax; /* 1 */ -+ -+ /* see the definition of 'struct clientaddr4' in RFC3010 */ -+ struct nfs_string client_addr; /* 1 */ -+ -+ /* Mount path */ -+ struct nfs_string mnt_path; /* 1 */ -+ -+ /* Server details */ -+ struct nfs_string hostname; /* 1 */ -+ /* Server IP address */ -+ unsigned int host_addrlen; /* 1 */ -+ struct sockaddr* host_addr; /* 1 */ -+ -+ /* Transport protocol to use */ -+ int proto; /* 1 */ -+ -+ /* Pseudo-flavours to use for authentication. See RFC2623 */ -+ int auth_flavourlen; /* 1 */ -+ int *auth_flavours; /* 1 */ -+}; -+ -+/* bits in the flags field */ -+/* Note: the fields that correspond to existing NFSv2/v3 mount options -+ * should mirror the values from include/linux/nfs_mount.h -+ */ -+ -+#define NFS4_MOUNT_SOFT 0x0001 /* 1 */ -+#define NFS4_MOUNT_INTR 0x0002 /* 1 */ -+#define NFS4_MOUNT_NOCTO 0x0010 /* 1 */ -+#define NFS4_MOUNT_NOAC 0x0020 /* 1 */ -+#define NFS4_MOUNT_STRICTLOCK 0x1000 /* 1 */ -+#define NFS4_MOUNT_FLAGMASK 0xFFFF -+ -+/* pseudoflavors: */ -+ -+#define RPC_AUTH_GSS_KRB5 390003 -+#define RPC_AUTH_GSS_KRB5I 390004 -+#define RPC_AUTH_GSS_KRB5P 390005 -+#define RPC_AUTH_GSS_LKEY 390006 -+#define RPC_AUTH_GSS_LKEYI 390007 -+#define RPC_AUTH_GSS_LKEYP 390008 -+#define RPC_AUTH_GSS_SPKM 390009 -+#define RPC_AUTH_GSS_SPKMI 390010 -+#define RPC_AUTH_GSS_SPKMP 390011 -+ -+#endif ---- util-linux-2.12q/mount/nfs_mount4.h -+++ util-linux-2.12q/mount/nfs_mount4.h -@@ -8,7 +8,9 @@ - * so it is easiest to ignore the kernel altogether (at compile time). - */ - --#define NFS_MOUNT_VERSION 4 -+#define NFS_MOUNT_VERSION 6 -+#define NFS_MAX_CONTEXT_LEN 256 -+ - - struct nfs2_fh { - char data[32]; -@@ -36,6 +38,9 @@ - int namlen; /* 2 */ - unsigned int bsize; /* 3 */ - struct nfs3_fh root; /* 4 */ -+ int pseudoflavor; /* 5 */ -+ char context[NFS_MAX_CONTEXT_LEN + 1]; /* 6 */ -+ - }; - - /* bits in the flags field */ -@@ -52,3 +57,19 @@ - #define NFS_MOUNT_NONLM 0x0200 /* 3 */ - #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */ - #define NFS_MOUNT_NOACL 0x0800 /* 4 */ -+#define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */ -+ -+/* security pseudoflavors */ -+ -+#ifndef AUTH_GSS_KRB5 -+#define AUTH_GSS_KRB5 390003 -+#define AUTH_GSS_KRB5I 390004 -+#define AUTH_GSS_KRB5P 390005 -+#define AUTH_GSS_LKEY 390006 -+#define AUTH_GSS_LKEYI 390007 -+#define AUTH_GSS_LKEYP 390008 -+#define AUTH_GSS_SPKM 390009 -+#define AUTH_GSS_SPKMI 390010 -+#define AUTH_GSS_SPKMP 390011 -+#endif -+ diff --git a/util-linux-2.12q-null.diff b/util-linux-2.12q-null.diff deleted file mode 100644 index d9eb82e..0000000 --- a/util-linux-2.12q-null.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- util-linux-2.12q/misc-utils/script.c -+++ util-linux-2.12q/misc-utils/script.c -@@ -325,9 +325,9 @@ - shname = shell; - - if (cflg) -- execl(shell, shname, "-c", cflg, 0); -+ execl(shell, shname, "-c", cflg, NULL); - else -- execl(shell, shname, "-i", 0); -+ execl(shell, shname, "-i", NULL); - - perror(shell); - fail(); diff --git a/util-linux-2.12q-strict-aliasing.diff b/util-linux-2.12q-strict-aliasing.diff deleted file mode 100644 index 94bd8f0..0000000 --- a/util-linux-2.12q-strict-aliasing.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- util-linux-2.12q/mount/Makefile -+++ util-linux-2.12q/mount/Makefile -@@ -110,7 +110,7 @@ - $(COMPILE) $(RPC_CFLAGS) nfsmount_clnt.c - - nfsmount_xdr.o: nfsmount_xdr.c -- $(COMPILE) $(RPC_CFLAGS) nfsmount_xdr.c -+ $(COMPILE) -fno-strict-aliasing $(RPC_CFLAGS) nfsmount_xdr.c - - ifeq "$(HAVE_GOOD_RPC)" "yes" - nfsmount.h: nfsmount.x diff --git a/util-linux-2.12q-ionice.diff b/util-linux-2.12q-sys_utils_ionice.patch similarity index 84% rename from util-linux-2.12q-ionice.diff rename to util-linux-2.12q-sys_utils_ionice.patch index e52f2ce..c098a72 100644 --- a/util-linux-2.12q-ionice.diff +++ b/util-linux-2.12q-sys_utils_ionice.patch @@ -1,33 +1,7 @@ ---- util-linux-2.12q/sys-utils/Makefile -+++ util-linux-2.12q/sys-utils/Makefile -@@ -8,7 +8,7 @@ - - # Where to put man pages? - --MAN1= arch.1 flock.1 readprofile.1 -+MAN1= arch.1 flock.1 readprofile.1 ionice.1 - - MAN8= ctrlaltdel.8 cytune.8 dmesg.8 \ - ipcrm.8 ipcs.8 renice.8 \ -@@ -19,7 +19,7 @@ - - BIN= arch dmesg - --USRBIN= cytune flock ipcrm ipcs renice setsid -+USRBIN= cytune flock ipcrm ipcs renice setsid ionice - - USRSBIN= readprofile tunelp - -@@ -71,6 +71,7 @@ - ctrlaltdel: ctrlaltdel.o $(LIB)/my_reboot.o - cytune.o: cytune.c cyclades.h - cytune: cytune.o -+ionice: ionice.o - ipcrm: ipcrm.o - ipcs: ipcs.o - rdev: rdev.o ---- util-linux-2.12q/sys-utils/ionice.1 -+++ util-linux-2.12q/sys-utils/ionice.1 +Index: util-linux-ng-2.12r+2.13pre7/sys-utils/ionice.1 +=================================================================== +--- /dev/null ++++ util-linux-ng-2.12r+2.13pre7/sys-utils/ionice.1 @@ -0,0 +1,71 @@ +.TH ionice "1" "August 2005" ionice +.SH NAME @@ -100,8 +74,10 @@ + +.SH AUTHORS +Jens Axboe ---- util-linux-2.12q/sys-utils/ionice.c -+++ util-linux-2.12q/sys-utils/ionice.c +Index: util-linux-ng-2.12r+2.13pre7/sys-utils/ionice.c +=================================================================== +--- /dev/null ++++ util-linux-ng-2.12r+2.13pre7/sys-utils/ionice.c @@ -0,0 +1,144 @@ +/* + * ionice: set or get process io scheduling class and priority @@ -247,3 +223,27 @@ + + return 0; +} +Index: util-linux-ng-2.12r+2.13pre7/sys-utils/Makefile.am +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/sys-utils/Makefile.am ++++ util-linux-ng-2.12r+2.13pre7/sys-utils/Makefile.am +@@ -2,17 +2,17 @@ + + bin_PROGRAMS = dmesg + +-usrbinexec_PROGRAMS = cytune flock ipcrm ipcs renice setsid ++usrbinexec_PROGRAMS = cytune flock ionice ipcrm ipcs renice setsid + + cytune_SOURCES = cytune.c cyclades.h + + sbin_PROGRAMS = ctrlaltdel + + usrsbinexec_PROGRAMS = readprofile tunelp + + tunelp_SOURCES = tunelp.c lp.h + +-man_MANS = flock.1 readprofile.1 \ ++man_MANS = flock.1 ionice.1 readprofile.1 \ + ctrlaltdel.8 cytune.8 dmesg.8 ipcrm.8 ipcs.8 renice.8 \ + setsid.8 tunelp.8 + diff --git a/util-linux-2.12r-mkfs_open_exclusive.patch b/util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch similarity index 61% rename from util-linux-2.12r-mkfs_open_exclusive.patch rename to util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch index f94d3b2..260392e 100644 --- a/util-linux-2.12r-mkfs_open_exclusive.patch +++ b/util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch @@ -1,8 +1,8 @@ -Index: util-linux-2.12r/disk-utils/mkswap.c +Index: util-linux-ng-2.12r+git20070330/disk-utils/mkswap.c =================================================================== ---- util-linux-2.12r.orig/disk-utils/mkswap.c -+++ util-linux-2.12r/disk-utils/mkswap.c -@@ -645,7 +645,7 @@ main(int argc, char ** argv) { +--- util-linux-ng-2.12r+git20070330.orig/disk-utils/mkswap.c ++++ util-linux-ng-2.12r+git20070330/disk-utils/mkswap.c +@@ -660,7 +660,7 @@ main(int argc, char ** argv) { usage(); } @@ -11,10 +11,10 @@ Index: util-linux-2.12r/disk-utils/mkswap.c if (DEV < 0 || fstat(DEV, &statbuf) < 0) { perror(device_name); exit(1); -Index: util-linux-2.12r/disk-utils/mkfs.minix.c +Index: util-linux-ng-2.12r+git20070330/disk-utils/mkfs.minix.c =================================================================== ---- util-linux-2.12r.orig/disk-utils/mkfs.minix.c -+++ util-linux-2.12r/disk-utils/mkfs.minix.c +--- util-linux-ng-2.12r+git20070330.orig/disk-utils/mkfs.minix.c ++++ util-linux-ng-2.12r+git20070330/disk-utils/mkfs.minix.c @@ -699,7 +699,7 @@ main(int argc, char ** argv) { tmp += dirsize; *(short *)tmp = 2; @@ -24,10 +24,10 @@ Index: util-linux-2.12r/disk-utils/mkfs.minix.c if (DEV<0) die(_("unable to open %s")); if (fstat(DEV,&statbuf)<0) -Index: util-linux-2.12r/disk-utils/mkfs.bfs.c +Index: util-linux-ng-2.12r+git20070330/disk-utils/mkfs.bfs.c =================================================================== ---- util-linux-2.12r.orig/disk-utils/mkfs.bfs.c -+++ util-linux-2.12r/disk-utils/mkfs.bfs.c +--- util-linux-ng-2.12r+git20070330.orig/disk-utils/mkfs.bfs.c ++++ util-linux-ng-2.12r+git20070330/disk-utils/mkfs.bfs.c @@ -170,7 +170,7 @@ main(int argc, char *argv[]) { if (!S_ISBLK(statbuf.st_mode)) fatal(_("%s is not a block special device"), device); diff --git a/util-linux-2.12r-mkswap_fix.patch b/util-linux-2.12r-disk_utils_mkswap_fix.patch similarity index 58% rename from util-linux-2.12r-mkswap_fix.patch rename to util-linux-2.12r-disk_utils_mkswap_fix.patch index 58d50a0..058dd2c 100644 --- a/util-linux-2.12r-mkswap_fix.patch +++ b/util-linux-2.12r-disk_utils_mkswap_fix.patch @@ -1,8 +1,10 @@ -Index: util-linux-2.12r/disk-utils/mkswap.c +default swap to V1 in any case [#205956] + +Index: util-linux-ng-2.12r+git20070330/disk-utils/mkswap.c =================================================================== ---- util-linux-2.12r.orig/disk-utils/mkswap.c 2004-12-21 09:21:24.000000000 -0800 -+++ util-linux-2.12r/disk-utils/mkswap.c 2006-10-23 17:51:24.636063632 -0700 -@@ -602,9 +602,7 @@ +--- util-linux-ng-2.12r+git20070330.orig/disk-utils/mkswap.c ++++ util-linux-ng-2.12r+git20070330/disk-utils/mkswap.c +@@ -617,9 +617,7 @@ main(int argc, char ** argv) { version = 1; else /* use version 1 as default, if possible */ diff --git a/util-linux-2.12r-external-prog-on-guess.diff b/util-linux-2.12r-external-prog-on-guess.diff deleted file mode 100644 index 662da55..0000000 --- a/util-linux-2.12r-external-prog-on-guess.diff +++ /dev/null @@ -1,133 +0,0 @@ -From: Jeff Mahoney -Subject: [PATCH] mount: needs to handle special mountprog even on guessed file systems. - - If the user doesn't specify -t mount.fstype will never be called. - - This patch fixes that. - - Update: Fixes a bug where the mount would get added to mtab twice. - --- - - mount.c | 47 +++++++++++++++++++++++++++++++++++++++++------ - mount_guess_fstype.c | 3 +-- - 2 files changed, 42 insertions(+), 8 deletions(-) - -diff -rup util-linux-2.12r/mount/mount.c util-linux-2.12r.updated/mount/mount.c ---- util-linux-2.12r/mount/mount.c 2006-05-17 17:35:37.000000000 -0400 -+++ util-linux-2.12r.updated/mount/mount.c 2006-05-17 17:35:17.000000000 -0400 -@@ -451,6 +451,10 @@ create_mtab (void) { - unlock_mtab(); - } - -+static int check_special_mountprog(const char *spec, const char *node, -+ const char *type, int flags, -+ char *extra_opts, int *status); -+ - /* count successful mount system calls */ - static int mountcount = 0; - -@@ -462,12 +466,30 @@ static int mountcount = 0; - static int - do_mount_syscall (struct mountargs *args) { - int flags = args->flags; -- int ret; - - if ((flags & MS_MGC_MSK) == 0) - flags |= MS_MGC_VAL; - -- ret = mount (args->spec, args->node, args->type, flags, args->data); -+ return mount (args->spec, args->node, args->type, flags, args->data); -+} -+ -+/* -+ * do_mount() -+ * Mount a single file system, possibly invoking an external handler to -+ * do so. Keep track of successes. -+ * returns: 0: OK, -1: error in errno -+ */ -+static int -+do_mount (struct mountargs *args) { -+ int ret; -+ if (check_special_mountprog(args->spec, args->node, args->type, -+ args->flags, args->data, &ret) == 0) -+ ret = do_mount_syscall(args); -+ else if (ret == 0) { /* set by the call */ -+ mountcount++; -+ ret = 1; -+ } -+ - if (ret == 0) - mountcount++; - return ret; -@@ -507,10 +529,11 @@ guess_fstype_and_mount(const char *spec, - char *p; - - while((p = index(t,',')) != NULL) { -+ int ret; - *p = 0; - args.type = *types = t; -- if(do_mount_syscall (&args) == 0) -- return 0; -+ if((ret = do_mount (&args)) >= 0) -+ return ret; - t = p+1; - } - /* do last type below */ -@@ -519,10 +542,10 @@ guess_fstype_and_mount(const char *spec, - - if (*types || (flags & MS_REMOUNT)) { - args.type = *types; -- return do_mount_syscall (&args); -+ return do_mount (&args); - } - -- return procfsloop(do_mount_syscall, &args, types); -+ return procfsloop(do_mount, &args, types); - } - - /* -@@ -895,8 +918,16 @@ retry_nfs: - nosigblock: - - if (!fake) { -+ int skip_mtab = 0; - mnt5_res = guess_fstype_and_mount (spec, node, &types, flags & ~MS_NOSYS, - mount_opts); -+ /* External program was executed to mount the file system, skip updating -+ * mtab. */ -+ if (mnt5_res == 1) { -+ skip_mtab = 1; -+ mnt5_res = 0; -+ res = 0; -+ } - if(!mnt5_res && LoopMountAutomaticChmod && (getuid() == 0)) { - /* - * If loop was set up using random keys and new file system -@@ -907,8 +938,12 @@ nosigblock: - error (_("Error: encrypted file system chmod() failed")); - } - } -+ -+ if (skip_mtab) -+ goto out; - } - -+ - if (fake || mnt5_res == 0) { - /* Mount succeeded, report this (if verbose) and write mtab entry. */ - if (loop) -diff -rup util-linux-2.12r/mount/mount_guess_fstype.c util-linux-2.12r.updated/mount/mount_guess_fstype.c ---- util-linux-2.12r/mount/mount_guess_fstype.c 2006-05-17 17:35:37.000000000 -0400 -+++ util-linux-2.12r.updated/mount/mount_guess_fstype.c 2006-05-17 17:19:44.000000000 -0400 -@@ -695,9 +695,8 @@ procfsloop(int (*mount_fn)(struct mounta - printf(_("Trying %s\n"), fsname); - fflush(stdout); - } -- if ((*mount_fn) (args) == 0) { -+ if ((ret = (*mount_fn) (args)) >= 0) { - *types = fsname; -- ret = 0; - break; - } else if (errno != EINVAL && - is_in_procfs(fsname) == 1) { diff --git a/util-linux-2.12r-fdiskcyl.patch b/util-linux-2.12r-fdisk_cyl.patch similarity index 71% rename from util-linux-2.12r-fdiskcyl.patch rename to util-linux-2.12r-fdisk_cyl.patch index 70a0a1b..d2bbe5e 100644 --- a/util-linux-2.12r-fdiskcyl.patch +++ b/util-linux-2.12r-fdisk_cyl.patch @@ -1,6 +1,8 @@ ---- util-linux-2.12r/fdisk/fdisk.c.old 2006-05-11 19:20:15.000000000 -0400 -+++ util-linux-2.12r/fdisk/fdisk.c 2006-05-11 19:33:44.000000000 -0400 -@@ -1916,6 +1916,16 @@ +Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.c +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisk.c ++++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.c +@@ -1918,6 +1918,16 @@ verify(void) { total_number_of_sectors - total); } @@ -17,7 +19,7 @@ static void add_partition(int n, int sys) { char mesg[256]; /* 48 does not suffice in Japanese */ -@@ -1951,8 +1961,10 @@ +@@ -1953,8 +1963,10 @@ add_partition(int n, int sys) { limit = get_start_sect(q) + get_nr_sects(q) - 1; } if (display_in_cyl_units) @@ -29,4 +31,3 @@ snprintf(mesg, sizeof(mesg), _("First %s"), str_units(SINGULAR)); do { - diff --git a/util-linux-2.12r-fdiskwrap.patch b/util-linux-2.12r-fdisk_fdiskwrap.patch similarity index 75% rename from util-linux-2.12r-fdiskwrap.patch rename to util-linux-2.12r-fdisk_fdiskwrap.patch index 56bf598..5a1400a 100644 --- a/util-linux-2.12r-fdiskwrap.patch +++ b/util-linux-2.12r-fdisk_fdiskwrap.patch @@ -1,6 +1,8 @@ ---- util-linux-2.12r/fdisk/fdisk.c -+++ util-linux-2.12r/fdisk/fdisk.c -@@ -61,7 +61,7 @@ +Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.c +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisk.c ++++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.c +@@ -63,7 +63,7 @@ static void delete_partition(int i); /* A valid partition table sector ends in 0x55 0xaa */ static unsigned int @@ -9,7 +11,7 @@ return ((unsigned int) b[510]) + (((unsigned int) b[511]) << 8); } -@@ -71,7 +71,7 @@ +@@ -73,7 +73,7 @@ valid_part_table_flag(unsigned char *b) } static void @@ -18,7 +20,7 @@ b[510] = 0x55; b[511] = 0xaa; } -@@ -98,17 +98,17 @@ +@@ -100,17 +100,17 @@ set_start_sect(struct partition *p, unsi store4_little_endian(p->start4, start_sect); } @@ -39,7 +41,7 @@ get_nr_sects(struct partition *p) { return read4_little_endian(p->size4); } -@@ -120,7 +120,7 @@ +@@ -122,7 +122,7 @@ static int type_open = O_RDWR; * Raw disk label. For DOS-type partition tables the MBR, * with descriptions of the primary partitions. */ @@ -48,7 +50,7 @@ /* * per partition table entry data -@@ -134,8 +134,8 @@ +@@ -136,8 +136,8 @@ struct pte { struct partition *part_table; /* points into sectorbuffer */ struct partition *ext_pointer; /* points into sectorbuffer */ char changed; /* boolean */ @@ -59,7 +61,7 @@ } ptes[MAXIMUM_PARTS]; char *disk_device, /* must be specified */ -@@ -154,15 +154,14 @@ +@@ -156,15 +156,14 @@ unsigned int user_cylinders, user_heads, unsigned int pt_heads, pt_sectors; unsigned int kern_heads, kern_sectors; @@ -78,16 +80,14 @@ unsigned long long total_number_of_sectors; -@@ -240,21 +239,21 @@ +@@ -242,21 +241,21 @@ void fatal(enum failure why) { } static void -seek_sector(int fd, unsigned int secno) { -- long long offset = (long long) secno * sector_size; -- if (ext2_llseek(fd, offset, SEEK_SET) == (long long) -1) +seek_sector(int fd, unsigned long long secno) { -+ off_t offset = (off_t) secno * sector_size; -+ if (lseek(fd, offset, SEEK_SET) == (off_t) -1) + off_t offset = (off_t) secno * sector_size; + if (lseek(fd, offset, SEEK_SET) == (off_t) -1) fatal(unable_to_seek); } @@ -105,7 +105,7 @@ seek_sector(fd, secno); if (write(fd, buf, sector_size) != sector_size) fatal(unable_to_write); -@@ -262,11 +261,11 @@ +@@ -264,11 +263,11 @@ write_sector(int fd, unsigned int secno, /* Allocate a buffer and read a partition table sector */ static void @@ -119,7 +119,7 @@ if (!pe->sectorbuffer) fatal(out_of_memory); read_sector(fd, offset, pe->sectorbuffer); -@@ -274,7 +273,7 @@ +@@ -276,7 +275,7 @@ read_pte(int fd, int pno, unsigned int o pe->part_table = pe->ext_pointer = NULL; } @@ -128,7 +128,7 @@ get_partition_start(struct pte *pe) { return pe->offset + get_start_sect(pe->part_table); } -@@ -547,10 +546,10 @@ +@@ -549,10 +548,10 @@ clear_partition(struct partition *p) { } static void @@ -142,7 +142,7 @@ if (doext) { p = ptes[i].ext_pointer; -@@ -1546,7 +1545,7 @@ +@@ -1548,7 +1547,7 @@ list_disk_geometry(void) { else printf(_("\nDisk %s: %ld.%ld GB, %lld bytes\n"), disk_device, megabytes/1000, (megabytes/100)%10, bytes); @@ -151,7 +151,7 @@ heads, sectors, cylinders); if (units_per_sector == 1) printf(_(", total %llu sectors"), -@@ -1778,20 +1777,21 @@ +@@ -1780,20 +1779,21 @@ x_list_table(int extend) { struct partition *p; int i; @@ -176,7 +176,7 @@ if (p->sys_ind) check_consistency(p, i); } -@@ -1799,7 +1799,7 @@ +@@ -1801,7 +1801,7 @@ x_list_table(int extend) { } static void @@ -185,7 +185,7 @@ int i; struct pte *pe = &ptes[0]; struct partition *p; -@@ -1832,7 +1832,7 @@ +@@ -1834,7 +1834,7 @@ check(int n, unsigned int h, unsigned in n, h + 1, heads); if (real_s >= sectors) fprintf(stderr, _("Partition %d: sector %d greater than " @@ -194,7 +194,7 @@ if (real_c >= cylinders) fprintf(stderr, _("Partitions %d: cylinder %d greater than " "maximum %d\n"), n, real_c + 1, cylinders); -@@ -1845,8 +1845,8 @@ +@@ -1847,8 +1847,8 @@ check(int n, unsigned int h, unsigned in static void verify(void) { int i, j; @@ -205,7 +205,7 @@ struct partition *p; if (warn_geometry()) -@@ -1890,7 +1890,7 @@ +@@ -1892,7 +1892,7 @@ verify(void) { if (extended_offset) { struct pte *pex = &ptes[ext_index]; @@ -214,7 +214,7 @@ get_nr_sects(pex->part_table) - 1; for (i = 4; i < partitions; i++) { -@@ -1909,8 +1909,8 @@ +@@ -1911,8 +1911,8 @@ verify(void) { } if (total > total_number_of_sectors) @@ -225,7 +225,7 @@ else if (total < total_number_of_sectors) printf(_("%lld unallocated sectors\n"), total_number_of_sectors - total); -@@ -1923,7 +1923,7 @@ +@@ -1925,7 +1925,7 @@ add_partition(int n, int sys) { struct partition *p = ptes[n].part_table; struct partition *q = ptes[ext_index].part_table; long long llimit; @@ -234,7 +234,7 @@ first[partitions], last[partitions]; if (p && p->sys_ind) { -@@ -1969,7 +1969,7 @@ +@@ -1971,7 +1971,7 @@ add_partition(int n, int sys) { if (start > limit) break; if (start >= temp+units_per_sector && read) { @@ -243,7 +243,7 @@ temp = start; read = 0; } -@@ -2228,14 +2228,14 @@ +@@ -2230,14 +2230,14 @@ reread_partition_table(int leave) { #define MAX_PER_LINE 16 static void @@ -260,9 +260,11 @@ if (l == MAX_PER_LINE - 1) { printf("\n"); l = -1; ---- util-linux-2.12r/fdisk/fdisk.h -+++ util-linux-2.12r/fdisk/fdisk.h -@@ -84,8 +84,8 @@ +Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.h +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisk.h ++++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.h +@@ -81,8 +81,8 @@ extern unsigned int read_int(unsigned in #define SINGULAR 1 extern char *const str_units(int); @@ -273,9 +275,11 @@ extern int osf_label; ---- util-linux-2.12r/fdisk/fdiskaixlabel.h -+++ util-linux-2.12r/fdisk/fdiskaixlabel.h -@@ -19,9 +19,10 @@ +Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdiskaixlabel.h +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdiskaixlabel.h ++++ util-linux-ng-2.12r+2.13pre7/fdisk/fdiskaixlabel.h +@@ -19,9 +19,10 @@ typedef struct { /* fdisk.c */ #define aixlabel ((aix_partition *)MBRbuffer) @@ -288,10 +292,12 @@ extern int show_begin; extern int aix_label; extern char *partition_type(unsigned char type); ---- util-linux-2.12r/fdisk/fdiskmaclabel.h -+++ util-linux-2.12r/fdisk/fdiskmaclabel.h -@@ -25,9 +25,10 @@ - +Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdiskmaclabel.h +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdiskmaclabel.h ++++ util-linux-ng-2.12r+2.13pre7/fdisk/fdiskmaclabel.h +@@ -25,9 +25,10 @@ typedef struct { + /* fdisk.c */ #define maclabel ((mac_partition *)MBRbuffer) -extern char MBRbuffer[MAX_SECTOR_SIZE]; @@ -303,9 +309,11 @@ extern int show_begin; extern int mac_label; extern char *partition_type(unsigned char type); ---- util-linux-2.12r/fdisk/fdisksgilabel.c -+++ util-linux-2.12r/fdisk/fdisksgilabel.c -@@ -197,7 +197,7 @@ +Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisksgilabel.c +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisksgilabel.c ++++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisksgilabel.c +@@ -197,7 +197,7 @@ sgi_list_table(int xtra) { w = strlen(disk_device); if (xtra) { @@ -314,7 +322,7 @@ "%d cylinders, %d physical cylinders\n" "%d extra sects/cyl, interleave %d:1\n" "%s\n" -@@ -211,7 +211,7 @@ +@@ -211,7 +211,7 @@ sgi_list_table(int xtra) { sector_size); } else { printf(_("\nDisk %s (SGI disk label): " @@ -323,9 +331,11 @@ "Units = %s of %d * %d bytes\n\n"), disk_device, heads, sectors, cylinders, str_units(PLURAL), units_per_sector, ---- util-linux-2.12r/fdisk/fdisksgilabel.h -+++ util-linux-2.12r/fdisk/fdisksgilabel.h -@@ -103,8 +103,9 @@ +Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisksgilabel.h +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisksgilabel.h ++++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisksgilabel.h +@@ -103,8 +103,9 @@ typedef struct { /* fdisk.c */ #define sgilabel ((sgi_partition *)MBRbuffer) #define sgiparam (sgilabel->devparam) @@ -337,9 +347,11 @@ extern int show_begin; extern int sgi_label; extern char *partition_type(unsigned char type); ---- util-linux-2.12r/fdisk/fdisksunlabel.c -+++ util-linux-2.12r/fdisk/fdisksunlabel.c -@@ -349,7 +349,7 @@ +Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisksunlabel.c +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisksunlabel.c ++++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisksunlabel.c +@@ -348,7 +348,7 @@ void create_sunlabel(void) } snprintf(sunlabel->info, sizeof(sunlabel->info), @@ -348,7 +360,7 @@ p ? p->vendor : "", (p && *p->vendor) ? " " : "", p ? p->model : (floppy ? _("3,5\" floppy") : _("Linux custom")), -@@ -656,7 +656,7 @@ +@@ -655,7 +655,7 @@ sun_list_table(int xtra) { w = strlen(disk_device); if (xtra) printf( @@ -357,7 +369,7 @@ "%d cylinders, %d alternate cylinders, %d physical cylinders\n" "%d extra sects/cyl, interleave %d:1\n" "%s\n" -@@ -670,7 +670,7 @@ +@@ -669,7 +669,7 @@ sun_list_table(int xtra) { str_units(PLURAL), units_per_sector); else printf( @@ -366,9 +378,11 @@ "Units = %s of %d * 512 bytes\n\n"), disk_device, heads, sectors, cylinders, str_units(PLURAL), units_per_sector); ---- util-linux-2.12r/fdisk/fdisksunlabel.h -+++ util-linux-2.12r/fdisk/fdisksunlabel.h -@@ -37,8 +37,9 @@ +Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisksunlabel.h +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisksunlabel.h ++++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisksunlabel.h +@@ -37,8 +37,9 @@ typedef struct { : (__u32)(x)) /* fdisk.c */ diff --git a/util-linux-2.12r-fdisk_llseek.patch b/util-linux-2.12r-fdisk_llseek.patch deleted file mode 100644 index 786a385..0000000 --- a/util-linux-2.12r-fdisk_llseek.patch +++ /dev/null @@ -1,234 +0,0 @@ ---- fdisk/Makefile -+++ fdisk/Makefile -@@ -39,7 +39,7 @@ - endif - endif - --cfdisk: cfdisk.o llseek.o disksize.o i386_sys_types.o $(LIB)/xstrncpy.o -+cfdisk: cfdisk.o disksize.o i386_sys_types.o $(LIB)/xstrncpy.o - ifeq "$(HAVE_SLANG)" "yes" - $(CC) $(LDFLAGS) $^ -o $@ $(LIBSLANG) - else -@@ -55,7 +55,7 @@ - rm -f activate - ln -s sfdisk activate - --fdisk: fdisk.o llseek.o disksize.o fdiskbsdlabel.o fdisksgilabel.o fdisksunlabel.o \ -+fdisk: fdisk.o disksize.o fdiskbsdlabel.o fdisksgilabel.o fdisksunlabel.o \ - fdiskmaclabel.o fdiskaixlabel.o i386_sys_types.o partname.o - fdisk.o: fdisk.c fdisk.h - fdiskbsdlabel.o: fdiskbsdlabel.c fdisk.h fdiskbsdlabel.h ---- fdisk/cfdisk.c -+++ fdisk/cfdisk.c -@@ -84,9 +84,6 @@ - #include "xstrncpy.h" - #include "common.h" - --extern long long ext2_llseek(unsigned int fd, long long offset, -- unsigned int origin); -- - #define VERSION UTIL_LINUX_VERSION - - #define DEFAULT_DEVICE "/dev/hda" -@@ -552,7 +549,7 @@ - - static void - read_sector(char *buffer, long long sect_num) { -- if (ext2_llseek(fd, sect_num*SECTOR_SIZE, SEEK_SET) < 0) -+ if (lseek(fd, sect_num*SECTOR_SIZE, SEEK_SET) < 0) - fatal(_("Cannot seek on disk drive"), 2); - if (read(fd, buffer, SECTOR_SIZE) != SECTOR_SIZE) - fatal(_("Cannot read disk drive"), 2); -@@ -560,7 +557,7 @@ - - static void - write_sector(char *buffer, long long sect_num) { -- if (ext2_llseek(fd, sect_num*SECTOR_SIZE, SEEK_SET) < 0) -+ if (lseek(fd, sect_num*SECTOR_SIZE, SEEK_SET) < 0) - fatal(_("Cannot seek on disk drive"), 2); - if (write(fd, buffer, SECTOR_SIZE) != SECTOR_SIZE) - fatal(_("Cannot write disk drive"), 2); -@@ -587,7 +584,7 @@ - long long offset; - - offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE; -- if (ext2_llseek(fd, offset, SEEK_SET) == offset -+ if (lseek(fd, offset, SEEK_SET) == offset - && read(fd, §or, sizeof(sector)) == sizeof(sector)) { - dos_copy_to_info(p_info[i].ostype, OSTYPESZ, - sector+DOS_OSTYPE_OFFSET, DOS_OSTYPE_SZ); -@@ -672,7 +669,7 @@ - - offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE - + 1024; -- if (ext2_llseek(fd, offset, SEEK_SET) == offset -+ if (lseek(fd, offset, SEEK_SET) == offset - && read(fd, &e2fsb, sizeof(e2fsb)) == sizeof(e2fsb) - && e2fsb.s_magic[0] + (e2fsb.s_magic[1]<<8) == EXT2_SUPER_MAGIC) { - label = e2fsb.s_volume_name; -@@ -688,7 +685,7 @@ - } - - offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE + 0; -- if (ext2_llseek(fd, offset, SEEK_SET) == offset -+ if (lseek(fd, offset, SEEK_SET) == offset - && read(fd, &xfsb, sizeof(xfsb)) == sizeof(xfsb) - && !strncmp(xfsb.s_magic, XFS_SUPER_MAGIC, 4)) { - label = xfsb.s_fname; -@@ -702,7 +699,7 @@ - /* jfs? */ - offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE - + JFS_SUPER1_OFF; -- if (ext2_llseek(fd, offset, SEEK_SET) == offset -+ if (lseek(fd, offset, SEEK_SET) == offset - && read(fd, &jfsb, sizeof(jfsb)) == sizeof(jfsb) - && !strncmp(jfsb.s_magic, JFS_MAGIC, strlen(JFS_MAGIC))) { - label = jfsb.s_label; -@@ -716,7 +713,7 @@ - /* reiserfs? */ - offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE - + REISERFS_DISK_OFFSET_IN_BYTES; -- if (ext2_llseek(fd, offset, SEEK_SET) == offset -+ if (lseek(fd, offset, SEEK_SET) == offset - && read(fd, &reiserfsb, sizeof(reiserfsb)) == sizeof(reiserfsb) - && has_reiserfs_magic_string(&reiserfsb, &reiserfs_is_3_6)) { - if (reiserfs_is_3_6) { ---- fdisk/fdiskbsdlabel.c -+++ fdisk/fdiskbsdlabel.c -@@ -566,7 +566,7 @@ - sector = get_start_sect(xbsd_part); - #endif - -- if (ext2_llseek (fd, (long long) sector * SECTOR_SIZE, SEEK_SET) == -1) -+ if (lseek (fd, (long long) sector * SECTOR_SIZE, SEEK_SET) == -1) - fatal (unable_to_seek); - if (BSD_BBSIZE != write (fd, disklabelbuffer, BSD_BBSIZE)) - fatal (unable_to_write); -@@ -735,7 +735,7 @@ - sector = 0; - #endif - -- if (ext2_llseek (fd, (long long) sector * SECTOR_SIZE, SEEK_SET) == -1) -+ if (lseek (fd, (long long) sector * SECTOR_SIZE, SEEK_SET) == -1) - fatal (unable_to_seek); - if (BSD_BBSIZE != read (fd, disklabelbuffer, BSD_BBSIZE)) - fatal (unable_to_read); -@@ -781,12 +781,12 @@ - - #if defined (__alpha__) && BSD_LABELSECTOR == 0 - alpha_bootblock_checksum (disklabelbuffer); -- if (ext2_llseek (fd, (long long) 0, SEEK_SET) == -1) -+ if (lseek (fd, (long long) 0, SEEK_SET) == -1) - fatal (unable_to_seek); - if (BSD_BBSIZE != write (fd, disklabelbuffer, BSD_BBSIZE)) - fatal (unable_to_write); - #else -- if (ext2_llseek (fd, (long long) sector * SECTOR_SIZE + BSD_LABELOFFSET, -+ if (lseek (fd, (long long) sector * SECTOR_SIZE + BSD_LABELOFFSET, - SEEK_SET) == -1) - fatal (unable_to_seek); - if (sizeof (struct xbsd_disklabel) != write (fd, d, sizeof (struct xbsd_disklabel))) ---- fdisk/fdisksgilabel.c -+++ fdisk/fdisksgilabel.c -@@ -379,7 +379,7 @@ - */ - sgiinfo *info = fill_sgiinfo(); - int infostartblock = SSWAP32(sgilabel->directory[0].vol_file_start); -- if (ext2_llseek(fd, (long long)infostartblock* -+ if (lseek(fd, (long long)infostartblock* - SECTOR_SIZE, SEEK_SET) < 0) - fatal(unable_to_seek); - if (write(fd, info, SECTOR_SIZE) != SECTOR_SIZE) ---- fdisk/llseek.c -+++ fdisk/llseek.c -@@ -13,31 +13,12 @@ - extern long long ext2_llseek (unsigned int, long long, unsigned int); - - #ifdef __linux__ -- --#ifdef HAVE_LLSEEK --#include -- --#else /* HAVE_LLSEEK */ -- --#if defined(__alpha__) || defined(__ia64__) || defined(__s390x__) -- --#define my_llseek lseek -- --#else --#include /* for __NR__llseek */ -- --static int _llseek (unsigned int, unsigned long, -- unsigned long, long long *, unsigned int); -- --#ifdef __NR__llseek -- --static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high, -- unsigned long, offset_low,long long *,result, -- unsigned int, origin) -- --#else -+# if defined(__alpha__) || defined(__ia64__) || defined(__s390x__) -+# define my_llseek lseek -+# else - - /* no __NR__llseek on compilation machine - might give it explicitly */ -+# ifndef __NR__llseek - static int _llseek (unsigned int fd, unsigned long oh, - unsigned long ol, long long *result, - unsigned int origin) { -@@ -45,10 +26,10 @@ - return -1; - } - --#endif -+# endif /* __NR__llseek */ - - static long long my_llseek (unsigned int fd, long long offset, -- unsigned int origin) -+ unsigned int origin) - { - long long result; - int retval; ---- fdisk/sfdisk.c -+++ fdisk/sfdisk.c -@@ -164,36 +164,16 @@ - /* - * sseek: seek to specified sector - return 0 on failure - * -- * For >4GB disks lseek needs a > 32bit arg, and we have to use llseek. -- * On the other hand, a 32 bit sector number is OK until 2TB. -- * The routines _llseek and sseek below are the only ones that -- * know about the loff_t type. -- * - * Note: we use 512-byte sectors here, irrespective of the hardware ss. - */ --#undef use_lseek --#if defined (__alpha__) || defined (__ia64__) || defined (__x86_64__) || defined (__s390x__) --#define use_lseek --#endif -- --#ifndef use_lseek --static __attribute__used --_syscall5(int, _llseek, unsigned int, fd, ulong, hi, ulong, lo, -- loff_t *, res, unsigned int, wh); --#endif -- - static int - sseek(char *dev, unsigned int fd, unsigned long s) { -- loff_t in, out; -- in = ((loff_t) s << 9); -+ off_t in, out; -+ in = ((off_t) s << 9); - out = 1; - --#ifndef use_lseek -- if (_llseek (fd, in>>32, in & 0xffffffff, &out, SEEK_SET) != 0) { --#else - if ((out = lseek(fd, in, SEEK_SET)) != in) { --#endif -- perror("llseek"); -+ perror("lseek"); - error(_("seek error on %s - cannot seek to %lu\n"), dev, s); - return 0; - } diff --git a/util-linux-2.12r-fdisk_remove_bogus_warnings.patch b/util-linux-2.12r-fdisk_remove_bogus_warnings.patch index ed08fe1..634cad7 100644 --- a/util-linux-2.12r-fdisk_remove_bogus_warnings.patch +++ b/util-linux-2.12r-fdisk_remove_bogus_warnings.patch @@ -1,8 +1,8 @@ -Index: util-linux-2.12r/fdisk/fdisk.c +Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.c =================================================================== ---- util-linux-2.12r.orig/fdisk/fdisk.c -+++ util-linux-2.12r/fdisk/fdisk.c -@@ -1496,6 +1496,7 @@ static void check_consistency(struct par +--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisk.c ++++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.c +@@ -1498,6 +1498,7 @@ static void check_consistency(struct par /* compute logical ending (c, h, s) */ long2chs(get_start_sect(p) + get_nr_sects(p) - 1, &lec, &leh, &les); @@ -10,7 +10,7 @@ Index: util-linux-2.12r/fdisk/fdisk.c /* Same physical / logical beginning? */ if (cylinders <= 1024 && (pbc != lbc || pbh != lbh || pbs != lbs)) { printf(_("Partition %d has different physical/logical " -@@ -1512,7 +1513,6 @@ static void check_consistency(struct par +@@ -1514,7 +1515,6 @@ static void check_consistency(struct par printf(_("logical=(%d, %d, %d)\n"),lec, leh, les); } diff --git a/util-linux-2.12r-losetup_password.patch b/util-linux-2.12r-losetup_password.patch deleted file mode 100644 index 2eea2b4..0000000 --- a/util-linux-2.12r-losetup_password.patch +++ /dev/null @@ -1,247 +0,0 @@ -Index: util-linux-2.12r/mount/lomount.c -=================================================================== ---- util-linux-2.12r.orig/mount/lomount.c -+++ util-linux-2.12r/mount/lomount.c -@@ -46,24 +46,24 @@ - #include "rmd160.h" - #include "aes.h" - -+#define LO_PASS_OK EXIT_SUCCESS -+#define LO_PASS_ERR EXIT_FAILURE -+#define LO_PASS_EMPTY 5 -+#define LO_PASS_SHORT 6 -+ - extern int verbose; - extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ - extern void error (const char *fmt, ...); /* idem */ - extern void show_all_loops(void); - extern int read_options_from_fstab(char *, char **); - -+volatile int timeout=0; - int passphrase_timeout=0; - struct sigaction alrmact; - - static void - alrmhandler() { -- /* let the SIGINT handler do the work: */ -- kill(getpid(),SIGINT); -- usleep(1000000); -- kill(getpid(),SIGTERM); -- usleep(1000000); -- /* stubborn... */ -- exit(0); -+ timeout = 1; - } - - -@@ -473,11 +473,14 @@ static char *do_GPG_pipe(char *pass) - return multiKeyPass[0]; - } - --static char *sGetPass(int minLen, int warnLen) -+static int sGetPass(char **pass, int minLen, int warnLen) - { - char *p, *s, *seed; - int i, ask2; - -+ *pass = NULL; -+ timeout = 0; -+ - if(!passFDnumber) { - - if(passphrase_timeout) { -@@ -489,6 +492,9 @@ static char *sGetPass(int minLen, int wa - } - - p = getpass(_("Password: ")); -+ alarm(0); -+ if (timeout) -+ return LO_PASS_EMPTY; - ask2 = passAskTwice ? 1 : 0; - } else { - i = atoi(passFDnumber); -@@ -504,11 +510,13 @@ static char *sGetPass(int minLen, int wa - } - if(x == 65) { - multiKeyMode = 65; -- return multiKeyPass[0]; -+ *pass = multiKeyPass[0]; -+ return LO_PASS_OK; - } - if(x == 64) { - multiKeyMode = 64; -- return multiKeyPass[0]; -+ *pass = multiKeyPass[0]; -+ return LO_PASS_OK; - } - p = multiKeyPass[0]; - } -@@ -531,6 +539,9 @@ static char *sGetPass(int minLen, int wa - } - - p = getpass(_("Retype password: ")); -+ alarm(0); -+ if (timeout) -+ return LO_PASS_EMPTY; - if(!p) goto nomem; - if(strcmp(s, p)) goto compareErr; - memset(s, 0, i); -@@ -538,17 +549,25 @@ static char *sGetPass(int minLen, int wa - ask2 = 0; - } - p = do_GPG_pipe(p); -- if(!p) return(NULL); -+ if(!p) -+ return LO_PASS_ERR; - if(!p[0]) { - fprintf(stderr, _("Error: gpg key file decryption failed\n")); -- return(NULL); -+ return LO_PASS_ERR; -+ } -+ if(multiKeyMode) { -+ *pass = p; -+ return LO_PASS_OK; - } -- if(multiKeyMode) return(p); - } - i = strlen(p); -+ if(i == 0) { -+ fprintf(stderr, _("Error: Empty password\n")); -+ return LO_PASS_EMPTY; -+ } - if(i < minLen) { - fprintf(stderr, _("Error: Password must be at least %d characters.\n"), minLen); -- return(NULL); -+ return LO_PASS_SHORT; - } - seed = passSeedString; - if(!seed) seed = ""; -@@ -556,7 +575,7 @@ static char *sGetPass(int minLen, int wa - if(!s) { - nomem: - fprintf(stderr, _("Error: Unable to allocate memory\n")); -- return(NULL); -+ return LO_PASS_ERR; - } - strcpy(s, p); - memset(p, 0, i); -@@ -571,11 +590,14 @@ static char *sGetPass(int minLen, int wa - } - - p = getpass(_("Retype password: ")); -+ alarm(0); -+ if (timeout) -+ return LO_PASS_EMPTY; - if(!p) goto nomem; - if(strcmp(s, p)) { - compareErr: - fprintf(stderr, _("Error: Passwords are not identical\n")); -- return(NULL); -+ return LO_PASS_ERR; - } - memset(p, 0, i); - } -@@ -583,7 +605,8 @@ static char *sGetPass(int minLen, int wa - fprintf(stderr, _("WARNING - Please use longer password (%d or more characters)\n"), SUSE_PASSWORD_MIN_LENGTH); - } - strcat(s, seed); -- return(s); -+ *pass = s; -+ return LO_PASS_OK; - } - - /* this is for compatibility with historic loop-AES version */ -@@ -788,6 +811,7 @@ set_loop(const char *device, const char - unsigned char multiKeyBits[65][32]; - int minPassLen = SUSE_PASSWORD_MIN_LENGTH; - int run_mkfs_command = 0; -+ int ret; - - loopFileName = (char *)file; - multiKeyMode = 0; -@@ -802,6 +826,7 @@ set_loop(const char *device, const char - } - if ((fd = open(device, mode)) < 0) { - perror (device); -+ ret = 1; - goto close_ffd_return1; - } - *loopro = (mode == O_RDONLY); -@@ -848,8 +873,8 @@ set_loop(const char *device, const char - loopinfo.lo_encrypt_key_size = 0; - break; - case LO_CRYPT_XOR: -- pass = sGetPass (1, 0); -- if(!pass) goto close_fd_ffd_return1; -+ ret = sGetPass (&pass, 1, 0); -+ if(ret) goto close_fd_ffd_return1; - xstrncpy (loopinfo.lo_encrypt_key, pass, LO_KEY_SIZE); - loopinfo.lo_encrypt_key_size = strlen(loopinfo.lo_encrypt_key); - break; -@@ -886,6 +911,7 @@ set_loop(const char *device, const char - /* This is not compatible with gpgkey= mount option */ - if(rd_wr_retry(atoi(passFDnumber), (char *)&loopinfo.lo_encrypt_key[0], LO_KEY_SIZE, 0) < 1) { - fprintf(stderr, _("Error: couldn't read binary key\n")); -+ ret = 1; - goto close_fd_ffd_return1; - } - break; /* out of switch(loopinfo.lo_encrypt_type) */ -@@ -894,6 +920,7 @@ set_loop(const char *device, const char - /* WARNING! DO NOT USE RANDOM HASH TYPE ON PARTITION WITH EXISTING */ - /* IMPORTANT DATA ON IT. RANDOM HASH TYPE WILL DESTROY YOUR DATA. */ - if(loop_create_random_keys((char*)file, *loopro, &multiKeyBits[0][0])) { -+ ret = 1; - goto close_fd_ffd_return1; - } - memcpy(&loopinfo.lo_encrypt_key[0], &multiKeyBits[0][0], sizeof(loopinfo.lo_encrypt_key)); -@@ -901,8 +928,8 @@ set_loop(const char *device, const char - break; /* out of switch(loopinfo.lo_encrypt_type) */ - } - } -- pass = sGetPass (minPassLen, SUSE_PASSWORD_MIN_LENGTH); -- if(!pass) goto close_fd_ffd_return1; -+ ret = sGetPass (&pass, minPassLen, SUSE_PASSWORD_MIN_LENGTH); -+ if(ret) goto close_fd_ffd_return1; - i = strlen(pass); - if(hashFunc == unhashed1_key_setup) { - /* this is for compatibility with historic loop-AES version */ -@@ -966,6 +993,7 @@ set_loop(const char *device, const char - break; - default: - fprintf (stderr, _("Error: don't know how to get key for encryption system %d\n"), loopinfo.lo_encrypt_type); -+ ret = 1; - goto close_fd_ffd_return1; - } - -@@ -985,7 +1013,7 @@ close_fd_ffd_return1: - close (fd); - close_ffd_return1: - close (ffd); -- return 1; -+ return ret; - } - - /* type 18 == LO_CRYPT_CRYPTOAPI */ -@@ -995,6 +1023,7 @@ close_ffd_return1: - fprintf(stderr, _("ioctl: LOOP_SET_STATUS: %s, requested cipher or key length (%d bits) not supported by kernel\n"), strerror(errno), loopinfo.lo_encrypt_key_size << 3); - loop_clr_fd_out: - (void) ioctl (fd, LOOP_CLR_FD, 0); -+ ret = 1; - goto keyclean_close_fd_ffd_return1; - } - } -Index: util-linux-2.12r/mount/losetup.8 -=================================================================== ---- util-linux-2.12r.orig/mount/losetup.8 -+++ util-linux-2.12r/mount/losetup.8 -@@ -143,6 +143,10 @@ displays the status of a loop device, it - is not configured and 2 if an error occurred which prevented - .B losetup - from determining the status of the device. -+When using encryption -+.B losetup -+returns 5 if the passphrase is empty or a timeout occurred and 6 if -+the passphrase is too short. - - .SH FILES - .nf diff --git a/util-linux-2.12r-cal_formatting.patch b/util-linux-2.12r-misc_utils_cal_formatting.patch similarity index 100% rename from util-linux-2.12r-cal_formatting.patch rename to util-linux-2.12r-misc_utils_cal_formatting.patch diff --git a/util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff b/util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff deleted file mode 100644 index 9b57882..0000000 --- a/util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff +++ /dev/null @@ -1,58 +0,0 @@ -Author: Lars Mueller -Subject: Use cifs instead of smbfs by default if the source starts with //; minor mount man pages changes (mention cifs and point to mount.cifs man page) -Bugzilla: na -submitted upstream: yes -accepeted upstream: no - -Index: util-linux-2.12r/mount/mount.8 -=================================================================== ---- util-linux-2.12r.orig/mount/mount.8 -+++ util-linux-2.12r/mount/mount.8 -@@ -367,6 +367,7 @@ currently supported include: - .IR adfs , - .IR affs , - .IR autofs , -+.IR cifs , - .IR coda , - .IR coherent , - .IR cramfs , -@@ -420,8 +421,8 @@ For most types all the - program has to do is issue a simple - .IR mount (2) - system call, and no detailed knowledge of the filesystem type is required. --For a few types however (like nfs, smbfs, ncpfs) ad hoc code is --necessary. The nfs ad hoc code is built in, but smbfs and ncpfs -+For a few types however (like nfs, cifs, smbfs, ncpfs) ad hoc code is -+necessary. The nfs ad hoc code is built in, but cifs, smbfs, and ncpfs - have a separate mount program. In order to make it possible to - treat all types in a uniform way, mount will execute the program - .I /sbin/mount.TYPE -@@ -733,6 +734,11 @@ These options are accepted but ignored. - (However, quota utilities may react to such strings in - .IR /etc/fstab .) - -+.SH "Mount options for cifs" -+See the options section of the -+.BR mount.cifs (8) -+man page (cifs-mount package must be installed). -+ - .SH "Mount options for coherent" - None. - -Index: util-linux-2.12r/mount/mount.c -=================================================================== ---- util-linux-2.12r.orig/mount/mount.c -+++ util-linux-2.12r/mount/mount.c -@@ -1178,10 +1178,10 @@ mount_one (const char *spec, const char - "I'll assume nfs because of " - "the colon\n")); - } else if(!strncmp(spec, "//", 2)) { -- types = "smbfs"; -+ types = "cifs"; - if (verbose) - printf(_("mount: no type was given - " -- "I'll assume smbfs because of " -+ "I'll assume cifs because of " - "the // prefix\n")); - } - } diff --git a/util-linux-2.12r-mount-by-uuid.patch b/util-linux-2.12r-mount_by_uuid.patch similarity index 58% rename from util-linux-2.12r-mount-by-uuid.patch rename to util-linux-2.12r-mount_by_uuid.patch index 982b9b6..f3775eb 100644 --- a/util-linux-2.12r-mount-by-uuid.patch +++ b/util-linux-2.12r-mount_by_uuid.patch @@ -1,7 +1,8 @@ -diff -pur util-linux-2.12r/mount.orig/fstab.c util-linux-2.12r/mount/fstab.c ---- util-linux-2.12r/mount.orig/fstab.c 2004-12-21 20:09:24.000000000 +0100 -+++ util-linux-2.12r/mount/fstab.c 2005-11-10 08:53:42.000000000 +0100 -@@ -296,7 +296,7 @@ has_uuid(const char *device, const char +Index: util-linux-ng-2.12r+git20070330/mount/fstab.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/fstab.c ++++ util-linux-ng-2.12r+git20070330/mount/fstab.c +@@ -295,7 +295,7 @@ has_uuid(const char *device, const char const char *devuuid; int ret; @@ -10,10 +11,10 @@ diff -pur util-linux-2.12r/mount.orig/fstab.c util-linux-2.12r/mount/fstab.c ret = !strcmp(uuid, devuuid); /* free(devuuid); */ return ret; -Only in util-linux-2.12r/mount: fstab.c~ -diff -pur util-linux-2.12r/mount.orig/mount_blkid.c util-linux-2.12r/mount/mount_blkid.c ---- util-linux-2.12r/mount.orig/mount_blkid.c 2004-12-22 10:54:41.000000000 +0100 -+++ util-linux-2.12r/mount/mount_blkid.c 2005-11-10 08:55:00.000000000 +0100 +Index: util-linux-ng-2.12r+git20070330/mount/mount_blkid.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/mount_blkid.c ++++ util-linux-ng-2.12r+git20070330/mount/mount_blkid.c @@ -16,6 +16,11 @@ mount_blkid_put_cache(void) { } @@ -38,10 +39,10 @@ diff -pur util-linux-2.12r/mount.orig/mount_blkid.c util-linux-2.12r/mount/mount mount_get_volume_label_by_spec(const char *spec) { return xstrdup(get_volume_label_by_spec(spec)); } -Only in util-linux-2.12r/mount: mount_blkid.c~ -diff -pur util-linux-2.12r/mount.orig/mount_blkid.h util-linux-2.12r/mount/mount_blkid.h ---- util-linux-2.12r/mount.orig/mount_blkid.h 2004-04-13 22:00:02.000000000 +0200 -+++ util-linux-2.12r/mount/mount_blkid.h 2005-11-10 08:55:21.000000000 +0100 +Index: util-linux-ng-2.12r+git20070330/mount/mount_blkid.h +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/mount_blkid.h ++++ util-linux-ng-2.12r+git20070330/mount/mount_blkid.h @@ -7,6 +7,7 @@ extern void mount_blkid_get_cache(void); extern void mount_blkid_put_cache(void); extern const char *mount_get_devname_by_uuid(const char *uuid); @@ -50,4 +51,3 @@ diff -pur util-linux-2.12r/mount.orig/mount_blkid.h util-linux-2.12r/mount/mount extern const char *mount_get_volume_label_by_spec(const char *spec); extern const char *mount_get_devname(const char *spec); extern const char *mount_get_devname_for_mounting(const char *spec); -Only in util-linux-2.12r/mount: mount_blkid.h~ diff --git a/util-linux-2.12r-mount.8-xfs-update.patch b/util-linux-2.12r-mount_mount.8_xfs_update.patch similarity index 72% rename from util-linux-2.12r-mount.8-xfs-update.patch rename to util-linux-2.12r-mount_mount.8_xfs_update.patch index 0519712..612ce76 100644 --- a/util-linux-2.12r-mount.8-xfs-update.patch +++ b/util-linux-2.12r-mount_mount.8_xfs_update.patch @@ -1,6 +1,8 @@ ---- mount/mount.8 +Index: mount/mount.8 +=================================================================== +--- mount/mount.8.orig +++ mount/mount.8 -@@ -1781,6 +1781,12 @@ +@@ -1841,6 +1841,12 @@ system call. .TP .B dmapi " / " xdsm Enable the DMAPI (Data Management API) event callouts. diff --git a/util-linux-2.12r-mount-mtab-update.patch b/util-linux-2.12r-mount_mtab_update.patch similarity index 76% rename from util-linux-2.12r-mount-mtab-update.patch rename to util-linux-2.12r-mount_mtab_update.patch index c620b11..410e510 100644 --- a/util-linux-2.12r-mount-mtab-update.patch +++ b/util-linux-2.12r-mount_mtab_update.patch @@ -1,6 +1,8 @@ ---- mount/mount.c +Index: mount/mount.c +=================================================================== +--- mount/mount.c.orig +++ mount/mount.c -@@ -805,6 +805,7 @@ +@@ -842,6 +842,7 @@ try_mount_one (const char *spec0, const int mnt5_res = 0; /* only for gcc */ int mnt_err; int flags; @@ -8,7 +10,7 @@ char *extra_opts; /* written in mtab */ char *mount_opts; /* actually used on system call */ const char *opts, *spec, *node, *types; -@@ -913,13 +914,17 @@ +@@ -942,13 +943,17 @@ retry_nfs: if (loop) opt_loopdev = loopdev; diff --git a/util-linux-2.12r-nfs_remount_options.patch b/util-linux-2.12r-mount_nfs_remount_options.patch similarity index 59% rename from util-linux-2.12r-nfs_remount_options.patch rename to util-linux-2.12r-mount_nfs_remount_options.patch index 04fd6b6..a700af5 100644 --- a/util-linux-2.12r-nfs_remount_options.patch +++ b/util-linux-2.12r-mount_nfs_remount_options.patch @@ -1,8 +1,10 @@ -Index: util-linux-2.12r/mount/nfsmount.c +do not append addr option with each nfs remount [#130625] + +Index: util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c =================================================================== ---- util-linux-2.12r.orig/mount/nfsmount.c -+++ util-linux-2.12r/mount/nfsmount.c -@@ -305,8 +305,11 @@ int nfsmount(const char *spec, const cha +--- util-linux-ng-2.12r+2.13pre7.orig/mount/nfsmount.c ++++ util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c +@@ -303,8 +303,11 @@ int nfsmount(const char *spec, const cha "excessively long option argument\n")); goto fail; } diff --git a/util-linux-2.12r-mount_racy_loop.patch b/util-linux-2.12r-mount_racy_loop.patch index cba877a..3e33e1c 100644 --- a/util-linux-2.12r-mount_racy_loop.patch +++ b/util-linux-2.12r-mount_racy_loop.patch @@ -1,31 +1,30 @@ -Index: util-linux-2.12r/mount/lomount.c +Index: util-linux-ng-2.12r+git20070330/mount/lomount.c =================================================================== ---- util-linux-2.12r.orig/mount/lomount.c -+++ util-linux-2.12r/mount/lomount.c -@@ -1005,7 +1005,17 @@ set_loop(const char *device, const char +--- util-linux-ng-2.12r+git20070330.orig/mount/lomount.c ++++ util-linux-ng-2.12r+git20070330/mount/lomount.c +@@ -341,8 +341,15 @@ set_loop(const char *device, const char } if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { - perror("ioctl: LOOP_SET_FD"); -+ switch (errno) { -+ case EBUSY: -+ ret = 2; -+ if (verbose) -+ perror("ioctl: LOOP_SET_FD"); -+ break; -+ default: -+ ret = 1; -+ perror("ioctl: LOOP_SET_FD"); -+ break; -+ } - keyclean_close_fd_ffd_return1: - memset(loopinfo.lo_encrypt_key, 0, sizeof(loopinfo.lo_encrypt_key)); - memset(&multiKeyBits[0][0], 0, sizeof(multiKeyBits)); -Index: util-linux-2.12r/mount/mount.c +- return 1; ++ switch (errno) { ++ case EBUSY: ++ if (verbose) ++ perror("ioctl: LOOP_SET_FD"); ++ return 2; ++ default: ++ perror("ioctl: LOOP_SET_FD"); ++ return 1; ++ } + } + close (ffd); + +Index: util-linux-ng-2.12r+git20070330/mount/mount.c =================================================================== ---- util-linux-2.12r.orig/mount/mount.c -+++ util-linux-2.12r/mount/mount.c -@@ -653,18 +653,32 @@ loop_check(const char **spec, const char +--- util-linux-ng-2.12r+git20070330.orig/mount/mount.c ++++ util-linux-ng-2.12r+git20070330/mount/mount.c +@@ -712,20 +712,33 @@ loop_check(const char **spec, const char printf(_("mount: skipping the setup of a loop device\n")); } else { int loopro = (*flags & MS_RDONLY); @@ -37,7 +36,9 @@ Index: util-linux-2.12r/mount/mount.c - return EX_SYSERR; /* no more loop devices */ - if (verbose) - printf(_("mount: going to use the loop device %s\n"), *loopdev); -- if (set_loop (*loopdev, *loopfile, &loopro, type, AutoChmodPtr)) { +- offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0; +- if (set_loop(*loopdev, *loopfile, offset, +- opt_encryption, pfd, &loopro)) { + do { + if (!*loopdev || !**loopdev) + *loopdev = find_unused_loop_device(); @@ -47,22 +48,23 @@ Index: util-linux-2.12r/mount/mount.c - printf(_("mount: failed setting up loop device\n")); - return EX_FAIL; - } -+ printf(_("mount: going to use the loop device %s\n"), *loopdev); -+ if (res = set_loop (*loopdev, *loopfile, &loopro, type, AutoChmodPtr)) { -+ switch(res) { -+ case 2: -+ /* loop dev has been grabbed by some other process, -+ try again */ -+ if (verbose) -+ printf("mount: stolen loop=%s ...trying again\n", *loopdev); -+ *loopdev = NULL; -+ continue; -+ default: -+ if (verbose) -+ printf(_("mount: failed setting up loop device\n")); -+ return EX_FAIL; -+ } -+ } ++ printf(_("mount: going to use the loop device %s\n"), *loopdev); ++ if (res = set_loop (*loopdev, *loopfile, offset, ++ opt_encryption, pfd, &loopro)) { ++ switch(res) { ++ case 2: ++ /* loop dev has been grabbed by some other process, ++ try again */ ++ if (verbose) ++ printf("mount: stolen loop=%s ...trying again\n", *loopdev); ++ *loopdev = NULL; ++ continue; ++ default: ++ if (verbose) ++ printf(_("mount: failed setting up loop device\n")); ++ return EX_FAIL; ++ } ++ } + } while (!*loopdev); + if (verbose > 1) diff --git a/util-linux-2.12r-rpcsec-gss.patch b/util-linux-2.12r-mount_rpcsec_gss.patch similarity index 88% rename from util-linux-2.12r-rpcsec-gss.patch rename to util-linux-2.12r-mount_rpcsec_gss.patch index cdff5f4..a5d8138 100644 --- a/util-linux-2.12r-rpcsec-gss.patch +++ b/util-linux-2.12r-mount_rpcsec_gss.patch @@ -1,6 +1,8 @@ ---- mount/nfsmount.c.orig 2006-03-17 19:42:33.000000000 +1100 -+++ mount/nfsmount.c 2006-03-17 19:56:55.000000000 +1100 -@@ -119,8 +119,10 @@ find_kernel_nfs_mount_version(void) { +Index: mount/nfsmount.c +=================================================================== +--- mount/nfsmount.c.orig ++++ mount/nfsmount.c +@@ -117,8 +117,10 @@ find_kernel_nfs_mount_version(void) { nfs_mount_version = 4; /* since 2.2.18pre9 */ else if (kernel_version < MAKE_VERSION(2,3,99)) nfs_mount_version = 3; @@ -12,7 +14,7 @@ } if (nfs_mount_version > NFS_MOUNT_VERSION) nfs_mount_version = NFS_MOUNT_VERSION; -@@ -320,7 +322,6 @@ int nfsmount(const char *spec, const cha +@@ -318,7 +320,6 @@ int nfsmount(const char *spec, const cha #if NFS_MOUNT_VERSION >= 2 data.namlen = NAME_MAX; #endif @@ -20,7 +22,7 @@ bg = 0; soft = 0; intr = 0; -@@ -402,6 +403,38 @@ int nfsmount(const char *spec, const cha +@@ -400,6 +401,38 @@ int nfsmount(const char *spec, const cha printf(_("Warning: Option namlen is not supported.\n")); } else if (!strcmp(opt, "addr")) { /* ignore */; @@ -59,7 +61,7 @@ } else { printf(_("unknown nfs mount parameter: " "%s=%d\n"), opt, val); -@@ -474,6 +507,11 @@ retry_udp: +@@ -472,6 +505,11 @@ retry_udp: data.flags |= (noacl ? NFS_MOUNT_NOACL : 0); } #endif @@ -71,7 +73,7 @@ if (nfsvers > MAX_NFSPROT) { fprintf(stderr, "NFSv%d not supported!\n", nfsvers); return 0; -@@ -510,6 +548,9 @@ retry_udp: +@@ -508,6 +546,9 @@ retry_udp: printf("tcp = %d\n", (data.flags & NFS_MOUNT_TCP) != 0); #endif @@ -81,7 +83,7 @@ #endif data.version = nfs_mount_version; -@@ -717,6 +758,30 @@ retry_udp: +@@ -715,6 +756,30 @@ retry_udp: nfs_strerror(status.nfsv3.fhs_status)); goto fail; } diff --git a/util-linux-2.12r-sec-manpage.patch b/util-linux-2.12r-mount_sec_manpage.patch similarity index 88% rename from util-linux-2.12r-sec-manpage.patch rename to util-linux-2.12r-mount_sec_manpage.patch index 0621cd6..c0c5611 100644 --- a/util-linux-2.12r-sec-manpage.patch +++ b/util-linux-2.12r-mount_sec_manpage.patch @@ -7,11 +7,11 @@ Acked-by: okir@suse.de mount/nfs.5 | 24 ++++++++++++++++++++---- 1 files changed, 20 insertions(+), 4 deletions(-) -Index: util-linux-2.12r/mount/nfs.5 +Index: util-linux-ng-2.12r+2.13pre7/mount/nfs.5 =================================================================== ---- util-linux-2.12r.orig/mount/nfs.5 -+++ util-linux-2.12r/mount/nfs.5 -@@ -128,7 +128,7 @@ mount daemon program number. +--- util-linux-ng-2.12r+2.13pre7.orig/mount/nfs.5 ++++ util-linux-ng-2.12r+2.13pre7/mount/nfs.5 +@@ -165,7 +165,7 @@ mount daemon program number. Use an alternate RPC version number to contact the mount daemon on the remote host. This option is useful for hosts that can run multiple NFS servers. @@ -20,7 +20,7 @@ Index: util-linux-2.12r/mount/nfs.5 .TP 1.5i .I nfsprog=n Use an alternate RPC program number to contact the -@@ -193,9 +193,25 @@ Suppress the retrieval of new attributes +@@ -230,9 +230,25 @@ Suppress the retrieval of new attributes .TP 1.5i .I noac Disable all forms of attribute caching entirely. This extracts a diff --git a/util-linux-2.12r-mount_swapon_swsuspend_resume.patch b/util-linux-2.12r-mount_swapon_swsuspend_resume.patch index 32ebc77..7f44b78 100644 --- a/util-linux-2.12r-mount_swapon_swsuspend_resume.patch +++ b/util-linux-2.12r-mount_swapon_swsuspend_resume.patch @@ -1,8 +1,9 @@ ## 30swsusp-resume.dpatch by Jeff Bailey -diff -urNad --exclude=CVS --exclude=.svn ./mount/get_label_uuid.c /tmp/dpep-work.5ak7Cm/util-linux/mount/get_label_uuid.c ---- ./mount/get_label_uuid.c 2004-12-22 08:44:32.000000000 -0700 -+++ /tmp/dpep-work.5ak7Cm/util-linux/mount/get_label_uuid.c 2005-12-06 11:54:33.000000000 -0700 -@@ -93,7 +93,25 @@ +Index: util-linux-ng-2.12r+git20070330/mount/get_label_uuid.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/get_label_uuid.c ++++ util-linux-ng-2.12r+git20070330/mount/get_label_uuid.c +@@ -93,7 +93,25 @@ is_v1_swap_partition(int fd, char **labe } return 0; } @@ -29,7 +30,7 @@ diff -urNad --exclude=CVS --exclude=.svn ./mount/get_label_uuid.c /tmp/dpep-work /* * Get both label and uuid. -@@ -126,6 +143,8 @@ +@@ -126,6 +144,8 @@ get_label_uuid(const char *device, char if (is_v1_swap_partition(fd, label, uuid)) goto done; @@ -38,10 +39,21 @@ diff -urNad --exclude=CVS --exclude=.svn ./mount/get_label_uuid.c /tmp/dpep-work if (lseek(fd, 1024, SEEK_SET) == 1024 && read(fd, (char *) &e2sb, sizeof(e2sb)) == sizeof(e2sb) -diff -urNad --exclude=CVS --exclude=.svn ./mount/swapon.c /tmp/dpep-work.5ak7Cm/util-linux/mount/swapon.c ---- ./mount/swapon.c 2004-12-22 08:44:32.000000000 -0700 -+++ /tmp/dpep-work.5ak7Cm/util-linux/mount/swapon.c 2005-12-06 11:54:33.000000000 -0700 -@@ -22,6 +25,7 @@ +Index: util-linux-ng-2.12r+git20070330/mount/swapon.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/swapon.c ++++ util-linux-ng-2.12r+git20070330/mount/swapon.c +@@ -10,7 +10,9 @@ + #include + #include + #include ++#include + #include ++#include + #include "xmalloc.h" + #include "swap_constants.h" + #include "swapargs.h" +@@ -23,6 +25,7 @@ #define _PATH_FSTAB "/etc/fstab" #define PROC_SWAPS "/proc/swaps" @@ -49,7 +61,7 @@ diff -urNad --exclude=CVS --exclude=.svn ./mount/swapon.c /tmp/dpep-work.5ak7Cm/ #define SWAPON_NEEDS_TWO_ARGS -@@ -164,6 +168,85 @@ +@@ -179,6 +182,85 @@ display_summary(void) return 0 ; } @@ -62,7 +74,7 @@ diff -urNad --exclude=CVS --exclude=.svn ./mount/swapon.c /tmp/dpep-work.5ak7Cm/ +static int +swap_is_swsuspend(const char *device) { + const char *type = blkid_get_tag_value(blkid, "TYPE", device); -+ ++ + if (type && strcmp(type, "swsuspend")==0) + return 0; + return 1; @@ -72,7 +84,7 @@ diff -urNad --exclude=CVS --exclude=.svn ./mount/swapon.c /tmp/dpep-work.5ak7Cm/ +swap_is_swsuspend(const char *device) { + int fd, re = 1, n = getpagesize() - 10; + char buf[10]; -+ ++ + fd = open(device, O_RDONLY); + if (fd < 0) + return -1; @@ -94,27 +106,27 @@ diff -urNad --exclude=CVS --exclude=.svn ./mount/swapon.c /tmp/dpep-work.5ak7Cm/ +swap_reinitialize(const char *device) { + const char *label = mount_get_volume_label_by_spec(device); + pid_t pid; -+ ++ + switch((pid=fork())) { + case -1: /* fork error */ + fprintf(stderr, _("%s: cannot fork: %s\n"), + progname, strerror(errno)); + return -1; -+ ++ + case 0: /* child */ + if (label && *label) + execl(PATH_MKSWAP, PATH_MKSWAP, "-L", label, device, NULL); + else + execl(PATH_MKSWAP, PATH_MKSWAP, device, NULL); + exit(1); /* error */ -+ ++ + default: /* parent */ + { + int status; + int ret; + + do { -+ if ((ret = waitpid(pid, &status, 0)) < 0 ++ if ((ret = waitpid(pid, &status, 0)) < 0 + && errno == EINTR) + continue; + else if (ret < 0) { @@ -131,26 +143,26 @@ diff -urNad --exclude=CVS --exclude=.svn ./mount/swapon.c /tmp/dpep-work.5ak7Cm/ + } + return -1; /* error */ +} -+ ++ static int do_swapon(const char *orig_special, int prio) { int status; -@@ -187,6 +269,18 @@ +@@ -202,6 +284,18 @@ do_swapon(const char *orig_special, int return -1; } -+ /* We have to reinitialize swap with old (=useless) software suspend -+ * data. The problem is that if we don't do it, then we get data ++ /* We have to reinitialize swap with old (=useless) software suspend ++ * data. The problem is that if we don't do it, then we get data + * corruption the next time with suspended on. + */ + if (swap_is_swsuspend(special)==0) { + fprintf(stdout, _("%s: %s: software suspend data detected. " -+ "Reinitializing the swap.\n"), ++ "Reinitializing the swap.\n"), + progname, special); + if (swap_reinitialize(special) < 0) + return -1; + } -+ ++ /* people generally dislike this warning - now it is printed only when `verbose' is set */ if (verbose) { diff --git a/util-linux-2.12r-umount_nosysfs.patch b/util-linux-2.12r-mount_umount_nosysfs.patch similarity index 53% rename from util-linux-2.12r-umount_nosysfs.patch rename to util-linux-2.12r-mount_umount_nosysfs.patch index f8d5ea6..97cc882 100644 --- a/util-linux-2.12r-umount_nosysfs.patch +++ b/util-linux-2.12r-mount_umount_nosysfs.patch @@ -1,6 +1,10 @@ ---- mount/umount.c +Added sysfs to list of filesystems not to unmount with umount -a [#190385] + +Index: mount/umount.c +=================================================================== +--- mount/umount.c.orig +++ mount/umount.c -@@ -724,7 +724,7 @@ +@@ -721,7 +721,7 @@ main (int argc, char *argv[]) { if (all) { /* nodev stuff: sysfs, usbfs, oprofilefs, ... */ if (types == NULL) diff --git a/util-linux-2.12r-nonfsmountfallback.diff b/util-linux-2.12r-nonfsmountfallback.diff deleted file mode 100644 index 97a7460..0000000 --- a/util-linux-2.12r-nonfsmountfallback.diff +++ /dev/null @@ -1,31 +0,0 @@ ---- util-linux-2.12r/mount/mount.c -+++ util-linux-2.12r/mount/mount.c -@@ -927,17 +927,6 @@ - - block_signals (SIG_UNBLOCK); - --#ifdef HAVE_NFS -- if (mnt_err && types && streq (types, "nfs")) { -- if (nfs_mount_version == 4 && mnt_err != EBUSY && mnt_err != ENOENT) { -- if (verbose) -- printf(_("mount: failed with nfs mount version 4, trying 3..\n")); -- nfs_mount_version = 3; -- goto retry_nfs; -- } -- } --#endif -- - /* Mount failed, complain, but don't die. */ - - if (types == 0) { ---- util-linux-2.12r/mount/nfsmount.c -+++ util-linux-2.12r/mount/nfsmount.c -@@ -76,7 +76,7 @@ - - #define MAKE_VERSION(p,q,r) (65536*(p) + 256*(q) + (r)) - --#define MAX_NFSPROT ((nfs_mount_version >= 4) ? 3 : 2) -+#define MAX_NFSPROT 3 - - static int - linux_version_code(void) { diff --git a/util-linux-2.12r-pagesize.patch b/util-linux-2.12r-pagesize.patch deleted file mode 100644 index e7a6968..0000000 --- a/util-linux-2.12r-pagesize.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- mount/swapon.c -+++ mount/swapon.c -@@ -50,6 +50,9 @@ - - #define QUIET 1 - -+#undef PAGE_SIZE -+#define PAGE_SIZE sysconf(_SC_PAGESIZE) -+ - int all = 0; - int verbose = 0; - int priority = -1; /* non-prioritized swap by default */ diff --git a/util-linux-2.12r-partx.patch b/util-linux-2.12r-partx.patch deleted file mode 100644 index bde9c4a..0000000 --- a/util-linux-2.12r-partx.patch +++ /dev/null @@ -1,118 +0,0 @@ -Index: util-linux-2.12r/Makefile -=================================================================== ---- util-linux-2.12r.orig/Makefile -+++ util-linux-2.12r/Makefile -@@ -18,7 +18,8 @@ SUBDIRS=po \ - fdisk \ - hwclock \ - sys-utils \ -- text-utils -+ text-utils \ -+ partx - - .PHONEY: all install clean now - all: defines.h -@@ -43,7 +44,7 @@ install: - - clean: - -rm -f *.o *~ omake conftest conftest.c core -- @for subdir in $(SUBDIRS) partx; do \ -+ @for subdir in $(SUBDIRS); do \ - (cd $$subdir && $(MAKE) $@) || exit 1; \ - done - -Index: util-linux-2.12r/partx/partx.c -=================================================================== ---- util-linux-2.12r.orig/partx/partx.c -+++ util-linux-2.12r/partx/partx.c -@@ -38,6 +38,8 @@ - #include - #include - #include /* HDIO_GETGEO */ -+/* workaround for __user in header file */ -+#define __user - #include - #define BLKGETSIZE _IO(0x12,96) /* return device size */ - -@@ -333,29 +335,13 @@ xmalloc (size_t size) { - /* - * sseek: seek to specified sector - */ --#if !defined (__alpha__) && !defined (__ia64__) && !defined (__s390x__) && !defined(__x86_64__) --#define NEED__llseek --#endif -- --#ifdef NEED__llseek --#include /* _syscall */ --static --_syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, -- long long *, res, uint, wh); --#endif -- - static int - sseek(int fd, unsigned int secnr) { - long long in, out; - in = ((long long) secnr << 9); - out = 1; - --#ifdef NEED__llseek -- if (_llseek (fd, in>>32, in & 0xffffffff, &out, SEEK_SET) != 0 -- || out != in) --#else - if ((out = lseek(fd, in, SEEK_SET)) != in) --#endif - { - fprintf(stderr, "llseek error\n"); - return -1; -Index: util-linux-2.12r/partx/addpart.c -=================================================================== ---- util-linux-2.12r.orig/partx/addpart.c -+++ util-linux-2.12r/partx/addpart.c -@@ -3,6 +3,8 @@ - #include - #include - #include -+/* workaround for __user in header file */ -+#define __user - #include - - int -Index: util-linux-2.12r/partx/delpart.c -=================================================================== ---- util-linux-2.12r.orig/partx/delpart.c -+++ util-linux-2.12r/partx/delpart.c -@@ -3,6 +3,8 @@ - #include - #include - #include -+/* workaround for __user in header file */ -+#define __user - #include - - int -Index: util-linux-2.12r/partx/Makefile -=================================================================== ---- util-linux-2.12r.orig/partx/Makefile -+++ util-linux-2.12r/partx/Makefile -@@ -1,7 +1,12 @@ -+include ../MCONFIG -+ - OBJ = bsd.o dos.o partx.o solaris.o unixware.o gpt.o crc32.o - CFLAGS += -Wall -+SBIN= -+ -+SBIN:=$(SBIN) partx - --all: addpart delpart partx -+all: addpart delpart $(SBIN) - - partx: $(OBJ) - -@@ -13,3 +18,7 @@ clean: - rm -f $(OBJ) addpart.o delpart.o addpart delpart partx *~ - - $(OBJ): partx.h -+ -+install: all -+ $(INSTALLDIR) $(SBINDIR) -+ $(INSTALLBIN) $(SBIN) $(SBINDIR) diff --git a/util-linux-2.12r-partx_gpt_warning.patch b/util-linux-2.12r-partx_gpt_warning.patch deleted file mode 100644 index eff2e26..0000000 --- a/util-linux-2.12r-partx_gpt_warning.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-2.12r/partx/gpt.h -=================================================================== ---- util-linux-2.12r.orig/partx/gpt.h -+++ util-linux-2.12r/partx/gpt.h -@@ -36,7 +36,7 @@ - #define MSDOS_MBR_SIGNATURE 0xaa55 - #define GPT_BLOCK_SIZE 512 - --#define GPT_HEADER_SIGNATURE 0x5452415020494645 -+#define GPT_HEADER_SIGNATURE 0x5452415020494645LL - #define GPT_HEADER_REVISION_V1_02 0x00010200 - #define GPT_HEADER_REVISION_V1_00 0x00010000 - #define GPT_HEADER_REVISION_V0_99 0x00009900 diff --git a/util-linux-2.12r-rawfixes.patch b/util-linux-2.12r-rawfixes.patch deleted file mode 100644 index 14ba34b..0000000 --- a/util-linux-2.12r-rawfixes.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- util-linux-2.12a/disk-utils/raw.c.=K0000=.orig -+++ util-linux-2.12a/disk-utils/raw.c -@@ -31,6 +31,7 @@ - #endif - #define DEVFS_RAWCTLDEV "/dev/raw/rawctl" - -+#define RAW_NR_MINORS 4096 - - char * progname; - int do_query = 0; -@@ -94,7 +95,7 @@ int main(int argc, char *argv[]) - if (do_query_all) { - if (optind < argc) - usage(1); -- for (i=1; i<255; i++) -+ for (i = 1; i < RAW_NR_MINORS; i++) - query(i, 1); - exit(0); - } diff --git a/util-linux-2.12r-readprofile-mapfile.patch b/util-linux-2.12r-sys_utils_readprofile_mapfile.patch similarity index 100% rename from util-linux-2.12r-readprofile-mapfile.patch rename to util-linux-2.12r-sys_utils_readprofile_mapfile.patch diff --git a/util-linux-2.12r.diff b/util-linux-2.12r.diff deleted file mode 100644 index 901db7f..0000000 --- a/util-linux-2.12r.diff +++ /dev/null @@ -1,86 +0,0 @@ ---- util-linux-2.12q/configure -+++ util-linux-2.12q/configure -@@ -59,7 +59,7 @@ - - CC=${CC-cc} - CFLAGS=${CFLAGS-"-O2"} --LDFLAGS=${LDFLAGS-"-s"} -+LDFLAGS=${LDFLAGS-""} - echo CC=$CC >> make_include - echo CFLAGS=$CFLAGS >> make_include - echo LDFLAGS=$LDFLAGS >> make_include ---- util-linux-2.12q/MCONFIG -+++ util-linux-2.12q/MCONFIG -@@ -22,7 +22,7 @@ - # If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp - # will use PAM for authentication. Additionally, passwd will not be - # installed as it is not PAM aware. --HAVE_PAM=no -+HAVE_PAM=yes - - # If HAVE_SELINUX is set to "yes", the login will make sure the user is - # logged into an appropriate security context -@@ -35,7 +35,7 @@ - - # If HAVE_PASSWD is set to "yes", then passwd will not be built or - # installed from the login-utils subdirectory. --HAVE_PASSWD=no -+HAVE_PASSWD=yes - - # If you use chfn and chsh from this package, REQUIRE_PASSWORD will require - # non-root users to enter the account password before updating /etc/passwd. -@@ -59,7 +59,7 @@ - # not be built or installed from the login-utils subdirectory. (The - # shutdown and init from the SysVinit package do not depend on the last, - # mesg, and wall from that package.) --HAVE_SYSVINIT_UTILS=yes -+HAVE_SYSVINIT_UTILS=no - - # If HAVE_WRITE is set to "yes", then write will not be built or - # installed from the misc-utils subdirectory. -@@ -77,7 +77,7 @@ - # user's tty to "tty" [The login in util-linux does this correctly, and - # xterm will do it correctly if X is compiled with USE_TTY_GROUP set - # properly.] --USE_TTY_GROUP=yes -+USE_TTY_GROUP=no - - # If HAVE_KILL is set to "yes", then kill will not be built or - # installed from the misc-utils subdirectory. -@@ -141,7 +141,7 @@ - OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer - else - ifeq "$(ARCH)" "arm" -- OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer -+ OPT= -pipe -O2 -fomit-frame-pointer - else - OPT= -O2 -fomit-frame-pointer - endif -@@ -220,7 +220,7 @@ - INSTALLBIN= $(INSTALL) -m $(BINMODE) - INSTALLMAN= $(INSTALL) -m $(MANMODE) - INSTALLDAT= $(INSTALL) -m $(DATMODE) --INSTALLSUID= $(INSTALL) -m $(SUIDMODE) -o root -+INSTALLSUID= $(INSTALL) -m $(SUIDMODE) - - ifeq "$(DISABLE_NLS)" "yes" - NLSFLAGS = -DDISABLE_NLS ---- util-linux-2.12q/mount/filesystems -+++ util-linux-2.12q/mount/filesystems -@@ -0,0 +1,5 @@ -+vfat -+hfs -+minix -+reiserfs -+* ---- util-linux-2.12q/mount/linux_fs.h -+++ util-linux-2.12q/mount/linux_fs.h -@@ -19,7 +19,7 @@ - #define MINIX2_SUPER_MAGIC2 0x2478 /* minix v2, 30 char names */ - struct minix_super_block { - u_char s_dummy[16]; -- u_char s_magic[2]; -+ short s_magic[2]; - }; - #define minixmagic(s) assemble2le(s.s_magic) - diff --git a/util-linux-2.12r.tar.bz2 b/util-linux-2.12r.tar.bz2 deleted file mode 100644 index dd91c63..0000000 --- a/util-linux-2.12r.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b8e499b338ce9fbd1fb315194b26540ec823c0afc46c9e145ac7a3e38ad57e6b -size 1370907 diff --git a/util-linux-2.13-build_fix_intel_check.patch b/util-linux-2.13-build_fix_intel_check.patch new file mode 100644 index 0000000..8e1c118 --- /dev/null +++ b/util-linux-2.13-build_fix_intel_check.patch @@ -0,0 +1,13 @@ +Index: util-linux-ng-2.12r+git20070330/configure.ac +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/configure.ac ++++ util-linux-ng-2.12r+git20070330/configure.ac +@@ -170,7 +170,7 @@ AC_TRY_COMPILE([ + + + case "$host" in +- i?86-*) intel=true ;; ++ i?86-* | x86_64*) intel=true ;; + m68*) m68k=true ;; + sparc*) sparc=true ;; + esac diff --git a/util-linux-2.13-build_gnu_source.patch b/util-linux-2.13-build_gnu_source.patch new file mode 100644 index 0000000..03174c6 --- /dev/null +++ b/util-linux-2.13-build_gnu_source.patch @@ -0,0 +1,12 @@ +Index: util-linux-ng-2.12r+git20070330/configure.ac +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/configure.ac ++++ util-linux-ng-2.12r+git20070330/configure.ac +@@ -10,6 +10,7 @@ AC_CONFIG_SRCDIR(mount/mount.c) + + AC_PREFIX_DEFAULT(/) + ++AC_GNU_SOURCE + AC_PROG_CC_STDC + AC_PROG_RANLIB + AC_PROG_LIBTOOL diff --git a/util-linux-2.13-misc_utils_add_man_scriptreplay.patch b/util-linux-2.13-misc_utils_add_man_scriptreplay.patch new file mode 100644 index 0000000..ba22200 --- /dev/null +++ b/util-linux-2.13-misc_utils_add_man_scriptreplay.patch @@ -0,0 +1,13 @@ +Index: util-linux-ng-2.12r+git20070330/misc-utils/Makefile.am +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/misc-utils/Makefile.am ++++ util-linux-ng-2.12r+git20070330/misc-utils/Makefile.am +@@ -24,7 +24,7 @@ scriptreplay: scriptreplay.pl + CLEANFILES = chkdupexe scriptreplay + + man_MANS = cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \ +- namei.1 script.1 whereis.1 hostid.1 ++ namei.1 script.1 whereis.1 hostid.1 scriptreplay.1 + + if HAVE_NCURSES + cal_LDADD = -lncurses diff --git a/util-linux-2.13-mount_nfs_timeo.patch b/util-linux-2.13-mount_nfs_timeo.patch new file mode 100644 index 0000000..53b2141 --- /dev/null +++ b/util-linux-2.13-mount_nfs_timeo.patch @@ -0,0 +1,13 @@ +Index: util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/mount/nfsmount.c ++++ util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c +@@ -487,7 +487,7 @@ retry_udp: + + /* Adjust options if none specified */ + if (!data.timeo) +- data.timeo = tcp ? 70 : 7; ++ data.timeo = tcp ? 600 : 7; + + #ifdef NFS_MOUNT_DEBUG + printf("rsize = %d, wsize = %d, timeo = %d, retrans = %d\n", diff --git a/util-linux-2.13-sys_utils_arch.patch b/util-linux-2.13-sys_utils_arch.patch new file mode 100644 index 0000000..4b63ad0 --- /dev/null +++ b/util-linux-2.13-sys_utils_arch.patch @@ -0,0 +1,105 @@ +Index: util-linux-ng-2.12r+git20070330/sys-utils/Makefile.am +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/sys-utils/Makefile.am ++++ util-linux-ng-2.12r+git20070330/sys-utils/Makefile.am +@@ -1,9 +1,11 @@ + include $(top_srcdir)/config/include-Makefile.am + +-bin_PROGRAMS = dmesg ++bin_PROGRAMS = arch dmesg + + usrbinexec_PROGRAMS = cytune flock ionice ipcrm ipcs renice setsid + ++arch_SOURCES = arch.c ++ + cytune_SOURCES = cytune.c cyclades.h + + sbin_PROGRAMS = ctrlaltdel +@@ -12,7 +14,7 @@ usrsbinexec_PROGRAMS = readprofile tunel + + tunelp_SOURCES = tunelp.c lp.h + +-man_MANS = flock.1 ionice.1 readprofile.1 \ ++man_MANS = arch.1 flock.1 ionice.1 readprofile.1 \ + ctrlaltdel.8 cytune.8 dmesg.8 ipcrm.8 ipcs.8 renice.8 \ + setsid.8 tunelp.8 + +Index: util-linux-ng-2.12r+git20070330/sys-utils/arch.1 +=================================================================== +--- /dev/null ++++ util-linux-ng-2.12r+git20070330/sys-utils/arch.1 +@@ -0,0 +1,34 @@ ++.\" arch.1 -- ++.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) ++.\" Public domain: may be freely distributed. ++.TH ARCH 1 "4 July 1997" "Linux 2.0" "Linux Programmer's Manual" ++.SH NAME ++arch \- print machine architecture ++.SH SYNOPSIS ++.B arch ++.SH DESCRIPTION ++.B arch ++is equivalent to ++.BR "uname -m" . ++ ++On current Linux systems, ++.B arch ++prints things such as "i386", "i486", "i586", "alpha", "sparc", ++"arm", "m68k", "mips", "ppc". ++.SH SEE ALSO ++.BR uname (1), ++.BR uname (2) ++.\" ++.\" Details: ++.\" arch prints the machine part of the system_utsname struct ++.\" This struct is defined in version.c, and this field is ++.\" initialized with UTS_MACHINE, which is defined as $ARCH ++.\" in the main Makefile. ++.\" That gives the possibilities ++.\" alpha arm i386 m68k mips ppc sparc sparc64 ++.\" ++.\" If Makefile is not edited, ARCH is guessed by ++.\" ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/) ++.\" Then how come we get these i586 values? ++.\" Well, the routine check_bugs() does system_utsname.machine[1] = '0' + x86; ++.\" (called in init/main.c, defined in ./include/asm-i386/bugs.h) +Index: util-linux-ng-2.12r+git20070330/sys-utils/arch.c +=================================================================== +--- /dev/null ++++ util-linux-ng-2.12r+git20070330/sys-utils/arch.c +@@ -0,0 +1,35 @@ ++/* arch -- print machine architecture information ++ * Created: Mon Dec 20 12:27:15 1993 by faith@cs.unc.edu ++ * Revised: Mon Dec 20 12:29:23 1993 by faith@cs.unc.edu ++ * Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) ++ ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2, or (at your option) any ++ * later version. ++ ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. */ ++ ++#include ++#include ++ ++int main (void) ++{ ++ struct utsname utsbuf; ++ ++ if (uname( &utsbuf )) { ++ perror( "arch" ); ++ return 1; ++ } ++ ++ printf( "%s\n", utsbuf.machine ); ++ ++ return 0; ++} diff --git a/util-linux-2.13-tests_missing_include.patch b/util-linux-2.13-tests_missing_include.patch new file mode 100644 index 0000000..ed9c233 --- /dev/null +++ b/util-linux-2.13-tests_missing_include.patch @@ -0,0 +1,12 @@ +Index: util-linux-ng-2.12r+git20070330/tests/helpers/mnt_test_sysinfo.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/tests/helpers/mnt_test_sysinfo.c ++++ util-linux-ng-2.12r+git20070330/tests/helpers/mnt_test_sysinfo.c +@@ -1,6 +1,7 @@ + + #include + #include ++#include + #include + + #include diff --git a/util-linux-wall.dif b/util-linux-login_utils_wall.patch similarity index 88% rename from util-linux-wall.dif rename to util-linux-login_utils_wall.patch index 43faf7b..619ed13 100644 --- a/util-linux-wall.dif +++ b/util-linux-login_utils_wall.patch @@ -1,3 +1,5 @@ +remove unwanted newline (#12181) + --- util-linux-2.12q/login-utils/wall.c +++ util-linux-2.12q/login-utils/wall.c @@ -217,8 +217,6 @@ diff --git a/util-linux-libvolume_id-support.patch b/util-linux-mount_libvolume_id_support.patch similarity index 57% rename from util-linux-libvolume_id-support.patch rename to util-linux-mount_libvolume_id_support.patch index adca26a..3e168ad 100644 --- a/util-linux-libvolume_id-support.patch +++ b/util-linux-mount_libvolume_id_support.patch @@ -1,127 +1,16 @@ ---- MCONFIG -+++ MCONFIG -@@ -138,8 +138,8 @@ - CPUTAIL=486 - endif - ifeq "$(CPU)" "x86_64" -- CPUHEAD=-mcpu= -- CPUTAIL=nocona -+ CPUHEAD=-mtune= -+ CPUTAIL=k8 - endif - CPUOPT= $(CPUHEAD)$(CPUTAIL) - OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer -@@ -151,7 +151,7 @@ - endif - endif - --WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -+WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -g - - LIB=../lib - ---- configure -+++ configure -@@ -754,3 +754,23 @@ - echo "You don't have blkid" - fi - rm -f conftest conftest.c -+ -+# -+# 16. For mount, do we have libvolume_id? -+# -+echo ' -+#include -+#include -+int main(){ exit(0); volume_id_close(NULL); } -+' > conftest.c -+LIBS="-lvolume_id" -+eval $compile -+LIBS= -+if test -s conftest; then -+ echo "HAVE_VOLID=yes" >> make_include -+ echo "You have libvolume_id" -+else -+ echo "HAVE_VOLID=no" >> make_include -+ echo "You don't have libvolume_id" -+fi -+rm -f conftest conftest.c ---- mount/Makefile -+++ mount/Makefile -@@ -1,7 +1,7 @@ - include ../make_include - include ../MCONFIG - --DEFINES = -DHAVE_NFS $(BLKID_DEFINE) -+DEFINES = -DHAVE_NFS $(BLKID_DEFINE) $(VOLID_DEFINE) - - RPCSVCDIR = rpcsvc - RPC_CFLAGS = -Wno-unused -@@ -25,6 +25,11 @@ - BLKID_LIB = -lblkid -luuid - endif - -+ifeq "$(HAVE_VOLID)" "yes" -+VOLID_DEFINE = -DHAVE_VOLID -+VOLID_LIB = -lvolume_id -+endif -+ - PROGS = $(SUID_PROGS) $(NOSUID_PROGS) - - MAYBE = pivot_root swapoff -@@ -48,23 +53,25 @@ - - mount: mount.o fstab.o sundries.o xmalloc.o realpath.o mntent.o version.o \ - get_label_uuid.o mount_by_label.o mount_blkid.o mount_guess_fstype.o \ -+ mount_udev.o \ - getusername.o $(LIB)/setproctitle.o $(LIB)/env.o $(NFS_OBJS) lomount.o \ - loumount.o loop.o sha512.o rmd160.o aes.o $(LIB)/xstrncpy.o -- $(LINK) $^ -o $@ $(BLKID_LIB) -+ $(LINK) $^ -o $@ $(BLKID_LIB) $(VOLID_LIB) - - umount: umount.o fstab.o sundries.o xmalloc.o realpath.o mntent.o \ - getusername.o get_label_uuid.o mount_by_label.o mount_blkid.o \ -- version.o $(LIB)/env.o loumount.o -- $(LINK) $^ -o $@ $(BLKID_LIB) -+ mount_udev.o version.o $(LIB)/env.o loumount.o -+ $(LINK) $^ -o $@ $(BLKID_LIB) $(VOLID_LIB) - - guessfstype: guessfstype.o mount_guess_fstype.o sundries.o realpath.o \ - fstab.o mntent.o get_label_uuid.o mount_blkid.o mount_by_label.o \ -- xmalloc.o -- $(LINK) $^ -o $@ -+ mount_udev.o xmalloc.o -+ $(LINK) $^ -o $@ $(VOLID_LIB) - - swapon: swapon.o version.o xmalloc.o \ -- get_label_uuid.o mount_by_label.o mount_blkid.o loop.o sha512.o $(LIB)/xstrncpy.o -- $(LINK) $^ -o $@ $(BLKID_LIB) -+ get_label_uuid.o mount_by_label.o mount_blkid.o mount_udev.o \ -+ loop.o sha512.o $(LIB)/xstrncpy.o -+ $(LINK) $^ -o $@ $(BLKID_LIB) $(VOLID_LIB) - - main_losetup.o: lomount.c - $(COMPILE) -DMAIN lomount.c -o $@ -@@ -142,7 +149,7 @@ - - clean: - rm -f a.out core *~ *.o swapargs.h $(PROGS) $(MAYBE) -- rm -f nfs_mountversion.h -+ rm -f nfs_mountversion.h nfsmount_clnt.c nfsmount.h nfsmount_xdr.c - - clobber distclean realclean: clean - rm -f $(GEN_FILES) ---- mount/fstab.c -+++ mount/fstab.c -@@ -305,6 +305,7 @@ - /* Find the entry (SPEC,FILE) in fstab */ +Index: util-linux-ng-2.12r+git20070330/mount/fstab.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/fstab.c ++++ util-linux-ng-2.12r+git20070330/mount/fstab.c +@@ -305,6 +305,7 @@ has_uuid(const char *device, const char struct mntentchn * getfsspecfile (const char *spec, const char *file) { -+ char *nspec; struct mntentchn *mc, *mc0; ++ char *nspec; mc0 = fstab_head(); -@@ -316,11 +317,12 @@ + +@@ -315,11 +316,12 @@ getfsspecfile (const char *spec, const c return mc; /* second attempt: names found after symlink resolution */ @@ -135,7 +24,7 @@ return mc; /* third attempt: names found after LABEL= or UUID= resolution */ -@@ -357,11 +359,21 @@ +@@ -356,11 +358,21 @@ getfsfile (const char *file) { struct mntentchn * getfsspec (const char *spec) { struct mntentchn *mc, *mc0; @@ -159,18 +48,20 @@ return NULL; } ---- mount/mount.c -+++ mount/mount.c -@@ -1667,7 +1667,7 @@ - use only for testing purposes - - the guessing is not reliable at all */ - { -- char *fstype; -+ const char *fstype; - fstype = do_guess_fstype(optarg); - printf("%s\n", fstype ? fstype : "unknown"); - exit(fstype ? 0 : EX_FAIL); -@@ -1738,6 +1738,8 @@ +@@ -723,6 +735,8 @@ char *progname; + + const char *mount_get_volume_label_by_spec(const char *spec) { return NULL; } + const char *mount_get_devname_by_uuid(const char *uuid) { return NULL; } ++const char *mount_get_devname_by_label(const char *label) { return NULL; } ++const char *mount_get_volume_uuid_by_spec(const char *spec) { return NULL; } + struct my_mntent *my_getmntent (mntFILE *mfp) { return NULL; } + mntFILE *my_setmntent (const char *file, char *mode) { return NULL; } + void my_endmntent (mntFILE *mfp) { } +Index: util-linux-ng-2.12r+git20070330/mount/mount.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/mount.c ++++ util-linux-ng-2.12r+git20070330/mount/mount.c +@@ -1746,6 +1746,8 @@ main(int argc, char *argv[]) { if (mc == NULL) mc = getfsspec (spec); if (mc == NULL) @@ -179,44 +70,54 @@ die (EX_USAGE, _("mount: cannot find %s in %s"), spec, _PATH_FSTAB); ---- mount/mount_blkid.c -+++ mount/mount_blkid.c +Index: util-linux-ng-2.12r+git20070330/mount/mount_blkid.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/mount_blkid.c ++++ util-linux-ng-2.12r+git20070330/mount/mount_blkid.c @@ -1,6 +1,7 @@ #include #include "mount_blkid.h" -+#ifndef HAVE_VOLID - #ifdef HAVE_BLKID ++#ifndef HAVE_LIBVOLUME_ID + #ifdef HAVE_LIBBLKID blkid_cache blkid; -@@ -119,3 +120,4 @@ +@@ -118,4 +119,5 @@ mount_get_devname_for_mounting(const cha + } - #endif -+#endif ---- mount/mount_blkid.h -+++ mount/mount_blkid.h -@@ -11,3 +11,5 @@ +-#endif ++#endif /* HAVE_LIBBLKID */ ++#endif /* HAVE_LIBVOLUME_ID */ +Index: util-linux-ng-2.12r+git20070330/mount/mount_blkid.h +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/mount_blkid.h ++++ util-linux-ng-2.12r+git20070330/mount/mount_blkid.h +@@ -11,3 +11,5 @@ extern const char *mount_get_volume_uuid extern const char *mount_get_volume_label_by_spec(const char *spec); extern const char *mount_get_devname(const char *spec); extern const char *mount_get_devname_for_mounting(const char *spec); + +extern const char *volume_id_get_tag(const char *spec, const char *token); ---- mount/mount_by_label.c -+++ mount/mount_by_label.c +Index: util-linux-ng-2.12r+git20070330/mount/mount_by_label.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/mount_by_label.c ++++ util-linux-ng-2.12r+git20070330/mount/mount_by_label.c @@ -1,4 +1,4 @@ --#ifndef HAVE_BLKID -+#if (!defined HAVE_BLKID) && (!defined HAVE_VOLID) +-#ifndef HAVE_LIBBLKID ++#if (!defined HAVE_BLKID) && (!defined HAVE_LIBVOLUME_ID) /* * mount_by_label.c - aeb * ---- mount/mount_guess_fstype.c -+++ mount/mount_guess_fstype.c -@@ -54,9 +54,23 @@ +Index: util-linux-ng-2.12r+git20070330/mount/mount_guess_fstype.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/mount_guess_fstype.c ++++ util-linux-ng-2.12r+git20070330/mount/mount_guess_fstype.c +@@ -46,15 +46,29 @@ #define ETC_FILESYSTEMS "/etc/filesystems" #define PROC_FILESYSTEMS "/proc/filesystems" -+#ifdef HAVE_VOLID ++#ifdef HAVE_LIBVOLUME_ID + +static int +known_fstype(const char *fstype) { @@ -230,32 +131,29 @@ +} + +#else - #ifdef HAVE_BLKID + #ifdef HAVE_LIBBLKID -char * +const char * do_guess_fstype(const char *device) { return blkid_get_tag_value(blkid, "TYPE", device); -@@ -208,7 +222,7 @@ - return (sum == p[511]); } --char * -+const char * - do_guess_fstype(const char *device) { - int fd; - char *type = NULL; -@@ -536,7 +550,7 @@ +-static int ++const static int + known_fstype(const char *fstype) + { + return blkid_known_fstype(fstype); +@@ -492,6 +506,7 @@ io_error: } #endif -- +#endif + static struct tried { struct tried *next; - char *type; -@@ -578,9 +592,9 @@ +@@ -534,9 +549,9 @@ free_tested(void) { tried = NULL; } @@ -267,8 +165,10 @@ if (verbose) { printf (_("mount: you didn't specify a filesystem type for %s\n"), spec); ---- /dev/null 2006-06-02 17:12:45.000000000 +0200 -+++ mount/mount_udev.c 2006-06-12 11:14:42.285154088 +0200 +Index: util-linux-ng-2.12r+git20070330/mount/mount_udev.c +=================================================================== +--- /dev/null ++++ util-linux-ng-2.12r+git20070330/mount/mount_udev.c @@ -0,0 +1,237 @@ +#include +#include @@ -282,7 +182,7 @@ + +#include "mount_blkid.h" + -+#ifdef HAVE_VOLID ++#ifdef HAVE_LIBVOLUME_ID + +extern int verbose; + @@ -507,8 +407,10 @@ +} + +#endif ---- mount/mount_guess_fstype.h -+++ mount/mount_guess_fstype.h +Index: util-linux-ng-2.12r+git20070330/mount/mount_guess_fstype.h +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/mount_guess_fstype.h ++++ util-linux-ng-2.12r+git20070330/mount/mount_guess_fstype.h @@ -8,8 +8,8 @@ struct mountargs { extern int verbose; @@ -520,4 +422,62 @@ int procfsloop(int (*mount_fn)(struct mountargs *), struct mountargs *args, const char **type); int is_in_procfs(const char *fstype); - +Index: util-linux-ng-2.12r+git20070330/configure.ac +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/configure.ac ++++ util-linux-ng-2.12r+git20070330/configure.ac +@@ -57,8 +57,10 @@ AC_CHECK_LIB(termcap, tgetnum) + AM_CONDITIONAL(HAVE_TERMCAP, test x$ac_cv_lib_termcap_tgetnum = xyes) + + AC_CHECK_LIB(blkid, blkid_known_fstype) +-AM_CONDITIONAL(HAVE_BLKID, test x$ac_cv_lib_blkid_blkid_known_fstype = xyes) ++AC_CHECK_LIB(volume_id, volume_id_open_node) + ++AM_CONDITIONAL(HAVE_BLKID, test x$ac_cv_lib_blkid_blkid_known_fstype = xyes) ++AM_CONDITIONAL(HAVE_VOLUME_ID, test x$ac_cv_lib_volume_id_volume_id_open_node = xyes) + + AM_GNU_GETTEXT_VERSION([0.14.1]) + AM_GNU_GETTEXT([external]) +Index: util-linux-ng-2.12r+git20070330/mount/Makefile.am +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/Makefile.am ++++ util-linux-ng-2.12r+git20070330/mount/Makefile.am +@@ -16,7 +16,7 @@ MNTHDRS = fstab.h linux_fs.h mount_mnten + + mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ + get_label_uuid.c mount_by_label.c mount_blkid.c mount_guess_fstype.c \ +- getusername.c \ ++ mount_udev.c getusername.c \ + nfsmount.c nfsmount_clnt.c nfs4mount.c \ + lomount.c \ + $(MNTHDRS) +@@ -24,14 +24,14 @@ mount_SOURCES = mount.c fstab.c sundries + mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a libnfsmount_xdr.a + + umount_SOURCES = umount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ +- getusername.c get_label_uuid.c mount_by_label.c mount_blkid.c \ ++ getusername.c get_label_uuid.c mount_by_label.c mount_blkid.c mount_udev.c \ + lomount.c \ + $(MNTHDRS) + + umount_LDADD = $(top_srcdir)/lib/libenv.a + + swapon_SOURCES = swapon.c xmalloc.c \ +- get_label_uuid.c mount_by_label.c mount_blkid.c \ ++ get_label_uuid.c mount_by_label.c mount_blkid.c mount_udev.c \ + swap_constants.h realpath.c + + losetup_SOURCES = lomount.c loop.h lomount.h +@@ -43,6 +43,12 @@ umount_LDADD += -lblkid -luuid + swapon_LDADD = -lblkid -luuid + endif + ++if HAVE_VOLUME_ID ++mount_LDADD += -lvolume_id ++umount_LDADD += -lvolume_id ++swapon_LDADD = -lvolume_id ++endif ++ + if HAVE_PIVOT_ROOT + sbin_PROGRAMS += pivot_root + man_MANS += pivot_root.8 diff --git a/mount.8-acl.diff b/util-linux-mount_mount.8-acl.patch similarity index 100% rename from mount.8-acl.diff rename to util-linux-mount_mount.8-acl.patch diff --git a/util-linux-nfs.8.diff b/util-linux-mount_nfs.8.patch similarity index 100% rename from util-linux-nfs.8.diff rename to util-linux-mount_nfs.8.patch diff --git a/util-linux-opt-hotplug.diff b/util-linux-mount_opt_hotplug.patch similarity index 73% rename from util-linux-opt-hotplug.diff rename to util-linux-mount_opt_hotplug.patch index ee5ed40..d979289 100644 --- a/util-linux-opt-hotplug.diff +++ b/util-linux-mount_opt_hotplug.patch @@ -3,10 +3,10 @@ mount/mount_constants.h | 3 +++ 3 files changed, 23 insertions(+), 2 deletions(-) -Index: util-linux-2.12r/mount/mount.8 +Index: util-linux-ng-2.12r+git20070330/mount/mount.8 =================================================================== ---- util-linux-2.12r.orig/mount/mount.8 -+++ util-linux-2.12r/mount/mount.8 +--- util-linux-ng-2.12r+git20070330.orig/mount/mount.8 ++++ util-linux-ng-2.12r+git20070330/mount/mount.8 @@ -572,6 +572,10 @@ This option implies the options (unless overridden by subsequent options, as in the option line .BR group,dev,suid ). @@ -18,7 +18,7 @@ Index: util-linux-2.12r/mount/mount.8 .B mand Allow mandatory locks on this filesystem. See .BR fcntl (2). -@@ -599,6 +603,9 @@ Do not allow direct execution of any bin +@@ -602,6 +606,9 @@ Do not allow direct execution of any bin (Until recently it was possible to run binaries anyway using a command like /lib/ld*.so /mnt/binary. This trick fails since Linux 2.4.25 / 2.6.0.) .TP @@ -28,11 +28,11 @@ Index: util-linux-2.12r/mount/mount.8 .B nomand Do not allow mandatory locks on this filesystem. .TP -Index: util-linux-2.12r/mount/mount.c +Index: util-linux-ng-2.12r+git20070330/mount/mount.c =================================================================== ---- util-linux-2.12r.orig/mount/mount.c -+++ util-linux-2.12r/mount/mount.c -@@ -162,9 +162,14 @@ static const struct opt_map opt_map[] = +--- util-linux-ng-2.12r+git20070330.orig/mount/mount.c ++++ util-linux-ng-2.12r+git20070330/mount/mount.c +@@ -174,9 +174,14 @@ static const struct opt_map opt_map[] = { "diratime", 0, 1, MS_NODIRATIME }, /* Update dir access times */ { "nodiratime", 0, 0, MS_NODIRATIME },/* Do not update dir access times */ #endif @@ -44,10 +44,10 @@ Index: util-linux-2.12r/mount/mount.c +static int option_hotplug; /* can not invent our own MS_FLAGS */ + - static const char *opt_loopdev, *opt_vfstype, + static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, *opt_speed, *opt_comment; -@@ -265,6 +270,10 @@ parse_opt(const char *opt, int *mask, ch +@@ -269,6 +274,10 @@ parse_opt(const char *opt, int *mask, ch for (om = opt_map; om->opt != NULL; om++) if (streq (opt, om->opt)) { @@ -58,7 +58,7 @@ Index: util-linux-2.12r/mount/mount.c if (om->inv) *mask &= ~om->mask; else -@@ -958,9 +967,11 @@ nosigblock: +@@ -985,9 +994,11 @@ retry_nfs: else if (stat (node, &statbuf)) error (_("mount: mount point %s is a symbolic link to nowhere"), node); @@ -72,10 +72,10 @@ Index: util-linux-2.12r/mount/mount.c errno = mnt_err; perror("mount"); } -Index: util-linux-2.12r/mount/mount_constants.h +Index: util-linux-ng-2.12r+git20070330/mount/mount_constants.h =================================================================== ---- util-linux-2.12r.orig/mount/mount_constants.h -+++ util-linux-2.12r/mount/mount_constants.h +--- util-linux-ng-2.12r+git20070330.orig/mount/mount_constants.h ++++ util-linux-ng-2.12r+git20070330/mount/mount_constants.h @@ -57,6 +57,9 @@ if we have a stack or plain mount - moun #ifndef MS_VERBOSE #define MS_VERBOSE 0x8000 /* 32768 */ diff --git a/util-linux-warn-nfsudp.diff b/util-linux-mount_warn_nfsudp.patch similarity index 89% rename from util-linux-warn-nfsudp.diff rename to util-linux-mount_warn_nfsudp.patch index 3841c8c..215a283 100644 --- a/util-linux-warn-nfsudp.diff +++ b/util-linux-mount_warn_nfsudp.patch @@ -1,8 +1,8 @@ -Index: util-linux-2.12/mount/nfs.5 -================================================================================ ---- util-linux-2.12q/mount/nfs.5 -+++ util-linux-2.12q/mount/nfs.5 -@@ -201,9 +201,13 @@ +Index: util-linux-ng-2.12r+2.13pre7/mount/nfs.5 +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/mount/nfs.5 ++++ util-linux-ng-2.12r+2.13pre7/mount/nfs.5 +@@ -238,9 +238,13 @@ writing to common filesystem on the serv Mount the NFS filesystem using the TCP protocol instead of the UDP protocol. This is the default, but in case it fails (many NFS servers only support UDP) it will fallback and try UDP. @@ -16,7 +16,7 @@ Index: util-linux-2.12/mount/nfs.5 .TP 1.5i .I noacl Assume no extended access control mechanisms like POSIX ACLs are used -@@ -217,6 +221,83 @@ +@@ -411,6 +415,83 @@ writing to common filesystem on the serv All of the non-value options have corresponding nooption forms. For example, nointr means don't allow file operations to be interrupted. @@ -100,9 +100,11 @@ Index: util-linux-2.12/mount/nfs.5 .SH FILES .I /etc/fstab .SH "SEE ALSO" ---- util-linux-2.12q/mount/nfsmount.c -+++ util-linux-2.12q/mount/nfsmount.c -@@ -737,8 +737,12 @@ +Index: util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c +=================================================================== +--- util-linux-ng-2.12r+2.13pre7.orig/mount/nfsmount.c ++++ util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c +@@ -735,8 +735,12 @@ retry_udp: goto fail; } fsock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); diff --git a/util-linux-nfs-timeo.diff b/util-linux-nfs-timeo.diff deleted file mode 100644 index 2f41dec..0000000 --- a/util-linux-nfs-timeo.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- util-linux-2.12q/mount/nfsmount.c -+++ util-linux-2.12q/mount/nfsmount.c -@@ -489,7 +489,7 @@ - - /* Adjust options if none specified */ - if (!data.timeo) -- data.timeo = tcp ? 70 : 7; -+ data.timeo = tcp ? 600 : 7; - - #ifdef NFS_MOUNT_DEBUG - printf("rsize = %d, wsize = %d, timeo = %d, retrans = %d\n", diff --git a/util-linux-ng-2.12r+git20070330.tar.bz2 b/util-linux-ng-2.12r+git20070330.tar.bz2 new file mode 100644 index 0000000..a4e861a --- /dev/null +++ b/util-linux-ng-2.12r+git20070330.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d072434a058eb2c3545194f13dc1914efc59c52b5f4d3e6f2a509ee52452778b +size 1518908 diff --git a/util-linux-nodiratime.diff b/util-linux-nodiratime.diff deleted file mode 100644 index 798b02d..0000000 --- a/util-linux-nodiratime.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: util-linux-2.12/mount/mount.8 -=================================================================== ---- util-linux-2.12.orig/mount/mount.8 -+++ util-linux-2.12/mount/mount.8 -@@ -572,6 +572,9 @@ until the network has been enabled on th - Do not update inode access times on this file system (e.g, for faster - access on the news spool to speed up news servers). - .TP -+.B nodiratime -+Do not update directory inode access times on this filesystem. -+.TP - .B noauto - Can only be mounted explicitly (i.e., the - .B \-a diff --git a/util-linux.changes b/util-linux.changes index ea863de..36d12d4 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,46 @@ +------------------------------------------------------------------- +Tue Apr 10 17:25:34 CEST 2007 - mkoenig@suse.de + +- update to version git20070330 of new forked development tree +- removed Suse crypto patches for losetup [FATE#302001] +- removed binaries: + /bin/guessfstype + /sbin/sln + /usr/bin/setfdprm +- removed obsolete patches: + * guessfstype2.patch + * loop-AES-v3.0a-util-linux-2.12p.diff + * mount-nfs-nonreserved + * stupid-programmer.diff + * util-linux-nodiratime.diff + * util-linux-2.12-multipleraw.diff + * util-linux-2.12-enablereplaybuild.diff + * util-linux-2.12-mount_guessfstype.diff + * util-linux-2.12h-mtablock.diff + * util-linux-2.12i-x86_64intel.diff + * util-linux-2.12q-null.diff + * util-linux-2.12r.diff + * util-linux-2.12r-fdisk_llseek.patch + * util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff + * util-linux-2.12r-mount_external_prog_on_guess.patch + * util-linux-2.12r-nonfsmountfallback.diff + * util-linux-2.12r-pagesize.patch + * util-linux-2.12r-partx_enable.patch + * util-linux-2.12r-partx_gpt_warning.patch +- add patches: + * util-linux-2.13-misc_utils_add_man_scriptreplay.patch + install man page for scriptreplay + * util-linux-2.13-tests_missing_include.patch + fix missing header in tests/mnt_test_sysinfo.c + * util-linux-2.13-sys_utils_arch.patch + keep /bin/arch + * util-linux-2.13-build_gnu_source.patch + build with _GNU_SOURCE + * util-linux-2.13-build_fix_intel_check.patch + detect also x86_64 as INTEL architecture +- rename patches to identify them clearly by subsystem +- schedutils now part of util-linux itself + ------------------------------------------------------------------- Wed Apr 4 12:55:40 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index b9dd15f..fbc5ba7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.12r) +# spec file for package util-linux (Version 2.12r+git20070330) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,7 +11,7 @@ # norootforbuild Name: util-linux -BuildRequires: libvolume_id-devel ncurses-devel pam-devel zlib-devel +BuildRequires: gettext-devel libvolume_id-devel ncurses-devel pam-devel zlib-devel URL: http://kernel.org/pub/linux/utils/util-linux Provides: util rawio raw base schedutils Supplements: filesystem(minix) @@ -20,15 +20,15 @@ PreReq: %install_info_prereq permissions License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on -Version: 2.12r -Release: 87 +Version: 2.12r+git20070330 +Release: 1 Summary: A collection of basic system utilities -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-%version.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source2: nologin.c Source3: nologin.8 Source4: raw.init Source5: etc.raw -Source8: guessfstype.8 +Source6: etc_filesystems %define time_ver 1.7 %define which_ver 2.13 %define adjtimex_ver 1.20 @@ -38,9 +38,6 @@ Source11: klogconsole.tar.bz2 Source12: which-%{which_ver}.tar.gz Source13: time-%{time_ver}.tar.gz Source15: cryptoloop.txt -Source16: schedutils-1.4.0.tar.bz2 -Source20: README.loop-AES-v2.2d -Source21: README.loop-AES-v2.2d.SuSE Source22: setctsid.c Source23: setctsid.8 Source24: sm-notify-20060111.tar.bz2 @@ -50,70 +47,100 @@ Source27: renice.8 Source28: mkzimage_cmdline.8 Source29: mkzimage_cmdline.c Source30: README.largedisk -Patch: util-linux-%version.diff -Patch2: loop-AES-v3.0a-util-linux-2.12p.diff -Patch3: util-linux-2.12-multipleraw.diff -Patch7: util-linux-2.12-hostid.diff -Patch8: util-linux-wall.dif -Patch10: util-linux-2.12-mount_guessfstype.diff -Patch11: guessfstype2.patch -Patch15: util-linux-nfs.8.diff -Patch23: util-linux-2.12h-mtablock.diff -Patch25: util-linux-2.11u-nfs-mount_acl.diff -Patch26: mount.8-acl.diff -Patch27: klogconsole-quiet.patch -Patch32: klogconsole.diff -Patch40: time-1.7.dif -Patch43: util-linux-2.11z-hwclock_geteuid.diff -Patch44: adjtimex-1.20-nosyscall.diff -Patch45: mount-nfs-nonreserved -Patch46: util-linux-2.12-nfs-tcp.diff -Patch51: util-linux-2.12-suse-compatibility.diff -Patch52: util-linux-2.12-enablereplaybuild.diff -Patch58: util-linux-2.12a-procswapscheck.diff -Patch61: util-linux-2.12-mountfallback.patch -Patch62: util-linux-2.12a-mountpointwithcolon.diff -Patch64: util-linux-2.12i-x86_64intel.diff -Patch70: util-linux-2.12h-short-passwords.diff -Patch71: util-linux-2.12q-null.diff -Patch72: stupid-programmer.diff -Patch74: util-linux-nfs-timeo.diff -Patch75: util-linux-2.12q-nfsv4.patch -Patch76: util-linux-warn-nfsudp.diff -Patch77: util-linux-2.12q-ionice.diff -Patch78: util-linux-2.11q-fs_mac.diff -Patch79: util-linux-opt-hotplug.diff -Patch81: util-linux-2.12a-mountbylabel-dm.patch -Patch83: util-linux-2.12q-mount--move.diff -Patch84: util-linux-nodiratime.diff -Patch85: util-linux-2.12q-strict-aliasing.diff -Patch86: util-linux-2.12r-mount-by-uuid.patch -Patch88: util-linux-2.12q-umount2-not-static.patch -Patch90: util-linux-2.12r-nonfsmountfallback.diff -Patch91: util-linux-2.12r-mount-mtab-update.patch -Patch92: util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff -Patch93: util-linux-2.12r-fdiskwrap.patch -Patch94: util-linux-2.12r-rawfixes.patch -Patch95: util-linux-2.12r-rpcsec-gss.patch -Patch96: util-linux-2.12r-external-prog-on-guess.diff -Patch97: util-linux-2.12r-sec-manpage.patch -Patch98: util-linux-2.12r-mount.8-xfs-update.patch -Patch99: util-linux-libvolume_id-support.patch -Patch100: util-linux-2.12r-umount_nosysfs.patch -Patch101: util-linux-2.12r-fdisk_llseek.patch -Patch102: util-linux-2.12r-pagesize.patch -Patch103: util-linux-2.12r-fdiskcyl.patch -Patch104: util-linux-2.12r-readprofile-mapfile.patch -Patch105: util-linux-2.12r-cal_formatting.patch -Patch106: util-linux-2.12r-partx.patch -Patch107: util-linux-2.12r-mkswap_fix.patch -Patch108: util-linux-2.12r-nfs_remount_options.patch -Patch109: util-linux-2.12r-losetup_password.patch -Patch110: util-linux-2.12r-mkfs_open_exclusive.patch -Patch111: util-linux-2.12r-fdisk_remove_bogus_warnings.patch -Patch112: util-linux-2.12r-mount_racy_loop.patch -Patch113: util-linux-2.12r-partx_gpt_warning.patch -Patch114: util-linux-2.12r-mount_swapon_swsuspend_resume.patch +## +## util-linux +## +# add hostid +Patch1: util-linux-2.12-misc_utils_hostid.patch +# 27181 (suse12181) - wall adds newlines +Patch2: util-linux-login_utils_wall.patch +# 31815 (suse16815) - Fixed nfs.5 to tell nfsver defaults to 3 +Patch3: util-linux-mount_nfs.8.patch +# 33183 (suse18183) - NFS ACCESS patch, [no]acl nfs mount option +Patch4: util-linux-2.11u-mount_nfs_mount_acl.patch +Patch5: util-linux-mount_mount.8-acl.patch +# geteuid instead of getuid in hwclock to enable making hwclock suid root. +Patch6: util-linux-2.11z-hwclock_geteuid.patch +# 48018 (suse33018) - mount -t nfs must default to tcp in sles9 +Patch7: util-linux-2.12-mount_nfs_tcp.patch +# 54436 (suse39436) - boot.swap "failed" activating swap on LVM +Patch8: util-linux-2.12a-mount_procswapcheck.patch +# 56735 (suse41735) - NFS can't mount some exports +Patch9: util-linux-2.12-mount_mountfallback.patch +# 57097 (suse42097) - mount doesn't allow to mount files that have colons in their path +Patch10: util-linux-2.12a-mount_mountpointwithcolon.patch +# 76198 - Default retransmit timeout is too small on NFS over TCP +Patch11: util-linux-2.13-mount_nfs_timeo.patch +# Basic NFSv4 support +Patch12: util-linux-2.12-mount_base_nfsv4.patch +# 80263 - UDP data corruption due to incorrect IP fragment reassembly +Patch13: util-linux-mount_warn_nfsudp.patch +# add ionice +Patch14: util-linux-2.12q-sys_utils_ionice.patch +# 104081 - make fdisk detect MAC-fs +Patch15: util-linux-2.11q-fdisk_fs_mac.patch +# 104405 - mount -a doesn't work with hotpluggable devices +Patch16: util-linux-mount_opt_hotplug.patch +Patch17: util-linux-2.12a-mount_mountbylabel-dm.patch +# 115129 - mount --move doesn't work as expected +Patch18: util-linux-2.12q-mount_--move.patch +Patch19: util-linux-2.12q-mount_strict_aliasing.patch +Patch20: util-linux-2.12r-mount_by_uuid.patch +Patch21: util-linux-2.12q-mount_umount2_not_static.patch +# 148409 - df, mount, /proc/mounts show root mounted twice +# TODO: Needs fix, because of 231599 +Patch22: util-linux-2.12r-mount_mtab_update.patch +# 153657 - fdisk is not able to manage huge disks +Patch23: util-linux-2.12r-fdisk_fdiskwrap.patch +# 158401 - cthon06: NFSv3 client does not support RPCSEC_GSS +Patch24: util-linux-2.12r-mount_rpcsec_gss.patch +# 176582 - If the user doesn't specify -t mount.fstype will never be called +#TODO: check alternative upstream fix +#Patch96: util-linux-2.12r-mount_external_prog_on_guess.patch +# 159368 - NFSv4: krb5p; nfs(5) manpage +Patch25: util-linux-2.12r-mount_sec_manpage.patch +# 158955 - document xfs dmapi mount options better +Patch26: util-linux-2.12r-mount_mount.8_xfs_update.patch +# use libvolume_id for fs guessing +Patch27: util-linux-mount_libvolume_id_support.patch +# 190385 - Added sysfs to list of filesystems not to unmount with umount -a +Patch28: util-linux-2.12r-mount_umount_nosysfs.patch +# 160822 - fix for 153657 +Patch29: util-linux-2.12r-fdisk_cyl.patch +# 179122 - Fix readprofile one ppc64 +Patch30: util-linux-2.12r-sys_utils_readprofile_mapfile.patch +# 203469 +Patch31: util-linux-2.12r-misc_utils_cal_formatting.patch +# 205956 - default swap to V1 in any case +Patch32: util-linux-2.12r-disk_utils_mkswap_fix.patch +# 130625 - do not append addr option with each nfs remount +Patch33: util-linux-2.12r-mount_nfs_remount_options.patch +# 238687 - let mkfs tools open block devices with O_EXCL +Patch34: util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch +# 241372 - remove legacy warnings from fdisk +Patch35: util-linux-2.12r-fdisk_remove_bogus_warnings.patch +# 242750 - mount: fix race condition when using -o loop +Patch36: util-linux-2.12r-mount_racy_loop.patch +Patch37: util-linux-2.13-misc_utils_add_man_scriptreplay.patch +# 254437 - swapon should automatically reset the suspend signature +Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch +Patch39: util-linux-2.13-tests_missing_include.patch +Patch40: util-linux-2.13-sys_utils_arch.patch +Patch41: util-linux-2.13-build_gnu_source.patch +Patch42: util-linux-2.13-build_fix_intel_check.patch +## +## adjtimex +## +Patch50: adjtimex-1.20-nosyscall.diff +## +## klogconsole +## +Patch55: klogconsole-quiet.patch +Patch56: klogconsole.diff +## +## time +## +Patch60: time-1.7.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed @@ -129,78 +156,62 @@ Authors: Adrian Bunk %prep -%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -b 16 -b 24 -%patch -p1 +%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -b 24 -n %name-ng-%version +%patch1 -p1 %patch2 -p1 -%patch3 -p0 +%patch3 -p1 +%patch4 -p1 +%patch5 -p0 +%patch6 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %patch10 -p1 %patch11 -p1 -%patch43 -cd adjtimex-* -%patch44 -p1 -cd - +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 %patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 +%patch19 -p1 +%patch20 -p1 +%patch21 +%patch22 %patch23 -p1 +%patch24 %patch25 -p1 -%patch26 -p0 -%patch46 -p1 -%patch51 -p1 -%patch52 -p0 -%patch58 -p1 -%patch61 -p1 -%patch62 -p1 -%patch64 -p1 -%patch70 -p1 -%patch71 -p1 -%patch72 -%patch74 -p1 -%patch75 -p1 -%patch76 -p1 -%patch77 -p1 -%patch78 -p1 -%patch79 -p1 -%patch81 -p1 -%patch83 -%patch84 -p1 -%patch85 -p1 -%patch86 -p1 -%patch88 -%patch90 -p1 -%patch91 -%patch92 -p1 -%patch93 -p1 -%patch94 -p1 -%patch95 -%patch96 -p1 -%patch97 -p1 -%patch98 -%patch99 -p0 -%patch100 -%patch101 -%patch102 -%patch103 -p1 -%patch104 -p1 -%patch105 -%patch106 -p1 -%patch107 -p1 -%patch108 -p1 -%patch109 -p1 -%patch110 -p1 -%patch111 -p1 -%patch112 -p1 -%patch113 -p1 -%patch114 -p1 +%patch26 +%patch27 -p1 +%patch28 +%patch29 -p1 +%patch30 -p1 +%patch31 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 +%patch36 -p1 +%patch37 -p1 +%patch38 -p1 +%patch39 -p1 +%patch40 -p1 +%patch41 -p1 +%patch42 -p1 +# +cd adjtimex-* +%patch50 -p1 +cd - # setctsid cp %{S:22} %{S:23} . -# nologin and guessfstype -cp %{S:2} %{S:3} %{S:8} %{S:15} %{S:20} %{S:21} %{S:26} %{S:30} . +# nologin +cp %{S:2} %{S:3} %{S:15} %{S:26} %{S:30} . cd ../klogconsole -%patch27 -p1 -b .quiet -%patch32 -p1 +%patch55 -p1 -b .quiet +%patch56 -p1 cd ../time-* -%patch40 +%patch60 %build # adjtimex build @@ -241,20 +252,30 @@ cd .. cd sm-notify* make CFLAGS="$RPM_OPT_FLAGS" cd .. -# schedutils build -cd schedutils-* -make CFLAGS="$RPM_OPT_FLAGS" popd # setctsid build rm -f setctsid -make setctsid OPT="$RPM_OPT_FLAGS" +make setctsid CFLAGS="$RPM_OPT_FLAGS" +# # util-linux itself +# %ifarch s390 s390x -export CFLAGS=-DCONFIG_SMP +CFLAGS=-DCONFIG_SMP %endif -export CFLAGS -./configure -make OPT="$RPM_OPT_FLAGS" +#autoreconf -fi +./autogen.sh +./configure --mandir=%{_mandir} \ + --datadir=%{_datadir} \ + --enable-elvtune \ + --enable-mesg \ + --enable-partx \ + --enable-raw \ + --enable-rdev \ + --enable-script \ + --enable-write \ + --disable-use-tty-group \ + CFLAGS="$CFLAGS $RPM_OPT_FLAGS" +make gcc $RPM_OPT_FLAGS -o nologin nologin.c gcc $RPM_OPT_FLAGS -o mkzimage_cmdline %{S:29} @@ -304,27 +325,19 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/nfs/sm.bak chmod 700 $RPM_BUILD_ROOT/var/lib/nfs/sm.bak touch $RPM_BUILD_ROOT/var/lib/nfs/state chmod 644 $RPM_BUILD_ROOT/var/lib/nfs/state -cd .. -# schedutils install -cd schedutils-* -make PREFIX=$RPM_BUILD_ROOT/usr \ - DOCDIR=$RPM_BUILD_ROOT%_docdir/schedutils \ - MANDIR=$RPM_BUILD_ROOT%_mandir install installdoc popd +# # util-linux install +# make DESTDIR=$RPM_BUILD_ROOT install mv $RPM_BUILD_ROOT/usr/bin/logger $RPM_BUILD_ROOT/bin/logger -install -m 644 mount/filesystems $RPM_BUILD_ROOT/etc/filesystems +install -m 644 %{SOURCE6} $RPM_BUILD_ROOT/etc/filesystems install -m 755 nologin $RPM_BUILD_ROOT/sbin %ifnarch ppc ppc64 install -m 755 mkzimage_cmdline $RPM_BUILD_ROOT/usr/bin install -m 644 %{S:28} $RPM_BUILD_ROOT%{_mandir}/man8 %endif -install -m 755 mount/guessfstype $RPM_BUILD_ROOT/bin install -m 644 nologin.8 $RPM_BUILD_ROOT%{_mandir}/man8 -install -m 755 disk-utils/raw $RPM_BUILD_ROOT/usr/sbin -install -m 644 disk-utils/raw.8 $RPM_BUILD_ROOT%{_mandir}/man8 -install -m 644 guessfstype.8 $RPM_BUILD_ROOT%{_mandir}/man8 # setctsid install install -m 755 setctsid $RPM_BUILD_ROOT/usr/sbin install -m 444 setctsid.8 $RPM_BUILD_ROOT%{_mandir}/man8/ @@ -336,15 +349,9 @@ install -m 644 $RPM_SOURCE_DIR/etc.raw $RPM_BUILD_ROOT/etc/raw install -m 755 $RPM_SOURCE_DIR/raw.init $RPM_BUILD_ROOT/etc/init.d/raw ln -sf ../../etc/init.d/raw $RPM_BUILD_ROOT/usr/sbin/rcraw # Stupid hack so we don't have a tcsh dependency -chmod 644 $RPM_BUILD_ROOT/usr/share/misc/getopt/* +#chmod 644 $RPM_BUILD_ROOT/usr/share/misc/getopt/* # Following files we don't want to package, so remove them -rm -f $RPM_BUILD_ROOT/bin/kill -rm -f $RPM_BUILD_ROOT/sbin/guessfstype # in /bin -rm -f $RPM_BUILD_ROOT/usr/bin/last -rm -f $RPM_BUILD_ROOT/usr/bin/raw rm -f $RPM_BUILD_ROOT/usr/bin/pg -rm -f $RPM_BUILD_ROOT/usr/share/man/man1/kill.1* -rm -f $RPM_BUILD_ROOT/usr/share/man/man1/last.1* rm -f $RPM_BUILD_ROOT/usr/share/man/man1/pg.1* %ifarch s390 s390x rm -f $RPM_BUILD_ROOT/etc/fdprm @@ -352,26 +359,14 @@ rm -f $RPM_BUILD_ROOT/usr/bin/cytune rm -f $RPM_BUILD_ROOT/usr/bin/fdformat rm -f $RPM_BUILD_ROOT/sbin/hwclock rm -f $RPM_BUILD_ROOT/usr/sbin/klogconsole -rm -f $RPM_BUILD_ROOT/usr/bin/setfdprm rm -f $RPM_BUILD_ROOT/usr/bin/setterm rm -f $RPM_BUILD_ROOT/usr/sbin/tunelp rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/cytune.8* rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/fdformat.8* rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/hwclock.8* rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/klogconsole.8* -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/setfdprm.8* rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/tunelp.8* %endif -%ifnarch %ix86 x86_64 -rm -f $RPM_BUILD_ROOT/usr/sbin/ramsize -rm -f $RPM_BUILD_ROOT/usr/sbin/rdev -rm -f $RPM_BUILD_ROOT/usr/sbin/rootflags -rm -f $RPM_BUILD_ROOT/usr/sbin/vidmode -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/ramsize.8* -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/rdev.8* -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/rootflags.8* -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/vidmode.8* -%endif %ifarch ia64 sparc rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/cfdisk.8* rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/sfdisk.8* @@ -413,17 +408,16 @@ fi %files # Common files for all archs %defattr(-,root,root) -%doc HISTORY INSTALL +%doc INSTALL %doc login-utils/README.getty %doc login-utils/README.modems-with-agetty %doc login-utils/README.poeigl %doc misc-utils/README.cal %doc misc-utils/README.namei -%doc misc-utils/README1.namei +%doc misc-utils/README.namei2 %doc mount/README.mount %doc hwclock/README.hwclock %doc text-utils/README.col -%doc README.loop-AES-v2.2d README.loop-AES-v2.2d.SuSE %doc README.largedisk %config %attr(744,root,root) /etc/init.d/raw %attr(755,root,root) /etc/init.d/nfsboot @@ -431,7 +425,6 @@ fi /usr/sbin/rcraw /bin/arch /bin/dmesg -/bin/guessfstype /bin/more /bin/mount /bin/umount @@ -449,9 +442,8 @@ fi /sbin/mkfs.cramfs /sbin/mkswap /sbin/nologin -/sbin/partx /sbin/pivot_root -/sbin/sln +/sbin/raw /sbin/sm-notify /sbin/swapoff /sbin/swapon @@ -491,18 +483,19 @@ fi /usr/bin/taskset /usr/bin/time /usr/bin/which +/usr/sbin/addpart +/usr/sbin/delpart /usr/sbin/freeramdisk +/usr/sbin/partx /usr/sbin/setctsid %verify(not mode) %attr(0755,root,tty) /usr/bin/wall /usr/bin/whereis /usr/sbin/adjtimex %verify(not mode) %attr(0755,root,tty) /usr/bin/write -%dir %{_defaultdocdir}/schedutils %dir %{_defaultdocdir}/time %dir %{_defaultdocdir}/which /var/lib/nfs %ghost /var/lib/nfs/state -%{_defaultdocdir}/schedutils/* %{_defaultdocdir}/time/* %{_defaultdocdir}/which/* %{_infodir}/ipc.info.gz @@ -535,6 +528,7 @@ fi %{_mandir}/man1/scriptreplay.1.gz %{_mandir}/man1/rev.1.gz %{_mandir}/man1/script.1.gz +%{_mandir}/man1/setterm.1.gz %{_mandir}/man1/tailf.1.gz %{_mandir}/man1/taskset.1.gz %{_mandir}/man1/ul.1.gz @@ -544,9 +538,10 @@ fi %{_mandir}/man1/which.1.gz %{_mandir}/man5/fstab.5.gz %{_mandir}/man5/nfs.5.gz +%{_mandir}/man8/addpart.8.gz %{_mandir}/man8/agetty.8.gz %{_mandir}/man8/blockdev.8.gz -%{_mandir}/man1/setterm.1.gz +%{_mandir}/man8/delpart.8.gz %{_mandir}/man8/elvtune.8* %{_mandir}/man8/ctrlaltdel.8.gz %{_mandir}/man8/adjtimex.8.gz @@ -565,26 +560,24 @@ fi %ifnarch ppc ppc64 %{_mandir}/man8/mkzimage_cmdline.8.gz %endif +%{_mandir}/man8/partx.8.gz %{_mandir}/man8/pivot_root.8.gz %{_mandir}/man8/raw.8.gz %{_mandir}/man8/renice.8.gz %{_mandir}/man8/setsid.8.gz -%{_mandir}/man8/sln.8.gz %{_mandir}/man8/sm-notify.8.gz %{_mandir}/man8/swapoff.8.gz %{_mandir}/man8/swapon.8.gz %{_mandir}/man8/umount.8.gz -%{_mandir}/man8/guessfstype.8.gz %{_mandir}/man8/setctsid.8.gz -/usr/sbin/raw /usr/sbin/flushb /usr/sbin/readprofile -%dir /usr/share/misc/getopt -%attr (755,root,root) /usr/share/misc/getopt/getopt-parse.bash -%attr (755,root,root) /usr/share/misc/getopt/getopt-parse.tcsh -%attr (755,root,root) /usr/share/misc/getopt/getopt-test.bash -%attr (755,root,root) /usr/share/misc/getopt/getopt-test.tcsh -/usr/share/locale/*/LC_MESSAGES/util-linux.mo +%dir /usr/share/getopt +%attr (755,root,root) /usr/share/getopt/getopt-parse.bash +%attr (755,root,root) /usr/share/getopt/getopt-parse.tcsh +%attr (755,root,root) /usr/share/getopt/getopt-test.bash +%attr (755,root,root) /usr/share/getopt/getopt-test.tcsh +/usr/share/locale/*/LC_MESSAGES/util-linux-ng.mo %ifnarch ia64 %doc fdisk/README.fdisk /sbin/fdisk @@ -608,23 +601,61 @@ fi %{_mandir}/man8/vidmode.8.gz %endif %ifnarch s390 s390x -%config(noreplace) /etc/fdprm +#%config(noreplace) /etc/fdprm /usr/bin/cytune /usr/bin/fdformat /sbin/hwclock /usr/sbin/klogconsole -/usr/bin/setfdprm /usr/bin/setterm /usr/sbin/tunelp %{_mandir}/man8/cytune.8.gz %{_mandir}/man8/fdformat.8.gz %{_mandir}/man8/hwclock.8.gz %{_mandir}/man8/klogconsole.8.gz -%{_mandir}/man8/setfdprm.8.gz %{_mandir}/man8/tunelp.8.gz %endif %changelog +* Tue Apr 10 2007 - mkoenig@suse.de +- update to version git20070330 of new forked development tree +- removed Suse crypto patches for losetup [FATE#302001] +- removed binaries: + /bin/guessfstype + /sbin/sln + /usr/bin/setfdprm +- removed obsolete patches: + * guessfstype2.patch + * loop-AES-v3.0a-util-linux-2.12p.diff + * mount-nfs-nonreserved + * stupid-programmer.diff + * util-linux-nodiratime.diff + * util-linux-2.12-multipleraw.diff + * util-linux-2.12-enablereplaybuild.diff + * util-linux-2.12-mount_guessfstype.diff + * util-linux-2.12h-mtablock.diff + * util-linux-2.12i-x86_64intel.diff + * util-linux-2.12q-null.diff + * util-linux-2.12r.diff + * util-linux-2.12r-fdisk_llseek.patch + * util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff + * util-linux-2.12r-mount_external_prog_on_guess.patch + * util-linux-2.12r-nonfsmountfallback.diff + * util-linux-2.12r-pagesize.patch + * util-linux-2.12r-partx_enable.patch + * util-linux-2.12r-partx_gpt_warning.patch +- add patches: + * util-linux-2.13-misc_utils_add_man_scriptreplay.patch + install man page for scriptreplay + * util-linux-2.13-tests_missing_include.patch + fix missing header in tests/mnt_test_sysinfo.c + * util-linux-2.13-sys_utils_arch.patch + keep /bin/arch + * util-linux-2.13-build_gnu_source.patch + build with _GNU_SOURCE + * util-linux-2.13-build_fix_intel_check.patch + detect also x86_64 as INTEL architecture +- rename patches to identify them clearly by subsystem +- schedutils now part of util-linux itself * Wed Apr 04 2007 - mkoenig@suse.de - add Supplements line [FATE#301966] * Mon Mar 26 2007 - rguenther@suse.de From 049ff3be536aa5577e2f49f24fbdd5ab023a3005e7a81b96c2fb400070afb3cc Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 16 Apr 2007 22:42:56 +0000 Subject: [PATCH 012/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=12 --- util-linux-2.12r-mount_racy_loop.patch | 3 ++- util-linux.changes | 6 ++++++ util-linux.spec | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/util-linux-2.12r-mount_racy_loop.patch b/util-linux-2.12r-mount_racy_loop.patch index 3e33e1c..803b3fb 100644 --- a/util-linux-2.12r-mount_racy_loop.patch +++ b/util-linux-2.12r-mount_racy_loop.patch @@ -24,7 +24,7 @@ Index: util-linux-ng-2.12r+git20070330/mount/mount.c =================================================================== --- util-linux-ng-2.12r+git20070330.orig/mount/mount.c +++ util-linux-ng-2.12r+git20070330/mount/mount.c -@@ -712,20 +712,33 @@ loop_check(const char **spec, const char +@@ -712,20 +712,34 @@ loop_check(const char **spec, const char printf(_("mount: skipping the setup of a loop device\n")); } else { int loopro = (*flags & MS_RDONLY); @@ -49,6 +49,7 @@ Index: util-linux-ng-2.12r+git20070330/mount/mount.c - return EX_FAIL; - } + printf(_("mount: going to use the loop device %s\n"), *loopdev); ++ offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0; + if (res = set_loop (*loopdev, *loopfile, offset, + opt_encryption, pfd, &loopro)) { + switch(res) { diff --git a/util-linux.changes b/util-linux.changes index 36d12d4..cb66e2f 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 16 17:20:16 CEST 2007 - mkoenig@suse.de + +- fix initialization of offset in + util-linux-2.12r-mount_racy_loop.patch [#264225] + ------------------------------------------------------------------- Tue Apr 10 17:25:34 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index fbc5ba7..612a7db 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on Version: 2.12r+git20070330 -Release: 1 +Release: 2 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source2: nologin.c @@ -616,6 +616,9 @@ fi %endif %changelog +* Mon Apr 16 2007 - mkoenig@suse.de +- fix initialization of offset in + util-linux-2.12r-mount_racy_loop.patch [#264225] * Tue Apr 10 2007 - mkoenig@suse.de - update to version git20070330 of new forked development tree - removed Suse crypto patches for losetup [FATE#302001] From 537c88be6697ed440878177bd106dc91a592e95e16b6b3ea2f3a9a2351bd6e87 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 23 Apr 2007 21:27:30 +0000 Subject: [PATCH 013/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=13 --- util-linux-2.12-misc_utils_hostid.patch | 18 +++---- util-linux-2.12r-mount_mtab_update.patch | 35 +++++--------- ...-linux-2.13-build_no_perl_dependency.patch | 48 +++++++++++++++++++ ...2.13-misc_utils_add_man_scriptreplay.patch | 13 ----- util-linux-2.13-tests_missing_include.patch | 12 ----- util-linux-ng-2.12r+git20070330.tar.bz2 | 3 -- util-linux-ng-2.12r+git20070412.tar.bz2 | 3 ++ util-linux.changes | 12 +++++ util-linux.spec | 27 ++++++----- 9 files changed, 100 insertions(+), 71 deletions(-) create mode 100644 util-linux-2.13-build_no_perl_dependency.patch delete mode 100644 util-linux-2.13-misc_utils_add_man_scriptreplay.patch delete mode 100644 util-linux-2.13-tests_missing_include.patch delete mode 100644 util-linux-ng-2.12r+git20070330.tar.bz2 create mode 100644 util-linux-ng-2.12r+git20070412.tar.bz2 diff --git a/util-linux-2.12-misc_utils_hostid.patch b/util-linux-2.12-misc_utils_hostid.patch index 170046d..84ac6fa 100644 --- a/util-linux-2.12-misc_utils_hostid.patch +++ b/util-linux-2.12-misc_utils_hostid.patch @@ -1,7 +1,7 @@ -Index: util-linux-ng-2.12r+git20070330/misc-utils/hostid.1 +Index: util-linux-ng-2.12r+git20070412/misc-utils/hostid.1 =================================================================== --- /dev/null -+++ util-linux-ng-2.12r+git20070330/misc-utils/hostid.1 ++++ util-linux-ng-2.12r+git20070412/misc-utils/hostid.1 @@ -0,0 +1,24 @@ +.TH hostid 1 +.SH NAME @@ -27,10 +27,10 @@ Index: util-linux-ng-2.12r+git20070330/misc-utils/hostid.1 +.SH SEE ALSO +gethostid(2), sethostid(2) + -Index: util-linux-ng-2.12r+git20070330/misc-utils/hostid.c +Index: util-linux-ng-2.12r+git20070412/misc-utils/hostid.c =================================================================== --- /dev/null -+++ util-linux-ng-2.12r+git20070330/misc-utils/hostid.c ++++ util-linux-ng-2.12r+git20070412/misc-utils/hostid.c @@ -0,0 +1,88 @@ +/* Program hostid. Changed on 7.10.1997 + New: - Hostid 0 is not permitted. @@ -120,10 +120,10 @@ Index: util-linux-ng-2.12r+git20070330/misc-utils/hostid.c + + return 0; +} -Index: util-linux-ng-2.12r+git20070330/misc-utils/Makefile.am +Index: util-linux-ng-2.12r+git20070412/misc-utils/Makefile.am =================================================================== ---- util-linux-ng-2.12r+git20070330.orig/misc-utils/Makefile.am -+++ util-linux-ng-2.12r+git20070330/misc-utils/Makefile.am +--- util-linux-ng-2.12r+git20070412.orig/misc-utils/Makefile.am ++++ util-linux-ng-2.12r+git20070412/misc-utils/Makefile.am @@ -9,7 +9,7 @@ EXTRA_DIST = README.* \ bin_PROGRAMS = @@ -137,8 +137,8 @@ Index: util-linux-ng-2.12r+git20070330/misc-utils/Makefile.am CLEANFILES = chkdupexe scriptreplay man_MANS = cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \ -- namei.1 script.1 whereis.1 -+ namei.1 script.1 whereis.1 hostid.1 +- namei.1 script.1 whereis.1 scriptreplay.1 ++ namei.1 script.1 whereis.1 scriptreplay.1 hostid.1 if HAVE_NCURSES cal_LDADD = -lncurses diff --git a/util-linux-2.12r-mount_mtab_update.patch b/util-linux-2.12r-mount_mtab_update.patch index 410e510..aa35f6c 100644 --- a/util-linux-2.12r-mount_mtab_update.patch +++ b/util-linux-2.12r-mount_mtab_update.patch @@ -2,30 +2,21 @@ Index: mount/mount.c =================================================================== --- mount/mount.c.orig +++ mount/mount.c -@@ -842,6 +842,7 @@ try_mount_one (const char *spec0, const - int mnt5_res = 0; /* only for gcc */ - int mnt_err; - int flags; -+ int isroot; - char *extra_opts; /* written in mtab */ - char *mount_opts; /* actually used on system call */ - const char *opts, *spec, *node, *types; -@@ -942,13 +943,17 @@ retry_nfs: +@@ -954,11 +954,16 @@ retry_nfs: + } + + if (fake || mnt5_res == 0) { ++ int isroot; ++ + /* Mount succeeded, report this (if verbose) and write mtab entry. */ if (loop) opt_loopdev = loopdev; -- update_mtab_entry(loop ? loopfile : spec, -+ isroot = (streq (node, "/") || streq (node, "root") || -+ streq (node, "rootfs")); -+ if (!isroot) { -+ update_mtab_entry(loop ? loopfile : spec, +- if (!(mounttype & MS_PROPAGATION)) { ++ isroot = (streq(node, "/") || streq(node, "root") || ++ streq(node, "rootfs")); ++ ++ if (!(mounttype & MS_PROPAGATION) && !isroot) { + update_mtab_entry(loop ? loopfile : spec, node, types ? types : "unknown", - fix_opts_string (flags & ~MS_NOMTAB, extra_opts, user), - flags, - freq, - pass); -+ } - - block_signals (SIG_UNBLOCK); - res = 0; diff --git a/util-linux-2.13-build_no_perl_dependency.patch b/util-linux-2.13-build_no_perl_dependency.patch new file mode 100644 index 0000000..763602f --- /dev/null +++ b/util-linux-2.13-build_no_perl_dependency.patch @@ -0,0 +1,48 @@ +Index: util-linux-ng-2.12r+git20070412/configure.ac +=================================================================== +--- util-linux-ng-2.12r+git20070412.orig/configure.ac ++++ util-linux-ng-2.12r+git20070412/configure.ac +@@ -244,6 +244,11 @@ AC_ARG_ENABLE([partx], + ) + AM_CONDITIONAL(BUILD_PARTX, test x$enable_partx = xyes) + ++AC_ARG_ENABLE([perl-scripts], ++ AC_HELP_STRING([--enable-perl-scripts], [install perl scripts (chkdupexe, scriptreplay)]), ++ enable_perl_scripts=$enableval, enable_perl_scripts=no ++) ++AM_CONDITIONAL(INSTALL_PERL_SCRIPTS, test x$enable_perl_scripts = xyes) + + AC_ARG_ENABLE([raw], + AC_HELP_STRING([--enable-raw], [build raw]), +Index: util-linux-ng-2.12r+git20070412/misc-utils/Makefile.am +=================================================================== +--- util-linux-ng-2.12r+git20070412.orig/misc-utils/Makefile.am ++++ util-linux-ng-2.12r+git20070412/misc-utils/Makefile.am +@@ -11,9 +11,16 @@ bin_PROGRAMS = + usrbinexec_PROGRAMS = cal ddate logger look mcookie \ + namei script whereis hostid + ++usrbinexec_SCRIPTS = ++ ++man_MANS = cal.1 ddate.1 logger.1 look.1 mcookie.1 \ ++ namei.1 script.1 whereis.1 hostid.1 ++ + mcookie_LDADD = $(top_srcdir)/lib/libmd5.a + ++if INSTALL_PERL_SCRIPTS + usrbinexec_SCRIPTS = chkdupexe scriptreplay ++man_MANS += chkdupexe.1 scriptreplay.1 + + chkdupexe: chkdupexe.pl + sed -e 's,[@]PERL[@],$(PERL),g' < chkdupexe.pl > chkdupexe +@@ -22,9 +29,7 @@ scriptreplay: scriptreplay.pl + sed -e 's,[@]PERL[@],$(PERL),g' < scriptreplay.pl > scriptreplay + + CLEANFILES = chkdupexe scriptreplay +- +-man_MANS = cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \ +- namei.1 script.1 whereis.1 scriptreplay.1 hostid.1 ++endif + + if HAVE_NCURSES + cal_LDADD = -lncurses diff --git a/util-linux-2.13-misc_utils_add_man_scriptreplay.patch b/util-linux-2.13-misc_utils_add_man_scriptreplay.patch deleted file mode 100644 index ba22200..0000000 --- a/util-linux-2.13-misc_utils_add_man_scriptreplay.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-ng-2.12r+git20070330/misc-utils/Makefile.am -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/misc-utils/Makefile.am -+++ util-linux-ng-2.12r+git20070330/misc-utils/Makefile.am -@@ -24,7 +24,7 @@ scriptreplay: scriptreplay.pl - CLEANFILES = chkdupexe scriptreplay - - man_MANS = cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \ -- namei.1 script.1 whereis.1 hostid.1 -+ namei.1 script.1 whereis.1 hostid.1 scriptreplay.1 - - if HAVE_NCURSES - cal_LDADD = -lncurses diff --git a/util-linux-2.13-tests_missing_include.patch b/util-linux-2.13-tests_missing_include.patch deleted file mode 100644 index ed9c233..0000000 --- a/util-linux-2.13-tests_missing_include.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: util-linux-ng-2.12r+git20070330/tests/helpers/mnt_test_sysinfo.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/tests/helpers/mnt_test_sysinfo.c -+++ util-linux-ng-2.12r+git20070330/tests/helpers/mnt_test_sysinfo.c -@@ -1,6 +1,7 @@ - - #include - #include -+#include - #include - - #include diff --git a/util-linux-ng-2.12r+git20070330.tar.bz2 b/util-linux-ng-2.12r+git20070330.tar.bz2 deleted file mode 100644 index a4e861a..0000000 --- a/util-linux-ng-2.12r+git20070330.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d072434a058eb2c3545194f13dc1914efc59c52b5f4d3e6f2a509ee52452778b -size 1518908 diff --git a/util-linux-ng-2.12r+git20070412.tar.bz2 b/util-linux-ng-2.12r+git20070412.tar.bz2 new file mode 100644 index 0000000..abf8a26 --- /dev/null +++ b/util-linux-ng-2.12r+git20070412.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24be49bdf51ff79df2f4289c2c72471aefd9e2a5473cac2c66893cbee612a040 +size 1521684 diff --git a/util-linux.changes b/util-linux.changes index cb66e2f..c3c9741 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon Apr 23 16:49:00 CEST 2007 - mkoenig@suse.de + +- update to git20070412 +- remove chkdupexe and scriptreplay to get rid of the + perl dependency [#265757] + util-linux-2.13-build_no_perl_dependency.patch +- upstream integration of umount helper support [#252089] +- merged patches: + util-linux-2.13-misc_utils_add_man_scriptreplay.patch + util-linux-2.13-tests_missing_include.patch + ------------------------------------------------------------------- Mon Apr 16 17:20:16 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 612a7db..3b96220 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.12r+git20070330) +# spec file for package util-linux (Version 2.12r+git20070412) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -20,8 +20,8 @@ PreReq: %install_info_prereq permissions License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on -Version: 2.12r+git20070330 -Release: 2 +Version: 2.12r+git20070412 +Release: 1 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source2: nologin.c @@ -121,13 +121,12 @@ Patch34: util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch Patch35: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # 242750 - mount: fix race condition when using -o loop Patch36: util-linux-2.12r-mount_racy_loop.patch -Patch37: util-linux-2.13-misc_utils_add_man_scriptreplay.patch # 254437 - swapon should automatically reset the suspend signature Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch -Patch39: util-linux-2.13-tests_missing_include.patch Patch40: util-linux-2.13-sys_utils_arch.patch Patch41: util-linux-2.13-build_gnu_source.patch Patch42: util-linux-2.13-build_fix_intel_check.patch +Patch43: util-linux-2.13-build_no_perl_dependency.patch ## ## adjtimex ## @@ -193,12 +192,11 @@ Authors: %patch34 -p1 %patch35 -p1 %patch36 -p1 -%patch37 -p1 %patch38 -p1 -%patch39 -p1 %patch40 -p1 %patch41 -p1 %patch42 -p1 +%patch43 -p1 # cd adjtimex-* %patch50 -p1 @@ -271,7 +269,7 @@ CFLAGS=-DCONFIG_SMP --enable-partx \ --enable-raw \ --enable-rdev \ - --enable-script \ + --enable-perl-scripts=no \ --enable-write \ --disable-use-tty-group \ CFLAGS="$CFLAGS $RPM_OPT_FLAGS" @@ -449,7 +447,6 @@ fi /sbin/swapon /bin/logger /usr/bin/cal -/usr/bin/chkdupexe /usr/bin/chrt /usr/bin/col /usr/bin/colcrt @@ -474,7 +471,6 @@ fi /usr/bin/namei /usr/bin/rename /usr/bin/renice -/usr/bin/scriptreplay /usr/bin/rev /usr/bin/script /usr/bin/setsid @@ -504,7 +500,6 @@ fi %{_infodir}/which.info*.gz %{_mandir}/man1/arch.1.gz %{_mandir}/man1/cal.1.gz -%{_mandir}/man1/chkdupexe.1.gz %{_mandir}/man1/chrt.1.gz %{_mandir}/man1/col.1.gz %{_mandir}/man1/colcrt.1.gz @@ -525,7 +520,6 @@ fi %{_mandir}/man1/ionice.1.gz %{_mandir}/man1/readprofile.1.gz %{_mandir}/man1/rename.1.gz -%{_mandir}/man1/scriptreplay.1.gz %{_mandir}/man1/rev.1.gz %{_mandir}/man1/script.1.gz %{_mandir}/man1/setterm.1.gz @@ -616,6 +610,15 @@ fi %endif %changelog +* Mon Apr 23 2007 - mkoenig@suse.de +- update to git20070412 +- remove chkdupexe and scriptreplay to get rid of the + perl dependency [#265757] + util-linux-2.13-build_no_perl_dependency.patch +- upstream integration of umount helper support [#252089] +- merged patches: + util-linux-2.13-misc_utils_add_man_scriptreplay.patch + util-linux-2.13-tests_missing_include.patch * Mon Apr 16 2007 - mkoenig@suse.de - fix initialization of offset in util-linux-2.12r-mount_racy_loop.patch [#264225] From 47398c4f87bc7346c01e9c8250809bfd2933d3997094de8adbb86b602d9c8ed7 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 4 Jun 2007 23:15:28 +0000 Subject: [PATCH 014/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=14 --- util-linux.changes | 5 +++++ util-linux.spec | 12 ++++++++++-- which-lib64.patch | 18 ++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 which-lib64.patch diff --git a/util-linux.changes b/util-linux.changes index c3c9741..fcab688 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 4 17:06:47 CEST 2007 - pth@suse.de + +- Make configure of which search for static libs in lib64 subdirs. + ------------------------------------------------------------------- Mon Apr 23 16:49:00 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 3b96220..fce20bd 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on Version: 2.12r+git20070412 -Release: 1 +Release: 13 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source2: nologin.c @@ -140,6 +140,10 @@ Patch56: klogconsole.diff ## time ## Patch60: time-1.7.dif +## +## which +## +Patch70: which-lib64.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed @@ -152,7 +156,7 @@ mount program, the fdisk configuration tool, and more. Authors: -------- - Adrian Bunk + Karel Zak %prep %setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -b 24 -n %name-ng-%version @@ -210,6 +214,8 @@ cd ../klogconsole %patch56 -p1 cd ../time-* %patch60 +cd ../which-* +%patch70 %build # adjtimex build @@ -610,6 +616,8 @@ fi %endif %changelog +* Mon Jun 04 2007 - pth@suse.de +- Make configure of which search for static libs in lib64 subdirs. * Mon Apr 23 2007 - mkoenig@suse.de - update to git20070412 - remove chkdupexe and scriptreplay to get rid of the diff --git a/which-lib64.patch b/which-lib64.patch new file mode 100644 index 0000000..6c3bf2f --- /dev/null +++ b/which-lib64.patch @@ -0,0 +1,18 @@ +--- acinclude.m4 ++++ acinclude.m4 +@@ -10,10 +10,13 @@ + dnl may have different results. + ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` + AC_CACHE_VAL(ac_cv_lib_static_$ac_lib_var, ++if test ! -z `grep 64 $libdir; then ++ libsuffix=64 ++fi + if test -r /etc/ld.so.conf ; then +- ld_so_paths="/lib /usr/lib `cat /etc/ld.so.conf`" ++ ld_so_paths="/lib${libsuffix} /usr/lib${libsuffix} `cat /etc/ld.so.conf`" + else +- ld_so_paths="/lib /usr/lib" ++ ld_so_paths="/lib${libsuffix} /usr/lib${libsuffix}" + fi + for path in $ld_so_paths; do + [ac_save_LIBS="$LIBS" From 5cef2c38f21ccee022a4818da644a2f34bd16cb17b90b10ce6ec6aaeb68739af Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 5 Jun 2007 14:42:12 +0000 Subject: [PATCH 015/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=15 --- util-linux.changes | 10 ++++++++++ util-linux.spec | 14 ++++++++++++-- which-2.13.tar.gz | 3 --- which-2.16.tar.gz | 3 +++ which-lib64.patch | 17 ++++++++++++++--- 5 files changed, 39 insertions(+), 8 deletions(-) delete mode 100644 which-2.13.tar.gz create mode 100644 which-2.16.tar.gz diff --git a/util-linux.changes b/util-linux.changes index fcab688..b89b8c7 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Jun 5 14:34:49 CEST 2007 - pth@suse.de + +- Update to which-2.16, mainly because regenerating configure + with newer autotools works. +- Fix the patch for AC_CHECK_STATICLIB +- Our distribution doesn't install libiberty.a, so pass + --disable-iberty to configure of which to not use a libiberty from + somewhere else. + ------------------------------------------------------------------- Mon Jun 4 17:06:47 CEST 2007 - pth@suse.de diff --git a/util-linux.spec b/util-linux.spec index fce20bd..7656993 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on Version: 2.12r+git20070412 -Release: 13 +Release: 14 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source2: nologin.c @@ -30,7 +30,7 @@ Source4: raw.init Source5: etc.raw Source6: etc_filesystems %define time_ver 1.7 -%define which_ver 2.13 +%define which_ver 2.16 %define adjtimex_ver 1.20 Source9: adjtimex-%{adjtimex_ver}.tar.bz2 Source10: freeramdisk.tar.bz2 @@ -216,6 +216,7 @@ cd ../time-* %patch60 cd ../which-* %patch70 +autoreconf -fi %build # adjtimex build @@ -234,6 +235,8 @@ cd which-%{which_ver} CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ + --libdir=%{_libdir} \ + --disable-iberty \ %{_target_cpu}-suse-linux make cd .. @@ -616,6 +619,13 @@ fi %endif %changelog +* Tue Jun 05 2007 - pth@suse.de +- Update to which-2.16, mainly because regenerating configure + with newer autotools works. +- Fix the patch for AC_CHECK_STATICLIB +- Our distribution doesn't install libiberty.a, so pass + --disable-iberty to configure of which to not use a libiberty from + somewhere else. * Mon Jun 04 2007 - pth@suse.de - Make configure of which search for static libs in lib64 subdirs. * Mon Apr 23 2007 - mkoenig@suse.de diff --git a/which-2.13.tar.gz b/which-2.13.tar.gz deleted file mode 100644 index 7d80d61..0000000 --- a/which-2.13.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c6763cd994fcc825dbd420495af5b9e16f455a353ebbd15f502a49943c581045 -size 106270 diff --git a/which-2.16.tar.gz b/which-2.16.tar.gz new file mode 100644 index 0000000..7093c93 --- /dev/null +++ b/which-2.16.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ac8502e9985a3ac6b0e2aa4f2a60f91cad0dc0cca6dc9c1c142ebba4b8dd664 +size 125696 diff --git a/which-lib64.patch b/which-lib64.patch index 6c3bf2f..278aab6 100644 --- a/which-lib64.patch +++ b/which-lib64.patch @@ -1,11 +1,22 @@ --- acinclude.m4 +++ acinclude.m4 -@@ -10,10 +10,13 @@ +@@ -3,7 +3,7 @@ + dnl Like AC_CHECK_LIB but looking for static libraries. + dnl LIBRARY must be of the form libxxx.a. + dnl The current language must be C (AC_LANG_C). +-AC_DEFUN(AC_CHECK_STATICLIB, ++AC_DEFUN([AC_CHECK_STATICLIB], + [AC_MSG_CHECKING([for $2 in $1]) + dnl Use a cache variable name containing both the library and function name, + dnl because the test really is for library $1 defining function $2, not +@@ -11,10 +11,15 @@ dnl may have different results. ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` AC_CACHE_VAL(ac_cv_lib_static_$ac_lib_var, -+if test ! -z `grep 64 $libdir; then -+ libsuffix=64 ++if test "$libdir" != "${exec_prefix}/lib"; then ++ if test ! -z `grep 64 $libdir`&& test ; then ++ libsuffix=64 ++ fi +fi if test -r /etc/ld.so.conf ; then - ld_so_paths="/lib /usr/lib `cat /etc/ld.so.conf`" From 9fd24d0c4de1102afa372d92537d7e7129af8458e58b6be9ad764176a35216eb Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 5 Jun 2007 18:09:38 +0000 Subject: [PATCH 016/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=16 --- nfsboot | 50 - renice.8 | 136 - sm-notify-20060111.tar.bz2 | 3 - util-linux-2.11u-mount_nfs_mount_acl.patch | 93 - util-linux-2.12-mount_base_nfsv4.patch | 859 ---- util-linux-2.12-mount_mountfallback.patch | 36 - util-linux-2.12-mount_nfs_tcp.patch | 65 - util-linux-2.12a-mount_mountbylabel-dm.patch | 65 - ...inux-2.12a-mount_mountpointwithcolon.patch | 2 +- util-linux-2.12q-mount_strict_aliasing.patch | 28 - util-linux-2.12q-sys_utils_ionice.patch | 24 +- ...inux-2.12r-mount_nfs_remount_options.patch | 20 - util-linux-2.12r-mount_rpcsec_gss.patch | 116 - util-linux-2.12r-mount_sec_manpage.patch | 51 - ...-2.12r-mount_swapon_swsuspend_resume.patch | 40 - util-linux-2.12r-mount_umount_nosysfs.patch | 15 - util-linux-2.13-mount_nfs_timeo.patch | 13 - util-linux-2.13-mount_volume_id.patch | 3574 +++++++++++++++++ util-linux-2.13-sys_utils_arch.patch | 18 +- util-linux-mount_libvolume_id_support.patch | 483 --- util-linux-mount_nfs.8.patch | 11 - util-linux-mount_warn_nfsudp.patch | 120 - util-linux-ng-2.12r+git20070412.tar.bz2 | 3 - util-linux-ng-2.12r+git20070509.tar.bz2 | 3 + util-linux.changes | 22 +- util-linux.spec | 114 +- 26 files changed, 3652 insertions(+), 2312 deletions(-) delete mode 100644 nfsboot delete mode 100644 renice.8 delete mode 100644 sm-notify-20060111.tar.bz2 delete mode 100644 util-linux-2.11u-mount_nfs_mount_acl.patch delete mode 100644 util-linux-2.12-mount_base_nfsv4.patch delete mode 100644 util-linux-2.12-mount_mountfallback.patch delete mode 100644 util-linux-2.12-mount_nfs_tcp.patch delete mode 100644 util-linux-2.12a-mount_mountbylabel-dm.patch delete mode 100644 util-linux-2.12q-mount_strict_aliasing.patch delete mode 100644 util-linux-2.12r-mount_nfs_remount_options.patch delete mode 100644 util-linux-2.12r-mount_rpcsec_gss.patch delete mode 100644 util-linux-2.12r-mount_sec_manpage.patch delete mode 100644 util-linux-2.12r-mount_umount_nosysfs.patch delete mode 100644 util-linux-2.13-mount_nfs_timeo.patch create mode 100644 util-linux-2.13-mount_volume_id.patch delete mode 100644 util-linux-mount_libvolume_id_support.patch delete mode 100644 util-linux-mount_nfs.8.patch delete mode 100644 util-linux-mount_warn_nfsudp.patch delete mode 100644 util-linux-ng-2.12r+git20070412.tar.bz2 create mode 100644 util-linux-ng-2.12r+git20070509.tar.bz2 diff --git a/nfsboot b/nfsboot deleted file mode 100644 index 62e284e..0000000 --- a/nfsboot +++ /dev/null @@ -1,50 +0,0 @@ -#! /bin/sh -# Copyright (c) 2004 SuSE AG, Nuernberg, Germany. All rights reserved. -# -# Author: Mads Martin Joergensen -# -# /etc/init.d/nfsboot -# -# System startup script for service(s) needed with NFS -# -### BEGIN INIT INFO -# Provides: nfsboot -# Required-Start: $network $portmap -# Required-Stop: -# Default-Start: 3 5 -# Default-Stop: -# Description: Service(s) needed with NFS -### END INIT INFO - -SMNOTIFYBIN=/sbin/sm-notify -OPTIONS=" -q" -test -x $SMNOTIFYBIN || exit 5 - -. /etc/rc.status - -rc_reset - -case "$1" in - # It's a one shot binary notifying clients, so the below is - # ok in this special case. - start|restart|try-restart|reload|force-reload) - echo -n "Starting nfsboot (`/bin/basename $SMNOTIFYBIN`) " - $SMNOTIFYBIN $OPTIONS - rc_status -v - ;; - stop) - # we had rc_reset above, so we return 0 anyway - ;; - status) - # sm-notify is not a daemon, but a one-shot binary - # nothing to be checked, status is unknown - rc_failed 4 - rc_status -v - ;; - *) - echo "Usage: $0 {start|stop|restart|try-restart|reload|force-reload|status}" - exit 1 - ;; -esac -rc_exit - diff --git a/renice.8 b/renice.8 deleted file mode 100644 index 1aab359..0000000 --- a/renice.8 +++ /dev/null @@ -1,136 +0,0 @@ -.\" Copyright (c) 1983, 1991, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)renice.8 8.1 (Berkeley) 6/9/93 -.\" -.Dd June 9, 1993 -.Dt RENICE 8 -.Os BSD 4 -.Sh NAME -.Nm renice -.Nd alter priority of running processes -.Sh SYNOPSIS -.Nm renice -.Ar priority -.Oo -.Op Fl p -.Ar pid ... -.Oc -.Oo -.Op Fl g -.Ar pgrp ... -.Oc -.Oo -.Op Fl u -.Ar user ... -.Oc -.Sh DESCRIPTION -.Nm Renice -alters the -scheduling priority of one or more running processes. -The following -.Ar who -parameters are interpreted as process ID's, process group -ID's, or user names. -.Nm Renice Ns 'ing -a process group causes all processes in the process group -to have their scheduling priority altered. -.Nm Renice Ns 'ing -a user causes all processes owned by the user to have -their scheduling priority altered. -By default, the processes to be affected are specified by -their process ID's. -.Pp -Options supported by -.Nm renice : -.Bl -tag -width Ds -.It Fl g -Force -.Ar who -parameters to be interpreted as process group ID's. -.It Fl u -Force the -.Ar who -parameters to be interpreted as user names. -.It Fl p -Resets the -.Ar who -interpretation to be (the default) process ID's. -.El -.Pp -For example, -.Bd -literal -offset -renice +1 987 -u daemon root -p 32 -.Ed -.Pp -would change the priority of process ID's 987 and 32, and -all processes owned by users daemon and root. -.Pp -Users other than the super-user may only alter the priority of -processes they own, -and can only monotonically increase their ``nice value'' -within the range 0 to -.Dv PRIO_MAX -(20). -(This prevents overriding administrative fiats.) -The super-user -may alter the priority of any process -and set the priority to any value in the range -.Dv PRIO_MIN -(\-20) -to -.Dv PRIO_MAX . -Useful priorities are: -20 (the affected processes will run only when nothing else -in the system wants to), -0 (the ``base'' scheduling priority), -anything negative (to make things go very fast). -.Sh FILES -.Bl -tag -width /etc/passwd -compact -.It Pa /etc/passwd -to map user names to user ID's -.El -.Sh SEE ALSO -.Xr getpriority 2 , -.Xr setpriority 2 -.Sh BUGS -Non super-users can not increase scheduling priorities of their own processes, -even if they were the ones that decreased the priorities in the first place. -.br -The Linux kernel (at least version 2.0.0) and linux libc (at least -version 5.2.18) does not agree entirely on what the specifics of the -systemcall interface to set nice values is. Thus causes renice to -report bogus previous nice values. -.Sh HISTORY -The -.Nm -command appeared in -.Bx 4.0 . diff --git a/sm-notify-20060111.tar.bz2 b/sm-notify-20060111.tar.bz2 deleted file mode 100644 index e5cf4a7..0000000 --- a/sm-notify-20060111.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ffe524be61389246a7ebb71832bf3f750834dbf8e5a38d4cc1548e267a8fb853 -size 5843 diff --git a/util-linux-2.11u-mount_nfs_mount_acl.patch b/util-linux-2.11u-mount_nfs_mount_acl.patch deleted file mode 100644 index 83a4cca..0000000 --- a/util-linux-2.11u-mount_nfs_mount_acl.patch +++ /dev/null @@ -1,93 +0,0 @@ -Adds the [no]acl NFS mount option that was added to the kernel. This -change has been discussed and accepted by Trond Myklebust - and Olaf Kirch . - - -- Andreas Gruenbacher - -================================================================================ -Index: util-linux-ng-2.12r+2.13pre7/mount/mount.8 -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/mount/mount.8 -+++ util-linux-ng-2.12r+2.13pre7/mount/mount.8 -@@ -1335,7 +1335,8 @@ are recognized: - .BR ac , - .BR tcp , - .BR udp , --.BR lock . -+.BR lock , -+.BR acl . - For details, see - .BR nfs (5). - -Index: util-linux-ng-2.12r+2.13pre7/mount/nfs.5 -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/mount/nfs.5 -+++ util-linux-ng-2.12r+2.13pre7/mount/nfs.5 -@@ -204,6 +204,15 @@ default UDP protocol. Many NFS servers - .I udp - Mount the NFS filesystem using the UDP protocol. This - is the default. -+.TP 1.5i -+.I noacl -+Assume no extended access control mechanisms like POSIX ACLs are used -+on the NFS filesystem, and depend on the file mode permission bits -+instead of using the ACCESS remote procedure call. The default is to -+use the ACCESS remote procedure call for making access decisions in -+NFS version 3. (On NFS version 2 filesystems this option has no effect.) -+This option also deactivates the GETACL and SETACL remote procedure calls -+which are otherwise used to manipulate ACLs. - .P - All of the non-value options have corresponding nooption forms. - For example, nointr means don't allow file operations to be -Index: util-linux-ng-2.12r+2.13pre7/mount/nfs_mount4.h -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/mount/nfs_mount4.h -+++ util-linux-ng-2.12r+2.13pre7/mount/nfs_mount4.h -@@ -51,4 +51,4 @@ struct nfs_mount_data { - #define NFS_MOUNT_KERBEROS 0x0100 /* 3 */ - #define NFS_MOUNT_NONLM 0x0200 /* 3 */ - #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */ -- -+#define NFS_MOUNT_NOACL 0x0800 /* 4 */ -Index: util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/mount/nfsmount.c -+++ util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c -@@ -214,7 +214,7 @@ int nfsmount(const char *spec, const cha - struct stat statbuf; - char *s; - int port, mountport, proto, bg, soft, intr; -- int posix, nocto, noac, nolock, broken_suid; -+ int posix, nocto, noac, nolock, broken_suid, noacl; - int retry, tcp; - int mountprog, mountvers, nfsprog, nfsvers; - int retval; -@@ -314,6 +314,7 @@ int nfsmount(const char *spec, const cha - nocto = 0; - nolock = 0; - broken_suid = 0; -+ noacl = 0; - noac = 0; - retry = 10000; /* 10000 minutes ~ 1 week */ - tcp = 0; -@@ -425,6 +426,8 @@ int nfsmount(const char *spec, const cha - printf(_("Warning: option nolock is not supported.\n")); - } else if (!strcmp(opt, "broken_suid")) { - broken_suid = val; -+ } else if (!strcmp(opt, "acl")) { -+ noacl = !val; - } else { - if (!sloppy) { - printf(_("unknown nfs mount option: " -@@ -450,8 +453,10 @@ int nfsmount(const char *spec, const cha - data.flags |= (nolock ? NFS_MOUNT_NONLM : 0); - #endif - #if NFS_MOUNT_VERSION >= 4 -- if (nfs_mount_version >= 4) -+ if (nfs_mount_version >= 4) { - data.flags |= (broken_suid ? NFS_MOUNT_BROKEN_SUID : 0); -+ data.flags |= (noacl ? NFS_MOUNT_NOACL : 0); -+ } - #endif - if (nfsvers > MAX_NFSPROT) { - fprintf(stderr, "NFSv%d not supported!\n", nfsvers); diff --git a/util-linux-2.12-mount_base_nfsv4.patch b/util-linux-2.12-mount_base_nfsv4.patch deleted file mode 100644 index ead5f2f..0000000 --- a/util-linux-2.12-mount_base_nfsv4.patch +++ /dev/null @@ -1,859 +0,0 @@ - -Add basic nfsv4 support - ---- - - util-linux-2.12-bfields/mount/Makefile | 2 - util-linux-2.12-bfields/mount/fstab.5 | 1 - util-linux-2.12-bfields/mount/mount.8 | 75 ++++++ - util-linux-2.12-bfields/mount/mount.c | 13 + - util-linux-2.12-bfields/mount/nfs.5 | 200 +++++++++++++++++ - util-linux-2.12-bfields/mount/nfs4_mount.h | 82 +++++++ - util-linux-2.12-bfields/mount/nfs4mount.c | 335 +++++++++++++++++++++++++++++ - util-linux-2.12-bfields/mount/nfsmount.c | 5 - util-linux-2.12-bfields/mount/sundries.h | 2 - util-linux-2.12-bfields/mount/umount.c | 3 - 10 files changed, 710 insertions(+), 8 deletions(-) - -Index: util-linux-ng-2.12r+git20070330/mount/fstab.5 -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/fstab.5 -+++ util-linux-ng-2.12r+git20070330/mount/fstab.5 -@@ -115,6 +115,7 @@ of filesystem types, such as - .IR msdos , - .IR ncpfs , - .IR nfs , -+.IR nfs4 , - .IR ntfs , - .IR proc , - .IR qnx4 , -Index: util-linux-ng-2.12r+git20070330/mount/mount.8 -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/mount.8 -+++ util-linux-ng-2.12r+git20070330/mount/mount.8 -@@ -385,6 +385,7 @@ currently supported include: - .IR msdos , - .IR ncpfs , - .IR nfs , -+.IR nfs4 , - .IR ntfs , - .IR proc , - .IR qnx4 , -@@ -422,7 +423,7 @@ For most types all the - program has to do is issue a simple - .IR mount (2) - system call, and no detailed knowledge of the filesystem type is required. --For a few types however (like nfs, cifs, smbfs, ncpfs) ad hoc code is -+For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) ad hoc code is - necessary. The nfs ad hoc code is built in, but cifs, smbfs, and ncpfs - have a separate mount program. In order to make it possible to - treat all types in a uniform way, mount will execute the program -@@ -450,9 +451,10 @@ or, if that does not exist, - All of the filesystem types listed there will be tried, - except for those that are labeled "nodev" (e.g., - .IR devpts , --.I proc -+.IR proc , -+.IR nfs , - and --.IR nfs ). -+.IR nfs4 ). - If - .I /etc/filesystems - ends in a line with a single * only, mount will read -@@ -1380,6 +1382,73 @@ Usually it just causes lots of trouble. - .B nolock - Do not use locking. Do not start lockd. - -+.SH "Mount options for nfs4" -+Instead of a textual option string, parsed by the kernel, the -+.I nfs4 -+file system expects a binary argument of type -+.IR "struct nfs4_mount_data" . -+The program -+.B mount -+itself parses the following options of the form `tag=value', -+and puts them in the structure mentioned: -+.BI rsize= n, -+.BI wsize= n, -+.BI timeo= n, -+.BI retrans= n, -+.BI acregmin= n, -+.BI acregmax= n, -+.BI acdirmin= n, -+.BI acdirmax= n, -+.BI actimeo= n, -+.BI retry= n, -+.BI port= n, -+.BI proto= n, -+.BI clientaddr= n, -+.BI sec= n. -+The option -+.BI addr= n -+is accepted but ignored. -+Also the following Boolean options, possibly preceded by -+.B no -+are recognized: -+.BR bg , -+.BR fg , -+.BR soft , -+.BR hard , -+.BR intr , -+.BR cto , -+.BR ac , -+For details, see -+.BR nfs (5). -+ -+Especially useful options include -+.TP -+.B rsize=32768,wsize=32768 -+This will make your NFS connection faster than with the default -+buffer size of 4096. -+.TP -+.B hard -+The program accessing a file on a NFS mounted file system will hang -+when the server crashes. The process cannot be interrupted or -+killed unless you also specify -+.BR intr . -+When the NFS server is back online the program will continue undisturbed -+from where it was. This is probably what you want. -+.TP -+.B soft -+This option allows the kernel to time out if the NFS server is not -+responding for some time. The time can be -+specified with -+.BR timeo=time . -+This timeout value is expressed in tenths of a second. -+The -+.BR soft -+option might be useful if your NFS server sometimes doesn't respond -+or will be rebooted while some process tries to get a file from the server. -+Avoid using this option with -+.BR proto=udp -+or with a short timeout. -+ - .SH "Mount options for ntfs" - .TP - .BI iocharset= name -Index: util-linux-ng-2.12r+git20070330/mount/mount.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/mount.c -+++ util-linux-ng-2.12r+git20070330/mount/mount.c -@@ -860,6 +860,19 @@ try_mount_one (const char *spec0, const - if (res) - goto out; - } -+#ifdef HAVE_NFS -+ /* -+ * NFSv4 support -+ */ -+ if (!fake && types && streq (types, "nfs4")) { -+ mnt_err = nfs4mount(spec, node, &flags, &extra_opts, &mount_opts, bg); -+ if (mnt_err) -+ return mnt_err; -+#else -+ die (EX_SOFTWARE, _("mount: this version was compiled " -+ "without support for the type `nfs4'")); -+#endif -+ } - - /* - * Call mount.TYPE for types that require a separate mount program. -Index: util-linux-ng-2.12r+git20070330/mount/nfs4mount.c -=================================================================== ---- /dev/null -+++ util-linux-ng-2.12r+git20070330/mount/nfs4mount.c -@@ -0,0 +1,335 @@ -+/* -+ * nfs4mount.c -- Linux NFS mount -+ * Copyright (C) 2002 Trond Myklebust -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Note: this file based on the original nfsmount.c -+ */ -+ -+#include "../config.h" -+ -+#include -+#include -+#undef __FD_CLR -+#undef __FD_SET -+#undef __FD_ISSET -+#undef __FD_ZERO -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "sundries.h" -+ -+#include "mount_constants.h" -+#include "nfs4_mount.h" -+ -+#include "nls.h" -+ -+#ifndef NFS_PORT -+#define NFS_PORT 2049 -+#endif -+ -+static int parse_devname(char *hostdir, char **hostname, char **dirname) -+{ -+ char *s; -+ -+ if (!(s = strchr(hostdir, ':'))) { -+ fprintf(stderr, -+ _("mount: " -+ "directory to mount not in host:dir format\n")); -+ return -1; -+ } -+ *hostname = hostdir; -+ *dirname = s + 1; -+ *s = '\0'; -+ /* Ignore all but first hostname in replicated mounts -+ until they can be fully supported. (mack@sgi.com) */ -+ if ((s = strchr(hostdir, ','))) { -+ *s = '\0'; -+ fprintf(stderr, -+ _("mount: warning: " -+ "multiple hostnames not supported\n")); -+ } -+ return 0; -+} -+ -+static int fill_ipv4_sockaddr(const char *hostname, struct sockaddr_in *addr) -+{ -+ struct hostent *hp; -+ addr->sin_family = AF_INET; -+ -+ if (inet_aton(hostname, &addr->sin_addr)) -+ return 0; -+ if ((hp = gethostbyname(hostname)) == NULL) { -+ fprintf(stderr, _("mount: can't get address for %s\n"), -+ hostname); -+ return -1; -+ } -+ if (hp->h_length > sizeof(struct in_addr)) { -+ fprintf(stderr, -+ _("mount: got bad hp->h_length\n")); -+ hp->h_length = sizeof(struct in_addr); -+ } -+ memcpy(&addr->sin_addr, hp->h_addr, hp->h_length); -+ return 0; -+} -+ -+static int get_my_ipv4addr(char *ip_addr, int len) -+{ -+ char myname[1024]; -+ struct sockaddr_in myaddr; -+ -+ if (gethostname(myname, sizeof(myname))) { -+ fprintf(stderr, _("mount: can't determine client address\n")); -+ return -1; -+ } -+ if (fill_ipv4_sockaddr(myname, &myaddr)) -+ return -1; -+ snprintf(ip_addr, len, "%s", inet_ntoa(myaddr.sin_addr)); -+ ip_addr[len-1] = '\0'; -+ return 0; -+} -+ -+int nfs4mount(const char *spec, const char *node, int *flags, -+ char **extra_opts, char **mount_opts, -+ int running_bg) -+{ -+ static struct nfs4_mount_data data; -+ static char hostdir[1024]; -+ static char ip_addr[16] = "127.0.0.1"; -+ static struct sockaddr_in server_addr; -+ static int pseudoflavour = 0; -+ -+ char *hostname, *dirname, *old_opts; -+ char new_opts[1024]; -+ char *opt, *opteq; -+ char *s; -+ int val; -+ int bg, soft, intr; -+ int nocto, noac; -+ int retry; -+ int retval; -+ -+ retval = EX_FAIL; -+ if (strlen(spec) >= sizeof(hostdir)) { -+ fprintf(stderr, _("mount: " -+ "excessively long host:dir argument\n")); -+ goto fail; -+ } -+ strcpy(hostdir, spec); -+ if (parse_devname(hostdir, &hostname, &dirname)) -+ goto fail; -+ -+ if (fill_ipv4_sockaddr(hostname, &server_addr)) -+ goto fail; -+ if (get_my_ipv4addr(ip_addr, sizeof(ip_addr))) -+ goto fail; -+ -+ /* add IP address to mtab options for use when unmounting */ -+ s = inet_ntoa(server_addr.sin_addr); -+ old_opts = *extra_opts; -+ if (!old_opts) -+ old_opts = ""; -+ if (strlen(old_opts) + strlen(s) + 10 >= sizeof(new_opts)) { -+ fprintf(stderr, _("mount: " -+ "excessively long option argument\n")); -+ goto fail; -+ } -+ snprintf(new_opts, sizeof(new_opts), "%s%saddr=%s", -+ old_opts, *old_opts ? "," : "", s); -+ *extra_opts = xstrdup(new_opts); -+ -+ /* Set default options. -+ * rsize/wsize and timeo are left 0 in order to -+ * let the kernel decide. -+ */ -+ memset(&data, 0, sizeof(data)); -+ data.retrans = 3; -+ data.acregmin = 3; -+ data.acregmax = 60; -+ data.acdirmin = 30; -+ data.acdirmax = 60; -+ data.proto = IPPROTO_TCP; -+ -+ bg = 0; -+ soft = 0; -+ intr = 0; -+ nocto = 0; -+ noac = 0; -+ retry = 10000; /* 10000 minutes ~ 1 week */ -+ -+ /* -+ * NFSv4 specifies that the default port should be 2049 -+ */ -+ server_addr.sin_port = htons(NFS_PORT); -+ -+ /* parse options */ -+ -+ for (opt = strtok(old_opts, ","); opt; opt = strtok(NULL, ",")) { -+ if ((opteq = strchr(opt, '='))) { -+ val = atoi(opteq + 1); -+ *opteq = '\0'; -+ if (!strcmp(opt, "rsize")) -+ data.rsize = val; -+ else if (!strcmp(opt, "wsize")) -+ data.wsize = val; -+ else if (!strcmp(opt, "timeo")) -+ data.timeo = val; -+ else if (!strcmp(opt, "retrans")) -+ data.retrans = val; -+ else if (!strcmp(opt, "acregmin")) -+ data.acregmin = val; -+ else if (!strcmp(opt, "acregmax")) -+ data.acregmax = val; -+ else if (!strcmp(opt, "acdirmin")) -+ data.acdirmin = val; -+ else if (!strcmp(opt, "acdirmax")) -+ data.acdirmax = val; -+ else if (!strcmp(opt, "actimeo")) { -+ data.acregmin = val; -+ data.acregmax = val; -+ data.acdirmin = val; -+ data.acdirmax = val; -+ } -+ else if (!strcmp(opt, "retry")) -+ retry = val; -+ else if (!strcmp(opt, "port")) -+ server_addr.sin_port = htons(val); -+ else if (!strcmp(opt, "proto")) { -+ if (!strncmp(opteq+1, "tcp", 3)) -+ data.proto = IPPROTO_TCP; -+ else if (!strncmp(opteq+1, "udp", 3)) -+ data.proto = IPPROTO_UDP; -+ else -+ printf(_("Warning: Unrecognized proto= option.\n")); -+ } else if (!strcmp(opt, "clientaddr")) { -+ if (strlen(opteq+1) >= sizeof(ip_addr)) -+ printf(_("Invalid client address %s"), -+ opteq+1); -+ strncpy(ip_addr,opteq+1, sizeof(ip_addr)); -+ ip_addr[sizeof(ip_addr)-1] = '\0'; -+ } else if (!strcmp(opt, "sec")) { -+ if (!strcmp(opteq+1, "krb5")) -+ pseudoflavour = 390003; -+ else if (!strcmp(opteq+1, "krb5i")) -+ pseudoflavour = 390004; -+ else if (!strcmp(opteq+1, "krb5p")) -+ pseudoflavour = 390005; -+ else if (!strcmp(opteq+1, "lipkey")) -+ pseudoflavour = 390006; -+ else if (!strcmp(opteq+1, "lipkey-i")) -+ pseudoflavour = 390007; -+ else if (!strcmp(opteq+1, "lipkey-p")) -+ pseudoflavour = 390008; -+ else if (!strcmp(opteq+1, "spkm3")) -+ pseudoflavour = 390009; -+ else if (!strcmp(opteq+1, "spkm3i")) -+ pseudoflavour = 390010; -+ else if (!strcmp(opteq+1, "spkm3p")) -+ pseudoflavour = 390011; -+ else { -+ printf(_("unknown security type %s\n"), -+ opteq+1); -+ goto fail; -+ } -+ } else if (!strcmp(opt, "addr")) { -+ /* ignore */; -+ } else { -+ printf(_("unknown nfs mount parameter: " -+ "%s=%d\n"), opt, val); -+ goto fail; -+ } -+ } else { -+ val = 1; -+ if (!strncmp(opt, "no", 2)) { -+ val = 0; -+ opt += 2; -+ } -+ if (!strcmp(opt, "bg")) -+ bg = val; -+ else if (!strcmp(opt, "fg")) -+ bg = !val; -+ else if (!strcmp(opt, "soft")) -+ soft = val; -+ else if (!strcmp(opt, "hard")) -+ soft = !val; -+ else if (!strcmp(opt, "intr")) -+ intr = val; -+ else if (!strcmp(opt, "cto")) -+ nocto = !val; -+ else if (!strcmp(opt, "ac")) -+ noac = !val; -+ else { -+ if (!sloppy) { -+ printf(_("unknown nfs mount option: " -+ "%s%s\n"), val ? "" : "no", opt); -+ goto fail; -+ } -+ } -+ } -+ } -+ -+ data.flags = (soft ? NFS4_MOUNT_SOFT : 0) -+ | (intr ? NFS4_MOUNT_INTR : 0) -+ | (nocto ? NFS4_MOUNT_NOCTO : 0) -+ | (noac ? NFS4_MOUNT_NOAC : 0); -+ -+ if (pseudoflavour != 0) { -+ data.auth_flavourlen = 1; -+ data.auth_flavours = &pseudoflavour; -+ } -+ -+ data.client_addr.data = ip_addr; -+ data.client_addr.len = strlen(ip_addr); -+ -+ data.mnt_path.data = dirname; -+ data.mnt_path.len = strlen(dirname); -+ -+ data.hostname.data = hostname; -+ data.hostname.len = strlen(hostname); -+ data.host_addr = (struct sockaddr *)&server_addr; -+ data.host_addrlen = sizeof(server_addr); -+ -+#ifdef NFS_MOUNT_DEBUG -+ printf("rsize = %d, wsize = %d, timeo = %d, retrans = %d\n", -+ data.rsize, data.wsize, data.timeo, data.retrans); -+ printf("acreg (min, max) = (%d, %d), acdir (min, max) = (%d, %d)\n", -+ data.acregmin, data.acregmax, data.acdirmin, data.acdirmax); -+ printf("port = %d, bg = %d, retry = %d, flags = %.8x\n", -+ ntohs(server_addr.sin_port), bg, retry, data.flags); -+ printf("soft = %d, intr = %d, nocto = %d, noac = %d\n", -+ (data.flags & NFS4_MOUNT_SOFT) != 0, -+ (data.flags & NFS4_MOUNT_INTR) != 0, -+ (data.flags & NFS4_MOUNT_NOCTO) != 0, -+ (data.flags & NFS4_MOUNT_NOAC) != 0); -+ printf("proto = %s\n", (data.proto == IPPROTO_TCP) ? "tcp" : "udp"); -+#endif -+ -+ data.version = NFS4_MOUNT_VERSION; -+ -+ *mount_opts = (char *) &data; -+ /* clean up */ -+ return 0; -+ -+fail: -+ return retval; -+} -Index: util-linux-ng-2.12r+git20070330/mount/nfs4_mount.h -=================================================================== ---- /dev/null -+++ util-linux-ng-2.12r+git20070330/mount/nfs4_mount.h -@@ -0,0 +1,82 @@ -+#ifndef _LINUX_NFS4_MOUNT_H -+#define _LINUX_NFS4_MOUNT_H -+ -+/* -+ * linux/include/linux/nfs4_mount.h -+ * -+ * Copyright (C) 2002 Trond Myklebust -+ * -+ * structure passed from user-space to kernel-space during an nfsv4 mount -+ */ -+ -+/* -+ * WARNING! Do not delete or change the order of these fields. If -+ * a new field is required then add it to the end. The version field -+ * tracks which fields are present. This will ensure some measure of -+ * mount-to-kernel version compatibility. Some of these aren't used yet -+ * but here they are anyway. -+ */ -+#define NFS4_MOUNT_VERSION 1 -+ -+struct nfs_string { -+ unsigned int len; -+ const char* data; -+}; -+ -+struct nfs4_mount_data { -+ int version; /* 1 */ -+ int flags; /* 1 */ -+ int rsize; /* 1 */ -+ int wsize; /* 1 */ -+ int timeo; /* 1 */ -+ int retrans; /* 1 */ -+ int acregmin; /* 1 */ -+ int acregmax; /* 1 */ -+ int acdirmin; /* 1 */ -+ int acdirmax; /* 1 */ -+ -+ /* see the definition of 'struct clientaddr4' in RFC3010 */ -+ struct nfs_string client_addr; /* 1 */ -+ -+ /* Mount path */ -+ struct nfs_string mnt_path; /* 1 */ -+ -+ /* Server details */ -+ struct nfs_string hostname; /* 1 */ -+ /* Server IP address */ -+ unsigned int host_addrlen; /* 1 */ -+ struct sockaddr* host_addr; /* 1 */ -+ -+ /* Transport protocol to use */ -+ int proto; /* 1 */ -+ -+ /* Pseudo-flavours to use for authentication. See RFC2623 */ -+ int auth_flavourlen; /* 1 */ -+ int *auth_flavours; /* 1 */ -+}; -+ -+/* bits in the flags field */ -+/* Note: the fields that correspond to existing NFSv2/v3 mount options -+ * should mirror the values from include/linux/nfs_mount.h -+ */ -+ -+#define NFS4_MOUNT_SOFT 0x0001 /* 1 */ -+#define NFS4_MOUNT_INTR 0x0002 /* 1 */ -+#define NFS4_MOUNT_NOCTO 0x0010 /* 1 */ -+#define NFS4_MOUNT_NOAC 0x0020 /* 1 */ -+#define NFS4_MOUNT_STRICTLOCK 0x1000 /* 1 */ -+#define NFS4_MOUNT_FLAGMASK 0xFFFF -+ -+/* pseudoflavors: */ -+ -+#define RPC_AUTH_GSS_KRB5 390003 -+#define RPC_AUTH_GSS_KRB5I 390004 -+#define RPC_AUTH_GSS_KRB5P 390005 -+#define RPC_AUTH_GSS_LKEY 390006 -+#define RPC_AUTH_GSS_LKEYI 390007 -+#define RPC_AUTH_GSS_LKEYP 390008 -+#define RPC_AUTH_GSS_SPKM 390009 -+#define RPC_AUTH_GSS_SPKMI 390010 -+#define RPC_AUTH_GSS_SPKMP 390011 -+ -+#endif -Index: util-linux-ng-2.12r+git20070330/mount/nfs.5 -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/nfs.5 -+++ util-linux-ng-2.12r+git20070330/mount/nfs.5 -@@ -3,7 +3,7 @@ - .\" patches. " - .TH NFS 5 "20 November 1993" "Linux 0.99" "Linux Programmer's Manual" - .SH NAME --nfs \- nfs fstab format and options -+nfs \- nfs and nfs4 fstab format and options - .SH SYNOPSIS - .B /etc/fstab - .SH DESCRIPTION -@@ -17,14 +17,51 @@ the local directory that is the mount po - and the NFS specific options that control - the way the filesystem is mounted. - .P --Here is an example from an \fI/etc/fstab\fP file from an NFS mount. -+Three different versions of the NFS protocol are -+supported by the Linux NFS client: -+NFS version 2, NFS version 3, and NFS version 4. -+To mount via NFS version 2, use the -+.BR nfs -+file system type and specify -+.BR nfsvers=2 . -+Version 2 is the default protocol version for the -+.BR nfs -+file system type when -+.BR nfsvers= -+is not specified on the mount command. -+To mount via NFS version 3, use the -+.BR nfs -+file system type and specify -+.BR nfsvers=3 . -+To mount via NFS version 4, use the -+.BR nfs4 -+file system type. -+The -+.BR nfsvers= -+keyword is not supported for the -+.BR nfs4 -+file system type. -+.P -+These file system types share similar mount options; -+the differences are listed below. -+.P -+Here is an example from an \fI/etc/fstab\fP file for an NFSv2 mount -+over UDP. - .sp - .nf - .ta 2.5i +0.75i +0.75i +1.0i - server:/usr/local/pub /pub nfs rsize=8192,wsize=8192,timeo=14,intr - .fi -+.P -+Here is an example for an NFSv4 mount over TCP using Kerberos -+5 mutual authentication. -+.sp -+.nf -+.ta 2.5i +0.75i +0.75i +1.0i -+server:/usr/local/pub /pub nfs4 proto=tcp,sec=krb5,hard,intr -+.fi - .DT --.SS Options -+.SS Options for the nfs file system type - .TP 1.5i - .I rsize=n - The number of bytes NFS uses when reading files from an NFS server. -@@ -217,6 +254,163 @@ which are otherwise used to manipulate A - All of the non-value options have corresponding nooption forms. - For example, nointr means don't allow file operations to be - interrupted. -+.SS Options for the nfs4 file system type -+.TP 1.5i -+.I rsize=n -+The number of bytes NFS uses when reading files from an NFS server. -+The default value is dependent on the kernel, currently 4096 bytes. -+(However, throughput is improved greatly by asking for -+.IR rsize=32768 .) -+This value is negotiated with the server. -+.TP 1.5i -+.I wsize=n -+The number of bytes NFS uses when writing files to an NFS server. -+The default value is dependent on the kernel, currently 4096 bytes. -+(However, throughput is improved greatly by asking for -+.IR wsize=32768 .) -+This value is negotiated with the server. -+.TP 1.5i -+.I timeo=n -+The value in tenths of a second before sending the -+first retransmission after an RPC timeout. -+The default value depends on whether -+.IR proto=udp -+or -+.IR proto=tcp -+is in effect (see below). -+The default value for UDP is 7 tenths of a second. -+The default value for TCP is 60 seconds. -+After the first timeout, -+the timeout is doubled after each successive timeout until a maximum -+timeout of 60 seconds is reached or the enough retransmissions -+have occured to cause a major timeout. Then, if the filesystem -+is hard mounted, each new timeout cascade restarts at twice the -+initial value of the previous cascade, again doubling at each -+retransmission. The maximum timeout is always 60 seconds. -+.TP 1.5i -+.I retrans=n -+The number of minor timeouts and retransmissions that must occur before -+a major timeout occurs. The default is 5 timeouts for -+.IR proto=udp -+and 2 timeouts for -+.IR proto=tcp . -+When a major timeout -+occurs, the file operation is either aborted or a "server not responding" -+message is printed on the console. -+.TP 1.5i -+.I acregmin=n -+The minimum time in seconds that attributes of a regular file should -+be cached before requesting fresh information from a server. -+The default is 3 seconds. -+.TP 1.5i -+.I acregmax=n -+The maximum time in seconds that attributes of a regular file can -+be cached before requesting fresh information from a server. -+The default is 60 seconds. -+.TP 1.5i -+.I acdirmin=n -+The minimum time in seconds that attributes of a directory should -+be cached before requesting fresh information from a server. -+The default is 30 seconds. -+.TP 1.5i -+.I acdirmax=n -+The maximum time in seconds that attributes of a directory can -+be cached before requesting fresh information from a server. -+The default is 60 seconds. -+.TP 1.5i -+.I actimeo=n -+Using actimeo sets all of -+.I acregmin, -+.I acregmax, -+.I acdirmin, -+and -+.I acdirmax -+to the same value. -+There is no default value. -+.TP 1.5i -+.I retry=n -+The number of minutes to retry an NFS mount operation -+in the foreground or background before giving up. -+The default value is 10000 minutes, which is roughly one week. -+.TP 1.5i -+.I port=n -+The numeric value of the port to connect to the NFS server on. -+If the port number is 0 (the default) then query the -+remote host's portmapper for the port number to use. -+If the remote host's NFS daemon is not registered with -+its portmapper, the standard NFS port number 2049 is -+used instead. -+.TP 1.5i -+.I proto=n -+Mount the NFS filesystem using a specific network protocol -+instead of the default UDP protocol. -+Many NFS version 4 servers only support TCP. -+Valid protocol types are -+.IR udp -+and -+.IR tcp . -+.TP 1.5i -+.I clientaddr=n -+On a multi-homed client, this -+causes the client to use a specific callback address when -+communicating with an NFS version 4 server. -+This option is currently ignored. -+.TP 1.5i -+.I sec=n -+Specify an advanced security mechanism for this file system. -+To use Kerberos 5 mutual authentication, specify -+.IR krb5 . -+Kerberos 5 integrity checking is specified with -+.IR krb5i , -+and Kerberos 5 privacy is specified with -+.IR krb5p . -+Other security mechanisms may become available in the future. -+.TP 1.5i -+.I bg -+If an NFS mount attempt times out, retry the mount -+in the background. -+After a mount operation is backgrounded, all subsequent mounts -+on the same NFS server will be backgrounded immediately, without -+first attempting the mount. -+A missing mount point is treated as a timeout, -+to allow for nested NFS mounts. -+.TP 1.5i -+.I fg -+If the first NFS mount attempt times out, retry the mount -+in the foreground. -+This is the complement of the -+.I bg -+option, and also the default behavior. -+.TP 1.5i -+.I soft -+If an NFS file operation has a major timeout then report an I/O error to -+the calling program. -+The default is to continue retrying NFS file operations indefinitely. -+.TP 1.5i -+.I hard -+If an NFS file operation has a major timeout then report -+"server not responding" on the console and continue retrying indefinitely. -+This is the default. -+.TP 1.5i -+.I intr -+If an NFS file operation has a major timeout and it is hard mounted, -+then allow signals to interupt the file operation and cause it to -+return EINTR to the calling program. The default is to not -+allow file operations to be interrupted. -+.TP 1.5i -+.I nocto -+Suppress the retrieval of new attributes when creating a file. -+.TP 1.5i -+.I noac -+Disable attribute caching, and force synchronous writes. -+This extracts a -+server performance penalty but it allows two different NFS clients -+to get reasonable good results when both clients are actively -+writing to common filesystem on the server. -+.P -+All of the non-value options have corresponding nooption forms. -+For example, nointr means don't allow file operations to be -+interrupted. - .SH FILES - .I /etc/fstab - .SH "SEE ALSO" -Index: util-linux-ng-2.12r+git20070330/mount/sundries.h -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/sundries.h -+++ util-linux-ng-2.12r+git20070330/mount/sundries.h -@@ -40,6 +40,8 @@ void die (int errcode, const char *fmt, - - int nfsmount (const char *spec, const char *node, int *flags, - char **orig_opts, char **opt_args, int *version, int running_bg); -+int nfs4mount (const char *spec, const char *node, int *flags, -+ char **orig_opts, char **opt_args, int running_bg); - - /* exit status - bits below are ORed */ - #define EX_USAGE 1 /* incorrect invocation or permission */ -Index: util-linux-ng-2.12r+git20070330/mount/umount.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/umount.c -+++ util-linux-ng-2.12r+git20070330/mount/umount.c -@@ -88,6 +88,9 @@ int verbose = 0; - /* True if ruid != euid. */ - int suid = 0; - -+/* Needed by nfs4mount.c */ -+int sloppy = 0; -+ - /* - * check_special_umountprog() - * If there is a special umount program for this type, exec it. -Index: util-linux-ng-2.12r+git20070330/mount/Makefile.am -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/Makefile.am -+++ util-linux-ng-2.12r+git20070330/mount/Makefile.am -@@ -17,7 +17,7 @@ MNTHDRS = fstab.h linux_fs.h mount_mnten - mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ - get_label_uuid.c mount_by_label.c mount_blkid.c mount_guess_fstype.c \ - getusername.c \ -- nfsmount.c nfsmount_xdr.c nfsmount_clnt.c \ -+ nfsmount.c nfsmount_xdr.c nfsmount_clnt.c nfs4mount.c \ - lomount.c \ - $(MNTHDRS) - diff --git a/util-linux-2.12-mount_mountfallback.patch b/util-linux-2.12-mount_mountfallback.patch deleted file mode 100644 index 23a04f1..0000000 --- a/util-linux-2.12-mount_mountfallback.patch +++ /dev/null @@ -1,36 +0,0 @@ -Index: util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/mount/nfsmount.c -+++ util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c -@@ -167,8 +167,20 @@ get_mountport(struct sockaddr_in *server - } - if (!p.pm_vers) - p.pm_vers = MOUNTVERS; -- if (!p.pm_prot) -+ if (!p.pm_prot) { - p.pm_prot = IPPROTO_TCP; -+ if (!p.pm_port) { -+ p.pm_port = pmap_getport(server_addr, -+ p.pm_prog, p.pm_vers, p.pm_prot); -+ } -+ /* Fall back to UDP if there's no TCP registration for mount */ -+ if (!p.pm_port) { -+ fprintf(stderr, "mount server reported tcp not available, falling back to udp\n"); -+ p.pm_prot = IPPROTO_UDP; -+ p.pm_port = pmap_getport(server_addr, -+ p.pm_prog, p.pm_vers, p.pm_prot); -+ } -+ } - #if 0 - if (!p.pm_port) { - p.pm_port = pmap_getport(server_addr, p.pm_prog, p.pm_vers, -@@ -582,7 +594,8 @@ retry_udp: - pm_mnt = get_mountport(&mount_server_addr, - mountprog, - mountvers, -- proto, -+ 0, /* TCP or UDP: pick -+ whatever is available */ - mountport, - nfs_mount_version); - diff --git a/util-linux-2.12-mount_nfs_tcp.patch b/util-linux-2.12-mount_nfs_tcp.patch deleted file mode 100644 index 69943e1..0000000 --- a/util-linux-2.12-mount_nfs_tcp.patch +++ /dev/null @@ -1,65 +0,0 @@ -Index: util-linux-ng-2.12r+2.13pre7/mount/nfs.5 -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/mount/nfs.5 -+++ util-linux-ng-2.12r+2.13pre7/mount/nfs.5 -@@ -199,11 +199,11 @@ writing to common filesystem on the serv - .TP 1.5i - .I tcp - Mount the NFS filesystem using the TCP protocol instead of the --default UDP protocol. Many NFS servers only support UDP. -+UDP protocol. This is the default, but in case it fails (many NFS servers only -+support UDP) it will fallback and try UDP. - .TP 1.5i - .I udp --Mount the NFS filesystem using the UDP protocol. This --is the default. -+Mount the NFS filesystem using the UDP protocol. - .TP 1.5i - .I noacl - Assume no extended access control mechanisms like POSIX ACLs are used -@@ -227,8 +227,5 @@ interrupted. - The posix, and nocto options are parsed by mount - but currently are silently ignored. - .P --The tcp and namlen options are implemented but are not currently --supported by the Linux kernel. --.P - The umount command should notify the server - when an NFS filesystem is unmounted. -Index: util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/mount/nfsmount.c -+++ util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c -@@ -317,7 +317,7 @@ int nfsmount(const char *spec, const cha - noacl = 0; - noac = 0; - retry = 10000; /* 10000 minutes ~ 1 week */ -- tcp = 0; -+ tcp = 2; - - mountprog = MOUNTPROG; - mountvers = 0; -@@ -437,6 +437,8 @@ int nfsmount(const char *spec, const cha - } - } - } -+ -+retry_udp: - proto = (tcp) ? IPPROTO_TCP : IPPROTO_UDP; - - data.flags = (soft ? NFS_MOUNT_SOFT : 0) -@@ -740,7 +742,13 @@ int nfsmount(const char *spec, const cha - * '0' for port (service unavailable), we then exit, - * notifying the user, rather than hanging up mount. - */ -- if (port == 0 && tcp == 1) { -+ if (port == 0 && tcp) { -+ if (tcp == 2) { -+ fprintf(stderr, "nfs server reported tcp not available, falling back to udp\n"); -+ close(fsock); -+ tcp = 0; -+ goto retry_udp; -+ } - perror(_("nfs server reported service unavailable")); - goto fail; - } diff --git a/util-linux-2.12a-mount_mountbylabel-dm.patch b/util-linux-2.12a-mount_mountbylabel-dm.patch deleted file mode 100644 index c39636d..0000000 --- a/util-linux-2.12a-mount_mountbylabel-dm.patch +++ /dev/null @@ -1,65 +0,0 @@ -Index: util-linux-ng-2.12r+2.13pre7/mount/mount_by_label.c -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/mount/mount_by_label.c -+++ util-linux-ng-2.12r+2.13pre7/mount/mount_by_label.c -@@ -18,6 +18,8 @@ - * - Added JFS v2 format support - * 2002-07-26 Luciano Chavez - * - Added EVMS support -+ * 2004-08-11 Alasdair Kergon -+ * - Added LVM2/device-mapper support - */ - - #include -@@ -39,6 +41,7 @@ - #define VG_DIR "/proc/lvm/VGs" - #define EVMS_VOLUME_NAME_SIZE 127 - #define PROC_EVMS_VOLUMES "/proc/evms/volumes" -+#define DEVICEMAPPERDIR "/dev/mapper" - - extern char *progname; - -@@ -104,6 +107,34 @@ uuidcache_init_lvm(void) { - closedir(vg_dir); - } - -+/* LVM2/device-mapper support */ -+static void -+uuidcache_init_dm(void) { -+ char lvm_device[PATH_MAX]; -+ DIR *d; -+ struct dirent *lv_iter; -+ char uuid[16], *label; -+ -+ if (!(d = opendir(DEVICEMAPPERDIR))) { -+ if (errno != ENOENT) -+ perror("mount (init_dm)"); -+ return; -+ } -+ -+ while ((lv_iter = readdir(d))) { -+ if (!strcmp(lv_iter->d_name, "control") || -+ !strcmp(lv_iter->d_name, ".") || -+ !strcmp(lv_iter->d_name, "..")) -+ continue; -+ snprintf(lvm_device, sizeof(lvm_device), "%s/%s", -+ DEVICEMAPPERDIR, lv_iter->d_name); -+ if (!get_label_uuid(strdup(lvm_device), &label, uuid)) -+ uuidcache_addentry(strdup(lvm_device), -+ label, uuid); -+ } -+ closedir(d); -+} -+ - static int - uuidcache_init_evms(void) { - FILE *procvol; -@@ -256,6 +287,8 @@ uuidcache_init(void) { - fclose(procpt); - - uuidcache_init_lvm(); -+ -+ uuidcache_init_dm(); - } - - #define UUID 1 diff --git a/util-linux-2.12a-mount_mountpointwithcolon.patch b/util-linux-2.12a-mount_mountpointwithcolon.patch index aecc7d7..7b29286 100644 --- a/util-linux-2.12a-mount_mountpointwithcolon.patch +++ b/util-linux-2.12a-mount_mountpointwithcolon.patch @@ -9,7 +9,7 @@ Index: util-linux-ng-2.12r+git20070330/mount/mount.c - types = "nfs"; - if (verbose) - printf(_("mount: no type was given - " -+ types = do_guess_fstype(spec); ++ types = fsprobe_get_fstype_by_devname(spec); + if(types == NULL) { + types = "nfs"; + if (verbose) { diff --git a/util-linux-2.12q-mount_strict_aliasing.patch b/util-linux-2.12q-mount_strict_aliasing.patch deleted file mode 100644 index fe53e6d..0000000 --- a/util-linux-2.12q-mount_strict_aliasing.patch +++ /dev/null @@ -1,28 +0,0 @@ -Index: util-linux-ng-2.12r+git20070330/mount/Makefile.am -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/Makefile.am -+++ util-linux-ng-2.12r+git20070330/mount/Makefile.am -@@ -17,11 +17,11 @@ MNTHDRS = fstab.h linux_fs.h mount_mnten - mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ - get_label_uuid.c mount_by_label.c mount_blkid.c mount_guess_fstype.c \ - getusername.c \ -- nfsmount.c nfsmount_xdr.c nfsmount_clnt.c nfs4mount.c \ -+ nfsmount.c nfsmount_clnt.c nfs4mount.c \ - lomount.c \ - $(MNTHDRS) - --mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a -+mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a libnfsmount_xdr.a - - umount_SOURCES = umount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ - getusername.c get_label_uuid.c mount_by_label.c mount_blkid.c \ -@@ -60,6 +60,9 @@ swapargs.h: - clean-local: - rm -f swapargs.h - -+noinst_LIBRARIES = libnfsmount_xdr.a -+libnfsmount_xdr_a_SOURCES = nfsmount_xdr.c -+libnfsmount_xdr_a_CFLAGS = -fno-strict-aliasing - - install-exec-hook: - chmod 4755 $(DESTDIR)$(bindir)/mount diff --git a/util-linux-2.12q-sys_utils_ionice.patch b/util-linux-2.12q-sys_utils_ionice.patch index c098a72..56ecf84 100644 --- a/util-linux-2.12q-sys_utils_ionice.patch +++ b/util-linux-2.12q-sys_utils_ionice.patch @@ -1,7 +1,7 @@ -Index: util-linux-ng-2.12r+2.13pre7/sys-utils/ionice.1 +Index: util-linux-ng-2.12r+git20070509/sys-utils/ionice.1 =================================================================== --- /dev/null -+++ util-linux-ng-2.12r+2.13pre7/sys-utils/ionice.1 ++++ util-linux-ng-2.12r+git20070509/sys-utils/ionice.1 @@ -0,0 +1,71 @@ +.TH ionice "1" "August 2005" ionice +.SH NAME @@ -74,10 +74,10 @@ Index: util-linux-ng-2.12r+2.13pre7/sys-utils/ionice.1 + +.SH AUTHORS +Jens Axboe -Index: util-linux-ng-2.12r+2.13pre7/sys-utils/ionice.c +Index: util-linux-ng-2.12r+git20070509/sys-utils/ionice.c =================================================================== --- /dev/null -+++ util-linux-ng-2.12r+2.13pre7/sys-utils/ionice.c ++++ util-linux-ng-2.12r+git20070509/sys-utils/ionice.c @@ -0,0 +1,144 @@ +/* + * ionice: set or get process io scheduling class and priority @@ -223,11 +223,11 @@ Index: util-linux-ng-2.12r+2.13pre7/sys-utils/ionice.c + + return 0; +} -Index: util-linux-ng-2.12r+2.13pre7/sys-utils/Makefile.am +Index: util-linux-ng-2.12r+git20070509/sys-utils/Makefile.am =================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/sys-utils/Makefile.am -+++ util-linux-ng-2.12r+2.13pre7/sys-utils/Makefile.am -@@ -2,17 +2,17 @@ +--- util-linux-ng-2.12r+git20070509.orig/sys-utils/Makefile.am ++++ util-linux-ng-2.12r+git20070509/sys-utils/Makefile.am +@@ -2,7 +2,7 @@ include $(top_srcdir)/config/include-Mak bin_PROGRAMS = dmesg @@ -236,14 +236,12 @@ Index: util-linux-ng-2.12r+2.13pre7/sys-utils/Makefile.am cytune_SOURCES = cytune.c cyclades.h - sbin_PROGRAMS = ctrlaltdel - - usrsbinexec_PROGRAMS = readprofile tunelp +@@ -12,7 +12,7 @@ usrsbinexec_PROGRAMS = readprofile tunel tunelp_SOURCES = tunelp.c lp.h -man_MANS = flock.1 readprofile.1 \ +man_MANS = flock.1 ionice.1 readprofile.1 \ - ctrlaltdel.8 cytune.8 dmesg.8 ipcrm.8 ipcs.8 renice.8 \ - setsid.8 tunelp.8 + ctrlaltdel.8 cytune.8 dmesg.1 ipcrm.1 ipcs.1 renice.1 \ + setsid.1 tunelp.8 diff --git a/util-linux-2.12r-mount_nfs_remount_options.patch b/util-linux-2.12r-mount_nfs_remount_options.patch deleted file mode 100644 index a700af5..0000000 --- a/util-linux-2.12r-mount_nfs_remount_options.patch +++ /dev/null @@ -1,20 +0,0 @@ -do not append addr option with each nfs remount [#130625] - -Index: util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/mount/nfsmount.c -+++ util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c -@@ -303,8 +303,11 @@ int nfsmount(const char *spec, const cha - "excessively long option argument\n")); - goto fail; - } -- sprintf(new_opts, "%s%saddr=%s", -- old_opts, *old_opts ? "," : "", s); -+ if (*flags & MS_REMOUNT) -+ strcpy(new_opts, old_opts); -+ else -+ sprintf(new_opts, "%s%saddr=%s", -+ old_opts, *old_opts ? "," : "", s); - *extra_opts = xstrdup(new_opts); - - /* Set default options. diff --git a/util-linux-2.12r-mount_rpcsec_gss.patch b/util-linux-2.12r-mount_rpcsec_gss.patch deleted file mode 100644 index a5d8138..0000000 --- a/util-linux-2.12r-mount_rpcsec_gss.patch +++ /dev/null @@ -1,116 +0,0 @@ -Index: mount/nfsmount.c -=================================================================== ---- mount/nfsmount.c.orig -+++ mount/nfsmount.c -@@ -117,8 +117,10 @@ find_kernel_nfs_mount_version(void) { - nfs_mount_version = 4; /* since 2.2.18pre9 */ - else if (kernel_version < MAKE_VERSION(2,3,99)) - nfs_mount_version = 3; -+ else if (kernel_version < MAKE_VERSION(2,6,3)) -+ nfs_mount_version = 4; - else -- nfs_mount_version = 4; /* since 2.3.99pre4 */ -+ nfs_mount_version = 6; - } - if (nfs_mount_version > NFS_MOUNT_VERSION) - nfs_mount_version = NFS_MOUNT_VERSION; -@@ -318,7 +320,6 @@ int nfsmount(const char *spec, const cha - #if NFS_MOUNT_VERSION >= 2 - data.namlen = NAME_MAX; - #endif -- - bg = 0; - soft = 0; - intr = 0; -@@ -400,6 +401,38 @@ int nfsmount(const char *spec, const cha - printf(_("Warning: Option namlen is not supported.\n")); - } else if (!strcmp(opt, "addr")) { - /* ignore */; -+#if NFS_MOUNT_VERSION >= 5 -+ } else if (!strcmp(opt, "sec")) { -+ char *secflavor = opteq+1; -+ /* see RFC 2623 */ -+ if (nfs_mount_version < 5) { -+ printf(_("Warning: this version of mount(1) does not support RPCSEC_GSS, ignoring sec=%s option\n"), secflavor); -+ continue; -+ } else if (!strcmp(secflavor, "sys")) -+ data.pseudoflavor = AUTH_SYS; -+ else if (!strcmp(secflavor, "krb5")) -+ data.pseudoflavor = AUTH_GSS_KRB5; -+ else if (!strcmp(secflavor, "krb5i")) -+ data.pseudoflavor = AUTH_GSS_KRB5I; -+ else if (!strcmp(secflavor, "krb5p")) -+ data.pseudoflavor = AUTH_GSS_KRB5P; -+ else if (!strcmp(secflavor, "lipkey")) -+ data.pseudoflavor = AUTH_GSS_LKEY; -+ else if (!strcmp(secflavor, "lipkey-i")) -+ data.pseudoflavor = AUTH_GSS_LKEYI; -+ else if (!strcmp(secflavor, "lipkey-p")) -+ data.pseudoflavor = AUTH_GSS_LKEYP; -+ else if (!strcmp(secflavor, "spkm3")) -+ data.pseudoflavor = AUTH_GSS_SPKM; -+ else if (!strcmp(secflavor, "spkm3i")) -+ data.pseudoflavor = AUTH_GSS_SPKMI; -+ else if (!strcmp(secflavor, "spkm3p")) -+ data.pseudoflavor = AUTH_GSS_SPKMP; -+ else if(!sloppy) { -+ printf(_("Warning: Unrecognized security flavor %s.\n"), secflavor); -+ goto fail; -+ } -+#endif - } else { - printf(_("unknown nfs mount parameter: " - "%s=%d\n"), opt, val); -@@ -472,6 +505,11 @@ retry_udp: - data.flags |= (noacl ? NFS_MOUNT_NOACL : 0); - } - #endif -+#if NFS_MOUNT_VERSION >= 5 -+ if ((nfs_mount_version >= 5) && data.pseudoflavor) { -+ data.flags |= NFS_MOUNT_SECFLAVOUR; -+ } -+#endif - if (nfsvers > MAX_NFSPROT) { - fprintf(stderr, "NFSv%d not supported!\n", nfsvers); - return 0; -@@ -508,6 +546,9 @@ retry_udp: - printf("tcp = %d\n", - (data.flags & NFS_MOUNT_TCP) != 0); - #endif -+#if NFS_MOUNT_VERSION >= 5 -+ printf("sec = %u\n", data.pseudoflavor); -+#endif - #endif - - data.version = nfs_mount_version; -@@ -715,6 +756,30 @@ retry_udp: - nfs_strerror(status.nfsv3.fhs_status)); - goto fail; - } -+#if NFS_MOUNT_VERSION >= 5 -+ if (data.pseudoflavor) { -+ mountres3_ok *mountres = &status.nfsv3.mountres3_u.mountinfo; -+ int i = mountres->auth_flavours.auth_flavours_len; -+ -+ if (i > 0) { -+ int *flavor = mountres->auth_flavours.auth_flavours_val; -+ while (--i >= 0) { -+ if (flavor[i] == data.pseudoflavor) { -+ break; -+ } -+ } -+ -+ if (i < 0) { -+ fprintf(stderr, -+ "mount: %s:%s failed, security flavor not supported\n", -+ hostname, dirname); -+ mountproc3_umnt_3(&dirname,mclient); -+ goto fail; -+ } -+ } -+ } -+#endif -+ - fhandle = &status.nfsv3.mountres3_u.mountinfo.fhandle; - memset(data.old_root.data, 0, NFS_FHSIZE); - memset(&data.root, 0, sizeof(data.root)); diff --git a/util-linux-2.12r-mount_sec_manpage.patch b/util-linux-2.12r-mount_sec_manpage.patch deleted file mode 100644 index c0c5611..0000000 --- a/util-linux-2.12r-mount_sec_manpage.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: http://www.citi.umich.edu/projects/nfsv4/linux/util-linux-patches -Subject: Update nfs(5) manpage to document security flavors -References: 159368 - -Acked-by: okir@suse.de - - mount/nfs.5 | 24 ++++++++++++++++++++---- - 1 files changed, 20 insertions(+), 4 deletions(-) - -Index: util-linux-ng-2.12r+2.13pre7/mount/nfs.5 -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/mount/nfs.5 -+++ util-linux-ng-2.12r+2.13pre7/mount/nfs.5 -@@ -165,7 +165,7 @@ mount daemon program number. - Use an alternate RPC version number to contact the - mount daemon on the remote host. This option is useful - for hosts that can run multiple NFS servers. --The default value is version 1. -+The default value depends on which kernel you are using. - .TP 1.5i - .I nfsprog=n - Use an alternate RPC program number to contact the -@@ -230,9 +230,25 @@ Suppress the retrieval of new attributes - .TP 1.5i - .I noac - Disable all forms of attribute caching entirely. This extracts a --server performance penalty but it allows two different NFS clients --to get reasonable good results when both clients are actively --writing to common filesystem on the server. -+significant performance penalty but it allows two different NFS clients -+to get reasonable results when both clients are actively -+writing to a common export on the server. -+.TP 1.5i -+.I sec=mode -+Set the security flavor for this mount to "mode". -+The default setting is \f3sec=sys\f1, which uses local -+unix uids and gids to authenticate NFS operations (AUTH_SYS). -+Other currently supported settings are: -+\f3sec=krb5\f1, which uses Kerberos V5 instead of local unix uids -+and gids to authenticate users; -+\f3sec=krb5i\f1, which uses Kerberos V5 for user authentication -+and performs integrity checking of NFS operations using secure -+checksums to prevent data tampering; and -+\f3sec=krb5p\f1, which uses Kerberos V5 for user authentication -+and integrity checking, and encrypts NFS traffic to prevent -+traffic sniffing (this is the most secure setting). -+Note that there is a performance penalty when using integrity -+or privacy. - .TP 1.5i - .I tcp - Mount the NFS filesystem using the TCP protocol instead of the diff --git a/util-linux-2.12r-mount_swapon_swsuspend_resume.patch b/util-linux-2.12r-mount_swapon_swsuspend_resume.patch index 7f44b78..8bc8e98 100644 --- a/util-linux-2.12r-mount_swapon_swsuspend_resume.patch +++ b/util-linux-2.12r-mount_swapon_swsuspend_resume.patch @@ -1,44 +1,4 @@ ## 30swsusp-resume.dpatch by Jeff Bailey -Index: util-linux-ng-2.12r+git20070330/mount/get_label_uuid.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/get_label_uuid.c -+++ util-linux-ng-2.12r+git20070330/mount/get_label_uuid.c -@@ -93,7 +93,25 @@ is_v1_swap_partition(int fd, char **labe - } - return 0; - } -- -+ -+static int -+is_swsuspend_partition(int fd, char **label, char *uuid) { -+ int n = getpagesize(); -+ char *buf = xmalloc(n); -+ struct swap_header_v1_2 *p = (struct swap_header_v1_2 *) buf; -+ -+ if (lseek(fd, 0, SEEK_SET) == 0 -+ && read(fd, buf, n) == n -+ && (strncmp(buf+n-10, "S1SUSPEND", 9)==0 || -+ strncmp(buf+n-10, "S2SUSPEND", 9)==0 || -+ strncmp(buf+n-10, "ULSUSPEND", 9)==0) -+ && p->version == 1) { -+ store_uuid(uuid, p->uuid); -+ store_label(label, p->volume_name, 16); -+ return 1; -+ } -+ return 0; -+} - - /* - * Get both label and uuid. -@@ -126,6 +144,8 @@ get_label_uuid(const char *device, char - - if (is_v1_swap_partition(fd, label, uuid)) - goto done; -+ if (is_swsuspend_partition(fd, label, uuid)) -+ goto done; - - if (lseek(fd, 1024, SEEK_SET) == 1024 - && read(fd, (char *) &e2sb, sizeof(e2sb)) == sizeof(e2sb) Index: util-linux-ng-2.12r+git20070330/mount/swapon.c =================================================================== --- util-linux-ng-2.12r+git20070330.orig/mount/swapon.c diff --git a/util-linux-2.12r-mount_umount_nosysfs.patch b/util-linux-2.12r-mount_umount_nosysfs.patch deleted file mode 100644 index 97cc882..0000000 --- a/util-linux-2.12r-mount_umount_nosysfs.patch +++ /dev/null @@ -1,15 +0,0 @@ -Added sysfs to list of filesystems not to unmount with umount -a [#190385] - -Index: mount/umount.c -=================================================================== ---- mount/umount.c.orig -+++ mount/umount.c -@@ -721,7 +721,7 @@ main (int argc, char *argv[]) { - if (all) { - /* nodev stuff: sysfs, usbfs, oprofilefs, ... */ - if (types == NULL) -- types = "noproc,nodevfs,nodevpts"; -+ types = "noproc,nodevfs,nodevpts,nosysfs"; - result = umount_all (types, test_opts); - } else if (argc < 1) { - usage (stderr, 2); diff --git a/util-linux-2.13-mount_nfs_timeo.patch b/util-linux-2.13-mount_nfs_timeo.patch deleted file mode 100644 index 53b2141..0000000 --- a/util-linux-2.13-mount_nfs_timeo.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/mount/nfsmount.c -+++ util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c -@@ -487,7 +487,7 @@ retry_udp: - - /* Adjust options if none specified */ - if (!data.timeo) -- data.timeo = tcp ? 70 : 7; -+ data.timeo = tcp ? 600 : 7; - - #ifdef NFS_MOUNT_DEBUG - printf("rsize = %d, wsize = %d, timeo = %d, retrans = %d\n", diff --git a/util-linux-2.13-mount_volume_id.patch b/util-linux-2.13-mount_volume_id.patch new file mode 100644 index 0000000..e97aa1a --- /dev/null +++ b/util-linux-2.13-mount_volume_id.patch @@ -0,0 +1,3574 @@ +Signed-off-by: Karel Zak +--- + mount/Makefile.am | 8 ++-- + mount/fsprobe.h | 12 +++++ + mount/fsprobe_blkid.c | 111 ++++++++++++++++++++++++++++++++++++++++++++ + mount/fstab.c | 2 +- + mount/mount.c | 2 +- + mount/mount_blkid.c | 111 -------------------------------------------- + mount/mount_blkid.h | 12 ----- + mount/mount_guess_fstype.c | 2 +- + mount/swapon.c | 2 +- + 9 files changed, 131 insertions(+), 131 deletions(-) + +diff --git a/mount/Makefile.am b/mount/Makefile.am +index 95db3dd..930a0bf 100644 +--- a/mount/Makefile.am ++++ b/mount/Makefile.am +@@ -7,13 +7,13 @@ sbin_PROGRAMS = losetup swapon + man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 + + MNTHDRS = fstab.h linux_fs.h mount_mntent.h mount_constants.h my_dev_t.h \ +- mount_paths.h get_label_uuid.h lomount.h mount_blkid.h \ ++ mount_paths.h get_label_uuid.h lomount.h fsprobe.h \ + mount_guess_fstype.h realpath.h xmalloc.h \ + getusername.h loop.h mount_by_label.h mount_guess_rootdev.h \ + sundries.h + + mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ +- get_label_uuid.c mount_by_label.c mount_blkid.c mount_guess_fstype.c \ ++ get_label_uuid.c mount_by_label.c fsprobe_blkid.c mount_guess_fstype.c \ + getusername.c \ + lomount.c \ + $(MNTHDRS) +@@ -22,7 +22,7 @@ mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a + mount_CFLAGS = $(SUID_CFLAGS) + + umount_SOURCES = umount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ +- getusername.c get_label_uuid.c mount_by_label.c mount_blkid.c \ ++ getusername.c get_label_uuid.c mount_by_label.c fsprobe_blkid.c \ + lomount.c \ + $(MNTHDRS) + +@@ -30,7 +30,7 @@ umount_LDADD = $(top_srcdir)/lib/libenv.a + umount_CFLAGS = $(SUID_CFLAGS) + + swapon_SOURCES = swapon.c xmalloc.c \ +- get_label_uuid.c mount_by_label.c mount_blkid.c \ ++ get_label_uuid.c mount_by_label.c fsprobe_blkid.c \ + swap_constants.h realpath.c + + losetup_SOURCES = lomount.c loop.h lomount.h +diff --git a/mount/fsprobe.h b/mount/fsprobe.h +new file mode 100644 +index 0000000..c96ff8c +--- /dev/null ++++ b/mount/fsprobe.h +@@ -0,0 +1,12 @@ ++#ifdef HAVE_LIBBLKID ++#include ++extern blkid_cache blkid; ++#endif ++ ++extern void mount_blkid_get_cache(void); ++extern void mount_blkid_put_cache(void); ++extern const char *mount_get_devname_by_uuid(const char *uuid); ++extern const char *mount_get_devname_by_label(const char *label); ++extern const char *mount_get_volume_label_by_spec(const char *spec); ++extern const char *mount_get_devname(const char *spec); ++extern const char *mount_get_devname_for_mounting(const char *spec); +diff --git a/mount/fsprobe_blkid.c b/mount/fsprobe_blkid.c +new file mode 100644 +index 0000000..0616945 +--- /dev/null ++++ b/mount/fsprobe_blkid.c +@@ -0,0 +1,111 @@ ++#include ++#include "fsprobe.h" ++ ++#ifdef HAVE_LIBBLKID ++ ++blkid_cache blkid; ++ ++void ++mount_blkid_get_cache(void) { ++ blkid_get_cache(&blkid, NULL); ++} ++ ++void ++mount_blkid_put_cache(void) { ++ blkid_put_cache(blkid); ++} ++ ++const char * ++mount_get_volume_label_by_spec(const char *spec) { ++ return blkid_get_tag_value(blkid, "LABEL", spec); ++} ++ ++const char * ++mount_get_devname(const char *spec) { ++ return blkid_get_devname(blkid, spec, 0); ++} ++ ++const char * ++mount_get_devname_by_uuid(const char *uuid) { ++ return blkid_get_devname(blkid, "UUID", uuid); ++} ++ ++const char * ++mount_get_devname_by_label(const char *label) { ++ return blkid_get_devname(blkid, "LABEL", label); ++} ++ ++/* Also when no UUID= or LABEL= occur? No verbose? No warnings? */ ++const char * ++mount_get_devname_for_mounting(const char *spec) { ++ return blkid_get_devname(blkid, spec, 0); ++} ++ ++#else ++#include ++#include "sundries.h" ++#include "mount_by_label.h" ++#include "nls.h" ++ ++void ++mount_blkid_get_cache(void) { ++} ++ ++void ++mount_blkid_put_cache(void) { ++} ++ ++const char * ++mount_get_volume_label_by_spec(const char *spec) { ++ return xstrdup(get_volume_label_by_spec(spec)); ++} ++ ++const char * ++mount_get_devname(const char *spec) { ++ if (!strncmp(spec, "UUID=", 5)) ++ return get_spec_by_uuid(spec+5); ++ if (!strncmp(spec, "LABEL=", 6)) ++ return get_spec_by_volume_label(spec+6); ++ return spec; ++} ++ ++const char * ++mount_get_devname_by_uuid(const char *uuid) { ++ return get_spec_by_uuid(uuid); ++} ++ ++extern char *progname; ++ ++const char * ++mount_get_devname_by_label(const char *volumelabel) { ++ const char *spec, *spec2; ++ ++ spec = get_spec_by_volume_label(volumelabel); ++ spec2 = second_occurrence_of_vol_label(volumelabel); ++ if (spec2) ++ die (EX_FAIL, ++ _("%s: error: the label %s occurs on both %s and %s\n"), ++ progname, volumelabel, spec, spec2); ++ return spec; ++} ++ ++const char * ++mount_get_devname_for_mounting(const char *spec) { ++ const char *nspec; ++ ++ if (!strncmp(spec, "UUID=", 5)) { ++ nspec = mount_get_devname_by_uuid(spec+5); ++ if (nspec && verbose > 1) ++ printf(_("mount: going to mount %s by UUID\n"), spec); ++ } else if (!strncmp(spec, "LABEL=", 6)) { ++ nspec = mount_get_devname_by_label(spec+6); ++ if (nspec && verbose > 1) ++ printf(_("mount: going to mount %s by label\n"), spec); ++ } else ++ nspec = spec; ++ ++ return nspec; ++} ++ ++ ++#endif +diff --git a/mount/fstab.c b/mount/fstab.c +index 72c46f3..5267f62 100644 +--- a/mount/fstab.c ++++ b/mount/fstab.c +@@ -15,7 +15,7 @@ + #include "fstab.h" + #include "sundries.h" + #include "xmalloc.h" +-#include "mount_blkid.h" ++#include "fsprobe.h" + #include "mount_paths.h" + #include "nls.h" + +diff --git a/mount/mount.c b/mount/mount.c +index 5058a7e..dfa44dc 100644 +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -29,7 +29,7 @@ + #include + #endif + +-#include "mount_blkid.h" ++#include "fsprobe.h" + #include "mount_constants.h" + #include "sundries.h" + #include "xmalloc.h" +diff --git a/mount/mount_blkid.c b/mount/mount_blkid.c +deleted file mode 100644 +index 8fa30a1..0000000 +--- a/mount/mount_blkid.c ++++ /dev/null +@@ -1,111 +0,0 @@ +-#include +-#include "mount_blkid.h" +- +-#ifdef HAVE_LIBBLKID +- +-blkid_cache blkid; +- +-void +-mount_blkid_get_cache(void) { +- blkid_get_cache(&blkid, NULL); +-} +- +-void +-mount_blkid_put_cache(void) { +- blkid_put_cache(blkid); +-} +- +-const char * +-mount_get_volume_label_by_spec(const char *spec) { +- return blkid_get_tag_value(blkid, "LABEL", spec); +-} +- +-const char * +-mount_get_devname(const char *spec) { +- return blkid_get_devname(blkid, spec, 0); +-} +- +-const char * +-mount_get_devname_by_uuid(const char *uuid) { +- return blkid_get_devname(blkid, "UUID", uuid); +-} +- +-const char * +-mount_get_devname_by_label(const char *label) { +- return blkid_get_devname(blkid, "LABEL", label); +-} +- +-/* Also when no UUID= or LABEL= occur? No verbose? No warnings? */ +-const char * +-mount_get_devname_for_mounting(const char *spec) { +- return blkid_get_devname(blkid, spec, 0); +-} +- +-#else +-#include +-#include "sundries.h" +-#include "mount_by_label.h" +-#include "nls.h" +- +-void +-mount_blkid_get_cache(void) { +-} +- +-void +-mount_blkid_put_cache(void) { +-} +- +-const char * +-mount_get_volume_label_by_spec(const char *spec) { +- return xstrdup(get_volume_label_by_spec(spec)); +-} +- +-const char * +-mount_get_devname(const char *spec) { +- if (!strncmp(spec, "UUID=", 5)) +- return get_spec_by_uuid(spec+5); +- if (!strncmp(spec, "LABEL=", 6)) +- return get_spec_by_volume_label(spec+6); +- return spec; +-} +- +-const char * +-mount_get_devname_by_uuid(const char *uuid) { +- return get_spec_by_uuid(uuid); +-} +- +-extern char *progname; +- +-const char * +-mount_get_devname_by_label(const char *volumelabel) { +- const char *spec, *spec2; +- +- spec = get_spec_by_volume_label(volumelabel); +- spec2 = second_occurrence_of_vol_label(volumelabel); +- if (spec2) +- die (EX_FAIL, +- _("%s: error: the label %s occurs on both %s and %s\n"), +- progname, volumelabel, spec, spec2); +- return spec; +-} +- +-const char * +-mount_get_devname_for_mounting(const char *spec) { +- const char *nspec; +- +- if (!strncmp(spec, "UUID=", 5)) { +- nspec = mount_get_devname_by_uuid(spec+5); +- if (nspec && verbose > 1) +- printf(_("mount: going to mount %s by UUID\n"), spec); +- } else if (!strncmp(spec, "LABEL=", 6)) { +- nspec = mount_get_devname_by_label(spec+6); +- if (nspec && verbose > 1) +- printf(_("mount: going to mount %s by label\n"), spec); +- } else +- nspec = spec; +- +- return nspec; +-} +- +- +-#endif +diff --git a/mount/mount_blkid.h b/mount/mount_blkid.h +deleted file mode 100644 +index c96ff8c..0000000 +--- a/mount/mount_blkid.h ++++ /dev/null +@@ -1,12 +0,0 @@ +-#ifdef HAVE_LIBBLKID +-#include +-extern blkid_cache blkid; +-#endif +- +-extern void mount_blkid_get_cache(void); +-extern void mount_blkid_put_cache(void); +-extern const char *mount_get_devname_by_uuid(const char *uuid); +-extern const char *mount_get_devname_by_label(const char *label); +-extern const char *mount_get_volume_label_by_spec(const char *spec); +-extern const char *mount_get_devname(const char *spec); +-extern const char *mount_get_devname_for_mounting(const char *spec); +diff --git a/mount/mount_guess_fstype.c b/mount/mount_guess_fstype.c +index f1637f1..51d8750 100644 +--- a/mount/mount_guess_fstype.c ++++ b/mount/mount_guess_fstype.c +@@ -38,7 +38,7 @@ + #include + #include + #include "linux_fs.h" +-#include "mount_blkid.h" ++#include "fsprobe.h" + #include "mount_guess_fstype.h" + #include "sundries.h" /* for xstrdup */ + #include "nls.h" +diff --git a/mount/swapon.c b/mount/swapon.c +index b6bcd75..af4ba96 100644 +--- a/mount/swapon.c ++++ b/mount/swapon.c +@@ -15,7 +15,7 @@ + #include "swap_constants.h" + #include "swapargs.h" + #include "nls.h" +-#include "mount_blkid.h" ++#include "fsprobe.h" + #include "mount_by_label.h" + #include "realpath.h" + +-- +1.5.0.6 + +- +To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + +This patch removes old FS detection code and enables +blkid code only when HAVE_BLKID is defined. + +Signed-off-by: Karel Zak +--- + mount/Makefile.am | 12 +- + mount/fsprobe_blkid.c | 67 ------- + mount/get_label_uuid.c | 221 ---------------------- + mount/get_label_uuid.h | 1 - + mount/linux_fs.h | 292 ----------------------------- + mount/mount.c | 1 - + mount/mount_by_label.c | 363 ------------------------------------ + mount/mount_by_label.h | 4 - + mount/mount_guess_fstype.c | 434 -------------------------------------------- + mount/swapon.c | 1 - + 10 files changed, 7 insertions(+), 1389 deletions(-) + +diff --git a/mount/Makefile.am b/mount/Makefile.am +index 930a0bf..6f63dcf 100644 +--- a/mount/Makefile.am ++++ b/mount/Makefile.am +@@ -7,13 +7,13 @@ sbin_PROGRAMS = losetup swapon + man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 + + MNTHDRS = fstab.h linux_fs.h mount_mntent.h mount_constants.h my_dev_t.h \ +- mount_paths.h get_label_uuid.h lomount.h fsprobe.h \ ++ mount_paths.h lomount.h fsprobe.h \ + mount_guess_fstype.h realpath.h xmalloc.h \ +- getusername.h loop.h mount_by_label.h mount_guess_rootdev.h \ ++ getusername.h loop.h mount_guess_rootdev.h \ + sundries.h + + mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ +- get_label_uuid.c mount_by_label.c fsprobe_blkid.c mount_guess_fstype.c \ ++ mount_guess_fstype.c \ + getusername.c \ + lomount.c \ + $(MNTHDRS) +@@ -22,7 +22,7 @@ mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a + mount_CFLAGS = $(SUID_CFLAGS) + + umount_SOURCES = umount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ +- getusername.c get_label_uuid.c mount_by_label.c fsprobe_blkid.c \ ++ getusername.c \ + lomount.c \ + $(MNTHDRS) + +@@ -30,13 +30,15 @@ umount_LDADD = $(top_srcdir)/lib/libenv.a + umount_CFLAGS = $(SUID_CFLAGS) + + swapon_SOURCES = swapon.c xmalloc.c \ +- get_label_uuid.c mount_by_label.c fsprobe_blkid.c \ + swap_constants.h realpath.c + + losetup_SOURCES = lomount.c loop.h lomount.h + losetup_CFLAGS = -DMAIN + + if HAVE_BLKID ++mount_SOURCES += fsprobe_blkid.c ++umount_SOURCES += fsprobe_blkid.c ++swapon_SOURCES += fsprobe_blkid.c + mount_LDADD += -lblkid -luuid + umount_LDADD += -lblkid -luuid + swapon_LDADD = -lblkid -luuid +diff --git a/mount/fsprobe_blkid.c b/mount/fsprobe_blkid.c +index 0616945..9ff4e31 100644 +--- a/mount/fsprobe_blkid.c ++++ b/mount/fsprobe_blkid.c +@@ -41,71 +41,4 @@ mount_get_devname_for_mounting(const char *spec) { + return blkid_get_devname(blkid, spec, 0); + } + +-#else +-#include +-#include "sundries.h" +-#include "mount_by_label.h" +-#include "nls.h" +- +-void +-mount_blkid_get_cache(void) { +-} +- +-void +-mount_blkid_put_cache(void) { +-} +- +-const char * +-mount_get_volume_label_by_spec(const char *spec) { +- return xstrdup(get_volume_label_by_spec(spec)); +-} +- +-const char * +-mount_get_devname(const char *spec) { +- if (!strncmp(spec, "UUID=", 5)) +- return get_spec_by_uuid(spec+5); +- if (!strncmp(spec, "LABEL=", 6)) +- return get_spec_by_volume_label(spec+6); +- return spec; +-} +- +-const char * +-mount_get_devname_by_uuid(const char *uuid) { +- return get_spec_by_uuid(uuid); +-} +- +-extern char *progname; +- +-const char * +-mount_get_devname_by_label(const char *volumelabel) { +- const char *spec, *spec2; +- +- spec = get_spec_by_volume_label(volumelabel); +- spec2 = second_occurrence_of_vol_label(volumelabel); +- if (spec2) +- die (EX_FAIL, +- _("%s: error: the label %s occurs on both %s and %s\n"), +- progname, volumelabel, spec, spec2); +- return spec; +-} +- +-const char * +-mount_get_devname_for_mounting(const char *spec) { +- const char *nspec; +- +- if (!strncmp(spec, "UUID=", 5)) { +- nspec = mount_get_devname_by_uuid(spec+5); +- if (nspec && verbose > 1) +- printf(_("mount: going to mount %s by UUID\n"), spec); +- } else if (!strncmp(spec, "LABEL=", 6)) { +- nspec = mount_get_devname_by_label(spec+6); +- if (nspec && verbose > 1) +- printf(_("mount: going to mount %s by label\n"), spec); +- } else +- nspec = spec; +- +- return nspec; +-} +- +- + #endif +diff --git a/mount/get_label_uuid.c b/mount/get_label_uuid.c +deleted file mode 100644 +index 6d92e07..0000000 +--- a/mount/get_label_uuid.c ++++ /dev/null +@@ -1,221 +0,0 @@ +-#ifndef HAVE_LIBBLKID +-/* +- * Get label. Used by mount, umount and swapon. +- */ +-#include +-#include +-#include +-#include +-#include +- +-#include "xmalloc.h" +-#include "linux_fs.h" +-#include "get_label_uuid.h" +-#include "../disk-utils/swapheader.h" +- +-/* +- * See whether this device has (the magic of) a RAID superblock at the end. +- * If so, it probably is, or has been, part of a RAID array. +- * +- * For the moment this test is switched off - it causes problems. +- * "Checking for a disk label should only be done on the full raid, +- * not on the disks that form the raid array. This test causes a lot of +- * problems when run on my striped promise fasttrak 100 array." +- */ +-static inline int +-is_raid_partition(int fd) { +-#if 0 +- struct mdp_super_block mdsb; +- int n; +- +- /* hardcode 4096 here in various places, because that's +- what it's defined to be. Note that even if we used +- the actual kernel headers, sizeof(mdp_super_t) is +- slightly larger in the 2.2 kernel on 64-bit archs, +- so using that wouldn't work. */ +- lseek(fd, -4096, SEEK_END); /* Ignore possible error +- about return value overflow */ +- n = 4096; +- if (sizeof(mdsb) < n) +- n = sizeof(mdsb); +- if (read(fd, &mdsb, n) != n) +- return 1; /* error */ +- return (mdsbmagic(mdsb) == MD_SB_MAGIC); +-#else +- return 0; +-#endif +-} +- +-int +-reiserfs_magic_version(const char *magic) { +- int rc = 0; +- +- if (!strncmp(magic, REISERFS_SUPER_MAGIC_STRING, +- strlen(REISERFS_SUPER_MAGIC_STRING))) +- rc = 1; +- if (!strncmp(magic, REISER2FS_SUPER_MAGIC_STRING, +- strlen(REISER2FS_SUPER_MAGIC_STRING))) +- rc = 2; +- if (!strncmp(magic, REISER3FS_SUPER_MAGIC_STRING, +- strlen(REISER3FS_SUPER_MAGIC_STRING))) +- rc = 3; +- return rc; +-} +- +-static void +-store_uuid(char *udest, char *usrc) { +- if (usrc) +- memcpy(udest, usrc, 16); +- else +- memset(udest, 0, 16); +-} +- +-static void +-store_label(char **ldest, char *lsrc, int len) { +- *ldest = xmalloc(len+1); +- memset(*ldest, 0, len+1); +- memcpy(*ldest, lsrc, len); +-} +- +-static int +-is_v1_swap_partition(int fd, char **label, char *uuid) { +- int n = getpagesize(); +- char *buf = xmalloc(n); +- struct swap_header_v1_2 *p = (struct swap_header_v1_2 *) buf; +- +- if (lseek(fd, 0, SEEK_SET) == 0 +- && read(fd, buf, n) == n +- && !strncmp(buf+n-10, "SWAPSPACE2", 10) +- && p->version == 1) { +- store_uuid(uuid, p->uuid); +- store_label(label, p->volume_name, 16); +- return 1; +- } +- return 0; +-} +- +- +-/* +- * Get both label and uuid. +- * For now, only ext2, ext3, xfs, ocfs, ocfs2, reiserfs, swap are supported +- * +- * Return 0 on success. +- */ +-int +-get_label_uuid(const char *device, char **label, char *uuid) { +- int fd; +- struct ext2_super_block e2sb; +- struct xfs_super_block xfsb; +- struct jfs_super_block jfssb; +- struct ocfs_volume_header ovh; /* Oracle */ +- struct ocfs_volume_label olbl; +- struct ocfs2_super_block osb; +- struct reiserfs_super_block reiserfssb; +- int blksize; +- int rv = 0; +- +- fd = open(device, O_RDONLY); +- if (fd < 0) +- return -1; +- +- /* If there is a RAID partition, or an error, ignore this partition */ +- if (is_raid_partition(fd)) { +- rv = 1; +- goto done; +- } +- +- if (is_v1_swap_partition(fd, label, uuid)) +- goto done; +- +- if (lseek(fd, 1024, SEEK_SET) == 1024 +- && read(fd, (char *) &e2sb, sizeof(e2sb)) == sizeof(e2sb) +- && (ext2magic(e2sb) == EXT2_SUPER_MAGIC)) { +- store_uuid(uuid, e2sb.s_uuid); +- store_label(label, e2sb.s_volume_name, +- sizeof(e2sb.s_volume_name)); +- goto done; +- } +- +- if (lseek(fd, 0, SEEK_SET) == 0 +- && read(fd, (char *) &xfsb, sizeof(xfsb)) == sizeof(xfsb) +- && (strncmp(xfsb.s_magic, XFS_SUPER_MAGIC, 4) == 0)) { +- store_uuid(uuid, xfsb.s_uuid); +- store_label(label, xfsb.s_fname, sizeof(xfsb.s_fname)); +- goto done; +- } +- +- if (lseek(fd, 0, SEEK_SET) == 0 +- && read(fd, (char *) &ovh, sizeof(ovh)) == sizeof(ovh) +- && (strncmp(ovh.signature, OCFS_MAGIC, sizeof(OCFS_MAGIC)) == 0) +- && (lseek(fd, 512, SEEK_SET) == 512) +- && read(fd, (char *) &olbl, sizeof(olbl)) == sizeof(olbl)) { +- store_uuid(uuid, NULL); +- store_label(label, olbl.label, ocfslabellen(olbl)); +- goto done; +- } +- +- if (lseek(fd, JFS_SUPER1_OFF, SEEK_SET) == JFS_SUPER1_OFF +- && read(fd, (char *) &jfssb, sizeof(jfssb)) == sizeof(jfssb) +- && (strncmp(jfssb.s_magic, JFS_MAGIC, 4) == 0)) { +- +-/* The situation for jfs is rather messy. The structure of the +- superblock changed a few times, but there seems to be no good way +- to check what kind of sb we have. +- Old (OS/2 compatible) jfs filesystems don't have UUIDs and have +- an 11-byte label in s_fpack[]. +- Kernel 2.5.6 supports jfs v1; 2.5.8 supports v2; 2.5.18 has label/uuid. +- Kernel 2.4.20 supports jfs v2 with label/uuid. +- s_version will be 2 for new filesystems using an external log. +- Other new filesystems will have version 1. +- Label and UUID can be set by jfs_tune. */ +- +-/* Let us believe label/uuid on v2, and on v1 only when label agrees +- with s_fpack in the first 11 bytes. */ +- +- if (assemble4le(jfssb.s_version) == 1 && +- strncmp(jfssb.s_label, jfssb.s_fpack, 11) != 0) { +- store_uuid(uuid, NULL); +- store_label(label, jfssb.s_fpack, +- sizeof(jfssb.s_fpack)); +- } else { +- store_uuid(uuid, jfssb.s_uuid); +- store_label(label, jfssb.s_label, +- sizeof(jfssb.s_label)); +- } +- goto done; +- } +- +- if (lseek(fd, REISERFS_DISK_OFFSET_IN_BYTES, SEEK_SET) +- == REISERFS_DISK_OFFSET_IN_BYTES +- && read(fd, (char *) &reiserfssb, sizeof(reiserfssb)) +- == sizeof(reiserfssb) +- /* Only 3.6.x format supers have labels or uuids. +- Label and UUID can be set by reiserfstune -l/-u. */ +- && reiserfs_magic_version(reiserfssb.s_magic) > 1) { +- store_uuid(uuid, reiserfssb.s_uuid); +- store_label(label, reiserfssb.s_label, +- sizeof(reiserfssb.s_label)); +- goto done; +- } +- +- for (blksize = OCFS2_MIN_BLOCKSIZE; +- blksize <= OCFS2_MAX_BLOCKSIZE; +- blksize <<= 1) { +- int blkoff = blksize * OCFS2_SUPER_BLOCK_BLKNO; +- +- if (lseek(fd, blkoff, SEEK_SET) == blkoff +- && read(fd, (char *) &osb, sizeof(osb)) == sizeof(osb) +- && strncmp(osb.signature, +- OCFS2_SUPER_BLOCK_SIGNATURE, +- sizeof(OCFS2_SUPER_BLOCK_SIGNATURE)) == 0) { +- store_uuid(uuid, osb.s_uuid); +- store_label(label, osb.s_label, sizeof(osb.s_label)); +- goto done; +- } +- } +- rv = 1; +- done: +- close(fd); +- return rv; +-} +-#endif +diff --git a/mount/get_label_uuid.h b/mount/get_label_uuid.h +deleted file mode 100644 +index f52cc52..0000000 +--- a/mount/get_label_uuid.h ++++ /dev/null +@@ -1 +0,0 @@ +-int get_label_uuid(const char *device, char **label, char *uuid); +diff --git a/mount/linux_fs.h b/mount/linux_fs.h +index 430cbed..e47da2f 100644 +--- a/mount/linux_fs.h ++++ b/mount/linux_fs.h +@@ -13,295 +13,3 @@ + #endif + #endif + +-#define MINIX_SUPER_MAGIC 0x137F /* minix v1, 14 char names */ +-#define MINIX_SUPER_MAGIC2 0x138F /* minix v1, 30 char names */ +-#define MINIX2_SUPER_MAGIC 0x2468 /* minix v2, 14 char names */ +-#define MINIX2_SUPER_MAGIC2 0x2478 /* minix v2, 30 char names */ +-struct minix_super_block { +- u_char s_dummy[16]; +- u_char s_magic[2]; +-}; +-#define minixmagic(s) assemble2le(s.s_magic) +- +-#define ISODCL(from, to) (to - from + 1) +-#define ISO_STANDARD_ID "CD001" +-struct iso_volume_descriptor { +- char type[ISODCL(1,1)]; /* 711 */ +- char id[ISODCL(2,6)]; +- char version[ISODCL(7,7)]; +- char data[ISODCL(8,2048)]; +-}; +- +-#define HS_STANDARD_ID "CDROM" +-struct hs_volume_descriptor { +- char foo[ISODCL ( 1, 8)]; /* 733 */ +- char type[ISODCL ( 9, 9)]; /* 711 */ +- char id[ISODCL ( 10, 14)]; +- char version[ISODCL ( 15, 15)]; /* 711 */ +- char data[ISODCL(16,2048)]; +-}; +- +-#define EXT_SUPER_MAGIC 0x137D +-struct ext_super_block { +- u_char s_dummy[56]; +- u_char s_magic[2]; +-}; +-#define extmagic(s) assemble2le(s.s_magic) +- +-#define EXT2_PRE_02B_MAGIC 0xEF51 +-#define EXT2_SUPER_MAGIC 0xEF53 +-#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004 +-struct ext2_super_block { +- u_char s_dummy1[56]; +- u_char s_magic[2]; +- u_char s_dummy2[34]; +- u_char s_feature_compat[4]; +- u_char s_feature_incompat[4]; +- u_char s_feature_ro_compat[4]; +- u_char s_uuid[16]; +- u_char s_volume_name[16]; +- u_char s_dummy3[88]; +- u_char s_journal_inum[4]; /* ext3 only */ +-}; +-#define ext2magic(s) assemble2le(s.s_magic) +- +-struct reiserfs_super_block +-{ +- u_char s_block_count[4]; +- u_char s_free_blocks[4]; +- u_char s_root_block[4]; +- u_char s_journal_block[4]; +- u_char s_journal_dev[4]; +- u_char s_orig_journal_size[4]; +- u_char s_journal_trans_max[4]; +- u_char s_journal_block_count[4]; +- u_char s_journal_max_batch[4]; +- u_char s_journal_max_commit_age[4]; +- u_char s_journal_max_trans_age[4]; +- u_char s_blocksize[2]; +- u_char s_oid_maxsize[2]; +- u_char s_oid_cursize[2]; +- u_char s_state[2]; +- u_char s_magic[10]; +- u_char s_dummy1[10]; +- u_char s_version[2]; /* only valid with relocated journal */ +- +- /* only valid in 3.6.x format --mason@suse.com */ +- u_char s_dummy2[10]; +- u_char s_uuid[16]; +- u_char s_label[16]; +-}; +-#define REISERFS_SUPER_MAGIC_STRING "ReIsErFs" +-#define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs" +-/* also known as REISER2FS_JR_SUPER_MAGIC_STRING */ +-#define REISER3FS_SUPER_MAGIC_STRING "ReIsEr3Fs" +-#define REISERFS_DISK_OFFSET_IN_BYTES (64 * 1024) +-/* the spot for the super in versions 3.5 - 3.5.10 (inclusive) */ +-#define REISERFS_OLD_DISK_OFFSET_IN_BYTES (8 * 1024) +- +-/* values of s_version when REISER3FS_SUPER_MAGIC_STRING is found */ +-#define REISERFS_VERSION_1 0 /* 3.5.x disk format */ +-#define REISERFS_VERSION_2 2 /* 3.6.x disk format */ +- +-extern int reiserfs_magic_version(const char *magic); +- +-#define _XIAFS_SUPER_MAGIC 0x012FD16D +-struct xiafs_super_block { +- u_char s_boot_segment[512]; /* 1st sector reserved for boot */ +- u_char s_dummy[60]; +- u_char s_magic[4]; +-}; +-#define xiafsmagic(s) assemble4le(s.s_magic) +- +-/* From jj@sunsite.ms.mff.cuni.cz Mon Mar 23 15:19:05 1998 */ +-#define UFS_SUPER_MAGIC_LE 0x00011954 +-#define UFS_SUPER_MAGIC_BE 0x54190100 +-struct ufs_super_block { +- u_char s_dummy[0x55c]; +- u_char s_magic[4]; +-}; +-#define ufsmagic(s) assemble4le(s.s_magic) +- +-/* From Richard.Russon@ait.co.uk Wed Feb 24 08:05:27 1999 */ +-#define NTFS_SUPER_MAGIC "NTFS" +-struct ntfs_super_block { +- u_char s_dummy[3]; +- u_char s_magic[4]; +-}; +- +-/* From inspection of a few FAT filesystems - aeb */ +-/* Unfortunately I find almost the same thing on an extended partition; +- it looks like a primary has some directory entries where the extended +- has a partition table: IO.SYS, MSDOS.SYS, WINBOOT.SYS */ +-struct fat_super_block { +- u_char s_dummy[3]; +- u_char s_os[8]; /* "MSDOS5.0" or "MSWIN4.0" or "MSWIN4.1" */ +- /* mtools-3.9.4 writes "MTOOL394" */ +- u_char s_dummy2[32]; +- u_char s_label[11]; /* for DOS? */ +- u_char s_fs[8]; /* "FAT12 " or "FAT16 " or all zero */ +- /* OS/2 BM has "FAT " here. */ +- u_char s_dummy3[9]; +- u_char s_label2[11]; /* for Windows? */ +- u_char s_fs2[8]; /* garbage or "FAT32 " */ +-}; +- +-#define XFS_SUPER_MAGIC "XFSB" +-struct xfs_super_block { +- u_char s_magic[4]; +- u_char s_dummy[28]; +- u_char s_uuid[16]; +- u_char s_dummy2[60]; +- u_char s_fname[12]; +-}; +- +-#define CRAMFS_SUPER_MAGIC 0x28cd3d45 +-#define CRAMFS_SUPER_MAGIC_BE 0x453dcd28 +-struct cramfs_super_block { +- u_char s_magic[4]; +- u_char s_dummy[12]; +- u_char s_id[16]; +-}; +-#define cramfsmagic(s) assemble4le(s.s_magic) +- +-#define HFS_SUPER_MAGIC 0x4244 +-struct hfs_super_block { +- u_char s_magic[2]; /* drSigWord */ +- u_char s_dummy[18]; +- u_char s_blksize[4]; /* drAlBlkSiz */ +-}; +-#define hfsmagic(s) assemble2be(s.s_magic) +-#define hfsblksize(s) assemble4be(s.s_blksize) +- +-#define HPFS_SUPER_MAGIC 0xf995e849 +-struct hpfs_super_block { +- u_char s_magic[4]; +- u_char s_magic2[4]; +-}; +-#define hpfsmagic(s) assemble4le(s.s_magic) +- +-struct adfs_super_block { +- u_char s_dummy[448]; +- u_char s_blksize[1]; +- u_char s_dummy2[62]; +- u_char s_checksum[1]; +-}; +-#define adfsblksize(s) ((uint) s.s_blksize[0]) +- +-/* found in first 4 bytes of block 1 */ +-struct vxfs_super_block { +- u_char s_magic[4]; +-}; +-#define vxfsmagic(s) assemble4le(s.s_magic) +-#define VXFS_SUPER_MAGIC 0xa501FCF5 +- +-struct jfs_super_block { +- char s_magic[4]; +- u_char s_version[4]; +- u_char s_dummy1[93]; +- char s_fpack[11]; +- u_char s_dummy2[24]; +- u_char s_uuid[16]; +- char s_label[16]; +-}; +-#define JFS_SUPER1_OFF 0x8000 +-#define JFS_MAGIC "JFS1" +- +-struct sysv_super_block { +- u_char s_dummy1[504]; +- u_char s_magic[4]; +- u_char type[4]; +-}; +-#define sysvmagic(s) assemble4le(s.s_magic) +-#define SYSV_SUPER_MAGIC 0xfd187e20 +- +-struct mdp_super_block { +- u_char md_magic[4]; +-}; +-#define MD_SB_MAGIC 0xa92b4efc +-#define mdsbmagic(s) assemble4le(s.md_magic) +- +-struct ocfs_volume_header { +- u_char minor_version[4]; +- u_char major_version[4]; +- u_char signature[128]; +-}; +- +-struct ocfs_volume_label { +- u_char disk_lock[48]; +- u_char label[64]; +- u_char label_len[2]; +-}; +- +-#define ocfslabellen(o) assemble2le(o.label_len) +-#define OCFS_MAGIC "OracleCFS" +- +-struct ocfs2_super_block { +- u_char signature[8]; +- u_char s_dummy1[184]; +- u_char s_dummy2[80]; +- u_char s_label[64]; +- u_char s_uuid[16]; +-}; +- +-#define OCFS2_MIN_BLOCKSIZE 512 +-#define OCFS2_MAX_BLOCKSIZE 4096 +-#define OCFS2_SUPER_BLOCK_BLKNO 2 +-#define OCFS2_SUPER_BLOCK_SIGNATURE "OCFSV2" +- +- +-struct efs_volume_directory { /* size 16 */ +- char vd_name[8]; +- char vd_lbn[4]; +- char vd_nbytes[4]; +-}; +- +-struct efs_partition_table { /* size 12 */ +- char pt_nblks[4]; +- char pt_firstlbn[4]; +- char pt_type[4]; +-}; +- +-struct efs_volume_header { /* size 512 */ +- char vh_magic[4]; +- short vh_rootpt; +- short vh_swappt; +- char vh_bootfile[16]; +- char pad[48]; +- struct efs_volume_directory vh_vd[15]; +- struct efs_partition_table vh_pt[16]; +- int vh_csum; +- int vh_fill; +-}; +- +-struct efs_super { +- char fs_stuff[512+28]; +- char fs_magic[4]; +- char fs_fname[6]; +- char fs_fpack[6]; +- /* ... */ +-}; +- +-#define EFS_VHMAGIC 0x0be5a941 /* big endian */ +-#define EFS_SBMAGIC 0x00072959 /* idem */ +-#define EFS_SBMAGIC2 0x0007295a /* idem */ +- +-static inline int +-assemble2le(unsigned char *p) { +- return (p[0] | (p[1] << 8)); +-} +- +-static inline int +-assemble2be(unsigned char *p) { +- return (p[1] | (p[0] << 8)); +-} +- +-static inline int +-assemble4le(unsigned char *p) { +- return (p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24)); +-} +- +-static inline int +-assemble4be(unsigned char *p) { +- return (p[3] | (p[2] << 8) | (p[1] << 16) | (p[0] << 24)); +-} +diff --git a/mount/mount.c b/mount/mount.c +index dfa44dc..309e41e 100644 +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -40,7 +40,6 @@ + #include "linux_fs.h" /* for BLKGETSIZE */ + #include "mount_guess_rootdev.h" + #include "mount_guess_fstype.h" +-#include "mount_by_label.h" + #include "getusername.h" + #include "mount_paths.h" + #include "env.h" +diff --git a/mount/mount_by_label.c b/mount/mount_by_label.c +deleted file mode 100644 +index 4899f03..0000000 +--- a/mount/mount_by_label.c ++++ /dev/null +@@ -1,363 +0,0 @@ +-#ifndef HAVE_LIBBLKID +-/* +- * mount_by_label.c - aeb +- * +- * 1999-02-22 Arkadiusz Mi¶kiewicz +- * - added Native Language Support +- * 2000-01-20 James Antill +- * - Added error message if /proc/partitions cannot be opened +- * 2000-05-09 Erik Troan +- * - Added cache for UUID and disk labels +- * 2000-11-07 Nathan Scott +- * - Added XFS support +- * 2001-11-22 Kirby Bohling +- * - Added support of labels on LVM +- * 2002-03-21 Christoph Hellwig +- * - Added JFS support +- * 2002-07-11 Christoph Hellwig +- * - Added JFS v2 format support +- * 2002-07-26 Luciano Chavez +- * - Added EVMS support +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include /* needed for opendir */ +-#include +-#include "sundries.h" /* for xstrdup */ +-#include "linux_fs.h" +-#include "get_label_uuid.h" +-#include "mount_by_label.h" +-#include "nls.h" +- +-#define PROC_PARTITIONS "/proc/partitions" +-#define DEVLABELDIR "/dev" +-#define VG_DIR "/proc/lvm/VGs" +-#define EVMS_VOLUME_NAME_SIZE 127 +-#define PROC_EVMS_VOLUMES "/proc/evms/volumes" +- +-extern char *progname; +- +-static struct uuidCache_s { +- struct uuidCache_s *next; +- char uuid[16]; +- char *label; +- char *device; +-} *uuidCache = NULL; +- +-static void +-uuidcache_addentry(char *device, char *label, char *uuid) { +- struct uuidCache_s *last; +- +- if (!uuidCache) { +- last = uuidCache = malloc(sizeof(*uuidCache)); +- } else { +- for (last = uuidCache; last->next; last = last->next); +- last->next = malloc(sizeof(*uuidCache)); +- last = last->next; +- } +- last->next = NULL; +- last->device = device; +- last->label = label; +- memcpy(last->uuid, uuid, sizeof(last->uuid)); +-} +- +-/* LVM support - Kirby Bohling */ +-static void +-uuidcache_init_lvm(void) { +- char buffer[PATH_MAX]; +- char lvm_device[PATH_MAX]; +- DIR *vg_dir, *lv_list; +- struct dirent *vg_iter, *lv_iter; +- char uuid[16], *label; +- +- vg_dir = opendir(VG_DIR); +- if (vg_dir == NULL) /* to be expected */ +- return; +- +- seekdir(vg_dir, 2); +- while ((vg_iter = readdir(vg_dir)) != 0) { +- sprintf(buffer, "%s/%s/LVs", VG_DIR, vg_iter->d_name); +- lv_list = opendir(buffer); +- if (lv_list == NULL) { +- perror("uuidcache_init_lvm"); +- continue; +- } +- seekdir(lv_list, 2); +- while ((lv_iter = readdir(lv_list)) != 0) { +- /* Now we have the file.. could open it and read out +- * where the device is, read the first line, second +- * field... Instead we guess. +- */ +- sprintf(lvm_device, "%s/%s/%s", DEVLABELDIR, +- vg_iter->d_name, lv_iter->d_name); +- if (!get_label_uuid(lvm_device, &label, uuid)) +- uuidcache_addentry(xstrdup(lvm_device), +- label, uuid); +- } +- closedir(lv_list); +- } +- closedir(vg_dir); +-} +- +-static int +-uuidcache_init_evms(void) { +- FILE *procvol; +- char *label; +- char uuid[16]; +- char volname[EVMS_VOLUME_NAME_SIZE+1]; +- char line[EVMS_VOLUME_NAME_SIZE+80]; +- +- procvol = fopen(PROC_EVMS_VOLUMES, "r"); +- if (!procvol) +- return 0; +- +- while (fgets(line, sizeof(line), procvol)) { +- if (sscanf(line, "%*d %*d %*d %*s %*s %[^\n]", volname) == 1) { +- if (!get_label_uuid(volname, &label, uuid)) +- uuidcache_addentry(xstrdup(volname), label, uuid); +- } +- } +- +- fclose(procvol); +- +- return 1; +-} +- +-/* +- * xvm is a proprietary sgi volume manager, it goes into /proc/partitions +- * like this: +- * +- * 4 0 2210817 xvm/local/vol/myvolume/data/block +- * 4 1 2210817 xvm/local/vol/myvolume/rt/block +- * 4 2 2210817 xvm/local/vol/myvolume/log/block +- * 4 3 2210818 xvm/local/vol/discs3/data/block +- * +- * The heuristics here are that the device should start with "xvm," +- * but should not end in "log/block" or "rt/block" - those are +- * special devices for the xfs filesystem external log & realtime device. +- */ +- +-/* Return 1 if this looks like an xvm device that should be scanned */ +-static int +-is_xvm(char *ptname) +-{ +- int len; +- +- /* if it doesn't start with "xvm," we're done. */ +- if (strncmp(ptname, "xvm", 3)) +- return 0; +- +- len = strlen(ptname); +- /* +- * check for "log/block" or "rt/block" on the end, +- * these are special - don't scan. +- */ +- if (!strncmp(ptname+(len-9), "log/block", 9) || +- !strncmp(ptname+(len-8), "rt/block", 8)) +- return 0; +- +- return 1; +-} +- +-static void +-uuidcache_init(void) { +- char line[100]; +- char *s; +- int ma, mi, sz; +- static char ptname[100]; +- FILE *procpt; +- char uuid[16], *label; +- char device[110]; +- int firstPass; +- int handleOnFirst; +-#if 0 +- char iobuf[32*1024]; /* For setvbuf */ +-#endif +- +- if (uuidCache) +- return; +- +- if (uuidcache_init_evms()) +- return; +- +- procpt = fopen(PROC_PARTITIONS, "r"); +- if (!procpt) { +- static int warn = 0; +- if (!warn++) +- error (_("%s: could not open %s, so UUID and LABEL " +- "conversion cannot be done.\n"), +- progname, PROC_PARTITIONS); +- return; +- } +-#if 0 +-/* Ugly kludge - the contents of /proc/partitions change in time, +- and this causes failures when the file is not read in one go. +- In particular, one cannot use stdio on /proc/partitions. +- Doing this ourselves is not easy either, since stat returns 0 +- so the size is unknown. We might try increasing buffer sizes +- until a single read gets all. For now only pick a largish buffer size. */ +-/* All these troubles are mainly caused by people who patch the kernel +- to keep statistics in /proc/partitions. Of course, statistics belong +- in some /proc/diskstats, not in some /proc file that happened to +- exist already. */ +- +- setvbuf(procpt, iobuf, _IOFBF, sizeof(iobuf)); +-#endif +- +- for (firstPass = 1; firstPass >= 0; firstPass--) { +- fseek(procpt, 0, SEEK_SET); +- +- while (fgets(line, sizeof(line), procpt)) { +- if (!index(line, '\n')) +- break; +- +- if (sscanf (line, " %d %d %d %[^\n ]", +- &ma, &mi, &sz, ptname) != 4) +- continue; +- +- /* skip extended partitions (heuristic: size 1) */ +- if (sz == 1) +- continue; +- +- /* look only at md devices on first pass */ +- handleOnFirst = !strncmp(ptname, "md", 2); +- if (firstPass != handleOnFirst) +- continue; +- +- /* skip entire disk (minor 0, 64, ... on ide; +- 0, 16, ... on sd) */ +- /* heuristic: partition name ends in a digit */ +- /* devfs has .../disc and .../part1 etc. */ +- +- for (s = ptname; *s; s++); +- if (isdigit(s[-1]) || is_xvm(ptname)) { +- +- /* +- * Note: this is a heuristic only - there is no reason +- * why these devices should live in /dev. +- * Perhaps this directory should be specifiable by option. +- * One might for example have /devlabel with links to /dev +- * for the devices that may be accessed in this way. +- * (This is useful, if the cdrom on /dev/hdc must not +- * be accessed.) +- */ +- sprintf(device, "%s/%s", DEVLABELDIR, ptname); +- if (!get_label_uuid(device, &label, uuid)) +- uuidcache_addentry(xstrdup(device), label, uuid); +- } +- } +- } +- +- fclose(procpt); +- +- uuidcache_init_lvm(); +-} +- +-#define UUID 1 +-#define VOL 2 +- +-static const char * +-get_spec_by_x(int n, const char *t) { +- struct uuidCache_s *uc; +- +- uuidcache_init(); +- uc = uuidCache; +- +- while (uc) { +- switch (n) { +- case UUID: +- if (!memcmp(t, uc->uuid, sizeof(uc->uuid))) +- return xstrdup(uc->device); +- break; +- case VOL: +- if (uc->label && !strcmp(t, uc->label)) +- return xstrdup(uc->device); +- break; +- } +- uc = uc->next; +- } +- return NULL; +-} +- +-static u_char +-fromhex(char c) { +- if (isdigit(c)) +- return (c - '0'); +- else if (islower(c)) +- return (c - 'a' + 10); +- else +- return (c - 'A' + 10); +-} +- +-const char * +-get_spec_by_uuid(const char *s) { +- u_char uuid[16]; +- int i; +- +- if (strlen(s) != 36 || +- s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-') +- goto bad_uuid; +- for (i=0; i<16; i++) { +- if (*s == '-') s++; +- if (!isxdigit(s[0]) || !isxdigit(s[1])) +- goto bad_uuid; +- uuid[i] = ((fromhex(s[0])<<4) | fromhex(s[1])); +- s += 2; +- } +- return get_spec_by_x(UUID, uuid); +- +- bad_uuid: +- die(EX_USAGE, _("%s: bad UUID"), progname); +- return NULL; /* just for gcc */ +-} +- +-const char * +-get_spec_by_volume_label(const char *s) { +- return get_spec_by_x(VOL, s); +-} +- +-const char * +-get_volume_label_by_spec(const char *spec) { +- struct uuidCache_s *uc; +- +- uuidcache_init(); +- uc = uuidCache; +- +- while(uc) { +- if (!strcmp(spec, uc->device)) +- return uc->label; +- uc = uc->next; +- } +- return NULL; +-} +- +-/* +- * second_occurrence_of_vol_label() +- * As labels are user defined they are not necessarily +- * system-wide unique. Make sure that they are. +- */ +-const char * +-second_occurrence_of_vol_label (const char *label) { +- struct uuidCache_s *last; +- int occurrences = 0; +- +- uuidcache_init(); +- +- for (last = uuidCache; last; last = last->next) { +- if (last->label && !strcmp(last->label, label)) { +- occurrences++; +- if (occurrences == 2) +- return last->device; +- } +- } +- +- return NULL; +-} +- +- +-#endif +diff --git a/mount/mount_by_label.h b/mount/mount_by_label.h +deleted file mode 100644 +index f5c930d..0000000 +--- a/mount/mount_by_label.h ++++ /dev/null +@@ -1,4 +0,0 @@ +-const char *get_spec_by_uuid(const char *uuid); +-const char *get_spec_by_volume_label(const char *volumelabel); +-const char *get_volume_label_by_spec(const char *spec); +-const char *second_occurrence_of_vol_label(const char *label); +diff --git a/mount/mount_guess_fstype.c b/mount/mount_guess_fstype.c +index 51d8750..01c3fc7 100644 +--- a/mount/mount_guess_fstype.c ++++ b/mount/mount_guess_fstype.c +@@ -46,8 +46,6 @@ + #define ETC_FILESYSTEMS "/etc/filesystems" + #define PROC_FILESYSTEMS "/proc/filesystems" + +-#ifdef HAVE_LIBBLKID +- + char * + do_guess_fstype(const char *device) + { +@@ -60,438 +58,6 @@ known_fstype(const char *fstype) + return blkid_known_fstype(fstype); + } + +-#else +-#define SIZE(a) (sizeof(a)/sizeof(a[0])) +- +-/* Most file system types can be recognized by a `magic' number +- in the superblock. Note that the order of the tests is +- significant: by coincidence a filesystem can have the +- magic numbers for several file system types simultaneously. +- For example, the romfs magic lives in the 1st sector; +- xiafs does not touch the 1st sector and has its magic in +- the 2nd sector; ext2 does not touch the first two sectors. */ +- +-static inline unsigned short +-swapped(unsigned short a) { +- return (a>>8) | (a<<8); +-} +- +-/* +- char *guess_fstype(const char *device); +- +- Probes the device and attempts to determine the type of filesystem +- contained within. +- +- Original routine by ; made into a function +- for mount(8) by Mike Grupenhoff . +- Corrected the test for xiafs - aeb +- Read the superblock only once - aeb +- Added a very weak heuristic for vfat - aeb +- Added efs, iso9660, minix-v2, romfs, qnx4, udf, vxfs, swap - aeb +- Added a test for high sierra (iso9660) - quinlan@bucknell.edu +- Added ufs from a patch by jj. But maybe there are several types of ufs? +- Added ntfs from a patch by Richard Russon. +- Added xfs - 2000-03-21 Martin K. Petersen +- Added cramfs, hfs, hpfs, adfs - Sepp Wijnands +- Added ext3 - Andrew Morton +- Added jfs - Christoph Hellwig +- Added sysv - Tim Launchbury +- Added udf - Bryce Nesbitt +- Added ocfs, ocfs2 - Manish Singh - http://oss.oracle.com/projects/ocfs2/ +-*/ +-static char +-*magic_known[] = { +- "adfs", "bfs", "cramfs", "efs", "ext", "ext2", "ext3", +- "hfs", "hpfs", "iso9660", "jfs", "minix", "ntfs", "ocfs", "ocfs2", +- "qnx4", "reiserfs", "romfs", "swap", "sysv", "udf", "ufs", +- "vxfs", "xfs", "xiafs" +-}; +- +-static int +-known_fstype(const char *fstype) { +- char **m; +- +- for (m = magic_known; m - magic_known < SIZE(magic_known); m++) +- if (!strcmp(*m, fstype)) +- return 1; +- return 0; +-} +- +-/* +- * udf magic - I find that trying to mount garbage as an udf fs +- * causes a very large kernel delay, almost killing the machine. +- * So, we do not try udf unless there is positive evidence that it +- * might work. Strings below taken from ECMA 167. +- */ +-/* +- * It seems that before udf 2.00 the volume descriptor was not well +- * defined. For 2.00 you're supposed to keep scanning records until +- * you find one NOT in this list. (See ECMA 2/8.3.1). +- */ +-static char +-*udf_magic[] = { "BEA01", "BOOT2", "CD001", "CDW02", "NSR02", +- "NSR03", "TEA01" }; +- +- +-static int +-may_be_udf(const char *id) { +- char **m; +- +- for (m = udf_magic; m - udf_magic < SIZE(udf_magic); m++) +- if (!strncmp(*m, id, 5)) +- return 1; +- return 0; +-} +- +-/* we saw "CD001" - may be iso9660 or udf - Bryce Nesbitt */ +-static int +-is_really_udf(int fd) { +- int j, bs; +- struct iso_volume_descriptor isosb; +- +- /* determine the block size by scanning in 2K increments +- (block sizes larger than 2K will be null padded) */ +- for (bs = 1; bs < 16; bs++) { +- lseek(fd, bs*2048+32768, SEEK_SET); +- if (read(fd, (char *)&isosb, sizeof(isosb)) != sizeof(isosb)) +- return 0; +- if (isosb.id[0]) +- break; +- } +- +- /* Scan up to another 64 blocks looking for additional VSD's */ +- for (j = 1; j < 64; j++) { +- if (j > 1) { +- lseek(fd, j*bs*2048+32768, SEEK_SET); +- if (read(fd, (char *)&isosb, sizeof(isosb)) +- != sizeof(isosb)) +- return 0; +- } +- /* If we find NSR0x then call it udf: +- NSR01 for UDF 1.00 +- NSR02 for UDF 1.50 +- NSR03 for UDF 2.00 */ +- if (!strncmp(isosb.id, "NSR0", 4)) +- return 1; +- if (!may_be_udf(isosb.id)) +- return 0; +- } +- +- return 0; +-} +- +-static int +-may_be_swap(const char *s) { +- return (strncmp(s-10, "SWAP-SPACE", 10) == 0 || +- strncmp(s-10, "SWAPSPACE2", 10) == 0); +-} +- +-/* rather weak necessary condition */ +-static int +-may_be_adfs(const u_char *s) { +- u_char *p; +- int sum; +- +- p = (u_char *) s + 511; +- sum = 0; +- while (--p != s) +- sum = (sum >> 8) + (sum & 0xff) + *p; +- +- return (sum == p[511]); +-} +- +-char * +-do_guess_fstype(const char *device) { +- int fd; +- char *type = NULL; +- union { +- struct xiafs_super_block xiasb; +- char romfs_magic[8]; +- char qnx4fs_magic[10]; /* ignore first 4 bytes */ +- long bfs_magic; +- struct ntfs_super_block ntfssb; +- struct fat_super_block fatsb; +- struct xfs_super_block xfsb; +- struct cramfs_super_block cramfssb; +- struct ocfs_volume_header ovh; +- struct efs_volume_header efsvh; +- struct efs_super efssb; +- } xsb; /* stuff at 0 */ +- union { +- struct minix_super_block ms; +- struct ext_super_block es; +- struct ext2_super_block e2s; +- struct vxfs_super_block vs; +- } sb; /* stuff at 1024 */ +- struct ufs_super_block ufssb; +- union { +- struct iso_volume_descriptor iso; +- struct hs_volume_descriptor hs; +- } isosb; +- struct reiserfs_super_block reiserfssb; /* block 64 or 8 */ +- struct jfs_super_block jfssb; /* block 32 */ +- struct hfs_super_block hfssb; +- struct hpfs_super_block hpfssb; +- struct adfs_super_block adfssb; +- struct sysv_super_block svsb; +- struct ocfs2_super_block osb; +- struct stat statbuf; +- +- /* opening and reading an arbitrary unknown path can have +- undesired side effects - first check that `device' refers +- to a block device or ordinary file */ +- if (stat (device, &statbuf) || +- !(S_ISBLK(statbuf.st_mode) || S_ISREG(statbuf.st_mode))) +- return 0; +- +- fd = open(device, O_RDONLY); +- if (fd < 0) +- return 0; +- +- /* do seeks and reads in disk order, otherwise a very short +- partition may cause a failure because of read error */ +- +- if (!type) { +- /* block 0 */ +- if (lseek(fd, 0, SEEK_SET) != 0 +- || read(fd, (char *) &xsb, sizeof(xsb)) != sizeof(xsb)) +- goto try_iso9660; +- /* Gyorgy Kovesdi: none of my photocds has a readable block 0 */ +- +- if (xiafsmagic(xsb.xiasb) == _XIAFS_SUPER_MAGIC) +- type = "xiafs"; +- else if(!strncmp(xsb.romfs_magic, "-rom1fs-", 8)) +- type = "romfs"; +- else if(!strncmp(xsb.xfsb.s_magic, XFS_SUPER_MAGIC, 4)) +- type = "xfs"; +- else if(!strncmp(xsb.ovh.signature, OCFS_MAGIC, sizeof(OCFS_MAGIC))) +- type = "ocfs"; +- else if(!strncmp(xsb.qnx4fs_magic+4, "QNX4FS", 6)) +- type = "qnx4"; +- else if(xsb.bfs_magic == 0x1badface) +- type = "bfs"; +- else if(!strncmp(xsb.ntfssb.s_magic, NTFS_SUPER_MAGIC, +- sizeof(xsb.ntfssb.s_magic))) +- type = "ntfs"; +- else if(cramfsmagic(xsb.cramfssb) == CRAMFS_SUPER_MAGIC || +- cramfsmagic(xsb.cramfssb) == CRAMFS_SUPER_MAGIC_BE) +- type = "cramfs"; +- else if (assemble4be(xsb.efsvh.vh_magic) == EFS_VHMAGIC) +- type = "efs"; /* EFS volume header */ +- /* might check checksum here */ +- else if (assemble4be(xsb.efssb.fs_magic) == EFS_SBMAGIC || +- assemble4be(xsb.efssb.fs_magic) == EFS_SBMAGIC2) +- type = "efs"; /* EFS partition */ +- else if ((!strncmp(xsb.fatsb.s_os, "MSDOS", 5) || +- !strncmp(xsb.fatsb.s_os, "MSWIN", 5) || +- !strncmp(xsb.fatsb.s_os, "MTOOL", 5) || +- !strncmp(xsb.fatsb.s_os, "IBM", 3) || +- !strncmp(xsb.fatsb.s_os, "DRDOS", 5) || +- !strncmp(xsb.fatsb.s_os, "mkdosfs", 7) || +- !strncmp(xsb.fatsb.s_os, "kmkdosfs", 8) || +- /* Michal Svec: created by fdformat, old msdos utility for +- formatting large (1.7) floppy disks. */ +- !strncmp(xsb.fatsb.s_os, "CH-FOR18", 8)) +- && (!strncmp(xsb.fatsb.s_fs, "FAT12 ", 8) || +- !strncmp(xsb.fatsb.s_fs, "FAT16 ", 8) || +- !strncmp(xsb.fatsb.s_fs2, "FAT32 ", 8))) +- type = "vfat"; /* only guessing - might as well be fat or umsdos */ +- } +- +- if (!type) { +- /* sector 1 */ +- if (lseek(fd, 512 , SEEK_SET) != 512 +- || read(fd, (char *) &svsb, sizeof(svsb)) != sizeof(svsb)) +- goto io_error; +- if (sysvmagic(svsb) == SYSV_SUPER_MAGIC ) +- type = "sysv"; +- } +- +- if (!type) { +- /* block 1 */ +- if (lseek(fd, 1024, SEEK_SET) != 1024 || +- read(fd, (char *) &sb, sizeof(sb)) != sizeof(sb)) +- goto io_error; +- +- /* ext2 has magic in little-endian on disk, so "swapped" is +- superfluous; however, there have existed strange byteswapped +- PPC ext2 systems */ +- if (ext2magic(sb.e2s) == EXT2_SUPER_MAGIC || +- ext2magic(sb.e2s) == EXT2_PRE_02B_MAGIC || +- ext2magic(sb.e2s) == swapped(EXT2_SUPER_MAGIC)) { +- type = "ext2"; +- +- /* maybe even ext3? */ +- if ((assemble4le(sb.e2s.s_feature_compat) +- & EXT3_FEATURE_COMPAT_HAS_JOURNAL) && +- assemble4le(sb.e2s.s_journal_inum) != 0) +- type = "ext3"; /* "ext3,ext2" */ +- } +- +- else if (minixmagic(sb.ms) == MINIX_SUPER_MAGIC || +- minixmagic(sb.ms) == MINIX_SUPER_MAGIC2 || +- minixmagic(sb.ms) == swapped(MINIX_SUPER_MAGIC2) || +- minixmagic(sb.ms) == MINIX2_SUPER_MAGIC || +- minixmagic(sb.ms) == MINIX2_SUPER_MAGIC2) +- type = "minix"; +- +- else if (extmagic(sb.es) == EXT_SUPER_MAGIC) +- type = "ext"; +- +- else if (vxfsmagic(sb.vs) == VXFS_SUPER_MAGIC) +- type = "vxfs"; +- } +- +- if (!type) { +- /* block 1 */ +- if (lseek(fd, 0x400, SEEK_SET) != 0x400 +- || read(fd, (char *) &hfssb, sizeof(hfssb)) != sizeof(hfssb)) +- goto io_error; +- +- /* also check if block size is equal to 512 bytes, +- or a multiple. (I see 1536 here.) */ +- if (hfsmagic(hfssb) == HFS_SUPER_MAGIC && /* always BE */ +- hfsblksize(hfssb) != 0 && +- (hfsblksize(hfssb) & 0x1ff) == 0) +- type = "hfs"; +- } +- +- if (!type) { +- /* block 3 */ +- if (lseek(fd, 0xc00, SEEK_SET) != 0xc00 +- || read(fd, (char *) &adfssb, sizeof(adfssb)) != sizeof(adfssb)) +- goto io_error; +- +- /* only a weak test */ +- if (may_be_adfs((u_char *) &adfssb) +- && (adfsblksize(adfssb) >= 8 && +- adfsblksize(adfssb) <= 10)) +- type = "adfs"; +- } +- +- if (!type) { +- int mag; +- +- /* block 8 */ +- if (lseek(fd, 8192, SEEK_SET) != 8192 +- || read(fd, (char *) &ufssb, sizeof(ufssb)) != sizeof(ufssb)) +- goto io_error; +- +- mag = ufsmagic(ufssb); +- if (mag == UFS_SUPER_MAGIC_LE || mag == UFS_SUPER_MAGIC_BE) +- type = "ufs"; +- } +- +- if (!type) { +- /* block 8 */ +- if (lseek(fd, REISERFS_OLD_DISK_OFFSET_IN_BYTES, SEEK_SET) != +- REISERFS_OLD_DISK_OFFSET_IN_BYTES +- || read(fd, (char *) &reiserfssb, sizeof(reiserfssb)) != +- sizeof(reiserfssb)) +- goto io_error; +- if (reiserfs_magic_version(reiserfssb.s_magic)) +- type = "reiserfs"; +- } +- +- if (!type) { +- /* block 8 */ +- if (lseek(fd, 0x2000, SEEK_SET) != 0x2000 +- || read(fd, (char *) &hpfssb, sizeof(hpfssb)) != sizeof(hpfssb)) +- goto io_error; +- +- if (hpfsmagic(hpfssb) == HPFS_SUPER_MAGIC) +- type = "hpfs"; +- } +- +- if (!type) { +- /* block 32 */ +- if (lseek(fd, JFS_SUPER1_OFF, SEEK_SET) != JFS_SUPER1_OFF +- || read(fd, (char *) &jfssb, sizeof(jfssb)) != sizeof(jfssb)) +- goto io_error; +- if (!strncmp(jfssb.s_magic, JFS_MAGIC, 4)) +- type = "jfs"; +- } +- +- if (!type) { +- /* block 32 */ +- try_iso9660: +- if (lseek(fd, 0x8000, SEEK_SET) != 0x8000 +- || read(fd, (char *) &isosb, sizeof(isosb)) != sizeof(isosb)) +- goto io_error; +- +- if (strncmp(isosb.hs.id, HS_STANDARD_ID, sizeof(isosb.hs.id)) == 0) { +- /* "CDROM" */ +- type = "iso9660"; +- } else if (strncmp(isosb.iso.id, ISO_STANDARD_ID, +- sizeof(isosb.iso.id)) == 0) { +- /* CD001 */ +- type = "iso9660"; +- if (is_really_udf(fd)) +- type = "udf"; +- } else if (may_be_udf(isosb.iso.id)) +- type = "udf"; +- } +- +- if (!type) { +- /* block 64 */ +- if (lseek(fd, REISERFS_DISK_OFFSET_IN_BYTES, SEEK_SET) != +- REISERFS_DISK_OFFSET_IN_BYTES +- || read(fd, (char *) &reiserfssb, sizeof(reiserfssb)) != +- sizeof(reiserfssb)) +- goto io_error; +- if (reiserfs_magic_version(reiserfssb.s_magic)) +- type = "reiserfs"; +- } +- +- if (!type) { +- int blksize, blkoff; +- +- for (blksize = OCFS2_MIN_BLOCKSIZE; +- blksize <= OCFS2_MAX_BLOCKSIZE; +- blksize <<= 1) { +- blkoff = blksize * OCFS2_SUPER_BLOCK_BLKNO; +- if (lseek(fd, blkoff, SEEK_SET) != blkoff +- || read(fd, (char *) &osb, sizeof(osb)) != sizeof(osb)) +- goto io_error; +- if (strncmp(osb.signature, OCFS2_SUPER_BLOCK_SIGNATURE, +- sizeof(OCFS2_SUPER_BLOCK_SIGNATURE)) == 0) +- type = "ocfs2"; +- } +- } +- +- if (!type) { +- /* perhaps the user tries to mount the swap space +- on a new disk; warn her before she does mke2fs on it */ +- int pagesize = getpagesize(); +- int rd; +- char buf[32768]; +- +- rd = pagesize; +- if (rd < 8192) +- rd = 8192; +- if (rd > sizeof(buf)) +- rd = sizeof(buf); +- if (lseek(fd, 0, SEEK_SET) != 0 +- || read(fd, buf, rd) != rd) +- goto io_error; +- if (may_be_swap(buf+pagesize) || +- may_be_swap(buf+4096) || may_be_swap(buf+8192)) +- type = "swap"; +- } +- +- close (fd); +- return(type); +- +-io_error: +- if (errno) +- perror(device); +- else +- fprintf(stderr, _("mount: error while guessing filesystem type\n")); +- close(fd); +- return 0; +-} +- +-#endif + + static struct tried { + struct tried *next; +diff --git a/mount/swapon.c b/mount/swapon.c +index af4ba96..cb055b3 100644 +--- a/mount/swapon.c ++++ b/mount/swapon.c +@@ -16,7 +16,6 @@ + #include "swapargs.h" + #include "nls.h" + #include "fsprobe.h" +-#include "mount_by_label.h" + #include "realpath.h" + + #define streq(s, t) (strcmp ((s), (t)) == 0) +-- +1.5.0.6 + +- +To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + +Signed-off-by: Kay Sievers +Signed-off-by: Karel Zak +--- + mount/Makefile.am | 15 +-- + mount/fsprobe.c | 164 ++++++++++++++++++++++++++++++++ + mount/fsprobe.h | 17 ++++ + mount/fsprobe_blkid.c | 11 ++ + mount/mount.c | 43 +++++++-- + mount/mount_guess_fstype.c | 225 -------------------------------------------- + mount/mount_guess_fstype.h | 16 --- + mount/mount_paths.h | 3 + + 8 files changed, 232 insertions(+), 262 deletions(-) + +diff --git a/mount/Makefile.am b/mount/Makefile.am +index 6f63dcf..b5b21b5 100644 +--- a/mount/Makefile.am ++++ b/mount/Makefile.am +@@ -7,24 +7,17 @@ sbin_PROGRAMS = losetup swapon + man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 + + MNTHDRS = fstab.h linux_fs.h mount_mntent.h mount_constants.h my_dev_t.h \ +- mount_paths.h lomount.h fsprobe.h \ +- mount_guess_fstype.h realpath.h xmalloc.h \ +- getusername.h loop.h mount_guess_rootdev.h \ +- sundries.h ++ mount_paths.h lomount.h fsprobe.h realpath.h xmalloc.h \ ++ getusername.h loop.h mount_guess_rootdev.h sundries.h + + mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ +- mount_guess_fstype.c \ +- getusername.c \ +- lomount.c \ +- $(MNTHDRS) ++ fsprobe.c getusername.c lomount.c $(MNTHDRS) + + mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a + mount_CFLAGS = $(SUID_CFLAGS) + + umount_SOURCES = umount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ +- getusername.c \ +- lomount.c \ +- $(MNTHDRS) ++ getusername.c fsprobe.c lomount.c $(MNTHDRS) + + umount_LDADD = $(top_srcdir)/lib/libenv.a + umount_CFLAGS = $(SUID_CFLAGS) +diff --git a/mount/fsprobe.c b/mount/fsprobe.c +new file mode 100644 +index 0000000..4b57802 +--- /dev/null ++++ b/mount/fsprobe.c +@@ -0,0 +1,164 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "mount_paths.h" ++#include "linux_fs.h" ++#include "fsprobe.h" ++#include "sundries.h" /* for xstrdup */ ++#include "nls.h" ++ ++/* list of already tested filesystems by fsprobe_procfsloop_mount() */ ++static struct tried { ++ struct tried *next; ++ char *type; ++} *tried = NULL; ++ ++static int ++was_tested(const char *fstype) { ++ struct tried *t; ++ ++ if (fsprobe_known_fstype(fstype)) ++ return 1; ++ for (t = tried; t; t = t->next) { ++ if (!strcmp(t->type, fstype)) ++ return 1; ++ } ++ return 0; ++} ++ ++static void ++set_tested(const char *fstype) { ++ struct tried *t = xmalloc(sizeof(struct tried)); ++ ++ t->next = tried; ++ t->type = xstrdup(fstype); ++ tried = t; ++} ++ ++static void ++free_tested(void) { ++ struct tried *t, *tt; ++ ++ t = tried; ++ while(t) { ++ free(t->type); ++ tt = t->next; ++ free(t); ++ t = tt; ++ } ++ tried = NULL; ++} ++ ++static char * ++procfsnext(FILE *procfs) { ++ char line[100]; ++ char fsname[100]; ++ ++ while (fgets(line, sizeof(line), procfs)) { ++ if (sscanf (line, "nodev %[^\n]\n", fsname) == 1) continue; ++ if (sscanf (line, " %[^ \n]\n", fsname) != 1) continue; ++ return xstrdup(fsname); ++ } ++ return 0; ++} ++ ++/* Only use /proc/filesystems here, this is meant to test what ++ the kernel knows about, so /etc/filesystems is irrelevant. ++ Return: 1: yes, 0: no, -1: cannot open procfs */ ++int ++fsprobe_known_fstype_in_procfs(const char *type) ++{ ++ FILE *procfs; ++ char *fsname; ++ int ret = -1; ++ ++ procfs = fopen(PROC_FILESYSTEMS, "r"); ++ if (procfs) { ++ ret = 0; ++ while ((fsname = procfsnext(procfs)) != NULL) ++ if (!strcmp(fsname, type)) { ++ ret = 1; ++ break; ++ } ++ fclose(procfs); ++ procfs = NULL; ++ } ++ return ret; ++} ++ ++/* Try all types in FILESYSTEMS, except those in *types, ++ in case *types starts with "no" */ ++/* return: 0: OK, -1: error in errno, 1: type not found */ ++/* when 0 or -1 is returned, *types contains the type used */ ++/* when 1 is returned, *types is NULL */ ++int ++fsprobe_procfsloop_mount( int (*mount_fn)(struct mountargs *), ++ struct mountargs *args, ++ const char **types) ++{ ++ char *files[2] = { ETC_FILESYSTEMS, PROC_FILESYSTEMS }; ++ FILE *procfs; ++ char *fsname; ++ const char *notypes = NULL; ++ int no = 0; ++ int ret = 1; ++ int errsv = 0; ++ int i; ++ ++ if (*types && !strncmp(*types, "no", 2)) { ++ no = 1; ++ notypes = (*types) + 2; ++ } ++ *types = NULL; ++ ++ /* Use PROC_FILESYSTEMS only when ETC_FILESYSTEMS does not exist. ++ In some cases trying a filesystem that the kernel knows about ++ on the wrong data will crash the kernel; in such cases ++ ETC_FILESYSTEMS can be used to list the filesystems that we ++ are allowed to try, and in the order they should be tried. ++ End ETC_FILESYSTEMS with a line containing a single '*' only, ++ if PROC_FILESYSTEMS should be tried afterwards. */ ++ ++ for (i=0; i<2; i++) { ++ procfs = fopen(files[i], "r"); ++ if (!procfs) ++ continue; ++ while ((fsname = procfsnext(procfs)) != NULL) { ++ if (!strcmp(fsname, "*")) { ++ fclose(procfs); ++ goto nexti; ++ } ++ if (was_tested (fsname)) ++ continue; ++ if (no && matching_type(fsname, notypes)) ++ continue; ++ set_tested (fsname); ++ args->type = fsname; ++ if (verbose) { ++ printf(_("Trying %s\n"), fsname); ++ fflush(stdout); ++ } ++ if ((*mount_fn) (args) == 0) { ++ *types = fsname; ++ ret = 0; ++ break; ++ } else if (errno != EINVAL && ++ fsprobe_known_fstype_in_procfs(fsname) == 1) { ++ *types = "guess"; ++ ret = -1; ++ errsv = errno; ++ break; ++ } ++ } ++ free_tested(); ++ fclose(procfs); ++ errno = errsv; ++ return ret; ++ nexti:; ++ } ++ return 1; ++} +diff --git a/mount/fsprobe.h b/mount/fsprobe.h +index c96ff8c..cc429e1 100644 +--- a/mount/fsprobe.h ++++ b/mount/fsprobe.h +@@ -10,3 +10,20 @@ extern const char *mount_get_devname_by_label(const char *label); + extern const char *mount_get_volume_label_by_spec(const char *spec); + extern const char *mount_get_devname(const char *spec); + extern const char *mount_get_devname_for_mounting(const char *spec); ++extern int fsprobe_known_fstype(const char *fstype); ++extern const char *fsprobe_get_fstype_by_devname(const char *devname); ++ ++struct mountargs { ++ const char *spec; ++ const char *node; ++ const char *type; ++ int flags; ++ void *data; ++}; ++ ++extern int fsprobe_known_fstype_in_procfs(const char *type); ++ ++extern int fsprobe_procfsloop_mount(int (*mount_fn)(struct mountargs *), ++ struct mountargs *args, ++ const char **types); ++ +diff --git a/mount/fsprobe_blkid.c b/mount/fsprobe_blkid.c +index 9ff4e31..7f8c362 100644 +--- a/mount/fsprobe_blkid.c ++++ b/mount/fsprobe_blkid.c +@@ -41,4 +41,15 @@ mount_get_devname_for_mounting(const char *spec) { + return blkid_get_devname(blkid, spec, 0); + } + ++int ++fsprobe_known_fstype(const char *fstype) ++{ ++ return blkid_known_fstype(fstype); ++} ++ ++const char * ++fsprobe_get_fstype_by_devname(const char *devname) { ++ return blkid_get_tag_value(blkid, "TYPE", devname); ++} ++ + #endif +diff --git a/mount/mount.c b/mount/mount.c +index 309e41e..be9e409 100644 +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -39,7 +39,6 @@ + #include "loop.h" + #include "linux_fs.h" /* for BLKGETSIZE */ + #include "mount_guess_rootdev.h" +-#include "mount_guess_fstype.h" + #include "getusername.h" + #include "mount_paths.h" + #include "env.h" +@@ -656,6 +655,26 @@ check_special_mountprog(const char *spec, const char *node, const char *type, in + return 0; + } + ++ ++static const char * ++guess_fstype_by_devname(const char *devname) ++{ ++ const char *type = fsprobe_get_fstype_by_devname(devname); ++ ++ if (verbose) { ++ printf (_("mount: you didn't specify a filesystem type for %s\n"), devname); ++ ++ if (!type) ++ printf (_(" I will try all types mentioned in %s or %s\n"), ++ ETC_FILESYSTEMS, PROC_FILESYSTEMS); ++ else if (!strcmp(type, "swap")) ++ printf (_(" and it looks like this is swapspace\n")); ++ else ++ printf (_(" I will try type %s\n"), type); ++ } ++ return type; ++} ++ + /* + * guess_fstype_and_mount() + * Mount a single file system. Guess the type when unknown. +@@ -675,7 +694,7 @@ guess_fstype_and_mount(const char *spec, const char *node, const char **types, + *types = "none"; /* random, but not "bind" */ + + if (!*types && !(flags & MS_REMOUNT)) { +- *types = guess_fstype(spec); ++ *types = guess_fstype_by_devname(spec); + if (*types) { + if (!strcmp(*types, "swap")) { + error(_("%s looks like swapspace - not mounted"), spec); +@@ -711,7 +730,7 @@ guess_fstype_and_mount(const char *spec, const char *node, const char **types, + return do_mount_syscall (&args); + } + +- return procfsloop(do_mount_syscall, &args, types); ++ return fsprobe_procfsloop_mount(do_mount_syscall, &args, types); + } + + /* +@@ -1147,8 +1166,10 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, + case EIO: + error (_("mount: %s: can't read superblock"), spec); break; + case ENODEV: +- { int pfs; +- if ((pfs = is_in_procfs(types)) == 1 || !strcmp(types, "guess")) ++ { ++ int pfs = fsprobe_known_fstype_in_procfs(types); ++ ++ if (pfs == 1 || !strcmp(types, "guess")) + error(_("mount: %s: unknown device"), spec); + else if (pfs == 0) { + char *lowtype, *p; +@@ -1165,11 +1186,13 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, + u++; + } + } +- if (u && is_in_procfs(lowtype) == 1) ++ if (u && fsprobe_known_fstype_in_procfs(lowtype) == 1) + error (_("mount: probably you meant %s"), lowtype); +- else if (!strncmp(lowtype, "iso", 3) && is_in_procfs("iso9660") == 1) ++ else if (!strncmp(lowtype, "iso", 3) && ++ fsprobe_known_fstype_in_procfs("iso9660") == 1) + error (_("mount: maybe you meant 'iso9660'?")); +- else if (!strncmp(lowtype, "fat", 3) && is_in_procfs("vfat") == 1) ++ else if (!strncmp(lowtype, "fat", 3) && ++ fsprobe_known_fstype_in_procfs("vfat") == 1) + error (_("mount: maybe you meant 'vfat'?")); + free(lowtype); + } else +@@ -1741,8 +1764,8 @@ main(int argc, char *argv[]) { + use only for testing purposes - + the guessing is not reliable at all */ + { +- char *fstype; +- fstype = do_guess_fstype(optarg); ++ const char *fstype; ++ fstype = fsprobe_get_fstype_by_devname(optarg); + printf("%s\n", fstype ? fstype : "unknown"); + exit(fstype ? 0 : EX_FAIL); + } +diff --git a/mount/mount_guess_fstype.c b/mount/mount_guess_fstype.c +deleted file mode 100644 +index 01c3fc7..0000000 +--- a/mount/mount_guess_fstype.c ++++ /dev/null +@@ -1,225 +0,0 @@ +-/* +- * Thu Jul 14 07:32:40 1994: faith@cs.unc.edu added changes from Adam +- * J. Richter (adam@adam.yggdrasil.com) so that /proc/filesystems is used +- * if no -t option is given. I modified his patches so that, if +- * /proc/filesystems is not available, the behavior of mount is the same as +- * it was previously. +- * +- * Wed Feb 8 09:23:18 1995: Mike Grupenhoff added +- * a probe of the superblock for the type before /proc/filesystems is +- * checked. +- * +- * Fri Apr 5 01:13:33 1996: quinlan@bucknell.edu, fixed up iso9660 autodetect +- * +- * Wed Nov 11 11:33:55 1998: K.Garloff@ping.de, try /etc/filesystems before +- * /proc/filesystems +- * [This was mainly in order to specify vfat before fat; these days we often +- * detect *fat and then assume vfat, so perhaps /etc/filesystems isnt +- * so useful anymore.] +- * +- * 1999-02-22 Arkadiusz Mi¶kiewicz +- * added Native Language Support +- * +- * 2000-12-01 Sepp Wijnands +- * added probes for cramfs, hfs, hpfs and adfs. +- * +- * 2001-10-26 Tim Launchbury +- * added sysv magic. +- * +- * aeb - many changes. +- * +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include "linux_fs.h" +-#include "fsprobe.h" +-#include "mount_guess_fstype.h" +-#include "sundries.h" /* for xstrdup */ +-#include "nls.h" +- +-#define ETC_FILESYSTEMS "/etc/filesystems" +-#define PROC_FILESYSTEMS "/proc/filesystems" +- +-char * +-do_guess_fstype(const char *device) +-{ +- return blkid_get_tag_value(blkid, "TYPE", device); +-} +- +-static int +-known_fstype(const char *fstype) +-{ +- return blkid_known_fstype(fstype); +-} +- +- +-static struct tried { +- struct tried *next; +- char *type; +-} *tried = NULL; +- +-static int +-was_tested(const char *fstype) { +- struct tried *t; +- +- if (known_fstype(fstype)) +- return 1; +- for (t = tried; t; t = t->next) { +- if (!strcmp(t->type, fstype)) +- return 1; +- } +- return 0; +-} +- +-static void +-set_tested(const char *fstype) { +- struct tried *t = xmalloc(sizeof(struct tried)); +- +- t->next = tried; +- t->type = xstrdup(fstype); +- tried = t; +-} +- +-static void +-free_tested(void) { +- struct tried *t, *tt; +- +- t = tried; +- while(t) { +- free(t->type); +- tt = t->next; +- free(t); +- t = tt; +- } +- tried = NULL; +-} +- +-char * +-guess_fstype(const char *spec) { +- char *type = do_guess_fstype(spec); +- if (verbose) { +- printf (_("mount: you didn't specify a filesystem type for %s\n"), +- spec); +- if (!type) +- printf (_(" I will try all types mentioned in %s or %s\n"), +- ETC_FILESYSTEMS, PROC_FILESYSTEMS); +- else if (!strcmp(type, "swap")) +- printf (_(" and it looks like this is swapspace\n")); +- else +- printf (_(" I will try type %s\n"), type); +- } +- return type; +-} +- +-static char * +-procfsnext(FILE *procfs) { +- char line[100]; +- char fsname[100]; +- +- while (fgets(line, sizeof(line), procfs)) { +- if (sscanf (line, "nodev %[^\n]\n", fsname) == 1) continue; +- if (sscanf (line, " %[^ \n]\n", fsname) != 1) continue; +- return xstrdup(fsname); +- } +- return 0; +-} +- +-/* Only use /proc/filesystems here, this is meant to test what +- the kernel knows about, so /etc/filesystems is irrelevant. +- Return: 1: yes, 0: no, -1: cannot open procfs */ +-int +-is_in_procfs(const char *type) { +- FILE *procfs; +- char *fsname; +- int ret = -1; +- +- procfs = fopen(PROC_FILESYSTEMS, "r"); +- if (procfs) { +- ret = 0; +- while ((fsname = procfsnext(procfs)) != NULL) +- if (!strcmp(fsname, type)) { +- ret = 1; +- break; +- } +- fclose(procfs); +- procfs = NULL; +- } +- return ret; +-} +- +-/* Try all types in FILESYSTEMS, except those in *types, +- in case *types starts with "no" */ +-/* return: 0: OK, -1: error in errno, 1: type not found */ +-/* when 0 or -1 is returned, *types contains the type used */ +-/* when 1 is returned, *types is NULL */ +-int +-procfsloop(int (*mount_fn)(struct mountargs *), struct mountargs *args, +- const char **types) { +- char *files[2] = { ETC_FILESYSTEMS, PROC_FILESYSTEMS }; +- FILE *procfs; +- char *fsname; +- const char *notypes = NULL; +- int no = 0; +- int ret = 1; +- int errsv = 0; +- int i; +- +- if (*types && !strncmp(*types, "no", 2)) { +- no = 1; +- notypes = (*types) + 2; +- } +- *types = NULL; +- +- /* Use PROC_FILESYSTEMS only when ETC_FILESYSTEMS does not exist. +- In some cases trying a filesystem that the kernel knows about +- on the wrong data will crash the kernel; in such cases +- ETC_FILESYSTEMS can be used to list the filesystems that we +- are allowed to try, and in the order they should be tried. +- End ETC_FILESYSTEMS with a line containing a single '*' only, +- if PROC_FILESYSTEMS should be tried afterwards. */ +- +- for (i=0; i<2; i++) { +- procfs = fopen(files[i], "r"); +- if (!procfs) +- continue; +- while ((fsname = procfsnext(procfs)) != NULL) { +- if (!strcmp(fsname, "*")) { +- fclose(procfs); +- goto nexti; +- } +- if (was_tested (fsname)) +- continue; +- if (no && matching_type(fsname, notypes)) +- continue; +- set_tested (fsname); +- args->type = fsname; +- if (verbose) { +- printf(_("Trying %s\n"), fsname); +- fflush(stdout); +- } +- if ((*mount_fn) (args) == 0) { +- *types = fsname; +- ret = 0; +- break; +- } else if (errno != EINVAL && +- is_in_procfs(fsname) == 1) { +- *types = "guess"; +- ret = -1; +- errsv = errno; +- break; +- } +- } +- free_tested(); +- fclose(procfs); +- errno = errsv; +- return ret; +- nexti:; +- } +- return 1; +-} +diff --git a/mount/mount_guess_fstype.h b/mount/mount_guess_fstype.h +deleted file mode 100644 +index 63cb678..0000000 +--- a/mount/mount_guess_fstype.h ++++ /dev/null +@@ -1,16 +0,0 @@ +-struct mountargs { +- const char *spec; +- const char *node; +- const char *type; +- int flags; +- void *data; +-}; +- +-extern int verbose; +- +-char *guess_fstype(const char *device); +-char *do_guess_fstype(const char *device); +-int procfsloop(int (*mount_fn)(struct mountargs *), struct mountargs *args, +- const char **type); +-int is_in_procfs(const char *fstype); +- +diff --git a/mount/mount_paths.h b/mount/mount_paths.h +index fe84e1d..9093b10 100644 +--- a/mount/mount_paths.h ++++ b/mount/mount_paths.h +@@ -12,4 +12,7 @@ + #endif + #define LOCK_TIMEOUT 10 + ++#define ETC_FILESYSTEMS "/etc/filesystems" ++#define PROC_FILESYSTEMS "/proc/filesystems" ++ + #endif /* MOUNT_PATHS_H */ +-- +1.5.0.6 + +- +To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + +Signed-off-by: Karel Zak +--- + mount/fsprobe.h | 41 ++++++++++++++++++++++++++++------------- + mount/fsprobe_blkid.c | 27 +++++++++++++++------------ + mount/fstab.c | 8 ++++---- + mount/mount.c | 40 +++++++++++++++++++++++----------------- + mount/swapon.c | 14 +++++++------- + 5 files changed, 77 insertions(+), 53 deletions(-) + +diff --git a/mount/fsprobe.h b/mount/fsprobe.h +index cc429e1..e59440e 100644 +--- a/mount/fsprobe.h ++++ b/mount/fsprobe.h +@@ -1,18 +1,32 @@ +-#ifdef HAVE_LIBBLKID +-#include +-extern blkid_cache blkid; +-#endif +- +-extern void mount_blkid_get_cache(void); +-extern void mount_blkid_put_cache(void); +-extern const char *mount_get_devname_by_uuid(const char *uuid); +-extern const char *mount_get_devname_by_label(const char *label); +-extern const char *mount_get_volume_label_by_spec(const char *spec); +-extern const char *mount_get_devname(const char *spec); +-extern const char *mount_get_devname_for_mounting(const char *spec); +-extern int fsprobe_known_fstype(const char *fstype); ++#ifndef MOUNT_FSPROBE_H ++#define MOUNT_FSPROBE_H ++/* ++ * This is the generic interface for filesystem guessing libraries. ++ * Implementations are provided by ++ * ++ * fsprobe_blkid.c for libblkid from e2fsprogs ++ * fsprobe_volumeid.c for libvolume_id from udev ++ * ++ * Copyright (C) 2007 Kay Sievers ++ * Copyright (C) 2007 Matthias Koenig ++ * Copyright (C) 2007 Karel Zak ++ */ ++ ++extern void fsprobe_init(void); ++extern void fsprobe_exit(void); ++ ++extern const char *fsprobe_get_devname_by_uuid(const char *uuid); ++extern const char *fsprobe_get_devname_by_label(const char *label); ++ ++extern const char *fsprobe_get_label_by_devname(const char *devname); ++extern const char *fsprobe_get_uuid_by_devname(const char *devname); + extern const char *fsprobe_get_fstype_by_devname(const char *devname); + ++extern const char *fsprobe_get_devname(const char *spec); ++extern const char *fsprobe_get_devname_for_mounting(const char *spec); ++ ++extern int fsprobe_known_fstype(const char *fstype); ++ + struct mountargs { + const char *spec; + const char *node; +@@ -27,3 +41,4 @@ extern int fsprobe_procfsloop_mount(int (*mount_fn)(struct mountargs *), + struct mountargs *args, + const char **types); + ++#endif /* MOUNT_FSPROBE_H */ +diff --git a/mount/fsprobe_blkid.c b/mount/fsprobe_blkid.c +index 7f8c362..d25b973 100644 +--- a/mount/fsprobe_blkid.c ++++ b/mount/fsprobe_blkid.c +@@ -1,43 +1,47 @@ + #include ++#include + #include "fsprobe.h" + +-#ifdef HAVE_LIBBLKID +- +-blkid_cache blkid; ++static blkid_cache blkid; + + void +-mount_blkid_get_cache(void) { ++fsprobe_init(void) { + blkid_get_cache(&blkid, NULL); + } + + void +-mount_blkid_put_cache(void) { ++fsprobe_exit(void) { + blkid_put_cache(blkid); + } + + const char * +-mount_get_volume_label_by_spec(const char *spec) { +- return blkid_get_tag_value(blkid, "LABEL", spec); ++fsprobe_get_label_by_devname(const char *devname) { ++ return blkid_get_tag_value(blkid, "LABEL", devname); ++} ++ ++const char * ++fsprobe_get_uuid_by_devname(const char *devname) { ++ return blkid_get_tag_value(blkid, "UUID", devname); + } + + const char * +-mount_get_devname(const char *spec) { ++fsprobe_get_devname(const char *spec) { + return blkid_get_devname(blkid, spec, 0); + } + + const char * +-mount_get_devname_by_uuid(const char *uuid) { ++fsprobe_get_devname_by_uuid(const char *uuid) { + return blkid_get_devname(blkid, "UUID", uuid); + } + + const char * +-mount_get_devname_by_label(const char *label) { ++fsprobe_get_devname_by_label(const char *label) { + return blkid_get_devname(blkid, "LABEL", label); + } + + /* Also when no UUID= or LABEL= occur? No verbose? No warnings? */ + const char * +-mount_get_devname_for_mounting(const char *spec) { ++fsprobe_get_devname_for_mounting(const char *spec) { + return blkid_get_devname(blkid, spec, 0); + } + +@@ -52,4 +56,3 @@ fsprobe_get_fstype_by_devname(const char *devname) { + return blkid_get_tag_value(blkid, "TYPE", devname); + } + +-#endif +diff --git a/mount/fstab.c b/mount/fstab.c +index 5267f62..c47f20d 100644 +--- a/mount/fstab.c ++++ b/mount/fstab.c +@@ -292,7 +292,7 @@ has_label(const char *device, const char *label) { + const char *devlabel; + int ret; + +- devlabel = mount_get_volume_label_by_spec(device); ++ devlabel = fsprobe_get_label_by_devname(device); + ret = !strcmp(label, devlabel); + /* free(devlabel); */ + return ret; +@@ -303,7 +303,7 @@ has_uuid(const char *device, const char *uuid){ + const char *devuuid; + int ret; + +- devuuid = mount_get_devname_by_uuid(device); ++ devuuid = fsprobe_get_uuid_by_devname(device); + ret = !strcmp(uuid, devuuid); + /* free(devuuid); */ + return ret; +@@ -745,8 +745,8 @@ int verbose; + int mount_quiet; + char *progname; + +-const char *mount_get_volume_label_by_spec(const char *spec) { return NULL; } +-const char *mount_get_devname_by_uuid(const char *uuid) { return NULL; } ++const char *fsprobe_get_label_by_devname(const char *spec) { return NULL; } ++const char *fsprobe_get_uuid_by_devname(const char *spec) { return NULL; } + struct my_mntent *my_getmntent (mntFILE *mfp) { return NULL; } + mntFILE *my_setmntent (const char *file, char *mode) { return NULL; } + void my_endmntent (mntFILE *mfp) { } +diff --git a/mount/mount.c b/mount/mount.c +index be9e409..12964ca 100644 +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -233,6 +233,11 @@ parse_string_opt(char *s) { + return 0; + } + ++static void ++my_free(const void *s) { ++ if (s) ++ free((void *) s); ++} + + /* Report on a single mount. */ + static void +@@ -245,11 +250,18 @@ print_one (const struct my_mntent *me) { + if (me->mnt_opts != NULL) + printf (" (%s)", me->mnt_opts); + if (list_with_volumelabel) { +- const char *label; +- label = mount_get_volume_label_by_spec(me->mnt_fsname); +- if (label) { +- printf (" [%s]", label); +- /* free(label); */ ++ const char *devname = fsprobe_get_devname(me->mnt_fsname); ++ ++ if (devname) { ++ const char *label; ++ ++ label = fsprobe_get_label_by_devname(devname); ++ my_free(devname); ++ ++ if (label) { ++ printf (" [%s]", label); ++ my_free(label); ++ } + } + } + printf ("\n"); +@@ -268,12 +280,6 @@ print_all (char *types) { + exit (0); + } + +-static void +-my_free(const void *s) { +- if (s) +- free((void *) s); +-} +- + /* reallocates its first arg */ + static char * + append_opt(char *s, const char *opt, const char *val) +@@ -1330,7 +1336,7 @@ mount_one (const char *spec, const char *node, const char *types, + opts = append_opt(opts, cmdlineopts, NULL); + + /* Handle possible LABEL= and UUID= forms of spec */ +- nspec = mount_get_devname_for_mounting(spec); ++ nspec = fsprobe_get_devname_for_mounting(spec); + if (nspec) + spec = nspec; + +@@ -1387,7 +1393,7 @@ mounted (const char *spec0, const char *node0) { + int ret = 0; + + /* Handle possible UUID= and LABEL= in spec */ +- spec0 = mount_get_devname(spec0); ++ spec0 = fsprobe_get_devname(spec0); + if (!spec0) + return ret; + +@@ -1669,7 +1675,7 @@ main(int argc, char *argv[]) { + if (fd > 2) + close(fd); + +- mount_blkid_get_cache(); ++ fsprobe_init(); + + #ifdef DO_PS_FIDDLING + initproctitle(argc, argv); +@@ -1842,9 +1848,9 @@ main(int argc, char *argv[]) { + + if (specseen) { + if (uuid) +- spec = mount_get_devname_by_uuid(uuid); ++ spec = fsprobe_get_devname_by_uuid(uuid); + else +- spec = mount_get_devname_by_label(volumelabel); ++ spec = fsprobe_get_devname_by_label(volumelabel); + + if (!spec) + die (EX_USAGE, _("mount: no such partition found")); +@@ -1922,7 +1928,7 @@ main(int argc, char *argv[]) { + if (result == EX_SOMEOK) + result = 0; + +- mount_blkid_put_cache(); ++ fsprobe_exit(); + + exit (result); + } +diff --git a/mount/swapon.c b/mount/swapon.c +index cb055b3..025a6b5 100644 +--- a/mount/swapon.c ++++ b/mount/swapon.c +@@ -180,7 +180,7 @@ do_swapon(const char *orig_special, int prio) { + if (verbose) + printf(_("%s on %s\n"), progname, orig_special); + +- special = mount_get_devname(orig_special); ++ special = fsprobe_get_devname(orig_special); + if (!special) { + fprintf(stderr, _("%s: cannot find the device for %s\n"), + progname, orig_special); +@@ -255,13 +255,13 @@ cannot_find(const char *special) { + + static int + swapon_by_label(const char *label, int prio) { +- const char *special = mount_get_devname_by_label(label); ++ const char *special = fsprobe_get_devname_by_label(label); + return special ? do_swapon(special, prio) : cannot_find(label); + } + + static int + swapon_by_uuid(const char *uuid, int prio) { +- const char *special = mount_get_devname_by_uuid(uuid); ++ const char *special = fsprobe_get_devname_by_uuid(uuid); + return special ? do_swapon(special, prio) : cannot_find(uuid); + } + +@@ -272,7 +272,7 @@ do_swapoff(const char *orig_special, int quiet) { + if (verbose) + printf(_("%s on %s\n"), progname, orig_special); + +- special = mount_get_devname(orig_special); ++ special = fsprobe_get_devname(orig_special); + if (!special) + return cannot_find(orig_special); + +@@ -293,13 +293,13 @@ do_swapoff(const char *orig_special, int quiet) { + + static int + swapoff_by_label(const char *label, int quiet) { +- const char *special = mount_get_devname_by_label(label); ++ const char *special = fsprobe_get_devname_by_label(label); + return special ? do_swapoff(special, quiet) : cannot_find(label); + } + + static int + swapoff_by_uuid(const char *uuid, int quiet) { +- const char *special = mount_get_devname_by_uuid(uuid); ++ const char *special = fsprobe_get_devname_by_uuid(uuid); + return special ? do_swapoff(special, quiet) : cannot_find(uuid); + } + +@@ -328,7 +328,7 @@ swapon_all(void) { + if (!streq(fstab->mnt_type, MNTTYPE_SWAP)) + continue; + +- special = mount_get_devname(orig_special); ++ special = fsprobe_get_devname(orig_special); + if (!special) + continue; + +-- +1.5.0.6 + +- +To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + +The blkid supports NAME=value parsing, but use the library for +this simple task is overkill. (The libblkid requires initialized +blkid cache all time, for all calls.) + +This patch makes the fsprobe_get_devname_for_mounting() and +fsprobe_get_devname() generic for all fsprobe implementations. + +Signed-off-by: Karel Zak +--- + mount/Makefile.am | 2 +- + mount/fsprobe.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ + mount/fsprobe_blkid.c | 11 --------- + mount/sundries.c | 38 ++++++++++++++++++++++++++++++ + mount/sundries.h | 2 + + mount/swapon.c | 1 + + 6 files changed, 103 insertions(+), 12 deletions(-) + +diff --git a/mount/Makefile.am b/mount/Makefile.am +index b5b21b5..e61261f 100644 +--- a/mount/Makefile.am ++++ b/mount/Makefile.am +@@ -23,7 +23,7 @@ umount_LDADD = $(top_srcdir)/lib/libenv.a + umount_CFLAGS = $(SUID_CFLAGS) + + swapon_SOURCES = swapon.c xmalloc.c \ +- swap_constants.h realpath.c ++ swap_constants.h realpath.c fsprobe.c sundries.c + + losetup_SOURCES = lomount.c loop.h lomount.h + losetup_CFLAGS = -DMAIN +diff --git a/mount/fsprobe.c b/mount/fsprobe.c +index 4b57802..2629d0d 100644 +--- a/mount/fsprobe.c ++++ b/mount/fsprobe.c +@@ -162,3 +162,64 @@ fsprobe_procfsloop_mount( int (*mount_fn)(struct mountargs *), + } + return 1; + } ++ ++const char * ++fsprobe_get_devname_for_mounting(const char *spec) ++{ ++ char *name, *value; ++ ++ if (!spec) ++ return NULL; ++ ++ if (parse_spec(spec, &name, &value) != 0) ++ return NULL; /* parse error */ ++ ++ if (name) { ++ const char *nspec = NULL; ++ ++ if (!strcmp(name,"LABEL")) ++ nspec = fsprobe_get_devname_by_label(value); ++ else if (!strcmp(name,"UUID")) ++ nspec = fsprobe_get_devname_by_uuid(value); ++ ++ if (nspec && verbose > 1) ++ printf(_("mount: going to mount %s by %s\n"), spec, name); ++ ++ free((void *) name); ++ return nspec; ++ } ++ ++ /* no LABEL, no UUID, .. probably a path */ ++ if (verbose > 1) ++ printf(_("mount: no LABEL=, no UUID=, going to mount %s by path\n"), spec); ++ ++ return canonicalize(spec); ++} ++ ++/* like fsprobe_get_devname_for_mounting(), but without verbose messages */ ++const char * ++fsprobe_get_devname(const char *spec) ++{ ++ char *name, *value; ++ ++ if (!spec) ++ return NULL; ++ ++ if (parse_spec(spec, &name, &value) != 0) ++ return NULL; /* parse error */ ++ ++ if (name) { ++ const char *nspec = NULL; ++ ++ if (!strcmp(name,"LABEL")) ++ nspec = fsprobe_get_devname_by_label(value); ++ else if (!strcmp(name,"UUID")) ++ nspec = fsprobe_get_devname_by_uuid(value); ++ ++ free((void *) name); ++ return nspec; ++ } ++ ++ return canonicalize(spec); ++} ++ +diff --git a/mount/fsprobe_blkid.c b/mount/fsprobe_blkid.c +index d25b973..2dc734e 100644 +--- a/mount/fsprobe_blkid.c ++++ b/mount/fsprobe_blkid.c +@@ -25,11 +25,6 @@ fsprobe_get_uuid_by_devname(const char *devname) { + } + + const char * +-fsprobe_get_devname(const char *spec) { +- return blkid_get_devname(blkid, spec, 0); +-} +- +-const char * + fsprobe_get_devname_by_uuid(const char *uuid) { + return blkid_get_devname(blkid, "UUID", uuid); + } +@@ -39,12 +34,6 @@ fsprobe_get_devname_by_label(const char *label) { + return blkid_get_devname(blkid, "LABEL", label); + } + +-/* Also when no UUID= or LABEL= occur? No verbose? No warnings? */ +-const char * +-fsprobe_get_devname_for_mounting(const char *spec) { +- return blkid_get_devname(blkid, spec, 0); +-} +- + int + fsprobe_known_fstype(const char *fstype) + { +diff --git a/mount/sundries.c b/mount/sundries.c +index cdfbb42..45404c5 100644 +--- a/mount/sundries.c ++++ b/mount/sundries.c +@@ -247,3 +247,41 @@ canonicalize (const char *path) { + + return xstrdup(path); + } ++ ++ ++/* ++ * Parses NAME=value, returns -1 on parse error, 0 success. The success is also ++ * when the 'spec' doesn't contain name=value pair (because the spec could be ++ * a devname too). In particular case the pointer 'name' is set to NULL. ++ ++ * The result is a new allocated string (the 'name' pointer). ++ */ ++int ++parse_spec(const char *spec, char **name, char **value) ++{ ++ char *vl, *tk, *cp; ++ ++ *name = NULL; ++ *value = NULL; ++ ++ if (!(cp = strchr(spec, '='))) ++ return 0; /* no name= */ ++ ++ tk = xstrdup(spec); ++ vl = tk + (cp - spec); ++ *vl++ = '\0'; ++ ++ if (*vl == '"' || *vl == '\'') { ++ if (!(cp = strrchr(vl+1, *vl))) { ++ free(tk); ++ return -1; /* parse error */ ++ } ++ vl++; ++ *cp = '\0'; ++ } ++ ++ *name = tk; ++ *value = vl; ++ return 0; ++} ++ +diff --git a/mount/sundries.h b/mount/sundries.h +index 0851145..85ccd85 100644 +--- a/mount/sundries.h ++++ b/mount/sundries.h +@@ -35,6 +35,8 @@ char *xstrndup (const char *s, int n); + char *xstrconcat3 (char *, const char *, const char *); + char *xstrconcat4 (char *, const char *, const char *, const char *); + ++int parse_spec(const char *spec, char **name, char **value); ++ + void die (int errcode, const char *fmt, ...); + + /* exit status - bits below are ORed */ +diff --git a/mount/swapon.c b/mount/swapon.c +index 025a6b5..3936790 100644 +--- a/mount/swapon.c ++++ b/mount/swapon.c +@@ -30,6 +30,7 @@ + int all = 0; + int verbose = 0; + int priority = -1; /* non-prioritized swap by default */ ++int mount_quiet = 0; + + /* If true, don't complain if the device/file doesn't exist */ + int ifexists = 0; +-- +1.5.0.6 + +- +To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + +The blkid_get_cache() parses /etc/blkid.tab, it's better do it only +when we really need to resolve a spec (label or uuid). + +Signed-off-by: Karel Zak +--- + mount/fsprobe_blkid.c | 38 ++++++++++++++++++++++++++++++-------- + 1 files changed, 30 insertions(+), 8 deletions(-) + +diff --git a/mount/fsprobe_blkid.c b/mount/fsprobe_blkid.c +index 2dc734e..16a093a 100644 +--- a/mount/fsprobe_blkid.c ++++ b/mount/fsprobe_blkid.c +@@ -5,32 +5,50 @@ + static blkid_cache blkid; + + void +-fsprobe_init(void) { +- blkid_get_cache(&blkid, NULL); ++fsprobe_init(void) ++{ ++ blkid = NULL; + } + + void +-fsprobe_exit(void) { ++fsprobe_exit(void) ++{ + blkid_put_cache(blkid); + } + + const char * +-fsprobe_get_label_by_devname(const char *devname) { ++fsprobe_get_label_by_devname(const char *devname) ++{ ++ if (!blkid) ++ blkid_get_cache(&blkid, NULL); ++ + return blkid_get_tag_value(blkid, "LABEL", devname); + } + + const char * +-fsprobe_get_uuid_by_devname(const char *devname) { ++fsprobe_get_uuid_by_devname(const char *devname) ++{ ++ if (!blkid) ++ blkid_get_cache(&blkid, NULL); ++ + return blkid_get_tag_value(blkid, "UUID", devname); + } + + const char * +-fsprobe_get_devname_by_uuid(const char *uuid) { ++fsprobe_get_devname_by_uuid(const char *uuid) ++{ ++ if (!blkid) ++ blkid_get_cache(&blkid, NULL); ++ + return blkid_get_devname(blkid, "UUID", uuid); + } + + const char * +-fsprobe_get_devname_by_label(const char *label) { ++fsprobe_get_devname_by_label(const char *label) ++{ ++ if (!blkid) ++ blkid_get_cache(&blkid, NULL); ++ + return blkid_get_devname(blkid, "LABEL", label); + } + +@@ -41,7 +59,11 @@ fsprobe_known_fstype(const char *fstype) + } + + const char * +-fsprobe_get_fstype_by_devname(const char *devname) { ++fsprobe_get_fstype_by_devname(const char *devname) ++{ ++ if (!blkid) ++ blkid_get_cache(&blkid, NULL); ++ + return blkid_get_tag_value(blkid, "TYPE", devname); + } + +-- +1.5.0.6 + +- +To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + +The functions have to check for NULL pointer. + +Signed-off-by: Karel Zak +--- + mount/fstab.c | 10 ++++++++-- + 1 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/mount/fstab.c b/mount/fstab.c +index c47f20d..eee126e 100644 +--- a/mount/fstab.c ++++ b/mount/fstab.c +@@ -293,8 +293,11 @@ has_label(const char *device, const char *label) { + int ret; + + devlabel = fsprobe_get_label_by_devname(device); ++ if (!devlabel) ++ return 0; ++ + ret = !strcmp(label, devlabel); +- /* free(devlabel); */ ++ my_free(devlabel); + return ret; + } + +@@ -304,8 +307,11 @@ has_uuid(const char *device, const char *uuid){ + int ret; + + devuuid = fsprobe_get_uuid_by_devname(device); ++ if (!devuuid) ++ return 0; ++ + ret = !strcmp(uuid, devuuid); +- /* free(devuuid); */ ++ my_free(devuuid); + return ret; + } + +-- +1.5.0.6 + +- +To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + +The patch add new option --with-fsprobe= (where the is +blkid or volume_id). The blkid is default. The mount cannot be +compiled without a filesystem detection library. + +Signed-off-by: Kay Sievers +Signed-off-by: Karel Zak +--- + configure.ac | 26 ++++++++++++++++++++++++-- + 1 files changed, 24 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index d24ce09..e3ae318 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -56,8 +56,30 @@ AM_CONDITIONAL(HAVE_LIBUTIL, test x$ac_cv_lib_util_openpty = xyes) + AC_CHECK_LIB(termcap, tgetnum) + AM_CONDITIONAL(HAVE_TERMCAP, test x$ac_cv_lib_termcap_tgetnum = xyes) + +-AC_CHECK_LIB(blkid, blkid_known_fstype) +-AM_CONDITIONAL(HAVE_BLKID, test x$ac_cv_lib_blkid_blkid_known_fstype = xyes) ++ ++AC_ARG_WITH([fsprobe], ++ AC_HELP_STRING([--with-fsprobe], [library to guess filesystems (blkid|volume_id), default is blkid]), ++ with_fsprobe=$withval, with_fsprobe=blkid ++) ++ ++if test x$with_fsprobe = xblkid; then ++ AC_CHECK_LIB(blkid, blkid_known_fstype) ++ if test x$ac_cv_lib_blkid_blkid_known_fstype = xyes; then ++ fsprobe=blkid ++ fi ++elif test x$with_fsprobe = xvolume_id; then ++ AC_CHECK_LIB(volume_id, volume_id_open_fd) ++ if test x$ac_cv_lib_volume_id_volume_id_open_fd = xyes; then ++ fsprobe=volume_id ++ fi ++fi ++ ++if test -z "$fsprobe"; then ++ AC_MSG_ERROR([Without blkid or volume_id you will not be able to build util-linux-ng.]) ++fi ++ ++AM_CONDITIONAL(HAVE_BLKID, test x"$fsprobe" = xblkid) ++AM_CONDITIONAL(HAVE_VOLUME_ID, test x"$fsprobe" = xvolume_id) + + + AM_GNU_GETTEXT_VERSION([0.14.1]) +-- +1.5.0.6 + +- +To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + +Signed-off-by: Matthias Koenig +Signed-off-by: Kay Sievers +Signed-off-by: Karel Zak +--- + mount/Makefile.am | 9 +++ + mount/fsprobe_volumeid.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++ + mount/mount.8 | 5 +- + mount/mount_paths.h | 4 ++ + 4 files changed, 138 insertions(+), 3 deletions(-) + +diff --git a/mount/Makefile.am b/mount/Makefile.am +index e61261f..4562b2d 100644 +--- a/mount/Makefile.am ++++ b/mount/Makefile.am +@@ -37,6 +37,15 @@ umount_LDADD += -lblkid -luuid + swapon_LDADD = -lblkid -luuid + endif + ++if HAVE_VOLUME_ID ++mount_SOURCES += fsprobe_volumeid.c ++umount_SOURCES += fsprobe_volumeid.c ++swapon_SOURCES += fsprobe_volumeid.c ++mount_LDADD += -lvolume_id ++umount_LDADD += -lvolume_id ++swapon_LDADD = -lvolume_id ++endif ++ + if HAVE_PIVOT_ROOT + sbin_PROGRAMS += pivot_root + man_MANS += pivot_root.8 +diff --git a/mount/fsprobe_volumeid.c b/mount/fsprobe_volumeid.c +new file mode 100644 +index 0000000..8c13987 +--- /dev/null ++++ b/mount/fsprobe_volumeid.c +@@ -0,0 +1,123 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "fsprobe.h" ++#include "realpath.h" ++#include "mount_paths.h" ++#include "sundries.h" ++ ++enum probe_type { ++ VOLUME_ID_NONE, ++ VOLUME_ID_LABEL, ++ VOLUME_ID_UUID, ++ VOLUME_ID_TYPE, ++}; ++ ++static char *probe(const char *device, enum probe_type type) ++{ ++ int fd; ++ uint64_t size; ++ struct volume_id *id; ++ char *value = NULL; ++ ++ fd = open(device, O_RDONLY); ++ if (fd < 0) ++ return NULL; ++ ++ id = volume_id_open_fd(fd); ++ if (!id) ++ return NULL; ++ ++ /* TODO: use blkdev_get_size() */ ++ if (ioctl(fd, BLKGETSIZE64, &size) != 0) ++ size = 0; ++ ++ if (volume_id_probe_all(id, 0, size) == 0) { ++ switch(type) { ++ case VOLUME_ID_LABEL: ++ value = xstrdup(id->label); ++ break; ++ case VOLUME_ID_UUID: ++ value = xstrdup(id->uuid); ++ break; ++ case VOLUME_ID_TYPE: ++ value = xstrdup(id->type); ++ break; ++ default: ++ break; ++ } ++ } ++ ++ volume_id_close(id); ++ return value; ++} ++ ++void ++fsprobe_init(void) ++{ ++} ++ ++void ++fsprobe_exit(void) ++{ ++} ++ ++int ++fsprobe_known_fstype(const char *fstype) ++{ ++ /* TODO ++ if (volume_id_get_prober_by_type(fstype) != NULL) ++ return 1; ++ */ ++ return 0; ++} ++ ++const char * ++fsprobe_get_uuid_by_devname(const char *devname) ++{ ++ return probe(devname, VOLUME_ID_UUID); ++} ++ ++const char * ++fsprobe_get_label_by_devname(const char *devname) ++{ ++ return probe(devname, VOLUME_ID_LABEL); ++} ++ ++const char * ++fsprobe_get_fstype_by_devname(const char *devname) ++{ ++ return probe(devname, VOLUME_ID_TYPE); ++} ++ ++const char * ++fsprobe_get_devname_by_uuid(const char *uuid) ++{ ++ char dev[PATH_MAX]; ++ ++ if (!uuid) ++ return NULL; ++ ++ snprintf(dev, sizeof(dev), PATH_DEV_BYUUID "/%s", uuid); ++ return canonicalize(dev); ++} ++ ++const char * ++fsprobe_get_devname_by_label(const char *label) ++{ ++ char dev[PATH_MAX]; ++ ++ if (!label) ++ return NULL; ++ ++ snprintf(dev, sizeof(dev), PATH_DEV_BYLABEL "/%s", label); ++ return canonicalize(dev); ++} ++ +diff --git a/mount/mount.8 b/mount/mount.8 +index 8ed5a11..be6e537 100644 +--- a/mount/mount.8 ++++ b/mount/mount.8 +@@ -477,9 +477,8 @@ If no + option is given, or if the + .B auto + type is specified, mount will try to guess the desired type. +-If mount was compiled with the blkid library, the guessing is done +-by this library. Otherwise, mount guesses itself by probing the +-superblock; if that does not turn up anything that looks familiar, ++Mount uses the blkid or volume_id library for guessing the filesystem ++type; if that does not turn up anything that looks familiar, + mount will try to read the file + .IR /etc/filesystems , + or, if that does not exist, +diff --git a/mount/mount_paths.h b/mount/mount_paths.h +index 9093b10..d726d06 100644 +--- a/mount/mount_paths.h ++++ b/mount/mount_paths.h +@@ -15,4 +15,8 @@ + #define ETC_FILESYSTEMS "/etc/filesystems" + #define PROC_FILESYSTEMS "/proc/filesystems" + ++/* udev paths */ ++#define PATH_DEV_BYLABEL "/dev/disk/by-label" ++#define PATH_DEV_BYUUID "/dev/disk/by-uuid" ++ + #endif /* MOUNT_PATHS_H */ +-- +1.5.0.6 + +- +To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + +The util-linux-ng tests have to be useful with blkid and also with +volume_id. + +Signed-off-by: Karel Zak +--- + tests/ts-cramfs-mkfs | 15 +++++++++++---- + tests/ts-mkswap-doit | 16 ++++++++++++---- + 2 files changed, 23 insertions(+), 8 deletions(-) + +diff --git a/tests/ts-cramfs-mkfs b/tests/ts-cramfs-mkfs +index 6a9e029..1f7156e 100755 +--- a/tests/ts-cramfs-mkfs ++++ b/tests/ts-cramfs-mkfs +@@ -40,6 +40,11 @@ IMAGE_RE=$( echo $IMAGE | sed 's:/:\\/:g' ) + LABEL="testCramfs" + MOUNTPOINT="$TS_OUTDIR/cramfs-mnt" + ++ldd $TS_CMD_MOUNT | grep -q 'libvolume_id' 2>&1 >> $TS_OUTPUT ++if [ "$?" == "0" ]; then ++ HAS_VOLUMEID="yes" ++fi ++ + echo "create mountpoint dir" >> $TS_OUTPUT + if [ ! -d "$MOUNTPOINT" ]; then + mkdir -p $MOUNTPOINT +@@ -78,15 +83,17 @@ echo "create loop device from image" >> $TS_OUTPUT + DEVICE=$( $TS_CMD_LOSETUP -f ) + $TS_CMD_LOSETUP $DEVICE $IMAGE 2>&1 >> $TS_OUTPUT + +- + echo "check the image" >> $TS_OUTPUT +-blkid -c /dev/null -w /dev/null -s TYPE $DEVICE 2>&1 | grep -q 'TYPE="cramfs"' 2>&1 >> $TS_OUTPUT +- +-if [ "$?" != "0" ]; then ++if [ "$($TS_CMD_MOUNT --guess-fstype $DEVICE)" != "cramfs" ]; then + echo "Cannot found cramfs on $DEVICE" >> $TS_OUTPUT + ts_finalize + fi + ++if [ -n "$HAS_VOLUMEID" ] && [ ! -L "/dev/disk/by-label/$LABEL" ]; then ++ $TS_CMD_LOSETUP -d $DEVICE 2>&1 >> $TS_OUTPUT ++ ts_skip "udev ignores /dev/loop*" ++fi ++ + echo "mount the image" >> $TS_OUTPUT + $TS_CMD_MOUNT -L $LABEL $MOUNTPOINT 2>&1 >> $TS_OUTPUT + +diff --git a/tests/ts-mkswap-doit b/tests/ts-mkswap-doit +index 6e19b46..e4b5b76 100755 +--- a/tests/ts-mkswap-doit ++++ b/tests/ts-mkswap-doit +@@ -38,6 +38,11 @@ IMAGE="$TS_OUTDIR/loop-swap.img" + IMAGE_RE=$( echo $IMAGE | sed 's:/:\\/:g' ) + LABEL="testSwap" + ++ldd $TS_CMD_SWAPON | grep -q 'libvolume_id' 2>&1 >> $TS_OUTPUT ++if [ "$?" == "0" ]; then ++ HAS_VOLUMEID="yes" ++fi ++ + dd if=/dev/zero of=$IMAGE bs=1M count=20 &> /dev/null + + DEVICE=$( $TS_CMD_LOSETUP -f ) +@@ -54,14 +59,17 @@ $TS_CMD_LOSETUP $DEVICE $IMAGE 2>&1 >> $TS_OUTPUT + $TS_CMD_MKSWAP -L $LABEL $DEVICE 2>&1 >> $TS_OUTPUT + + # check it +-blkid -c /dev/null -w /dev/null -s TYPE $DEVICE 2>&1 | grep -q 'TYPE="swap"' 2>&1 >> $TS_OUTPUT +- +-if [ "$?" != "0" ]; then ++if [ "$($TS_CMD_MOUNT --guess-fstype $DEVICE)" != "swap" ]; then + echo "Cannot found Linux swap on $DEVICE" >> $TS_OUTPUT +- #$TS_CMD_LOSETUP -d $DEVICE 2>&1 >> $TS_OUTPUT ++ $TS_CMD_LOSETUP -d $DEVICE 2>&1 >> $TS_OUTPUT + ts_finalize + fi + ++if [ -n "$HAS_VOLUMEID" ] && [ ! -L "/dev/disk/by-label/$LABEL" ]; then ++ $TS_CMD_LOSETUP -d $DEVICE 2>&1 >> $TS_OUTPUT ++ ts_skip "udev ignores /dev/loop*" ++fi ++ + # try connect it to system (and found the device by label) + $TS_CMD_SWAPON -L $LABEL 2>&1 >> $TS_OUTPUT + +-- +1.5.0.6 + +- +To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + diff --git a/util-linux-2.13-sys_utils_arch.patch b/util-linux-2.13-sys_utils_arch.patch index 4b63ad0..def23d9 100644 --- a/util-linux-2.13-sys_utils_arch.patch +++ b/util-linux-2.13-sys_utils_arch.patch @@ -1,7 +1,7 @@ -Index: util-linux-ng-2.12r+git20070330/sys-utils/Makefile.am +Index: util-linux-ng-2.12r+git20070509/sys-utils/Makefile.am =================================================================== ---- util-linux-ng-2.12r+git20070330.orig/sys-utils/Makefile.am -+++ util-linux-ng-2.12r+git20070330/sys-utils/Makefile.am +--- util-linux-ng-2.12r+git20070509.orig/sys-utils/Makefile.am ++++ util-linux-ng-2.12r+git20070509/sys-utils/Makefile.am @@ -1,9 +1,11 @@ include $(top_srcdir)/config/include-Makefile.am @@ -21,13 +21,13 @@ Index: util-linux-ng-2.12r+git20070330/sys-utils/Makefile.am -man_MANS = flock.1 ionice.1 readprofile.1 \ +man_MANS = arch.1 flock.1 ionice.1 readprofile.1 \ - ctrlaltdel.8 cytune.8 dmesg.8 ipcrm.8 ipcs.8 renice.8 \ - setsid.8 tunelp.8 + ctrlaltdel.8 cytune.8 dmesg.1 ipcrm.1 ipcs.1 renice.1 \ + setsid.1 tunelp.8 -Index: util-linux-ng-2.12r+git20070330/sys-utils/arch.1 +Index: util-linux-ng-2.12r+git20070509/sys-utils/arch.1 =================================================================== --- /dev/null -+++ util-linux-ng-2.12r+git20070330/sys-utils/arch.1 ++++ util-linux-ng-2.12r+git20070509/sys-utils/arch.1 @@ -0,0 +1,34 @@ +.\" arch.1 -- +.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) @@ -63,10 +63,10 @@ Index: util-linux-ng-2.12r+git20070330/sys-utils/arch.1 +.\" Then how come we get these i586 values? +.\" Well, the routine check_bugs() does system_utsname.machine[1] = '0' + x86; +.\" (called in init/main.c, defined in ./include/asm-i386/bugs.h) -Index: util-linux-ng-2.12r+git20070330/sys-utils/arch.c +Index: util-linux-ng-2.12r+git20070509/sys-utils/arch.c =================================================================== --- /dev/null -+++ util-linux-ng-2.12r+git20070330/sys-utils/arch.c ++++ util-linux-ng-2.12r+git20070509/sys-utils/arch.c @@ -0,0 +1,35 @@ +/* arch -- print machine architecture information + * Created: Mon Dec 20 12:27:15 1993 by faith@cs.unc.edu diff --git a/util-linux-mount_libvolume_id_support.patch b/util-linux-mount_libvolume_id_support.patch deleted file mode 100644 index 3e168ad..0000000 --- a/util-linux-mount_libvolume_id_support.patch +++ /dev/null @@ -1,483 +0,0 @@ -Index: util-linux-ng-2.12r+git20070330/mount/fstab.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/fstab.c -+++ util-linux-ng-2.12r+git20070330/mount/fstab.c -@@ -305,6 +305,7 @@ has_uuid(const char *device, const char - struct mntentchn * - getfsspecfile (const char *spec, const char *file) { - struct mntentchn *mc, *mc0; -+ char *nspec; - - mc0 = fstab_head(); - -@@ -315,11 +316,12 @@ getfsspecfile (const char *spec, const c - return mc; - - /* second attempt: names found after symlink resolution */ -+ nspec = canonicalize(spec); - for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) - if ((streq(mc->m.mnt_dir, file) || - streq(canonicalize(mc->m.mnt_dir), file)) - && (streq(mc->m.mnt_fsname, spec) || -- streq(canonicalize(mc->m.mnt_fsname), spec))) -+ streq(canonicalize(mc->m.mnt_fsname), nspec))) - return mc; - - /* third attempt: names found after LABEL= or UUID= resolution */ -@@ -356,11 +358,21 @@ getfsfile (const char *file) { - struct mntentchn * - getfsspec (const char *spec) { - struct mntentchn *mc, *mc0; -+ const char *nspec, *fsname; - - mc0 = fstab_head(); -- for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) -- if (streq(mc->m.mnt_fsname, spec)) -+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) { -+ if (!strncmp (mc->m.mnt_fsname, "LABEL=", 6)) { -+ fsname = mount_get_devname_by_label(mc->m.mnt_fsname + 6); -+ } else if (!strncmp(mc->m.mnt_fsname, "UUID=", 5)) { -+ fsname = mount_get_devname_by_uuid(mc->m.mnt_fsname + 5); -+ } else { -+ fsname = mc->m.mnt_fsname; -+ } -+ nspec = canonicalize(fsname); -+ if (streq(nspec, spec)) - return mc; -+ } - return NULL; - } - -@@ -723,6 +735,8 @@ char *progname; - - const char *mount_get_volume_label_by_spec(const char *spec) { return NULL; } - const char *mount_get_devname_by_uuid(const char *uuid) { return NULL; } -+const char *mount_get_devname_by_label(const char *label) { return NULL; } -+const char *mount_get_volume_uuid_by_spec(const char *spec) { return NULL; } - struct my_mntent *my_getmntent (mntFILE *mfp) { return NULL; } - mntFILE *my_setmntent (const char *file, char *mode) { return NULL; } - void my_endmntent (mntFILE *mfp) { } -Index: util-linux-ng-2.12r+git20070330/mount/mount.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/mount.c -+++ util-linux-ng-2.12r+git20070330/mount/mount.c -@@ -1746,6 +1746,8 @@ main(int argc, char *argv[]) { - if (mc == NULL) - mc = getfsspec (spec); - if (mc == NULL) -+ mc = getfsspec (canonicalize(spec)); -+ if (mc == NULL) - die (EX_USAGE, - _("mount: cannot find %s in %s"), - spec, _PATH_FSTAB); -Index: util-linux-ng-2.12r+git20070330/mount/mount_blkid.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/mount_blkid.c -+++ util-linux-ng-2.12r+git20070330/mount/mount_blkid.c -@@ -1,6 +1,7 @@ - #include - #include "mount_blkid.h" - -+#ifndef HAVE_LIBVOLUME_ID - #ifdef HAVE_LIBBLKID - - blkid_cache blkid; -@@ -118,4 +119,5 @@ mount_get_devname_for_mounting(const cha - } - - --#endif -+#endif /* HAVE_LIBBLKID */ -+#endif /* HAVE_LIBVOLUME_ID */ -Index: util-linux-ng-2.12r+git20070330/mount/mount_blkid.h -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/mount_blkid.h -+++ util-linux-ng-2.12r+git20070330/mount/mount_blkid.h -@@ -11,3 +11,5 @@ extern const char *mount_get_volume_uuid - extern const char *mount_get_volume_label_by_spec(const char *spec); - extern const char *mount_get_devname(const char *spec); - extern const char *mount_get_devname_for_mounting(const char *spec); -+ -+extern const char *volume_id_get_tag(const char *spec, const char *token); -Index: util-linux-ng-2.12r+git20070330/mount/mount_by_label.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/mount_by_label.c -+++ util-linux-ng-2.12r+git20070330/mount/mount_by_label.c -@@ -1,4 +1,4 @@ --#ifndef HAVE_LIBBLKID -+#if (!defined HAVE_BLKID) && (!defined HAVE_LIBVOLUME_ID) - /* - * mount_by_label.c - aeb - * -Index: util-linux-ng-2.12r+git20070330/mount/mount_guess_fstype.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/mount_guess_fstype.c -+++ util-linux-ng-2.12r+git20070330/mount/mount_guess_fstype.c -@@ -46,15 +46,29 @@ - #define ETC_FILESYSTEMS "/etc/filesystems" - #define PROC_FILESYSTEMS "/proc/filesystems" - -+#ifdef HAVE_LIBVOLUME_ID -+ -+static int -+known_fstype(const char *fstype) { -+ return 0; -+} -+ -+const char * -+do_guess_fstype(const char *spec) -+{ -+ return volume_id_get_tag(spec, "TYPE"); -+} -+ -+#else - #ifdef HAVE_LIBBLKID - --char * -+const char * - do_guess_fstype(const char *device) - { - return blkid_get_tag_value(blkid, "TYPE", device); - } - --static int -+const static int - known_fstype(const char *fstype) - { - return blkid_known_fstype(fstype); -@@ -492,6 +506,7 @@ io_error: - } - - #endif -+#endif - - static struct tried { - struct tried *next; -@@ -534,9 +549,9 @@ free_tested(void) { - tried = NULL; - } - --char * -+const char * - guess_fstype(const char *spec) { -- char *type = do_guess_fstype(spec); -+ const char *type = do_guess_fstype(spec); - if (verbose) { - printf (_("mount: you didn't specify a filesystem type for %s\n"), - spec); -Index: util-linux-ng-2.12r+git20070330/mount/mount_udev.c -=================================================================== ---- /dev/null -+++ util-linux-ng-2.12r+git20070330/mount/mount_udev.c -@@ -0,0 +1,237 @@ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "mount_blkid.h" -+ -+#ifdef HAVE_LIBVOLUME_ID -+ -+extern int verbose; -+ -+struct volume_id_types_t { -+ int id; -+ char *token; -+ char *env; -+}; -+ -+enum { -+ VOLUME_ID_NONE=0, -+ VOLUME_ID_TYPE, -+ VOLUME_ID_LABEL, -+ VOLUME_ID_UUID -+}; -+ -+#define volume_id_offset(member) (unsigned long)offsetof(struct volume_id,member) -+ -+struct volume_id_types_t volume_id_types[] = { -+ { VOLUME_ID_TYPE, "TYPE", "ID_FS_TYPE" }, -+ { VOLUME_ID_LABEL, "LABEL", "ID_FS_LABEL" }, -+ { VOLUME_ID_UUID, "UUID", "ID_FS_UUID" }, -+ { VOLUME_ID_NONE, NULL, NULL }, -+}; -+ -+const char * -+volume_id_get_tag(const char *spec, const char *token) -+{ -+ struct volume_id *vid; -+ uint64_t size; -+ struct volume_id_types_t *volume_id_ptr = volume_id_types; -+ char *var, *value; -+ -+ value = calloc(1, VOLUME_ID_LABEL_SIZE); -+ if (!value) -+ return NULL; -+ -+ if (!spec) -+ return NULL; -+ -+ while (volume_id_ptr->token && strcmp(volume_id_ptr->token,token)) -+ volume_id_ptr++; -+ -+ if (!volume_id_ptr->token) { -+ free(value); -+ value = NULL; -+ goto out; -+ } -+ -+ /* Quick exit if ID_FS_* variables are set */ -+ if ((var = getenv(volume_id_ptr->env))) { -+ strncpy(value,var,VOLUME_ID_LABEL_SIZE - 1); -+ goto out; -+ } -+ -+ vid = volume_id_open_node(spec); -+ if (!vid) { -+ free(value); -+ value = NULL; -+ goto out; -+ } -+ -+ if (ioctl(vid->fd, BLKGETSIZE64, &size) != 0) -+ size = 0; -+ -+ if (volume_id_probe_all(vid, 0, size) == 0) { -+ switch(volume_id_ptr->id) { -+ case VOLUME_ID_TYPE: -+ strcpy(value, vid->type); -+ break; -+ case VOLUME_ID_LABEL: -+ strcpy(value, vid->label); -+ break; -+ case VOLUME_ID_UUID: -+ strcpy(value, vid->uuid); -+ break; -+ default: -+ free(value); -+ value = NULL; -+ break; -+ } -+ } else -+ value = NULL; -+ -+ volume_id_close(vid); -+ -+ out: -+ return value; -+} -+ -+void -+mount_blkid_get_cache(void) {} -+ -+void -+mount_blkid_put_cache(void) {} -+ -+const char * -+mount_get_volume_uuid_by_spec(const char *spec) -+{ -+ return volume_id_get_tag(spec, "UUID"); -+} -+ -+const char * -+mount_get_volume_label_by_spec(const char *spec) -+{ -+ return volume_id_get_tag(spec, "LABEL"); -+} -+ -+const char * -+mount_get_devname_by_uuid(const char *uuid) { -+ char *dev = NULL; -+ -+ if (!uuid) -+ return NULL; -+ -+ dev = malloc(19 + strlen(uuid)); -+ if (dev) { -+ strcpy(dev,"/dev/disk/by-uuid/"); -+ strcat(dev,uuid); -+ } -+ -+ return dev; -+} -+ -+const char * -+mount_get_devname_by_label(const char *label) { -+ char *dev = NULL; -+ -+ if (!label) -+ return NULL; -+ -+ dev = malloc(20 + strlen(label)); -+ if (dev) { -+ strcpy(dev,"/dev/disk/by-label/"); -+ strcat(dev,label); -+ } -+ -+ return dev; -+} -+ -+const char * -+mount_get_devname(const char *spec) -+{ -+ char *token, *cp, *value; -+ const char *nspec = NULL; -+ -+ if (!spec) -+ return NULL; -+ -+ token = strdup(spec); -+ if (!token) -+ return NULL; -+ -+ /* We have to return an allocated string */ -+ if (!(cp = strchr(token, '='))) -+ return token; -+ -+ value = token + (cp - token); -+ *value++ = '\0'; -+ -+ if (*value == '"' || *value == '\'') { -+ char c = *value++; -+ if (!(cp = strrchr(value, c))) -+ goto errout; /* missing closing quote */ -+ *cp = '\0'; -+ } -+ -+ if (!strcmp(token,"LABEL")) { -+ nspec = mount_get_devname_by_label(value); -+ } else if (!strcmp(token,"UUID")) { -+ nspec = mount_get_devname_by_uuid(value); -+ } -+ -+ free(token); -+ -+ errout: -+ return nspec; -+} -+ -+/* Also when no UUID= or LABEL= occur? No verbose? No warnings? */ -+const char * -+mount_get_devname_for_mounting(const char *spec) -+{ -+ char *token, *cp, *value; -+ const char *nspec = NULL; -+ -+ if (!spec) -+ return NULL; -+ -+ token = strdup(spec); -+ if (!token) -+ return NULL; -+ -+ /* We have to return an allocated string */ -+ if (!(cp = strchr(token, '='))) -+ return token; -+ -+ value = token + (cp - token); -+ *value++ = '\0'; -+ -+ if (*value == '"' || *value == '\'') { -+ char c = *value++; -+ if (!(cp = strrchr(value, c))) -+ goto errout; /* missing closing quote */ -+ *cp = '\0'; -+ } -+ -+ if (!strcmp(token,"LABEL")) { -+ nspec = mount_get_devname_by_label(value); -+ if (nspec && verbose > 1) -+ printf(_("mount: going to mount %s by LABEL\n"), spec); -+ } else if (!strcmp(token,"UUID")) { -+ nspec = mount_get_devname_by_uuid(value); -+ if (nspec && verbose > 1) -+ printf(_("mount: going to mount %s by UUID\n"), spec); -+ } -+ -+ free(token); -+ -+ errout: -+ return nspec; -+} -+ -+#endif -Index: util-linux-ng-2.12r+git20070330/mount/mount_guess_fstype.h -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/mount_guess_fstype.h -+++ util-linux-ng-2.12r+git20070330/mount/mount_guess_fstype.h -@@ -8,8 +8,8 @@ struct mountargs { - - extern int verbose; - --char *guess_fstype(const char *device); --char *do_guess_fstype(const char *device); -+const char *guess_fstype(const char *device); -+const char *do_guess_fstype(const char *device); - int procfsloop(int (*mount_fn)(struct mountargs *), struct mountargs *args, - const char **type); - int is_in_procfs(const char *fstype); -Index: util-linux-ng-2.12r+git20070330/configure.ac -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/configure.ac -+++ util-linux-ng-2.12r+git20070330/configure.ac -@@ -57,8 +57,10 @@ AC_CHECK_LIB(termcap, tgetnum) - AM_CONDITIONAL(HAVE_TERMCAP, test x$ac_cv_lib_termcap_tgetnum = xyes) - - AC_CHECK_LIB(blkid, blkid_known_fstype) --AM_CONDITIONAL(HAVE_BLKID, test x$ac_cv_lib_blkid_blkid_known_fstype = xyes) -+AC_CHECK_LIB(volume_id, volume_id_open_node) - -+AM_CONDITIONAL(HAVE_BLKID, test x$ac_cv_lib_blkid_blkid_known_fstype = xyes) -+AM_CONDITIONAL(HAVE_VOLUME_ID, test x$ac_cv_lib_volume_id_volume_id_open_node = xyes) - - AM_GNU_GETTEXT_VERSION([0.14.1]) - AM_GNU_GETTEXT([external]) -Index: util-linux-ng-2.12r+git20070330/mount/Makefile.am -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/Makefile.am -+++ util-linux-ng-2.12r+git20070330/mount/Makefile.am -@@ -16,7 +16,7 @@ MNTHDRS = fstab.h linux_fs.h mount_mnten - - mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ - get_label_uuid.c mount_by_label.c mount_blkid.c mount_guess_fstype.c \ -- getusername.c \ -+ mount_udev.c getusername.c \ - nfsmount.c nfsmount_clnt.c nfs4mount.c \ - lomount.c \ - $(MNTHDRS) -@@ -24,14 +24,14 @@ mount_SOURCES = mount.c fstab.c sundries - mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a libnfsmount_xdr.a - - umount_SOURCES = umount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ -- getusername.c get_label_uuid.c mount_by_label.c mount_blkid.c \ -+ getusername.c get_label_uuid.c mount_by_label.c mount_blkid.c mount_udev.c \ - lomount.c \ - $(MNTHDRS) - - umount_LDADD = $(top_srcdir)/lib/libenv.a - - swapon_SOURCES = swapon.c xmalloc.c \ -- get_label_uuid.c mount_by_label.c mount_blkid.c \ -+ get_label_uuid.c mount_by_label.c mount_blkid.c mount_udev.c \ - swap_constants.h realpath.c - - losetup_SOURCES = lomount.c loop.h lomount.h -@@ -43,6 +43,12 @@ umount_LDADD += -lblkid -luuid - swapon_LDADD = -lblkid -luuid - endif - -+if HAVE_VOLUME_ID -+mount_LDADD += -lvolume_id -+umount_LDADD += -lvolume_id -+swapon_LDADD = -lvolume_id -+endif -+ - if HAVE_PIVOT_ROOT - sbin_PROGRAMS += pivot_root - man_MANS += pivot_root.8 diff --git a/util-linux-mount_nfs.8.patch b/util-linux-mount_nfs.8.patch deleted file mode 100644 index 9ee6e65..0000000 --- a/util-linux-mount_nfs.8.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- util-linux-2.12q/mount/nfs.5 -+++ util-linux-2.12q/mount/nfs.5 -@@ -141,7 +141,7 @@ - Use an alternate RPC version number to contact the - NFS daemon on the remote host. This option is useful - for hosts that can run multiple NFS servers. --The default value is version 2. -+The default value is version 3. - .TP 1.5i - .I nolock - Disable NFS locking. Do not start lockd. diff --git a/util-linux-mount_warn_nfsudp.patch b/util-linux-mount_warn_nfsudp.patch deleted file mode 100644 index 215a283..0000000 --- a/util-linux-mount_warn_nfsudp.patch +++ /dev/null @@ -1,120 +0,0 @@ -Index: util-linux-ng-2.12r+2.13pre7/mount/nfs.5 -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/mount/nfs.5 -+++ util-linux-ng-2.12r+2.13pre7/mount/nfs.5 -@@ -238,9 +238,13 @@ writing to common filesystem on the serv - Mount the NFS filesystem using the TCP protocol instead of the - UDP protocol. This is the default, but in case it fails (many NFS servers only - support UDP) it will fallback and try UDP. -+.IP -+.B Before using NFS over UDP, please refer to the section WARNINGS below. - .TP 1.5i - .I udp - Mount the NFS filesystem using the UDP protocol. -+.IP -+.B Before using NFS over UDP, please refer to the section WARNINGS below. - .TP 1.5i - .I noacl - Assume no extended access control mechanisms like POSIX ACLs are used -@@ -411,6 +415,83 @@ writing to common filesystem on the serv - All of the non-value options have corresponding nooption forms. - For example, nointr means don't allow file operations to be - interrupted. -+.SH WARNINGS -+Using NFS over UDP on high-speed links such as Gigabit -+.BR "can cause silent data corruption" . -+.P -+The problem can be triggered at high loads, and is caused by problems in -+IP fragment reassembly. NFS read and writes typically transmit UDP packets -+of 4 Kilobytes or more, which have to be broken up into several fragments -+in order to be sent over the Ethernet link, which limits packets to 1500 -+bytes by default. This process happens at the IP network layer and is -+called fragmentation. -+.P -+In order to identify fragments that belong together, IP assigns a 16bit -+.I IP ID -+value to each packet; fragments generated from the same UDP packet -+will have the same IP ID. The receiving system will collect these -+fragments and combine them to form the original UDP packet. This process -+is called reassembly. The default timeout for packet reassembly is -+30 seconds; if the network stack does not receive all fragments of -+a given packet within this interval, it assumes the missing fragment(s) -+got lost and discards those it already received. -+.P -+The problem this creates over high-speed links is that it is possible -+to send more than 65536 packets within 30 seconds. In fact, with -+heavy NFS traffic one can observe that the IP IDs repeat after about -+5 seconds. -+.P -+This has serious effects on reassembly: if one fragment gets lost, -+another fragment -+.I from a different packet -+but with the -+.I same IP ID -+will arrive within the 30 second timeout, and the network stack will -+combine these fragments to form a new packet. Most of the time, network -+layers above IP will detect this mismatched reassembly - in the case -+of UDP, the UDP checksum, which is a 16 bit checksum over the entire -+packet payload, will usually not match, and UDP will discard the -+bad packet. -+.P -+However, the UDP checksum is 16 bit only, so there is a chance of 1 in -+65536 that it will match even if the packet payload is completely -+random (which very often isn't the case). If that is the case, -+silent data corruption will occur. -+.P -+This potential should be taken seriously, at least on Gigabit -+Ethernet. -+Network speeds of 100Mbit/s should be considered less -+problematic, because with most traffic patterns IP ID wrap around -+will take much longer than 30 seconds. -+.P -+It is therefore strongly recommended to use -+.BR "NFS over TCP where possible" , -+since TCP does not perform fragmentation. -+.P -+If you absolutely have to use NFS over UDP over Gigabit Ethernet, -+some steps can be taken to mitigate the problem and reduce the -+probability of corruption: -+.TP +1.5i -+.I Jumbo frames: -+Many Gigabit network cards are capable of transmitting -+frames bigger than the 1500 byte limit of traditional Ethernet, typically -+9000 bytes. Using jumbo frames of 9000 bytes will allow you to run NFS over -+UDP at a page size of 8K without fragmentation. Of course, this is -+only feasible if all involved stations support jumbo frames. -+.IP -+To enable a machine to send jumbo frames on cards that support it, -+it is sufficient to configure the interface for a MTU value of 9000. -+.TP +1.5i -+.I Lower reassembly timeout: -+By lowering this timeout below the time it takes the IP ID counter -+to wrap around, incorrect reassembly of fragments can be prevented -+as well. To do so, simply write the new timeout value (in seconds) -+to the file -+.BR /proc/sys/net/ipv4/ipfrag_time . -+.IP -+A value of 2 seconds will greatly reduce the probability of IPID clashes on -+a single Gigabit link, while still allowing for a reasonable timeout -+when receiving fragmented traffic from distant peers. - .SH FILES - .I /etc/fstab - .SH "SEE ALSO" -Index: util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/mount/nfsmount.c -+++ util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c -@@ -735,8 +735,12 @@ retry_udp: - goto fail; - } - fsock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); -- } else -+ } else { - fsock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); -+ fprintf(stderr, -+ "Using NFS over UDP can cause data corruption.\n" -+ "Please refer to the WARNINGS section of the nfs(5) manual page.\n"); -+ } - if (fsock < 0) { - perror(_("nfs socket")); - goto fail; diff --git a/util-linux-ng-2.12r+git20070412.tar.bz2 b/util-linux-ng-2.12r+git20070412.tar.bz2 deleted file mode 100644 index abf8a26..0000000 --- a/util-linux-ng-2.12r+git20070412.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:24be49bdf51ff79df2f4289c2c72471aefd9e2a5473cac2c66893cbee612a040 -size 1521684 diff --git a/util-linux-ng-2.12r+git20070509.tar.bz2 b/util-linux-ng-2.12r+git20070509.tar.bz2 new file mode 100644 index 0000000..fa55b66 --- /dev/null +++ b/util-linux-ng-2.12r+git20070509.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be7bac40f6c1ba44b66cd829241f8c6368ff56e823d1c7f673c0321b3d980f99 +size 1504607 diff --git a/util-linux.changes b/util-linux.changes index b89b8c7..bab20b5 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,10 +1,30 @@ +------------------------------------------------------------------- +Tue Jun 5 17:01:48 CEST 2007 - mkoenig@suse.de + +- update to git20070509 + mount: NFS code removed (use mount.nfs{,4} from nfs-utils) +- remove sm-notify (nfs-utils) +- removed patches + util-linux-2.11u-mount_nfs_mount_acl.patch + util-linux-2.12-mount_base_nfsv4.patch + util-linux-2.12-mount_mountfallback.patch + util-linux-2.12-mount_nfs_tcp.patch + util-linux-2.12q-mount_strict_aliasing.patch + util-linux-2.12r-mount_nfs_remount_options.patch + util-linux-2.12r-mount_rpcsec_gss.patch + util-linux-2.12r-mount_sec_manpage.patch + util-linux-2.12r-mount_umount_nosysfs.patch + util-linux-2.13-mount_nfs_timeo.patch + util-linux-mount_nfs.8.patch + util-linux-mount_warn_nfsudp.patch + ------------------------------------------------------------------- Tue Jun 5 14:34:49 CEST 2007 - pth@suse.de - Update to which-2.16, mainly because regenerating configure with newer autotools works. - Fix the patch for AC_CHECK_STATICLIB -- Our distribution doesn't install libiberty.a, so pass +- Our distribution doesn't install libiberty.a, so pass --disable-iberty to configure of which to not use a libiberty from somewhere else. diff --git a/util-linux.spec b/util-linux.spec index 7656993..7cdb5e1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.12r+git20070412) +# spec file for package util-linux (Version 2.12r+git20070509) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -20,8 +20,8 @@ PreReq: %install_info_prereq permissions License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on -Version: 2.12r+git20070412 -Release: 14 +Version: 2.12r+git20070509 +Release: 1 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source2: nologin.c @@ -40,51 +40,33 @@ Source13: time-%{time_ver}.tar.gz Source15: cryptoloop.txt Source22: setctsid.c Source23: setctsid.8 -Source24: sm-notify-20060111.tar.bz2 -Source25: nfsboot Source26: README.raw -Source27: renice.8 Source28: mkzimage_cmdline.8 Source29: mkzimage_cmdline.c Source30: README.largedisk ## ## util-linux ## +Patch0: util-linux-2.13-mount_volume_id.patch # add hostid Patch1: util-linux-2.12-misc_utils_hostid.patch # 27181 (suse12181) - wall adds newlines Patch2: util-linux-login_utils_wall.patch -# 31815 (suse16815) - Fixed nfs.5 to tell nfsver defaults to 3 -Patch3: util-linux-mount_nfs.8.patch -# 33183 (suse18183) - NFS ACCESS patch, [no]acl nfs mount option -Patch4: util-linux-2.11u-mount_nfs_mount_acl.patch Patch5: util-linux-mount_mount.8-acl.patch # geteuid instead of getuid in hwclock to enable making hwclock suid root. Patch6: util-linux-2.11z-hwclock_geteuid.patch -# 48018 (suse33018) - mount -t nfs must default to tcp in sles9 -Patch7: util-linux-2.12-mount_nfs_tcp.patch # 54436 (suse39436) - boot.swap "failed" activating swap on LVM Patch8: util-linux-2.12a-mount_procswapcheck.patch -# 56735 (suse41735) - NFS can't mount some exports -Patch9: util-linux-2.12-mount_mountfallback.patch # 57097 (suse42097) - mount doesn't allow to mount files that have colons in their path Patch10: util-linux-2.12a-mount_mountpointwithcolon.patch -# 76198 - Default retransmit timeout is too small on NFS over TCP -Patch11: util-linux-2.13-mount_nfs_timeo.patch -# Basic NFSv4 support -Patch12: util-linux-2.12-mount_base_nfsv4.patch -# 80263 - UDP data corruption due to incorrect IP fragment reassembly -Patch13: util-linux-mount_warn_nfsudp.patch # add ionice Patch14: util-linux-2.12q-sys_utils_ionice.patch # 104081 - make fdisk detect MAC-fs Patch15: util-linux-2.11q-fdisk_fs_mac.patch # 104405 - mount -a doesn't work with hotpluggable devices Patch16: util-linux-mount_opt_hotplug.patch -Patch17: util-linux-2.12a-mount_mountbylabel-dm.patch # 115129 - mount --move doesn't work as expected Patch18: util-linux-2.12q-mount_--move.patch -Patch19: util-linux-2.12q-mount_strict_aliasing.patch Patch20: util-linux-2.12r-mount_by_uuid.patch Patch21: util-linux-2.12q-mount_umount2_not_static.patch # 148409 - df, mount, /proc/mounts show root mounted twice @@ -92,19 +74,11 @@ Patch21: util-linux-2.12q-mount_umount2_not_static.patch Patch22: util-linux-2.12r-mount_mtab_update.patch # 153657 - fdisk is not able to manage huge disks Patch23: util-linux-2.12r-fdisk_fdiskwrap.patch -# 158401 - cthon06: NFSv3 client does not support RPCSEC_GSS -Patch24: util-linux-2.12r-mount_rpcsec_gss.patch # 176582 - If the user doesn't specify -t mount.fstype will never be called #TODO: check alternative upstream fix #Patch96: util-linux-2.12r-mount_external_prog_on_guess.patch -# 159368 - NFSv4: krb5p; nfs(5) manpage -Patch25: util-linux-2.12r-mount_sec_manpage.patch # 158955 - document xfs dmapi mount options better Patch26: util-linux-2.12r-mount_mount.8_xfs_update.patch -# use libvolume_id for fs guessing -Patch27: util-linux-mount_libvolume_id_support.patch -# 190385 - Added sysfs to list of filesystems not to unmount with umount -a -Patch28: util-linux-2.12r-mount_umount_nosysfs.patch # 160822 - fix for 153657 Patch29: util-linux-2.12r-fdisk_cyl.patch # 179122 - Fix readprofile one ppc64 @@ -113,8 +87,6 @@ Patch30: util-linux-2.12r-sys_utils_readprofile_mapfile.patch Patch31: util-linux-2.12r-misc_utils_cal_formatting.patch # 205956 - default swap to V1 in any case Patch32: util-linux-2.12r-disk_utils_mkswap_fix.patch -# 130625 - do not append addr option with each nfs remount -Patch33: util-linux-2.12r-mount_nfs_remount_options.patch # 238687 - let mkfs tools open block devices with O_EXCL Patch34: util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch # 241372 - remove legacy warnings from fdisk @@ -122,6 +94,7 @@ Patch35: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # 242750 - mount: fix race condition when using -o loop Patch36: util-linux-2.12r-mount_racy_loop.patch # 254437 - swapon should automatically reset the suspend signature +# TODO: Needs to be ported to new version Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch Patch40: util-linux-2.13-sys_utils_arch.patch Patch41: util-linux-2.13-build_gnu_source.patch @@ -159,44 +132,31 @@ Authors: Karel Zak %prep -%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -b 24 -n %name-ng-%version +%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%version +%patch0 -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 -%patch4 -p1 %patch5 -p0 %patch6 -%patch7 -p1 %patch8 -p1 -%patch9 -p1 %patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 %patch14 -p1 %patch15 -p1 %patch16 -p1 -%patch17 -p1 %patch18 -%patch19 -p1 -%patch20 -p1 +#%patch20 -p1 %patch21 %patch22 %patch23 -p1 -%patch24 -%patch25 -p1 %patch26 -%patch27 -p1 -%patch28 %patch29 -p1 %patch30 -p1 %patch31 %patch32 -p1 -%patch33 -p1 %patch34 -p1 %patch35 -p1 %patch36 -p1 -%patch38 -p1 +#%patch38 -p1 %patch40 -p1 %patch41 -p1 %patch42 -p1 @@ -216,7 +176,6 @@ cd ../time-* %patch60 cd ../which-* %patch70 -autoreconf -fi %build # adjtimex build @@ -231,12 +190,11 @@ make CFLAGS="$RPM_OPT_FLAGS" freeramdisk cd .. # which build cd which-%{which_ver} +autoreconf -fi %{?suse_update_config:%{suse_update_config}} CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ - --libdir=%{_libdir} \ - --disable-iberty \ %{_target_cpu}-suse-linux make cd .. @@ -255,10 +213,6 @@ cd .. cd klogconsole make CFLAGS="$RPM_OPT_FLAGS" cd .. -# sm-notify build -cd sm-notify* -make CFLAGS="$RPM_OPT_FLAGS" -cd .. popd # setctsid build rm -f setctsid @@ -273,6 +227,7 @@ CFLAGS=-DCONFIG_SMP ./autogen.sh ./configure --mandir=%{_mandir} \ --datadir=%{_datadir} \ + --with-fsprobe=volume_id \ --enable-elvtune \ --enable-mesg \ --enable-partx \ @@ -320,18 +275,6 @@ cd .. # klogconsole install cd klogconsole make install DEST=$RPM_BUILD_ROOT -cd .. -# sm-notify install -cd sm-notify* -install sm-notify $RPM_BUILD_ROOT/sbin -install -m 0644 sm-notify.8 $RPM_BUILD_ROOT/%_mandir/man8 -install %SOURCE25 $RPM_BUILD_ROOT/etc/init.d -mkdir -p $RPM_BUILD_ROOT/var/lib/nfs/sm -chmod 700 $RPM_BUILD_ROOT/var/lib/nfs/sm -mkdir -p $RPM_BUILD_ROOT/var/lib/nfs/sm.bak -chmod 700 $RPM_BUILD_ROOT/var/lib/nfs/sm.bak -touch $RPM_BUILD_ROOT/var/lib/nfs/state -chmod 644 $RPM_BUILD_ROOT/var/lib/nfs/state popd # # util-linux install @@ -348,7 +291,6 @@ install -m 644 nologin.8 $RPM_BUILD_ROOT%{_mandir}/man8 # setctsid install install -m 755 setctsid $RPM_BUILD_ROOT/usr/sbin install -m 444 setctsid.8 $RPM_BUILD_ROOT%{_mandir}/man8/ -install -m 444 %SOURCE27 $RPM_BUILD_ROOT%{_mandir}/man8/ echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > $RPM_BUILD_ROOT/usr/sbin/flushb chmod 755 $RPM_BUILD_ROOT/usr/sbin/flushb # Install scripts to configure raw devices at boot time @@ -390,7 +332,6 @@ rm -rf $RPM_BUILD_ROOT %post %{fillup_and_insserv -ps raw ACTIVATE_RAW_DEV} -%{fillup_and_insserv -fY nfsboot} %install_info --entry="* freeramdisk: (freeramdisk). tell kernel to free allocated memory for ramdisk" --info-dir=%{_infodir} %{_infodir}/freeramdisk.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %install_info --entry="* time: (time). summarizing used system resources" --info-dir=%{_infodir} %{_infodir}/time.info.gz @@ -427,7 +368,6 @@ fi %doc text-utils/README.col %doc README.largedisk %config %attr(744,root,root) /etc/init.d/raw -%attr(755,root,root) /etc/init.d/nfsboot %config(noreplace) %attr(644,root,root) /etc/raw /usr/sbin/rcraw /bin/arch @@ -451,7 +391,6 @@ fi /sbin/nologin /sbin/pivot_root /sbin/raw -/sbin/sm-notify /sbin/swapoff /sbin/swapon /bin/logger @@ -499,8 +438,6 @@ fi %verify(not mode) %attr(0755,root,tty) /usr/bin/write %dir %{_defaultdocdir}/time %dir %{_defaultdocdir}/which -/var/lib/nfs -%ghost /var/lib/nfs/state %{_defaultdocdir}/time/* %{_defaultdocdir}/which/* %{_infodir}/ipc.info.gz @@ -515,9 +452,12 @@ fi %{_mandir}/man1/colrm.1.gz %{_mandir}/man1/column.1.gz %{_mandir}/man1/ddate.1.gz +%{_mandir}/man1/dmesg.1.gz %{_mandir}/man1/flock.1.gz %{_mandir}/man1/getopt.1.gz %{_mandir}/man1/hexdump.1.gz +%{_mandir}/man1/ipcrm.1.gz +%{_mandir}/man1/ipcs.1.gz %{_mandir}/man1/hostid.1.gz %{_mandir}/man1/line.1.gz %{_mandir}/man1/logger.1.gz @@ -530,6 +470,8 @@ fi %{_mandir}/man1/readprofile.1.gz %{_mandir}/man1/rename.1.gz %{_mandir}/man1/rev.1.gz +%{_mandir}/man1/renice.1.gz +%{_mandir}/man1/setsid.1.gz %{_mandir}/man1/script.1.gz %{_mandir}/man1/setterm.1.gz %{_mandir}/man1/tailf.1.gz @@ -540,7 +482,6 @@ fi %{_mandir}/man1/write.1.gz %{_mandir}/man1/which.1.gz %{_mandir}/man5/fstab.5.gz -%{_mandir}/man5/nfs.5.gz %{_mandir}/man8/addpart.8.gz %{_mandir}/man8/agetty.8.gz %{_mandir}/man8/blockdev.8.gz @@ -551,9 +492,6 @@ fi %{_mandir}/man8/mkfs.bfs.8.gz %{_mandir}/man8/mkfs.minix.8.gz %{_mandir}/man8/fsck.minix.8.gz -%{_mandir}/man8/dmesg.8.gz -%{_mandir}/man8/ipcrm.8.gz -%{_mandir}/man8/ipcs.8.gz %{_mandir}/man8/isosize.8.gz %{_mandir}/man8/losetup.8.gz %{_mandir}/man8/mkfs.8.gz @@ -566,9 +504,6 @@ fi %{_mandir}/man8/partx.8.gz %{_mandir}/man8/pivot_root.8.gz %{_mandir}/man8/raw.8.gz -%{_mandir}/man8/renice.8.gz -%{_mandir}/man8/setsid.8.gz -%{_mandir}/man8/sm-notify.8.gz %{_mandir}/man8/swapoff.8.gz %{_mandir}/man8/swapon.8.gz %{_mandir}/man8/umount.8.gz @@ -619,6 +554,23 @@ fi %endif %changelog +* Tue Jun 05 2007 - mkoenig@suse.de +- update to git20070509 + mount: NFS code removed (use mount.nfs{,4} from nfs-utils) +- remove sm-notify (nfs-utils) +- removed patches + util-linux-2.11u-mount_nfs_mount_acl.patch + util-linux-2.12-mount_base_nfsv4.patch + util-linux-2.12-mount_mountfallback.patch + util-linux-2.12-mount_nfs_tcp.patch + util-linux-2.12q-mount_strict_aliasing.patch + util-linux-2.12r-mount_nfs_remount_options.patch + util-linux-2.12r-mount_rpcsec_gss.patch + util-linux-2.12r-mount_sec_manpage.patch + util-linux-2.12r-mount_umount_nosysfs.patch + util-linux-2.13-mount_nfs_timeo.patch + util-linux-mount_nfs.8.patch + util-linux-mount_warn_nfsudp.patch * Tue Jun 05 2007 - pth@suse.de - Update to which-2.16, mainly because regenerating configure with newer autotools works. From 7e5b704cfce094d21cca4d2419c83cd0330007ffa2ee154a67ba07fe9350cd52 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 7 Jun 2007 11:16:42 +0000 Subject: [PATCH 017/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=17 --- util-linux-2.12-misc_utils_hostid.patch | 22 +- util-linux-2.12r-mount_by_uuid.patch | 53 - util-linux-2.13-build_gnu_source.patch | 12 - ...-linux-2.13-build_no_perl_dependency.patch | 48 - util-linux-2.13-misc_utils_cal_ncurses.patch | 16 + util-linux-2.13-mount_volume_id.patch | 3574 ----------------- util-linux-ng-2.12r+git20070509.tar.bz2 | 3 - util-linux-ng-2.12r+git20070530.tar.bz2 | 3 + util-linux.changes | 10 + util-linux.spec | 26 +- 10 files changed, 56 insertions(+), 3711 deletions(-) delete mode 100644 util-linux-2.12r-mount_by_uuid.patch delete mode 100644 util-linux-2.13-build_gnu_source.patch delete mode 100644 util-linux-2.13-build_no_perl_dependency.patch create mode 100644 util-linux-2.13-misc_utils_cal_ncurses.patch delete mode 100644 util-linux-2.13-mount_volume_id.patch delete mode 100644 util-linux-ng-2.12r+git20070509.tar.bz2 create mode 100644 util-linux-ng-2.12r+git20070530.tar.bz2 diff --git a/util-linux-2.12-misc_utils_hostid.patch b/util-linux-2.12-misc_utils_hostid.patch index 84ac6fa..1e3828b 100644 --- a/util-linux-2.12-misc_utils_hostid.patch +++ b/util-linux-2.12-misc_utils_hostid.patch @@ -1,7 +1,7 @@ -Index: util-linux-ng-2.12r+git20070412/misc-utils/hostid.1 +Index: util-linux-ng-2.12r+git20070530/misc-utils/hostid.1 =================================================================== --- /dev/null -+++ util-linux-ng-2.12r+git20070412/misc-utils/hostid.1 ++++ util-linux-ng-2.12r+git20070530/misc-utils/hostid.1 @@ -0,0 +1,24 @@ +.TH hostid 1 +.SH NAME @@ -27,10 +27,10 @@ Index: util-linux-ng-2.12r+git20070412/misc-utils/hostid.1 +.SH SEE ALSO +gethostid(2), sethostid(2) + -Index: util-linux-ng-2.12r+git20070412/misc-utils/hostid.c +Index: util-linux-ng-2.12r+git20070530/misc-utils/hostid.c =================================================================== --- /dev/null -+++ util-linux-ng-2.12r+git20070412/misc-utils/hostid.c ++++ util-linux-ng-2.12r+git20070530/misc-utils/hostid.c @@ -0,0 +1,88 @@ +/* Program hostid. Changed on 7.10.1997 + New: - Hostid 0 is not permitted. @@ -120,20 +120,20 @@ Index: util-linux-ng-2.12r+git20070412/misc-utils/hostid.c + + return 0; +} -Index: util-linux-ng-2.12r+git20070412/misc-utils/Makefile.am +Index: util-linux-ng-2.12r+git20070530/misc-utils/Makefile.am =================================================================== ---- util-linux-ng-2.12r+git20070412.orig/misc-utils/Makefile.am -+++ util-linux-ng-2.12r+git20070412/misc-utils/Makefile.am -@@ -9,7 +9,7 @@ EXTRA_DIST = README.* \ +--- util-linux-ng-2.12r+git20070530.orig/misc-utils/Makefile.am ++++ util-linux-ng-2.12r+git20070530/misc-utils/Makefile.am +@@ -5,7 +5,7 @@ EXTRA_DIST = README.flushb bin_PROGRAMS = usrbinexec_PROGRAMS = cal ddate logger look mcookie \ - namei script whereis + namei script whereis hostid + EXTRA_DIST += README.cal README.ddate README.namei README.namei2 - mcookie_LDADD = $(top_srcdir)/lib/libmd5.a - -@@ -24,7 +24,7 @@ scriptreplay: scriptreplay.pl + mcookie_SOURCES = mcookie.c ../lib/md5.c +@@ -15,7 +15,7 @@ usrbinexec_SCRIPTS = chkdupexe scriptrep CLEANFILES = chkdupexe scriptreplay man_MANS = cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \ diff --git a/util-linux-2.12r-mount_by_uuid.patch b/util-linux-2.12r-mount_by_uuid.patch deleted file mode 100644 index f3775eb..0000000 --- a/util-linux-2.12r-mount_by_uuid.patch +++ /dev/null @@ -1,53 +0,0 @@ -Index: util-linux-ng-2.12r+git20070330/mount/fstab.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/fstab.c -+++ util-linux-ng-2.12r+git20070330/mount/fstab.c -@@ -295,7 +295,7 @@ has_uuid(const char *device, const char - const char *devuuid; - int ret; - -- devuuid = mount_get_devname_by_uuid(device); -+ devuuid = mount_get_volume_uuid_by_spec(device); - ret = !strcmp(uuid, devuuid); - /* free(devuuid); */ - return ret; -Index: util-linux-ng-2.12r+git20070330/mount/mount_blkid.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/mount_blkid.c -+++ util-linux-ng-2.12r+git20070330/mount/mount_blkid.c -@@ -16,6 +16,11 @@ mount_blkid_put_cache(void) { - } - - const char * -+mount_get_volume_uuid_by_spec(const char *spec) { -+ return blkid_get_tag_value(blkid, "UUID", spec); -+} -+ -+const char * - mount_get_volume_label_by_spec(const char *spec) { - return blkid_get_tag_value(blkid, "LABEL", spec); - } -@@ -56,6 +61,11 @@ mount_blkid_put_cache(void) { - } - - const char * -+mount_get_volume_uuid_by_spec(const char *spec) { -+ return xstrdup(get_volume_uuid_by_spec(spec)); -+} -+ -+const char * - mount_get_volume_label_by_spec(const char *spec) { - return xstrdup(get_volume_label_by_spec(spec)); - } -Index: util-linux-ng-2.12r+git20070330/mount/mount_blkid.h -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/mount_blkid.h -+++ util-linux-ng-2.12r+git20070330/mount/mount_blkid.h -@@ -7,6 +7,7 @@ extern void mount_blkid_get_cache(void); - extern void mount_blkid_put_cache(void); - extern const char *mount_get_devname_by_uuid(const char *uuid); - extern const char *mount_get_devname_by_label(const char *label); -+extern const char *mount_get_volume_uuid_by_spec(const char *spec); - extern const char *mount_get_volume_label_by_spec(const char *spec); - extern const char *mount_get_devname(const char *spec); - extern const char *mount_get_devname_for_mounting(const char *spec); diff --git a/util-linux-2.13-build_gnu_source.patch b/util-linux-2.13-build_gnu_source.patch deleted file mode 100644 index 03174c6..0000000 --- a/util-linux-2.13-build_gnu_source.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: util-linux-ng-2.12r+git20070330/configure.ac -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/configure.ac -+++ util-linux-ng-2.12r+git20070330/configure.ac -@@ -10,6 +10,7 @@ AC_CONFIG_SRCDIR(mount/mount.c) - - AC_PREFIX_DEFAULT(/) - -+AC_GNU_SOURCE - AC_PROG_CC_STDC - AC_PROG_RANLIB - AC_PROG_LIBTOOL diff --git a/util-linux-2.13-build_no_perl_dependency.patch b/util-linux-2.13-build_no_perl_dependency.patch deleted file mode 100644 index 763602f..0000000 --- a/util-linux-2.13-build_no_perl_dependency.patch +++ /dev/null @@ -1,48 +0,0 @@ -Index: util-linux-ng-2.12r+git20070412/configure.ac -=================================================================== ---- util-linux-ng-2.12r+git20070412.orig/configure.ac -+++ util-linux-ng-2.12r+git20070412/configure.ac -@@ -244,6 +244,11 @@ AC_ARG_ENABLE([partx], - ) - AM_CONDITIONAL(BUILD_PARTX, test x$enable_partx = xyes) - -+AC_ARG_ENABLE([perl-scripts], -+ AC_HELP_STRING([--enable-perl-scripts], [install perl scripts (chkdupexe, scriptreplay)]), -+ enable_perl_scripts=$enableval, enable_perl_scripts=no -+) -+AM_CONDITIONAL(INSTALL_PERL_SCRIPTS, test x$enable_perl_scripts = xyes) - - AC_ARG_ENABLE([raw], - AC_HELP_STRING([--enable-raw], [build raw]), -Index: util-linux-ng-2.12r+git20070412/misc-utils/Makefile.am -=================================================================== ---- util-linux-ng-2.12r+git20070412.orig/misc-utils/Makefile.am -+++ util-linux-ng-2.12r+git20070412/misc-utils/Makefile.am -@@ -11,9 +11,16 @@ bin_PROGRAMS = - usrbinexec_PROGRAMS = cal ddate logger look mcookie \ - namei script whereis hostid - -+usrbinexec_SCRIPTS = -+ -+man_MANS = cal.1 ddate.1 logger.1 look.1 mcookie.1 \ -+ namei.1 script.1 whereis.1 hostid.1 -+ - mcookie_LDADD = $(top_srcdir)/lib/libmd5.a - -+if INSTALL_PERL_SCRIPTS - usrbinexec_SCRIPTS = chkdupexe scriptreplay -+man_MANS += chkdupexe.1 scriptreplay.1 - - chkdupexe: chkdupexe.pl - sed -e 's,[@]PERL[@],$(PERL),g' < chkdupexe.pl > chkdupexe -@@ -22,9 +29,7 @@ scriptreplay: scriptreplay.pl - sed -e 's,[@]PERL[@],$(PERL),g' < scriptreplay.pl > scriptreplay - - CLEANFILES = chkdupexe scriptreplay -- --man_MANS = cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \ -- namei.1 script.1 whereis.1 scriptreplay.1 hostid.1 -+endif - - if HAVE_NCURSES - cal_LDADD = -lncurses diff --git a/util-linux-2.13-misc_utils_cal_ncurses.patch b/util-linux-2.13-misc_utils_cal_ncurses.patch new file mode 100644 index 0000000..73bea32 --- /dev/null +++ b/util-linux-2.13-misc_utils_cal_ncurses.patch @@ -0,0 +1,16 @@ +Index: util-linux-ng-2.12r+git20070530/configure.ac +=================================================================== +--- util-linux-ng-2.12r+git20070530.orig/configure.ac ++++ util-linux-ng-2.12r+git20070530/configure.ac +@@ -107,8 +107,9 @@ fi + have_ncurses=no + AC_CHECK_HEADERS([ncurses.h ncurses/ncurses.h], [have_ncurses=yes]) + case $have_ncurses in +-yes) AC_MSG_NOTICE([you have ncurses]);; +-no) AC_MSG_NOTICE([you do not have ncurses]);; ++ yes) AC_MSG_NOTICE([you have ncurses]) ++ AC_DEFINE([HAVE_NCURSES],, [define this if you have libncurses]);; ++ no) AC_MSG_NOTICE([you do not have ncurses]);; + esac + AM_CONDITIONAL(HAVE_NCURSES, test x$have_ncurses = xyes) + diff --git a/util-linux-2.13-mount_volume_id.patch b/util-linux-2.13-mount_volume_id.patch deleted file mode 100644 index e97aa1a..0000000 --- a/util-linux-2.13-mount_volume_id.patch +++ /dev/null @@ -1,3574 +0,0 @@ -Signed-off-by: Karel Zak ---- - mount/Makefile.am | 8 ++-- - mount/fsprobe.h | 12 +++++ - mount/fsprobe_blkid.c | 111 ++++++++++++++++++++++++++++++++++++++++++++ - mount/fstab.c | 2 +- - mount/mount.c | 2 +- - mount/mount_blkid.c | 111 -------------------------------------------- - mount/mount_blkid.h | 12 ----- - mount/mount_guess_fstype.c | 2 +- - mount/swapon.c | 2 +- - 9 files changed, 131 insertions(+), 131 deletions(-) - -diff --git a/mount/Makefile.am b/mount/Makefile.am -index 95db3dd..930a0bf 100644 ---- a/mount/Makefile.am -+++ b/mount/Makefile.am -@@ -7,13 +7,13 @@ sbin_PROGRAMS = losetup swapon - man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 - - MNTHDRS = fstab.h linux_fs.h mount_mntent.h mount_constants.h my_dev_t.h \ -- mount_paths.h get_label_uuid.h lomount.h mount_blkid.h \ -+ mount_paths.h get_label_uuid.h lomount.h fsprobe.h \ - mount_guess_fstype.h realpath.h xmalloc.h \ - getusername.h loop.h mount_by_label.h mount_guess_rootdev.h \ - sundries.h - - mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ -- get_label_uuid.c mount_by_label.c mount_blkid.c mount_guess_fstype.c \ -+ get_label_uuid.c mount_by_label.c fsprobe_blkid.c mount_guess_fstype.c \ - getusername.c \ - lomount.c \ - $(MNTHDRS) -@@ -22,7 +22,7 @@ mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a - mount_CFLAGS = $(SUID_CFLAGS) - - umount_SOURCES = umount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ -- getusername.c get_label_uuid.c mount_by_label.c mount_blkid.c \ -+ getusername.c get_label_uuid.c mount_by_label.c fsprobe_blkid.c \ - lomount.c \ - $(MNTHDRS) - -@@ -30,7 +30,7 @@ umount_LDADD = $(top_srcdir)/lib/libenv.a - umount_CFLAGS = $(SUID_CFLAGS) - - swapon_SOURCES = swapon.c xmalloc.c \ -- get_label_uuid.c mount_by_label.c mount_blkid.c \ -+ get_label_uuid.c mount_by_label.c fsprobe_blkid.c \ - swap_constants.h realpath.c - - losetup_SOURCES = lomount.c loop.h lomount.h -diff --git a/mount/fsprobe.h b/mount/fsprobe.h -new file mode 100644 -index 0000000..c96ff8c ---- /dev/null -+++ b/mount/fsprobe.h -@@ -0,0 +1,12 @@ -+#ifdef HAVE_LIBBLKID -+#include -+extern blkid_cache blkid; -+#endif -+ -+extern void mount_blkid_get_cache(void); -+extern void mount_blkid_put_cache(void); -+extern const char *mount_get_devname_by_uuid(const char *uuid); -+extern const char *mount_get_devname_by_label(const char *label); -+extern const char *mount_get_volume_label_by_spec(const char *spec); -+extern const char *mount_get_devname(const char *spec); -+extern const char *mount_get_devname_for_mounting(const char *spec); -diff --git a/mount/fsprobe_blkid.c b/mount/fsprobe_blkid.c -new file mode 100644 -index 0000000..0616945 ---- /dev/null -+++ b/mount/fsprobe_blkid.c -@@ -0,0 +1,111 @@ -+#include -+#include "fsprobe.h" -+ -+#ifdef HAVE_LIBBLKID -+ -+blkid_cache blkid; -+ -+void -+mount_blkid_get_cache(void) { -+ blkid_get_cache(&blkid, NULL); -+} -+ -+void -+mount_blkid_put_cache(void) { -+ blkid_put_cache(blkid); -+} -+ -+const char * -+mount_get_volume_label_by_spec(const char *spec) { -+ return blkid_get_tag_value(blkid, "LABEL", spec); -+} -+ -+const char * -+mount_get_devname(const char *spec) { -+ return blkid_get_devname(blkid, spec, 0); -+} -+ -+const char * -+mount_get_devname_by_uuid(const char *uuid) { -+ return blkid_get_devname(blkid, "UUID", uuid); -+} -+ -+const char * -+mount_get_devname_by_label(const char *label) { -+ return blkid_get_devname(blkid, "LABEL", label); -+} -+ -+/* Also when no UUID= or LABEL= occur? No verbose? No warnings? */ -+const char * -+mount_get_devname_for_mounting(const char *spec) { -+ return blkid_get_devname(blkid, spec, 0); -+} -+ -+#else -+#include -+#include "sundries.h" -+#include "mount_by_label.h" -+#include "nls.h" -+ -+void -+mount_blkid_get_cache(void) { -+} -+ -+void -+mount_blkid_put_cache(void) { -+} -+ -+const char * -+mount_get_volume_label_by_spec(const char *spec) { -+ return xstrdup(get_volume_label_by_spec(spec)); -+} -+ -+const char * -+mount_get_devname(const char *spec) { -+ if (!strncmp(spec, "UUID=", 5)) -+ return get_spec_by_uuid(spec+5); -+ if (!strncmp(spec, "LABEL=", 6)) -+ return get_spec_by_volume_label(spec+6); -+ return spec; -+} -+ -+const char * -+mount_get_devname_by_uuid(const char *uuid) { -+ return get_spec_by_uuid(uuid); -+} -+ -+extern char *progname; -+ -+const char * -+mount_get_devname_by_label(const char *volumelabel) { -+ const char *spec, *spec2; -+ -+ spec = get_spec_by_volume_label(volumelabel); -+ spec2 = second_occurrence_of_vol_label(volumelabel); -+ if (spec2) -+ die (EX_FAIL, -+ _("%s: error: the label %s occurs on both %s and %s\n"), -+ progname, volumelabel, spec, spec2); -+ return spec; -+} -+ -+const char * -+mount_get_devname_for_mounting(const char *spec) { -+ const char *nspec; -+ -+ if (!strncmp(spec, "UUID=", 5)) { -+ nspec = mount_get_devname_by_uuid(spec+5); -+ if (nspec && verbose > 1) -+ printf(_("mount: going to mount %s by UUID\n"), spec); -+ } else if (!strncmp(spec, "LABEL=", 6)) { -+ nspec = mount_get_devname_by_label(spec+6); -+ if (nspec && verbose > 1) -+ printf(_("mount: going to mount %s by label\n"), spec); -+ } else -+ nspec = spec; -+ -+ return nspec; -+} -+ -+ -+#endif -diff --git a/mount/fstab.c b/mount/fstab.c -index 72c46f3..5267f62 100644 ---- a/mount/fstab.c -+++ b/mount/fstab.c -@@ -15,7 +15,7 @@ - #include "fstab.h" - #include "sundries.h" - #include "xmalloc.h" --#include "mount_blkid.h" -+#include "fsprobe.h" - #include "mount_paths.h" - #include "nls.h" - -diff --git a/mount/mount.c b/mount/mount.c -index 5058a7e..dfa44dc 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -29,7 +29,7 @@ - #include - #endif - --#include "mount_blkid.h" -+#include "fsprobe.h" - #include "mount_constants.h" - #include "sundries.h" - #include "xmalloc.h" -diff --git a/mount/mount_blkid.c b/mount/mount_blkid.c -deleted file mode 100644 -index 8fa30a1..0000000 ---- a/mount/mount_blkid.c -+++ /dev/null -@@ -1,111 +0,0 @@ --#include --#include "mount_blkid.h" -- --#ifdef HAVE_LIBBLKID -- --blkid_cache blkid; -- --void --mount_blkid_get_cache(void) { -- blkid_get_cache(&blkid, NULL); --} -- --void --mount_blkid_put_cache(void) { -- blkid_put_cache(blkid); --} -- --const char * --mount_get_volume_label_by_spec(const char *spec) { -- return blkid_get_tag_value(blkid, "LABEL", spec); --} -- --const char * --mount_get_devname(const char *spec) { -- return blkid_get_devname(blkid, spec, 0); --} -- --const char * --mount_get_devname_by_uuid(const char *uuid) { -- return blkid_get_devname(blkid, "UUID", uuid); --} -- --const char * --mount_get_devname_by_label(const char *label) { -- return blkid_get_devname(blkid, "LABEL", label); --} -- --/* Also when no UUID= or LABEL= occur? No verbose? No warnings? */ --const char * --mount_get_devname_for_mounting(const char *spec) { -- return blkid_get_devname(blkid, spec, 0); --} -- --#else --#include --#include "sundries.h" --#include "mount_by_label.h" --#include "nls.h" -- --void --mount_blkid_get_cache(void) { --} -- --void --mount_blkid_put_cache(void) { --} -- --const char * --mount_get_volume_label_by_spec(const char *spec) { -- return xstrdup(get_volume_label_by_spec(spec)); --} -- --const char * --mount_get_devname(const char *spec) { -- if (!strncmp(spec, "UUID=", 5)) -- return get_spec_by_uuid(spec+5); -- if (!strncmp(spec, "LABEL=", 6)) -- return get_spec_by_volume_label(spec+6); -- return spec; --} -- --const char * --mount_get_devname_by_uuid(const char *uuid) { -- return get_spec_by_uuid(uuid); --} -- --extern char *progname; -- --const char * --mount_get_devname_by_label(const char *volumelabel) { -- const char *spec, *spec2; -- -- spec = get_spec_by_volume_label(volumelabel); -- spec2 = second_occurrence_of_vol_label(volumelabel); -- if (spec2) -- die (EX_FAIL, -- _("%s: error: the label %s occurs on both %s and %s\n"), -- progname, volumelabel, spec, spec2); -- return spec; --} -- --const char * --mount_get_devname_for_mounting(const char *spec) { -- const char *nspec; -- -- if (!strncmp(spec, "UUID=", 5)) { -- nspec = mount_get_devname_by_uuid(spec+5); -- if (nspec && verbose > 1) -- printf(_("mount: going to mount %s by UUID\n"), spec); -- } else if (!strncmp(spec, "LABEL=", 6)) { -- nspec = mount_get_devname_by_label(spec+6); -- if (nspec && verbose > 1) -- printf(_("mount: going to mount %s by label\n"), spec); -- } else -- nspec = spec; -- -- return nspec; --} -- -- --#endif -diff --git a/mount/mount_blkid.h b/mount/mount_blkid.h -deleted file mode 100644 -index c96ff8c..0000000 ---- a/mount/mount_blkid.h -+++ /dev/null -@@ -1,12 +0,0 @@ --#ifdef HAVE_LIBBLKID --#include --extern blkid_cache blkid; --#endif -- --extern void mount_blkid_get_cache(void); --extern void mount_blkid_put_cache(void); --extern const char *mount_get_devname_by_uuid(const char *uuid); --extern const char *mount_get_devname_by_label(const char *label); --extern const char *mount_get_volume_label_by_spec(const char *spec); --extern const char *mount_get_devname(const char *spec); --extern const char *mount_get_devname_for_mounting(const char *spec); -diff --git a/mount/mount_guess_fstype.c b/mount/mount_guess_fstype.c -index f1637f1..51d8750 100644 ---- a/mount/mount_guess_fstype.c -+++ b/mount/mount_guess_fstype.c -@@ -38,7 +38,7 @@ - #include - #include - #include "linux_fs.h" --#include "mount_blkid.h" -+#include "fsprobe.h" - #include "mount_guess_fstype.h" - #include "sundries.h" /* for xstrdup */ - #include "nls.h" -diff --git a/mount/swapon.c b/mount/swapon.c -index b6bcd75..af4ba96 100644 ---- a/mount/swapon.c -+++ b/mount/swapon.c -@@ -15,7 +15,7 @@ - #include "swap_constants.h" - #include "swapargs.h" - #include "nls.h" --#include "mount_blkid.h" -+#include "fsprobe.h" - #include "mount_by_label.h" - #include "realpath.h" - --- -1.5.0.6 - -- -To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html - -This patch removes old FS detection code and enables -blkid code only when HAVE_BLKID is defined. - -Signed-off-by: Karel Zak ---- - mount/Makefile.am | 12 +- - mount/fsprobe_blkid.c | 67 ------- - mount/get_label_uuid.c | 221 ---------------------- - mount/get_label_uuid.h | 1 - - mount/linux_fs.h | 292 ----------------------------- - mount/mount.c | 1 - - mount/mount_by_label.c | 363 ------------------------------------ - mount/mount_by_label.h | 4 - - mount/mount_guess_fstype.c | 434 -------------------------------------------- - mount/swapon.c | 1 - - 10 files changed, 7 insertions(+), 1389 deletions(-) - -diff --git a/mount/Makefile.am b/mount/Makefile.am -index 930a0bf..6f63dcf 100644 ---- a/mount/Makefile.am -+++ b/mount/Makefile.am -@@ -7,13 +7,13 @@ sbin_PROGRAMS = losetup swapon - man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 - - MNTHDRS = fstab.h linux_fs.h mount_mntent.h mount_constants.h my_dev_t.h \ -- mount_paths.h get_label_uuid.h lomount.h fsprobe.h \ -+ mount_paths.h lomount.h fsprobe.h \ - mount_guess_fstype.h realpath.h xmalloc.h \ -- getusername.h loop.h mount_by_label.h mount_guess_rootdev.h \ -+ getusername.h loop.h mount_guess_rootdev.h \ - sundries.h - - mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ -- get_label_uuid.c mount_by_label.c fsprobe_blkid.c mount_guess_fstype.c \ -+ mount_guess_fstype.c \ - getusername.c \ - lomount.c \ - $(MNTHDRS) -@@ -22,7 +22,7 @@ mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a - mount_CFLAGS = $(SUID_CFLAGS) - - umount_SOURCES = umount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ -- getusername.c get_label_uuid.c mount_by_label.c fsprobe_blkid.c \ -+ getusername.c \ - lomount.c \ - $(MNTHDRS) - -@@ -30,13 +30,15 @@ umount_LDADD = $(top_srcdir)/lib/libenv.a - umount_CFLAGS = $(SUID_CFLAGS) - - swapon_SOURCES = swapon.c xmalloc.c \ -- get_label_uuid.c mount_by_label.c fsprobe_blkid.c \ - swap_constants.h realpath.c - - losetup_SOURCES = lomount.c loop.h lomount.h - losetup_CFLAGS = -DMAIN - - if HAVE_BLKID -+mount_SOURCES += fsprobe_blkid.c -+umount_SOURCES += fsprobe_blkid.c -+swapon_SOURCES += fsprobe_blkid.c - mount_LDADD += -lblkid -luuid - umount_LDADD += -lblkid -luuid - swapon_LDADD = -lblkid -luuid -diff --git a/mount/fsprobe_blkid.c b/mount/fsprobe_blkid.c -index 0616945..9ff4e31 100644 ---- a/mount/fsprobe_blkid.c -+++ b/mount/fsprobe_blkid.c -@@ -41,71 +41,4 @@ mount_get_devname_for_mounting(const char *spec) { - return blkid_get_devname(blkid, spec, 0); - } - --#else --#include --#include "sundries.h" --#include "mount_by_label.h" --#include "nls.h" -- --void --mount_blkid_get_cache(void) { --} -- --void --mount_blkid_put_cache(void) { --} -- --const char * --mount_get_volume_label_by_spec(const char *spec) { -- return xstrdup(get_volume_label_by_spec(spec)); --} -- --const char * --mount_get_devname(const char *spec) { -- if (!strncmp(spec, "UUID=", 5)) -- return get_spec_by_uuid(spec+5); -- if (!strncmp(spec, "LABEL=", 6)) -- return get_spec_by_volume_label(spec+6); -- return spec; --} -- --const char * --mount_get_devname_by_uuid(const char *uuid) { -- return get_spec_by_uuid(uuid); --} -- --extern char *progname; -- --const char * --mount_get_devname_by_label(const char *volumelabel) { -- const char *spec, *spec2; -- -- spec = get_spec_by_volume_label(volumelabel); -- spec2 = second_occurrence_of_vol_label(volumelabel); -- if (spec2) -- die (EX_FAIL, -- _("%s: error: the label %s occurs on both %s and %s\n"), -- progname, volumelabel, spec, spec2); -- return spec; --} -- --const char * --mount_get_devname_for_mounting(const char *spec) { -- const char *nspec; -- -- if (!strncmp(spec, "UUID=", 5)) { -- nspec = mount_get_devname_by_uuid(spec+5); -- if (nspec && verbose > 1) -- printf(_("mount: going to mount %s by UUID\n"), spec); -- } else if (!strncmp(spec, "LABEL=", 6)) { -- nspec = mount_get_devname_by_label(spec+6); -- if (nspec && verbose > 1) -- printf(_("mount: going to mount %s by label\n"), spec); -- } else -- nspec = spec; -- -- return nspec; --} -- -- - #endif -diff --git a/mount/get_label_uuid.c b/mount/get_label_uuid.c -deleted file mode 100644 -index 6d92e07..0000000 ---- a/mount/get_label_uuid.c -+++ /dev/null -@@ -1,221 +0,0 @@ --#ifndef HAVE_LIBBLKID --/* -- * Get label. Used by mount, umount and swapon. -- */ --#include --#include --#include --#include --#include -- --#include "xmalloc.h" --#include "linux_fs.h" --#include "get_label_uuid.h" --#include "../disk-utils/swapheader.h" -- --/* -- * See whether this device has (the magic of) a RAID superblock at the end. -- * If so, it probably is, or has been, part of a RAID array. -- * -- * For the moment this test is switched off - it causes problems. -- * "Checking for a disk label should only be done on the full raid, -- * not on the disks that form the raid array. This test causes a lot of -- * problems when run on my striped promise fasttrak 100 array." -- */ --static inline int --is_raid_partition(int fd) { --#if 0 -- struct mdp_super_block mdsb; -- int n; -- -- /* hardcode 4096 here in various places, because that's -- what it's defined to be. Note that even if we used -- the actual kernel headers, sizeof(mdp_super_t) is -- slightly larger in the 2.2 kernel on 64-bit archs, -- so using that wouldn't work. */ -- lseek(fd, -4096, SEEK_END); /* Ignore possible error -- about return value overflow */ -- n = 4096; -- if (sizeof(mdsb) < n) -- n = sizeof(mdsb); -- if (read(fd, &mdsb, n) != n) -- return 1; /* error */ -- return (mdsbmagic(mdsb) == MD_SB_MAGIC); --#else -- return 0; --#endif --} -- --int --reiserfs_magic_version(const char *magic) { -- int rc = 0; -- -- if (!strncmp(magic, REISERFS_SUPER_MAGIC_STRING, -- strlen(REISERFS_SUPER_MAGIC_STRING))) -- rc = 1; -- if (!strncmp(magic, REISER2FS_SUPER_MAGIC_STRING, -- strlen(REISER2FS_SUPER_MAGIC_STRING))) -- rc = 2; -- if (!strncmp(magic, REISER3FS_SUPER_MAGIC_STRING, -- strlen(REISER3FS_SUPER_MAGIC_STRING))) -- rc = 3; -- return rc; --} -- --static void --store_uuid(char *udest, char *usrc) { -- if (usrc) -- memcpy(udest, usrc, 16); -- else -- memset(udest, 0, 16); --} -- --static void --store_label(char **ldest, char *lsrc, int len) { -- *ldest = xmalloc(len+1); -- memset(*ldest, 0, len+1); -- memcpy(*ldest, lsrc, len); --} -- --static int --is_v1_swap_partition(int fd, char **label, char *uuid) { -- int n = getpagesize(); -- char *buf = xmalloc(n); -- struct swap_header_v1_2 *p = (struct swap_header_v1_2 *) buf; -- -- if (lseek(fd, 0, SEEK_SET) == 0 -- && read(fd, buf, n) == n -- && !strncmp(buf+n-10, "SWAPSPACE2", 10) -- && p->version == 1) { -- store_uuid(uuid, p->uuid); -- store_label(label, p->volume_name, 16); -- return 1; -- } -- return 0; --} -- -- --/* -- * Get both label and uuid. -- * For now, only ext2, ext3, xfs, ocfs, ocfs2, reiserfs, swap are supported -- * -- * Return 0 on success. -- */ --int --get_label_uuid(const char *device, char **label, char *uuid) { -- int fd; -- struct ext2_super_block e2sb; -- struct xfs_super_block xfsb; -- struct jfs_super_block jfssb; -- struct ocfs_volume_header ovh; /* Oracle */ -- struct ocfs_volume_label olbl; -- struct ocfs2_super_block osb; -- struct reiserfs_super_block reiserfssb; -- int blksize; -- int rv = 0; -- -- fd = open(device, O_RDONLY); -- if (fd < 0) -- return -1; -- -- /* If there is a RAID partition, or an error, ignore this partition */ -- if (is_raid_partition(fd)) { -- rv = 1; -- goto done; -- } -- -- if (is_v1_swap_partition(fd, label, uuid)) -- goto done; -- -- if (lseek(fd, 1024, SEEK_SET) == 1024 -- && read(fd, (char *) &e2sb, sizeof(e2sb)) == sizeof(e2sb) -- && (ext2magic(e2sb) == EXT2_SUPER_MAGIC)) { -- store_uuid(uuid, e2sb.s_uuid); -- store_label(label, e2sb.s_volume_name, -- sizeof(e2sb.s_volume_name)); -- goto done; -- } -- -- if (lseek(fd, 0, SEEK_SET) == 0 -- && read(fd, (char *) &xfsb, sizeof(xfsb)) == sizeof(xfsb) -- && (strncmp(xfsb.s_magic, XFS_SUPER_MAGIC, 4) == 0)) { -- store_uuid(uuid, xfsb.s_uuid); -- store_label(label, xfsb.s_fname, sizeof(xfsb.s_fname)); -- goto done; -- } -- -- if (lseek(fd, 0, SEEK_SET) == 0 -- && read(fd, (char *) &ovh, sizeof(ovh)) == sizeof(ovh) -- && (strncmp(ovh.signature, OCFS_MAGIC, sizeof(OCFS_MAGIC)) == 0) -- && (lseek(fd, 512, SEEK_SET) == 512) -- && read(fd, (char *) &olbl, sizeof(olbl)) == sizeof(olbl)) { -- store_uuid(uuid, NULL); -- store_label(label, olbl.label, ocfslabellen(olbl)); -- goto done; -- } -- -- if (lseek(fd, JFS_SUPER1_OFF, SEEK_SET) == JFS_SUPER1_OFF -- && read(fd, (char *) &jfssb, sizeof(jfssb)) == sizeof(jfssb) -- && (strncmp(jfssb.s_magic, JFS_MAGIC, 4) == 0)) { -- --/* The situation for jfs is rather messy. The structure of the -- superblock changed a few times, but there seems to be no good way -- to check what kind of sb we have. -- Old (OS/2 compatible) jfs filesystems don't have UUIDs and have -- an 11-byte label in s_fpack[]. -- Kernel 2.5.6 supports jfs v1; 2.5.8 supports v2; 2.5.18 has label/uuid. -- Kernel 2.4.20 supports jfs v2 with label/uuid. -- s_version will be 2 for new filesystems using an external log. -- Other new filesystems will have version 1. -- Label and UUID can be set by jfs_tune. */ -- --/* Let us believe label/uuid on v2, and on v1 only when label agrees -- with s_fpack in the first 11 bytes. */ -- -- if (assemble4le(jfssb.s_version) == 1 && -- strncmp(jfssb.s_label, jfssb.s_fpack, 11) != 0) { -- store_uuid(uuid, NULL); -- store_label(label, jfssb.s_fpack, -- sizeof(jfssb.s_fpack)); -- } else { -- store_uuid(uuid, jfssb.s_uuid); -- store_label(label, jfssb.s_label, -- sizeof(jfssb.s_label)); -- } -- goto done; -- } -- -- if (lseek(fd, REISERFS_DISK_OFFSET_IN_BYTES, SEEK_SET) -- == REISERFS_DISK_OFFSET_IN_BYTES -- && read(fd, (char *) &reiserfssb, sizeof(reiserfssb)) -- == sizeof(reiserfssb) -- /* Only 3.6.x format supers have labels or uuids. -- Label and UUID can be set by reiserfstune -l/-u. */ -- && reiserfs_magic_version(reiserfssb.s_magic) > 1) { -- store_uuid(uuid, reiserfssb.s_uuid); -- store_label(label, reiserfssb.s_label, -- sizeof(reiserfssb.s_label)); -- goto done; -- } -- -- for (blksize = OCFS2_MIN_BLOCKSIZE; -- blksize <= OCFS2_MAX_BLOCKSIZE; -- blksize <<= 1) { -- int blkoff = blksize * OCFS2_SUPER_BLOCK_BLKNO; -- -- if (lseek(fd, blkoff, SEEK_SET) == blkoff -- && read(fd, (char *) &osb, sizeof(osb)) == sizeof(osb) -- && strncmp(osb.signature, -- OCFS2_SUPER_BLOCK_SIGNATURE, -- sizeof(OCFS2_SUPER_BLOCK_SIGNATURE)) == 0) { -- store_uuid(uuid, osb.s_uuid); -- store_label(label, osb.s_label, sizeof(osb.s_label)); -- goto done; -- } -- } -- rv = 1; -- done: -- close(fd); -- return rv; --} --#endif -diff --git a/mount/get_label_uuid.h b/mount/get_label_uuid.h -deleted file mode 100644 -index f52cc52..0000000 ---- a/mount/get_label_uuid.h -+++ /dev/null -@@ -1 +0,0 @@ --int get_label_uuid(const char *device, char **label, char *uuid); -diff --git a/mount/linux_fs.h b/mount/linux_fs.h -index 430cbed..e47da2f 100644 ---- a/mount/linux_fs.h -+++ b/mount/linux_fs.h -@@ -13,295 +13,3 @@ - #endif - #endif - --#define MINIX_SUPER_MAGIC 0x137F /* minix v1, 14 char names */ --#define MINIX_SUPER_MAGIC2 0x138F /* minix v1, 30 char names */ --#define MINIX2_SUPER_MAGIC 0x2468 /* minix v2, 14 char names */ --#define MINIX2_SUPER_MAGIC2 0x2478 /* minix v2, 30 char names */ --struct minix_super_block { -- u_char s_dummy[16]; -- u_char s_magic[2]; --}; --#define minixmagic(s) assemble2le(s.s_magic) -- --#define ISODCL(from, to) (to - from + 1) --#define ISO_STANDARD_ID "CD001" --struct iso_volume_descriptor { -- char type[ISODCL(1,1)]; /* 711 */ -- char id[ISODCL(2,6)]; -- char version[ISODCL(7,7)]; -- char data[ISODCL(8,2048)]; --}; -- --#define HS_STANDARD_ID "CDROM" --struct hs_volume_descriptor { -- char foo[ISODCL ( 1, 8)]; /* 733 */ -- char type[ISODCL ( 9, 9)]; /* 711 */ -- char id[ISODCL ( 10, 14)]; -- char version[ISODCL ( 15, 15)]; /* 711 */ -- char data[ISODCL(16,2048)]; --}; -- --#define EXT_SUPER_MAGIC 0x137D --struct ext_super_block { -- u_char s_dummy[56]; -- u_char s_magic[2]; --}; --#define extmagic(s) assemble2le(s.s_magic) -- --#define EXT2_PRE_02B_MAGIC 0xEF51 --#define EXT2_SUPER_MAGIC 0xEF53 --#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004 --struct ext2_super_block { -- u_char s_dummy1[56]; -- u_char s_magic[2]; -- u_char s_dummy2[34]; -- u_char s_feature_compat[4]; -- u_char s_feature_incompat[4]; -- u_char s_feature_ro_compat[4]; -- u_char s_uuid[16]; -- u_char s_volume_name[16]; -- u_char s_dummy3[88]; -- u_char s_journal_inum[4]; /* ext3 only */ --}; --#define ext2magic(s) assemble2le(s.s_magic) -- --struct reiserfs_super_block --{ -- u_char s_block_count[4]; -- u_char s_free_blocks[4]; -- u_char s_root_block[4]; -- u_char s_journal_block[4]; -- u_char s_journal_dev[4]; -- u_char s_orig_journal_size[4]; -- u_char s_journal_trans_max[4]; -- u_char s_journal_block_count[4]; -- u_char s_journal_max_batch[4]; -- u_char s_journal_max_commit_age[4]; -- u_char s_journal_max_trans_age[4]; -- u_char s_blocksize[2]; -- u_char s_oid_maxsize[2]; -- u_char s_oid_cursize[2]; -- u_char s_state[2]; -- u_char s_magic[10]; -- u_char s_dummy1[10]; -- u_char s_version[2]; /* only valid with relocated journal */ -- -- /* only valid in 3.6.x format --mason@suse.com */ -- u_char s_dummy2[10]; -- u_char s_uuid[16]; -- u_char s_label[16]; --}; --#define REISERFS_SUPER_MAGIC_STRING "ReIsErFs" --#define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs" --/* also known as REISER2FS_JR_SUPER_MAGIC_STRING */ --#define REISER3FS_SUPER_MAGIC_STRING "ReIsEr3Fs" --#define REISERFS_DISK_OFFSET_IN_BYTES (64 * 1024) --/* the spot for the super in versions 3.5 - 3.5.10 (inclusive) */ --#define REISERFS_OLD_DISK_OFFSET_IN_BYTES (8 * 1024) -- --/* values of s_version when REISER3FS_SUPER_MAGIC_STRING is found */ --#define REISERFS_VERSION_1 0 /* 3.5.x disk format */ --#define REISERFS_VERSION_2 2 /* 3.6.x disk format */ -- --extern int reiserfs_magic_version(const char *magic); -- --#define _XIAFS_SUPER_MAGIC 0x012FD16D --struct xiafs_super_block { -- u_char s_boot_segment[512]; /* 1st sector reserved for boot */ -- u_char s_dummy[60]; -- u_char s_magic[4]; --}; --#define xiafsmagic(s) assemble4le(s.s_magic) -- --/* From jj@sunsite.ms.mff.cuni.cz Mon Mar 23 15:19:05 1998 */ --#define UFS_SUPER_MAGIC_LE 0x00011954 --#define UFS_SUPER_MAGIC_BE 0x54190100 --struct ufs_super_block { -- u_char s_dummy[0x55c]; -- u_char s_magic[4]; --}; --#define ufsmagic(s) assemble4le(s.s_magic) -- --/* From Richard.Russon@ait.co.uk Wed Feb 24 08:05:27 1999 */ --#define NTFS_SUPER_MAGIC "NTFS" --struct ntfs_super_block { -- u_char s_dummy[3]; -- u_char s_magic[4]; --}; -- --/* From inspection of a few FAT filesystems - aeb */ --/* Unfortunately I find almost the same thing on an extended partition; -- it looks like a primary has some directory entries where the extended -- has a partition table: IO.SYS, MSDOS.SYS, WINBOOT.SYS */ --struct fat_super_block { -- u_char s_dummy[3]; -- u_char s_os[8]; /* "MSDOS5.0" or "MSWIN4.0" or "MSWIN4.1" */ -- /* mtools-3.9.4 writes "MTOOL394" */ -- u_char s_dummy2[32]; -- u_char s_label[11]; /* for DOS? */ -- u_char s_fs[8]; /* "FAT12 " or "FAT16 " or all zero */ -- /* OS/2 BM has "FAT " here. */ -- u_char s_dummy3[9]; -- u_char s_label2[11]; /* for Windows? */ -- u_char s_fs2[8]; /* garbage or "FAT32 " */ --}; -- --#define XFS_SUPER_MAGIC "XFSB" --struct xfs_super_block { -- u_char s_magic[4]; -- u_char s_dummy[28]; -- u_char s_uuid[16]; -- u_char s_dummy2[60]; -- u_char s_fname[12]; --}; -- --#define CRAMFS_SUPER_MAGIC 0x28cd3d45 --#define CRAMFS_SUPER_MAGIC_BE 0x453dcd28 --struct cramfs_super_block { -- u_char s_magic[4]; -- u_char s_dummy[12]; -- u_char s_id[16]; --}; --#define cramfsmagic(s) assemble4le(s.s_magic) -- --#define HFS_SUPER_MAGIC 0x4244 --struct hfs_super_block { -- u_char s_magic[2]; /* drSigWord */ -- u_char s_dummy[18]; -- u_char s_blksize[4]; /* drAlBlkSiz */ --}; --#define hfsmagic(s) assemble2be(s.s_magic) --#define hfsblksize(s) assemble4be(s.s_blksize) -- --#define HPFS_SUPER_MAGIC 0xf995e849 --struct hpfs_super_block { -- u_char s_magic[4]; -- u_char s_magic2[4]; --}; --#define hpfsmagic(s) assemble4le(s.s_magic) -- --struct adfs_super_block { -- u_char s_dummy[448]; -- u_char s_blksize[1]; -- u_char s_dummy2[62]; -- u_char s_checksum[1]; --}; --#define adfsblksize(s) ((uint) s.s_blksize[0]) -- --/* found in first 4 bytes of block 1 */ --struct vxfs_super_block { -- u_char s_magic[4]; --}; --#define vxfsmagic(s) assemble4le(s.s_magic) --#define VXFS_SUPER_MAGIC 0xa501FCF5 -- --struct jfs_super_block { -- char s_magic[4]; -- u_char s_version[4]; -- u_char s_dummy1[93]; -- char s_fpack[11]; -- u_char s_dummy2[24]; -- u_char s_uuid[16]; -- char s_label[16]; --}; --#define JFS_SUPER1_OFF 0x8000 --#define JFS_MAGIC "JFS1" -- --struct sysv_super_block { -- u_char s_dummy1[504]; -- u_char s_magic[4]; -- u_char type[4]; --}; --#define sysvmagic(s) assemble4le(s.s_magic) --#define SYSV_SUPER_MAGIC 0xfd187e20 -- --struct mdp_super_block { -- u_char md_magic[4]; --}; --#define MD_SB_MAGIC 0xa92b4efc --#define mdsbmagic(s) assemble4le(s.md_magic) -- --struct ocfs_volume_header { -- u_char minor_version[4]; -- u_char major_version[4]; -- u_char signature[128]; --}; -- --struct ocfs_volume_label { -- u_char disk_lock[48]; -- u_char label[64]; -- u_char label_len[2]; --}; -- --#define ocfslabellen(o) assemble2le(o.label_len) --#define OCFS_MAGIC "OracleCFS" -- --struct ocfs2_super_block { -- u_char signature[8]; -- u_char s_dummy1[184]; -- u_char s_dummy2[80]; -- u_char s_label[64]; -- u_char s_uuid[16]; --}; -- --#define OCFS2_MIN_BLOCKSIZE 512 --#define OCFS2_MAX_BLOCKSIZE 4096 --#define OCFS2_SUPER_BLOCK_BLKNO 2 --#define OCFS2_SUPER_BLOCK_SIGNATURE "OCFSV2" -- -- --struct efs_volume_directory { /* size 16 */ -- char vd_name[8]; -- char vd_lbn[4]; -- char vd_nbytes[4]; --}; -- --struct efs_partition_table { /* size 12 */ -- char pt_nblks[4]; -- char pt_firstlbn[4]; -- char pt_type[4]; --}; -- --struct efs_volume_header { /* size 512 */ -- char vh_magic[4]; -- short vh_rootpt; -- short vh_swappt; -- char vh_bootfile[16]; -- char pad[48]; -- struct efs_volume_directory vh_vd[15]; -- struct efs_partition_table vh_pt[16]; -- int vh_csum; -- int vh_fill; --}; -- --struct efs_super { -- char fs_stuff[512+28]; -- char fs_magic[4]; -- char fs_fname[6]; -- char fs_fpack[6]; -- /* ... */ --}; -- --#define EFS_VHMAGIC 0x0be5a941 /* big endian */ --#define EFS_SBMAGIC 0x00072959 /* idem */ --#define EFS_SBMAGIC2 0x0007295a /* idem */ -- --static inline int --assemble2le(unsigned char *p) { -- return (p[0] | (p[1] << 8)); --} -- --static inline int --assemble2be(unsigned char *p) { -- return (p[1] | (p[0] << 8)); --} -- --static inline int --assemble4le(unsigned char *p) { -- return (p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24)); --} -- --static inline int --assemble4be(unsigned char *p) { -- return (p[3] | (p[2] << 8) | (p[1] << 16) | (p[0] << 24)); --} -diff --git a/mount/mount.c b/mount/mount.c -index dfa44dc..309e41e 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -40,7 +40,6 @@ - #include "linux_fs.h" /* for BLKGETSIZE */ - #include "mount_guess_rootdev.h" - #include "mount_guess_fstype.h" --#include "mount_by_label.h" - #include "getusername.h" - #include "mount_paths.h" - #include "env.h" -diff --git a/mount/mount_by_label.c b/mount/mount_by_label.c -deleted file mode 100644 -index 4899f03..0000000 ---- a/mount/mount_by_label.c -+++ /dev/null -@@ -1,363 +0,0 @@ --#ifndef HAVE_LIBBLKID --/* -- * mount_by_label.c - aeb -- * -- * 1999-02-22 Arkadiusz Mi¶kiewicz -- * - added Native Language Support -- * 2000-01-20 James Antill -- * - Added error message if /proc/partitions cannot be opened -- * 2000-05-09 Erik Troan -- * - Added cache for UUID and disk labels -- * 2000-11-07 Nathan Scott -- * - Added XFS support -- * 2001-11-22 Kirby Bohling -- * - Added support of labels on LVM -- * 2002-03-21 Christoph Hellwig -- * - Added JFS support -- * 2002-07-11 Christoph Hellwig -- * - Added JFS v2 format support -- * 2002-07-26 Luciano Chavez -- * - Added EVMS support -- */ -- --#include --#include --#include --#include --#include --#include --#include /* needed for opendir */ --#include --#include "sundries.h" /* for xstrdup */ --#include "linux_fs.h" --#include "get_label_uuid.h" --#include "mount_by_label.h" --#include "nls.h" -- --#define PROC_PARTITIONS "/proc/partitions" --#define DEVLABELDIR "/dev" --#define VG_DIR "/proc/lvm/VGs" --#define EVMS_VOLUME_NAME_SIZE 127 --#define PROC_EVMS_VOLUMES "/proc/evms/volumes" -- --extern char *progname; -- --static struct uuidCache_s { -- struct uuidCache_s *next; -- char uuid[16]; -- char *label; -- char *device; --} *uuidCache = NULL; -- --static void --uuidcache_addentry(char *device, char *label, char *uuid) { -- struct uuidCache_s *last; -- -- if (!uuidCache) { -- last = uuidCache = malloc(sizeof(*uuidCache)); -- } else { -- for (last = uuidCache; last->next; last = last->next); -- last->next = malloc(sizeof(*uuidCache)); -- last = last->next; -- } -- last->next = NULL; -- last->device = device; -- last->label = label; -- memcpy(last->uuid, uuid, sizeof(last->uuid)); --} -- --/* LVM support - Kirby Bohling */ --static void --uuidcache_init_lvm(void) { -- char buffer[PATH_MAX]; -- char lvm_device[PATH_MAX]; -- DIR *vg_dir, *lv_list; -- struct dirent *vg_iter, *lv_iter; -- char uuid[16], *label; -- -- vg_dir = opendir(VG_DIR); -- if (vg_dir == NULL) /* to be expected */ -- return; -- -- seekdir(vg_dir, 2); -- while ((vg_iter = readdir(vg_dir)) != 0) { -- sprintf(buffer, "%s/%s/LVs", VG_DIR, vg_iter->d_name); -- lv_list = opendir(buffer); -- if (lv_list == NULL) { -- perror("uuidcache_init_lvm"); -- continue; -- } -- seekdir(lv_list, 2); -- while ((lv_iter = readdir(lv_list)) != 0) { -- /* Now we have the file.. could open it and read out -- * where the device is, read the first line, second -- * field... Instead we guess. -- */ -- sprintf(lvm_device, "%s/%s/%s", DEVLABELDIR, -- vg_iter->d_name, lv_iter->d_name); -- if (!get_label_uuid(lvm_device, &label, uuid)) -- uuidcache_addentry(xstrdup(lvm_device), -- label, uuid); -- } -- closedir(lv_list); -- } -- closedir(vg_dir); --} -- --static int --uuidcache_init_evms(void) { -- FILE *procvol; -- char *label; -- char uuid[16]; -- char volname[EVMS_VOLUME_NAME_SIZE+1]; -- char line[EVMS_VOLUME_NAME_SIZE+80]; -- -- procvol = fopen(PROC_EVMS_VOLUMES, "r"); -- if (!procvol) -- return 0; -- -- while (fgets(line, sizeof(line), procvol)) { -- if (sscanf(line, "%*d %*d %*d %*s %*s %[^\n]", volname) == 1) { -- if (!get_label_uuid(volname, &label, uuid)) -- uuidcache_addentry(xstrdup(volname), label, uuid); -- } -- } -- -- fclose(procvol); -- -- return 1; --} -- --/* -- * xvm is a proprietary sgi volume manager, it goes into /proc/partitions -- * like this: -- * -- * 4 0 2210817 xvm/local/vol/myvolume/data/block -- * 4 1 2210817 xvm/local/vol/myvolume/rt/block -- * 4 2 2210817 xvm/local/vol/myvolume/log/block -- * 4 3 2210818 xvm/local/vol/discs3/data/block -- * -- * The heuristics here are that the device should start with "xvm," -- * but should not end in "log/block" or "rt/block" - those are -- * special devices for the xfs filesystem external log & realtime device. -- */ -- --/* Return 1 if this looks like an xvm device that should be scanned */ --static int --is_xvm(char *ptname) --{ -- int len; -- -- /* if it doesn't start with "xvm," we're done. */ -- if (strncmp(ptname, "xvm", 3)) -- return 0; -- -- len = strlen(ptname); -- /* -- * check for "log/block" or "rt/block" on the end, -- * these are special - don't scan. -- */ -- if (!strncmp(ptname+(len-9), "log/block", 9) || -- !strncmp(ptname+(len-8), "rt/block", 8)) -- return 0; -- -- return 1; --} -- --static void --uuidcache_init(void) { -- char line[100]; -- char *s; -- int ma, mi, sz; -- static char ptname[100]; -- FILE *procpt; -- char uuid[16], *label; -- char device[110]; -- int firstPass; -- int handleOnFirst; --#if 0 -- char iobuf[32*1024]; /* For setvbuf */ --#endif -- -- if (uuidCache) -- return; -- -- if (uuidcache_init_evms()) -- return; -- -- procpt = fopen(PROC_PARTITIONS, "r"); -- if (!procpt) { -- static int warn = 0; -- if (!warn++) -- error (_("%s: could not open %s, so UUID and LABEL " -- "conversion cannot be done.\n"), -- progname, PROC_PARTITIONS); -- return; -- } --#if 0 --/* Ugly kludge - the contents of /proc/partitions change in time, -- and this causes failures when the file is not read in one go. -- In particular, one cannot use stdio on /proc/partitions. -- Doing this ourselves is not easy either, since stat returns 0 -- so the size is unknown. We might try increasing buffer sizes -- until a single read gets all. For now only pick a largish buffer size. */ --/* All these troubles are mainly caused by people who patch the kernel -- to keep statistics in /proc/partitions. Of course, statistics belong -- in some /proc/diskstats, not in some /proc file that happened to -- exist already. */ -- -- setvbuf(procpt, iobuf, _IOFBF, sizeof(iobuf)); --#endif -- -- for (firstPass = 1; firstPass >= 0; firstPass--) { -- fseek(procpt, 0, SEEK_SET); -- -- while (fgets(line, sizeof(line), procpt)) { -- if (!index(line, '\n')) -- break; -- -- if (sscanf (line, " %d %d %d %[^\n ]", -- &ma, &mi, &sz, ptname) != 4) -- continue; -- -- /* skip extended partitions (heuristic: size 1) */ -- if (sz == 1) -- continue; -- -- /* look only at md devices on first pass */ -- handleOnFirst = !strncmp(ptname, "md", 2); -- if (firstPass != handleOnFirst) -- continue; -- -- /* skip entire disk (minor 0, 64, ... on ide; -- 0, 16, ... on sd) */ -- /* heuristic: partition name ends in a digit */ -- /* devfs has .../disc and .../part1 etc. */ -- -- for (s = ptname; *s; s++); -- if (isdigit(s[-1]) || is_xvm(ptname)) { -- -- /* -- * Note: this is a heuristic only - there is no reason -- * why these devices should live in /dev. -- * Perhaps this directory should be specifiable by option. -- * One might for example have /devlabel with links to /dev -- * for the devices that may be accessed in this way. -- * (This is useful, if the cdrom on /dev/hdc must not -- * be accessed.) -- */ -- sprintf(device, "%s/%s", DEVLABELDIR, ptname); -- if (!get_label_uuid(device, &label, uuid)) -- uuidcache_addentry(xstrdup(device), label, uuid); -- } -- } -- } -- -- fclose(procpt); -- -- uuidcache_init_lvm(); --} -- --#define UUID 1 --#define VOL 2 -- --static const char * --get_spec_by_x(int n, const char *t) { -- struct uuidCache_s *uc; -- -- uuidcache_init(); -- uc = uuidCache; -- -- while (uc) { -- switch (n) { -- case UUID: -- if (!memcmp(t, uc->uuid, sizeof(uc->uuid))) -- return xstrdup(uc->device); -- break; -- case VOL: -- if (uc->label && !strcmp(t, uc->label)) -- return xstrdup(uc->device); -- break; -- } -- uc = uc->next; -- } -- return NULL; --} -- --static u_char --fromhex(char c) { -- if (isdigit(c)) -- return (c - '0'); -- else if (islower(c)) -- return (c - 'a' + 10); -- else -- return (c - 'A' + 10); --} -- --const char * --get_spec_by_uuid(const char *s) { -- u_char uuid[16]; -- int i; -- -- if (strlen(s) != 36 || -- s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-') -- goto bad_uuid; -- for (i=0; i<16; i++) { -- if (*s == '-') s++; -- if (!isxdigit(s[0]) || !isxdigit(s[1])) -- goto bad_uuid; -- uuid[i] = ((fromhex(s[0])<<4) | fromhex(s[1])); -- s += 2; -- } -- return get_spec_by_x(UUID, uuid); -- -- bad_uuid: -- die(EX_USAGE, _("%s: bad UUID"), progname); -- return NULL; /* just for gcc */ --} -- --const char * --get_spec_by_volume_label(const char *s) { -- return get_spec_by_x(VOL, s); --} -- --const char * --get_volume_label_by_spec(const char *spec) { -- struct uuidCache_s *uc; -- -- uuidcache_init(); -- uc = uuidCache; -- -- while(uc) { -- if (!strcmp(spec, uc->device)) -- return uc->label; -- uc = uc->next; -- } -- return NULL; --} -- --/* -- * second_occurrence_of_vol_label() -- * As labels are user defined they are not necessarily -- * system-wide unique. Make sure that they are. -- */ --const char * --second_occurrence_of_vol_label (const char *label) { -- struct uuidCache_s *last; -- int occurrences = 0; -- -- uuidcache_init(); -- -- for (last = uuidCache; last; last = last->next) { -- if (last->label && !strcmp(last->label, label)) { -- occurrences++; -- if (occurrences == 2) -- return last->device; -- } -- } -- -- return NULL; --} -- -- --#endif -diff --git a/mount/mount_by_label.h b/mount/mount_by_label.h -deleted file mode 100644 -index f5c930d..0000000 ---- a/mount/mount_by_label.h -+++ /dev/null -@@ -1,4 +0,0 @@ --const char *get_spec_by_uuid(const char *uuid); --const char *get_spec_by_volume_label(const char *volumelabel); --const char *get_volume_label_by_spec(const char *spec); --const char *second_occurrence_of_vol_label(const char *label); -diff --git a/mount/mount_guess_fstype.c b/mount/mount_guess_fstype.c -index 51d8750..01c3fc7 100644 ---- a/mount/mount_guess_fstype.c -+++ b/mount/mount_guess_fstype.c -@@ -46,8 +46,6 @@ - #define ETC_FILESYSTEMS "/etc/filesystems" - #define PROC_FILESYSTEMS "/proc/filesystems" - --#ifdef HAVE_LIBBLKID -- - char * - do_guess_fstype(const char *device) - { -@@ -60,438 +58,6 @@ known_fstype(const char *fstype) - return blkid_known_fstype(fstype); - } - --#else --#define SIZE(a) (sizeof(a)/sizeof(a[0])) -- --/* Most file system types can be recognized by a `magic' number -- in the superblock. Note that the order of the tests is -- significant: by coincidence a filesystem can have the -- magic numbers for several file system types simultaneously. -- For example, the romfs magic lives in the 1st sector; -- xiafs does not touch the 1st sector and has its magic in -- the 2nd sector; ext2 does not touch the first two sectors. */ -- --static inline unsigned short --swapped(unsigned short a) { -- return (a>>8) | (a<<8); --} -- --/* -- char *guess_fstype(const char *device); -- -- Probes the device and attempts to determine the type of filesystem -- contained within. -- -- Original routine by ; made into a function -- for mount(8) by Mike Grupenhoff . -- Corrected the test for xiafs - aeb -- Read the superblock only once - aeb -- Added a very weak heuristic for vfat - aeb -- Added efs, iso9660, minix-v2, romfs, qnx4, udf, vxfs, swap - aeb -- Added a test for high sierra (iso9660) - quinlan@bucknell.edu -- Added ufs from a patch by jj. But maybe there are several types of ufs? -- Added ntfs from a patch by Richard Russon. -- Added xfs - 2000-03-21 Martin K. Petersen -- Added cramfs, hfs, hpfs, adfs - Sepp Wijnands -- Added ext3 - Andrew Morton -- Added jfs - Christoph Hellwig -- Added sysv - Tim Launchbury -- Added udf - Bryce Nesbitt -- Added ocfs, ocfs2 - Manish Singh - http://oss.oracle.com/projects/ocfs2/ --*/ --static char --*magic_known[] = { -- "adfs", "bfs", "cramfs", "efs", "ext", "ext2", "ext3", -- "hfs", "hpfs", "iso9660", "jfs", "minix", "ntfs", "ocfs", "ocfs2", -- "qnx4", "reiserfs", "romfs", "swap", "sysv", "udf", "ufs", -- "vxfs", "xfs", "xiafs" --}; -- --static int --known_fstype(const char *fstype) { -- char **m; -- -- for (m = magic_known; m - magic_known < SIZE(magic_known); m++) -- if (!strcmp(*m, fstype)) -- return 1; -- return 0; --} -- --/* -- * udf magic - I find that trying to mount garbage as an udf fs -- * causes a very large kernel delay, almost killing the machine. -- * So, we do not try udf unless there is positive evidence that it -- * might work. Strings below taken from ECMA 167. -- */ --/* -- * It seems that before udf 2.00 the volume descriptor was not well -- * defined. For 2.00 you're supposed to keep scanning records until -- * you find one NOT in this list. (See ECMA 2/8.3.1). -- */ --static char --*udf_magic[] = { "BEA01", "BOOT2", "CD001", "CDW02", "NSR02", -- "NSR03", "TEA01" }; -- -- --static int --may_be_udf(const char *id) { -- char **m; -- -- for (m = udf_magic; m - udf_magic < SIZE(udf_magic); m++) -- if (!strncmp(*m, id, 5)) -- return 1; -- return 0; --} -- --/* we saw "CD001" - may be iso9660 or udf - Bryce Nesbitt */ --static int --is_really_udf(int fd) { -- int j, bs; -- struct iso_volume_descriptor isosb; -- -- /* determine the block size by scanning in 2K increments -- (block sizes larger than 2K will be null padded) */ -- for (bs = 1; bs < 16; bs++) { -- lseek(fd, bs*2048+32768, SEEK_SET); -- if (read(fd, (char *)&isosb, sizeof(isosb)) != sizeof(isosb)) -- return 0; -- if (isosb.id[0]) -- break; -- } -- -- /* Scan up to another 64 blocks looking for additional VSD's */ -- for (j = 1; j < 64; j++) { -- if (j > 1) { -- lseek(fd, j*bs*2048+32768, SEEK_SET); -- if (read(fd, (char *)&isosb, sizeof(isosb)) -- != sizeof(isosb)) -- return 0; -- } -- /* If we find NSR0x then call it udf: -- NSR01 for UDF 1.00 -- NSR02 for UDF 1.50 -- NSR03 for UDF 2.00 */ -- if (!strncmp(isosb.id, "NSR0", 4)) -- return 1; -- if (!may_be_udf(isosb.id)) -- return 0; -- } -- -- return 0; --} -- --static int --may_be_swap(const char *s) { -- return (strncmp(s-10, "SWAP-SPACE", 10) == 0 || -- strncmp(s-10, "SWAPSPACE2", 10) == 0); --} -- --/* rather weak necessary condition */ --static int --may_be_adfs(const u_char *s) { -- u_char *p; -- int sum; -- -- p = (u_char *) s + 511; -- sum = 0; -- while (--p != s) -- sum = (sum >> 8) + (sum & 0xff) + *p; -- -- return (sum == p[511]); --} -- --char * --do_guess_fstype(const char *device) { -- int fd; -- char *type = NULL; -- union { -- struct xiafs_super_block xiasb; -- char romfs_magic[8]; -- char qnx4fs_magic[10]; /* ignore first 4 bytes */ -- long bfs_magic; -- struct ntfs_super_block ntfssb; -- struct fat_super_block fatsb; -- struct xfs_super_block xfsb; -- struct cramfs_super_block cramfssb; -- struct ocfs_volume_header ovh; -- struct efs_volume_header efsvh; -- struct efs_super efssb; -- } xsb; /* stuff at 0 */ -- union { -- struct minix_super_block ms; -- struct ext_super_block es; -- struct ext2_super_block e2s; -- struct vxfs_super_block vs; -- } sb; /* stuff at 1024 */ -- struct ufs_super_block ufssb; -- union { -- struct iso_volume_descriptor iso; -- struct hs_volume_descriptor hs; -- } isosb; -- struct reiserfs_super_block reiserfssb; /* block 64 or 8 */ -- struct jfs_super_block jfssb; /* block 32 */ -- struct hfs_super_block hfssb; -- struct hpfs_super_block hpfssb; -- struct adfs_super_block adfssb; -- struct sysv_super_block svsb; -- struct ocfs2_super_block osb; -- struct stat statbuf; -- -- /* opening and reading an arbitrary unknown path can have -- undesired side effects - first check that `device' refers -- to a block device or ordinary file */ -- if (stat (device, &statbuf) || -- !(S_ISBLK(statbuf.st_mode) || S_ISREG(statbuf.st_mode))) -- return 0; -- -- fd = open(device, O_RDONLY); -- if (fd < 0) -- return 0; -- -- /* do seeks and reads in disk order, otherwise a very short -- partition may cause a failure because of read error */ -- -- if (!type) { -- /* block 0 */ -- if (lseek(fd, 0, SEEK_SET) != 0 -- || read(fd, (char *) &xsb, sizeof(xsb)) != sizeof(xsb)) -- goto try_iso9660; -- /* Gyorgy Kovesdi: none of my photocds has a readable block 0 */ -- -- if (xiafsmagic(xsb.xiasb) == _XIAFS_SUPER_MAGIC) -- type = "xiafs"; -- else if(!strncmp(xsb.romfs_magic, "-rom1fs-", 8)) -- type = "romfs"; -- else if(!strncmp(xsb.xfsb.s_magic, XFS_SUPER_MAGIC, 4)) -- type = "xfs"; -- else if(!strncmp(xsb.ovh.signature, OCFS_MAGIC, sizeof(OCFS_MAGIC))) -- type = "ocfs"; -- else if(!strncmp(xsb.qnx4fs_magic+4, "QNX4FS", 6)) -- type = "qnx4"; -- else if(xsb.bfs_magic == 0x1badface) -- type = "bfs"; -- else if(!strncmp(xsb.ntfssb.s_magic, NTFS_SUPER_MAGIC, -- sizeof(xsb.ntfssb.s_magic))) -- type = "ntfs"; -- else if(cramfsmagic(xsb.cramfssb) == CRAMFS_SUPER_MAGIC || -- cramfsmagic(xsb.cramfssb) == CRAMFS_SUPER_MAGIC_BE) -- type = "cramfs"; -- else if (assemble4be(xsb.efsvh.vh_magic) == EFS_VHMAGIC) -- type = "efs"; /* EFS volume header */ -- /* might check checksum here */ -- else if (assemble4be(xsb.efssb.fs_magic) == EFS_SBMAGIC || -- assemble4be(xsb.efssb.fs_magic) == EFS_SBMAGIC2) -- type = "efs"; /* EFS partition */ -- else if ((!strncmp(xsb.fatsb.s_os, "MSDOS", 5) || -- !strncmp(xsb.fatsb.s_os, "MSWIN", 5) || -- !strncmp(xsb.fatsb.s_os, "MTOOL", 5) || -- !strncmp(xsb.fatsb.s_os, "IBM", 3) || -- !strncmp(xsb.fatsb.s_os, "DRDOS", 5) || -- !strncmp(xsb.fatsb.s_os, "mkdosfs", 7) || -- !strncmp(xsb.fatsb.s_os, "kmkdosfs", 8) || -- /* Michal Svec: created by fdformat, old msdos utility for -- formatting large (1.7) floppy disks. */ -- !strncmp(xsb.fatsb.s_os, "CH-FOR18", 8)) -- && (!strncmp(xsb.fatsb.s_fs, "FAT12 ", 8) || -- !strncmp(xsb.fatsb.s_fs, "FAT16 ", 8) || -- !strncmp(xsb.fatsb.s_fs2, "FAT32 ", 8))) -- type = "vfat"; /* only guessing - might as well be fat or umsdos */ -- } -- -- if (!type) { -- /* sector 1 */ -- if (lseek(fd, 512 , SEEK_SET) != 512 -- || read(fd, (char *) &svsb, sizeof(svsb)) != sizeof(svsb)) -- goto io_error; -- if (sysvmagic(svsb) == SYSV_SUPER_MAGIC ) -- type = "sysv"; -- } -- -- if (!type) { -- /* block 1 */ -- if (lseek(fd, 1024, SEEK_SET) != 1024 || -- read(fd, (char *) &sb, sizeof(sb)) != sizeof(sb)) -- goto io_error; -- -- /* ext2 has magic in little-endian on disk, so "swapped" is -- superfluous; however, there have existed strange byteswapped -- PPC ext2 systems */ -- if (ext2magic(sb.e2s) == EXT2_SUPER_MAGIC || -- ext2magic(sb.e2s) == EXT2_PRE_02B_MAGIC || -- ext2magic(sb.e2s) == swapped(EXT2_SUPER_MAGIC)) { -- type = "ext2"; -- -- /* maybe even ext3? */ -- if ((assemble4le(sb.e2s.s_feature_compat) -- & EXT3_FEATURE_COMPAT_HAS_JOURNAL) && -- assemble4le(sb.e2s.s_journal_inum) != 0) -- type = "ext3"; /* "ext3,ext2" */ -- } -- -- else if (minixmagic(sb.ms) == MINIX_SUPER_MAGIC || -- minixmagic(sb.ms) == MINIX_SUPER_MAGIC2 || -- minixmagic(sb.ms) == swapped(MINIX_SUPER_MAGIC2) || -- minixmagic(sb.ms) == MINIX2_SUPER_MAGIC || -- minixmagic(sb.ms) == MINIX2_SUPER_MAGIC2) -- type = "minix"; -- -- else if (extmagic(sb.es) == EXT_SUPER_MAGIC) -- type = "ext"; -- -- else if (vxfsmagic(sb.vs) == VXFS_SUPER_MAGIC) -- type = "vxfs"; -- } -- -- if (!type) { -- /* block 1 */ -- if (lseek(fd, 0x400, SEEK_SET) != 0x400 -- || read(fd, (char *) &hfssb, sizeof(hfssb)) != sizeof(hfssb)) -- goto io_error; -- -- /* also check if block size is equal to 512 bytes, -- or a multiple. (I see 1536 here.) */ -- if (hfsmagic(hfssb) == HFS_SUPER_MAGIC && /* always BE */ -- hfsblksize(hfssb) != 0 && -- (hfsblksize(hfssb) & 0x1ff) == 0) -- type = "hfs"; -- } -- -- if (!type) { -- /* block 3 */ -- if (lseek(fd, 0xc00, SEEK_SET) != 0xc00 -- || read(fd, (char *) &adfssb, sizeof(adfssb)) != sizeof(adfssb)) -- goto io_error; -- -- /* only a weak test */ -- if (may_be_adfs((u_char *) &adfssb) -- && (adfsblksize(adfssb) >= 8 && -- adfsblksize(adfssb) <= 10)) -- type = "adfs"; -- } -- -- if (!type) { -- int mag; -- -- /* block 8 */ -- if (lseek(fd, 8192, SEEK_SET) != 8192 -- || read(fd, (char *) &ufssb, sizeof(ufssb)) != sizeof(ufssb)) -- goto io_error; -- -- mag = ufsmagic(ufssb); -- if (mag == UFS_SUPER_MAGIC_LE || mag == UFS_SUPER_MAGIC_BE) -- type = "ufs"; -- } -- -- if (!type) { -- /* block 8 */ -- if (lseek(fd, REISERFS_OLD_DISK_OFFSET_IN_BYTES, SEEK_SET) != -- REISERFS_OLD_DISK_OFFSET_IN_BYTES -- || read(fd, (char *) &reiserfssb, sizeof(reiserfssb)) != -- sizeof(reiserfssb)) -- goto io_error; -- if (reiserfs_magic_version(reiserfssb.s_magic)) -- type = "reiserfs"; -- } -- -- if (!type) { -- /* block 8 */ -- if (lseek(fd, 0x2000, SEEK_SET) != 0x2000 -- || read(fd, (char *) &hpfssb, sizeof(hpfssb)) != sizeof(hpfssb)) -- goto io_error; -- -- if (hpfsmagic(hpfssb) == HPFS_SUPER_MAGIC) -- type = "hpfs"; -- } -- -- if (!type) { -- /* block 32 */ -- if (lseek(fd, JFS_SUPER1_OFF, SEEK_SET) != JFS_SUPER1_OFF -- || read(fd, (char *) &jfssb, sizeof(jfssb)) != sizeof(jfssb)) -- goto io_error; -- if (!strncmp(jfssb.s_magic, JFS_MAGIC, 4)) -- type = "jfs"; -- } -- -- if (!type) { -- /* block 32 */ -- try_iso9660: -- if (lseek(fd, 0x8000, SEEK_SET) != 0x8000 -- || read(fd, (char *) &isosb, sizeof(isosb)) != sizeof(isosb)) -- goto io_error; -- -- if (strncmp(isosb.hs.id, HS_STANDARD_ID, sizeof(isosb.hs.id)) == 0) { -- /* "CDROM" */ -- type = "iso9660"; -- } else if (strncmp(isosb.iso.id, ISO_STANDARD_ID, -- sizeof(isosb.iso.id)) == 0) { -- /* CD001 */ -- type = "iso9660"; -- if (is_really_udf(fd)) -- type = "udf"; -- } else if (may_be_udf(isosb.iso.id)) -- type = "udf"; -- } -- -- if (!type) { -- /* block 64 */ -- if (lseek(fd, REISERFS_DISK_OFFSET_IN_BYTES, SEEK_SET) != -- REISERFS_DISK_OFFSET_IN_BYTES -- || read(fd, (char *) &reiserfssb, sizeof(reiserfssb)) != -- sizeof(reiserfssb)) -- goto io_error; -- if (reiserfs_magic_version(reiserfssb.s_magic)) -- type = "reiserfs"; -- } -- -- if (!type) { -- int blksize, blkoff; -- -- for (blksize = OCFS2_MIN_BLOCKSIZE; -- blksize <= OCFS2_MAX_BLOCKSIZE; -- blksize <<= 1) { -- blkoff = blksize * OCFS2_SUPER_BLOCK_BLKNO; -- if (lseek(fd, blkoff, SEEK_SET) != blkoff -- || read(fd, (char *) &osb, sizeof(osb)) != sizeof(osb)) -- goto io_error; -- if (strncmp(osb.signature, OCFS2_SUPER_BLOCK_SIGNATURE, -- sizeof(OCFS2_SUPER_BLOCK_SIGNATURE)) == 0) -- type = "ocfs2"; -- } -- } -- -- if (!type) { -- /* perhaps the user tries to mount the swap space -- on a new disk; warn her before she does mke2fs on it */ -- int pagesize = getpagesize(); -- int rd; -- char buf[32768]; -- -- rd = pagesize; -- if (rd < 8192) -- rd = 8192; -- if (rd > sizeof(buf)) -- rd = sizeof(buf); -- if (lseek(fd, 0, SEEK_SET) != 0 -- || read(fd, buf, rd) != rd) -- goto io_error; -- if (may_be_swap(buf+pagesize) || -- may_be_swap(buf+4096) || may_be_swap(buf+8192)) -- type = "swap"; -- } -- -- close (fd); -- return(type); -- --io_error: -- if (errno) -- perror(device); -- else -- fprintf(stderr, _("mount: error while guessing filesystem type\n")); -- close(fd); -- return 0; --} -- --#endif - - static struct tried { - struct tried *next; -diff --git a/mount/swapon.c b/mount/swapon.c -index af4ba96..cb055b3 100644 ---- a/mount/swapon.c -+++ b/mount/swapon.c -@@ -16,7 +16,6 @@ - #include "swapargs.h" - #include "nls.h" - #include "fsprobe.h" --#include "mount_by_label.h" - #include "realpath.h" - - #define streq(s, t) (strcmp ((s), (t)) == 0) --- -1.5.0.6 - -- -To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html - -Signed-off-by: Kay Sievers -Signed-off-by: Karel Zak ---- - mount/Makefile.am | 15 +-- - mount/fsprobe.c | 164 ++++++++++++++++++++++++++++++++ - mount/fsprobe.h | 17 ++++ - mount/fsprobe_blkid.c | 11 ++ - mount/mount.c | 43 +++++++-- - mount/mount_guess_fstype.c | 225 -------------------------------------------- - mount/mount_guess_fstype.h | 16 --- - mount/mount_paths.h | 3 + - 8 files changed, 232 insertions(+), 262 deletions(-) - -diff --git a/mount/Makefile.am b/mount/Makefile.am -index 6f63dcf..b5b21b5 100644 ---- a/mount/Makefile.am -+++ b/mount/Makefile.am -@@ -7,24 +7,17 @@ sbin_PROGRAMS = losetup swapon - man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 - - MNTHDRS = fstab.h linux_fs.h mount_mntent.h mount_constants.h my_dev_t.h \ -- mount_paths.h lomount.h fsprobe.h \ -- mount_guess_fstype.h realpath.h xmalloc.h \ -- getusername.h loop.h mount_guess_rootdev.h \ -- sundries.h -+ mount_paths.h lomount.h fsprobe.h realpath.h xmalloc.h \ -+ getusername.h loop.h mount_guess_rootdev.h sundries.h - - mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ -- mount_guess_fstype.c \ -- getusername.c \ -- lomount.c \ -- $(MNTHDRS) -+ fsprobe.c getusername.c lomount.c $(MNTHDRS) - - mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a - mount_CFLAGS = $(SUID_CFLAGS) - - umount_SOURCES = umount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \ -- getusername.c \ -- lomount.c \ -- $(MNTHDRS) -+ getusername.c fsprobe.c lomount.c $(MNTHDRS) - - umount_LDADD = $(top_srcdir)/lib/libenv.a - umount_CFLAGS = $(SUID_CFLAGS) -diff --git a/mount/fsprobe.c b/mount/fsprobe.c -new file mode 100644 -index 0000000..4b57802 ---- /dev/null -+++ b/mount/fsprobe.c -@@ -0,0 +1,164 @@ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include "mount_paths.h" -+#include "linux_fs.h" -+#include "fsprobe.h" -+#include "sundries.h" /* for xstrdup */ -+#include "nls.h" -+ -+/* list of already tested filesystems by fsprobe_procfsloop_mount() */ -+static struct tried { -+ struct tried *next; -+ char *type; -+} *tried = NULL; -+ -+static int -+was_tested(const char *fstype) { -+ struct tried *t; -+ -+ if (fsprobe_known_fstype(fstype)) -+ return 1; -+ for (t = tried; t; t = t->next) { -+ if (!strcmp(t->type, fstype)) -+ return 1; -+ } -+ return 0; -+} -+ -+static void -+set_tested(const char *fstype) { -+ struct tried *t = xmalloc(sizeof(struct tried)); -+ -+ t->next = tried; -+ t->type = xstrdup(fstype); -+ tried = t; -+} -+ -+static void -+free_tested(void) { -+ struct tried *t, *tt; -+ -+ t = tried; -+ while(t) { -+ free(t->type); -+ tt = t->next; -+ free(t); -+ t = tt; -+ } -+ tried = NULL; -+} -+ -+static char * -+procfsnext(FILE *procfs) { -+ char line[100]; -+ char fsname[100]; -+ -+ while (fgets(line, sizeof(line), procfs)) { -+ if (sscanf (line, "nodev %[^\n]\n", fsname) == 1) continue; -+ if (sscanf (line, " %[^ \n]\n", fsname) != 1) continue; -+ return xstrdup(fsname); -+ } -+ return 0; -+} -+ -+/* Only use /proc/filesystems here, this is meant to test what -+ the kernel knows about, so /etc/filesystems is irrelevant. -+ Return: 1: yes, 0: no, -1: cannot open procfs */ -+int -+fsprobe_known_fstype_in_procfs(const char *type) -+{ -+ FILE *procfs; -+ char *fsname; -+ int ret = -1; -+ -+ procfs = fopen(PROC_FILESYSTEMS, "r"); -+ if (procfs) { -+ ret = 0; -+ while ((fsname = procfsnext(procfs)) != NULL) -+ if (!strcmp(fsname, type)) { -+ ret = 1; -+ break; -+ } -+ fclose(procfs); -+ procfs = NULL; -+ } -+ return ret; -+} -+ -+/* Try all types in FILESYSTEMS, except those in *types, -+ in case *types starts with "no" */ -+/* return: 0: OK, -1: error in errno, 1: type not found */ -+/* when 0 or -1 is returned, *types contains the type used */ -+/* when 1 is returned, *types is NULL */ -+int -+fsprobe_procfsloop_mount( int (*mount_fn)(struct mountargs *), -+ struct mountargs *args, -+ const char **types) -+{ -+ char *files[2] = { ETC_FILESYSTEMS, PROC_FILESYSTEMS }; -+ FILE *procfs; -+ char *fsname; -+ const char *notypes = NULL; -+ int no = 0; -+ int ret = 1; -+ int errsv = 0; -+ int i; -+ -+ if (*types && !strncmp(*types, "no", 2)) { -+ no = 1; -+ notypes = (*types) + 2; -+ } -+ *types = NULL; -+ -+ /* Use PROC_FILESYSTEMS only when ETC_FILESYSTEMS does not exist. -+ In some cases trying a filesystem that the kernel knows about -+ on the wrong data will crash the kernel; in such cases -+ ETC_FILESYSTEMS can be used to list the filesystems that we -+ are allowed to try, and in the order they should be tried. -+ End ETC_FILESYSTEMS with a line containing a single '*' only, -+ if PROC_FILESYSTEMS should be tried afterwards. */ -+ -+ for (i=0; i<2; i++) { -+ procfs = fopen(files[i], "r"); -+ if (!procfs) -+ continue; -+ while ((fsname = procfsnext(procfs)) != NULL) { -+ if (!strcmp(fsname, "*")) { -+ fclose(procfs); -+ goto nexti; -+ } -+ if (was_tested (fsname)) -+ continue; -+ if (no && matching_type(fsname, notypes)) -+ continue; -+ set_tested (fsname); -+ args->type = fsname; -+ if (verbose) { -+ printf(_("Trying %s\n"), fsname); -+ fflush(stdout); -+ } -+ if ((*mount_fn) (args) == 0) { -+ *types = fsname; -+ ret = 0; -+ break; -+ } else if (errno != EINVAL && -+ fsprobe_known_fstype_in_procfs(fsname) == 1) { -+ *types = "guess"; -+ ret = -1; -+ errsv = errno; -+ break; -+ } -+ } -+ free_tested(); -+ fclose(procfs); -+ errno = errsv; -+ return ret; -+ nexti:; -+ } -+ return 1; -+} -diff --git a/mount/fsprobe.h b/mount/fsprobe.h -index c96ff8c..cc429e1 100644 ---- a/mount/fsprobe.h -+++ b/mount/fsprobe.h -@@ -10,3 +10,20 @@ extern const char *mount_get_devname_by_label(const char *label); - extern const char *mount_get_volume_label_by_spec(const char *spec); - extern const char *mount_get_devname(const char *spec); - extern const char *mount_get_devname_for_mounting(const char *spec); -+extern int fsprobe_known_fstype(const char *fstype); -+extern const char *fsprobe_get_fstype_by_devname(const char *devname); -+ -+struct mountargs { -+ const char *spec; -+ const char *node; -+ const char *type; -+ int flags; -+ void *data; -+}; -+ -+extern int fsprobe_known_fstype_in_procfs(const char *type); -+ -+extern int fsprobe_procfsloop_mount(int (*mount_fn)(struct mountargs *), -+ struct mountargs *args, -+ const char **types); -+ -diff --git a/mount/fsprobe_blkid.c b/mount/fsprobe_blkid.c -index 9ff4e31..7f8c362 100644 ---- a/mount/fsprobe_blkid.c -+++ b/mount/fsprobe_blkid.c -@@ -41,4 +41,15 @@ mount_get_devname_for_mounting(const char *spec) { - return blkid_get_devname(blkid, spec, 0); - } - -+int -+fsprobe_known_fstype(const char *fstype) -+{ -+ return blkid_known_fstype(fstype); -+} -+ -+const char * -+fsprobe_get_fstype_by_devname(const char *devname) { -+ return blkid_get_tag_value(blkid, "TYPE", devname); -+} -+ - #endif -diff --git a/mount/mount.c b/mount/mount.c -index 309e41e..be9e409 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -39,7 +39,6 @@ - #include "loop.h" - #include "linux_fs.h" /* for BLKGETSIZE */ - #include "mount_guess_rootdev.h" --#include "mount_guess_fstype.h" - #include "getusername.h" - #include "mount_paths.h" - #include "env.h" -@@ -656,6 +655,26 @@ check_special_mountprog(const char *spec, const char *node, const char *type, in - return 0; - } - -+ -+static const char * -+guess_fstype_by_devname(const char *devname) -+{ -+ const char *type = fsprobe_get_fstype_by_devname(devname); -+ -+ if (verbose) { -+ printf (_("mount: you didn't specify a filesystem type for %s\n"), devname); -+ -+ if (!type) -+ printf (_(" I will try all types mentioned in %s or %s\n"), -+ ETC_FILESYSTEMS, PROC_FILESYSTEMS); -+ else if (!strcmp(type, "swap")) -+ printf (_(" and it looks like this is swapspace\n")); -+ else -+ printf (_(" I will try type %s\n"), type); -+ } -+ return type; -+} -+ - /* - * guess_fstype_and_mount() - * Mount a single file system. Guess the type when unknown. -@@ -675,7 +694,7 @@ guess_fstype_and_mount(const char *spec, const char *node, const char **types, - *types = "none"; /* random, but not "bind" */ - - if (!*types && !(flags & MS_REMOUNT)) { -- *types = guess_fstype(spec); -+ *types = guess_fstype_by_devname(spec); - if (*types) { - if (!strcmp(*types, "swap")) { - error(_("%s looks like swapspace - not mounted"), spec); -@@ -711,7 +730,7 @@ guess_fstype_and_mount(const char *spec, const char *node, const char **types, - return do_mount_syscall (&args); - } - -- return procfsloop(do_mount_syscall, &args, types); -+ return fsprobe_procfsloop_mount(do_mount_syscall, &args, types); - } - - /* -@@ -1147,8 +1166,10 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, - case EIO: - error (_("mount: %s: can't read superblock"), spec); break; - case ENODEV: -- { int pfs; -- if ((pfs = is_in_procfs(types)) == 1 || !strcmp(types, "guess")) -+ { -+ int pfs = fsprobe_known_fstype_in_procfs(types); -+ -+ if (pfs == 1 || !strcmp(types, "guess")) - error(_("mount: %s: unknown device"), spec); - else if (pfs == 0) { - char *lowtype, *p; -@@ -1165,11 +1186,13 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, - u++; - } - } -- if (u && is_in_procfs(lowtype) == 1) -+ if (u && fsprobe_known_fstype_in_procfs(lowtype) == 1) - error (_("mount: probably you meant %s"), lowtype); -- else if (!strncmp(lowtype, "iso", 3) && is_in_procfs("iso9660") == 1) -+ else if (!strncmp(lowtype, "iso", 3) && -+ fsprobe_known_fstype_in_procfs("iso9660") == 1) - error (_("mount: maybe you meant 'iso9660'?")); -- else if (!strncmp(lowtype, "fat", 3) && is_in_procfs("vfat") == 1) -+ else if (!strncmp(lowtype, "fat", 3) && -+ fsprobe_known_fstype_in_procfs("vfat") == 1) - error (_("mount: maybe you meant 'vfat'?")); - free(lowtype); - } else -@@ -1741,8 +1764,8 @@ main(int argc, char *argv[]) { - use only for testing purposes - - the guessing is not reliable at all */ - { -- char *fstype; -- fstype = do_guess_fstype(optarg); -+ const char *fstype; -+ fstype = fsprobe_get_fstype_by_devname(optarg); - printf("%s\n", fstype ? fstype : "unknown"); - exit(fstype ? 0 : EX_FAIL); - } -diff --git a/mount/mount_guess_fstype.c b/mount/mount_guess_fstype.c -deleted file mode 100644 -index 01c3fc7..0000000 ---- a/mount/mount_guess_fstype.c -+++ /dev/null -@@ -1,225 +0,0 @@ --/* -- * Thu Jul 14 07:32:40 1994: faith@cs.unc.edu added changes from Adam -- * J. Richter (adam@adam.yggdrasil.com) so that /proc/filesystems is used -- * if no -t option is given. I modified his patches so that, if -- * /proc/filesystems is not available, the behavior of mount is the same as -- * it was previously. -- * -- * Wed Feb 8 09:23:18 1995: Mike Grupenhoff added -- * a probe of the superblock for the type before /proc/filesystems is -- * checked. -- * -- * Fri Apr 5 01:13:33 1996: quinlan@bucknell.edu, fixed up iso9660 autodetect -- * -- * Wed Nov 11 11:33:55 1998: K.Garloff@ping.de, try /etc/filesystems before -- * /proc/filesystems -- * [This was mainly in order to specify vfat before fat; these days we often -- * detect *fat and then assume vfat, so perhaps /etc/filesystems isnt -- * so useful anymore.] -- * -- * 1999-02-22 Arkadiusz Mi¶kiewicz -- * added Native Language Support -- * -- * 2000-12-01 Sepp Wijnands -- * added probes for cramfs, hfs, hpfs and adfs. -- * -- * 2001-10-26 Tim Launchbury -- * added sysv magic. -- * -- * aeb - many changes. -- * -- */ -- --#include --#include --#include --#include --#include --#include --#include --#include "linux_fs.h" --#include "fsprobe.h" --#include "mount_guess_fstype.h" --#include "sundries.h" /* for xstrdup */ --#include "nls.h" -- --#define ETC_FILESYSTEMS "/etc/filesystems" --#define PROC_FILESYSTEMS "/proc/filesystems" -- --char * --do_guess_fstype(const char *device) --{ -- return blkid_get_tag_value(blkid, "TYPE", device); --} -- --static int --known_fstype(const char *fstype) --{ -- return blkid_known_fstype(fstype); --} -- -- --static struct tried { -- struct tried *next; -- char *type; --} *tried = NULL; -- --static int --was_tested(const char *fstype) { -- struct tried *t; -- -- if (known_fstype(fstype)) -- return 1; -- for (t = tried; t; t = t->next) { -- if (!strcmp(t->type, fstype)) -- return 1; -- } -- return 0; --} -- --static void --set_tested(const char *fstype) { -- struct tried *t = xmalloc(sizeof(struct tried)); -- -- t->next = tried; -- t->type = xstrdup(fstype); -- tried = t; --} -- --static void --free_tested(void) { -- struct tried *t, *tt; -- -- t = tried; -- while(t) { -- free(t->type); -- tt = t->next; -- free(t); -- t = tt; -- } -- tried = NULL; --} -- --char * --guess_fstype(const char *spec) { -- char *type = do_guess_fstype(spec); -- if (verbose) { -- printf (_("mount: you didn't specify a filesystem type for %s\n"), -- spec); -- if (!type) -- printf (_(" I will try all types mentioned in %s or %s\n"), -- ETC_FILESYSTEMS, PROC_FILESYSTEMS); -- else if (!strcmp(type, "swap")) -- printf (_(" and it looks like this is swapspace\n")); -- else -- printf (_(" I will try type %s\n"), type); -- } -- return type; --} -- --static char * --procfsnext(FILE *procfs) { -- char line[100]; -- char fsname[100]; -- -- while (fgets(line, sizeof(line), procfs)) { -- if (sscanf (line, "nodev %[^\n]\n", fsname) == 1) continue; -- if (sscanf (line, " %[^ \n]\n", fsname) != 1) continue; -- return xstrdup(fsname); -- } -- return 0; --} -- --/* Only use /proc/filesystems here, this is meant to test what -- the kernel knows about, so /etc/filesystems is irrelevant. -- Return: 1: yes, 0: no, -1: cannot open procfs */ --int --is_in_procfs(const char *type) { -- FILE *procfs; -- char *fsname; -- int ret = -1; -- -- procfs = fopen(PROC_FILESYSTEMS, "r"); -- if (procfs) { -- ret = 0; -- while ((fsname = procfsnext(procfs)) != NULL) -- if (!strcmp(fsname, type)) { -- ret = 1; -- break; -- } -- fclose(procfs); -- procfs = NULL; -- } -- return ret; --} -- --/* Try all types in FILESYSTEMS, except those in *types, -- in case *types starts with "no" */ --/* return: 0: OK, -1: error in errno, 1: type not found */ --/* when 0 or -1 is returned, *types contains the type used */ --/* when 1 is returned, *types is NULL */ --int --procfsloop(int (*mount_fn)(struct mountargs *), struct mountargs *args, -- const char **types) { -- char *files[2] = { ETC_FILESYSTEMS, PROC_FILESYSTEMS }; -- FILE *procfs; -- char *fsname; -- const char *notypes = NULL; -- int no = 0; -- int ret = 1; -- int errsv = 0; -- int i; -- -- if (*types && !strncmp(*types, "no", 2)) { -- no = 1; -- notypes = (*types) + 2; -- } -- *types = NULL; -- -- /* Use PROC_FILESYSTEMS only when ETC_FILESYSTEMS does not exist. -- In some cases trying a filesystem that the kernel knows about -- on the wrong data will crash the kernel; in such cases -- ETC_FILESYSTEMS can be used to list the filesystems that we -- are allowed to try, and in the order they should be tried. -- End ETC_FILESYSTEMS with a line containing a single '*' only, -- if PROC_FILESYSTEMS should be tried afterwards. */ -- -- for (i=0; i<2; i++) { -- procfs = fopen(files[i], "r"); -- if (!procfs) -- continue; -- while ((fsname = procfsnext(procfs)) != NULL) { -- if (!strcmp(fsname, "*")) { -- fclose(procfs); -- goto nexti; -- } -- if (was_tested (fsname)) -- continue; -- if (no && matching_type(fsname, notypes)) -- continue; -- set_tested (fsname); -- args->type = fsname; -- if (verbose) { -- printf(_("Trying %s\n"), fsname); -- fflush(stdout); -- } -- if ((*mount_fn) (args) == 0) { -- *types = fsname; -- ret = 0; -- break; -- } else if (errno != EINVAL && -- is_in_procfs(fsname) == 1) { -- *types = "guess"; -- ret = -1; -- errsv = errno; -- break; -- } -- } -- free_tested(); -- fclose(procfs); -- errno = errsv; -- return ret; -- nexti:; -- } -- return 1; --} -diff --git a/mount/mount_guess_fstype.h b/mount/mount_guess_fstype.h -deleted file mode 100644 -index 63cb678..0000000 ---- a/mount/mount_guess_fstype.h -+++ /dev/null -@@ -1,16 +0,0 @@ --struct mountargs { -- const char *spec; -- const char *node; -- const char *type; -- int flags; -- void *data; --}; -- --extern int verbose; -- --char *guess_fstype(const char *device); --char *do_guess_fstype(const char *device); --int procfsloop(int (*mount_fn)(struct mountargs *), struct mountargs *args, -- const char **type); --int is_in_procfs(const char *fstype); -- -diff --git a/mount/mount_paths.h b/mount/mount_paths.h -index fe84e1d..9093b10 100644 ---- a/mount/mount_paths.h -+++ b/mount/mount_paths.h -@@ -12,4 +12,7 @@ - #endif - #define LOCK_TIMEOUT 10 - -+#define ETC_FILESYSTEMS "/etc/filesystems" -+#define PROC_FILESYSTEMS "/proc/filesystems" -+ - #endif /* MOUNT_PATHS_H */ --- -1.5.0.6 - -- -To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html - -Signed-off-by: Karel Zak ---- - mount/fsprobe.h | 41 ++++++++++++++++++++++++++++------------- - mount/fsprobe_blkid.c | 27 +++++++++++++++------------ - mount/fstab.c | 8 ++++---- - mount/mount.c | 40 +++++++++++++++++++++++----------------- - mount/swapon.c | 14 +++++++------- - 5 files changed, 77 insertions(+), 53 deletions(-) - -diff --git a/mount/fsprobe.h b/mount/fsprobe.h -index cc429e1..e59440e 100644 ---- a/mount/fsprobe.h -+++ b/mount/fsprobe.h -@@ -1,18 +1,32 @@ --#ifdef HAVE_LIBBLKID --#include --extern blkid_cache blkid; --#endif -- --extern void mount_blkid_get_cache(void); --extern void mount_blkid_put_cache(void); --extern const char *mount_get_devname_by_uuid(const char *uuid); --extern const char *mount_get_devname_by_label(const char *label); --extern const char *mount_get_volume_label_by_spec(const char *spec); --extern const char *mount_get_devname(const char *spec); --extern const char *mount_get_devname_for_mounting(const char *spec); --extern int fsprobe_known_fstype(const char *fstype); -+#ifndef MOUNT_FSPROBE_H -+#define MOUNT_FSPROBE_H -+/* -+ * This is the generic interface for filesystem guessing libraries. -+ * Implementations are provided by -+ * -+ * fsprobe_blkid.c for libblkid from e2fsprogs -+ * fsprobe_volumeid.c for libvolume_id from udev -+ * -+ * Copyright (C) 2007 Kay Sievers -+ * Copyright (C) 2007 Matthias Koenig -+ * Copyright (C) 2007 Karel Zak -+ */ -+ -+extern void fsprobe_init(void); -+extern void fsprobe_exit(void); -+ -+extern const char *fsprobe_get_devname_by_uuid(const char *uuid); -+extern const char *fsprobe_get_devname_by_label(const char *label); -+ -+extern const char *fsprobe_get_label_by_devname(const char *devname); -+extern const char *fsprobe_get_uuid_by_devname(const char *devname); - extern const char *fsprobe_get_fstype_by_devname(const char *devname); - -+extern const char *fsprobe_get_devname(const char *spec); -+extern const char *fsprobe_get_devname_for_mounting(const char *spec); -+ -+extern int fsprobe_known_fstype(const char *fstype); -+ - struct mountargs { - const char *spec; - const char *node; -@@ -27,3 +41,4 @@ extern int fsprobe_procfsloop_mount(int (*mount_fn)(struct mountargs *), - struct mountargs *args, - const char **types); - -+#endif /* MOUNT_FSPROBE_H */ -diff --git a/mount/fsprobe_blkid.c b/mount/fsprobe_blkid.c -index 7f8c362..d25b973 100644 ---- a/mount/fsprobe_blkid.c -+++ b/mount/fsprobe_blkid.c -@@ -1,43 +1,47 @@ - #include -+#include - #include "fsprobe.h" - --#ifdef HAVE_LIBBLKID -- --blkid_cache blkid; -+static blkid_cache blkid; - - void --mount_blkid_get_cache(void) { -+fsprobe_init(void) { - blkid_get_cache(&blkid, NULL); - } - - void --mount_blkid_put_cache(void) { -+fsprobe_exit(void) { - blkid_put_cache(blkid); - } - - const char * --mount_get_volume_label_by_spec(const char *spec) { -- return blkid_get_tag_value(blkid, "LABEL", spec); -+fsprobe_get_label_by_devname(const char *devname) { -+ return blkid_get_tag_value(blkid, "LABEL", devname); -+} -+ -+const char * -+fsprobe_get_uuid_by_devname(const char *devname) { -+ return blkid_get_tag_value(blkid, "UUID", devname); - } - - const char * --mount_get_devname(const char *spec) { -+fsprobe_get_devname(const char *spec) { - return blkid_get_devname(blkid, spec, 0); - } - - const char * --mount_get_devname_by_uuid(const char *uuid) { -+fsprobe_get_devname_by_uuid(const char *uuid) { - return blkid_get_devname(blkid, "UUID", uuid); - } - - const char * --mount_get_devname_by_label(const char *label) { -+fsprobe_get_devname_by_label(const char *label) { - return blkid_get_devname(blkid, "LABEL", label); - } - - /* Also when no UUID= or LABEL= occur? No verbose? No warnings? */ - const char * --mount_get_devname_for_mounting(const char *spec) { -+fsprobe_get_devname_for_mounting(const char *spec) { - return blkid_get_devname(blkid, spec, 0); - } - -@@ -52,4 +56,3 @@ fsprobe_get_fstype_by_devname(const char *devname) { - return blkid_get_tag_value(blkid, "TYPE", devname); - } - --#endif -diff --git a/mount/fstab.c b/mount/fstab.c -index 5267f62..c47f20d 100644 ---- a/mount/fstab.c -+++ b/mount/fstab.c -@@ -292,7 +292,7 @@ has_label(const char *device, const char *label) { - const char *devlabel; - int ret; - -- devlabel = mount_get_volume_label_by_spec(device); -+ devlabel = fsprobe_get_label_by_devname(device); - ret = !strcmp(label, devlabel); - /* free(devlabel); */ - return ret; -@@ -303,7 +303,7 @@ has_uuid(const char *device, const char *uuid){ - const char *devuuid; - int ret; - -- devuuid = mount_get_devname_by_uuid(device); -+ devuuid = fsprobe_get_uuid_by_devname(device); - ret = !strcmp(uuid, devuuid); - /* free(devuuid); */ - return ret; -@@ -745,8 +745,8 @@ int verbose; - int mount_quiet; - char *progname; - --const char *mount_get_volume_label_by_spec(const char *spec) { return NULL; } --const char *mount_get_devname_by_uuid(const char *uuid) { return NULL; } -+const char *fsprobe_get_label_by_devname(const char *spec) { return NULL; } -+const char *fsprobe_get_uuid_by_devname(const char *spec) { return NULL; } - struct my_mntent *my_getmntent (mntFILE *mfp) { return NULL; } - mntFILE *my_setmntent (const char *file, char *mode) { return NULL; } - void my_endmntent (mntFILE *mfp) { } -diff --git a/mount/mount.c b/mount/mount.c -index be9e409..12964ca 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -233,6 +233,11 @@ parse_string_opt(char *s) { - return 0; - } - -+static void -+my_free(const void *s) { -+ if (s) -+ free((void *) s); -+} - - /* Report on a single mount. */ - static void -@@ -245,11 +250,18 @@ print_one (const struct my_mntent *me) { - if (me->mnt_opts != NULL) - printf (" (%s)", me->mnt_opts); - if (list_with_volumelabel) { -- const char *label; -- label = mount_get_volume_label_by_spec(me->mnt_fsname); -- if (label) { -- printf (" [%s]", label); -- /* free(label); */ -+ const char *devname = fsprobe_get_devname(me->mnt_fsname); -+ -+ if (devname) { -+ const char *label; -+ -+ label = fsprobe_get_label_by_devname(devname); -+ my_free(devname); -+ -+ if (label) { -+ printf (" [%s]", label); -+ my_free(label); -+ } - } - } - printf ("\n"); -@@ -268,12 +280,6 @@ print_all (char *types) { - exit (0); - } - --static void --my_free(const void *s) { -- if (s) -- free((void *) s); --} -- - /* reallocates its first arg */ - static char * - append_opt(char *s, const char *opt, const char *val) -@@ -1330,7 +1336,7 @@ mount_one (const char *spec, const char *node, const char *types, - opts = append_opt(opts, cmdlineopts, NULL); - - /* Handle possible LABEL= and UUID= forms of spec */ -- nspec = mount_get_devname_for_mounting(spec); -+ nspec = fsprobe_get_devname_for_mounting(spec); - if (nspec) - spec = nspec; - -@@ -1387,7 +1393,7 @@ mounted (const char *spec0, const char *node0) { - int ret = 0; - - /* Handle possible UUID= and LABEL= in spec */ -- spec0 = mount_get_devname(spec0); -+ spec0 = fsprobe_get_devname(spec0); - if (!spec0) - return ret; - -@@ -1669,7 +1675,7 @@ main(int argc, char *argv[]) { - if (fd > 2) - close(fd); - -- mount_blkid_get_cache(); -+ fsprobe_init(); - - #ifdef DO_PS_FIDDLING - initproctitle(argc, argv); -@@ -1842,9 +1848,9 @@ main(int argc, char *argv[]) { - - if (specseen) { - if (uuid) -- spec = mount_get_devname_by_uuid(uuid); -+ spec = fsprobe_get_devname_by_uuid(uuid); - else -- spec = mount_get_devname_by_label(volumelabel); -+ spec = fsprobe_get_devname_by_label(volumelabel); - - if (!spec) - die (EX_USAGE, _("mount: no such partition found")); -@@ -1922,7 +1928,7 @@ main(int argc, char *argv[]) { - if (result == EX_SOMEOK) - result = 0; - -- mount_blkid_put_cache(); -+ fsprobe_exit(); - - exit (result); - } -diff --git a/mount/swapon.c b/mount/swapon.c -index cb055b3..025a6b5 100644 ---- a/mount/swapon.c -+++ b/mount/swapon.c -@@ -180,7 +180,7 @@ do_swapon(const char *orig_special, int prio) { - if (verbose) - printf(_("%s on %s\n"), progname, orig_special); - -- special = mount_get_devname(orig_special); -+ special = fsprobe_get_devname(orig_special); - if (!special) { - fprintf(stderr, _("%s: cannot find the device for %s\n"), - progname, orig_special); -@@ -255,13 +255,13 @@ cannot_find(const char *special) { - - static int - swapon_by_label(const char *label, int prio) { -- const char *special = mount_get_devname_by_label(label); -+ const char *special = fsprobe_get_devname_by_label(label); - return special ? do_swapon(special, prio) : cannot_find(label); - } - - static int - swapon_by_uuid(const char *uuid, int prio) { -- const char *special = mount_get_devname_by_uuid(uuid); -+ const char *special = fsprobe_get_devname_by_uuid(uuid); - return special ? do_swapon(special, prio) : cannot_find(uuid); - } - -@@ -272,7 +272,7 @@ do_swapoff(const char *orig_special, int quiet) { - if (verbose) - printf(_("%s on %s\n"), progname, orig_special); - -- special = mount_get_devname(orig_special); -+ special = fsprobe_get_devname(orig_special); - if (!special) - return cannot_find(orig_special); - -@@ -293,13 +293,13 @@ do_swapoff(const char *orig_special, int quiet) { - - static int - swapoff_by_label(const char *label, int quiet) { -- const char *special = mount_get_devname_by_label(label); -+ const char *special = fsprobe_get_devname_by_label(label); - return special ? do_swapoff(special, quiet) : cannot_find(label); - } - - static int - swapoff_by_uuid(const char *uuid, int quiet) { -- const char *special = mount_get_devname_by_uuid(uuid); -+ const char *special = fsprobe_get_devname_by_uuid(uuid); - return special ? do_swapoff(special, quiet) : cannot_find(uuid); - } - -@@ -328,7 +328,7 @@ swapon_all(void) { - if (!streq(fstab->mnt_type, MNTTYPE_SWAP)) - continue; - -- special = mount_get_devname(orig_special); -+ special = fsprobe_get_devname(orig_special); - if (!special) - continue; - --- -1.5.0.6 - -- -To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html - -The blkid supports NAME=value parsing, but use the library for -this simple task is overkill. (The libblkid requires initialized -blkid cache all time, for all calls.) - -This patch makes the fsprobe_get_devname_for_mounting() and -fsprobe_get_devname() generic for all fsprobe implementations. - -Signed-off-by: Karel Zak ---- - mount/Makefile.am | 2 +- - mount/fsprobe.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ - mount/fsprobe_blkid.c | 11 --------- - mount/sundries.c | 38 ++++++++++++++++++++++++++++++ - mount/sundries.h | 2 + - mount/swapon.c | 1 + - 6 files changed, 103 insertions(+), 12 deletions(-) - -diff --git a/mount/Makefile.am b/mount/Makefile.am -index b5b21b5..e61261f 100644 ---- a/mount/Makefile.am -+++ b/mount/Makefile.am -@@ -23,7 +23,7 @@ umount_LDADD = $(top_srcdir)/lib/libenv.a - umount_CFLAGS = $(SUID_CFLAGS) - - swapon_SOURCES = swapon.c xmalloc.c \ -- swap_constants.h realpath.c -+ swap_constants.h realpath.c fsprobe.c sundries.c - - losetup_SOURCES = lomount.c loop.h lomount.h - losetup_CFLAGS = -DMAIN -diff --git a/mount/fsprobe.c b/mount/fsprobe.c -index 4b57802..2629d0d 100644 ---- a/mount/fsprobe.c -+++ b/mount/fsprobe.c -@@ -162,3 +162,64 @@ fsprobe_procfsloop_mount( int (*mount_fn)(struct mountargs *), - } - return 1; - } -+ -+const char * -+fsprobe_get_devname_for_mounting(const char *spec) -+{ -+ char *name, *value; -+ -+ if (!spec) -+ return NULL; -+ -+ if (parse_spec(spec, &name, &value) != 0) -+ return NULL; /* parse error */ -+ -+ if (name) { -+ const char *nspec = NULL; -+ -+ if (!strcmp(name,"LABEL")) -+ nspec = fsprobe_get_devname_by_label(value); -+ else if (!strcmp(name,"UUID")) -+ nspec = fsprobe_get_devname_by_uuid(value); -+ -+ if (nspec && verbose > 1) -+ printf(_("mount: going to mount %s by %s\n"), spec, name); -+ -+ free((void *) name); -+ return nspec; -+ } -+ -+ /* no LABEL, no UUID, .. probably a path */ -+ if (verbose > 1) -+ printf(_("mount: no LABEL=, no UUID=, going to mount %s by path\n"), spec); -+ -+ return canonicalize(spec); -+} -+ -+/* like fsprobe_get_devname_for_mounting(), but without verbose messages */ -+const char * -+fsprobe_get_devname(const char *spec) -+{ -+ char *name, *value; -+ -+ if (!spec) -+ return NULL; -+ -+ if (parse_spec(spec, &name, &value) != 0) -+ return NULL; /* parse error */ -+ -+ if (name) { -+ const char *nspec = NULL; -+ -+ if (!strcmp(name,"LABEL")) -+ nspec = fsprobe_get_devname_by_label(value); -+ else if (!strcmp(name,"UUID")) -+ nspec = fsprobe_get_devname_by_uuid(value); -+ -+ free((void *) name); -+ return nspec; -+ } -+ -+ return canonicalize(spec); -+} -+ -diff --git a/mount/fsprobe_blkid.c b/mount/fsprobe_blkid.c -index d25b973..2dc734e 100644 ---- a/mount/fsprobe_blkid.c -+++ b/mount/fsprobe_blkid.c -@@ -25,11 +25,6 @@ fsprobe_get_uuid_by_devname(const char *devname) { - } - - const char * --fsprobe_get_devname(const char *spec) { -- return blkid_get_devname(blkid, spec, 0); --} -- --const char * - fsprobe_get_devname_by_uuid(const char *uuid) { - return blkid_get_devname(blkid, "UUID", uuid); - } -@@ -39,12 +34,6 @@ fsprobe_get_devname_by_label(const char *label) { - return blkid_get_devname(blkid, "LABEL", label); - } - --/* Also when no UUID= or LABEL= occur? No verbose? No warnings? */ --const char * --fsprobe_get_devname_for_mounting(const char *spec) { -- return blkid_get_devname(blkid, spec, 0); --} -- - int - fsprobe_known_fstype(const char *fstype) - { -diff --git a/mount/sundries.c b/mount/sundries.c -index cdfbb42..45404c5 100644 ---- a/mount/sundries.c -+++ b/mount/sundries.c -@@ -247,3 +247,41 @@ canonicalize (const char *path) { - - return xstrdup(path); - } -+ -+ -+/* -+ * Parses NAME=value, returns -1 on parse error, 0 success. The success is also -+ * when the 'spec' doesn't contain name=value pair (because the spec could be -+ * a devname too). In particular case the pointer 'name' is set to NULL. -+ -+ * The result is a new allocated string (the 'name' pointer). -+ */ -+int -+parse_spec(const char *spec, char **name, char **value) -+{ -+ char *vl, *tk, *cp; -+ -+ *name = NULL; -+ *value = NULL; -+ -+ if (!(cp = strchr(spec, '='))) -+ return 0; /* no name= */ -+ -+ tk = xstrdup(spec); -+ vl = tk + (cp - spec); -+ *vl++ = '\0'; -+ -+ if (*vl == '"' || *vl == '\'') { -+ if (!(cp = strrchr(vl+1, *vl))) { -+ free(tk); -+ return -1; /* parse error */ -+ } -+ vl++; -+ *cp = '\0'; -+ } -+ -+ *name = tk; -+ *value = vl; -+ return 0; -+} -+ -diff --git a/mount/sundries.h b/mount/sundries.h -index 0851145..85ccd85 100644 ---- a/mount/sundries.h -+++ b/mount/sundries.h -@@ -35,6 +35,8 @@ char *xstrndup (const char *s, int n); - char *xstrconcat3 (char *, const char *, const char *); - char *xstrconcat4 (char *, const char *, const char *, const char *); - -+int parse_spec(const char *spec, char **name, char **value); -+ - void die (int errcode, const char *fmt, ...); - - /* exit status - bits below are ORed */ -diff --git a/mount/swapon.c b/mount/swapon.c -index 025a6b5..3936790 100644 ---- a/mount/swapon.c -+++ b/mount/swapon.c -@@ -30,6 +30,7 @@ - int all = 0; - int verbose = 0; - int priority = -1; /* non-prioritized swap by default */ -+int mount_quiet = 0; - - /* If true, don't complain if the device/file doesn't exist */ - int ifexists = 0; --- -1.5.0.6 - -- -To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html - -The blkid_get_cache() parses /etc/blkid.tab, it's better do it only -when we really need to resolve a spec (label or uuid). - -Signed-off-by: Karel Zak ---- - mount/fsprobe_blkid.c | 38 ++++++++++++++++++++++++++++++-------- - 1 files changed, 30 insertions(+), 8 deletions(-) - -diff --git a/mount/fsprobe_blkid.c b/mount/fsprobe_blkid.c -index 2dc734e..16a093a 100644 ---- a/mount/fsprobe_blkid.c -+++ b/mount/fsprobe_blkid.c -@@ -5,32 +5,50 @@ - static blkid_cache blkid; - - void --fsprobe_init(void) { -- blkid_get_cache(&blkid, NULL); -+fsprobe_init(void) -+{ -+ blkid = NULL; - } - - void --fsprobe_exit(void) { -+fsprobe_exit(void) -+{ - blkid_put_cache(blkid); - } - - const char * --fsprobe_get_label_by_devname(const char *devname) { -+fsprobe_get_label_by_devname(const char *devname) -+{ -+ if (!blkid) -+ blkid_get_cache(&blkid, NULL); -+ - return blkid_get_tag_value(blkid, "LABEL", devname); - } - - const char * --fsprobe_get_uuid_by_devname(const char *devname) { -+fsprobe_get_uuid_by_devname(const char *devname) -+{ -+ if (!blkid) -+ blkid_get_cache(&blkid, NULL); -+ - return blkid_get_tag_value(blkid, "UUID", devname); - } - - const char * --fsprobe_get_devname_by_uuid(const char *uuid) { -+fsprobe_get_devname_by_uuid(const char *uuid) -+{ -+ if (!blkid) -+ blkid_get_cache(&blkid, NULL); -+ - return blkid_get_devname(blkid, "UUID", uuid); - } - - const char * --fsprobe_get_devname_by_label(const char *label) { -+fsprobe_get_devname_by_label(const char *label) -+{ -+ if (!blkid) -+ blkid_get_cache(&blkid, NULL); -+ - return blkid_get_devname(blkid, "LABEL", label); - } - -@@ -41,7 +59,11 @@ fsprobe_known_fstype(const char *fstype) - } - - const char * --fsprobe_get_fstype_by_devname(const char *devname) { -+fsprobe_get_fstype_by_devname(const char *devname) -+{ -+ if (!blkid) -+ blkid_get_cache(&blkid, NULL); -+ - return blkid_get_tag_value(blkid, "TYPE", devname); - } - --- -1.5.0.6 - -- -To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html - -The functions have to check for NULL pointer. - -Signed-off-by: Karel Zak ---- - mount/fstab.c | 10 ++++++++-- - 1 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/mount/fstab.c b/mount/fstab.c -index c47f20d..eee126e 100644 ---- a/mount/fstab.c -+++ b/mount/fstab.c -@@ -293,8 +293,11 @@ has_label(const char *device, const char *label) { - int ret; - - devlabel = fsprobe_get_label_by_devname(device); -+ if (!devlabel) -+ return 0; -+ - ret = !strcmp(label, devlabel); -- /* free(devlabel); */ -+ my_free(devlabel); - return ret; - } - -@@ -304,8 +307,11 @@ has_uuid(const char *device, const char *uuid){ - int ret; - - devuuid = fsprobe_get_uuid_by_devname(device); -+ if (!devuuid) -+ return 0; -+ - ret = !strcmp(uuid, devuuid); -- /* free(devuuid); */ -+ my_free(devuuid); - return ret; - } - --- -1.5.0.6 - -- -To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html - -The patch add new option --with-fsprobe= (where the is -blkid or volume_id). The blkid is default. The mount cannot be -compiled without a filesystem detection library. - -Signed-off-by: Kay Sievers -Signed-off-by: Karel Zak ---- - configure.ac | 26 ++++++++++++++++++++++++-- - 1 files changed, 24 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index d24ce09..e3ae318 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -56,8 +56,30 @@ AM_CONDITIONAL(HAVE_LIBUTIL, test x$ac_cv_lib_util_openpty = xyes) - AC_CHECK_LIB(termcap, tgetnum) - AM_CONDITIONAL(HAVE_TERMCAP, test x$ac_cv_lib_termcap_tgetnum = xyes) - --AC_CHECK_LIB(blkid, blkid_known_fstype) --AM_CONDITIONAL(HAVE_BLKID, test x$ac_cv_lib_blkid_blkid_known_fstype = xyes) -+ -+AC_ARG_WITH([fsprobe], -+ AC_HELP_STRING([--with-fsprobe], [library to guess filesystems (blkid|volume_id), default is blkid]), -+ with_fsprobe=$withval, with_fsprobe=blkid -+) -+ -+if test x$with_fsprobe = xblkid; then -+ AC_CHECK_LIB(blkid, blkid_known_fstype) -+ if test x$ac_cv_lib_blkid_blkid_known_fstype = xyes; then -+ fsprobe=blkid -+ fi -+elif test x$with_fsprobe = xvolume_id; then -+ AC_CHECK_LIB(volume_id, volume_id_open_fd) -+ if test x$ac_cv_lib_volume_id_volume_id_open_fd = xyes; then -+ fsprobe=volume_id -+ fi -+fi -+ -+if test -z "$fsprobe"; then -+ AC_MSG_ERROR([Without blkid or volume_id you will not be able to build util-linux-ng.]) -+fi -+ -+AM_CONDITIONAL(HAVE_BLKID, test x"$fsprobe" = xblkid) -+AM_CONDITIONAL(HAVE_VOLUME_ID, test x"$fsprobe" = xvolume_id) - - - AM_GNU_GETTEXT_VERSION([0.14.1]) --- -1.5.0.6 - -- -To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html - -Signed-off-by: Matthias Koenig -Signed-off-by: Kay Sievers -Signed-off-by: Karel Zak ---- - mount/Makefile.am | 9 +++ - mount/fsprobe_volumeid.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++ - mount/mount.8 | 5 +- - mount/mount_paths.h | 4 ++ - 4 files changed, 138 insertions(+), 3 deletions(-) - -diff --git a/mount/Makefile.am b/mount/Makefile.am -index e61261f..4562b2d 100644 ---- a/mount/Makefile.am -+++ b/mount/Makefile.am -@@ -37,6 +37,15 @@ umount_LDADD += -lblkid -luuid - swapon_LDADD = -lblkid -luuid - endif - -+if HAVE_VOLUME_ID -+mount_SOURCES += fsprobe_volumeid.c -+umount_SOURCES += fsprobe_volumeid.c -+swapon_SOURCES += fsprobe_volumeid.c -+mount_LDADD += -lvolume_id -+umount_LDADD += -lvolume_id -+swapon_LDADD = -lvolume_id -+endif -+ - if HAVE_PIVOT_ROOT - sbin_PROGRAMS += pivot_root - man_MANS += pivot_root.8 -diff --git a/mount/fsprobe_volumeid.c b/mount/fsprobe_volumeid.c -new file mode 100644 -index 0000000..8c13987 ---- /dev/null -+++ b/mount/fsprobe_volumeid.c -@@ -0,0 +1,123 @@ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "fsprobe.h" -+#include "realpath.h" -+#include "mount_paths.h" -+#include "sundries.h" -+ -+enum probe_type { -+ VOLUME_ID_NONE, -+ VOLUME_ID_LABEL, -+ VOLUME_ID_UUID, -+ VOLUME_ID_TYPE, -+}; -+ -+static char *probe(const char *device, enum probe_type type) -+{ -+ int fd; -+ uint64_t size; -+ struct volume_id *id; -+ char *value = NULL; -+ -+ fd = open(device, O_RDONLY); -+ if (fd < 0) -+ return NULL; -+ -+ id = volume_id_open_fd(fd); -+ if (!id) -+ return NULL; -+ -+ /* TODO: use blkdev_get_size() */ -+ if (ioctl(fd, BLKGETSIZE64, &size) != 0) -+ size = 0; -+ -+ if (volume_id_probe_all(id, 0, size) == 0) { -+ switch(type) { -+ case VOLUME_ID_LABEL: -+ value = xstrdup(id->label); -+ break; -+ case VOLUME_ID_UUID: -+ value = xstrdup(id->uuid); -+ break; -+ case VOLUME_ID_TYPE: -+ value = xstrdup(id->type); -+ break; -+ default: -+ break; -+ } -+ } -+ -+ volume_id_close(id); -+ return value; -+} -+ -+void -+fsprobe_init(void) -+{ -+} -+ -+void -+fsprobe_exit(void) -+{ -+} -+ -+int -+fsprobe_known_fstype(const char *fstype) -+{ -+ /* TODO -+ if (volume_id_get_prober_by_type(fstype) != NULL) -+ return 1; -+ */ -+ return 0; -+} -+ -+const char * -+fsprobe_get_uuid_by_devname(const char *devname) -+{ -+ return probe(devname, VOLUME_ID_UUID); -+} -+ -+const char * -+fsprobe_get_label_by_devname(const char *devname) -+{ -+ return probe(devname, VOLUME_ID_LABEL); -+} -+ -+const char * -+fsprobe_get_fstype_by_devname(const char *devname) -+{ -+ return probe(devname, VOLUME_ID_TYPE); -+} -+ -+const char * -+fsprobe_get_devname_by_uuid(const char *uuid) -+{ -+ char dev[PATH_MAX]; -+ -+ if (!uuid) -+ return NULL; -+ -+ snprintf(dev, sizeof(dev), PATH_DEV_BYUUID "/%s", uuid); -+ return canonicalize(dev); -+} -+ -+const char * -+fsprobe_get_devname_by_label(const char *label) -+{ -+ char dev[PATH_MAX]; -+ -+ if (!label) -+ return NULL; -+ -+ snprintf(dev, sizeof(dev), PATH_DEV_BYLABEL "/%s", label); -+ return canonicalize(dev); -+} -+ -diff --git a/mount/mount.8 b/mount/mount.8 -index 8ed5a11..be6e537 100644 ---- a/mount/mount.8 -+++ b/mount/mount.8 -@@ -477,9 +477,8 @@ If no - option is given, or if the - .B auto - type is specified, mount will try to guess the desired type. --If mount was compiled with the blkid library, the guessing is done --by this library. Otherwise, mount guesses itself by probing the --superblock; if that does not turn up anything that looks familiar, -+Mount uses the blkid or volume_id library for guessing the filesystem -+type; if that does not turn up anything that looks familiar, - mount will try to read the file - .IR /etc/filesystems , - or, if that does not exist, -diff --git a/mount/mount_paths.h b/mount/mount_paths.h -index 9093b10..d726d06 100644 ---- a/mount/mount_paths.h -+++ b/mount/mount_paths.h -@@ -15,4 +15,8 @@ - #define ETC_FILESYSTEMS "/etc/filesystems" - #define PROC_FILESYSTEMS "/proc/filesystems" - -+/* udev paths */ -+#define PATH_DEV_BYLABEL "/dev/disk/by-label" -+#define PATH_DEV_BYUUID "/dev/disk/by-uuid" -+ - #endif /* MOUNT_PATHS_H */ --- -1.5.0.6 - -- -To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html - -The util-linux-ng tests have to be useful with blkid and also with -volume_id. - -Signed-off-by: Karel Zak ---- - tests/ts-cramfs-mkfs | 15 +++++++++++---- - tests/ts-mkswap-doit | 16 ++++++++++++---- - 2 files changed, 23 insertions(+), 8 deletions(-) - -diff --git a/tests/ts-cramfs-mkfs b/tests/ts-cramfs-mkfs -index 6a9e029..1f7156e 100755 ---- a/tests/ts-cramfs-mkfs -+++ b/tests/ts-cramfs-mkfs -@@ -40,6 +40,11 @@ IMAGE_RE=$( echo $IMAGE | sed 's:/:\\/:g' ) - LABEL="testCramfs" - MOUNTPOINT="$TS_OUTDIR/cramfs-mnt" - -+ldd $TS_CMD_MOUNT | grep -q 'libvolume_id' 2>&1 >> $TS_OUTPUT -+if [ "$?" == "0" ]; then -+ HAS_VOLUMEID="yes" -+fi -+ - echo "create mountpoint dir" >> $TS_OUTPUT - if [ ! -d "$MOUNTPOINT" ]; then - mkdir -p $MOUNTPOINT -@@ -78,15 +83,17 @@ echo "create loop device from image" >> $TS_OUTPUT - DEVICE=$( $TS_CMD_LOSETUP -f ) - $TS_CMD_LOSETUP $DEVICE $IMAGE 2>&1 >> $TS_OUTPUT - -- - echo "check the image" >> $TS_OUTPUT --blkid -c /dev/null -w /dev/null -s TYPE $DEVICE 2>&1 | grep -q 'TYPE="cramfs"' 2>&1 >> $TS_OUTPUT -- --if [ "$?" != "0" ]; then -+if [ "$($TS_CMD_MOUNT --guess-fstype $DEVICE)" != "cramfs" ]; then - echo "Cannot found cramfs on $DEVICE" >> $TS_OUTPUT - ts_finalize - fi - -+if [ -n "$HAS_VOLUMEID" ] && [ ! -L "/dev/disk/by-label/$LABEL" ]; then -+ $TS_CMD_LOSETUP -d $DEVICE 2>&1 >> $TS_OUTPUT -+ ts_skip "udev ignores /dev/loop*" -+fi -+ - echo "mount the image" >> $TS_OUTPUT - $TS_CMD_MOUNT -L $LABEL $MOUNTPOINT 2>&1 >> $TS_OUTPUT - -diff --git a/tests/ts-mkswap-doit b/tests/ts-mkswap-doit -index 6e19b46..e4b5b76 100755 ---- a/tests/ts-mkswap-doit -+++ b/tests/ts-mkswap-doit -@@ -38,6 +38,11 @@ IMAGE="$TS_OUTDIR/loop-swap.img" - IMAGE_RE=$( echo $IMAGE | sed 's:/:\\/:g' ) - LABEL="testSwap" - -+ldd $TS_CMD_SWAPON | grep -q 'libvolume_id' 2>&1 >> $TS_OUTPUT -+if [ "$?" == "0" ]; then -+ HAS_VOLUMEID="yes" -+fi -+ - dd if=/dev/zero of=$IMAGE bs=1M count=20 &> /dev/null - - DEVICE=$( $TS_CMD_LOSETUP -f ) -@@ -54,14 +59,17 @@ $TS_CMD_LOSETUP $DEVICE $IMAGE 2>&1 >> $TS_OUTPUT - $TS_CMD_MKSWAP -L $LABEL $DEVICE 2>&1 >> $TS_OUTPUT - - # check it --blkid -c /dev/null -w /dev/null -s TYPE $DEVICE 2>&1 | grep -q 'TYPE="swap"' 2>&1 >> $TS_OUTPUT -- --if [ "$?" != "0" ]; then -+if [ "$($TS_CMD_MOUNT --guess-fstype $DEVICE)" != "swap" ]; then - echo "Cannot found Linux swap on $DEVICE" >> $TS_OUTPUT -- #$TS_CMD_LOSETUP -d $DEVICE 2>&1 >> $TS_OUTPUT -+ $TS_CMD_LOSETUP -d $DEVICE 2>&1 >> $TS_OUTPUT - ts_finalize - fi - -+if [ -n "$HAS_VOLUMEID" ] && [ ! -L "/dev/disk/by-label/$LABEL" ]; then -+ $TS_CMD_LOSETUP -d $DEVICE 2>&1 >> $TS_OUTPUT -+ ts_skip "udev ignores /dev/loop*" -+fi -+ - # try connect it to system (and found the device by label) - $TS_CMD_SWAPON -L $LABEL 2>&1 >> $TS_OUTPUT - --- -1.5.0.6 - -- -To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html - diff --git a/util-linux-ng-2.12r+git20070509.tar.bz2 b/util-linux-ng-2.12r+git20070509.tar.bz2 deleted file mode 100644 index fa55b66..0000000 --- a/util-linux-ng-2.12r+git20070509.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:be7bac40f6c1ba44b66cd829241f8c6368ff56e823d1c7f673c0321b3d980f99 -size 1504607 diff --git a/util-linux-ng-2.12r+git20070530.tar.bz2 b/util-linux-ng-2.12r+git20070530.tar.bz2 new file mode 100644 index 0000000..1831cb4 --- /dev/null +++ b/util-linux-ng-2.12r+git20070530.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cead87afb0a8a4030b74d5875f0ccc91d6903094b1aad78ad7dccc97787e4f33 +size 1496916 diff --git a/util-linux.changes b/util-linux.changes index bab20b5..32338d0 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Jun 6 16:15:43 CEST 2007 - mkoenig@suse.de + +- update to git20070530 +- removed patches + util-linux-2.13-mount_volume_id.patch + util-linux-2.12r-mount_by_uuid.patch + util-linux-2.13-build_gnu_source.patch +- fix build with ncurses + ------------------------------------------------------------------- Tue Jun 5 17:01:48 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 7cdb5e1..1341c84 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.12r+git20070509) +# spec file for package util-linux (Version 2.12r+git20070530) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -20,7 +20,7 @@ PreReq: %install_info_prereq permissions License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on -Version: 2.12r+git20070509 +Version: 2.12r+git20070530 Release: 1 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -47,7 +47,6 @@ Source30: README.largedisk ## ## util-linux ## -Patch0: util-linux-2.13-mount_volume_id.patch # add hostid Patch1: util-linux-2.12-misc_utils_hostid.patch # 27181 (suse12181) - wall adds newlines @@ -67,7 +66,6 @@ Patch15: util-linux-2.11q-fdisk_fs_mac.patch Patch16: util-linux-mount_opt_hotplug.patch # 115129 - mount --move doesn't work as expected Patch18: util-linux-2.12q-mount_--move.patch -Patch20: util-linux-2.12r-mount_by_uuid.patch Patch21: util-linux-2.12q-mount_umount2_not_static.patch # 148409 - df, mount, /proc/mounts show root mounted twice # TODO: Needs fix, because of 231599 @@ -97,9 +95,8 @@ Patch36: util-linux-2.12r-mount_racy_loop.patch # TODO: Needs to be ported to new version Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch Patch40: util-linux-2.13-sys_utils_arch.patch -Patch41: util-linux-2.13-build_gnu_source.patch Patch42: util-linux-2.13-build_fix_intel_check.patch -Patch43: util-linux-2.13-build_no_perl_dependency.patch +Patch43: util-linux-2.13-misc_utils_cal_ncurses.patch ## ## adjtimex ## @@ -133,7 +130,6 @@ Authors: %prep %setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%version -%patch0 -p1 %patch1 -p1 %patch2 -p1 %patch5 -p0 @@ -144,7 +140,6 @@ Authors: %patch15 -p1 %patch16 -p1 %patch18 -#%patch20 -p1 %patch21 %patch22 %patch23 -p1 @@ -158,7 +153,6 @@ Authors: %patch36 -p1 #%patch38 -p1 %patch40 -p1 -%patch41 -p1 %patch42 -p1 %patch43 -p1 # @@ -233,7 +227,6 @@ CFLAGS=-DCONFIG_SMP --enable-partx \ --enable-raw \ --enable-rdev \ - --enable-perl-scripts=no \ --enable-write \ --disable-use-tty-group \ CFLAGS="$CFLAGS $RPM_OPT_FLAGS" @@ -302,6 +295,12 @@ ln -sf ../../etc/init.d/raw $RPM_BUILD_ROOT/usr/sbin/rcraw # Following files we don't want to package, so remove them rm -f $RPM_BUILD_ROOT/usr/bin/pg rm -f $RPM_BUILD_ROOT/usr/share/man/man1/pg.1* +# Do not package these files to get rid of the perl dependency +rm -f $RPM_BUILD_ROOT/usr/bin/chkdupexe +rm -f $RPM_BUILD_ROOT/usr/bin/scriptreplay +rm -f $RPM_BUILD_ROOT/usr/share/man/man1/chkdupexe.1 +rm -f $RPM_BUILD_ROOT/usr/share/man/man1/scriptreplay.1 +# arch dependent %ifarch s390 s390x rm -f $RPM_BUILD_ROOT/etc/fdprm rm -f $RPM_BUILD_ROOT/usr/bin/cytune @@ -554,6 +553,13 @@ fi %endif %changelog +* Wed Jun 06 2007 - mkoenig@suse.de +- update to git20070530 +- removed patches + util-linux-2.13-mount_volume_id.patch + util-linux-2.12r-mount_by_uuid.patch + util-linux-2.13-build_gnu_source.patch +- fix build with ncurses * Tue Jun 05 2007 - mkoenig@suse.de - update to git20070509 mount: NFS code removed (use mount.nfs{,4} from nfs-utils) From dc4cdf7b00148703182649160309bdbb11fa6b5fdde795791a55852067757ba8 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 14 Jun 2007 14:18:25 +0000 Subject: [PATCH 018/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=18 --- mkzimage_cmdline.c | 2 + util-linux-2.13-schedutils_chrt.patch | 67 +++++++++++++++++++++++++++ util-linux.changes | 12 +++++ util-linux.spec | 10 +++- 4 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.13-schedutils_chrt.patch diff --git a/mkzimage_cmdline.c b/mkzimage_cmdline.c index b341627..a60edbc 100644 --- a/mkzimage_cmdline.c +++ b/mkzimage_cmdline.c @@ -93,6 +93,8 @@ int main(int argc, char **argv) exit(1); } set = 1; + if (!activate) + activate = 1; break; case 'v': my_version(); diff --git a/util-linux-2.13-schedutils_chrt.patch b/util-linux-2.13-schedutils_chrt.patch new file mode 100644 index 0000000..b1a01b1 --- /dev/null +++ b/util-linux-2.13-schedutils_chrt.patch @@ -0,0 +1,67 @@ +Index: util-linux-ng-2.12r+git20070530/schedutils/chrt.1 +=================================================================== +--- util-linux-ng-2.12r+git20070530.orig/schedutils/chrt.1 ++++ util-linux-ng-2.12r+git20070530/schedutils/chrt.1 +@@ -79,13 +79,13 @@ output version information and exit + .SH USAGE + .TP + The default behavior is to run a new command:: +-chrt [prio] [command] [arguments] ++chrt prio command [arguments] + .TP + You can also retrieve the real-time attributes of an existing task: +-chrt -p [pid] ++chrt -p pid + .TP + Or set them: +-chrt -p [prio] [pid] ++chrt -p prio pid + .SH PERMISSIONS + A user must possess + .BR CAP_SYS_NICE +Index: util-linux-ng-2.12r+git20070530/schedutils/chrt.c +=================================================================== +--- util-linux-ng-2.12r+git20070530.orig/schedutils/chrt.c ++++ util-linux-ng-2.12r+git20070530/schedutils/chrt.c +@@ -46,7 +46,7 @@ static void show_usage(const char *cmd) + fprintf(stderr, " -b, --batch " + "set policy to SCHED_BATCH\n"); + fprintf(stderr, " -f, --fifo " +- "set policy to SCHED_FF\n"); ++ "set policy to SCHED_FIFO\n"); + fprintf(stderr, " -p, --pid " + "operate on existing given pid\n"); + fprintf(stderr, " -m, --max " +@@ -146,7 +146,7 @@ int main(int argc, char *argv[]) + { + int i, policy = SCHED_RR, priority = 0, verbose = 0; + struct sched_param sp; +- pid_t pid = 0; ++ pid_t pid = -1; + + struct option longopts[] = { + { "batch", 0, NULL, 'b' }, +@@ -205,12 +205,12 @@ int main(int argc, char *argv[]) + + } + +- if ((pid && argc - optind < 1) || (!pid && argc - optind < 2)) { ++ if (((pid > -1) && argc - optind < 1) || ((pid == -1) && argc - optind < 2)) { + show_usage(argv[0]); + return 1; + } + +- if (pid && (verbose || argc - optind == 1)) { ++ if ((pid > -1) && (verbose || argc - optind == 1)) { + show_rt_info("current", pid); + if (argc - optind == 1) + return 0; +@@ -224,6 +224,8 @@ int main(int argc, char *argv[]) + return 1; + } + ++ if (pid == -1) ++ pid = 0; + sp.sched_priority = priority; + if (sched_setscheduler(pid, policy, &sp) == -1) { + perror("sched_setscheduler"); diff --git a/util-linux.changes b/util-linux.changes index 32338d0..9eb8c12 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Thu Jun 14 10:52:25 CEST 2007 - mkoenig@suse.de + +- mkzimage_cmdline: activate commandline if used with -s [#279935] + +------------------------------------------------------------------- +Wed Jun 13 12:33:59 CEST 2007 - mkoenig@suse.de + +- schedutils: let chrt accept pid 0 for current process and + fix some documentation bugs [#266879] + util-linux-2.13-schedutils_chrt.patch + ------------------------------------------------------------------- Wed Jun 6 16:15:43 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 1341c84..c387442 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on Version: 2.12r+git20070530 -Release: 1 +Release: 5 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source2: nologin.c @@ -97,6 +97,7 @@ Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch Patch40: util-linux-2.13-sys_utils_arch.patch Patch42: util-linux-2.13-build_fix_intel_check.patch Patch43: util-linux-2.13-misc_utils_cal_ncurses.patch +Patch44: util-linux-2.13-schedutils_chrt.patch ## ## adjtimex ## @@ -155,6 +156,7 @@ Authors: %patch40 -p1 %patch42 -p1 %patch43 -p1 +%patch44 -p1 # cd adjtimex-* %patch50 -p1 @@ -553,6 +555,12 @@ fi %endif %changelog +* Thu Jun 14 2007 - mkoenig@suse.de +- mkzimage_cmdline: activate commandline if used with -s [#279935] +* Wed Jun 13 2007 - mkoenig@suse.de +- schedutils: let chrt accept pid 0 for current process and + fix some documentation bugs [#266879] + util-linux-2.13-schedutils_chrt.patch * Wed Jun 06 2007 - mkoenig@suse.de - update to git20070530 - removed patches From e81d31f47ca9a63d02415403caffd943388cc5c3035dcb8088aec2e1fae0224b Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 21 Jun 2007 22:16:25 +0000 Subject: [PATCH 019/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=19 --- util-linux-2.13-mount_volumeid_label.patch | 172 +++++++++++++++++++++ util-linux.changes | 6 + util-linux.spec | 7 +- 3 files changed, 184 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.13-mount_volumeid_label.patch diff --git a/util-linux-2.13-mount_volumeid_label.patch b/util-linux-2.13-mount_volumeid_label.patch new file mode 100644 index 0000000..5a69b24 --- /dev/null +++ b/util-linux-2.13-mount_volumeid_label.patch @@ -0,0 +1,172 @@ +X-From-Line: mkoenig Thu Jun 21 13:32:01 2007 +Return-Path: +Received: from imap.suse.de [195.135.221.23] + by sor.suse.de with IMAP (fetchmail-6.3.5) + for (single-drop); Thu, 21 Jun 2007 13:32:01 +0200 (CEST) +Received: from imap.suse.de ([unix socket]) + by imap (Cyrus v2.2.12) with LMTPA; + Thu, 21 Jun 2007 13:31:14 +0200 +X-Sieve: CMU Sieve 2.2 +Received: from Relay2.suse.de (relay2.suse.de [149.44.160.89]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (Client CN "relay.suse.de", Issuer "CAcert Class 3 Root" (not verified)) + by imap.suse.de (Postfix) with ESMTP id 5778914540D0 + for ; Thu, 21 Jun 2007 13:31:14 +0200 (CEST) +Received: by Relay2.suse.de (Postfix) + id 436A020E91; Thu, 21 Jun 2007 13:31:14 +0200 (CEST) +Received: from emea5-mh.id5.novell.com (emea5-mh.id5.novell.com [149.44.160.113]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by Relay2.suse.de (Postfix) with ESMTP id 415D620E1C + for ; Thu, 21 Jun 2007 13:31:14 +0200 (CEST) +Received: from [192.168.178.22] ([149.44.162.75]) + by emea5-mh.id5.novell.com with ESMTP (TLS encrypted); Thu, 21 Jun 2007 13:31:06 +0200 +Subject: Re: [PATCH] mount: use encoded labels for volume_id +From: Kay Sievers +To: Matthias Koenig +Cc: util-linux-ng@vger.kernel.org, Karel Zak +In-Reply-To: +References: +Content-Type: multipart/mixed; boundary="=-uhU5UxmJBOKYf2ti+EWn" +Date: Thu, 21 Jun 2007 13:31:52 +0200 +X-Gnus-Mail-Source: file:~/MAIL/inbox +Message-Id: <1182425512.3436.17.camel@lov.localdomain> +Mime-Version: 1.0 +X-Mailer: Evolution 2.10.1 +Lines: 132 +Xref: sor.suse.de inbox:3392 +X-Gnus-Article-Number: 3392 Thu, 21 Jun 2007 14:21:03 +0200 + + +--=-uhU5UxmJBOKYf2ti+EWn +Content-Type: text/plain +Content-Transfer-Encoding: 7bit + +On Thu, 2007-06-21 at 12:52 +0200, Matthias Koenig wrote: +> since udev-112 exports now the label encoding function, +> here is a proposed patch. +> This fixes the problem of user mounts when filsystems +> with unsafe characters are given via LABEL= in fstab. + +A patch to do this is already on the list: + http://www.mail-archive.com/util-linux-ng@vger.kernel.org/msg00196.html +I was waiting for Fedora rawhide to catch-up before resending is, so Karel +can at least compile-test it. :) + +Configure should check for the new function in the library. Also uuid's may +need escaping with free textual uuids like DDF-raid uses. The probing context +"struct volume_id" should not be accessed directly anymore, if we require a +recent libvolume_id anyway. It will switch to an opaque object some day. +The known_fstype() lookup is also available now, and the TODO can be removed. + +Patch attached again. + +Thanks, +Kay + +--=-uhU5UxmJBOKYf2ti+EWn +Content-Disposition: inline; filename=volume_id_encode.patch +Content-Type: text/x-patch; name=volume_id_encode.patch; charset=utf-8 +Content-Transfer-Encoding: 7bit + +diff --git a/configure.ac b/configure.ac +index e678773..38c4815 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -87,7 +87,7 @@ have_volume_id=no + if test x$with_fsprobe = xblkid; then + UTIL_CHECK_LIB(blkid, blkid_known_fstype) + elif test x$with_fsprobe = xvolume_id; then +- UTIL_CHECK_LIB(volume_id, volume_id_open_fd) ++ UTIL_CHECK_LIB(volume_id, volume_id_encode_string) + fi + + if test $have_blkid = no && test $have_volume_id = no; then +diff --git a/mount/fsprobe_volumeid.c b/mount/fsprobe_volumeid.c +index 8c13987..4b58e72 100644 +--- a/mount/fsprobe_volumeid.c ++++ b/mount/fsprobe_volumeid.c +@@ -20,11 +20,13 @@ enum probe_type { + VOLUME_ID_TYPE, + }; + +-static char *probe(const char *device, enum probe_type type) ++static char ++*probe(const char *device, enum probe_type type) + { + int fd; + uint64_t size; + struct volume_id *id; ++ const char *val; + char *value = NULL; + + fd = open(device, O_RDONLY); +@@ -42,13 +44,16 @@ static char *probe(const char *device, enum probe_type type) + if (volume_id_probe_all(id, 0, size) == 0) { + switch(type) { + case VOLUME_ID_LABEL: +- value = xstrdup(id->label); ++ if (volume_id_get_label(id, &val)) ++ value = xstrdup(val); + break; + case VOLUME_ID_UUID: +- value = xstrdup(id->uuid); ++ if (volume_id_get_uuid(id, &val)) ++ value = xstrdup(val); + break; + case VOLUME_ID_TYPE: +- value = xstrdup(id->type); ++ if (volume_id_get_type(id, &val)) ++ value = xstrdup(val); + break; + default: + break; +@@ -72,10 +77,8 @@ fsprobe_exit(void) + int + fsprobe_known_fstype(const char *fstype) + { +- /* TODO + if (volume_id_get_prober_by_type(fstype) != NULL) + return 1; +- */ + return 0; + } + +@@ -101,11 +104,15 @@ const char * + fsprobe_get_devname_by_uuid(const char *uuid) + { + char dev[PATH_MAX]; ++ size_t len; + + if (!uuid) + return NULL; + +- snprintf(dev, sizeof(dev), PATH_DEV_BYUUID "/%s", uuid); ++ strcpy(dev, PATH_DEV_BYUUID "/"); ++ len = strlen(PATH_DEV_BYUUID "/"); ++ if (!volume_id_encode_string(uuid, &dev[len], sizeof(dev) - len) != 0) ++ return NULL; + return canonicalize(dev); + } + +@@ -113,11 +120,13 @@ const char * + fsprobe_get_devname_by_label(const char *label) + { + char dev[PATH_MAX]; ++ size_t len; + + if (!label) + return NULL; +- +- snprintf(dev, sizeof(dev), PATH_DEV_BYLABEL "/%s", label); ++ strcpy(dev, PATH_DEV_BYLABEL "/"); ++ len = strlen(PATH_DEV_BYLABEL "/"); ++ if (!volume_id_encode_string(label, &dev[len], sizeof(dev) - len) != 0) ++ return NULL; + return canonicalize(dev); + } +- + +--=-uhU5UxmJBOKYf2ti+EWn-- + + diff --git a/util-linux.changes b/util-linux.changes index 9eb8c12..e7f5500 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 21 14:50:58 CEST 2007 - mkoenig@suse.de + +- use encoded label names with volume_id [#232929] + util-linux-2.13-mount_volumeid_label.patch + ------------------------------------------------------------------- Thu Jun 14 10:52:25 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index c387442..8e8bc71 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD License and BSD-like, GNU General Public License (GPL) Group: System/Base Autoreqprov: on Version: 2.12r+git20070530 -Release: 5 +Release: 6 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source2: nologin.c @@ -98,6 +98,7 @@ Patch40: util-linux-2.13-sys_utils_arch.patch Patch42: util-linux-2.13-build_fix_intel_check.patch Patch43: util-linux-2.13-misc_utils_cal_ncurses.patch Patch44: util-linux-2.13-schedutils_chrt.patch +Patch45: util-linux-2.13-mount_volumeid_label.patch ## ## adjtimex ## @@ -157,6 +158,7 @@ Authors: %patch42 -p1 %patch43 -p1 %patch44 -p1 +%patch45 -p1 # cd adjtimex-* %patch50 -p1 @@ -555,6 +557,9 @@ fi %endif %changelog +* Thu Jun 21 2007 - mkoenig@suse.de +- use encoded label names with volume_id [#232929] + util-linux-2.13-mount_volumeid_label.patch * Thu Jun 14 2007 - mkoenig@suse.de - mkzimage_cmdline: activate commandline if used with -s [#279935] * Wed Jun 13 2007 - mkoenig@suse.de From 1c76c52193b2a76b4bf4fb577854bac86accf717994135056f5736db9e465e78 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 5 Jul 2007 11:24:26 +0000 Subject: [PATCH 020/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=20 --- time-1.7.tar.bz2 | 3 + time-1.7.tar.gz | 3 - util-linux-2.11q-fdisk_fs_mac.patch | 235 ----------- util-linux-2.12q-sys_utils_ionice.patch | 20 +- util-linux-2.12r-fdisk_fdiskwrap.patch | 396 ------------------- util-linux-2.12r-mount_mtab_update.patch | 9 +- util-linux-2.12r-mount_racy_loop.patch | 73 ---- util-linux-2.13-build_fix_intel_check.patch | 13 - util-linux-2.13-misc_utils_cal_ncurses.patch | 16 - util-linux-2.13-mount_volumeid_label.patch | 172 -------- util-linux-2.13-sys_utils_arch.patch | 18 +- util-linux-ng-2.12r+git20070530.tar.bz2 | 3 - util-linux-ng-2.13-rc1.tar.bz2 | 3 + util-linux.changes | 17 + util-linux.spec | 96 +++-- which-2.16.tar.bz2 | 3 + which-2.16.tar.gz | 3 - 17 files changed, 115 insertions(+), 968 deletions(-) create mode 100644 time-1.7.tar.bz2 delete mode 100644 time-1.7.tar.gz delete mode 100644 util-linux-2.11q-fdisk_fs_mac.patch delete mode 100644 util-linux-2.12r-fdisk_fdiskwrap.patch delete mode 100644 util-linux-2.12r-mount_racy_loop.patch delete mode 100644 util-linux-2.13-build_fix_intel_check.patch delete mode 100644 util-linux-2.13-misc_utils_cal_ncurses.patch delete mode 100644 util-linux-2.13-mount_volumeid_label.patch delete mode 100644 util-linux-ng-2.12r+git20070530.tar.bz2 create mode 100644 util-linux-ng-2.13-rc1.tar.bz2 create mode 100644 which-2.16.tar.bz2 delete mode 100644 which-2.16.tar.gz diff --git a/time-1.7.tar.bz2 b/time-1.7.tar.bz2 new file mode 100644 index 0000000..b5ed718 --- /dev/null +++ b/time-1.7.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83eeec8df47e4c939a09b0147c34a36462bb2762f879596e9089b2817dcff7e2 +size 92620 diff --git a/time-1.7.tar.gz b/time-1.7.tar.gz deleted file mode 100644 index d9a5b53..0000000 --- a/time-1.7.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e37ea79a253bf85a85ada2f7c632c14e481a5fd262a362f6f4fd58e68601496d -size 103066 diff --git a/util-linux-2.11q-fdisk_fs_mac.patch b/util-linux-2.11q-fdisk_fs_mac.patch deleted file mode 100644 index c4a27c0..0000000 --- a/util-linux-2.11q-fdisk_fs_mac.patch +++ /dev/null @@ -1,235 +0,0 @@ -Index: util-linux-ng-2.12r+git20070330/fdisk/fdiskmaclabel.c -=================================================================== ---- /dev/null -+++ util-linux-ng-2.12r+git20070330/fdisk/fdiskmaclabel.c -@@ -0,0 +1,87 @@ -+/* -+ Changes: -+ Sat Mar 20 09:51:38 EST 1999 Arnaldo Carvalho de Melo -+ Internationalization -+*/ -+#include /* stderr */ -+#include /* strstr */ -+#include /* write */ -+ -+#include -+ -+#include "common.h" -+#include "fdisk.h" -+#include "fdiskmaclabel.h" -+#include "nls.h" -+ -+#define MAC_BITMASK 0xffff0000 -+ -+ -+static int other_endian = 0; -+static short volumes=1; -+ -+/* -+ * only dealing with free blocks here -+ */ -+ -+static void -+mac_info( void ) { -+ puts( -+ _("\n\tThere is a valid Mac label on this disk.\n" -+ "\tUnfortunately fdisk(1) cannot handle these disks.\n" -+ "\tUse either pdisk or parted to modify the partition table.\n" -+ "\tNevertheless some advice:\n" -+ "\t1. fdisk will destroy its contents on write.\n" -+ "\t2. Be sure that this disk is NOT a still vital\n" -+ "\t part of a volume group. (Otherwise you may\n" -+ "\t erase the other disks as well, if unmirrored.)\n") -+ -+ ); -+} -+ -+void -+mac_nolabel( void ) -+{ -+ maclabel->magic = 0; -+ mac_label = 0; -+ partitions = 4; -+ memset( MBRbuffer, 0, sizeof(MBRbuffer) ); /* avoid fdisk cores */ -+ return; -+} -+ -+int -+check_mac_label( void ) -+{ -+ /* -+ Conversion: only 16 bit should compared -+ e.g.: HFS Label is only 16bit long -+ */ -+ -+ int magic_masked = 0 ; -+ magic_masked = maclabel->magic & MAC_BITMASK ; -+ -+ switch (magic_masked) { -+ case MAC_LABEL_MAGIC : -+ case MAC_LABEL_MAGIC_2: -+ case MAC_LABEL_MAGIC_3: -+ goto IS_MAC; -+ break; -+ default: -+ mac_label = 0; -+ other_endian = 0; -+ return 0; -+ -+ -+ } -+ -+ IS_MAC: -+ other_endian = (maclabel->magic == MAC_LABEL_MAGIC_SWAPPED); // =? -+ update_units(); -+ mac_label = 1; -+ partitions= 1016; // =? -+ volumes = 15; // =? -+ mac_info(); -+ mac_nolabel(); /* %% */ -+ mac_label = 1; /* %% */ -+ return 1; -+} -Index: util-linux-ng-2.12r+git20070330/fdisk/fdiskmaclabel.h -=================================================================== ---- /dev/null -+++ util-linux-ng-2.12r+git20070330/fdisk/fdiskmaclabel.h -@@ -0,0 +1,40 @@ -+#include /* for __u32 etc */ -+/* -+ * Copyright (C) Andreas Neuper, Sep 1998. -+ * This file may be redistributed under -+ * the terms of the GNU Public License. -+ */ -+ -+typedef struct { -+ unsigned int magic; /* expect MAC_LABEL_MAGIC */ -+ unsigned int fillbytes1[124]; -+ unsigned int physical_volume_id; -+ unsigned int fillbytes2[124]; -+} mac_partition; -+ -+#define MAC_LABEL_MAGIC 0x45520000 // MAC magic number only 16bits, do i always know that there are 0200 following ? Problem, after magic the uint16_t res1; follows, i donnno know about the 200k -+#define MAC_LABEL_MAGIC_2 0x50530000 -+#define MAC_LABEL_MAGIC_3 0x504d0000 -+ -+ -+#define MAC_LABEL_MAGIC_SWAPPED 0x00002554 -+ -+#define MAC_LABEL_MAGIC_2_SWAPPED 0x00003505 -+#define MAC_LABEL_MAGIC_3_SWAPPED 0x0000d405 -+ -+ -+/* fdisk.c */ -+#define maclabel ((mac_partition *)MBRbuffer) -+extern char MBRbuffer[MAX_SECTOR_SIZE]; -+extern char changed[MAXIMUM_PARTS]; -+extern unsigned int heads, sectors, cylinders; -+extern int show_begin; -+extern int mac_label; -+extern char *partition_type(unsigned char type); -+extern void update_units(void); -+extern char read_chars(char *mesg); -+ -+/* fdiskmaclabel.c */ -+extern struct systypes mac_sys_types[]; -+extern void mac_nolabel( void ); -+extern int check_mac_label( void ); -Index: util-linux-ng-2.12r+git20070330/fdisk/fdisk.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/fdisk/fdisk.c -+++ util-linux-ng-2.12r+git20070330/fdisk/fdisk.c -@@ -26,6 +26,7 @@ - #include "fdisksunlabel.h" - #include "fdisksgilabel.h" - #include "fdiskaixlabel.h" -+#include "fdiskmaclabel.h" - - #ifdef HAVE_LINUX_COMPILER_H - #include -@@ -167,11 +168,12 @@ unsigned int heads, - - unsigned long long total_number_of_sectors; - --#define dos_label (!sun_label && !sgi_label && !aix_label && !osf_label) -+#define dos_label (!sun_label && !sgi_label && !aix_label && !mac_label && !osf_label) - int sun_label = 0; /* looking at sun disklabel */ - int sgi_label = 0; /* looking at sgi disklabel */ - int aix_label = 0; /* looking at aix disklabel */ - int osf_label = 0; /* looking at OSF/1 disklabel */ -+int mac_label = 0; /* looking at mac disklabel */ - int possibly_osf_label = 0; - - jmp_buf listingbuf; -@@ -365,6 +367,10 @@ menu(void) { - puts(_(" v verify the partition table")); - puts(_(" w write table to disk and exit")); - } -+ else if (mac_label) { -+ puts(_("no Commands available")); -+ -+ } - else if (aix_label) { - puts(_("Command action")); - puts(_(" m print this menu")); -@@ -445,6 +451,9 @@ xmenu(void) { - puts(_(" v verify the partition table")); - puts(_(" w write table to disk and exit")); - } -+ else if (mac_label) { -+ puts(_("no Commands available")); -+ } - else { - puts(_("Command action")); - puts(_(" b move beginning of data in a partition")); /* !sun */ -@@ -945,6 +954,9 @@ get_boot(enum action what) { - if (check_aix_label()) - return 0; - -+ if (check_mac_label()) -+ return 0; -+ - if (check_osf_label()) { - possibly_osf_label = 1; - if (!valid_part_table_flag(MBRbuffer)) { -@@ -2077,6 +2089,15 @@ new_partition(void) { - return; - } - -+ if (mac_label) { -+ printf(_("\tSorry - this fdisk cannot handle Mac disk labels." -+ "\n\tIf you want to add DOS-type partitions, create" -+ "\n\ta new empty DOS partition table first. (Use o.)" -+ "\n\tWARNING: " -+ "This will destroy the present disk contents.\n")); -+ return; -+ } -+ - for (i = 0; i < 4; i++) - free_primary += !ptes[i].part_table->sys_ind; - -@@ -2406,7 +2427,11 @@ try(char *device, int user_specified) { - if (gb > 0) { /* I/O error */ - } else if (gb < 0) { /* no DOS signature */ - list_disk_geometry(); -- if (!aix_label && btrydev(device) < 0) -+ if (aix_label) -+ return; -+ if (mac_label) -+ return; -+ if (btrydev(device) < 0) - fprintf(stderr, - _("Disk %s doesn't contain a valid " - "partition table\n"), device); -Index: util-linux-ng-2.12r+git20070330/fdisk/Makefile.am -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/fdisk/Makefile.am -+++ util-linux-ng-2.12r+git20070330/fdisk/Makefile.am -@@ -8,6 +8,7 @@ sbin_PROGRAMS = fdisk - man_MANS = fdisk.8 - fdisk_SOURCES = fdisk.c disksize.c fdiskbsdlabel.c fdisksgilabel.c \ - fdisksunlabel.c fdiskaixlabel.c i386_sys_types.c partname.c \ -+ fdiskmaclabel.c \ - common.h fdisk.h fdisksunlabel.h fdisksgilabel.h fdiskaixlabel.h \ - fdiskbsdlabel.h - diff --git a/util-linux-2.12q-sys_utils_ionice.patch b/util-linux-2.12q-sys_utils_ionice.patch index 56ecf84..9af3243 100644 --- a/util-linux-2.12q-sys_utils_ionice.patch +++ b/util-linux-2.12q-sys_utils_ionice.patch @@ -1,7 +1,7 @@ -Index: util-linux-ng-2.12r+git20070509/sys-utils/ionice.1 +Index: util-linux-ng-2.12r+git20070703/sys-utils/ionice.1 =================================================================== --- /dev/null -+++ util-linux-ng-2.12r+git20070509/sys-utils/ionice.1 ++++ util-linux-ng-2.12r+git20070703/sys-utils/ionice.1 @@ -0,0 +1,71 @@ +.TH ionice "1" "August 2005" ionice +.SH NAME @@ -74,10 +74,10 @@ Index: util-linux-ng-2.12r+git20070509/sys-utils/ionice.1 + +.SH AUTHORS +Jens Axboe -Index: util-linux-ng-2.12r+git20070509/sys-utils/ionice.c +Index: util-linux-ng-2.12r+git20070703/sys-utils/ionice.c =================================================================== --- /dev/null -+++ util-linux-ng-2.12r+git20070509/sys-utils/ionice.c ++++ util-linux-ng-2.12r+git20070703/sys-utils/ionice.c @@ -0,0 +1,144 @@ +/* + * ionice: set or get process io scheduling class and priority @@ -223,16 +223,16 @@ Index: util-linux-ng-2.12r+git20070509/sys-utils/ionice.c + + return 0; +} -Index: util-linux-ng-2.12r+git20070509/sys-utils/Makefile.am +Index: util-linux-ng-2.12r+git20070703/sys-utils/Makefile.am =================================================================== ---- util-linux-ng-2.12r+git20070509.orig/sys-utils/Makefile.am -+++ util-linux-ng-2.12r+git20070509/sys-utils/Makefile.am +--- util-linux-ng-2.12r+git20070703.orig/sys-utils/Makefile.am ++++ util-linux-ng-2.12r+git20070703/sys-utils/Makefile.am @@ -2,7 +2,7 @@ include $(top_srcdir)/config/include-Mak bin_PROGRAMS = dmesg --usrbinexec_PROGRAMS = cytune flock ipcrm ipcs renice setsid -+usrbinexec_PROGRAMS = cytune flock ionice ipcrm ipcs renice setsid +-usrbinexec_PROGRAMS = cytune flock ipcrm ipcs renice setsid setarch ++usrbinexec_PROGRAMS = cytune flock ionice ipcrm ipcs renice setsid setarch cytune_SOURCES = cytune.c cyclades.h @@ -243,5 +243,5 @@ Index: util-linux-ng-2.12r+git20070509/sys-utils/Makefile.am -man_MANS = flock.1 readprofile.1 \ +man_MANS = flock.1 ionice.1 readprofile.1 \ ctrlaltdel.8 cytune.8 dmesg.1 ipcrm.1 ipcs.1 renice.1 \ - setsid.1 tunelp.8 + setsid.1 tunelp.8 setarch.8 diff --git a/util-linux-2.12r-fdisk_fdiskwrap.patch b/util-linux-2.12r-fdisk_fdiskwrap.patch deleted file mode 100644 index 5a1400a..0000000 --- a/util-linux-2.12r-fdisk_fdiskwrap.patch +++ /dev/null @@ -1,396 +0,0 @@ -Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.c -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisk.c -+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.c -@@ -63,7 +63,7 @@ static void delete_partition(int i); - - /* A valid partition table sector ends in 0x55 0xaa */ - static unsigned int --part_table_flag(char *b) { -+part_table_flag(unsigned char *b) { - return ((unsigned int) b[510]) + (((unsigned int) b[511]) << 8); - } - -@@ -73,7 +73,7 @@ valid_part_table_flag(unsigned char *b) - } - - static void --write_part_table_flag(char *b) { -+write_part_table_flag(unsigned char *b) { - b[510] = 0x55; - b[511] = 0xaa; - } -@@ -100,17 +100,17 @@ set_start_sect(struct partition *p, unsi - store4_little_endian(p->start4, start_sect); - } - --unsigned int -+unsigned long long - get_start_sect(struct partition *p) { - return read4_little_endian(p->start4); - } - - static void --set_nr_sects(struct partition *p, unsigned int nr_sects) { -+set_nr_sects(struct partition *p, unsigned long long nr_sects) { - store4_little_endian(p->size4, nr_sects); - } - --unsigned int -+unsigned long long - get_nr_sects(struct partition *p) { - return read4_little_endian(p->size4); - } -@@ -122,7 +122,7 @@ static int type_open = O_RDWR; - * Raw disk label. For DOS-type partition tables the MBR, - * with descriptions of the primary partitions. - */ --char MBRbuffer[MAX_SECTOR_SIZE]; -+unsigned char MBRbuffer[MAX_SECTOR_SIZE]; - - /* - * per partition table entry data -@@ -136,8 +136,8 @@ struct pte { - struct partition *part_table; /* points into sectorbuffer */ - struct partition *ext_pointer; /* points into sectorbuffer */ - char changed; /* boolean */ -- unsigned int offset; /* disk sector number */ -- char *sectorbuffer; /* disk sector contents */ -+ unsigned long long offset; /* disk sector number */ -+ unsigned char *sectorbuffer; /* disk sector contents */ - } ptes[MAXIMUM_PARTS]; - - char *disk_device, /* must be specified */ -@@ -156,15 +156,14 @@ unsigned int user_cylinders, user_heads, - unsigned int pt_heads, pt_sectors; - unsigned int kern_heads, kern_sectors; - -+unsigned long long sector_offset = 1, extended_offset = 0, sectors; -+ - unsigned int heads, -- sectors, - cylinders, - sector_size = DEFAULT_SECTOR_SIZE, - user_set_sector_size = 0, -- sector_offset = 1, - units_per_sector = 1, -- display_in_cyl_units = 1, -- extended_offset = 0; /* offset of link pointers */ -+ display_in_cyl_units = 1; - - unsigned long long total_number_of_sectors; - -@@ -242,21 +241,21 @@ void fatal(enum failure why) { - } - - static void --seek_sector(int fd, unsigned int secno) { -+seek_sector(int fd, unsigned long long secno) { - off_t offset = (off_t) secno * sector_size; - if (lseek(fd, offset, SEEK_SET) == (off_t) -1) - fatal(unable_to_seek); - } - - static void --read_sector(int fd, unsigned int secno, char *buf) { -+read_sector(int fd, unsigned long long secno, unsigned char *buf) { - seek_sector(fd, secno); - if (read(fd, buf, sector_size) != sector_size) - fatal(unable_to_read); - } - - static void --write_sector(int fd, unsigned int secno, char *buf) { -+write_sector(int fd, unsigned long long secno, unsigned char *buf) { - seek_sector(fd, secno); - if (write(fd, buf, sector_size) != sector_size) - fatal(unable_to_write); -@@ -264,11 +263,11 @@ write_sector(int fd, unsigned int secno, - - /* Allocate a buffer and read a partition table sector */ - static void --read_pte(int fd, int pno, unsigned int offset) { -+read_pte(int fd, int pno, unsigned long long offset) { - struct pte *pe = &ptes[pno]; - - pe->offset = offset; -- pe->sectorbuffer = (char *) malloc(sector_size); -+ pe->sectorbuffer = malloc(sector_size); - if (!pe->sectorbuffer) - fatal(out_of_memory); - read_sector(fd, offset, pe->sectorbuffer); -@@ -276,7 +275,7 @@ read_pte(int fd, int pno, unsigned int o - pe->part_table = pe->ext_pointer = NULL; - } - --static unsigned int -+static unsigned long long - get_partition_start(struct pte *pe) { - return pe->offset + get_start_sect(pe->part_table); - } -@@ -549,10 +548,10 @@ clear_partition(struct partition *p) { - } - - static void --set_partition(int i, int doext, unsigned int start, unsigned int stop, -- int sysid) { -+set_partition(int i, int doext, unsigned long long start, -+ unsigned long long stop, int sysid) { - struct partition *p; -- unsigned int offset; -+ unsigned long long offset; - - if (doext) { - p = ptes[i].ext_pointer; -@@ -1548,7 +1547,7 @@ list_disk_geometry(void) { - else - printf(_("\nDisk %s: %ld.%ld GB, %lld bytes\n"), - disk_device, megabytes/1000, (megabytes/100)%10, bytes); -- printf(_("%d heads, %d sectors/track, %d cylinders"), -+ printf(_("%d heads, %Ld sectors/track, %d cylinders"), - heads, sectors, cylinders); - if (units_per_sector == 1) - printf(_(", total %llu sectors"), -@@ -1780,20 +1779,21 @@ x_list_table(int extend) { - struct partition *p; - int i; - -- printf(_("\nDisk %s: %d heads, %d sectors, %d cylinders\n\n"), -+ printf(_("\nDisk %s: %d heads, %Ld sectors, %d cylinders\n\n"), - disk_device, heads, sectors, cylinders); - printf(_("Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID\n")); - for (i = 0 ; i < partitions; i++) { - pe = &ptes[i]; - p = (extend ? pe->ext_pointer : pe->part_table); - if (p != NULL) { -- printf("%2d %02x%4d%4d%5d%4d%4d%5d%11u%11u %02x\n", -+ printf("%2d %02x%4d%4d%5d%4d%4d%5d%11lu%11lu %02x\n", - i + 1, p->boot_ind, p->head, - sector(p->sector), - cylinder(p->sector, p->cyl), p->end_head, - sector(p->end_sector), - cylinder(p->end_sector, p->end_cyl), -- get_start_sect(p), get_nr_sects(p), p->sys_ind); -+ (unsigned long) get_start_sect(p), -+ (unsigned long) get_nr_sects(p), p->sys_ind); - if (p->sys_ind) - check_consistency(p, i); - } -@@ -1801,7 +1801,7 @@ x_list_table(int extend) { - } - - static void --fill_bounds(unsigned int *first, unsigned int *last) { -+fill_bounds(unsigned long long *first, unsigned long long *last) { - int i; - struct pte *pe = &ptes[0]; - struct partition *p; -@@ -1834,7 +1834,7 @@ check(int n, unsigned int h, unsigned in - n, h + 1, heads); - if (real_s >= sectors) - fprintf(stderr, _("Partition %d: sector %d greater than " -- "maximum %d\n"), n, s, sectors); -+ "maximum %Ld\n"), n, s, sectors); - if (real_c >= cylinders) - fprintf(stderr, _("Partitions %d: cylinder %d greater than " - "maximum %d\n"), n, real_c + 1, cylinders); -@@ -1847,8 +1847,8 @@ check(int n, unsigned int h, unsigned in - static void - verify(void) { - int i, j; -- unsigned int total = 1; -- unsigned int first[partitions], last[partitions]; -+ unsigned long total = 1; -+ unsigned long long first[partitions], last[partitions]; - struct partition *p; - - if (warn_geometry()) -@@ -1892,7 +1892,7 @@ verify(void) { - - if (extended_offset) { - struct pte *pex = &ptes[ext_index]; -- unsigned int e_last = get_start_sect(pex->part_table) + -+ unsigned long long e_last = get_start_sect(pex->part_table) + - get_nr_sects(pex->part_table) - 1; - - for (i = 4; i < partitions; i++) { -@@ -1911,8 +1911,8 @@ verify(void) { - } - - if (total > total_number_of_sectors) -- printf(_("Total allocated sectors %d greater than the maximum " -- "%lld\n"), total, total_number_of_sectors); -+ printf(_("Total allocated sectors %ld greater than the maximum" -+ " %lld\n"), total, total_number_of_sectors); - else if (total < total_number_of_sectors) - printf(_("%lld unallocated sectors\n"), - total_number_of_sectors - total); -@@ -1925,7 +1925,7 @@ add_partition(int n, int sys) { - struct partition *p = ptes[n].part_table; - struct partition *q = ptes[ext_index].part_table; - long long llimit; -- unsigned int start, stop = 0, limit, temp, -+ unsigned long long start, stop = 0, limit, temp, - first[partitions], last[partitions]; - - if (p && p->sys_ind) { -@@ -1971,7 +1971,7 @@ add_partition(int n, int sys) { - if (start > limit) - break; - if (start >= temp+units_per_sector && read) { -- printf(_("Sector %d is already allocated\n"), temp); -+ printf(_("Sector %llu is already allocated\n"), temp); - temp = start; - read = 0; - } -@@ -2230,14 +2230,14 @@ reread_partition_table(int leave) { - - #define MAX_PER_LINE 16 - static void --print_buffer(char pbuffer[]) { -+print_buffer(unsigned char pbuffer[]) { - int i, - l; - - for (i = 0, l = 0; i < sector_size; i++, l++) { - if (l == 0) - printf("0x%03X:", i); -- printf(" %02X", (unsigned char) pbuffer[i]); -+ printf(" %02X", pbuffer[i]); - if (l == MAX_PER_LINE - 1) { - printf("\n"); - l = -1; -Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.h -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisk.h -+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.h -@@ -81,8 +81,8 @@ extern unsigned int read_int(unsigned in - #define SINGULAR 1 - extern char *const str_units(int); - --extern unsigned int get_start_sect(struct partition *p); --extern unsigned int get_nr_sects(struct partition *p); -+extern unsigned long long get_start_sect(struct partition *p); -+extern unsigned long long get_nr_sects(struct partition *p); - - extern int osf_label; - -Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdiskaixlabel.h -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdiskaixlabel.h -+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdiskaixlabel.h -@@ -19,9 +19,10 @@ typedef struct { - - /* fdisk.c */ - #define aixlabel ((aix_partition *)MBRbuffer) --extern char MBRbuffer[MAX_SECTOR_SIZE]; -+extern unsigned char MBRbuffer[MAX_SECTOR_SIZE]; - extern char changed[MAXIMUM_PARTS]; --extern unsigned int heads, sectors, cylinders; -+extern unsigned int heads, cylinders; -+extern unsigned long long sectors; - extern int show_begin; - extern int aix_label; - extern char *partition_type(unsigned char type); -Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdiskmaclabel.h -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdiskmaclabel.h -+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdiskmaclabel.h -@@ -25,9 +25,10 @@ typedef struct { - - /* fdisk.c */ - #define maclabel ((mac_partition *)MBRbuffer) --extern char MBRbuffer[MAX_SECTOR_SIZE]; -+extern unsigned char MBRbuffer[MAX_SECTOR_SIZE]; - extern char changed[MAXIMUM_PARTS]; --extern unsigned int heads, sectors, cylinders; -+extern unsigned int heads, cylinders; -+extern unsigned long long sectors; - extern int show_begin; - extern int mac_label; - extern char *partition_type(unsigned char type); -Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisksgilabel.c -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisksgilabel.c -+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisksgilabel.c -@@ -197,7 +197,7 @@ sgi_list_table(int xtra) { - w = strlen(disk_device); - - if (xtra) { -- printf(_("\nDisk %s (SGI disk label): %d heads, %d sectors\n" -+ printf(_("\nDisk %s (SGI disk label): %d heads, %llu sectors\n" - "%d cylinders, %d physical cylinders\n" - "%d extra sects/cyl, interleave %d:1\n" - "%s\n" -@@ -211,7 +211,7 @@ sgi_list_table(int xtra) { - sector_size); - } else { - printf(_("\nDisk %s (SGI disk label): " -- "%d heads, %d sectors, %d cylinders\n" -+ "%d heads, %llu sectors, %d cylinders\n" - "Units = %s of %d * %d bytes\n\n"), - disk_device, heads, sectors, cylinders, - str_units(PLURAL), units_per_sector, -Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisksgilabel.h -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisksgilabel.h -+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisksgilabel.h -@@ -103,8 +103,9 @@ typedef struct { - /* fdisk.c */ - #define sgilabel ((sgi_partition *)MBRbuffer) - #define sgiparam (sgilabel->devparam) --extern char MBRbuffer[MAX_SECTOR_SIZE]; --extern unsigned int heads, sectors, cylinders, sector_size; -+extern unsigned char MBRbuffer[MAX_SECTOR_SIZE]; -+extern unsigned int heads, cylinders, sector_size; -+extern unsigned long long sectors; - extern int show_begin; - extern int sgi_label; - extern char *partition_type(unsigned char type); -Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisksunlabel.c -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisksunlabel.c -+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisksunlabel.c -@@ -348,7 +348,7 @@ void create_sunlabel(void) - } - - snprintf(sunlabel->info, sizeof(sunlabel->info), -- "%s%s%s cyl %d alt %d hd %d sec %d", -+ "%s%s%s cyl %d alt %d hd %d sec %llu", - p ? p->vendor : "", (p && *p->vendor) ? " " : "", - p ? p->model - : (floppy ? _("3,5\" floppy") : _("Linux custom")), -@@ -655,7 +655,7 @@ sun_list_table(int xtra) { - w = strlen(disk_device); - if (xtra) - printf( -- _("\nDisk %s (Sun disk label): %d heads, %d sectors, %d rpm\n" -+ _("\nDisk %s (Sun disk label): %d heads, %llu sectors, %d rpm\n" - "%d cylinders, %d alternate cylinders, %d physical cylinders\n" - "%d extra sects/cyl, interleave %d:1\n" - "%s\n" -@@ -669,7 +669,7 @@ sun_list_table(int xtra) { - str_units(PLURAL), units_per_sector); - else - printf( -- _("\nDisk %s (Sun disk label): %d heads, %d sectors, %d cylinders\n" -+ _("\nDisk %s (Sun disk label): %d heads, %llu sectors, %d cylinders\n" - "Units = %s of %d * 512 bytes\n\n"), - disk_device, heads, sectors, cylinders, - str_units(PLURAL), units_per_sector); -Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisksunlabel.h -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisksunlabel.h -+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisksunlabel.h -@@ -37,8 +37,9 @@ typedef struct { - : (__u32)(x)) - - /* fdisk.c */ --extern char MBRbuffer[MAX_SECTOR_SIZE]; --extern unsigned int heads, sectors, cylinders; -+extern unsigned char MBRbuffer[MAX_SECTOR_SIZE]; -+extern unsigned int heads, cylinders; -+extern unsigned long long sectors; - extern int show_begin; - extern int sun_label; - extern char *partition_type(unsigned char type); diff --git a/util-linux-2.12r-mount_mtab_update.patch b/util-linux-2.12r-mount_mtab_update.patch index aa35f6c..6b9b97b 100644 --- a/util-linux-2.12r-mount_mtab_update.patch +++ b/util-linux-2.12r-mount_mtab_update.patch @@ -2,20 +2,17 @@ Index: mount/mount.c =================================================================== --- mount/mount.c.orig +++ mount/mount.c -@@ -954,11 +954,16 @@ retry_nfs: +@@ -1112,9 +1112,13 @@ try_mount_one (const char *spec0, const } if (fake || mnt5_res == 0) { + int isroot; + /* Mount succeeded, report this (if verbose) and write mtab entry. */ - if (loop) - opt_loopdev = loopdev; - -- if (!(mounttype & MS_PROPAGATION)) { + isroot = (streq(node, "/") || streq(node, "root") || + streq(node, "rootfs")); -+ + +- if (!(mounttype & MS_PROPAGATION)) { + if (!(mounttype & MS_PROPAGATION) && !isroot) { update_mtab_entry(loop ? loopfile : spec, node, diff --git a/util-linux-2.12r-mount_racy_loop.patch b/util-linux-2.12r-mount_racy_loop.patch deleted file mode 100644 index 803b3fb..0000000 --- a/util-linux-2.12r-mount_racy_loop.patch +++ /dev/null @@ -1,73 +0,0 @@ -Index: util-linux-ng-2.12r+git20070330/mount/lomount.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/lomount.c -+++ util-linux-ng-2.12r+git20070330/mount/lomount.c -@@ -341,8 +341,15 @@ set_loop(const char *device, const char - } - - if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { -- perror("ioctl: LOOP_SET_FD"); -- return 1; -+ switch (errno) { -+ case EBUSY: -+ if (verbose) -+ perror("ioctl: LOOP_SET_FD"); -+ return 2; -+ default: -+ perror("ioctl: LOOP_SET_FD"); -+ return 1; -+ } - } - close (ffd); - -Index: util-linux-ng-2.12r+git20070330/mount/mount.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/mount.c -+++ util-linux-ng-2.12r+git20070330/mount/mount.c -@@ -712,20 +712,34 @@ loop_check(const char **spec, const char - printf(_("mount: skipping the setup of a loop device\n")); - } else { - int loopro = (*flags & MS_RDONLY); -+ int res; - -- if (!*loopdev || !**loopdev) -- *loopdev = find_unused_loop_device(); -- if (!*loopdev) -- return EX_SYSERR; /* no more loop devices */ -- if (verbose) -- printf(_("mount: going to use the loop device %s\n"), *loopdev); -- offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0; -- if (set_loop(*loopdev, *loopfile, offset, -- opt_encryption, pfd, &loopro)) { -+ do { -+ if (!*loopdev || !**loopdev) -+ *loopdev = find_unused_loop_device(); -+ if (!*loopdev) -+ return EX_SYSERR; /* no more loop devices */ - if (verbose) -- printf(_("mount: failed setting up loop device\n")); -- return EX_FAIL; -- } -+ printf(_("mount: going to use the loop device %s\n"), *loopdev); -+ offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0; -+ if (res = set_loop (*loopdev, *loopfile, offset, -+ opt_encryption, pfd, &loopro)) { -+ switch(res) { -+ case 2: -+ /* loop dev has been grabbed by some other process, -+ try again */ -+ if (verbose) -+ printf("mount: stolen loop=%s ...trying again\n", *loopdev); -+ *loopdev = NULL; -+ continue; -+ default: -+ if (verbose) -+ printf(_("mount: failed setting up loop device\n")); -+ return EX_FAIL; -+ } -+ } -+ } while (!*loopdev); -+ - if (verbose > 1) - printf(_("mount: setup loop device successfully\n")); - *spec = *loopdev; diff --git a/util-linux-2.13-build_fix_intel_check.patch b/util-linux-2.13-build_fix_intel_check.patch deleted file mode 100644 index 8e1c118..0000000 --- a/util-linux-2.13-build_fix_intel_check.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-ng-2.12r+git20070330/configure.ac -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/configure.ac -+++ util-linux-ng-2.12r+git20070330/configure.ac -@@ -170,7 +170,7 @@ AC_TRY_COMPILE([ - - - case "$host" in -- i?86-*) intel=true ;; -+ i?86-* | x86_64*) intel=true ;; - m68*) m68k=true ;; - sparc*) sparc=true ;; - esac diff --git a/util-linux-2.13-misc_utils_cal_ncurses.patch b/util-linux-2.13-misc_utils_cal_ncurses.patch deleted file mode 100644 index 73bea32..0000000 --- a/util-linux-2.13-misc_utils_cal_ncurses.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: util-linux-ng-2.12r+git20070530/configure.ac -=================================================================== ---- util-linux-ng-2.12r+git20070530.orig/configure.ac -+++ util-linux-ng-2.12r+git20070530/configure.ac -@@ -107,8 +107,9 @@ fi - have_ncurses=no - AC_CHECK_HEADERS([ncurses.h ncurses/ncurses.h], [have_ncurses=yes]) - case $have_ncurses in --yes) AC_MSG_NOTICE([you have ncurses]);; --no) AC_MSG_NOTICE([you do not have ncurses]);; -+ yes) AC_MSG_NOTICE([you have ncurses]) -+ AC_DEFINE([HAVE_NCURSES],, [define this if you have libncurses]);; -+ no) AC_MSG_NOTICE([you do not have ncurses]);; - esac - AM_CONDITIONAL(HAVE_NCURSES, test x$have_ncurses = xyes) - diff --git a/util-linux-2.13-mount_volumeid_label.patch b/util-linux-2.13-mount_volumeid_label.patch deleted file mode 100644 index 5a69b24..0000000 --- a/util-linux-2.13-mount_volumeid_label.patch +++ /dev/null @@ -1,172 +0,0 @@ -X-From-Line: mkoenig Thu Jun 21 13:32:01 2007 -Return-Path: -Received: from imap.suse.de [195.135.221.23] - by sor.suse.de with IMAP (fetchmail-6.3.5) - for (single-drop); Thu, 21 Jun 2007 13:32:01 +0200 (CEST) -Received: from imap.suse.de ([unix socket]) - by imap (Cyrus v2.2.12) with LMTPA; - Thu, 21 Jun 2007 13:31:14 +0200 -X-Sieve: CMU Sieve 2.2 -Received: from Relay2.suse.de (relay2.suse.de [149.44.160.89]) - (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) - (Client CN "relay.suse.de", Issuer "CAcert Class 3 Root" (not verified)) - by imap.suse.de (Postfix) with ESMTP id 5778914540D0 - for ; Thu, 21 Jun 2007 13:31:14 +0200 (CEST) -Received: by Relay2.suse.de (Postfix) - id 436A020E91; Thu, 21 Jun 2007 13:31:14 +0200 (CEST) -Received: from emea5-mh.id5.novell.com (emea5-mh.id5.novell.com [149.44.160.113]) - (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) - (No client certificate requested) - by Relay2.suse.de (Postfix) with ESMTP id 415D620E1C - for ; Thu, 21 Jun 2007 13:31:14 +0200 (CEST) -Received: from [192.168.178.22] ([149.44.162.75]) - by emea5-mh.id5.novell.com with ESMTP (TLS encrypted); Thu, 21 Jun 2007 13:31:06 +0200 -Subject: Re: [PATCH] mount: use encoded labels for volume_id -From: Kay Sievers -To: Matthias Koenig -Cc: util-linux-ng@vger.kernel.org, Karel Zak -In-Reply-To: -References: -Content-Type: multipart/mixed; boundary="=-uhU5UxmJBOKYf2ti+EWn" -Date: Thu, 21 Jun 2007 13:31:52 +0200 -X-Gnus-Mail-Source: file:~/MAIL/inbox -Message-Id: <1182425512.3436.17.camel@lov.localdomain> -Mime-Version: 1.0 -X-Mailer: Evolution 2.10.1 -Lines: 132 -Xref: sor.suse.de inbox:3392 -X-Gnus-Article-Number: 3392 Thu, 21 Jun 2007 14:21:03 +0200 - - ---=-uhU5UxmJBOKYf2ti+EWn -Content-Type: text/plain -Content-Transfer-Encoding: 7bit - -On Thu, 2007-06-21 at 12:52 +0200, Matthias Koenig wrote: -> since udev-112 exports now the label encoding function, -> here is a proposed patch. -> This fixes the problem of user mounts when filsystems -> with unsafe characters are given via LABEL= in fstab. - -A patch to do this is already on the list: - http://www.mail-archive.com/util-linux-ng@vger.kernel.org/msg00196.html -I was waiting for Fedora rawhide to catch-up before resending is, so Karel -can at least compile-test it. :) - -Configure should check for the new function in the library. Also uuid's may -need escaping with free textual uuids like DDF-raid uses. The probing context -"struct volume_id" should not be accessed directly anymore, if we require a -recent libvolume_id anyway. It will switch to an opaque object some day. -The known_fstype() lookup is also available now, and the TODO can be removed. - -Patch attached again. - -Thanks, -Kay - ---=-uhU5UxmJBOKYf2ti+EWn -Content-Disposition: inline; filename=volume_id_encode.patch -Content-Type: text/x-patch; name=volume_id_encode.patch; charset=utf-8 -Content-Transfer-Encoding: 7bit - -diff --git a/configure.ac b/configure.ac -index e678773..38c4815 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -87,7 +87,7 @@ have_volume_id=no - if test x$with_fsprobe = xblkid; then - UTIL_CHECK_LIB(blkid, blkid_known_fstype) - elif test x$with_fsprobe = xvolume_id; then -- UTIL_CHECK_LIB(volume_id, volume_id_open_fd) -+ UTIL_CHECK_LIB(volume_id, volume_id_encode_string) - fi - - if test $have_blkid = no && test $have_volume_id = no; then -diff --git a/mount/fsprobe_volumeid.c b/mount/fsprobe_volumeid.c -index 8c13987..4b58e72 100644 ---- a/mount/fsprobe_volumeid.c -+++ b/mount/fsprobe_volumeid.c -@@ -20,11 +20,13 @@ enum probe_type { - VOLUME_ID_TYPE, - }; - --static char *probe(const char *device, enum probe_type type) -+static char -+*probe(const char *device, enum probe_type type) - { - int fd; - uint64_t size; - struct volume_id *id; -+ const char *val; - char *value = NULL; - - fd = open(device, O_RDONLY); -@@ -42,13 +44,16 @@ static char *probe(const char *device, enum probe_type type) - if (volume_id_probe_all(id, 0, size) == 0) { - switch(type) { - case VOLUME_ID_LABEL: -- value = xstrdup(id->label); -+ if (volume_id_get_label(id, &val)) -+ value = xstrdup(val); - break; - case VOLUME_ID_UUID: -- value = xstrdup(id->uuid); -+ if (volume_id_get_uuid(id, &val)) -+ value = xstrdup(val); - break; - case VOLUME_ID_TYPE: -- value = xstrdup(id->type); -+ if (volume_id_get_type(id, &val)) -+ value = xstrdup(val); - break; - default: - break; -@@ -72,10 +77,8 @@ fsprobe_exit(void) - int - fsprobe_known_fstype(const char *fstype) - { -- /* TODO - if (volume_id_get_prober_by_type(fstype) != NULL) - return 1; -- */ - return 0; - } - -@@ -101,11 +104,15 @@ const char * - fsprobe_get_devname_by_uuid(const char *uuid) - { - char dev[PATH_MAX]; -+ size_t len; - - if (!uuid) - return NULL; - -- snprintf(dev, sizeof(dev), PATH_DEV_BYUUID "/%s", uuid); -+ strcpy(dev, PATH_DEV_BYUUID "/"); -+ len = strlen(PATH_DEV_BYUUID "/"); -+ if (!volume_id_encode_string(uuid, &dev[len], sizeof(dev) - len) != 0) -+ return NULL; - return canonicalize(dev); - } - -@@ -113,11 +120,13 @@ const char * - fsprobe_get_devname_by_label(const char *label) - { - char dev[PATH_MAX]; -+ size_t len; - - if (!label) - return NULL; -- -- snprintf(dev, sizeof(dev), PATH_DEV_BYLABEL "/%s", label); -+ strcpy(dev, PATH_DEV_BYLABEL "/"); -+ len = strlen(PATH_DEV_BYLABEL "/"); -+ if (!volume_id_encode_string(label, &dev[len], sizeof(dev) - len) != 0) -+ return NULL; - return canonicalize(dev); - } -- - ---=-uhU5UxmJBOKYf2ti+EWn-- - - diff --git a/util-linux-2.13-sys_utils_arch.patch b/util-linux-2.13-sys_utils_arch.patch index def23d9..e7b0620 100644 --- a/util-linux-2.13-sys_utils_arch.patch +++ b/util-linux-2.13-sys_utils_arch.patch @@ -1,14 +1,14 @@ -Index: util-linux-ng-2.12r+git20070509/sys-utils/Makefile.am +Index: util-linux-ng-2.12r+git20070703/sys-utils/Makefile.am =================================================================== ---- util-linux-ng-2.12r+git20070509.orig/sys-utils/Makefile.am -+++ util-linux-ng-2.12r+git20070509/sys-utils/Makefile.am +--- util-linux-ng-2.12r+git20070703.orig/sys-utils/Makefile.am ++++ util-linux-ng-2.12r+git20070703/sys-utils/Makefile.am @@ -1,9 +1,11 @@ include $(top_srcdir)/config/include-Makefile.am -bin_PROGRAMS = dmesg +bin_PROGRAMS = arch dmesg - usrbinexec_PROGRAMS = cytune flock ionice ipcrm ipcs renice setsid + usrbinexec_PROGRAMS = cytune flock ionice ipcrm ipcs renice setsid setarch +arch_SOURCES = arch.c + @@ -22,12 +22,12 @@ Index: util-linux-ng-2.12r+git20070509/sys-utils/Makefile.am -man_MANS = flock.1 ionice.1 readprofile.1 \ +man_MANS = arch.1 flock.1 ionice.1 readprofile.1 \ ctrlaltdel.8 cytune.8 dmesg.1 ipcrm.1 ipcs.1 renice.1 \ - setsid.1 tunelp.8 + setsid.1 tunelp.8 setarch.8 -Index: util-linux-ng-2.12r+git20070509/sys-utils/arch.1 +Index: util-linux-ng-2.12r+git20070703/sys-utils/arch.1 =================================================================== --- /dev/null -+++ util-linux-ng-2.12r+git20070509/sys-utils/arch.1 ++++ util-linux-ng-2.12r+git20070703/sys-utils/arch.1 @@ -0,0 +1,34 @@ +.\" arch.1 -- +.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) @@ -63,10 +63,10 @@ Index: util-linux-ng-2.12r+git20070509/sys-utils/arch.1 +.\" Then how come we get these i586 values? +.\" Well, the routine check_bugs() does system_utsname.machine[1] = '0' + x86; +.\" (called in init/main.c, defined in ./include/asm-i386/bugs.h) -Index: util-linux-ng-2.12r+git20070509/sys-utils/arch.c +Index: util-linux-ng-2.12r+git20070703/sys-utils/arch.c =================================================================== --- /dev/null -+++ util-linux-ng-2.12r+git20070509/sys-utils/arch.c ++++ util-linux-ng-2.12r+git20070703/sys-utils/arch.c @@ -0,0 +1,35 @@ +/* arch -- print machine architecture information + * Created: Mon Dec 20 12:27:15 1993 by faith@cs.unc.edu diff --git a/util-linux-ng-2.12r+git20070530.tar.bz2 b/util-linux-ng-2.12r+git20070530.tar.bz2 deleted file mode 100644 index 1831cb4..0000000 --- a/util-linux-ng-2.12r+git20070530.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cead87afb0a8a4030b74d5875f0ccc91d6903094b1aad78ad7dccc97787e4f33 -size 1496916 diff --git a/util-linux-ng-2.13-rc1.tar.bz2 b/util-linux-ng-2.13-rc1.tar.bz2 new file mode 100644 index 0000000..e2615da --- /dev/null +++ b/util-linux-ng-2.13-rc1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0aeb0b619e19fdf0fe154784644215e1c4f3d4352173e94724c68401dbd8567 +size 2784788 diff --git a/util-linux.changes b/util-linux.changes index e7f5500..e0a82da 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Thu Jul 5 11:59:30 CEST 2007 - mkoenig@suse.de + +- update to 2.13-rc1: + * mount fixes + * agetty: add 'O' escape code to display domain name + * blockdev: add BLKFRAGET/BLKFRASET ioctls + * fdisk: many significant improvements and fixes to Sun label handling + * update po files +- removed patches (merged upstream): + util-linux-2.11q-fdisk_fs_mac.patch + util-linux-2.12r-fdisk_fdiskwrap.patch + util-linux-2.12r-mount_racy_loop.patch + util-linux-2.13-misc_utils_cal_ncurses.patch + util-linux-2.13-mount_volumeid_label.patch +- use %find_lang + ------------------------------------------------------------------- Thu Jun 21 14:50:58 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 8e8bc71..615adac 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.12r+git20070530) +# spec file for package util-linux (Version 2.12r+2.13rc1) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -17,13 +17,14 @@ Provides: util rawio raw base schedutils Supplements: filesystem(minix) Obsoletes: util rawio raw base schedutils PreReq: %install_info_prereq permissions -License: BSD License and BSD-like, GNU General Public License (GPL) +License: BSD 3-Clause, GPL v2 or later Group: System/Base Autoreqprov: on -Version: 2.12r+git20070530 -Release: 6 +Version: 2.12r+2.13rc1 +Release: 1 +%define upver 2.13-rc1 Summary: A collection of basic system utilities -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 Source2: nologin.c Source3: nologin.8 Source4: raw.init @@ -35,8 +36,8 @@ Source6: etc_filesystems Source9: adjtimex-%{adjtimex_ver}.tar.bz2 Source10: freeramdisk.tar.bz2 Source11: klogconsole.tar.bz2 -Source12: which-%{which_ver}.tar.gz -Source13: time-%{time_ver}.tar.gz +Source12: which-%{which_ver}.tar.bz2 +Source13: time-%{time_ver}.tar.bz2 Source15: cryptoloop.txt Source22: setctsid.c Source23: setctsid.8 @@ -60,8 +61,6 @@ Patch8: util-linux-2.12a-mount_procswapcheck.patch Patch10: util-linux-2.12a-mount_mountpointwithcolon.patch # add ionice Patch14: util-linux-2.12q-sys_utils_ionice.patch -# 104081 - make fdisk detect MAC-fs -Patch15: util-linux-2.11q-fdisk_fs_mac.patch # 104405 - mount -a doesn't work with hotpluggable devices Patch16: util-linux-mount_opt_hotplug.patch # 115129 - mount --move doesn't work as expected @@ -70,8 +69,6 @@ Patch21: util-linux-2.12q-mount_umount2_not_static.patch # 148409 - df, mount, /proc/mounts show root mounted twice # TODO: Needs fix, because of 231599 Patch22: util-linux-2.12r-mount_mtab_update.patch -# 153657 - fdisk is not able to manage huge disks -Patch23: util-linux-2.12r-fdisk_fdiskwrap.patch # 176582 - If the user doesn't specify -t mount.fstype will never be called #TODO: check alternative upstream fix #Patch96: util-linux-2.12r-mount_external_prog_on_guess.patch @@ -89,16 +86,11 @@ Patch32: util-linux-2.12r-disk_utils_mkswap_fix.patch Patch34: util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch # 241372 - remove legacy warnings from fdisk Patch35: util-linux-2.12r-fdisk_remove_bogus_warnings.patch -# 242750 - mount: fix race condition when using -o loop -Patch36: util-linux-2.12r-mount_racy_loop.patch # 254437 - swapon should automatically reset the suspend signature # TODO: Needs to be ported to new version Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch Patch40: util-linux-2.13-sys_utils_arch.patch -Patch42: util-linux-2.13-build_fix_intel_check.patch -Patch43: util-linux-2.13-misc_utils_cal_ncurses.patch Patch44: util-linux-2.13-schedutils_chrt.patch -Patch45: util-linux-2.13-mount_volumeid_label.patch ## ## adjtimex ## @@ -131,7 +123,7 @@ Authors: Karel Zak %prep -%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%version +%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%upver %patch1 -p1 %patch2 -p1 %patch5 -p0 @@ -139,12 +131,10 @@ Authors: %patch8 -p1 %patch10 -p1 %patch14 -p1 -%patch15 -p1 %patch16 -p1 %patch18 %patch21 %patch22 -%patch23 -p1 %patch26 %patch29 -p1 %patch30 -p1 @@ -152,13 +142,9 @@ Authors: %patch32 -p1 %patch34 -p1 %patch35 -p1 -%patch36 -p1 #%patch38 -p1 %patch40 -p1 -%patch42 -p1 -%patch43 -p1 %patch44 -p1 -%patch45 -p1 # cd adjtimex-* %patch50 -p1 @@ -221,8 +207,9 @@ make setctsid CFLAGS="$RPM_OPT_FLAGS" %ifarch s390 s390x CFLAGS=-DCONFIG_SMP %endif -#autoreconf -fi -./autogen.sh +# Use autogen, when building from git tree +autoreconf -fi +#./autogen.sh ./configure --mandir=%{_mandir} \ --datadir=%{_datadir} \ --with-fsprobe=volume_id \ @@ -304,6 +291,19 @@ rm -f $RPM_BUILD_ROOT/usr/bin/chkdupexe rm -f $RPM_BUILD_ROOT/usr/bin/scriptreplay rm -f $RPM_BUILD_ROOT/usr/share/man/man1/chkdupexe.1 rm -f $RPM_BUILD_ROOT/usr/share/man/man1/scriptreplay.1 +# For now, do not package setarch and related symlinks +rm -f $RPM_BUILD_ROOT/usr/bin/setarch +rm -f $RPM_BUILD_ROOT/usr/bin/linux32 +rm -f $RPM_BUILD_ROOT/usr/bin/linux64 +rm -f $RPM_BUILD_ROOT/usr/bin/i386 +rm -f $RPM_BUILD_ROOT/usr/bin/x86_64 +rm -f $RPM_BUILD_ROOT/usr/bin/s390 +rm -f $RPM_BUILD_ROOT/usr/bin/s390x +rm -f $RPM_BUILD_ROOT/usr/bin/ppc +rm -f $RPM_BUILD_ROOT/usr/bin/ppc32 +rm -f $RPM_BUILD_ROOT/usr/bin/ppc64 +rm -f $RPM_BUILD_ROOT/usr/bin/ia64 +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/setarch.8 # arch dependent %ifarch s390 s390x rm -f $RPM_BUILD_ROOT/etc/fdprm @@ -329,6 +329,7 @@ rm -f $RPM_BUILD_ROOT/sbin/sfdisk rm -f $RPM_BUILD_ROOT/sbin/fdisk rm -f $RPM_BUILD_ROOT%{_mandir}/man8/fdisk.8* %endif +%find_lang %{name}-ng %{name}.lang %clean rm -rf $RPM_BUILD_ROOT @@ -356,10 +357,9 @@ fi %verifyscript %verify_permissions -e /usr/bin/wall -e /usr/bin/write -%files +%files -f %{name}.lang # Common files for all archs %defattr(-,root,root) -%doc INSTALL %doc login-utils/README.getty %doc login-utils/README.modems-with-agetty %doc login-utils/README.poeigl @@ -372,13 +372,13 @@ fi %doc README.largedisk %config %attr(744,root,root) /etc/init.d/raw %config(noreplace) %attr(644,root,root) /etc/raw +%config /etc/filesystems /usr/sbin/rcraw /bin/arch /bin/dmesg /bin/more /bin/mount /bin/umount -%config /etc/filesystems /sbin/agetty /sbin/blockdev /sbin/elvtune @@ -413,6 +413,8 @@ fi /usr/bin/ipcs /usr/bin/isosize /usr/bin/line +#/usr/bin/linux32 +#/usr/bin/linux64 /usr/bin/look /usr/bin/mcookie /usr/bin/mesg @@ -424,6 +426,7 @@ fi /usr/bin/renice /usr/bin/rev /usr/bin/script +#/usr/bin/setarch /usr/bin/setsid /usr/bin/ul /usr/bin/tailf @@ -507,6 +510,7 @@ fi %{_mandir}/man8/partx.8.gz %{_mandir}/man8/pivot_root.8.gz %{_mandir}/man8/raw.8.gz +#%{_mandir}/man8/setarch.8.gz %{_mandir}/man8/swapoff.8.gz %{_mandir}/man8/swapon.8.gz %{_mandir}/man8/umount.8.gz @@ -531,7 +535,7 @@ fi /sbin/cfdisk /sbin/sfdisk %endif -%ifarch %ix86 x86_64 +%ifarch %ix86 /usr/sbin/ramsize /usr/sbin/rdev /usr/sbin/rootflags @@ -555,8 +559,42 @@ fi %{_mandir}/man8/klogconsole.8.gz %{_mandir}/man8/tunelp.8.gz %endif +# setarch links +#%ifarch %ix86 x86_64 +#/usr/bin/i386 +#%endif +#%ifarch x86_64 +#/usr/bin/x86_64 +#%endif +#%ifarch s390 s390x +#/usr/bin/s390 +#/usr/bin/s390x +#%endif +#%ifarch ppc ppc64 +#/usr/bin/ppc +#/usr/bin/ppc32 +#/usr/bin/ppc64 +#%endif +#%ifarch ia64 +#/usr/bin/i386 +#/usr/bin/ia64 +#%endif %changelog +* Thu Jul 05 2007 - mkoenig@suse.de +- update to 2.13-rc1: + * mount fixes + * agetty: add 'O' escape code to display domain name + * blockdev: add BLKFRAGET/BLKFRASET ioctls + * fdisk: many significant improvements and fixes to Sun label handling + * update po files +- removed patches (merged upstream): + util-linux-2.11q-fdisk_fs_mac.patch + util-linux-2.12r-fdisk_fdiskwrap.patch + util-linux-2.12r-mount_racy_loop.patch + util-linux-2.13-misc_utils_cal_ncurses.patch + util-linux-2.13-mount_volumeid_label.patch +- use %%find_lang * Thu Jun 21 2007 - mkoenig@suse.de - use encoded label names with volume_id [#232929] util-linux-2.13-mount_volumeid_label.patch diff --git a/which-2.16.tar.bz2 b/which-2.16.tar.bz2 new file mode 100644 index 0000000..9ab7c1b --- /dev/null +++ b/which-2.16.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37db49d0f9b5364ac181fd151b8e272645341b73e08675e05031ef564ea539f3 +size 100172 diff --git a/which-2.16.tar.gz b/which-2.16.tar.gz deleted file mode 100644 index 7093c93..0000000 --- a/which-2.16.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0ac8502e9985a3ac6b0e2aa4f2a60f91cad0dc0cca6dc9c1c142ebba4b8dd664 -size 125696 From b867e3c468e5e5e2ecaa51ea7b5a27d8d620f5806a4456fe9b4dfc49861953ba Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 5 Jul 2007 17:13:28 +0000 Subject: [PATCH 021/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=21 --- util-linux-2.12q-sys_utils_ionice.patch | 247 ------------------ ...inux-2.12r-misc_utils_cal_formatting.patch | 26 -- util-linux-2.13-sys_utils_arch.patch | 20 +- ...nux-2.13-sys_utils_build_rdev_x86_64.patch | 16 ++ util-linux.changes | 10 + util-linux.spec | 21 +- 6 files changed, 48 insertions(+), 292 deletions(-) delete mode 100644 util-linux-2.12q-sys_utils_ionice.patch delete mode 100644 util-linux-2.12r-misc_utils_cal_formatting.patch create mode 100644 util-linux-2.13-sys_utils_build_rdev_x86_64.patch diff --git a/util-linux-2.12q-sys_utils_ionice.patch b/util-linux-2.12q-sys_utils_ionice.patch deleted file mode 100644 index 9af3243..0000000 --- a/util-linux-2.12q-sys_utils_ionice.patch +++ /dev/null @@ -1,247 +0,0 @@ -Index: util-linux-ng-2.12r+git20070703/sys-utils/ionice.1 -=================================================================== ---- /dev/null -+++ util-linux-ng-2.12r+git20070703/sys-utils/ionice.1 -@@ -0,0 +1,71 @@ -+.TH ionice "1" "August 2005" ionice -+.SH NAME -+ionice \- get/set program io scheduling class and priority -+.SH SYNOPSIS -+.B ionice -+[\fI-c\fR] \fI[-n\fR] [\fI-p\fR] [COMMAND [ARG...]] -+ -+.SH DESCRIPTION -+This program sets the io scheduling class and priority for a program. As of -+this writing, Linux supports 3 scheduling classes: -+ -+\fBIdle\fR. -+A program running with idle io priority will only get disk time when no other -+program has asked for disk io for a defined grace period. The impact of idle -+io processes on normal system activity should be zero. This scheduling -+class does not take a priority argument. -+ -+\fBBest effort\fR. -+This is the default scheduling class for any process that hasn't asked for -+a specific io priority. Programs inherit the CPU nice setting for io -+priorities. This class takes a priority argument from \fI0-7\fR, with lower -+number being higher priority. Programs running at the same best effort -+priority are served in a round-robin fashion. -+ -+\fBReal time\fR. -+The RT scheduling class is given first access to the disk, regardless of -+what else is going on in the system. Thus the RT class needs to be used with -+some care, as it can starve other processes. As with the best effort class, -+8 priority levels are defined denoting how big a time slice a given process -+will receive on each scheduling window. -+ -+If no arguments or just \fI-p\fR is given, \fIionice\fR will query the -+current io scheduling class and priority for that process. -+ -+.SH OPTIONS -+.LP -+.TP 7 -+\fB-c\fP -+The scheduling class. 1 for real time, 2 for best-effort, 3 for idle. -+.TP 7 -+\fB-n\fP -+The scheduling class data. This defines the class data, if the class -+accepts an argument. For real time and best-effort, \fI0-7\fR is valid -+data. -+.TP 7 -+\fB-p\fP -+Pass in a process pid to change an already running process. If this argument -+is not given, \fBionice\fP will run the listed program with the given -+parameters. -+ -+.SH EXAMPLES -+.LP -+.TP 7 -+# \fBionice\fP -c3 -p89 -+.TP 7 -+Sets process with PID 89 as an idle io process. -+.TP 7 -+# \fBionice\fP -c2 -n0 bash -+.TP 7 -+Runs 'bash' as a best-effort program with highest priority. -+.TP 7 -+# \fBionice\fP -p89 -+.TP 7 -+Returns the class and priority of the process with PID 89. -+ -+.SH NOTES -+Linux supports io scheduling priorities and classes since 2.6.13 with the CFQ -+io scheduler. -+ -+.SH AUTHORS -+Jens Axboe -Index: util-linux-ng-2.12r+git20070703/sys-utils/ionice.c -=================================================================== ---- /dev/null -+++ util-linux-ng-2.12r+git20070703/sys-utils/ionice.c -@@ -0,0 +1,144 @@ -+/* -+ * ionice: set or get process io scheduling class and priority -+ * -+ * Copyright (C) 2005 Jens Axboe SUSE Labs -+ * -+ * Released under the terms of the GNU General Public License version 2 -+ * -+ */ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#if defined(__i386__) -+#define __NR_ioprio_set 289 -+#define __NR_ioprio_get 290 -+#elif defined(__powerpc__) || defined(__powerpc64__) -+#define __NR_ioprio_set 273 -+#define __NR_ioprio_get 274 -+#elif defined(__x86_64__) -+#define __NR_ioprio_set 251 -+#define __NR_ioprio_get 252 -+#elif defined(__ia64__) -+#define __NR_ioprio_set 1274 -+#define __NR_ioprio_get 1275 -+#elif defined(__alpha__) -+#define __NR_ioprio_set 442 -+#define __NR_ioprio_get 443 -+#elif defined(__s390__) || defined(__s390x__) -+#define __NR_ioprio_set 282 -+#define __NR_ioprio_get 283 -+#elif defined(__arm__) -+#define __NR_ioprio_set 314 -+#define __NR_ioprio_get 315 -+#else -+#error "Unsupported arch" -+#endif -+ -+static int ioprio_set(int which, int who, int ioprio) -+{ -+ return syscall(__NR_ioprio_set, which, who, ioprio); -+} -+ -+static int ioprio_get(int which, int who) -+{ -+ return syscall(__NR_ioprio_get, which, who); -+} -+ -+enum { -+ IOPRIO_CLASS_NONE, -+ IOPRIO_CLASS_RT, -+ IOPRIO_CLASS_BE, -+ IOPRIO_CLASS_IDLE, -+}; -+ -+enum { -+ IOPRIO_WHO_PROCESS = 1, -+ IOPRIO_WHO_PGRP, -+ IOPRIO_WHO_USER, -+}; -+ -+#define IOPRIO_CLASS_SHIFT 13 -+ -+const char *to_prio[] = { "none", "realtime", "best-effort", "idle", }; -+ -+static void usage(void) -+{ -+ printf("Usage: ionice [OPTIONS] [COMMAND [ARG]...]\n"); -+ printf("Sets or gets process io scheduling class and priority.\n"); -+ printf("\n\t-n\tClass data (typically 0-7, lower being higher prio)\n"); -+ printf("\t-c\tScheduling class\n"); -+ printf("\t\t\t1: realtime, 2: best-effort, 3: idle\n"); -+ printf("\t-p\tProcess pid\n"); -+ printf("\t-h\tThis help page\n"); -+ printf("\nJens Axboe (C) 2005\n"); -+} -+ -+int main(int argc, char *argv[]) -+{ -+ int ioprio = 4, set = 0, ioprio_class = IOPRIO_CLASS_BE; -+ int c, pid = 0; -+ -+ while ((c = getopt(argc, argv, "+n:c:p:h")) != EOF) { -+ switch (c) { -+ case 'n': -+ ioprio = strtol(optarg, NULL, 10); -+ set = 1; -+ break; -+ case 'c': -+ ioprio_class = strtol(optarg, NULL, 10); -+ set = 1; -+ break; -+ case 'p': -+ pid = strtol(optarg, NULL, 10); -+ break; -+ case 'h': -+ default: -+ usage(); -+ exit(0); -+ } -+ } -+ -+ switch (ioprio_class) { -+ case IOPRIO_CLASS_NONE: -+ ioprio_class = IOPRIO_CLASS_BE; -+ break; -+ case IOPRIO_CLASS_RT: -+ case IOPRIO_CLASS_BE: -+ break; -+ case IOPRIO_CLASS_IDLE: -+ ioprio = 7; -+ break; -+ default: -+ printf("bad prio class %d\n", ioprio_class); -+ return 1; -+ } -+ -+ if (!set) { -+ if (!pid && argv[optind]) -+ pid = strtol(argv[optind], NULL, 10); -+ -+ ioprio = ioprio_get(IOPRIO_WHO_PROCESS, pid); -+ -+ if (ioprio == -1) -+ perror("ioprio_get"); -+ else { -+ ioprio_class = ioprio >> IOPRIO_CLASS_SHIFT; -+ ioprio = ioprio & 0xff; -+ printf("%s: prio %d\n", to_prio[ioprio_class], ioprio); -+ } -+ } else { -+ if (ioprio_set(IOPRIO_WHO_PROCESS, pid, ioprio | ioprio_class << IOPRIO_CLASS_SHIFT) == -1) -+ perror("ioprio_set"); -+ -+ if (argv[optind]) -+ execvp(argv[optind], &argv[optind]); -+ } -+ -+ return 0; -+} -Index: util-linux-ng-2.12r+git20070703/sys-utils/Makefile.am -=================================================================== ---- util-linux-ng-2.12r+git20070703.orig/sys-utils/Makefile.am -+++ util-linux-ng-2.12r+git20070703/sys-utils/Makefile.am -@@ -2,7 +2,7 @@ include $(top_srcdir)/config/include-Mak - - bin_PROGRAMS = dmesg - --usrbinexec_PROGRAMS = cytune flock ipcrm ipcs renice setsid setarch -+usrbinexec_PROGRAMS = cytune flock ionice ipcrm ipcs renice setsid setarch - - cytune_SOURCES = cytune.c cyclades.h - -@@ -12,7 +12,7 @@ usrsbinexec_PROGRAMS = readprofile tunel - - tunelp_SOURCES = tunelp.c lp.h - --man_MANS = flock.1 readprofile.1 \ -+man_MANS = flock.1 ionice.1 readprofile.1 \ - ctrlaltdel.8 cytune.8 dmesg.1 ipcrm.1 ipcs.1 renice.1 \ - setsid.1 tunelp.8 setarch.8 - diff --git a/util-linux-2.12r-misc_utils_cal_formatting.patch b/util-linux-2.12r-misc_utils_cal_formatting.patch deleted file mode 100644 index 1758a2c..0000000 --- a/util-linux-2.12r-misc_utils_cal_formatting.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- misc-utils/cal.c -+++ misc-utils/cal.c -@@ -702,18 +702,16 @@ - } - - void --trim_trailing_spaces(s) -- char *s; -+trim_trailing_spaces(char *s) - { - char *p; - - for (p = s; *p; ++p) - continue; -- while (p > s && isspace(*--p)) -- continue; -- if (p > s) -- ++p; -- *p = '\0'; -+ -+ p--; -+ if (isspace(*p)) -+ *p = '\0'; - } - - /* diff --git a/util-linux-2.13-sys_utils_arch.patch b/util-linux-2.13-sys_utils_arch.patch index e7b0620..4ee47c8 100644 --- a/util-linux-2.13-sys_utils_arch.patch +++ b/util-linux-2.13-sys_utils_arch.patch @@ -1,14 +1,14 @@ -Index: util-linux-ng-2.12r+git20070703/sys-utils/Makefile.am +Index: util-linux-ng-2.13-rc1/sys-utils/Makefile.am =================================================================== ---- util-linux-ng-2.12r+git20070703.orig/sys-utils/Makefile.am -+++ util-linux-ng-2.12r+git20070703/sys-utils/Makefile.am +--- util-linux-ng-2.13-rc1.orig/sys-utils/Makefile.am ++++ util-linux-ng-2.13-rc1/sys-utils/Makefile.am @@ -1,9 +1,11 @@ include $(top_srcdir)/config/include-Makefile.am -bin_PROGRAMS = dmesg +bin_PROGRAMS = arch dmesg - usrbinexec_PROGRAMS = cytune flock ionice ipcrm ipcs renice setsid setarch + usrbinexec_PROGRAMS = cytune flock ipcrm ipcs renice setsid setarch +arch_SOURCES = arch.c + @@ -19,15 +19,15 @@ Index: util-linux-ng-2.12r+git20070703/sys-utils/Makefile.am tunelp_SOURCES = tunelp.c lp.h --man_MANS = flock.1 ionice.1 readprofile.1 \ -+man_MANS = arch.1 flock.1 ionice.1 readprofile.1 \ +-man_MANS = flock.1 readprofile.1 \ ++man_MANS = arch.1 flock.1 readprofile.1 \ ctrlaltdel.8 cytune.8 dmesg.1 ipcrm.1 ipcs.1 renice.1 \ setsid.1 tunelp.8 setarch.8 -Index: util-linux-ng-2.12r+git20070703/sys-utils/arch.1 +Index: util-linux-ng-2.13-rc1/sys-utils/arch.1 =================================================================== --- /dev/null -+++ util-linux-ng-2.12r+git20070703/sys-utils/arch.1 ++++ util-linux-ng-2.13-rc1/sys-utils/arch.1 @@ -0,0 +1,34 @@ +.\" arch.1 -- +.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) @@ -63,10 +63,10 @@ Index: util-linux-ng-2.12r+git20070703/sys-utils/arch.1 +.\" Then how come we get these i586 values? +.\" Well, the routine check_bugs() does system_utsname.machine[1] = '0' + x86; +.\" (called in init/main.c, defined in ./include/asm-i386/bugs.h) -Index: util-linux-ng-2.12r+git20070703/sys-utils/arch.c +Index: util-linux-ng-2.13-rc1/sys-utils/arch.c =================================================================== --- /dev/null -+++ util-linux-ng-2.12r+git20070703/sys-utils/arch.c ++++ util-linux-ng-2.13-rc1/sys-utils/arch.c @@ -0,0 +1,35 @@ +/* arch -- print machine architecture information + * Created: Mon Dec 20 12:27:15 1993 by faith@cs.unc.edu diff --git a/util-linux-2.13-sys_utils_build_rdev_x86_64.patch b/util-linux-2.13-sys_utils_build_rdev_x86_64.patch new file mode 100644 index 0000000..6e9381d --- /dev/null +++ b/util-linux-2.13-sys_utils_build_rdev_x86_64.patch @@ -0,0 +1,16 @@ +Index: util-linux-ng-2.13-rc1/sys-utils/Makefile.am +=================================================================== +--- util-linux-ng-2.13-rc1.orig/sys-utils/Makefile.am ++++ util-linux-ng-2.13-rc1/sys-utils/Makefile.am +@@ -26,6 +26,11 @@ usrsbinexec_PROGRAMS += rdev + man_MANS += rdev.8 ramsize.8 rootflags.8 vidmode.8 + RDEV_LINKS = ramsize vidmode rootflags + endif ++if ARCH_86_64 ++usrsbinexec_PROGRAMS += rdev ++man_MANS += rdev.8 ramsize.8 rootflags.8 vidmode.8 ++RDEV_LINKS = ramsize vidmode rootflags ++endif + endif + + SETARCH_LINKS = linux32 linux64 diff --git a/util-linux.changes b/util-linux.changes index e0a82da..0c51592 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Jul 5 16:08:58 CEST 2007 - mkoenig@suse.de + +- use %config(noreplace) for /etc/filesystems +- Keep rdev stuff for x86_64 + util-linux-2.13-sys_utils_build_rdev_x86_64.patch +- removed patches (merged upstream) + util-linux-2.12r-misc_utils_cal_formatting.patch + util-linux-2.12q-sys_utils_ionice.patch + ------------------------------------------------------------------- Thu Jul 5 11:59:30 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 615adac..2912ee7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD 3-Clause, GPL v2 or later Group: System/Base Autoreqprov: on Version: 2.12r+2.13rc1 -Release: 1 +Release: 2 %define upver 2.13-rc1 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 @@ -59,8 +59,6 @@ Patch6: util-linux-2.11z-hwclock_geteuid.patch Patch8: util-linux-2.12a-mount_procswapcheck.patch # 57097 (suse42097) - mount doesn't allow to mount files that have colons in their path Patch10: util-linux-2.12a-mount_mountpointwithcolon.patch -# add ionice -Patch14: util-linux-2.12q-sys_utils_ionice.patch # 104405 - mount -a doesn't work with hotpluggable devices Patch16: util-linux-mount_opt_hotplug.patch # 115129 - mount --move doesn't work as expected @@ -78,8 +76,6 @@ Patch26: util-linux-2.12r-mount_mount.8_xfs_update.patch Patch29: util-linux-2.12r-fdisk_cyl.patch # 179122 - Fix readprofile one ppc64 Patch30: util-linux-2.12r-sys_utils_readprofile_mapfile.patch -# 203469 -Patch31: util-linux-2.12r-misc_utils_cal_formatting.patch # 205956 - default swap to V1 in any case Patch32: util-linux-2.12r-disk_utils_mkswap_fix.patch # 238687 - let mkfs tools open block devices with O_EXCL @@ -91,6 +87,7 @@ Patch35: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch Patch40: util-linux-2.13-sys_utils_arch.patch Patch44: util-linux-2.13-schedutils_chrt.patch +Patch45: util-linux-2.13-sys_utils_build_rdev_x86_64.patch ## ## adjtimex ## @@ -130,7 +127,6 @@ Authors: %patch6 %patch8 -p1 %patch10 -p1 -%patch14 -p1 %patch16 -p1 %patch18 %patch21 @@ -138,13 +134,13 @@ Authors: %patch26 %patch29 -p1 %patch30 -p1 -%patch31 %patch32 -p1 %patch34 -p1 %patch35 -p1 #%patch38 -p1 %patch40 -p1 %patch44 -p1 +%patch45 -p1 # cd adjtimex-* %patch50 -p1 @@ -372,7 +368,7 @@ fi %doc README.largedisk %config %attr(744,root,root) /etc/init.d/raw %config(noreplace) %attr(644,root,root) /etc/raw -%config /etc/filesystems +%config(noreplace) /etc/filesystems /usr/sbin/rcraw /bin/arch /bin/dmesg @@ -535,7 +531,7 @@ fi /sbin/cfdisk /sbin/sfdisk %endif -%ifarch %ix86 +%ifarch %ix86 x86_64 /usr/sbin/ramsize /usr/sbin/rdev /usr/sbin/rootflags @@ -582,6 +578,13 @@ fi %changelog * Thu Jul 05 2007 - mkoenig@suse.de +- use %%config(noreplace) for /etc/filesystems +- Keep rdev stuff for x86_64 + util-linux-2.13-sys_utils_build_rdev_x86_64.patch +- removed patches (merged upstream) + util-linux-2.12r-misc_utils_cal_formatting.patch + util-linux-2.12q-sys_utils_ionice.patch +* Thu Jul 05 2007 - mkoenig@suse.de - update to 2.13-rc1: * mount fixes * agetty: add 'O' escape code to display domain name From 272a009533a2eb4041310ce3f8dacfb24266ec277bad1b1e5ebfde6e223d03ae Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 10 Jul 2007 12:48:28 +0000 Subject: [PATCH 022/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=22 --- util-linux.changes | 5 +++++ util-linux.spec | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index 0c51592..8b1af8d 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 9 11:34:33 CEST 2007 - mkoenig@suse.de + +- add libuuid-devel to BuildRequires to let mkswap use UUIDs + ------------------------------------------------------------------- Thu Jul 5 16:08:58 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 2912ee7..902fb40 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -11,7 +11,7 @@ # norootforbuild Name: util-linux -BuildRequires: gettext-devel libvolume_id-devel ncurses-devel pam-devel zlib-devel +BuildRequires: gettext-devel libuuid-devel libvolume_id-devel ncurses-devel pam-devel zlib-devel URL: http://kernel.org/pub/linux/utils/util-linux Provides: util rawio raw base schedutils Supplements: filesystem(minix) @@ -21,7 +21,7 @@ License: BSD 3-Clause, GPL v2 or later Group: System/Base Autoreqprov: on Version: 2.12r+2.13rc1 -Release: 2 +Release: 4 %define upver 2.13-rc1 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 @@ -577,6 +577,8 @@ fi #%endif %changelog +* Mon Jul 09 2007 - mkoenig@suse.de +- add libuuid-devel to BuildRequires to let mkswap use UUIDs * Thu Jul 05 2007 - mkoenig@suse.de - use %%config(noreplace) for /etc/filesystems - Keep rdev stuff for x86_64 From 64c755d2b1690426147a869ade3427a02d5cc1ae98dbbece32880b3a957893ac Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 13 Jul 2007 17:32:58 +0000 Subject: [PATCH 023/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=23 --- util-linux-2.11z-hwclock_geteuid.patch | 13 ---- util-linux-2.12q-mount_--move.patch | 30 --------- util-linux-mount_opt_hotplug.patch | 88 -------------------------- util-linux-mount_opt_nofail.patch | 61 ++++++++++++++++++ util-linux.changes | 11 ++++ util-linux.spec | 18 +++--- 6 files changed, 82 insertions(+), 139 deletions(-) delete mode 100644 util-linux-2.11z-hwclock_geteuid.patch delete mode 100644 util-linux-2.12q-mount_--move.patch delete mode 100644 util-linux-mount_opt_hotplug.patch create mode 100644 util-linux-mount_opt_nofail.patch diff --git a/util-linux-2.11z-hwclock_geteuid.patch b/util-linux-2.11z-hwclock_geteuid.patch deleted file mode 100644 index b022f41..0000000 --- a/util-linux-2.11z-hwclock_geteuid.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: hwclock/hwclock.c -=================================================================== ---- hwclock/hwclock.c.orig -+++ hwclock/hwclock.c -@@ -1480,7 +1480,7 @@ main(int argc, char **argv) { - show = 1; /* default to show */ - - -- if (getuid() == 0) -+ if (geteuid() == 0) - permitted = TRUE; - else { - /* program is designed to run setuid (in some situations) */ diff --git a/util-linux-2.12q-mount_--move.patch b/util-linux-2.12q-mount_--move.patch deleted file mode 100644 index 0b926d3..0000000 --- a/util-linux-2.12q-mount_--move.patch +++ /dev/null @@ -1,30 +0,0 @@ -Index: mount/mount.c -=================================================================== ---- mount/mount.c.orig -+++ mount/mount.c -@@ -760,6 +760,25 @@ update_mtab_entry(const char *spec, cons - else { - mntFILE *mfp; - -+ /* when moving a mount point, we have to make sure the mtab -+ * gets updated properly. We get info about the old mount -+ * point, copy it to the new mount point, and then delete -+ * the old mount point. */ -+ if (flags & MS_MOVE) { -+ const char *olddir = mnt.mnt_fsname; -+ struct mntentchn *oldmc = oldmc = getmntfile(olddir); -+ if (oldmc != NULL) { -+ mnt.mnt_fsname = strdup(oldmc->m.mnt_fsname); -+ mnt.mnt_type = oldmc->m.mnt_type; -+ mnt.mnt_opts = oldmc->m.mnt_opts; -+ mnt.mnt_freq = oldmc->m.mnt_freq; -+ mnt.mnt_passno = oldmc->m.mnt_passno; -+ } -+ update_mtab(olddir, NULL); -+ if (oldmc != NULL) -+ my_free(olddir); -+ } -+ - lock_mtab(); - mfp = my_setmntent(MOUNTED, "a+"); - if (mfp == NULL || mfp->mntent_fp == NULL) { diff --git a/util-linux-mount_opt_hotplug.patch b/util-linux-mount_opt_hotplug.patch deleted file mode 100644 index d979289..0000000 --- a/util-linux-mount_opt_hotplug.patch +++ /dev/null @@ -1,88 +0,0 @@ - mount/mount.8 | 7 +++++++ - mount/mount.c | 15 +++++++++++++-- - mount/mount_constants.h | 3 +++ - 3 files changed, 23 insertions(+), 2 deletions(-) - -Index: util-linux-ng-2.12r+git20070330/mount/mount.8 -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/mount.8 -+++ util-linux-ng-2.12r+git20070330/mount/mount.8 -@@ -572,6 +572,10 @@ This option implies the options - (unless overridden by subsequent options, as in the option line - .BR group,dev,suid ). - .TP -+.B hotplug -+Do not report errors for this device if it doesn't exist. -+.BR fcntl (2). -+.TP - .B mand - Allow mandatory locks on this filesystem. See - .BR fcntl (2). -@@ -602,6 +606,9 @@ Do not allow direct execution of any bin - (Until recently it was possible to run binaries anyway using a command like - /lib/ld*.so /mnt/binary. This trick fails since Linux 2.4.25 / 2.6.0.) - .TP -+.B nohotplug -+Report an error if the device does not exist. -+.TP - .B nomand - Do not allow mandatory locks on this filesystem. - .TP -Index: util-linux-ng-2.12r+git20070330/mount/mount.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/mount.c -+++ util-linux-ng-2.12r+git20070330/mount/mount.c -@@ -174,9 +174,14 @@ static const struct opt_map opt_map[] = - { "diratime", 0, 1, MS_NODIRATIME }, /* Update dir access times */ - { "nodiratime", 0, 0, MS_NODIRATIME },/* Do not update dir access times */ - #endif -+#ifdef MS_HOTPLUG -+ { "hotplug", 0, 0, MS_HOTPLUG }, /* Don't fail if ENOENT on dev */ -+#endif - { NULL, 0, 0, 0 } - }; - -+static int option_hotplug; /* can not invent our own MS_FLAGS */ -+ - static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, - *opt_speed, *opt_comment; - -@@ -269,6 +274,10 @@ parse_opt(const char *opt, int *mask, ch - - for (om = opt_map; om->opt != NULL; om++) - if (streq (opt, om->opt)) { -+ if (om->mask & MS_HOTPLUG) { -+ option_hotplug = 1; -+ return; -+ } - if (om->inv) - *mask &= ~om->mask; - else -@@ -985,9 +994,11 @@ retry_nfs: - else if (stat (node, &statbuf)) - error (_("mount: mount point %s is a symbolic link to nowhere"), - node); -- else if (stat (spec, &statbuf)) -+ else if (stat (spec, &statbuf)) { -+ if (option_hotplug) -+ goto out; - error (_("mount: special device %s does not exist"), spec); -- else { -+ } else { - errno = mnt_err; - perror("mount"); - } -Index: util-linux-ng-2.12r+git20070330/mount/mount_constants.h -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/mount_constants.h -+++ util-linux-ng-2.12r+git20070330/mount/mount_constants.h -@@ -57,6 +57,9 @@ if we have a stack or plain mount - moun - #ifndef MS_VERBOSE - #define MS_VERBOSE 0x8000 /* 32768 */ - #endif -+ -+#define MS_HOTPLUG (1<<18) /* Don't fail if ENOENT on the dev, mount internal */ -+ - /* - * Magic mount flag number. Had to be or-ed to the flag values. - */ diff --git a/util-linux-mount_opt_nofail.patch b/util-linux-mount_opt_nofail.patch new file mode 100644 index 0000000..a326a42 --- /dev/null +++ b/util-linux-mount_opt_nofail.patch @@ -0,0 +1,61 @@ +Do not fail on ENOENT + +Introduces a new mount option "nofail" which prevents mount +to fail if the device does not exist. + +Signed-off-by: Matthias Koenig + +Index: util-linux-ng-2.13-rc1/mount/mount.8 +=================================================================== +--- util-linux-ng-2.13-rc1.orig/mount/mount.8 ++++ util-linux-ng-2.13-rc1/mount/mount.8 +@@ -625,6 +625,9 @@ access on the news spool to speed up new + .B nodiratime + Do not update directory inode access times on this filesystem. + .TP ++.B nofail ++Do not report errors for this device if it does not exist. ++.TP + .B relatime + Update inode access times relative to modify or change time. Access + time is only updated if the previous access time was earlier than the +Index: util-linux-ng-2.13-rc1/mount/mount.c +=================================================================== +--- util-linux-ng-2.13-rc1.orig/mount/mount.c ++++ util-linux-ng-2.13-rc1/mount/mount.c +@@ -182,9 +182,12 @@ static const struct opt_map opt_map[] = + { "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard + to mtime/ctime */ + #endif ++ { "nofail", 0, 0, MS_COMMENT}, /* Do not fail if ENOENT on dev */ + { NULL, 0, 0, 0 } + }; + ++static int opt_nofail = 0; ++ + static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, + *opt_speed, *opt_comment, *opt_uhelper; + +@@ -389,6 +392,8 @@ parse_opt(char *opt, int *mask, char **e + verbose = 0; + } + #endif ++ if (streq(opt, "nofail")) ++ opt_nofail = 1; + return; + } + +@@ -1150,9 +1155,11 @@ try_mount_one (const char *spec0, const + else if (stat (node, &statbuf)) + error (_("mount: mount point %s is a symbolic link to nowhere"), + node); +- else if (stat (spec, &statbuf)) ++ else if (stat (spec, &statbuf)) { ++ if (opt_nofail) ++ goto out; + error (_("mount: special device %s does not exist"), spec); +- else { ++ } else { + errno = mnt_err; + perror("mount"); + } diff --git a/util-linux.changes b/util-linux.changes index 8b1af8d..e5b2d3e 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Jul 13 12:31:56 CEST 2007 - mkoenig@suse.de + +- replace hotplug with nofail option and fix it to not use + syscall reserved values. +- removed patch + util-linux-2.11z-hwclock_geteuid.patch + it is intentional that suid hwclock capabilities are limited +- removed patch (fixed upstream) + util-linux-2.12q-mount_--move.patch + ------------------------------------------------------------------- Mon Jul 9 11:34:33 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 902fb40..b92ee9b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD 3-Clause, GPL v2 or later Group: System/Base Autoreqprov: on Version: 2.12r+2.13rc1 -Release: 4 +Release: 6 %define upver 2.13-rc1 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 @@ -53,16 +53,12 @@ Patch1: util-linux-2.12-misc_utils_hostid.patch # 27181 (suse12181) - wall adds newlines Patch2: util-linux-login_utils_wall.patch Patch5: util-linux-mount_mount.8-acl.patch -# geteuid instead of getuid in hwclock to enable making hwclock suid root. -Patch6: util-linux-2.11z-hwclock_geteuid.patch # 54436 (suse39436) - boot.swap "failed" activating swap on LVM Patch8: util-linux-2.12a-mount_procswapcheck.patch # 57097 (suse42097) - mount doesn't allow to mount files that have colons in their path Patch10: util-linux-2.12a-mount_mountpointwithcolon.patch # 104405 - mount -a doesn't work with hotpluggable devices -Patch16: util-linux-mount_opt_hotplug.patch -# 115129 - mount --move doesn't work as expected -Patch18: util-linux-2.12q-mount_--move.patch +Patch16: util-linux-mount_opt_nofail.patch Patch21: util-linux-2.12q-mount_umount2_not_static.patch # 148409 - df, mount, /proc/mounts show root mounted twice # TODO: Needs fix, because of 231599 @@ -124,11 +120,9 @@ Authors: %patch1 -p1 %patch2 -p1 %patch5 -p0 -%patch6 %patch8 -p1 %patch10 -p1 %patch16 -p1 -%patch18 %patch21 %patch22 %patch26 @@ -577,6 +571,14 @@ fi #%endif %changelog +* Fri Jul 13 2007 - mkoenig@suse.de +- replace hotplug with nofail option and fix it to not use + syscall reserved values. +- removed patch + util-linux-2.11z-hwclock_geteuid.patch + it is intentional that suid hwclock capabilities are limited +- removed patch (fixed upstream) + util-linux-2.12q-mount_--move.patch * Mon Jul 09 2007 - mkoenig@suse.de - add libuuid-devel to BuildRequires to let mkswap use UUIDs * Thu Jul 05 2007 - mkoenig@suse.de From b320dd7d94899ba5bde6a5901d73b024e729df3afd0aea9e9c1f0df293c66228 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 18 Jul 2007 20:39:11 +0000 Subject: [PATCH 024/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=24 --- ...inux-2.12a-mount_mountpointwithcolon.patch | 23 ---- util-linux-2.12a-mount_procswapcheck.patch | 31 ------ ...linux-2.12q-mount_umount2_not_static.patch | 13 --- util-linux-2.12r-mount_mtab_update.patch | 19 ---- util-linux-2.13-schedutils_chrt.patch | 67 ----------- util-linux-2.13-schedutils_ionice_idle.patch | 55 +++++++++ util-linux-2.13-sys_utils_arch.patch | 105 ------------------ util-linux-login_utils_wall.patch | 13 --- util-linux-mount_mount.8-acl.patch | 39 ------- util-linux-ng-2.13-rc1.tar.bz2 | 3 - util-linux-ng-2.13-rc2.tar.bz2 | 3 + util-linux.changes | 17 +++ util-linux.spec | 57 +++++----- 13 files changed, 104 insertions(+), 341 deletions(-) delete mode 100644 util-linux-2.12a-mount_mountpointwithcolon.patch delete mode 100644 util-linux-2.12a-mount_procswapcheck.patch delete mode 100644 util-linux-2.12q-mount_umount2_not_static.patch delete mode 100644 util-linux-2.12r-mount_mtab_update.patch delete mode 100644 util-linux-2.13-schedutils_chrt.patch create mode 100644 util-linux-2.13-schedutils_ionice_idle.patch delete mode 100644 util-linux-2.13-sys_utils_arch.patch delete mode 100644 util-linux-login_utils_wall.patch delete mode 100644 util-linux-mount_mount.8-acl.patch delete mode 100644 util-linux-ng-2.13-rc1.tar.bz2 create mode 100644 util-linux-ng-2.13-rc2.tar.bz2 diff --git a/util-linux-2.12a-mount_mountpointwithcolon.patch b/util-linux-2.12a-mount_mountpointwithcolon.patch deleted file mode 100644 index 7b29286..0000000 --- a/util-linux-2.12a-mount_mountpointwithcolon.patch +++ /dev/null @@ -1,23 +0,0 @@ -Index: util-linux-ng-2.12r+git20070330/mount/mount.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/mount.c -+++ util-linux-ng-2.12r+git20070330/mount/mount.c -@@ -1207,11 +1207,15 @@ mount_one (const char *spec, const char - - if (types == NULL && !mounttype && !is_existing_file(spec)) { - if (strchr (spec, ':') != NULL) { -- types = "nfs"; -- if (verbose) -- printf(_("mount: no type was given - " -+ types = fsprobe_get_fstype_by_devname(spec); -+ if(types == NULL) { -+ types = "nfs"; -+ if (verbose) { -+ printf(_("mount: no type was given - " - "I'll assume nfs because of " - "the colon\n")); -+ } -+ } - } else if(!strncmp(spec, "//", 2)) { - types = "cifs"; - if (verbose) diff --git a/util-linux-2.12a-mount_procswapcheck.patch b/util-linux-2.12a-mount_procswapcheck.patch deleted file mode 100644 index 43f0e9d..0000000 --- a/util-linux-2.12a-mount_procswapcheck.patch +++ /dev/null @@ -1,31 +0,0 @@ -Index: util-linux-ng-2.12r+git20070330/mount/swapon.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/swapon.c -+++ util-linux-ng-2.12r+git20070330/mount/swapon.c -@@ -138,6 +138,7 @@ static int - is_in_proc_swaps(const char *fname) { - int i; - char canonical[PATH_MAX + 2]; -+ struct stat stfname, stswapFile; - - if (!myrealpath(fname, canonical, PATH_MAX + 1)) { - fprintf(stderr, _("%s: cannot canonicalize %s: %s\n"), -@@ -146,9 +147,15 @@ is_in_proc_swaps(const char *fname) { - *(canonical + (PATH_MAX + 1)) = '\0'; - } - -- for (i = 0; i < numSwaps; i++) -- if (swapFiles[i] && !strcmp(canonical, swapFiles[i])) -- return 1; -+ for (i = 0; i < numSwaps; i++) { -+ if(S_ISBLK(stfname.st_mode)) { -+ stat(swapFiles[i], &stswapFile); -+ if(S_ISBLK(stswapFile.st_mode)) -+ if(stfname.st_rdev == stswapFile.st_rdev) -+ return 1; -+ } else if (swapFiles[i] && !strcmp(canonical, swapFiles[i])) -+ return 1; -+ } - return 0; - } - diff --git a/util-linux-2.12q-mount_umount2_not_static.patch b/util-linux-2.12q-mount_umount2_not_static.patch deleted file mode 100644 index 6dead01..0000000 --- a/util-linux-2.12q-mount_umount2_not_static.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: mount/umount.c -=================================================================== ---- mount/umount.c.orig -+++ mount/umount.c -@@ -38,7 +38,7 @@ - #include - #ifdef __NR_umount2 - --static int umount2(const char *path, int flags); -+int umount2(const char *path, int flags); - - _syscall2(int, umount2, const char *, path, int, flags); - diff --git a/util-linux-2.12r-mount_mtab_update.patch b/util-linux-2.12r-mount_mtab_update.patch deleted file mode 100644 index 6b9b97b..0000000 --- a/util-linux-2.12r-mount_mtab_update.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: mount/mount.c -=================================================================== ---- mount/mount.c.orig -+++ mount/mount.c -@@ -1112,9 +1112,13 @@ try_mount_one (const char *spec0, const - } - - if (fake || mnt5_res == 0) { -+ int isroot; -+ - /* Mount succeeded, report this (if verbose) and write mtab entry. */ -+ isroot = (streq(node, "/") || streq(node, "root") || -+ streq(node, "rootfs")); - -- if (!(mounttype & MS_PROPAGATION)) { -+ if (!(mounttype & MS_PROPAGATION) && !isroot) { - update_mtab_entry(loop ? loopfile : spec, - node, - types ? types : "unknown", diff --git a/util-linux-2.13-schedutils_chrt.patch b/util-linux-2.13-schedutils_chrt.patch deleted file mode 100644 index b1a01b1..0000000 --- a/util-linux-2.13-schedutils_chrt.patch +++ /dev/null @@ -1,67 +0,0 @@ -Index: util-linux-ng-2.12r+git20070530/schedutils/chrt.1 -=================================================================== ---- util-linux-ng-2.12r+git20070530.orig/schedutils/chrt.1 -+++ util-linux-ng-2.12r+git20070530/schedutils/chrt.1 -@@ -79,13 +79,13 @@ output version information and exit - .SH USAGE - .TP - The default behavior is to run a new command:: --chrt [prio] [command] [arguments] -+chrt prio command [arguments] - .TP - You can also retrieve the real-time attributes of an existing task: --chrt -p [pid] -+chrt -p pid - .TP - Or set them: --chrt -p [prio] [pid] -+chrt -p prio pid - .SH PERMISSIONS - A user must possess - .BR CAP_SYS_NICE -Index: util-linux-ng-2.12r+git20070530/schedutils/chrt.c -=================================================================== ---- util-linux-ng-2.12r+git20070530.orig/schedutils/chrt.c -+++ util-linux-ng-2.12r+git20070530/schedutils/chrt.c -@@ -46,7 +46,7 @@ static void show_usage(const char *cmd) - fprintf(stderr, " -b, --batch " - "set policy to SCHED_BATCH\n"); - fprintf(stderr, " -f, --fifo " -- "set policy to SCHED_FF\n"); -+ "set policy to SCHED_FIFO\n"); - fprintf(stderr, " -p, --pid " - "operate on existing given pid\n"); - fprintf(stderr, " -m, --max " -@@ -146,7 +146,7 @@ int main(int argc, char *argv[]) - { - int i, policy = SCHED_RR, priority = 0, verbose = 0; - struct sched_param sp; -- pid_t pid = 0; -+ pid_t pid = -1; - - struct option longopts[] = { - { "batch", 0, NULL, 'b' }, -@@ -205,12 +205,12 @@ int main(int argc, char *argv[]) - - } - -- if ((pid && argc - optind < 1) || (!pid && argc - optind < 2)) { -+ if (((pid > -1) && argc - optind < 1) || ((pid == -1) && argc - optind < 2)) { - show_usage(argv[0]); - return 1; - } - -- if (pid && (verbose || argc - optind == 1)) { -+ if ((pid > -1) && (verbose || argc - optind == 1)) { - show_rt_info("current", pid); - if (argc - optind == 1) - return 0; -@@ -224,6 +224,8 @@ int main(int argc, char *argv[]) - return 1; - } - -+ if (pid == -1) -+ pid = 0; - sp.sched_priority = priority; - if (sched_setscheduler(pid, policy, &sp) == -1) { - perror("sched_setscheduler"); diff --git a/util-linux-2.13-schedutils_ionice_idle.patch b/util-linux-2.13-schedutils_ionice_idle.patch new file mode 100644 index 0000000..e60ab55 --- /dev/null +++ b/util-linux-2.13-schedutils_ionice_idle.patch @@ -0,0 +1,55 @@ +From 19ab897e353f5a418590e2dcc07b91c3610f08bf Mon Sep 17 00:00:00 2001 +From: Matthias Koenig +Date: Tue, 17 Jul 2007 14:58:42 +0200 +Subject: [PATCH] schedutils: cleanup ionice usage for idle class + +The idle class has no class data. It will print a warning if +a prio argument is given for it, since this will be ignored. +Output for idle class will not contain prio data. + +Signed-off-by: Matthias Koenig +--- + schedutils/ionice.c | 13 +++++++++---- + 1 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/schedutils/ionice.c b/schedutils/ionice.c +index ac72121..2d23dd0 100644 +--- a/schedutils/ionice.c ++++ b/schedutils/ionice.c +@@ -95,11 +95,11 @@ int main(int argc, char *argv[]) + switch (c) { + case 'n': + ioprio = strtol(optarg, NULL, 10); +- set = 1; ++ set |= 1; + break; + case 'c': + ioprio_class = strtol(optarg, NULL, 10); +- set = 1; ++ set |= 2; + break; + case 'p': + pid = strtol(optarg, NULL, 10); +@@ -119,6 +119,8 @@ int main(int argc, char *argv[]) + case IOPRIO_CLASS_BE: + break; + case IOPRIO_CLASS_IDLE: ++ if (set & 1) ++ printf("Ignoring given class data for idle class\n"); + ioprio = 7; + break; + default: +@@ -136,8 +138,11 @@ int main(int argc, char *argv[]) + perror("ioprio_get"); + else { + ioprio_class = ioprio >> IOPRIO_CLASS_SHIFT; +- ioprio = ioprio & 0xff; +- printf("%s: prio %d\n", to_prio[ioprio_class], ioprio); ++ if (ioprio_class != IOPRIO_CLASS_IDLE) { ++ ioprio = ioprio & 0xff; ++ printf("%s: prio %d\n", to_prio[ioprio_class], ioprio); ++ } else ++ printf("%s\n", to_prio[ioprio_class]); + } + } else { + if (ioprio_set(IOPRIO_WHO_PROCESS, pid, ioprio | ioprio_class << IOPRIO_CLASS_SHIFT) == -1) { diff --git a/util-linux-2.13-sys_utils_arch.patch b/util-linux-2.13-sys_utils_arch.patch deleted file mode 100644 index 4ee47c8..0000000 --- a/util-linux-2.13-sys_utils_arch.patch +++ /dev/null @@ -1,105 +0,0 @@ -Index: util-linux-ng-2.13-rc1/sys-utils/Makefile.am -=================================================================== ---- util-linux-ng-2.13-rc1.orig/sys-utils/Makefile.am -+++ util-linux-ng-2.13-rc1/sys-utils/Makefile.am -@@ -1,9 +1,11 @@ - include $(top_srcdir)/config/include-Makefile.am - --bin_PROGRAMS = dmesg -+bin_PROGRAMS = arch dmesg - - usrbinexec_PROGRAMS = cytune flock ipcrm ipcs renice setsid setarch - -+arch_SOURCES = arch.c -+ - cytune_SOURCES = cytune.c cyclades.h - - sbin_PROGRAMS = ctrlaltdel -@@ -12,7 +14,7 @@ usrsbinexec_PROGRAMS = readprofile tunel - - tunelp_SOURCES = tunelp.c lp.h - --man_MANS = flock.1 readprofile.1 \ -+man_MANS = arch.1 flock.1 readprofile.1 \ - ctrlaltdel.8 cytune.8 dmesg.1 ipcrm.1 ipcs.1 renice.1 \ - setsid.1 tunelp.8 setarch.8 - -Index: util-linux-ng-2.13-rc1/sys-utils/arch.1 -=================================================================== ---- /dev/null -+++ util-linux-ng-2.13-rc1/sys-utils/arch.1 -@@ -0,0 +1,34 @@ -+.\" arch.1 -- -+.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) -+.\" Public domain: may be freely distributed. -+.TH ARCH 1 "4 July 1997" "Linux 2.0" "Linux Programmer's Manual" -+.SH NAME -+arch \- print machine architecture -+.SH SYNOPSIS -+.B arch -+.SH DESCRIPTION -+.B arch -+is equivalent to -+.BR "uname -m" . -+ -+On current Linux systems, -+.B arch -+prints things such as "i386", "i486", "i586", "alpha", "sparc", -+"arm", "m68k", "mips", "ppc". -+.SH SEE ALSO -+.BR uname (1), -+.BR uname (2) -+.\" -+.\" Details: -+.\" arch prints the machine part of the system_utsname struct -+.\" This struct is defined in version.c, and this field is -+.\" initialized with UTS_MACHINE, which is defined as $ARCH -+.\" in the main Makefile. -+.\" That gives the possibilities -+.\" alpha arm i386 m68k mips ppc sparc sparc64 -+.\" -+.\" If Makefile is not edited, ARCH is guessed by -+.\" ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/) -+.\" Then how come we get these i586 values? -+.\" Well, the routine check_bugs() does system_utsname.machine[1] = '0' + x86; -+.\" (called in init/main.c, defined in ./include/asm-i386/bugs.h) -Index: util-linux-ng-2.13-rc1/sys-utils/arch.c -=================================================================== ---- /dev/null -+++ util-linux-ng-2.13-rc1/sys-utils/arch.c -@@ -0,0 +1,35 @@ -+/* arch -- print machine architecture information -+ * Created: Mon Dec 20 12:27:15 1993 by faith@cs.unc.edu -+ * Revised: Mon Dec 20 12:29:23 1993 by faith@cs.unc.edu -+ * Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) -+ -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the -+ * Free Software Foundation; either version 2, or (at your option) any -+ * later version. -+ -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ -+ * You should have received a copy of the GNU General Public License along -+ * with this program; if not, write to the Free Software Foundation, Inc., -+ * 675 Mass Ave, Cambridge, MA 02139, USA. */ -+ -+#include -+#include -+ -+int main (void) -+{ -+ struct utsname utsbuf; -+ -+ if (uname( &utsbuf )) { -+ perror( "arch" ); -+ return 1; -+ } -+ -+ printf( "%s\n", utsbuf.machine ); -+ -+ return 0; -+} diff --git a/util-linux-login_utils_wall.patch b/util-linux-login_utils_wall.patch deleted file mode 100644 index 619ed13..0000000 --- a/util-linux-login_utils_wall.patch +++ /dev/null @@ -1,13 +0,0 @@ -remove unwanted newline (#12181) - ---- util-linux-2.12q/login-utils/wall.c -+++ util-linux-2.12q/login-utils/wall.c -@@ -217,8 +217,6 @@ - if (cnt == 79 || ch == '\n') { - for (; cnt < 79; ++cnt) - putc(' ', fp); -- putc('\r', fp); -- putc('\n', fp); - cnt = 0; - } - carefulputc(ch, fp); diff --git a/util-linux-mount_mount.8-acl.patch b/util-linux-mount_mount.8-acl.patch deleted file mode 100644 index 83402f6..0000000 --- a/util-linux-mount_mount.8-acl.patch +++ /dev/null @@ -1,39 +0,0 @@ -Index: mount/mount.8 -================================================================================ ---- mount/mount.8 -+++ mount/mount.8 -@@ -943,6 +943,17 @@ - Sync all data and metadata every - .I nrsec - seconds. The default value is 5 seconds. Zero means default. -+.RE -+.TP -+.BR user_xattr -+Enable Extended User Attributes. See the -+.BR attr (5) -+manual page. -+.TP -+.BR acl -+Enable POSIX Access Control Lists. See the -+.BR acl (5) -+manual page. - - .SH "Mount options for fat" - (Note: -@@ -1495,6 +1506,16 @@ - .I resizer - utility which can be obtained from - .IR ftp://ftp.namesys.com/pub/reiserfsprogs . -+.TP -+.BR user_xattr -+Enable Extended User Attributes. See the -+.BR attr (5) -+manual page. -+.TP -+.BR acl -+Enable POSIX Access Control Lists. See the -+.BR acl (5) -+manual page. - - .SH "Mount options for romfs" - None. diff --git a/util-linux-ng-2.13-rc1.tar.bz2 b/util-linux-ng-2.13-rc1.tar.bz2 deleted file mode 100644 index e2615da..0000000 --- a/util-linux-ng-2.13-rc1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e0aeb0b619e19fdf0fe154784644215e1c4f3d4352173e94724c68401dbd8567 -size 2784788 diff --git a/util-linux-ng-2.13-rc2.tar.bz2 b/util-linux-ng-2.13-rc2.tar.bz2 new file mode 100644 index 0000000..d8dea66 --- /dev/null +++ b/util-linux-ng-2.13-rc2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:832e2bd4a0b4eb03589cc8a655603b12fd6734081de140e07016f1aea949598c +size 2654222 diff --git a/util-linux.changes b/util-linux.changes index e5b2d3e..740ccf0 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Tue Jul 17 10:44:18 CEST 2007 - mkoenig@suse.de + +- updated to version 2.13-rc2: + * add wakertc +- cleanup ionice usage [#270251] +- enable hwclock audit support [#280113] +- removed patches (merged/fixed upstream) + util-linux-login_utils_wall.patch + util-linux-mount_mount.8-acl.patch + util-linux-2.12r-mount_mtab_update.patch + util-linux-2.13-schedutils_chrt.patch + util-linux-2.13-sys_utils_arch.patch + util-linux-2.12a-mount_mountpointwithcolon.patch + util-linux-2.12a-mount_procswapcheck.patch + util-linux-2.12q-mount_umount2_not_static.patch + ------------------------------------------------------------------- Fri Jul 13 12:31:56 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index b92ee9b..30d5d68 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.12r+2.13rc1) +# spec file for package util-linux (Version 2.12r+2.13rc2) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,7 +11,7 @@ # norootforbuild Name: util-linux -BuildRequires: gettext-devel libuuid-devel libvolume_id-devel ncurses-devel pam-devel zlib-devel +BuildRequires: audit-devel gettext-devel libuuid-devel libvolume_id-devel ncurses-devel pam-devel zlib-devel URL: http://kernel.org/pub/linux/utils/util-linux Provides: util rawio raw base schedutils Supplements: filesystem(minix) @@ -20,9 +20,9 @@ PreReq: %install_info_prereq permissions License: BSD 3-Clause, GPL v2 or later Group: System/Base Autoreqprov: on -Version: 2.12r+2.13rc1 -Release: 6 -%define upver 2.13-rc1 +Version: 2.12r+2.13rc2 +Release: 1 +%define upver 2.13-rc2 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 Source2: nologin.c @@ -48,21 +48,11 @@ Source30: README.largedisk ## ## util-linux ## +# # add hostid Patch1: util-linux-2.12-misc_utils_hostid.patch -# 27181 (suse12181) - wall adds newlines -Patch2: util-linux-login_utils_wall.patch -Patch5: util-linux-mount_mount.8-acl.patch -# 54436 (suse39436) - boot.swap "failed" activating swap on LVM -Patch8: util-linux-2.12a-mount_procswapcheck.patch -# 57097 (suse42097) - mount doesn't allow to mount files that have colons in their path -Patch10: util-linux-2.12a-mount_mountpointwithcolon.patch # 104405 - mount -a doesn't work with hotpluggable devices Patch16: util-linux-mount_opt_nofail.patch -Patch21: util-linux-2.12q-mount_umount2_not_static.patch -# 148409 - df, mount, /proc/mounts show root mounted twice -# TODO: Needs fix, because of 231599 -Patch22: util-linux-2.12r-mount_mtab_update.patch # 176582 - If the user doesn't specify -t mount.fstype will never be called #TODO: check alternative upstream fix #Patch96: util-linux-2.12r-mount_external_prog_on_guess.patch @@ -70,7 +60,7 @@ Patch22: util-linux-2.12r-mount_mtab_update.patch Patch26: util-linux-2.12r-mount_mount.8_xfs_update.patch # 160822 - fix for 153657 Patch29: util-linux-2.12r-fdisk_cyl.patch -# 179122 - Fix readprofile one ppc64 +# 179122 - Fix readprofile on ppc64 Patch30: util-linux-2.12r-sys_utils_readprofile_mapfile.patch # 205956 - default swap to V1 in any case Patch32: util-linux-2.12r-disk_utils_mkswap_fix.patch @@ -81,9 +71,9 @@ Patch35: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # 254437 - swapon should automatically reset the suspend signature # TODO: Needs to be ported to new version Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch -Patch40: util-linux-2.13-sys_utils_arch.patch -Patch44: util-linux-2.13-schedutils_chrt.patch +# suse48633 - util-linux on x86_64 does not contain "rdev" and "vidmode" Patch45: util-linux-2.13-sys_utils_build_rdev_x86_64.patch +Patch46: util-linux-2.13-schedutils_ionice_idle.patch ## ## adjtimex ## @@ -118,13 +108,7 @@ Authors: %prep %setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%upver %patch1 -p1 -%patch2 -p1 -%patch5 -p0 -%patch8 -p1 -%patch10 -p1 %patch16 -p1 -%patch21 -%patch22 %patch26 %patch29 -p1 %patch30 -p1 @@ -132,9 +116,8 @@ Authors: %patch34 -p1 %patch35 -p1 #%patch38 -p1 -%patch40 -p1 -%patch44 -p1 %patch45 -p1 +%patch46 -p1 # cd adjtimex-* %patch50 -p1 @@ -203,12 +186,14 @@ autoreconf -fi ./configure --mandir=%{_mandir} \ --datadir=%{_datadir} \ --with-fsprobe=volume_id \ + --with-audit \ --enable-elvtune \ --enable-mesg \ --enable-partx \ --enable-raw \ --enable-rdev \ --enable-write \ + --enable-arch \ --disable-use-tty-group \ CFLAGS="$CFLAGS $RPM_OPT_FLAGS" make @@ -427,6 +412,7 @@ fi /usr/sbin/delpart /usr/sbin/freeramdisk /usr/sbin/partx +/usr/sbin/rtcwake /usr/sbin/setctsid %verify(not mode) %attr(0755,root,tty) /usr/bin/wall /usr/bin/whereis @@ -500,6 +486,7 @@ fi %{_mandir}/man8/partx.8.gz %{_mandir}/man8/pivot_root.8.gz %{_mandir}/man8/raw.8.gz +%{_mandir}/man8/rtcwake.8.gz #%{_mandir}/man8/setarch.8.gz %{_mandir}/man8/swapoff.8.gz %{_mandir}/man8/swapon.8.gz @@ -512,7 +499,7 @@ fi %attr (755,root,root) /usr/share/getopt/getopt-parse.tcsh %attr (755,root,root) /usr/share/getopt/getopt-test.bash %attr (755,root,root) /usr/share/getopt/getopt-test.tcsh -/usr/share/locale/*/LC_MESSAGES/util-linux-ng.mo +#/usr/share/locale/*/LC_MESSAGES/util-linux-ng.mo %ifnarch ia64 %doc fdisk/README.fdisk /sbin/fdisk @@ -571,6 +558,20 @@ fi #%endif %changelog +* Tue Jul 17 2007 - mkoenig@suse.de +- updated to version 2.13-rc2: + * add wakertc +- cleanup ionice usage [#270251] +- enable hwclock audit support [#280113] +- removed patches (merged/fixed upstream) + util-linux-login_utils_wall.patch + util-linux-mount_mount.8-acl.patch + util-linux-2.12r-mount_mtab_update.patch + util-linux-2.13-schedutils_chrt.patch + util-linux-2.13-sys_utils_arch.patch + util-linux-2.12a-mount_mountpointwithcolon.patch + util-linux-2.12a-mount_procswapcheck.patch + util-linux-2.12q-mount_umount2_not_static.patch * Fri Jul 13 2007 - mkoenig@suse.de - replace hotplug with nofail option and fix it to not use syscall reserved values. From 2d8c2dea2ed759ce14311f781ea30a1b0d37b744a2a340d3092d4b34ea5cbc1b Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 27 Jul 2007 00:13:19 +0000 Subject: [PATCH 025/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=25 --- util-linux-2.12r-disk_utils_mkswap_fix.patch | 17 ------ ...linux-2.12r-mount_mount.8_xfs_update.patch | 17 ------ ...-2.12r-sys_utils_readprofile_mapfile.patch | 45 --------------- util-linux-2.13-schedutils_ionice_idle.patch | 55 ------------------- util-linux-ng-2.13-rc2.tar.bz2 | 3 - util-linux-ng-2.13rc2+git20070725.tar.bz2 | 3 + util-linux.changes | 10 ++++ util-linux.spec | 32 +++++------ 8 files changed, 29 insertions(+), 153 deletions(-) delete mode 100644 util-linux-2.12r-disk_utils_mkswap_fix.patch delete mode 100644 util-linux-2.12r-mount_mount.8_xfs_update.patch delete mode 100644 util-linux-2.12r-sys_utils_readprofile_mapfile.patch delete mode 100644 util-linux-2.13-schedutils_ionice_idle.patch delete mode 100644 util-linux-ng-2.13-rc2.tar.bz2 create mode 100644 util-linux-ng-2.13rc2+git20070725.tar.bz2 diff --git a/util-linux-2.12r-disk_utils_mkswap_fix.patch b/util-linux-2.12r-disk_utils_mkswap_fix.patch deleted file mode 100644 index 058dd2c..0000000 --- a/util-linux-2.12r-disk_utils_mkswap_fix.patch +++ /dev/null @@ -1,17 +0,0 @@ -default swap to V1 in any case [#205956] - -Index: util-linux-ng-2.12r+git20070330/disk-utils/mkswap.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/disk-utils/mkswap.c -+++ util-linux-ng-2.12r+git20070330/disk-utils/mkswap.c -@@ -617,9 +617,7 @@ main(int argc, char ** argv) { - version = 1; - else - /* use version 1 as default, if possible */ -- if (PAGES <= V0_MAX_PAGES && PAGES > V1_MAX_PAGES) -- version = 0; -- else if (linux_version_code() < MAKE_VERSION(2,1,117)) -+ if (linux_version_code() < MAKE_VERSION(2,1,117)) - version = 0; - else if (pagesize < 2048) - version = 0; diff --git a/util-linux-2.12r-mount_mount.8_xfs_update.patch b/util-linux-2.12r-mount_mount.8_xfs_update.patch deleted file mode 100644 index 612ce76..0000000 --- a/util-linux-2.12r-mount_mount.8_xfs_update.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: mount/mount.8 -=================================================================== ---- mount/mount.8.orig -+++ mount/mount.8 -@@ -1841,6 +1841,12 @@ system call. - .TP - .B dmapi " / " xdsm - Enable the DMAPI (Data Management API) event callouts. -+Use with the "mtpt" option. -+.TP -+.BI mtpt= mountpoint -+Use with the "dmapi" option. The value specified here will be -+included in the DMAPI mount event, and should be the path of -+the actual mountpoint that is used. - .TP - .BI logbufs= value - Set the number of in-memory log buffers. diff --git a/util-linux-2.12r-sys_utils_readprofile_mapfile.patch b/util-linux-2.12r-sys_utils_readprofile_mapfile.patch deleted file mode 100644 index 810b440..0000000 --- a/util-linux-2.12r-sys_utils_readprofile_mapfile.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -ruNp util-linux-2.12r/sys-utils/readprofile.c util-linux-2.12r.fix/sys-utils/readprofile.c ---- util-linux-2.12r/sys-utils/readprofile.c 2004-12-11 11:11:09.000000000 +1100 -+++ util-linux-2.12r.fix/sys-utils/readprofile.c 2006-05-19 17:45:56.000000000 +1000 -@@ -324,6 +324,7 @@ main(int argc, char **argv) { - */ - while (fgets(mapline,S_LEN,map)) { - unsigned int this=0; -+ int done = 0; - - if (sscanf(mapline,"%llx %s %s",&next_add,mode,next_name)!=3) { - fprintf(stderr,_("%s: %s(%i): wrong map line\n"), -@@ -332,12 +333,17 @@ main(int argc, char **argv) { - } - header_printed = 0; - -- /* ignore any LEADING (before a '[tT]' symbol is found) -- Absolute symbols */ -- if ((*mode == 'A' || *mode == '?') && total == 0) continue; -- if (*mode != 'T' && *mode != 't' && -- *mode != 'W' && *mode != 'w') -- break; /* only text is profiled */ -+ /* the kernel only profiles up to _etext */ -+ if (!strcmp(next_name, "_etext")) -+ done = 1; -+ else { -+ /* ignore any LEADING (before a '[tT]' symbol is found) -+ Absolute symbols */ -+ if ((*mode == 'A' || *mode == '?') && total == 0) continue; -+ if (*mode != 'T' && *mode != 't' && -+ *mode != 'W' && *mode != 'w') -+ break; /* only text is profiled */ -+ } - - if (indx >= len / sizeof(*buf)) { - fprintf(stderr, _("%s: profile address out of range. " -@@ -387,6 +393,8 @@ main(int argc, char **argv) { - strcpy(fn_name,next_name); - - maplineno++; -+ if (done) -+ break; - } - - /* clock ticks, out of kernel text - probably modules */ - diff --git a/util-linux-2.13-schedutils_ionice_idle.patch b/util-linux-2.13-schedutils_ionice_idle.patch deleted file mode 100644 index e60ab55..0000000 --- a/util-linux-2.13-schedutils_ionice_idle.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 19ab897e353f5a418590e2dcc07b91c3610f08bf Mon Sep 17 00:00:00 2001 -From: Matthias Koenig -Date: Tue, 17 Jul 2007 14:58:42 +0200 -Subject: [PATCH] schedutils: cleanup ionice usage for idle class - -The idle class has no class data. It will print a warning if -a prio argument is given for it, since this will be ignored. -Output for idle class will not contain prio data. - -Signed-off-by: Matthias Koenig ---- - schedutils/ionice.c | 13 +++++++++---- - 1 files changed, 9 insertions(+), 4 deletions(-) - -diff --git a/schedutils/ionice.c b/schedutils/ionice.c -index ac72121..2d23dd0 100644 ---- a/schedutils/ionice.c -+++ b/schedutils/ionice.c -@@ -95,11 +95,11 @@ int main(int argc, char *argv[]) - switch (c) { - case 'n': - ioprio = strtol(optarg, NULL, 10); -- set = 1; -+ set |= 1; - break; - case 'c': - ioprio_class = strtol(optarg, NULL, 10); -- set = 1; -+ set |= 2; - break; - case 'p': - pid = strtol(optarg, NULL, 10); -@@ -119,6 +119,8 @@ int main(int argc, char *argv[]) - case IOPRIO_CLASS_BE: - break; - case IOPRIO_CLASS_IDLE: -+ if (set & 1) -+ printf("Ignoring given class data for idle class\n"); - ioprio = 7; - break; - default: -@@ -136,8 +138,11 @@ int main(int argc, char *argv[]) - perror("ioprio_get"); - else { - ioprio_class = ioprio >> IOPRIO_CLASS_SHIFT; -- ioprio = ioprio & 0xff; -- printf("%s: prio %d\n", to_prio[ioprio_class], ioprio); -+ if (ioprio_class != IOPRIO_CLASS_IDLE) { -+ ioprio = ioprio & 0xff; -+ printf("%s: prio %d\n", to_prio[ioprio_class], ioprio); -+ } else -+ printf("%s\n", to_prio[ioprio_class]); - } - } else { - if (ioprio_set(IOPRIO_WHO_PROCESS, pid, ioprio | ioprio_class << IOPRIO_CLASS_SHIFT) == -1) { diff --git a/util-linux-ng-2.13-rc2.tar.bz2 b/util-linux-ng-2.13-rc2.tar.bz2 deleted file mode 100644 index d8dea66..0000000 --- a/util-linux-ng-2.13-rc2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:832e2bd4a0b4eb03589cc8a655603b12fd6734081de140e07016f1aea949598c -size 2654222 diff --git a/util-linux-ng-2.13rc2+git20070725.tar.bz2 b/util-linux-ng-2.13rc2+git20070725.tar.bz2 new file mode 100644 index 0000000..bd0e5e3 --- /dev/null +++ b/util-linux-ng-2.13rc2+git20070725.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74640e1af0289d3be9397c8a7c8b62f147a3dbfad232fd4a7ec15a41e9ac1cf8 +size 1544622 diff --git a/util-linux.changes b/util-linux.changes index 740ccf0..d2ca0cc 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Jul 25 18:43:42 CEST 2007 - mkoenig@suse.de + +- update to git20070725 +- removed patches (merged upstream): + util-linux-2.12r-mount_mount.8_xfs_update.patch + util-linux-2.12r-sys_utils_readprofile_mapfile.patch + util-linux-2.12r-disk_utils_mkswap_fix.patch + util-linux-2.13-schedutils_ionice_idle.patch + ------------------------------------------------------------------- Tue Jul 17 10:44:18 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 30d5d68..3fe37cb 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.12r+2.13rc2) +# spec file for package util-linux (Version 2.12r+2.13rc2+git20070725) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -20,9 +20,9 @@ PreReq: %install_info_prereq permissions License: BSD 3-Clause, GPL v2 or later Group: System/Base Autoreqprov: on -Version: 2.12r+2.13rc2 +Version: 2.12r+2.13rc2+git20070725 Release: 1 -%define upver 2.13-rc2 +%define upver 2.13rc2+git20070725 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 Source2: nologin.c @@ -56,14 +56,8 @@ Patch16: util-linux-mount_opt_nofail.patch # 176582 - If the user doesn't specify -t mount.fstype will never be called #TODO: check alternative upstream fix #Patch96: util-linux-2.12r-mount_external_prog_on_guess.patch -# 158955 - document xfs dmapi mount options better -Patch26: util-linux-2.12r-mount_mount.8_xfs_update.patch # 160822 - fix for 153657 Patch29: util-linux-2.12r-fdisk_cyl.patch -# 179122 - Fix readprofile on ppc64 -Patch30: util-linux-2.12r-sys_utils_readprofile_mapfile.patch -# 205956 - default swap to V1 in any case -Patch32: util-linux-2.12r-disk_utils_mkswap_fix.patch # 238687 - let mkfs tools open block devices with O_EXCL Patch34: util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch # 241372 - remove legacy warnings from fdisk @@ -73,7 +67,6 @@ Patch35: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch # suse48633 - util-linux on x86_64 does not contain "rdev" and "vidmode" Patch45: util-linux-2.13-sys_utils_build_rdev_x86_64.patch -Patch46: util-linux-2.13-schedutils_ionice_idle.patch ## ## adjtimex ## @@ -109,15 +102,15 @@ Authors: %setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%upver %patch1 -p1 %patch16 -p1 -%patch26 +#%patch26 %patch29 -p1 -%patch30 -p1 -%patch32 -p1 +#%patch30 -p1 +#%patch32 -p1 %patch34 -p1 %patch35 -p1 #%patch38 -p1 %patch45 -p1 -%patch46 -p1 +#%patch46 -p1 # cd adjtimex-* %patch50 -p1 @@ -181,8 +174,8 @@ make setctsid CFLAGS="$RPM_OPT_FLAGS" CFLAGS=-DCONFIG_SMP %endif # Use autogen, when building from git tree -autoreconf -fi -#./autogen.sh +#autoreconf -fi +./autogen.sh ./configure --mandir=%{_mandir} \ --datadir=%{_datadir} \ --with-fsprobe=volume_id \ @@ -558,6 +551,13 @@ fi #%endif %changelog +* Wed Jul 25 2007 - mkoenig@suse.de +- update to git20070725 +- removed patches (merged upstream): + util-linux-2.12r-mount_mount.8_xfs_update.patch + util-linux-2.12r-sys_utils_readprofile_mapfile.patch + util-linux-2.12r-disk_utils_mkswap_fix.patch + util-linux-2.13-schedutils_ionice_idle.patch * Tue Jul 17 2007 - mkoenig@suse.de - updated to version 2.13-rc2: * add wakertc From a023d25745327c3e3a9383a9b11f32a863ca9f389c40dfde4973f17fb9f2cc30 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 17 Aug 2007 17:02:26 +0000 Subject: [PATCH 026/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=26 --- util-linux-2.13-loop.patch | 32 ++++++++++++++++++++++++++++++++ util-linux.changes | 5 +++++ util-linux.spec | 8 ++++++-- 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 util-linux-2.13-loop.patch diff --git a/util-linux-2.13-loop.patch b/util-linux-2.13-loop.patch new file mode 100644 index 0000000..ca5698c --- /dev/null +++ b/util-linux-2.13-loop.patch @@ -0,0 +1,32 @@ +--- util-linux-ng-2.13rc2+git20070725/mount/lomount.c.org 2007-08-16 17:09:33.258902000 +0200 ++++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c 2007-08-16 17:09:43.016135000 +0200 +@@ -398,6 +398,7 @@ + } + if (ioctl (fd, LOOP_CLR_FD, 0) < 0) { + perror ("ioctl: LOOP_CLR_FD"); ++ close(fd); + return 1; + } + close (fd); +--- util-linux-ng-2.13rc2+git20070725/mount/fsprobe_volumeid.c.org 2007-08-16 18:16:03.120065000 +0200 ++++ util-linux-ng-2.13rc2+git20070725/mount/fsprobe_volumeid.c 2007-08-16 18:27:43.967526000 +0200 +@@ -34,8 +34,10 @@ + return NULL; + + id = volume_id_open_fd(fd); +- if (!id) ++ if (!id) { ++ close(fd); + return NULL; ++ } + + /* TODO: use blkdev_get_size() */ + if (ioctl(fd, BLKGETSIZE64, &size) != 0) +@@ -61,6 +63,7 @@ + } + + volume_id_close(id); ++ close(fd); + return value; + } + diff --git a/util-linux.changes b/util-linux.changes index d2ca0cc..bf017e4 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 16 18:34:30 CEST 2007 - ssommer@suse.de + +- free loop devices when mount fails [#297172] + ------------------------------------------------------------------- Wed Jul 25 18:43:42 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 3fe37cb..8c59804 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD 3-Clause, GPL v2 or later Group: System/Base Autoreqprov: on Version: 2.12r+2.13rc2+git20070725 -Release: 1 +Release: 8 %define upver 2.13rc2+git20070725 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 @@ -67,6 +67,8 @@ Patch35: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch # suse48633 - util-linux on x86_64 does not contain "rdev" and "vidmode" Patch45: util-linux-2.13-sys_utils_build_rdev_x86_64.patch +# 297172 - mount does not free loop devices if it fails +Patch46: util-linux-2.13-loop.patch ## ## adjtimex ## @@ -110,7 +112,7 @@ Authors: %patch35 -p1 #%patch38 -p1 %patch45 -p1 -#%patch46 -p1 +%patch46 -p1 # cd adjtimex-* %patch50 -p1 @@ -551,6 +553,8 @@ fi #%endif %changelog +* Thu Aug 16 2007 - ssommer@suse.de +- free loop devices when mount fails [#297172] * Wed Jul 25 2007 - mkoenig@suse.de - update to git20070725 - removed patches (merged upstream): From 4571c916518098dc16be8a9d5d8bf687be0d11991fa365218cca723968fdee5b Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 27 Aug 2007 15:55:17 +0000 Subject: [PATCH 027/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=27 --- util-linux-2.13-mount_create_mtab.patch | 13 +++++ ...linux-2.13-schedutils_error_handling.patch | 55 +++++++++++++++++++ util-linux.changes | 7 +++ util-linux.spec | 10 +++- 4 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.13-mount_create_mtab.patch create mode 100644 util-linux-2.13-schedutils_error_handling.patch diff --git a/util-linux-2.13-mount_create_mtab.patch b/util-linux-2.13-mount_create_mtab.patch new file mode 100644 index 0000000..4d26d69 --- /dev/null +++ b/util-linux-2.13-mount_create_mtab.patch @@ -0,0 +1,13 @@ +Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/mount.c ++++ util-linux-ng-2.13rc2+git20070725/mount/mount.c +@@ -546,7 +546,7 @@ create_mtab (void) { + char *extra_opts; + parse_opts (fstab->m.mnt_opts, &flags, &extra_opts); + mnt.mnt_dir = "/"; +- mnt.mnt_fsname = canonicalize (fstab->m.mnt_fsname); ++ mnt.mnt_fsname = fsprobe_get_devname(fstab->m.mnt_fsname); + mnt.mnt_type = fstab->m.mnt_type; + mnt.mnt_opts = fix_opts_string (flags, extra_opts, NULL); + mnt.mnt_freq = mnt.mnt_passno = 0; diff --git a/util-linux-2.13-schedutils_error_handling.patch b/util-linux-2.13-schedutils_error_handling.patch new file mode 100644 index 0000000..2bd26b2 --- /dev/null +++ b/util-linux-2.13-schedutils_error_handling.patch @@ -0,0 +1,55 @@ +Original patch from Bernhard Voelker. + +Index: util-linux-ng-2.13rc2+git20070725/schedutils/ionice.c +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/schedutils/ionice.c ++++ util-linux-ng-2.13rc2+git20070725/schedutils/ionice.c +@@ -107,7 +107,7 @@ int main(int argc, char *argv[]) + case 'h': + default: + usage(); +- exit(0); ++ exit(EXIT_SUCCESS); + } + } + +@@ -125,7 +125,7 @@ int main(int argc, char *argv[]) + break; + default: + printf("bad prio class %d\n", ioprio_class); +- return 1; ++ exit(EXIT_FAILURE); + } + + if (!set) { +@@ -134,9 +134,10 @@ int main(int argc, char *argv[]) + + ioprio = ioprio_get(IOPRIO_WHO_PROCESS, pid); + +- if (ioprio == -1) ++ if (ioprio == -1) { + perror("ioprio_get"); +- else { ++ exit(EXIT_FAILURE); ++ } else { + ioprio_class = ioprio >> IOPRIO_CLASS_SHIFT; + if (ioprio_class != IOPRIO_CLASS_IDLE) { + ioprio = ioprio & 0xff; +@@ -147,11 +148,15 @@ int main(int argc, char *argv[]) + } else { + if (ioprio_set(IOPRIO_WHO_PROCESS, pid, ioprio | ioprio_class << IOPRIO_CLASS_SHIFT) == -1) { + perror("ioprio_set"); +- return 1; ++ exit(EXIT_FAILURE); + } + +- if (argv[optind]) ++ if (argv[optind]) { + execvp(argv[optind], &argv[optind]); ++ /* execvp should never return */ ++ perror("execvp"); ++ exit(EXIT_FAILURE); ++ } + } + + return 0; diff --git a/util-linux.changes b/util-linux.changes index bf017e4..6e9c3cf 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Aug 24 14:09:19 CEST 2007 - mkoenig@suse.de + +- avoid duplicates of root fs if defined with LABEL in fstab + [#297959] +- fix ionice error handling [#301675] + ------------------------------------------------------------------- Thu Aug 16 18:34:30 CEST 2007 - ssommer@suse.de diff --git a/util-linux.spec b/util-linux.spec index 8c59804..9c30509 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD 3-Clause, GPL v2 or later Group: System/Base Autoreqprov: on Version: 2.12r+2.13rc2+git20070725 -Release: 8 +Release: 12 %define upver 2.13rc2+git20070725 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 @@ -69,6 +69,8 @@ Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch Patch45: util-linux-2.13-sys_utils_build_rdev_x86_64.patch # 297172 - mount does not free loop devices if it fails Patch46: util-linux-2.13-loop.patch +Patch47: util-linux-2.13-mount_create_mtab.patch +Patch48: util-linux-2.13-schedutils_error_handling.patch ## ## adjtimex ## @@ -113,6 +115,8 @@ Authors: #%patch38 -p1 %patch45 -p1 %patch46 -p1 +%patch47 -p1 +%patch48 -p1 # cd adjtimex-* %patch50 -p1 @@ -553,6 +557,10 @@ fi #%endif %changelog +* Fri Aug 24 2007 - mkoenig@suse.de +- avoid duplicates of root fs if defined with LABEL in fstab + [#297959] +- fix ionice error handling [#301675] * Thu Aug 16 2007 - ssommer@suse.de - free loop devices when mount fails [#297172] * Wed Jul 25 2007 - mkoenig@suse.de From b3146798b164a54fc76f9a1f290f408377289aaf5632783d654c87d720fecab2 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 28 Aug 2007 17:22:43 +0000 Subject: [PATCH 028/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=28 --- cryptsetup-2.13-crypto.diff | 1486 +++++++++++++++++++++++++++++++++++ util-linux.changes | 6 + util-linux.spec | 9 +- 3 files changed, 1500 insertions(+), 1 deletion(-) create mode 100644 cryptsetup-2.13-crypto.diff diff --git a/cryptsetup-2.13-crypto.diff b/cryptsetup-2.13-crypto.diff new file mode 100644 index 0000000..efade6d --- /dev/null +++ b/cryptsetup-2.13-crypto.diff @@ -0,0 +1,1486 @@ +* password hashing based on debian patch (rmd160, sha*) adds losetup options -k + and -H +* add support for loop-AES compatible strings like "twofish256" + +Signed-off-by: Ludwig Nussel + +Index: util-linux-ng-2.13rc2+git20070725/mount/Makefile.am +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/Makefile.am ++++ util-linux-ng-2.13rc2+git20070725/mount/Makefile.am +@@ -12,7 +12,7 @@ headers_common = fstab.h linux_fs.h moun + mount_paths.h lomount.h fsprobe.h realpath.h xmalloc.h \ + getusername.h loop.h sundries.h + +-mount_common = fstab.c mount_mntent.c getusername.c lomount.c \ ++mount_common = fstab.c mount_mntent.c getusername.c lomount.c rmd160.c sha512.c \ + $(utils_common) $(headers_common) ../lib/env.c + + mount_SOURCES = mount.c $(mount_common) ../lib/setproctitle.c +@@ -25,7 +25,7 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD + + swapon_SOURCES = swapon.c swap_constants.h $(utils_common) + +-losetup_SOURCES = lomount.c loop.h lomount.h ++losetup_SOURCES = lomount.c loop.h lomount.h rmd160.c sha512.c + losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) + + mount_LDADD = $(LDADD_common) +Index: util-linux-ng-2.13rc2+git20070725/mount/rmd160.h +=================================================================== +--- /dev/null ++++ util-linux-ng-2.13rc2+git20070725/mount/rmd160.h +@@ -0,0 +1,11 @@ ++#ifndef RMD160_H ++#define RMD160_H ++ ++#define RMD160_HASH_SIZE 20 ++ ++void ++rmd160_hash_buffer( unsigned char *outbuf, const unsigned char *buffer, size_t length ); ++ ++#endif /*RMD160_H*/ ++ ++ +Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.c ++++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c +@@ -20,9 +20,15 @@ + + #include "loop.h" + #include "lomount.h" ++#include "rmd160.h" ++#include "sha512.h" + #include "xstrncpy.h" + #include "nls.h" + ++#ifndef MAX ++#define MAX(a,b) ((a>b)?(a):(b)) ++#endif ++ + extern int verbose; + extern char *progname; + extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ +@@ -95,12 +101,22 @@ show_loop(char *device) { + + if (loopinfo64.lo_encrypt_type || + loopinfo64.lo_crypt_name[0]) { +- char *e = loopinfo64.lo_crypt_name; ++ const char *e = (const char*)loopinfo64.lo_crypt_name; + + if (*e == 0 && loopinfo64.lo_encrypt_type == 1) + e = "XOR"; +- printf(_(", encryption %s (type %d)"), +- e, loopinfo64.lo_encrypt_type); ++ printf(_(", encryption %s (type %d), key length %u"), ++ e, loopinfo64.lo_encrypt_type, loopinfo64.lo_encrypt_key_size); ++ ++#if 0 ++ if(loopinfo64.lo_encrypt_key_size) { ++ unsigned i; ++ printf("\nkey "); ++ for(i = 0; i < loopinfo64.lo_encrypt_key_size; ++i) { ++ printf("%hhx",loopinfo64.lo_encrypt_key[i]); ++ } ++ } ++#endif + } + printf("\n"); + close (fd); +@@ -259,7 +275,7 @@ xgetpass(int pfd, const char *prompt) { + } + + if (pass == NULL) +- return ""; ++ return NULL; + + pass[i] = 0; + return pass; +@@ -273,12 +289,30 @@ digits_only(const char *s) { + return 1; + } + ++static void phash_none(const unsigned char *key, size_t keylen, unsigned char* buf, size_t buflen) ++{ ++ memcpy(buf, key, MAX(buflen, keylen)); ++} ++ ++static void phash_rmd160(const unsigned char *key, size_t keylen, unsigned char* buf, size_t buflen) ++{ ++ unsigned char tmpbuf[RMD160_HASH_SIZE*2]; ++ unsigned char* tmp = malloc(keylen+1); ++ tmp[0]='A'; ++ memcpy(tmp+1, key, keylen); ++ rmd160_hash_buffer(tmpbuf, key, keylen); ++ rmd160_hash_buffer(tmpbuf + RMD160_HASH_SIZE, tmp, keylen+1); ++ memset(tmp, 0, keylen+1); ++ free(tmp); ++ memcpy(buf, tmpbuf, MAX(buflen, sizeof(tmpbuf))); ++} ++ + int + set_loop(const char *device, const char *file, unsigned long long offset, +- const char *encryption, int pfd, int *loopro) { ++ const char *encryption, const char* phash, int pfd, int *loopro, int keysz) { + struct loop_info64 loopinfo64; + int fd, ffd, mode, i; +- char *pass; ++ char *pass = NULL; + + mode = (*loopro ? O_RDONLY : O_RDWR); + if ((ffd = open(file, mode)) < 0) { +@@ -297,15 +331,39 @@ set_loop(const char *device, const char + + memset(&loopinfo64, 0, sizeof(loopinfo64)); + +- xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE); ++ xstrncpy((char*)loopinfo64.lo_file_name, file, LO_NAME_SIZE); ++ ++ loopinfo64.lo_encrypt_key_size = 0; + + if (encryption && *encryption) { ++ // a hint for suse users ++ if(!strcmp(encryption, "twofishSL92")) { ++ fprintf(stderr, _("twofishSL92 is not supported via cryptoloop, please use dm-crypt to access the volume\n")); ++ return 1; ++ } + if (digits_only(encryption)) { + loopinfo64.lo_encrypt_type = atoi(encryption); + } else { +- loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI; +- snprintf(loopinfo64.lo_crypt_name, LO_NAME_SIZE, ++ // check for something like twofish256 ++ unsigned len = strlen(encryption); ++ snprintf((char*)loopinfo64.lo_crypt_name, LO_NAME_SIZE, + "%s", encryption); ++ if(len > 3) { ++ if(isdigit(loopinfo64.lo_crypt_name[len-3]) ++ && isdigit(loopinfo64.lo_crypt_name[len-2]) ++ && isdigit(loopinfo64.lo_crypt_name[len-1])) { ++ loopinfo64.lo_encrypt_key_size = atoi((char*)&loopinfo64.lo_crypt_name[len-3]) >> 3; ++ loopinfo64.lo_crypt_name[len-3] = 0; ++ } ++ } ++ ++ if(keysz && loopinfo64.lo_encrypt_key_size && loopinfo64.lo_encrypt_key_size != keysz >> 3) { ++ fprintf(stderr, _("please either specify '%s%d' or -e '%s' -k '%d'\n"), ++ loopinfo64.lo_crypt_name, loopinfo64.lo_encrypt_key_size<<3, ++ loopinfo64.lo_crypt_name, keysz); ++ return 1; ++ } ++ loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI; + } + } + +@@ -325,20 +383,57 @@ set_loop(const char *device, const char + } + #endif + +- switch (loopinfo64.lo_encrypt_type) { +- case LO_CRYPT_NONE: +- loopinfo64.lo_encrypt_key_size = 0; +- break; +- case LO_CRYPT_XOR: +- pass = getpass(_("Password: ")); +- goto gotpass; +- default: +- pass = xgetpass(pfd, _("Password: ")); +- gotpass: ++ if (loopinfo64.lo_encrypt_type != LO_CRYPT_NONE) { ++ void (*hfunc)(const unsigned char*, size_t, unsigned char*, size_t) = NULL; ++ + memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE); +- xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE); ++ ++ pass = xgetpass(pfd, _("Password: ")); ++ if(!pass) ++ return 1; ++ ++ // set default hash functions, loop-AES compatible ++ if(loopinfo64.lo_encrypt_type == LO_CRYPT_CRYPTOAPI) { ++ hfunc = sha512_hash_buffer; ++ if(loopinfo64.lo_encrypt_key_size == 24) hfunc = sha384_hash_buffer; ++ if(loopinfo64.lo_encrypt_key_size == 32) hfunc = sha512_hash_buffer; ++ } else { ++ hfunc = phash_none; ++ loopinfo64.lo_encrypt_key_size = keysz?keysz>>3:LO_KEY_SIZE; ++ } ++ ++ if(!loopinfo64.lo_encrypt_key_size) { ++ if(!keysz) { ++ if(verbose) ++ fprintf(stderr, _("please specify a key length\n")); ++ return 1; ++ } ++ loopinfo64.lo_encrypt_key_size = keysz>>3; ++ } ++ ++ if (phash) { ++ if(!strcasecmp(phash, "sha512")) { ++ hfunc = sha512_hash_buffer; ++ } else if(!strcasecmp(phash, "sha384")) { ++ hfunc = sha384_hash_buffer; ++ } else if(!strcasecmp(phash, "sha256")) { ++ hfunc = sha256_hash_buffer; ++ } else if(!strcasecmp(phash, "rmd160")) { ++ hfunc = phash_rmd160; ++ } else if(!strcasecmp(phash, "none")) { ++ hfunc = phash_none; ++ } else { ++ fprintf(stderr, _("unsupported hash method '%s'\n"), phash); ++ return 1; ++ } ++ } ++ ++ if(hfunc) { ++ hfunc((unsigned char*)pass, strlen(pass), loopinfo64.lo_encrypt_key, loopinfo64.lo_encrypt_key_size); ++ } ++ ++ // zero buffer + memset(pass, 0, strlen(pass)); +- loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE; + } + + if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { +@@ -416,8 +511,8 @@ mutter(void) { + } + + int +-set_loop (const char *device, const char *file, unsigned long long offset, +- const char *encryption, int *loopro) { ++set_loop(const char *device, const char *file, unsigned long long offset, ++ const char *encryption, const char* phash, int pfd, int *loopro, int keysz) { + mutter(); + return 1; + } +@@ -456,7 +551,13 @@ usage(void) { + " %1$s [ options ] {-f|--find|loop_device} file # setup\n" + "\nOptions:\n" + " -e | --encryption enable data encryption with specified \n" ++ " -H | --phash hash password using specified algorithm (rmd160/sha512/sha256/sha384/none)\n" + " -h | --help this help\n" ++ " -k | --keybits specify number of bits in the hashed key given\n" ++ " to the cipher. Some ciphers support several key\n" ++ " sizes and might be more efficient with a smaller\n" ++ " key size. Key sizes < 128 are generally not\n" ++ " recommended\n" + " -o | --offset start at offset into file\n" + " -p | --pass-fd read passphrase from file descriptor \n" + " -r | --read-only setup read-only loop device\n" +@@ -497,11 +598,14 @@ error (const char *fmt, ...) { + int + main(int argc, char **argv) { + char *p, *offset, *encryption, *passfd, *device, *file; ++ char *keysize; ++ char *phash = NULL; + int delete, find, c, all; + int res = 0; + int showdev = 0; + int ro = 0; + int pfd = -1; ++ int keysz = 0; + unsigned long long off; + struct option longopts[] = { + { "all", 0, 0, 'a' }, +@@ -509,6 +613,8 @@ main(int argc, char **argv) { + { "encryption", 1, 0, 'e' }, + { "find", 0, 0, 'f' }, + { "help", 0, 0, 'h' }, ++ { "keybits", 1, 0, 'k' }, ++ { "phash", 1, 0, 'H' }, + { "offset", 1, 0, 'o' }, + { "pass-fd", 1, 0, 'p' }, + { "read-only", 0, 0, 'r' }, +@@ -524,12 +630,13 @@ main(int argc, char **argv) { + delete = find = all = 0; + off = 0; + offset = encryption = passfd = NULL; ++ keysize = NULL; + + progname = argv[0]; + if ((p = strrchr(progname, '/')) != NULL) + progname = p+1; + +- while ((c = getopt_long(argc, argv, "ade:E:fho:p:rsv", ++ while ((c = getopt_long(argc, argv, "ade:E:fhk:No:p:rsvH:", + longopts, NULL)) != -1) { + switch (c) { + case 'a': +@@ -548,6 +655,12 @@ main(int argc, char **argv) { + case 'f': + find = 1; + break; ++ case 'k': ++ keysize = optarg; ++ break; ++ case 'H': ++ phash = optarg; ++ break; + case 'o': + offset = optarg; + break; +@@ -611,8 +724,10 @@ main(int argc, char **argv) { + usage(); + if (passfd && sscanf(passfd, "%d", &pfd) != 1) + usage(); ++ if (keysize && sscanf(keysize,"%d",&keysz) != 1) ++ usage(); + do { +- res = set_loop(device, file, off, encryption, pfd, &ro); ++ res = set_loop(device, file, off, encryption, phash, pfd, &ro, keysz); + if (res == 2 && find) { + if (verbose) + printf("stolen loop=%s...trying again\n", +Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/mount.c ++++ util-linux-ng-2.13rc2+git20070725/mount/mount.c +@@ -93,6 +93,9 @@ static int suid = 0; + /* Contains the fd to read the passphrase from, if any. */ + static int pfd = -1; + ++/* Contains the preferred keysize in bits we want to use */ ++static int keysz = 0; ++ + /* Map from -o and fstab option strings to the flag argument to mount(2). */ + struct opt_map { + const char *opt; /* option name */ +@@ -190,6 +193,7 @@ static int opt_nofail = 0; + + static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, + *opt_speed, *opt_comment, *opt_uhelper; ++static const char *opt_keybits, *opt_phash, *opt_nohashpass; + + static int mounted (const char *spec0, const char *node0); + static int check_special_mountprog(const char *spec, const char *node, +@@ -204,6 +208,9 @@ static struct string_opt_map { + { "vfs=", 1, &opt_vfstype }, + { "offset=", 0, &opt_offset }, + { "encryption=", 0, &opt_encryption }, ++ { "phash=", 0, &opt_phash }, ++ { "keybits=", 0, &opt_keybits }, ++ { "nohashpass", 0, &opt_nohashpass }, + { "speed=", 0, &opt_speed }, + { "comment=", 1, &opt_comment }, + { "uhelper=", 0, &opt_uhelper }, +@@ -858,7 +865,7 @@ loop_check(const char **spec, const char + *type = opt_vfstype; + } + +- *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_encryption); ++ *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_encryption || opt_phash || opt_keybits); + *loopfile = *spec; + + if (*loop) { +@@ -879,9 +886,17 @@ loop_check(const char **spec, const char + return EX_SYSERR; /* no more loop devices */ + if (verbose) + printf(_("mount: going to use the loop device %s\n"), *loopdev); +- ++ if (!keysz && opt_keybits) ++ keysz = strtoul(opt_keybits, NULL, 0); ++ if (opt_nohashpass) { ++ if(opt_phash && strcmp(opt_phash, "none")) { ++ error(_("mount: please specify either phash=%s or nohashpass\n")); ++ return EX_FAIL; ++ } ++ opt_phash = "none"; ++ } + if ((res = set_loop(*loopdev, *loopfile, offset, +- opt_encryption, pfd, &loopro))) { ++ opt_encryption, opt_phash, pfd, &loopro, keysz))) { + if (res == 2) { + /* loop dev has been grabbed by some other process, + try again, if not given explicitly */ +@@ -1184,7 +1199,7 @@ try_mount_one (const char *spec0, const + error (_("mount: %s not mounted already, or bad option"), node); + } else { + error (_("mount: wrong fs type, bad option, bad superblock on %s,\n" +- " missing codepage or other error"), ++ " missing codepage or helper program, or other error"), + spec); + + if (stat(spec, &statbuf) == 0 && S_ISBLK(statbuf.st_mode) +@@ -1629,6 +1644,7 @@ static struct option longopts[] = { + { "options", 1, 0, 'o' }, + { "test-opts", 1, 0, 'O' }, + { "pass-fd", 1, 0, 'p' }, ++ { "keybits", 1, 0, 'k' }, + { "types", 1, 0, 't' }, + { "bind", 0, 0, 128 }, + { "replace", 0, 0, 129 }, +@@ -1781,6 +1797,7 @@ main(int argc, char *argv[]) { + char *options = NULL, *test_opts = NULL, *node; + const char *spec = NULL; + char *label = NULL; ++ char *keysize = NULL; + char *uuid = NULL; + char *types = NULL; + char *p; +@@ -1811,7 +1828,7 @@ main(int argc, char *argv[]) { + initproctitle(argc, argv); + #endif + +- while ((c = getopt_long (argc, argv, "afFhilL:no:O:p:rsU:vVwt:", ++ while ((c = getopt_long (argc, argv, "afFhik:lL:no:O:p:rsU:vVwt:", + longopts, NULL)) != -1) { + switch (c) { + case 'a': /* mount everything in fstab */ +@@ -1829,6 +1846,9 @@ main(int argc, char *argv[]) { + case 'i': + external_allowed = 0; + break; ++ case 'k': ++ keysize = optarg; ++ break; + case 'l': + list_with_volumelabel = 1; + break; +@@ -1975,6 +1995,9 @@ main(int argc, char *argv[]) { + create_mtab (); + } + ++ if (keysize && sscanf(keysize,"%d",&keysz) != 1) ++ die (EX_USAGE, _("mount: argument to --keybits or -k must be a number")); ++ + switch (argc+specseen) { + case 0: + /* mount -a */ +Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.h +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.h ++++ util-linux-ng-2.13rc2+git20070725/mount/lomount.h +@@ -1,6 +1,6 @@ + extern int verbose; +-extern int set_loop(const char *, const char *, unsigned long long, +- const char *, int, int *); ++extern int set_loop(const char *device, const char *file, unsigned long long offset, ++ const char *encryption, const char* phash, int pfd, int *loopro, int keysz); + extern int del_loop(const char *); + extern int is_loop_device(const char *); + extern char * find_unused_loop_device(void); +Index: util-linux-ng-2.13rc2+git20070725/mount/rmd160.c +=================================================================== +--- /dev/null ++++ util-linux-ng-2.13rc2+git20070725/mount/rmd160.c +@@ -0,0 +1,532 @@ ++/* rmd160.c - RIPE-MD160 ++ * Copyright (C) 1998 Free Software Foundation, Inc. ++ */ ++ ++/* This file was part of GnuPG. Modified for use within the Linux ++ * mount utility by Marc Mutz . None of this code is ++ * by myself. I just removed everything that you don't need when all ++ * you want to do is to use rmd160_hash_buffer(). ++ * My comments are marked with (mm). */ ++ ++/* GnuPG is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * GnuPG is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ ++ ++#include /* (mm) for memcpy */ ++#include /* (mm) for BIG_ENDIAN and BYTE_ORDER */ ++#include "rmd160.h" ++ ++/* (mm) these are used by the original GnuPG file. In order to modify ++ * that file not too much, we keep the notations. maybe it would be ++ * better to include linux/types.h and typedef __u32 to u32 and __u8 ++ * to byte? */ ++typedef unsigned int u32; /* taken from e.g. util-linux's minix.h */ ++typedef unsigned char byte; ++ ++typedef struct { ++ u32 h0,h1,h2,h3,h4; ++ u32 nblocks; ++ byte buf[64]; ++ int count; ++} RMD160_CONTEXT; ++ ++/**************** ++ * Rotate a 32 bit integer by n bytes ++ */ ++#if defined(__GNUC__) && defined(__i386__) ++static inline u32 ++rol( u32 x, int n) ++{ ++ __asm__("roll %%cl,%0" ++ :"=r" (x) ++ :"0" (x),"c" (n)); ++ return x; ++} ++#else ++ #define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) ) ++#endif ++ ++/********************************* ++ * RIPEMD-160 is not patented, see (as of 25.10.97) ++ * http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html ++ * Note that the code uses Little Endian byteorder, which is good for ++ * 386 etc, but we must add some conversion when used on a big endian box. ++ * ++ * ++ * Pseudo-code for RIPEMD-160 ++ * ++ * RIPEMD-160 is an iterative hash function that operates on 32-bit words. ++ * The round function takes as input a 5-word chaining variable and a 16-word ++ * message block and maps this to a new chaining variable. All operations are ++ * defined on 32-bit words. Padding is identical to that of MD4. ++ * ++ * ++ * RIPEMD-160: definitions ++ * ++ * ++ * nonlinear functions at bit level: exor, mux, -, mux, - ++ * ++ * f(j, x, y, z) = x XOR y XOR z (0 <= j <= 15) ++ * f(j, x, y, z) = (x AND y) OR (NOT(x) AND z) (16 <= j <= 31) ++ * f(j, x, y, z) = (x OR NOT(y)) XOR z (32 <= j <= 47) ++ * f(j, x, y, z) = (x AND z) OR (y AND NOT(z)) (48 <= j <= 63) ++ * f(j, x, y, z) = x XOR (y OR NOT(z)) (64 <= j <= 79) ++ * ++ * ++ * added constants (hexadecimal) ++ * ++ * K(j) = 0x00000000 (0 <= j <= 15) ++ * K(j) = 0x5A827999 (16 <= j <= 31) int(2**30 x sqrt(2)) ++ * K(j) = 0x6ED9EBA1 (32 <= j <= 47) int(2**30 x sqrt(3)) ++ * K(j) = 0x8F1BBCDC (48 <= j <= 63) int(2**30 x sqrt(5)) ++ * K(j) = 0xA953FD4E (64 <= j <= 79) int(2**30 x sqrt(7)) ++ * K'(j) = 0x50A28BE6 (0 <= j <= 15) int(2**30 x cbrt(2)) ++ * K'(j) = 0x5C4DD124 (16 <= j <= 31) int(2**30 x cbrt(3)) ++ * K'(j) = 0x6D703EF3 (32 <= j <= 47) int(2**30 x cbrt(5)) ++ * K'(j) = 0x7A6D76E9 (48 <= j <= 63) int(2**30 x cbrt(7)) ++ * K'(j) = 0x00000000 (64 <= j <= 79) ++ * ++ * ++ * selection of message word ++ * ++ * r(j) = j (0 <= j <= 15) ++ * r(16..31) = 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8 ++ * r(32..47) = 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12 ++ * r(48..63) = 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2 ++ * r(64..79) = 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 ++ * r0(0..15) = 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12 ++ * r0(16..31)= 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2 ++ * r0(32..47)= 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13 ++ * r0(48..63)= 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14 ++ * r0(64..79)= 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 ++ * ++ * ++ * amount for rotate left (rol) ++ * ++ * s(0..15) = 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8 ++ * s(16..31) = 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12 ++ * s(32..47) = 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5 ++ * s(48..63) = 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12 ++ * s(64..79) = 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ++ * s'(0..15) = 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6 ++ * s'(16..31)= 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11 ++ * s'(32..47)= 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5 ++ * s'(48..63)= 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8 ++ * s'(64..79)= 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ++ * ++ * ++ * initial value (hexadecimal) ++ * ++ * h0 = 0x67452301; h1 = 0xEFCDAB89; h2 = 0x98BADCFE; h3 = 0x10325476; ++ * h4 = 0xC3D2E1F0; ++ * ++ * ++ * RIPEMD-160: pseudo-code ++ * ++ * It is assumed that the message after padding consists of t 16-word blocks ++ * that will be denoted with X[i][j], with 0 <= i <= t-1 and 0 <= j <= 15. ++ * The symbol [+] denotes addition modulo 2**32 and rol_s denotes cyclic left ++ * shift (rotate) over s positions. ++ * ++ * ++ * for i := 0 to t-1 { ++ * A := h0; B := h1; C := h2; D = h3; E = h4; ++ * A' := h0; B' := h1; C' := h2; D' = h3; E' = h4; ++ * for j := 0 to 79 { ++ * T := rol_s(j)(A [+] f(j, B, C, D) [+] X[i][r(j)] [+] K(j)) [+] E; ++ * A := E; E := D; D := rol_10(C); C := B; B := T; ++ * T := rol_s'(j)(A' [+] f(79-j, B', C', D') [+] X[i][r'(j)] ++ [+] K'(j)) [+] E'; ++ * A' := E'; E' := D'; D' := rol_10(C'); C' := B'; B' := T; ++ * } ++ * T := h1 [+] C [+] D'; h1 := h2 [+] D [+] E'; h2 := h3 [+] E [+] A'; ++ * h3 := h4 [+] A [+] B'; h4 := h0 [+] B [+] C'; h0 := T; ++ * } ++ */ ++ ++/* Some examples: ++ * "" 9c1185a5c5e9fc54612808977ee8f548b2258d31 ++ * "a" 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe ++ * "abc" 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc ++ * "message digest" 5d0689ef49d2fae572b881b123a85ffa21595f36 ++ * "a...z" f71c27109c692c1b56bbdceb5b9d2865b3708dbc ++ * "abcdbcde...nopq" 12a053384a9c0c88e405a06c27dcf49ada62eb2b ++ * "A...Za...z0...9" b0e20b6e3116640286ed3a87a5713079b21f5189 ++ * 8 times "1234567890" 9b752e45573d4b39f4dbd3323cab82bf63326bfb ++ * 1 million times "a" 52783243c1697bdbe16d37f97f68f08325dc1528 ++ */ ++ ++ ++static void ++rmd160_init( RMD160_CONTEXT *hd ) ++{ ++ hd->h0 = 0x67452301; ++ hd->h1 = 0xEFCDAB89; ++ hd->h2 = 0x98BADCFE; ++ hd->h3 = 0x10325476; ++ hd->h4 = 0xC3D2E1F0; ++ hd->nblocks = 0; ++ hd->count = 0; ++} ++ ++ ++ ++/**************** ++ * Transform the message X which consists of 16 32-bit-words ++ */ ++static void ++transform( RMD160_CONTEXT *hd, const byte *data ) ++{ ++ u32 a,b,c,d,e,aa,bb,cc,dd,ee,t; ++ #if BYTE_ORDER == BIG_ENDIAN ++ u32 x[16]; ++ { int i; ++ byte *p2, *p1; ++ for(i=0, p1=data, p2=(byte*)x; i < 16; i++, p2 += 4 ) { ++ p2[3] = *p1++; ++ p2[2] = *p1++; ++ p2[1] = *p1++; ++ p2[0] = *p1++; ++ } ++ } ++ #else ++ #if 0 ++ u32 *x =(u32*)data; ++ #else ++ /* this version is better because it is always aligned; ++ * The performance penalty on a 586-100 is about 6% which ++ * is acceptable - because the data is more local it might ++ * also be possible that this is faster on some machines. ++ * This function (when compiled with -02 on gcc 2.7.2) ++ * executes on a 586-100 (39.73 bogomips) at about 1900kb/sec; ++ * [measured with a 4MB data and "gpgm --print-md rmd160"] */ ++ u32 x[16]; ++ memcpy( x, data, 64 ); ++ #endif ++ #endif ++ ++ ++#define K0 0x00000000 ++#define K1 0x5A827999 ++#define K2 0x6ED9EBA1 ++#define K3 0x8F1BBCDC ++#define K4 0xA953FD4E ++#define KK0 0x50A28BE6 ++#define KK1 0x5C4DD124 ++#define KK2 0x6D703EF3 ++#define KK3 0x7A6D76E9 ++#define KK4 0x00000000 ++#define F0(x,y,z) ( (x) ^ (y) ^ (z) ) ++#define F1(x,y,z) ( ((x) & (y)) | (~(x) & (z)) ) ++#define F2(x,y,z) ( ((x) | ~(y)) ^ (z) ) ++#define F3(x,y,z) ( ((x) & (z)) | ((y) & ~(z)) ) ++#define F4(x,y,z) ( (x) ^ ((y) | ~(z)) ) ++#define R(a,b,c,d,e,f,k,r,s) do { t = a + f(b,c,d) + k + x[r]; \ ++ a = rol(t,s) + e; \ ++ c = rol(c,10); \ ++ } while(0) ++ ++ /* left lane */ ++ a = hd->h0; ++ b = hd->h1; ++ c = hd->h2; ++ d = hd->h3; ++ e = hd->h4; ++ R( a, b, c, d, e, F0, K0, 0, 11 ); ++ R( e, a, b, c, d, F0, K0, 1, 14 ); ++ R( d, e, a, b, c, F0, K0, 2, 15 ); ++ R( c, d, e, a, b, F0, K0, 3, 12 ); ++ R( b, c, d, e, a, F0, K0, 4, 5 ); ++ R( a, b, c, d, e, F0, K0, 5, 8 ); ++ R( e, a, b, c, d, F0, K0, 6, 7 ); ++ R( d, e, a, b, c, F0, K0, 7, 9 ); ++ R( c, d, e, a, b, F0, K0, 8, 11 ); ++ R( b, c, d, e, a, F0, K0, 9, 13 ); ++ R( a, b, c, d, e, F0, K0, 10, 14 ); ++ R( e, a, b, c, d, F0, K0, 11, 15 ); ++ R( d, e, a, b, c, F0, K0, 12, 6 ); ++ R( c, d, e, a, b, F0, K0, 13, 7 ); ++ R( b, c, d, e, a, F0, K0, 14, 9 ); ++ R( a, b, c, d, e, F0, K0, 15, 8 ); ++ R( e, a, b, c, d, F1, K1, 7, 7 ); ++ R( d, e, a, b, c, F1, K1, 4, 6 ); ++ R( c, d, e, a, b, F1, K1, 13, 8 ); ++ R( b, c, d, e, a, F1, K1, 1, 13 ); ++ R( a, b, c, d, e, F1, K1, 10, 11 ); ++ R( e, a, b, c, d, F1, K1, 6, 9 ); ++ R( d, e, a, b, c, F1, K1, 15, 7 ); ++ R( c, d, e, a, b, F1, K1, 3, 15 ); ++ R( b, c, d, e, a, F1, K1, 12, 7 ); ++ R( a, b, c, d, e, F1, K1, 0, 12 ); ++ R( e, a, b, c, d, F1, K1, 9, 15 ); ++ R( d, e, a, b, c, F1, K1, 5, 9 ); ++ R( c, d, e, a, b, F1, K1, 2, 11 ); ++ R( b, c, d, e, a, F1, K1, 14, 7 ); ++ R( a, b, c, d, e, F1, K1, 11, 13 ); ++ R( e, a, b, c, d, F1, K1, 8, 12 ); ++ R( d, e, a, b, c, F2, K2, 3, 11 ); ++ R( c, d, e, a, b, F2, K2, 10, 13 ); ++ R( b, c, d, e, a, F2, K2, 14, 6 ); ++ R( a, b, c, d, e, F2, K2, 4, 7 ); ++ R( e, a, b, c, d, F2, K2, 9, 14 ); ++ R( d, e, a, b, c, F2, K2, 15, 9 ); ++ R( c, d, e, a, b, F2, K2, 8, 13 ); ++ R( b, c, d, e, a, F2, K2, 1, 15 ); ++ R( a, b, c, d, e, F2, K2, 2, 14 ); ++ R( e, a, b, c, d, F2, K2, 7, 8 ); ++ R( d, e, a, b, c, F2, K2, 0, 13 ); ++ R( c, d, e, a, b, F2, K2, 6, 6 ); ++ R( b, c, d, e, a, F2, K2, 13, 5 ); ++ R( a, b, c, d, e, F2, K2, 11, 12 ); ++ R( e, a, b, c, d, F2, K2, 5, 7 ); ++ R( d, e, a, b, c, F2, K2, 12, 5 ); ++ R( c, d, e, a, b, F3, K3, 1, 11 ); ++ R( b, c, d, e, a, F3, K3, 9, 12 ); ++ R( a, b, c, d, e, F3, K3, 11, 14 ); ++ R( e, a, b, c, d, F3, K3, 10, 15 ); ++ R( d, e, a, b, c, F3, K3, 0, 14 ); ++ R( c, d, e, a, b, F3, K3, 8, 15 ); ++ R( b, c, d, e, a, F3, K3, 12, 9 ); ++ R( a, b, c, d, e, F3, K3, 4, 8 ); ++ R( e, a, b, c, d, F3, K3, 13, 9 ); ++ R( d, e, a, b, c, F3, K3, 3, 14 ); ++ R( c, d, e, a, b, F3, K3, 7, 5 ); ++ R( b, c, d, e, a, F3, K3, 15, 6 ); ++ R( a, b, c, d, e, F3, K3, 14, 8 ); ++ R( e, a, b, c, d, F3, K3, 5, 6 ); ++ R( d, e, a, b, c, F3, K3, 6, 5 ); ++ R( c, d, e, a, b, F3, K3, 2, 12 ); ++ R( b, c, d, e, a, F4, K4, 4, 9 ); ++ R( a, b, c, d, e, F4, K4, 0, 15 ); ++ R( e, a, b, c, d, F4, K4, 5, 5 ); ++ R( d, e, a, b, c, F4, K4, 9, 11 ); ++ R( c, d, e, a, b, F4, K4, 7, 6 ); ++ R( b, c, d, e, a, F4, K4, 12, 8 ); ++ R( a, b, c, d, e, F4, K4, 2, 13 ); ++ R( e, a, b, c, d, F4, K4, 10, 12 ); ++ R( d, e, a, b, c, F4, K4, 14, 5 ); ++ R( c, d, e, a, b, F4, K4, 1, 12 ); ++ R( b, c, d, e, a, F4, K4, 3, 13 ); ++ R( a, b, c, d, e, F4, K4, 8, 14 ); ++ R( e, a, b, c, d, F4, K4, 11, 11 ); ++ R( d, e, a, b, c, F4, K4, 6, 8 ); ++ R( c, d, e, a, b, F4, K4, 15, 5 ); ++ R( b, c, d, e, a, F4, K4, 13, 6 ); ++ ++ aa = a; bb = b; cc = c; dd = d; ee = e; ++ ++ /* right lane */ ++ a = hd->h0; ++ b = hd->h1; ++ c = hd->h2; ++ d = hd->h3; ++ e = hd->h4; ++ R( a, b, c, d, e, F4, KK0, 5, 8); ++ R( e, a, b, c, d, F4, KK0, 14, 9); ++ R( d, e, a, b, c, F4, KK0, 7, 9); ++ R( c, d, e, a, b, F4, KK0, 0, 11); ++ R( b, c, d, e, a, F4, KK0, 9, 13); ++ R( a, b, c, d, e, F4, KK0, 2, 15); ++ R( e, a, b, c, d, F4, KK0, 11, 15); ++ R( d, e, a, b, c, F4, KK0, 4, 5); ++ R( c, d, e, a, b, F4, KK0, 13, 7); ++ R( b, c, d, e, a, F4, KK0, 6, 7); ++ R( a, b, c, d, e, F4, KK0, 15, 8); ++ R( e, a, b, c, d, F4, KK0, 8, 11); ++ R( d, e, a, b, c, F4, KK0, 1, 14); ++ R( c, d, e, a, b, F4, KK0, 10, 14); ++ R( b, c, d, e, a, F4, KK0, 3, 12); ++ R( a, b, c, d, e, F4, KK0, 12, 6); ++ R( e, a, b, c, d, F3, KK1, 6, 9); ++ R( d, e, a, b, c, F3, KK1, 11, 13); ++ R( c, d, e, a, b, F3, KK1, 3, 15); ++ R( b, c, d, e, a, F3, KK1, 7, 7); ++ R( a, b, c, d, e, F3, KK1, 0, 12); ++ R( e, a, b, c, d, F3, KK1, 13, 8); ++ R( d, e, a, b, c, F3, KK1, 5, 9); ++ R( c, d, e, a, b, F3, KK1, 10, 11); ++ R( b, c, d, e, a, F3, KK1, 14, 7); ++ R( a, b, c, d, e, F3, KK1, 15, 7); ++ R( e, a, b, c, d, F3, KK1, 8, 12); ++ R( d, e, a, b, c, F3, KK1, 12, 7); ++ R( c, d, e, a, b, F3, KK1, 4, 6); ++ R( b, c, d, e, a, F3, KK1, 9, 15); ++ R( a, b, c, d, e, F3, KK1, 1, 13); ++ R( e, a, b, c, d, F3, KK1, 2, 11); ++ R( d, e, a, b, c, F2, KK2, 15, 9); ++ R( c, d, e, a, b, F2, KK2, 5, 7); ++ R( b, c, d, e, a, F2, KK2, 1, 15); ++ R( a, b, c, d, e, F2, KK2, 3, 11); ++ R( e, a, b, c, d, F2, KK2, 7, 8); ++ R( d, e, a, b, c, F2, KK2, 14, 6); ++ R( c, d, e, a, b, F2, KK2, 6, 6); ++ R( b, c, d, e, a, F2, KK2, 9, 14); ++ R( a, b, c, d, e, F2, KK2, 11, 12); ++ R( e, a, b, c, d, F2, KK2, 8, 13); ++ R( d, e, a, b, c, F2, KK2, 12, 5); ++ R( c, d, e, a, b, F2, KK2, 2, 14); ++ R( b, c, d, e, a, F2, KK2, 10, 13); ++ R( a, b, c, d, e, F2, KK2, 0, 13); ++ R( e, a, b, c, d, F2, KK2, 4, 7); ++ R( d, e, a, b, c, F2, KK2, 13, 5); ++ R( c, d, e, a, b, F1, KK3, 8, 15); ++ R( b, c, d, e, a, F1, KK3, 6, 5); ++ R( a, b, c, d, e, F1, KK3, 4, 8); ++ R( e, a, b, c, d, F1, KK3, 1, 11); ++ R( d, e, a, b, c, F1, KK3, 3, 14); ++ R( c, d, e, a, b, F1, KK3, 11, 14); ++ R( b, c, d, e, a, F1, KK3, 15, 6); ++ R( a, b, c, d, e, F1, KK3, 0, 14); ++ R( e, a, b, c, d, F1, KK3, 5, 6); ++ R( d, e, a, b, c, F1, KK3, 12, 9); ++ R( c, d, e, a, b, F1, KK3, 2, 12); ++ R( b, c, d, e, a, F1, KK3, 13, 9); ++ R( a, b, c, d, e, F1, KK3, 9, 12); ++ R( e, a, b, c, d, F1, KK3, 7, 5); ++ R( d, e, a, b, c, F1, KK3, 10, 15); ++ R( c, d, e, a, b, F1, KK3, 14, 8); ++ R( b, c, d, e, a, F0, KK4, 12, 8); ++ R( a, b, c, d, e, F0, KK4, 15, 5); ++ R( e, a, b, c, d, F0, KK4, 10, 12); ++ R( d, e, a, b, c, F0, KK4, 4, 9); ++ R( c, d, e, a, b, F0, KK4, 1, 12); ++ R( b, c, d, e, a, F0, KK4, 5, 5); ++ R( a, b, c, d, e, F0, KK4, 8, 14); ++ R( e, a, b, c, d, F0, KK4, 7, 6); ++ R( d, e, a, b, c, F0, KK4, 6, 8); ++ R( c, d, e, a, b, F0, KK4, 2, 13); ++ R( b, c, d, e, a, F0, KK4, 13, 6); ++ R( a, b, c, d, e, F0, KK4, 14, 5); ++ R( e, a, b, c, d, F0, KK4, 0, 15); ++ R( d, e, a, b, c, F0, KK4, 3, 13); ++ R( c, d, e, a, b, F0, KK4, 9, 11); ++ R( b, c, d, e, a, F0, KK4, 11, 11); ++ ++ ++ t = hd->h1 + d + cc; ++ hd->h1 = hd->h2 + e + dd; ++ hd->h2 = hd->h3 + a + ee; ++ hd->h3 = hd->h4 + b + aa; ++ hd->h4 = hd->h0 + c + bb; ++ hd->h0 = t; ++} ++ ++ ++/* Update the message digest with the contents ++ * of INBUF with length INLEN. ++ */ ++static void ++rmd160_write( RMD160_CONTEXT *hd, const byte *inbuf, size_t inlen) ++{ ++ if( hd->count == 64 ) { /* flush the buffer */ ++ transform( hd, hd->buf ); ++ hd->count = 0; ++ hd->nblocks++; ++ } ++ if( !inbuf ) ++ return; ++ if( hd->count ) { ++ for( ; inlen && hd->count < 64; inlen-- ) ++ hd->buf[hd->count++] = *inbuf++; ++ rmd160_write( hd, NULL, 0 ); ++ if( !inlen ) ++ return; ++ } ++ ++ while( inlen >= 64 ) { ++ transform( hd, inbuf ); ++ hd->count = 0; ++ hd->nblocks++; ++ inlen -= 64; ++ inbuf += 64; ++ } ++ for( ; inlen && hd->count < 64; inlen-- ) ++ hd->buf[hd->count++] = *inbuf++; ++} ++ ++/* The routine terminates the computation ++ */ ++ ++static void ++rmd160_final( RMD160_CONTEXT *hd ) ++{ ++ u32 t, msb, lsb; ++ byte *p; ++ ++ rmd160_write(hd, NULL, 0); /* flush */; ++ ++ msb = 0; ++ t = hd->nblocks; ++ if( (lsb = t << 6) < t ) /* multiply by 64 to make a byte count */ ++ msb++; ++ msb += t >> 26; ++ t = lsb; ++ if( (lsb = t + hd->count) < t ) /* add the count */ ++ msb++; ++ t = lsb; ++ if( (lsb = t << 3) < t ) /* multiply by 8 to make a bit count */ ++ msb++; ++ msb += t >> 29; ++ ++ if( hd->count < 56 ) { /* enough room */ ++ hd->buf[hd->count++] = 0x80; /* pad */ ++ while( hd->count < 56 ) ++ hd->buf[hd->count++] = 0; /* pad */ ++ } ++ else { /* need one extra block */ ++ hd->buf[hd->count++] = 0x80; /* pad character */ ++ while( hd->count < 64 ) ++ hd->buf[hd->count++] = 0; ++ rmd160_write(hd, NULL, 0); /* flush */; ++ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */ ++ } ++ /* append the 64 bit count */ ++ hd->buf[56] = lsb ; ++ hd->buf[57] = lsb >> 8; ++ hd->buf[58] = lsb >> 16; ++ hd->buf[59] = lsb >> 24; ++ hd->buf[60] = msb ; ++ hd->buf[61] = msb >> 8; ++ hd->buf[62] = msb >> 16; ++ hd->buf[63] = msb >> 24; ++ transform( hd, hd->buf ); ++ ++ p = hd->buf; ++ #if BYTE_ORDER == BIG_ENDIAN ++ #define X(a) do { *p++ = hd->h##a ; *p++ = hd->h##a >> 8; \ ++ *p++ = hd->h##a >> 16; *p++ = hd->h##a >> 24; } while(0) ++ #else /* little endian */ ++ #define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0) ++ #endif ++ X(0); ++ X(1); ++ X(2); ++ X(3); ++ X(4); ++ #undef X ++} ++ ++/**************** ++ * Shortcut functions which puts the hash value of the supplied buffer ++ * into outbuf which must have a size of 20 bytes. ++ */ ++void ++rmd160_hash_buffer( unsigned char *outbuf, const unsigned char *buffer, size_t length ) ++{ ++ RMD160_CONTEXT hd; ++ ++ rmd160_init( &hd ); ++ rmd160_write( &hd, buffer, length ); ++ rmd160_final( &hd ); ++ memcpy( outbuf, hd.buf, 20 ); ++} +Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c +=================================================================== +--- /dev/null ++++ util-linux-ng-2.13rc2+git20070725/mount/sha512.c +@@ -0,0 +1,432 @@ ++/* ++ * sha512.c ++ * ++ * Written by Jari Ruusu, April 16 2001 ++ * ++ * Copyright 2001 by Jari Ruusu. ++ * Redistribution of this file is permitted under the GNU Public License. ++ */ ++ ++#include ++#include ++#include "sha512.h" ++ ++/* Define one or more of these. If none is defined, you get all of them */ ++#if !defined(SHA256_NEEDED)&&!defined(SHA512_NEEDED)&&!defined(SHA384_NEEDED) ++# define SHA256_NEEDED 1 ++# define SHA512_NEEDED 1 ++# define SHA384_NEEDED 1 ++#endif ++ ++#if defined(SHA256_NEEDED) ++static const u_int32_t sha256_hashInit[8] = { ++ 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, ++ 0x1f83d9ab, 0x5be0cd19 ++}; ++static const u_int32_t sha256_K[64] = { ++ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, ++ 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, ++ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, ++ 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, ++ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, ++ 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, ++ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, ++ 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, ++ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, ++ 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, ++ 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 ++}; ++#endif ++ ++#if defined(SHA512_NEEDED) ++static const u_int64_t sha512_hashInit[8] = { ++ 0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, 0x3c6ef372fe94f82bULL, ++ 0xa54ff53a5f1d36f1ULL, 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, ++ 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL ++}; ++#endif ++ ++#if defined(SHA384_NEEDED) ++static const u_int64_t sha384_hashInit[8] = { ++ 0xcbbb9d5dc1059ed8ULL, 0x629a292a367cd507ULL, 0x9159015a3070dd17ULL, ++ 0x152fecd8f70e5939ULL, 0x67332667ffc00b31ULL, 0x8eb44a8768581511ULL, ++ 0xdb0c2e0d64f98fa7ULL, 0x47b5481dbefa4fa4ULL ++}; ++#endif ++ ++#if defined(SHA512_NEEDED) || defined(SHA384_NEEDED) ++static const u_int64_t sha512_K[80] = { ++ 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL, ++ 0xe9b5dba58189dbbcULL, 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL, ++ 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL, 0xd807aa98a3030242ULL, ++ 0x12835b0145706fbeULL, 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL, ++ 0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL, 0x9bdc06a725c71235ULL, ++ 0xc19bf174cf692694ULL, 0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL, ++ 0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL, 0x2de92c6f592b0275ULL, ++ 0x4a7484aa6ea6e483ULL, 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL, ++ 0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL, 0xb00327c898fb213fULL, ++ 0xbf597fc7beef0ee4ULL, 0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL, ++ 0x06ca6351e003826fULL, 0x142929670a0e6e70ULL, 0x27b70a8546d22ffcULL, ++ 0x2e1b21385c26c926ULL, 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL, ++ 0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL, 0x81c2c92e47edaee6ULL, ++ 0x92722c851482353bULL, 0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL, ++ 0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL, 0xd192e819d6ef5218ULL, ++ 0xd69906245565a910ULL, 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL, ++ 0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL, 0x2748774cdf8eeb99ULL, ++ 0x34b0bcb5e19b48a8ULL, 0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL, ++ 0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL, 0x748f82ee5defb2fcULL, ++ 0x78a5636f43172f60ULL, 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL, ++ 0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL, 0xbef9a3f7b2c67915ULL, ++ 0xc67178f2e372532bULL, 0xca273eceea26619cULL, 0xd186b8c721c0c207ULL, ++ 0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL, 0x06f067aa72176fbaULL, ++ 0x0a637dc5a2c898a6ULL, 0x113f9804bef90daeULL, 0x1b710b35131c471bULL, ++ 0x28db77f523047d84ULL, 0x32caab7b40c72493ULL, 0x3c9ebe0a15c9bebcULL, ++ 0x431d67c49c100d4cULL, 0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL, ++ 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL ++}; ++#endif ++ ++#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z))) ++#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) ++#define R(x,y) ((y) >> (x)) ++ ++#if defined(SHA256_NEEDED) ++void sha256_init(sha256_context *ctx) ++{ ++ memcpy(&ctx->sha_H[0], &sha256_hashInit[0], sizeof(ctx->sha_H)); ++ ctx->sha_blocks = 0; ++ ctx->sha_bufCnt = 0; ++} ++ ++#define S(x,y) (((y) >> (x)) | ((y) << (32 - (x)))) ++#define uSig0(x) ((S(2,(x))) ^ (S(13,(x))) ^ (S(22,(x)))) ++#define uSig1(x) ((S(6,(x))) ^ (S(11,(x))) ^ (S(25,(x)))) ++#define lSig0(x) ((S(7,(x))) ^ (S(18,(x))) ^ (R(3,(x)))) ++#define lSig1(x) ((S(17,(x))) ^ (S(19,(x))) ^ (R(10,(x)))) ++ ++static void sha256_transform(sha256_context *ctx, const unsigned char *datap) ++{ ++ register int j; ++ u_int32_t a, b, c, d, e, f, g, h; ++ u_int32_t T1, T2, W[64], Wm2, Wm15; ++ ++ /* read the data, big endian byte order */ ++ j = 0; ++ do { ++ W[j] = (((u_int32_t)(datap[0]))<<24) | (((u_int32_t)(datap[1]))<<16) | ++ (((u_int32_t)(datap[2]))<<8 ) | ((u_int32_t)(datap[3])); ++ datap += 4; ++ } while(++j < 16); ++ ++ /* initialize variables a...h */ ++ a = ctx->sha_H[0]; ++ b = ctx->sha_H[1]; ++ c = ctx->sha_H[2]; ++ d = ctx->sha_H[3]; ++ e = ctx->sha_H[4]; ++ f = ctx->sha_H[5]; ++ g = ctx->sha_H[6]; ++ h = ctx->sha_H[7]; ++ ++ /* apply compression function */ ++ j = 0; ++ do { ++ if(j >= 16) { ++ Wm2 = W[j - 2]; ++ Wm15 = W[j - 15]; ++ W[j] = lSig1(Wm2) + W[j - 7] + lSig0(Wm15) + W[j - 16]; ++ } ++ T1 = h + uSig1(e) + Ch(e,f,g) + sha256_K[j] + W[j]; ++ T2 = uSig0(a) + Maj(a,b,c); ++ h = g; g = f; f = e; ++ e = d + T1; ++ d = c; c = b; b = a; ++ a = T1 + T2; ++ } while(++j < 64); ++ ++ /* compute intermediate hash value */ ++ ctx->sha_H[0] += a; ++ ctx->sha_H[1] += b; ++ ctx->sha_H[2] += c; ++ ctx->sha_H[3] += d; ++ ctx->sha_H[4] += e; ++ ctx->sha_H[5] += f; ++ ctx->sha_H[6] += g; ++ ctx->sha_H[7] += h; ++ ++ ctx->sha_blocks++; ++} ++ ++void sha256_write(sha256_context *ctx, const unsigned char *datap, int length) ++{ ++ while(length > 0) { ++ if(!ctx->sha_bufCnt) { ++ while(length >= sizeof(ctx->sha_out)) { ++ sha256_transform(ctx, datap); ++ datap += sizeof(ctx->sha_out); ++ length -= sizeof(ctx->sha_out); ++ } ++ if(!length) return; ++ } ++ ctx->sha_out[ctx->sha_bufCnt] = *datap++; ++ length--; ++ if(++ctx->sha_bufCnt == sizeof(ctx->sha_out)) { ++ sha256_transform(ctx, &ctx->sha_out[0]); ++ ctx->sha_bufCnt = 0; ++ } ++ } ++} ++ ++void sha256_final(sha256_context *ctx) ++{ ++ register int j; ++ u_int64_t bitLength; ++ u_int32_t i; ++ unsigned char padByte, *datap; ++ ++ bitLength = (ctx->sha_blocks << 9) | (ctx->sha_bufCnt << 3); ++ padByte = 0x80; ++ sha256_write(ctx, &padByte, 1); ++ ++ /* pad extra space with zeroes */ ++ padByte = 0; ++ while(ctx->sha_bufCnt != 56) { ++ sha256_write(ctx, &padByte, 1); ++ } ++ ++ /* write bit length, big endian byte order */ ++ ctx->sha_out[56] = bitLength >> 56; ++ ctx->sha_out[57] = bitLength >> 48; ++ ctx->sha_out[58] = bitLength >> 40; ++ ctx->sha_out[59] = bitLength >> 32; ++ ctx->sha_out[60] = bitLength >> 24; ++ ctx->sha_out[61] = bitLength >> 16; ++ ctx->sha_out[62] = bitLength >> 8; ++ ctx->sha_out[63] = bitLength; ++ sha256_transform(ctx, &ctx->sha_out[0]); ++ ++ /* return results in ctx->sha_out[0...31] */ ++ datap = &ctx->sha_out[0]; ++ j = 0; ++ do { ++ i = ctx->sha_H[j]; ++ datap[0] = i >> 24; ++ datap[1] = i >> 16; ++ datap[2] = i >> 8; ++ datap[3] = i; ++ datap += 4; ++ } while(++j < 8); ++ ++ /* clear sensitive information */ ++ memset(&ctx->sha_out[32], 0, sizeof(sha256_context) - 32); ++} ++ ++void sha256_hash_buffer(const unsigned char *ib, size_t ile, unsigned char *ob, size_t ole) ++{ ++ sha256_context ctx; ++ ++ if(ole < 1) return; ++ memset(ob, 0, ole); ++ if(ole > 32) ole = 32; ++ sha256_init(&ctx); ++ sha256_write(&ctx, ib, ile); ++ sha256_final(&ctx); ++ memcpy(ob, &ctx.sha_out[0], ole); ++ memset(&ctx, 0, sizeof(ctx)); ++} ++ ++#endif ++ ++#if defined(SHA512_NEEDED) ++void sha512_init(sha512_context *ctx) ++{ ++ memcpy(&ctx->sha_H[0], &sha512_hashInit[0], sizeof(ctx->sha_H)); ++ ctx->sha_blocks = 0; ++ ctx->sha_blocksMSB = 0; ++ ctx->sha_bufCnt = 0; ++} ++#endif ++ ++#if defined(SHA512_NEEDED) || defined(SHA384_NEEDED) ++#undef S ++#undef uSig0 ++#undef uSig1 ++#undef lSig0 ++#undef lSig1 ++#define S(x,y) (((y) >> (x)) | ((y) << (64 - (x)))) ++#define uSig0(x) ((S(28,(x))) ^ (S(34,(x))) ^ (S(39,(x)))) ++#define uSig1(x) ((S(14,(x))) ^ (S(18,(x))) ^ (S(41,(x)))) ++#define lSig0(x) ((S(1,(x))) ^ (S(8,(x))) ^ (R(7,(x)))) ++#define lSig1(x) ((S(19,(x))) ^ (S(61,(x))) ^ (R(6,(x)))) ++ ++static void sha512_transform(sha512_context *ctx, const unsigned char *datap) ++{ ++ register int j; ++ u_int64_t a, b, c, d, e, f, g, h; ++ u_int64_t T1, T2, W[80], Wm2, Wm15; ++ ++ /* read the data, big endian byte order */ ++ j = 0; ++ do { ++ W[j] = (((u_int64_t)(datap[0]))<<56) | (((u_int64_t)(datap[1]))<<48) | ++ (((u_int64_t)(datap[2]))<<40) | (((u_int64_t)(datap[3]))<<32) | ++ (((u_int64_t)(datap[4]))<<24) | (((u_int64_t)(datap[5]))<<16) | ++ (((u_int64_t)(datap[6]))<<8 ) | ((u_int64_t)(datap[7])); ++ datap += 8; ++ } while(++j < 16); ++ ++ /* initialize variables a...h */ ++ a = ctx->sha_H[0]; ++ b = ctx->sha_H[1]; ++ c = ctx->sha_H[2]; ++ d = ctx->sha_H[3]; ++ e = ctx->sha_H[4]; ++ f = ctx->sha_H[5]; ++ g = ctx->sha_H[6]; ++ h = ctx->sha_H[7]; ++ ++ /* apply compression function */ ++ j = 0; ++ do { ++ if(j >= 16) { ++ Wm2 = W[j - 2]; ++ Wm15 = W[j - 15]; ++ W[j] = lSig1(Wm2) + W[j - 7] + lSig0(Wm15) + W[j - 16]; ++ } ++ T1 = h + uSig1(e) + Ch(e,f,g) + sha512_K[j] + W[j]; ++ T2 = uSig0(a) + Maj(a,b,c); ++ h = g; g = f; f = e; ++ e = d + T1; ++ d = c; c = b; b = a; ++ a = T1 + T2; ++ } while(++j < 80); ++ ++ /* compute intermediate hash value */ ++ ctx->sha_H[0] += a; ++ ctx->sha_H[1] += b; ++ ctx->sha_H[2] += c; ++ ctx->sha_H[3] += d; ++ ctx->sha_H[4] += e; ++ ctx->sha_H[5] += f; ++ ctx->sha_H[6] += g; ++ ctx->sha_H[7] += h; ++ ++ ctx->sha_blocks++; ++ if(!ctx->sha_blocks) ctx->sha_blocksMSB++; ++} ++ ++void sha512_write(sha512_context *ctx, const unsigned char *datap, int length) ++{ ++ while(length > 0) { ++ if(!ctx->sha_bufCnt) { ++ while(length >= sizeof(ctx->sha_out)) { ++ sha512_transform(ctx, datap); ++ datap += sizeof(ctx->sha_out); ++ length -= sizeof(ctx->sha_out); ++ } ++ if(!length) return; ++ } ++ ctx->sha_out[ctx->sha_bufCnt] = *datap++; ++ length--; ++ if(++ctx->sha_bufCnt == sizeof(ctx->sha_out)) { ++ sha512_transform(ctx, &ctx->sha_out[0]); ++ ctx->sha_bufCnt = 0; ++ } ++ } ++} ++ ++void sha512_final(sha512_context *ctx) ++{ ++ register int j; ++ u_int64_t bitLength, bitLengthMSB; ++ u_int64_t i; ++ unsigned char padByte, *datap; ++ ++ bitLength = (ctx->sha_blocks << 10) | (ctx->sha_bufCnt << 3); ++ bitLengthMSB = (ctx->sha_blocksMSB << 10) | (ctx->sha_blocks >> 54); ++ padByte = 0x80; ++ sha512_write(ctx, &padByte, 1); ++ ++ /* pad extra space with zeroes */ ++ padByte = 0; ++ while(ctx->sha_bufCnt != 112) { ++ sha512_write(ctx, &padByte, 1); ++ } ++ ++ /* write bit length, big endian byte order */ ++ ctx->sha_out[112] = bitLengthMSB >> 56; ++ ctx->sha_out[113] = bitLengthMSB >> 48; ++ ctx->sha_out[114] = bitLengthMSB >> 40; ++ ctx->sha_out[115] = bitLengthMSB >> 32; ++ ctx->sha_out[116] = bitLengthMSB >> 24; ++ ctx->sha_out[117] = bitLengthMSB >> 16; ++ ctx->sha_out[118] = bitLengthMSB >> 8; ++ ctx->sha_out[119] = bitLengthMSB; ++ ctx->sha_out[120] = bitLength >> 56; ++ ctx->sha_out[121] = bitLength >> 48; ++ ctx->sha_out[122] = bitLength >> 40; ++ ctx->sha_out[123] = bitLength >> 32; ++ ctx->sha_out[124] = bitLength >> 24; ++ ctx->sha_out[125] = bitLength >> 16; ++ ctx->sha_out[126] = bitLength >> 8; ++ ctx->sha_out[127] = bitLength; ++ sha512_transform(ctx, &ctx->sha_out[0]); ++ ++ /* return results in ctx->sha_out[0...63] */ ++ datap = &ctx->sha_out[0]; ++ j = 0; ++ do { ++ i = ctx->sha_H[j]; ++ datap[0] = i >> 56; ++ datap[1] = i >> 48; ++ datap[2] = i >> 40; ++ datap[3] = i >> 32; ++ datap[4] = i >> 24; ++ datap[5] = i >> 16; ++ datap[6] = i >> 8; ++ datap[7] = i; ++ datap += 8; ++ } while(++j < 8); ++ ++ /* clear sensitive information */ ++ memset(&ctx->sha_out[64], 0, sizeof(sha512_context) - 64); ++} ++ ++void sha512_hash_buffer(const unsigned char *ib, size_t ile, unsigned char *ob, size_t ole) ++{ ++ sha512_context ctx; ++ ++ if(ole < 1) return; ++ memset(ob, 0, ole); ++ if(ole > 64) ole = 64; ++ sha512_init(&ctx); ++ sha512_write(&ctx, ib, ile); ++ sha512_final(&ctx); ++ memcpy(ob, &ctx.sha_out[0], ole); ++ memset(&ctx, 0, sizeof(ctx)); ++} ++#endif ++ ++#if defined(SHA384_NEEDED) ++void sha384_init(sha512_context *ctx) ++{ ++ memcpy(&ctx->sha_H[0], &sha384_hashInit[0], sizeof(ctx->sha_H)); ++ ctx->sha_blocks = 0; ++ ctx->sha_blocksMSB = 0; ++ ctx->sha_bufCnt = 0; ++} ++ ++void sha384_hash_buffer(const unsigned char *ib, size_t ile, unsigned char *ob, size_t ole) ++{ ++ sha512_context ctx; ++ ++ if(ole < 1) return; ++ memset(ob, 0, ole); ++ if(ole > 48) ole = 48; ++ sha384_init(&ctx); ++ sha512_write(&ctx, ib, ile); ++ sha512_final(&ctx); ++ memcpy(ob, &ctx.sha_out[0], ole); ++ memset(&ctx, 0, sizeof(ctx)); ++} ++#endif +Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.h +=================================================================== +--- /dev/null ++++ util-linux-ng-2.13rc2+git20070725/mount/sha512.h +@@ -0,0 +1,45 @@ ++/* ++ * sha512.h ++ * ++ * Written by Jari Ruusu, April 16 2001 ++ * ++ * Copyright 2001 by Jari Ruusu. ++ * Redistribution of this file is permitted under the GNU Public License. ++ */ ++ ++#include ++ ++typedef struct { ++ unsigned char sha_out[64]; /* results are here, bytes 0...31 */ ++ u_int32_t sha_H[8]; ++ u_int64_t sha_blocks; ++ int sha_bufCnt; ++} sha256_context; ++ ++typedef struct { ++ unsigned char sha_out[128]; /* results are here, bytes 0...63 */ ++ u_int64_t sha_H[8]; ++ u_int64_t sha_blocks; ++ u_int64_t sha_blocksMSB; ++ int sha_bufCnt; ++} sha512_context; ++ ++/* no sha384_context, use sha512_context */ ++ ++/* 256 bit hash, provides 128 bits of security against collision attacks */ ++extern void sha256_init(sha256_context *); ++extern void sha256_write(sha256_context *, const unsigned char *, int); ++extern void sha256_final(sha256_context *); ++extern void sha256_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); ++ ++/* 512 bit hash, provides 256 bits of security against collision attacks */ ++extern void sha512_init(sha512_context *); ++extern void sha512_write(sha512_context *, const unsigned char *, int); ++extern void sha512_final(sha512_context *); ++extern void sha512_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); ++ ++/* 384 bit hash, provides 192 bits of security against collision attacks */ ++extern void sha384_init(sha512_context *); ++/* no sha384_write(), use sha512_write() */ ++/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ ++extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); diff --git a/util-linux.changes b/util-linux.changes index 6e9c3cf..c2867ee 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 28 16:42:04 CEST 2007 - lnussel@suse.de + +- add support for specifying the key length and password hash + algorithm [#304861] + ------------------------------------------------------------------- Fri Aug 24 14:09:19 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 9c30509..9c5485b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD 3-Clause, GPL v2 or later Group: System/Base Autoreqprov: on Version: 2.12r+2.13rc2+git20070725 -Release: 12 +Release: 14 %define upver 2.13rc2+git20070725 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 @@ -71,6 +71,9 @@ Patch45: util-linux-2.13-sys_utils_build_rdev_x86_64.patch Patch46: util-linux-2.13-loop.patch Patch47: util-linux-2.13-mount_create_mtab.patch Patch48: util-linux-2.13-schedutils_error_handling.patch +# 304861 - support password hashing and key length +Patch49: cryptsetup-2.13-crypto.diff +## ## ## adjtimex ## @@ -117,6 +120,7 @@ Authors: %patch46 -p1 %patch47 -p1 %patch48 -p1 +%patch49 -p1 # cd adjtimex-* %patch50 -p1 @@ -557,6 +561,9 @@ fi #%endif %changelog +* Tue Aug 28 2007 - lnussel@suse.de +- add support for specifying the key length and password hash + algorithm [#304861] * Fri Aug 24 2007 - mkoenig@suse.de - avoid duplicates of root fs if defined with LABEL in fstab [#297959] From f82f33c7bde9beb6fd29c8a5c417b1204967a00c420d898f249f1455740262ba Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 29 Aug 2007 20:46:52 +0000 Subject: [PATCH 029/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=29 --- cryptsetup-2.13-crypto.diff | 31 +++++++++++++------- util-linux-2.13-mount_fd_leak.patch | 12 ++++++++ util-linux.changes | 5 ++++ util-linux.spec | 45 +++++++++++++++-------------- 4 files changed, 61 insertions(+), 32 deletions(-) create mode 100644 util-linux-2.13-mount_fd_leak.patch diff --git a/cryptsetup-2.13-crypto.diff b/cryptsetup-2.13-crypto.diff index efade6d..2c55a42 100644 --- a/cryptsetup-2.13-crypto.diff +++ b/cryptsetup-2.13-crypto.diff @@ -130,7 +130,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c mode = (*loopro ? O_RDONLY : O_RDWR); if ((ffd = open(file, mode)) < 0) { -@@ -297,15 +331,39 @@ set_loop(const char *device, const char +@@ -297,15 +331,43 @@ set_loop(const char *device, const char memset(&loopinfo64, 0, sizeof(loopinfo64)); @@ -143,6 +143,8 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c + // a hint for suse users + if(!strcmp(encryption, "twofishSL92")) { + fprintf(stderr, _("twofishSL92 is not supported via cryptoloop, please use dm-crypt to access the volume\n")); ++ close(fd); ++ close(ffd); + return 1; + } if (digits_only(encryption)) { @@ -167,13 +169,15 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c + fprintf(stderr, _("please either specify '%s%d' or -e '%s' -k '%d'\n"), + loopinfo64.lo_crypt_name, loopinfo64.lo_encrypt_key_size<<3, + loopinfo64.lo_crypt_name, keysz); ++ close(fd); ++ close(ffd); + return 1; + } + loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI; } } -@@ -325,20 +383,57 @@ set_loop(const char *device, const char +@@ -325,20 +387,64 @@ set_loop(const char *device, const char } #endif @@ -194,8 +198,11 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c - xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE); + + pass = xgetpass(pfd, _("Password: ")); -+ if(!pass) ++ if(!pass) { ++ close(fd); ++ close(ffd); + return 1; ++ } + + // set default hash functions, loop-AES compatible + if(loopinfo64.lo_encrypt_type == LO_CRYPT_CRYPTOAPI) { @@ -211,6 +218,8 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c + if(!keysz) { + if(verbose) + fprintf(stderr, _("please specify a key length\n")); ++ close(fd); ++ close(ffd); + return 1; + } + loopinfo64.lo_encrypt_key_size = keysz>>3; @@ -229,6 +238,8 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c + hfunc = phash_none; + } else { + fprintf(stderr, _("unsupported hash method '%s'\n"), phash); ++ close(fd); ++ close(ffd); + return 1; + } + } @@ -243,7 +254,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c } if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { -@@ -416,8 +511,8 @@ mutter(void) { +@@ -416,8 +522,8 @@ mutter(void) { } int @@ -254,7 +265,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c mutter(); return 1; } -@@ -456,7 +551,13 @@ usage(void) { +@@ -456,7 +562,13 @@ usage(void) { " %1$s [ options ] {-f|--find|loop_device} file # setup\n" "\nOptions:\n" " -e | --encryption enable data encryption with specified \n" @@ -268,7 +279,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c " -o | --offset start at offset into file\n" " -p | --pass-fd read passphrase from file descriptor \n" " -r | --read-only setup read-only loop device\n" -@@ -497,11 +598,14 @@ error (const char *fmt, ...) { +@@ -497,11 +609,14 @@ error (const char *fmt, ...) { int main(int argc, char **argv) { char *p, *offset, *encryption, *passfd, *device, *file; @@ -283,7 +294,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c unsigned long long off; struct option longopts[] = { { "all", 0, 0, 'a' }, -@@ -509,6 +613,8 @@ main(int argc, char **argv) { +@@ -509,6 +624,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -292,7 +303,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c { "offset", 1, 0, 'o' }, { "pass-fd", 1, 0, 'p' }, { "read-only", 0, 0, 'r' }, -@@ -524,12 +630,13 @@ main(int argc, char **argv) { +@@ -524,12 +641,13 @@ main(int argc, char **argv) { delete = find = all = 0; off = 0; offset = encryption = passfd = NULL; @@ -307,7 +318,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -548,6 +655,12 @@ main(int argc, char **argv) { +@@ -548,6 +666,12 @@ main(int argc, char **argv) { case 'f': find = 1; break; @@ -320,7 +331,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c case 'o': offset = optarg; break; -@@ -611,8 +724,10 @@ main(int argc, char **argv) { +@@ -611,8 +735,10 @@ main(int argc, char **argv) { usage(); if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(); diff --git a/util-linux-2.13-mount_fd_leak.patch b/util-linux-2.13-mount_fd_leak.patch new file mode 100644 index 0000000..d88ec05 --- /dev/null +++ b/util-linux-2.13-mount_fd_leak.patch @@ -0,0 +1,12 @@ +Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.c ++++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c +@@ -325,6 +325,7 @@ set_loop(const char *device, const char + } + if ((fd = open(device, mode)) < 0) { + perror (device); ++ close(ffd); + return 1; + } + *loopro = (mode == O_RDONLY); diff --git a/util-linux.changes b/util-linux.changes index c2867ee..4896993 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Aug 29 12:22:21 CEST 2007 - mkoenig@suse.de + +- fix fd leaks in previous patch + ------------------------------------------------------------------- Tue Aug 28 16:42:04 CEST 2007 - lnussel@suse.de diff --git a/util-linux.spec b/util-linux.spec index 9c5485b..7e1c81c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD 3-Clause, GPL v2 or later Group: System/Base Autoreqprov: on Version: 2.12r+2.13rc2+git20070725 -Release: 14 +Release: 16 %define upver 2.13rc2+git20070725 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 @@ -52,27 +52,28 @@ Source30: README.largedisk # add hostid Patch1: util-linux-2.12-misc_utils_hostid.patch # 104405 - mount -a doesn't work with hotpluggable devices -Patch16: util-linux-mount_opt_nofail.patch +Patch2: util-linux-mount_opt_nofail.patch # 176582 - If the user doesn't specify -t mount.fstype will never be called #TODO: check alternative upstream fix #Patch96: util-linux-2.12r-mount_external_prog_on_guess.patch # 160822 - fix for 153657 -Patch29: util-linux-2.12r-fdisk_cyl.patch +Patch3: util-linux-2.12r-fdisk_cyl.patch # 238687 - let mkfs tools open block devices with O_EXCL -Patch34: util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch +Patch4: util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch # 241372 - remove legacy warnings from fdisk -Patch35: util-linux-2.12r-fdisk_remove_bogus_warnings.patch +Patch5: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # 254437 - swapon should automatically reset the suspend signature # TODO: Needs to be ported to new version Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch # suse48633 - util-linux on x86_64 does not contain "rdev" and "vidmode" -Patch45: util-linux-2.13-sys_utils_build_rdev_x86_64.patch +Patch6: util-linux-2.13-sys_utils_build_rdev_x86_64.patch # 297172 - mount does not free loop devices if it fails -Patch46: util-linux-2.13-loop.patch -Patch47: util-linux-2.13-mount_create_mtab.patch -Patch48: util-linux-2.13-schedutils_error_handling.patch +Patch7: util-linux-2.13-loop.patch +Patch8: util-linux-2.13-mount_create_mtab.patch +Patch9: util-linux-2.13-schedutils_error_handling.patch # 304861 - support password hashing and key length -Patch49: cryptsetup-2.13-crypto.diff +Patch10: cryptsetup-2.13-crypto.diff +Patch11: util-linux-2.13-mount_fd_leak.patch ## ## ## adjtimex @@ -108,19 +109,17 @@ Authors: %prep %setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%upver %patch1 -p1 -%patch16 -p1 -#%patch26 -%patch29 -p1 -#%patch30 -p1 -#%patch32 -p1 -%patch34 -p1 -%patch35 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 #%patch38 -p1 -%patch45 -p1 -%patch46 -p1 -%patch47 -p1 -%patch48 -p1 -%patch49 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 # cd adjtimex-* %patch50 -p1 @@ -561,6 +560,8 @@ fi #%endif %changelog +* Wed Aug 29 2007 - mkoenig@suse.de +- fix fd leaks in previous patch * Tue Aug 28 2007 - lnussel@suse.de - add support for specifying the key length and password hash algorithm [#304861] From da3bbca9811ed189e87c22bcd9aeaca813be63706f0f43e0fe307dd559392bc1 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 14 Sep 2007 14:28:15 +0000 Subject: [PATCH 030/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=30 --- util-linux-2.13-fdisk_cfdisk_ncursesw.patch | 13 +++++++++++++ util-linux.changes | 6 ++++++ util-linux.spec | 12 ++++++++---- 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 util-linux-2.13-fdisk_cfdisk_ncursesw.patch diff --git a/util-linux-2.13-fdisk_cfdisk_ncursesw.patch b/util-linux-2.13-fdisk_cfdisk_ncursesw.patch new file mode 100644 index 0000000..20f3226 --- /dev/null +++ b/util-linux-2.13-fdisk_cfdisk_ncursesw.patch @@ -0,0 +1,13 @@ +Index: util-linux-ng-2.13rc2+git20070725/fdisk/Makefile.am +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/fdisk/Makefile.am ++++ util-linux-ng-2.13rc2+git20070725/fdisk/Makefile.am +@@ -29,7 +29,7 @@ if HAVE_NCURSES + sbin_PROGRAMS += cfdisk + man_MANS += cfdisk.8 + cfdisk_SOURCES = cfdisk.c $(fdisk_common) +-cfdisk_LDADD = -lncurses ++cfdisk_LDADD = -lncursesw + endif + endif + diff --git a/util-linux.changes b/util-linux.changes index 4896993..aa643f9 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Sep 14 11:24:33 CEST 2007 - mkoenig@suse.de + +- link cfdisk against libncursesw instead libncurses to fix + broken utf-8 characters [#307353] + ------------------------------------------------------------------- Wed Aug 29 12:22:21 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 7e1c81c..1b05cdc 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -12,16 +12,16 @@ Name: util-linux BuildRequires: audit-devel gettext-devel libuuid-devel libvolume_id-devel ncurses-devel pam-devel zlib-devel -URL: http://kernel.org/pub/linux/utils/util-linux +Url: http://kernel.org/pub/linux/utils/util-linux Provides: util rawio raw base schedutils Supplements: filesystem(minix) Obsoletes: util rawio raw base schedutils PreReq: %install_info_prereq permissions License: BSD 3-Clause, GPL v2 or later Group: System/Base -Autoreqprov: on +AutoReqProv: on Version: 2.12r+2.13rc2+git20070725 -Release: 16 +Release: 21 %define upver 2.13rc2+git20070725 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 @@ -74,6 +74,7 @@ Patch9: util-linux-2.13-schedutils_error_handling.patch # 304861 - support password hashing and key length Patch10: cryptsetup-2.13-crypto.diff Patch11: util-linux-2.13-mount_fd_leak.patch +Patch12: util-linux-2.13-fdisk_cfdisk_ncursesw.patch ## ## ## adjtimex @@ -120,6 +121,7 @@ Authors: %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 # cd adjtimex-* %patch50 -p1 @@ -330,7 +332,6 @@ fi %install_info_delete --info-dir=%{_infodir} %{_infodir}/time.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/which.info.gz %{insserv_cleanup} - %verifyscript %verify_permissions -e /usr/bin/wall -e /usr/bin/write @@ -560,6 +561,9 @@ fi #%endif %changelog +* Fri Sep 14 2007 - mkoenig@suse.de +- link cfdisk against libncursesw instead libncurses to fix + broken utf-8 characters [#307353] * Wed Aug 29 2007 - mkoenig@suse.de - fix fd leaks in previous patch * Tue Aug 28 2007 - lnussel@suse.de From 84b6fcc9b4df286ebb59f187a36fcc3742a7b3a31f89f3e79cb2758b196dde64 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 2 Oct 2007 23:18:16 +0000 Subject: [PATCH 031/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=31 --- ...2.12r-disk_utils_mkfs_open_exclusive.patch | 39 ----------- util-linux-2.13-hwclock_rtc_option.patch | 70 +++++++++++++++++++ util-linux-2.13-loop.patch | 32 --------- util-linux-2.13-mount_create_mtab.patch | 13 ---- util-linux-2.13-mount_helper_fix.patch | 50 +++++++++++++ ...util-linux-2.13-mount_losetup_crypto.patch | 0 ...linux-2.13-schedutils_error_handling.patch | 55 --------------- ...nux-2.13-sys_utils_build_rdev_x86_64.patch | 16 ----- util-linux-ng-2.13.tar.bz2 | 3 + util-linux-ng-2.13rc2+git20070725.tar.bz2 | 3 - util-linux.changes | 13 ++++ util-linux.spec | 45 ++++++------ 12 files changed, 158 insertions(+), 181 deletions(-) delete mode 100644 util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch create mode 100644 util-linux-2.13-hwclock_rtc_option.patch delete mode 100644 util-linux-2.13-loop.patch delete mode 100644 util-linux-2.13-mount_create_mtab.patch create mode 100644 util-linux-2.13-mount_helper_fix.patch rename cryptsetup-2.13-crypto.diff => util-linux-2.13-mount_losetup_crypto.patch (100%) delete mode 100644 util-linux-2.13-schedutils_error_handling.patch delete mode 100644 util-linux-2.13-sys_utils_build_rdev_x86_64.patch create mode 100644 util-linux-ng-2.13.tar.bz2 delete mode 100644 util-linux-ng-2.13rc2+git20070725.tar.bz2 diff --git a/util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch b/util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch deleted file mode 100644 index 260392e..0000000 --- a/util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch +++ /dev/null @@ -1,39 +0,0 @@ -Index: util-linux-ng-2.12r+git20070330/disk-utils/mkswap.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/disk-utils/mkswap.c -+++ util-linux-ng-2.12r+git20070330/disk-utils/mkswap.c -@@ -660,7 +660,7 @@ main(int argc, char ** argv) { - usage(); - } - -- DEV = open(device_name,O_RDWR); -+ DEV = open(device_name, O_RDWR | O_EXCL); - if (DEV < 0 || fstat(DEV, &statbuf) < 0) { - perror(device_name); - exit(1); -Index: util-linux-ng-2.12r+git20070330/disk-utils/mkfs.minix.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/disk-utils/mkfs.minix.c -+++ util-linux-ng-2.12r+git20070330/disk-utils/mkfs.minix.c -@@ -699,7 +699,7 @@ main(int argc, char ** argv) { - tmp += dirsize; - *(short *)tmp = 2; - strcpy(tmp+2,".badblocks"); -- DEV = open(device_name,O_RDWR ); -+ DEV = open(device_name,O_RDWR | O_EXCL); - if (DEV<0) - die(_("unable to open %s")); - if (fstat(DEV,&statbuf)<0) -Index: util-linux-ng-2.12r+git20070330/disk-utils/mkfs.bfs.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/disk-utils/mkfs.bfs.c -+++ util-linux-ng-2.12r+git20070330/disk-utils/mkfs.bfs.c -@@ -170,7 +170,7 @@ main(int argc, char *argv[]) { - if (!S_ISBLK(statbuf.st_mode)) - fatal(_("%s is not a block special device"), device); - -- fd = open(device, O_RDWR); -+ fd = open(device, O_RDWR | O_EXCL); - if (fd == -1) { - perror(device); - fatal(_("cannot open %s"), device); diff --git a/util-linux-2.13-hwclock_rtc_option.patch b/util-linux-2.13-hwclock_rtc_option.patch new file mode 100644 index 0000000..721734a --- /dev/null +++ b/util-linux-2.13-hwclock_rtc_option.patch @@ -0,0 +1,70 @@ +commit 5d1f6bae3b298809ecd63b3e55f6ab30caaa4dbf +Author: Matthias Koenig +Date: Thu Sep 20 11:11:18 2007 +0200 + + hwclock: fix --rtc option + + The --rtc option does not set the name of the device correctly. + It still uses /dev/rtc even if the --rtc option is given. + + Testcase: + $ mv /dev/rtc /dev/foo + $ hwclock --show --debug --rtc=/dev/foo + hwclock from util-linux-2.13-rc2 + Using /dev interface to clock. + Last drift adjustment done at 1190198135 seconds after 1969 + Last calibration done at 1190198135 seconds after 1969 + Hardware clock is on local time + Assuming hardware clock is kept in local time. + Waiting for clock tick... + hwclock: open() of /dev/rtc failed, errno=2: No such file or directory. + ...got clock tick + + Co-Author: Karel Zak + Signed-off-by: Matthias Koenig + Signed-off-by: Karel Zak + +diff --git a/hwclock/rtc.c b/hwclock/rtc.c +index f8e626e..724daf9 100644 +--- a/hwclock/rtc.c ++++ b/hwclock/rtc.c +@@ -104,24 +104,21 @@ open_rtc(void) { + "/dev/misc/rtc", + NULL + }; +- char **p = fls; +- char *fname = rtc_dev_name ? : *p; +- +- do { +- int fd = open(fname, O_RDONLY); +- +- if (fd < 0 && errno == ENOENT) { +- if (fname == rtc_dev_name) +- break; +- fname = *++p; +- } else { +- rtc_dev_name = *p; +- return fd; +- } +- } while(fname); +- +- if (!rtc_dev_name) +- rtc_dev_name = *fls; ++ char **p; ++ ++ /* --rtc option has been given */ ++ if (rtc_dev_name) ++ return open(rtc_dev_name, O_RDONLY); ++ ++ for (p=fls; *p; ++p) { ++ int fd = open(*p, O_RDONLY); ++ ++ if (fd < 0 && errno == ENOENT) ++ continue; ++ rtc_dev_name = *p; ++ return fd; ++ } ++ rtc_dev_name = *fls; /* default */ + return -1; + } + diff --git a/util-linux-2.13-loop.patch b/util-linux-2.13-loop.patch deleted file mode 100644 index ca5698c..0000000 --- a/util-linux-2.13-loop.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- util-linux-ng-2.13rc2+git20070725/mount/lomount.c.org 2007-08-16 17:09:33.258902000 +0200 -+++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c 2007-08-16 17:09:43.016135000 +0200 -@@ -398,6 +398,7 @@ - } - if (ioctl (fd, LOOP_CLR_FD, 0) < 0) { - perror ("ioctl: LOOP_CLR_FD"); -+ close(fd); - return 1; - } - close (fd); ---- util-linux-ng-2.13rc2+git20070725/mount/fsprobe_volumeid.c.org 2007-08-16 18:16:03.120065000 +0200 -+++ util-linux-ng-2.13rc2+git20070725/mount/fsprobe_volumeid.c 2007-08-16 18:27:43.967526000 +0200 -@@ -34,8 +34,10 @@ - return NULL; - - id = volume_id_open_fd(fd); -- if (!id) -+ if (!id) { -+ close(fd); - return NULL; -+ } - - /* TODO: use blkdev_get_size() */ - if (ioctl(fd, BLKGETSIZE64, &size) != 0) -@@ -61,6 +63,7 @@ - } - - volume_id_close(id); -+ close(fd); - return value; - } - diff --git a/util-linux-2.13-mount_create_mtab.patch b/util-linux-2.13-mount_create_mtab.patch deleted file mode 100644 index 4d26d69..0000000 --- a/util-linux-2.13-mount_create_mtab.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/mount.c -+++ util-linux-ng-2.13rc2+git20070725/mount/mount.c -@@ -546,7 +546,7 @@ create_mtab (void) { - char *extra_opts; - parse_opts (fstab->m.mnt_opts, &flags, &extra_opts); - mnt.mnt_dir = "/"; -- mnt.mnt_fsname = canonicalize (fstab->m.mnt_fsname); -+ mnt.mnt_fsname = fsprobe_get_devname(fstab->m.mnt_fsname); - mnt.mnt_type = fstab->m.mnt_type; - mnt.mnt_opts = fix_opts_string (flags, extra_opts, NULL); - mnt.mnt_freq = mnt.mnt_passno = 0; diff --git a/util-linux-2.13-mount_helper_fix.patch b/util-linux-2.13-mount_helper_fix.patch new file mode 100644 index 0000000..0d4ca83 --- /dev/null +++ b/util-linux-2.13-mount_helper_fix.patch @@ -0,0 +1,50 @@ +commit ebbeb2c7ac1b00b6083905957837a271e80b187e +Author: Ludwig Nussel +Date: Thu Sep 20 14:57:20 2007 +0200 + + mount: doesn't drop privileges properly when calling helpers + + {,u}mount calls setuid() and setgid() in the wrong order and doesn't checking + the return value of set{u,g}id(() when running helpers like mount.nfs. + + Signed-off-by: Ludwig Nussel + Signed-off-by: Karel Zak + +diff --git a/mount/mount.c b/mount/mount.c +index 40699f3..5bc2b30 100644 +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -634,8 +634,12 @@ check_special_mountprog(const char *spec, const char *node, const char *type, in + char *oo, *mountargs[10]; + int i = 0; + +- setuid(getuid()); +- setgid(getgid()); ++ if(setgid(getgid()) < 0) ++ die(EX_FAIL, _("mount: cannot set group id: %s"), strerror(errno)); ++ ++ if(setuid(getuid()) < 0) ++ die(EX_FAIL, _("mount: cannot set user id: %s"), strerror(errno)); ++ + oo = fix_opts_string (flags, extra_opts, NULL); + mountargs[i++] = mountprog; /* 1 */ + mountargs[i++] = (char *) spec; /* 2 */ +diff --git a/mount/umount.c b/mount/umount.c +index b3100c9..3221619 100644 +--- a/mount/umount.c ++++ b/mount/umount.c +@@ -102,8 +102,12 @@ check_special_umountprog(const char *spec, const char *node, + char *umountargs[8]; + int i = 0; + +- setuid(getuid()); +- setgid(getgid()); ++ if(setgid(getgid()) < 0) ++ die(EX_FAIL, _("umount: cannot set group id: %s"), strerror(errno)); ++ ++ if(setuid(getuid()) < 0) ++ die(EX_FAIL, _("umount: cannot set user id: %s"), strerror(errno)); ++ + umountargs[i++] = umountprog; + umountargs[i++] = xstrdup(node); + if (nomtab) diff --git a/cryptsetup-2.13-crypto.diff b/util-linux-2.13-mount_losetup_crypto.patch similarity index 100% rename from cryptsetup-2.13-crypto.diff rename to util-linux-2.13-mount_losetup_crypto.patch diff --git a/util-linux-2.13-schedutils_error_handling.patch b/util-linux-2.13-schedutils_error_handling.patch deleted file mode 100644 index 2bd26b2..0000000 --- a/util-linux-2.13-schedutils_error_handling.patch +++ /dev/null @@ -1,55 +0,0 @@ -Original patch from Bernhard Voelker. - -Index: util-linux-ng-2.13rc2+git20070725/schedutils/ionice.c -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/schedutils/ionice.c -+++ util-linux-ng-2.13rc2+git20070725/schedutils/ionice.c -@@ -107,7 +107,7 @@ int main(int argc, char *argv[]) - case 'h': - default: - usage(); -- exit(0); -+ exit(EXIT_SUCCESS); - } - } - -@@ -125,7 +125,7 @@ int main(int argc, char *argv[]) - break; - default: - printf("bad prio class %d\n", ioprio_class); -- return 1; -+ exit(EXIT_FAILURE); - } - - if (!set) { -@@ -134,9 +134,10 @@ int main(int argc, char *argv[]) - - ioprio = ioprio_get(IOPRIO_WHO_PROCESS, pid); - -- if (ioprio == -1) -+ if (ioprio == -1) { - perror("ioprio_get"); -- else { -+ exit(EXIT_FAILURE); -+ } else { - ioprio_class = ioprio >> IOPRIO_CLASS_SHIFT; - if (ioprio_class != IOPRIO_CLASS_IDLE) { - ioprio = ioprio & 0xff; -@@ -147,11 +148,15 @@ int main(int argc, char *argv[]) - } else { - if (ioprio_set(IOPRIO_WHO_PROCESS, pid, ioprio | ioprio_class << IOPRIO_CLASS_SHIFT) == -1) { - perror("ioprio_set"); -- return 1; -+ exit(EXIT_FAILURE); - } - -- if (argv[optind]) -+ if (argv[optind]) { - execvp(argv[optind], &argv[optind]); -+ /* execvp should never return */ -+ perror("execvp"); -+ exit(EXIT_FAILURE); -+ } - } - - return 0; diff --git a/util-linux-2.13-sys_utils_build_rdev_x86_64.patch b/util-linux-2.13-sys_utils_build_rdev_x86_64.patch deleted file mode 100644 index 6e9381d..0000000 --- a/util-linux-2.13-sys_utils_build_rdev_x86_64.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: util-linux-ng-2.13-rc1/sys-utils/Makefile.am -=================================================================== ---- util-linux-ng-2.13-rc1.orig/sys-utils/Makefile.am -+++ util-linux-ng-2.13-rc1/sys-utils/Makefile.am -@@ -26,6 +26,11 @@ usrsbinexec_PROGRAMS += rdev - man_MANS += rdev.8 ramsize.8 rootflags.8 vidmode.8 - RDEV_LINKS = ramsize vidmode rootflags - endif -+if ARCH_86_64 -+usrsbinexec_PROGRAMS += rdev -+man_MANS += rdev.8 ramsize.8 rootflags.8 vidmode.8 -+RDEV_LINKS = ramsize vidmode rootflags -+endif - endif - - SETARCH_LINKS = linux32 linux64 diff --git a/util-linux-ng-2.13.tar.bz2 b/util-linux-ng-2.13.tar.bz2 new file mode 100644 index 0000000..50cedb2 --- /dev/null +++ b/util-linux-ng-2.13.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:002412e93d8e85b1796fdbe65bbb0a4d193d0317a7155fda4270667e08bdfbfc +size 2702618 diff --git a/util-linux-ng-2.13rc2+git20070725.tar.bz2 b/util-linux-ng-2.13rc2+git20070725.tar.bz2 deleted file mode 100644 index bd0e5e3..0000000 --- a/util-linux-ng-2.13rc2+git20070725.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:74640e1af0289d3be9397c8a7c8b62f147a3dbfad232fd4a7ec15a41e9ac1cf8 -size 1544622 diff --git a/util-linux.changes b/util-linux.changes index aa643f9..c35040f 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Oct 1 17:08:06 CEST 2007 - mkoenig@suse.de + +- update to version 2.13 + merged upstream: + util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch + util-linux-2.13-loop.patch + util-linux-2.13-mount_create_mtab.patch + util-linux-2.13-schedutils_error_handling.patch + util-linux-2.13-sys_utils_build_rdev_x86_64.patch +- fix hwclock --rtc option [#326106] +- fix setuid/setgid mixup and error checking [#327022] + ------------------------------------------------------------------- Fri Sep 14 11:24:33 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 1b05cdc..45116de 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.12r+2.13rc2+git20070725) +# spec file for package util-linux (Version 2.13) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -17,12 +17,12 @@ Provides: util rawio raw base schedutils Supplements: filesystem(minix) Obsoletes: util rawio raw base schedutils PreReq: %install_info_prereq permissions -License: BSD 3-Clause, GPL v2 or later +License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on -Version: 2.12r+2.13rc2+git20070725 -Release: 21 -%define upver 2.13rc2+git20070725 +Version: 2.13 +Release: 1 +%define upver 2.13 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 Source2: nologin.c @@ -58,23 +58,17 @@ Patch2: util-linux-mount_opt_nofail.patch #Patch96: util-linux-2.12r-mount_external_prog_on_guess.patch # 160822 - fix for 153657 Patch3: util-linux-2.12r-fdisk_cyl.patch -# 238687 - let mkfs tools open block devices with O_EXCL -Patch4: util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch # 241372 - remove legacy warnings from fdisk Patch5: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # 254437 - swapon should automatically reset the suspend signature # TODO: Needs to be ported to new version Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch -# suse48633 - util-linux on x86_64 does not contain "rdev" and "vidmode" -Patch6: util-linux-2.13-sys_utils_build_rdev_x86_64.patch -# 297172 - mount does not free loop devices if it fails -Patch7: util-linux-2.13-loop.patch -Patch8: util-linux-2.13-mount_create_mtab.patch -Patch9: util-linux-2.13-schedutils_error_handling.patch # 304861 - support password hashing and key length -Patch10: cryptsetup-2.13-crypto.diff +Patch10: util-linux-2.13-mount_losetup_crypto.patch Patch11: util-linux-2.13-mount_fd_leak.patch Patch12: util-linux-2.13-fdisk_cfdisk_ncursesw.patch +Patch13: util-linux-2.13-mount_helper_fix.patch +Patch14: util-linux-2.13-hwclock_rtc_option.patch ## ## ## adjtimex @@ -112,16 +106,13 @@ Authors: %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 %patch5 -p1 #%patch38 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 +%patch14 -p1 # cd adjtimex-* %patch50 -p1 @@ -185,8 +176,8 @@ make setctsid CFLAGS="$RPM_OPT_FLAGS" CFLAGS=-DCONFIG_SMP %endif # Use autogen, when building from git tree -#autoreconf -fi -./autogen.sh +autoreconf -fi +#./autogen.sh ./configure --mandir=%{_mandir} \ --datadir=%{_datadir} \ --with-fsprobe=volume_id \ @@ -324,7 +315,6 @@ rm -rf $RPM_BUILD_ROOT if [ -f etc/fstab ]; then sed -i 's:code=:codepage=:' etc/fstab fi - %postun %install_info_delete --info-dir=%{_infodir} %{_infodir}/freeramdisk.info.gz @@ -559,8 +549,17 @@ fi #/usr/bin/i386 #/usr/bin/ia64 #%endif - %changelog +* Mon Oct 01 2007 - mkoenig@suse.de +- update to version 2.13 + merged upstream: + util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch + util-linux-2.13-loop.patch + util-linux-2.13-mount_create_mtab.patch + util-linux-2.13-schedutils_error_handling.patch + util-linux-2.13-sys_utils_build_rdev_x86_64.patch +- fix hwclock --rtc option [#326106] +- fix setuid/setgid mixup and error checking [#327022] * Fri Sep 14 2007 - mkoenig@suse.de - link cfdisk against libncursesw instead libncurses to fix broken utf-8 characters [#307353] From a685642dab4130e1520dc5aa5cde5f1aae65a4ecac7f089527a3d1a0f5868cd1 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 4 Oct 2007 22:38:54 +0000 Subject: [PATCH 032/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=32 --- util-linux.changes | 5 +++++ util-linux.spec | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/util-linux.changes b/util-linux.changes index c35040f..fd47d96 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Oct 4 22:24:04 CEST 2007 - bg@suse.de + +- don't use parisc, parisc32 and parisc64. + ------------------------------------------------------------------- Mon Oct 1 17:08:06 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 45116de..b6d78b4 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.13 -Release: 1 +Release: 2 %define upver 2.13 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 @@ -273,6 +273,9 @@ rm -f $RPM_BUILD_ROOT/usr/bin/ppc rm -f $RPM_BUILD_ROOT/usr/bin/ppc32 rm -f $RPM_BUILD_ROOT/usr/bin/ppc64 rm -f $RPM_BUILD_ROOT/usr/bin/ia64 +rm -f $RPM_BUILD_ROOT/usr/bin/parisc +rm -f $RPM_BUILD_ROOT/usr/bin/parisc32 +rm -f $RPM_BUILD_ROOT/usr/bin/parisc64 rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/setarch.8 # arch dependent %ifarch s390 s390x @@ -550,6 +553,8 @@ fi #/usr/bin/ia64 #%endif %changelog +* Thu Oct 04 2007 - bg@suse.de +- don't use parisc, parisc32 and parisc64. * Mon Oct 01 2007 - mkoenig@suse.de - update to version 2.13 merged upstream: From e68493f4c1be6da4847bab9778c8820cc2a39bbaad23a7f20f6250ba07a8f3b2 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 9 Nov 2007 00:05:51 +0000 Subject: [PATCH 033/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=33 --- util-linux-2.13-hwclock_rtc_option.patch | 70 -------- util-linux-2.13-mount_helper_fix.patch | 50 ------ util-linux-2.13-mount_losetup_crypto.patch | 192 ++++++++++----------- util-linux-ng-2.13.0.1+git20071106.tar.bz2 | 3 + util-linux-ng-2.13.tar.bz2 | 3 - util-linux.changes | 9 + util-linux.spec | 31 ++-- 7 files changed, 122 insertions(+), 236 deletions(-) delete mode 100644 util-linux-2.13-hwclock_rtc_option.patch delete mode 100644 util-linux-2.13-mount_helper_fix.patch create mode 100644 util-linux-ng-2.13.0.1+git20071106.tar.bz2 delete mode 100644 util-linux-ng-2.13.tar.bz2 diff --git a/util-linux-2.13-hwclock_rtc_option.patch b/util-linux-2.13-hwclock_rtc_option.patch deleted file mode 100644 index 721734a..0000000 --- a/util-linux-2.13-hwclock_rtc_option.patch +++ /dev/null @@ -1,70 +0,0 @@ -commit 5d1f6bae3b298809ecd63b3e55f6ab30caaa4dbf -Author: Matthias Koenig -Date: Thu Sep 20 11:11:18 2007 +0200 - - hwclock: fix --rtc option - - The --rtc option does not set the name of the device correctly. - It still uses /dev/rtc even if the --rtc option is given. - - Testcase: - $ mv /dev/rtc /dev/foo - $ hwclock --show --debug --rtc=/dev/foo - hwclock from util-linux-2.13-rc2 - Using /dev interface to clock. - Last drift adjustment done at 1190198135 seconds after 1969 - Last calibration done at 1190198135 seconds after 1969 - Hardware clock is on local time - Assuming hardware clock is kept in local time. - Waiting for clock tick... - hwclock: open() of /dev/rtc failed, errno=2: No such file or directory. - ...got clock tick - - Co-Author: Karel Zak - Signed-off-by: Matthias Koenig - Signed-off-by: Karel Zak - -diff --git a/hwclock/rtc.c b/hwclock/rtc.c -index f8e626e..724daf9 100644 ---- a/hwclock/rtc.c -+++ b/hwclock/rtc.c -@@ -104,24 +104,21 @@ open_rtc(void) { - "/dev/misc/rtc", - NULL - }; -- char **p = fls; -- char *fname = rtc_dev_name ? : *p; -- -- do { -- int fd = open(fname, O_RDONLY); -- -- if (fd < 0 && errno == ENOENT) { -- if (fname == rtc_dev_name) -- break; -- fname = *++p; -- } else { -- rtc_dev_name = *p; -- return fd; -- } -- } while(fname); -- -- if (!rtc_dev_name) -- rtc_dev_name = *fls; -+ char **p; -+ -+ /* --rtc option has been given */ -+ if (rtc_dev_name) -+ return open(rtc_dev_name, O_RDONLY); -+ -+ for (p=fls; *p; ++p) { -+ int fd = open(*p, O_RDONLY); -+ -+ if (fd < 0 && errno == ENOENT) -+ continue; -+ rtc_dev_name = *p; -+ return fd; -+ } -+ rtc_dev_name = *fls; /* default */ - return -1; - } - diff --git a/util-linux-2.13-mount_helper_fix.patch b/util-linux-2.13-mount_helper_fix.patch deleted file mode 100644 index 0d4ca83..0000000 --- a/util-linux-2.13-mount_helper_fix.patch +++ /dev/null @@ -1,50 +0,0 @@ -commit ebbeb2c7ac1b00b6083905957837a271e80b187e -Author: Ludwig Nussel -Date: Thu Sep 20 14:57:20 2007 +0200 - - mount: doesn't drop privileges properly when calling helpers - - {,u}mount calls setuid() and setgid() in the wrong order and doesn't checking - the return value of set{u,g}id(() when running helpers like mount.nfs. - - Signed-off-by: Ludwig Nussel - Signed-off-by: Karel Zak - -diff --git a/mount/mount.c b/mount/mount.c -index 40699f3..5bc2b30 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -634,8 +634,12 @@ check_special_mountprog(const char *spec, const char *node, const char *type, in - char *oo, *mountargs[10]; - int i = 0; - -- setuid(getuid()); -- setgid(getgid()); -+ if(setgid(getgid()) < 0) -+ die(EX_FAIL, _("mount: cannot set group id: %s"), strerror(errno)); -+ -+ if(setuid(getuid()) < 0) -+ die(EX_FAIL, _("mount: cannot set user id: %s"), strerror(errno)); -+ - oo = fix_opts_string (flags, extra_opts, NULL); - mountargs[i++] = mountprog; /* 1 */ - mountargs[i++] = (char *) spec; /* 2 */ -diff --git a/mount/umount.c b/mount/umount.c -index b3100c9..3221619 100644 ---- a/mount/umount.c -+++ b/mount/umount.c -@@ -102,8 +102,12 @@ check_special_umountprog(const char *spec, const char *node, - char *umountargs[8]; - int i = 0; - -- setuid(getuid()); -- setgid(getgid()); -+ if(setgid(getgid()) < 0) -+ die(EX_FAIL, _("umount: cannot set group id: %s"), strerror(errno)); -+ -+ if(setuid(getuid()) < 0) -+ die(EX_FAIL, _("umount: cannot set user id: %s"), strerror(errno)); -+ - umountargs[i++] = umountprog; - umountargs[i++] = xstrdup(node); - if (nomtab) diff --git a/util-linux-2.13-mount_losetup_crypto.patch b/util-linux-2.13-mount_losetup_crypto.patch index 2c55a42..7a94536 100644 --- a/util-linux-2.13-mount_losetup_crypto.patch +++ b/util-linux-2.13-mount_losetup_crypto.patch @@ -4,10 +4,10 @@ Signed-off-by: Ludwig Nussel -Index: util-linux-ng-2.13rc2+git20070725/mount/Makefile.am +Index: util-linux-ng-2.13.0.1+git20071106/mount/Makefile.am =================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/Makefile.am -+++ util-linux-ng-2.13rc2+git20070725/mount/Makefile.am +--- util-linux-ng-2.13.0.1+git20071106.orig/mount/Makefile.am ++++ util-linux-ng-2.13.0.1+git20071106/mount/Makefile.am @@ -12,7 +12,7 @@ headers_common = fstab.h linux_fs.h moun mount_paths.h lomount.h fsprobe.h realpath.h xmalloc.h \ getusername.h loop.h sundries.h @@ -21,15 +21,15 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/Makefile.am swapon_SOURCES = swapon.c swap_constants.h $(utils_common) --losetup_SOURCES = lomount.c loop.h lomount.h -+losetup_SOURCES = lomount.c loop.h lomount.h rmd160.c sha512.c +-losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c \ ++losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c rmd160.c sha512.c \ + loop.h lomount.h xmalloc.h sundries.h realpath.h losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) - mount_LDADD = $(LDADD_common) -Index: util-linux-ng-2.13rc2+git20070725/mount/rmd160.h +Index: util-linux-ng-2.13.0.1+git20071106/mount/rmd160.h =================================================================== --- /dev/null -+++ util-linux-ng-2.13rc2+git20070725/mount/rmd160.h ++++ util-linux-ng-2.13.0.1+git20071106/mount/rmd160.h @@ -0,0 +1,11 @@ +#ifndef RMD160_H +#define RMD160_H @@ -42,11 +42,11 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/rmd160.h +#endif /*RMD160_H*/ + + -Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c +Index: util-linux-ng-2.13.0.1+git20071106/mount/lomount.c =================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.c -+++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c -@@ -20,9 +20,15 @@ +--- util-linux-ng-2.13.0.1+git20071106.orig/mount/lomount.c ++++ util-linux-ng-2.13.0.1+git20071106/mount/lomount.c +@@ -20,12 +20,18 @@ #include "loop.h" #include "lomount.h" @@ -54,20 +54,23 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c +#include "sha512.h" #include "xstrncpy.h" #include "nls.h" + #include "sundries.h" + #include "xmalloc.h" + #include "realpath.h" +#ifndef MAX +#define MAX(a,b) ((a>b)?(a):(b)) +#endif + - extern int verbose; - extern char *progname; - extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ -@@ -95,12 +101,22 @@ show_loop(char *device) { + #define SIZE(a) (sizeof(a)/sizeof(a[0])) + + #ifdef LOOP_SET_FD +@@ -93,12 +99,22 @@ show_loop(char *device) { if (loopinfo64.lo_encrypt_type || loopinfo64.lo_crypt_name[0]) { -- char *e = loopinfo64.lo_crypt_name; -+ const char *e = (const char*)loopinfo64.lo_crypt_name; +- char *e = (char *)loopinfo64.lo_crypt_name; ++ const char *e = (const char *)loopinfo64.lo_crypt_name; if (*e == 0 && loopinfo64.lo_encrypt_type == 1) e = "XOR"; @@ -88,7 +91,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c } printf("\n"); close (fd); -@@ -259,7 +275,7 @@ xgetpass(int pfd, const char *prompt) { +@@ -353,7 +369,7 @@ xgetpass(int pfd, const char *prompt) { } if (pass == NULL) @@ -97,7 +100,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c pass[i] = 0; return pass; -@@ -273,12 +289,30 @@ digits_only(const char *s) { +@@ -367,12 +383,30 @@ digits_only(const char *s) { return 1; } @@ -127,18 +130,15 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c int fd, ffd, mode, i; - char *pass; + char *pass = NULL; + char *filename; - mode = (*loopro ? O_RDONLY : O_RDWR); - if ((ffd = open(file, mode)) < 0) { -@@ -297,15 +331,43 @@ set_loop(const char *device, const char + if (verbose) { +@@ -406,13 +440,41 @@ set_loop(const char *device, const char + filename = (char *) file; + xstrncpy((char *)loopinfo64.lo_file_name, filename, LO_NAME_SIZE); - memset(&loopinfo64, 0, sizeof(loopinfo64)); - -- xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE); -+ xstrncpy((char*)loopinfo64.lo_file_name, file, LO_NAME_SIZE); -+ + loopinfo64.lo_encrypt_key_size = 0; - ++ if (encryption && *encryption) { + // a hint for suse users + if(!strcmp(encryption, "twofishSL92")) { @@ -151,7 +151,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c loopinfo64.lo_encrypt_type = atoi(encryption); } else { - loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI; -- snprintf(loopinfo64.lo_crypt_name, LO_NAME_SIZE, +- snprintf((char *)loopinfo64.lo_crypt_name, LO_NAME_SIZE, + // check for something like twofish256 + unsigned len = strlen(encryption); + snprintf((char*)loopinfo64.lo_crypt_name, LO_NAME_SIZE, @@ -177,7 +177,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c } } -@@ -325,20 +387,64 @@ set_loop(const char *device, const char +@@ -432,20 +494,64 @@ set_loop(const char *device, const char } #endif @@ -195,7 +195,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c + void (*hfunc)(const unsigned char*, size_t, unsigned char*, size_t) = NULL; + memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE); -- xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE); +- xstrncpy((char *)loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE); + + pass = xgetpass(pfd, _("Password: ")); + if(!pass) { @@ -233,28 +233,28 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c + } else if(!strcasecmp(phash, "sha256")) { + hfunc = sha256_hash_buffer; + } else if(!strcasecmp(phash, "rmd160")) { -+ hfunc = phash_rmd160; -+ } else if(!strcasecmp(phash, "none")) { -+ hfunc = phash_none; -+ } else { -+ fprintf(stderr, _("unsupported hash method '%s'\n"), phash); -+ close(fd); -+ close(ffd); -+ return 1; -+ } -+ } ++ hfunc = phash_rmd160; ++ } else if(!strcasecmp(phash, "none")) { ++ hfunc = phash_none; ++ } else { ++ fprintf(stderr, _("unsupported hash method '%s'\n"), phash); ++ close(fd); ++ close(ffd); ++ return 1; ++ } ++ } + -+ if(hfunc) { -+ hfunc((unsigned char*)pass, strlen(pass), loopinfo64.lo_encrypt_key, loopinfo64.lo_encrypt_key_size); -+ } ++ if(hfunc) { ++ hfunc((unsigned char*)pass, strlen(pass), loopinfo64.lo_encrypt_key, loopinfo64.lo_encrypt_key_size); ++ } + -+ // zero buffer ++ // zero buffer memset(pass, 0, strlen(pass)); - loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE; } if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { -@@ -416,8 +522,8 @@ mutter(void) { +@@ -532,8 +638,8 @@ mutter(void) { } int @@ -265,7 +265,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c mutter(); return 1; } -@@ -456,7 +562,13 @@ usage(void) { +@@ -569,7 +675,13 @@ usage(void) { " %1$s [ options ] {-f|--find|loop_device} file # setup\n" "\nOptions:\n" " -e | --encryption enable data encryption with specified \n" @@ -279,7 +279,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c " -o | --offset start at offset into file\n" " -p | --pass-fd read passphrase from file descriptor \n" " -r | --read-only setup read-only loop device\n" -@@ -497,11 +609,14 @@ error (const char *fmt, ...) { +@@ -582,11 +694,14 @@ usage(void) { int main(int argc, char **argv) { char *p, *offset, *encryption, *passfd, *device, *file; @@ -294,7 +294,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c unsigned long long off; struct option longopts[] = { { "all", 0, 0, 'a' }, -@@ -509,6 +624,8 @@ main(int argc, char **argv) { +@@ -594,6 +709,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -303,7 +303,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c { "offset", 1, 0, 'o' }, { "pass-fd", 1, 0, 'p' }, { "read-only", 0, 0, 'r' }, -@@ -524,12 +641,13 @@ main(int argc, char **argv) { +@@ -609,12 +726,13 @@ main(int argc, char **argv) { delete = find = all = 0; off = 0; offset = encryption = passfd = NULL; @@ -318,7 +318,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -548,6 +666,12 @@ main(int argc, char **argv) { +@@ -633,6 +751,12 @@ main(int argc, char **argv) { case 'f': find = 1; break; @@ -331,7 +331,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c case 'o': offset = optarg; break; -@@ -611,8 +735,10 @@ main(int argc, char **argv) { +@@ -696,8 +820,10 @@ main(int argc, char **argv) { usage(); if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(); @@ -343,11 +343,11 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c if (res == 2 && find) { if (verbose) printf("stolen loop=%s...trying again\n", -Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c +Index: util-linux-ng-2.13.0.1+git20071106/mount/mount.c =================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/mount.c -+++ util-linux-ng-2.13rc2+git20070725/mount/mount.c -@@ -93,6 +93,9 @@ static int suid = 0; +--- util-linux-ng-2.13.0.1+git20071106.orig/mount/mount.c ++++ util-linux-ng-2.13.0.1+git20071106/mount/mount.c +@@ -88,6 +88,9 @@ static int suid = 0; /* Contains the fd to read the passphrase from, if any. */ static int pfd = -1; @@ -357,7 +357,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c /* Map from -o and fstab option strings to the flag argument to mount(2). */ struct opt_map { const char *opt; /* option name */ -@@ -190,6 +193,7 @@ static int opt_nofail = 0; +@@ -185,6 +188,7 @@ static int opt_nofail = 0; static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper; @@ -365,7 +365,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c static int mounted (const char *spec0, const char *node0); static int check_special_mountprog(const char *spec, const char *node, -@@ -204,6 +208,9 @@ static struct string_opt_map { +@@ -199,6 +203,9 @@ static struct string_opt_map { { "vfs=", 1, &opt_vfstype }, { "offset=", 0, &opt_offset }, { "encryption=", 0, &opt_encryption }, @@ -375,7 +375,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c { "speed=", 0, &opt_speed }, { "comment=", 1, &opt_comment }, { "uhelper=", 0, &opt_uhelper }, -@@ -858,7 +865,7 @@ loop_check(const char **spec, const char +@@ -902,7 +909,7 @@ loop_check(const char **spec, const char *type = opt_vfstype; } @@ -384,7 +384,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c *loopfile = *spec; if (*loop) { -@@ -879,9 +886,17 @@ loop_check(const char **spec, const char +@@ -928,9 +935,17 @@ loop_check(const char **spec, const char return EX_SYSERR; /* no more loop devices */ if (verbose) printf(_("mount: going to use the loop device %s\n"), *loopdev); @@ -404,24 +404,15 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c if (res == 2) { /* loop dev has been grabbed by some other process, try again, if not given explicitly */ -@@ -1184,7 +1199,7 @@ try_mount_one (const char *spec0, const - error (_("mount: %s not mounted already, or bad option"), node); - } else { - error (_("mount: wrong fs type, bad option, bad superblock on %s,\n" -- " missing codepage or other error"), -+ " missing codepage or helper program, or other error"), - spec); - - if (stat(spec, &statbuf) == 0 && S_ISBLK(statbuf.st_mode) -@@ -1629,6 +1644,7 @@ static struct option longopts[] = { +@@ -1677,6 +1692,7 @@ static struct option longopts[] = { { "options", 1, 0, 'o' }, { "test-opts", 1, 0, 'O' }, { "pass-fd", 1, 0, 'p' }, + { "keybits", 1, 0, 'k' }, { "types", 1, 0, 't' }, { "bind", 0, 0, 128 }, - { "replace", 0, 0, 129 }, -@@ -1781,6 +1797,7 @@ main(int argc, char *argv[]) { + { "move", 0, 0, 133 }, +@@ -1823,6 +1839,7 @@ main(int argc, char *argv[]) { char *options = NULL, *test_opts = NULL, *node; const char *spec = NULL; char *label = NULL; @@ -429,7 +420,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c char *uuid = NULL; char *types = NULL; char *p; -@@ -1811,7 +1828,7 @@ main(int argc, char *argv[]) { +@@ -1853,7 +1870,7 @@ main(int argc, char *argv[]) { initproctitle(argc, argv); #endif @@ -438,7 +429,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c longopts, NULL)) != -1) { switch (c) { case 'a': /* mount everything in fstab */ -@@ -1829,6 +1846,9 @@ main(int argc, char *argv[]) { +@@ -1871,6 +1888,9 @@ main(int argc, char *argv[]) { case 'i': external_allowed = 0; break; @@ -448,9 +439,9 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c case 'l': list_with_volumelabel = 1; break; -@@ -1975,6 +1995,9 @@ main(int argc, char *argv[]) { - create_mtab (); - } +@@ -2007,6 +2027,9 @@ main(int argc, char *argv[]) { + + atexit(unlock_mtab); + if (keysize && sscanf(keysize,"%d",&keysz) != 1) + die (EX_USAGE, _("mount: argument to --keybits or -k must be a number")); @@ -458,23 +449,10 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c switch (argc+specseen) { case 0: /* mount -a */ -Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.h -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.h -+++ util-linux-ng-2.13rc2+git20070725/mount/lomount.h -@@ -1,6 +1,6 @@ - extern int verbose; --extern int set_loop(const char *, const char *, unsigned long long, -- const char *, int, int *); -+extern int set_loop(const char *device, const char *file, unsigned long long offset, -+ const char *encryption, const char* phash, int pfd, int *loopro, int keysz); - extern int del_loop(const char *); - extern int is_loop_device(const char *); - extern char * find_unused_loop_device(void); -Index: util-linux-ng-2.13rc2+git20070725/mount/rmd160.c +Index: util-linux-ng-2.13.0.1+git20071106/mount/rmd160.c =================================================================== --- /dev/null -+++ util-linux-ng-2.13rc2+git20070725/mount/rmd160.c ++++ util-linux-ng-2.13.0.1+git20071106/mount/rmd160.c @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -1008,10 +986,10 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/rmd160.c + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c +Index: util-linux-ng-2.13.0.1+git20071106/mount/sha512.c =================================================================== --- /dev/null -+++ util-linux-ng-2.13rc2+git20070725/mount/sha512.c ++++ util-linux-ng-2.13.0.1+git20071106/mount/sha512.c @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1132,7 +1110,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c + (((u_int32_t)(datap[2]))<<8 ) | ((u_int32_t)(datap[3])); + datap += 4; + } while(++j < 16); -+ ++ + /* initialize variables a...h */ + a = ctx->sha_H[0]; + b = ctx->sha_H[1]; @@ -1219,7 +1197,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c + ctx->sha_out[62] = bitLength >> 8; + ctx->sha_out[63] = bitLength; + sha256_transform(ctx, &ctx->sha_out[0]); -+ ++ + /* return results in ctx->sha_out[0...31] */ + datap = &ctx->sha_out[0]; + j = 0; @@ -1289,7 +1267,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c + (((u_int64_t)(datap[6]))<<8 ) | ((u_int64_t)(datap[7])); + datap += 8; + } while(++j < 16); -+ ++ + /* initialize variables a...h */ + a = ctx->sha_H[0]; + b = ctx->sha_H[1]; @@ -1386,7 +1364,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c + ctx->sha_out[126] = bitLength >> 8; + ctx->sha_out[127] = bitLength; + sha512_transform(ctx, &ctx->sha_out[0]); -+ ++ + /* return results in ctx->sha_out[0...63] */ + datap = &ctx->sha_out[0]; + j = 0; @@ -1445,10 +1423,10 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c + memset(&ctx, 0, sizeof(ctx)); +} +#endif -Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.h +Index: util-linux-ng-2.13.0.1+git20071106/mount/sha512.h =================================================================== --- /dev/null -+++ util-linux-ng-2.13rc2+git20070725/mount/sha512.h ++++ util-linux-ng-2.13.0.1+git20071106/mount/sha512.h @@ -0,0 +1,45 @@ +/* + * sha512.h @@ -1495,3 +1473,15 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.h +/* no sha384_write(), use sha512_write() */ +/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ +extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); +Index: util-linux-ng-2.13.0.1+git20071106/mount/lomount.h +=================================================================== +--- util-linux-ng-2.13.0.1+git20071106.orig/mount/lomount.h ++++ util-linux-ng-2.13.0.1+git20071106/mount/lomount.h +@@ -1,5 +1,5 @@ +-extern int set_loop(const char *, const char *, unsigned long long, +- const char *, int, int *); ++extern int set_loop(const char *device, const char *file, unsigned long long offset, ++ const char *encryption, const char* phash, int pfd, int *loopro, int keysz); + extern int del_loop(const char *); + extern int is_loop_device(const char *); + extern char * find_unused_loop_device(void); diff --git a/util-linux-ng-2.13.0.1+git20071106.tar.bz2 b/util-linux-ng-2.13.0.1+git20071106.tar.bz2 new file mode 100644 index 0000000..bd32644 --- /dev/null +++ b/util-linux-ng-2.13.0.1+git20071106.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7a2605c41e987edeec27dd043952517c81d06291a41bc491fed60871edb0759 +size 1565548 diff --git a/util-linux-ng-2.13.tar.bz2 b/util-linux-ng-2.13.tar.bz2 deleted file mode 100644 index 50cedb2..0000000 --- a/util-linux-ng-2.13.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:002412e93d8e85b1796fdbe65bbb0a4d193d0317a7155fda4270667e08bdfbfc -size 2702618 diff --git a/util-linux.changes b/util-linux.changes index fd47d96..2d64142 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Nov 6 16:11:02 CET 2007 - mkoenig@suse.de + +- update to 2.13.0.1+git20071106 +- prevent loop mounting the same file twice [#240653] +- merged upstream: + util-linux-2.13-mount_helper_fix.patch + util-linux-2.13-hwclock_rtc_option.patch + ------------------------------------------------------------------- Thu Oct 4 22:24:04 CEST 2007 - bg@suse.de diff --git a/util-linux.spec b/util-linux.spec index b6d78b4..9760804 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.13) +# spec file for package util-linux (Version 2.13.0.1+git20071106) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -20,11 +20,10 @@ PreReq: %install_info_prereq permissions License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on -Version: 2.13 -Release: 2 -%define upver 2.13 +Version: 2.13.0.1+git20071106 +Release: 1 Summary: A collection of basic system utilities -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source2: nologin.c Source3: nologin.8 Source4: raw.init @@ -67,8 +66,6 @@ Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch Patch10: util-linux-2.13-mount_losetup_crypto.patch Patch11: util-linux-2.13-mount_fd_leak.patch Patch12: util-linux-2.13-fdisk_cfdisk_ncursesw.patch -Patch13: util-linux-2.13-mount_helper_fix.patch -Patch14: util-linux-2.13-hwclock_rtc_option.patch ## ## ## adjtimex @@ -102,7 +99,7 @@ Authors: Karel Zak %prep -%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%upver +%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%version %patch1 -p1 %patch2 -p1 %patch3 -p1 @@ -111,8 +108,6 @@ Authors: %patch10 -p1 %patch11 -p1 %patch12 -p1 -%patch13 -p1 -%patch14 -p1 # cd adjtimex-* %patch50 -p1 @@ -176,8 +171,8 @@ make setctsid CFLAGS="$RPM_OPT_FLAGS" CFLAGS=-DCONFIG_SMP %endif # Use autogen, when building from git tree -autoreconf -fi -#./autogen.sh +#autoreconf -fi +./autogen.sh ./configure --mandir=%{_mandir} \ --datadir=%{_datadir} \ --with-fsprobe=volume_id \ @@ -277,6 +272,12 @@ rm -f $RPM_BUILD_ROOT/usr/bin/parisc rm -f $RPM_BUILD_ROOT/usr/bin/parisc32 rm -f $RPM_BUILD_ROOT/usr/bin/parisc64 rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/setarch.8 +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/i386.8 +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/x86_64.8 +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/linux{32,64}.8 +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/ia64.8 +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/s390{,x}.8 +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/ppc{,32,64}.8 # arch dependent %ifarch s390 s390x rm -f $RPM_BUILD_ROOT/etc/fdprm @@ -553,6 +554,12 @@ fi #/usr/bin/ia64 #%endif %changelog +* Tue Nov 06 2007 - mkoenig@suse.de +- update to 2.13.0.1+git20071106 +- prevent loop mounting the same file twice [#240653] +- merged upstream: + util-linux-2.13-mount_helper_fix.patch + util-linux-2.13-hwclock_rtc_option.patch * Thu Oct 04 2007 - bg@suse.de - don't use parisc, parisc32 and parisc64. * Mon Oct 01 2007 - mkoenig@suse.de From e9fb73928e5c995b21b1e30ae176e2e56bfbad21a53d653b2400ff672501634d Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 21 Nov 2007 02:27:59 +0000 Subject: [PATCH 034/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=34 --- raw.init | 2 +- util-linux.changes | 5 +++++ util-linux.spec | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/raw.init b/raw.init index 76623b7..fd2e76b 100644 --- a/raw.init +++ b/raw.init @@ -21,7 +21,7 @@ . /etc/rc.status CONFIG=/etc/raw -RAW_BIN=/usr/sbin/raw +RAW_BIN=/sbin/raw RAW_MODULE=raw test -x $RAW_BIN || exit 5 diff --git a/util-linux.changes b/util-linux.changes index 2d64142..4fa346a 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 20 17:49:35 CET 2007 - mkoenig@suse.de + +- fix raw path in init script + ------------------------------------------------------------------- Tue Nov 6 16:11:02 CET 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 9760804..d2287f7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.13.0.1+git20071106 -Release: 1 +Release: 4 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source2: nologin.c @@ -554,6 +554,8 @@ fi #/usr/bin/ia64 #%endif %changelog +* Tue Nov 20 2007 - mkoenig@suse.de +- fix raw path in init script * Tue Nov 06 2007 - mkoenig@suse.de - update to 2.13.0.1+git20071106 - prevent loop mounting the same file twice [#240653] From d20afc2489af4ae92f019cea5c4153ea493ed0e1102e261244ab8df682505a44 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 21 Nov 2007 22:03:26 +0000 Subject: [PATCH 035/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=35 --- raw.init | 1 + util-linux-2.13-mount_losetup_crypto.patch | 60 +++++++++++----------- util-linux-2.13-rpmlintrc | 5 ++ util-linux-ng-2.13.0.1+git20071106.tar.bz2 | 3 -- util-linux-ng-2.13.0.1+git20071121.tar.bz2 | 3 ++ util-linux.changes | 9 ++++ util-linux.spec | 18 +++++-- 7 files changed, 62 insertions(+), 37 deletions(-) create mode 100644 util-linux-2.13-rpmlintrc delete mode 100644 util-linux-ng-2.13.0.1+git20071106.tar.bz2 create mode 100644 util-linux-ng-2.13.0.1+git20071121.tar.bz2 diff --git a/raw.init b/raw.init index fd2e76b..7fb0069 100644 --- a/raw.init +++ b/raw.init @@ -15,6 +15,7 @@ # Required-Stop: # Default-Start: 2 3 5 # Default-Stop: 0 1 6 +# Short-Description: raw devices # Description: raw-devices ### END INIT INFO diff --git a/util-linux-2.13-mount_losetup_crypto.patch b/util-linux-2.13-mount_losetup_crypto.patch index 7a94536..ed6b607 100644 --- a/util-linux-2.13-mount_losetup_crypto.patch +++ b/util-linux-2.13-mount_losetup_crypto.patch @@ -4,20 +4,20 @@ Signed-off-by: Ludwig Nussel -Index: util-linux-ng-2.13.0.1+git20071106/mount/Makefile.am +Index: util-linux-ng-2.13.0.1+git20071121/mount/Makefile.am =================================================================== ---- util-linux-ng-2.13.0.1+git20071106.orig/mount/Makefile.am -+++ util-linux-ng-2.13.0.1+git20071106/mount/Makefile.am -@@ -12,7 +12,7 @@ headers_common = fstab.h linux_fs.h moun +--- util-linux-ng-2.13.0.1+git20071121.orig/mount/Makefile.am ++++ util-linux-ng-2.13.0.1+git20071121/mount/Makefile.am +@@ -12,7 +12,7 @@ headers_common = fstab.h mount_mntent.h mount_paths.h lomount.h fsprobe.h realpath.h xmalloc.h \ getusername.h loop.h sundries.h -mount_common = fstab.c mount_mntent.c getusername.c lomount.c \ +mount_common = fstab.c mount_mntent.c getusername.c lomount.c rmd160.c sha512.c \ - $(utils_common) $(headers_common) ../lib/env.c + $(utils_common) $(headers_common) ../lib/env.c ../lib/linux_version.c \ + ../lib/blkdev.c - mount_SOURCES = mount.c $(mount_common) ../lib/setproctitle.c -@@ -25,7 +25,7 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD +@@ -26,7 +26,7 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD swapon_SOURCES = swapon.c swap_constants.h $(utils_common) @@ -26,10 +26,10 @@ Index: util-linux-ng-2.13.0.1+git20071106/mount/Makefile.am loop.h lomount.h xmalloc.h sundries.h realpath.h losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) -Index: util-linux-ng-2.13.0.1+git20071106/mount/rmd160.h +Index: util-linux-ng-2.13.0.1+git20071121/mount/rmd160.h =================================================================== --- /dev/null -+++ util-linux-ng-2.13.0.1+git20071106/mount/rmd160.h ++++ util-linux-ng-2.13.0.1+git20071121/mount/rmd160.h @@ -0,0 +1,11 @@ +#ifndef RMD160_H +#define RMD160_H @@ -42,10 +42,10 @@ Index: util-linux-ng-2.13.0.1+git20071106/mount/rmd160.h +#endif /*RMD160_H*/ + + -Index: util-linux-ng-2.13.0.1+git20071106/mount/lomount.c +Index: util-linux-ng-2.13.0.1+git20071121/mount/lomount.c =================================================================== ---- util-linux-ng-2.13.0.1+git20071106.orig/mount/lomount.c -+++ util-linux-ng-2.13.0.1+git20071106/mount/lomount.c +--- util-linux-ng-2.13.0.1+git20071121.orig/mount/lomount.c ++++ util-linux-ng-2.13.0.1+git20071121/mount/lomount.c @@ -20,12 +20,18 @@ #include "loop.h" @@ -343,10 +343,10 @@ Index: util-linux-ng-2.13.0.1+git20071106/mount/lomount.c if (res == 2 && find) { if (verbose) printf("stolen loop=%s...trying again\n", -Index: util-linux-ng-2.13.0.1+git20071106/mount/mount.c +Index: util-linux-ng-2.13.0.1+git20071121/mount/mount.c =================================================================== ---- util-linux-ng-2.13.0.1+git20071106.orig/mount/mount.c -+++ util-linux-ng-2.13.0.1+git20071106/mount/mount.c +--- util-linux-ng-2.13.0.1+git20071121.orig/mount/mount.c ++++ util-linux-ng-2.13.0.1+git20071121/mount/mount.c @@ -88,6 +88,9 @@ static int suid = 0; /* Contains the fd to read the passphrase from, if any. */ static int pfd = -1; @@ -393,7 +393,7 @@ Index: util-linux-ng-2.13.0.1+git20071106/mount/mount.c + keysz = strtoul(opt_keybits, NULL, 0); + if (opt_nohashpass) { + if(opt_phash && strcmp(opt_phash, "none")) { -+ error(_("mount: please specify either phash=%s or nohashpass\n")); ++ error(_("mount: please specify either phash=%s or nohashpass\n"), opt_phash); + return EX_FAIL; + } + opt_phash = "none"; @@ -404,7 +404,7 @@ Index: util-linux-ng-2.13.0.1+git20071106/mount/mount.c if (res == 2) { /* loop dev has been grabbed by some other process, try again, if not given explicitly */ -@@ -1677,6 +1692,7 @@ static struct option longopts[] = { +@@ -1668,6 +1683,7 @@ static struct option longopts[] = { { "options", 1, 0, 'o' }, { "test-opts", 1, 0, 'O' }, { "pass-fd", 1, 0, 'p' }, @@ -412,7 +412,7 @@ Index: util-linux-ng-2.13.0.1+git20071106/mount/mount.c { "types", 1, 0, 't' }, { "bind", 0, 0, 128 }, { "move", 0, 0, 133 }, -@@ -1823,6 +1839,7 @@ main(int argc, char *argv[]) { +@@ -1814,6 +1830,7 @@ main(int argc, char *argv[]) { char *options = NULL, *test_opts = NULL, *node; const char *spec = NULL; char *label = NULL; @@ -420,7 +420,7 @@ Index: util-linux-ng-2.13.0.1+git20071106/mount/mount.c char *uuid = NULL; char *types = NULL; char *p; -@@ -1853,7 +1870,7 @@ main(int argc, char *argv[]) { +@@ -1844,7 +1861,7 @@ main(int argc, char *argv[]) { initproctitle(argc, argv); #endif @@ -429,7 +429,7 @@ Index: util-linux-ng-2.13.0.1+git20071106/mount/mount.c longopts, NULL)) != -1) { switch (c) { case 'a': /* mount everything in fstab */ -@@ -1871,6 +1888,9 @@ main(int argc, char *argv[]) { +@@ -1862,6 +1879,9 @@ main(int argc, char *argv[]) { case 'i': external_allowed = 0; break; @@ -439,7 +439,7 @@ Index: util-linux-ng-2.13.0.1+git20071106/mount/mount.c case 'l': list_with_volumelabel = 1; break; -@@ -2007,6 +2027,9 @@ main(int argc, char *argv[]) { +@@ -1998,6 +2018,9 @@ main(int argc, char *argv[]) { atexit(unlock_mtab); @@ -449,10 +449,10 @@ Index: util-linux-ng-2.13.0.1+git20071106/mount/mount.c switch (argc+specseen) { case 0: /* mount -a */ -Index: util-linux-ng-2.13.0.1+git20071106/mount/rmd160.c +Index: util-linux-ng-2.13.0.1+git20071121/mount/rmd160.c =================================================================== --- /dev/null -+++ util-linux-ng-2.13.0.1+git20071106/mount/rmd160.c ++++ util-linux-ng-2.13.0.1+git20071121/mount/rmd160.c @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -986,10 +986,10 @@ Index: util-linux-ng-2.13.0.1+git20071106/mount/rmd160.c + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -Index: util-linux-ng-2.13.0.1+git20071106/mount/sha512.c +Index: util-linux-ng-2.13.0.1+git20071121/mount/sha512.c =================================================================== --- /dev/null -+++ util-linux-ng-2.13.0.1+git20071106/mount/sha512.c ++++ util-linux-ng-2.13.0.1+git20071121/mount/sha512.c @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1423,10 +1423,10 @@ Index: util-linux-ng-2.13.0.1+git20071106/mount/sha512.c + memset(&ctx, 0, sizeof(ctx)); +} +#endif -Index: util-linux-ng-2.13.0.1+git20071106/mount/sha512.h +Index: util-linux-ng-2.13.0.1+git20071121/mount/sha512.h =================================================================== --- /dev/null -+++ util-linux-ng-2.13.0.1+git20071106/mount/sha512.h ++++ util-linux-ng-2.13.0.1+git20071121/mount/sha512.h @@ -0,0 +1,45 @@ +/* + * sha512.h @@ -1473,10 +1473,10 @@ Index: util-linux-ng-2.13.0.1+git20071106/mount/sha512.h +/* no sha384_write(), use sha512_write() */ +/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ +extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); -Index: util-linux-ng-2.13.0.1+git20071106/mount/lomount.h +Index: util-linux-ng-2.13.0.1+git20071121/mount/lomount.h =================================================================== ---- util-linux-ng-2.13.0.1+git20071106.orig/mount/lomount.h -+++ util-linux-ng-2.13.0.1+git20071106/mount/lomount.h +--- util-linux-ng-2.13.0.1+git20071121.orig/mount/lomount.h ++++ util-linux-ng-2.13.0.1+git20071121/mount/lomount.h @@ -1,5 +1,5 @@ -extern int set_loop(const char *, const char *, unsigned long long, - const char *, int, int *); diff --git a/util-linux-2.13-rpmlintrc b/util-linux-2.13-rpmlintrc new file mode 100644 index 0000000..1741f88 --- /dev/null +++ b/util-linux-2.13-rpmlintrc @@ -0,0 +1,5 @@ +addFilter("init-script-without-%stop_on_removal-preun /etc/init.d/raw") +addFilter("incoherent-init-script-name raw") +addFilter("no-reload-entry /etc/init.d/raw") +addFilter("files-duplicate .*(rootflags|ramsize|vidmode)") + diff --git a/util-linux-ng-2.13.0.1+git20071106.tar.bz2 b/util-linux-ng-2.13.0.1+git20071106.tar.bz2 deleted file mode 100644 index bd32644..0000000 --- a/util-linux-ng-2.13.0.1+git20071106.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b7a2605c41e987edeec27dd043952517c81d06291a41bc491fed60871edb0759 -size 1565548 diff --git a/util-linux-ng-2.13.0.1+git20071121.tar.bz2 b/util-linux-ng-2.13.0.1+git20071121.tar.bz2 new file mode 100644 index 0000000..ac50340 --- /dev/null +++ b/util-linux-ng-2.13.0.1+git20071121.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:901086dc7bc99a89b9f11839107a0dc83f6b9e89158bccb8b30ad0a5a609123b +size 1585119 diff --git a/util-linux.changes b/util-linux.changes index 4fa346a..035989b 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Nov 21 13:43:31 CET 2007 - mkoenig@suse.de + +- update to git20071121: + add sector size check for mkfs.minix [#308256] + fix canonicalization for cifs [#338375] +- provide Short-Description for raw init script +- add rpmlintrc + ------------------------------------------------------------------- Tue Nov 20 17:49:35 CET 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index d2287f7..9f6a7ba 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.13.0.1+git20071106) +# spec file for package util-linux (Version 2.13.0.1+git20071121) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -20,10 +20,11 @@ PreReq: %install_info_prereq permissions License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on -Version: 2.13.0.1+git20071106 -Release: 4 +Version: 2.13.0.1+git20071121 +Release: 1 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 +Source1: util-linux-2.13-rpmlintrc Source2: nologin.c Source3: nologin.8 Source4: raw.init @@ -154,7 +155,6 @@ CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE " INSTALL_PROGRAM='$(INSTALL)' \ --infodir=%{_infodir} \ %{_target_cpu}-suse-linux make -make check cd .. # klogconsole build cd klogconsole @@ -190,6 +190,10 @@ make gcc $RPM_OPT_FLAGS -o nologin nologin.c gcc $RPM_OPT_FLAGS -o mkzimage_cmdline %{S:29} +%check +cd ../time-%{time_ver} +make check + %install mkdir -p "$RPM_BUILD_ROOT"{/etc/init.d,%{_mandir}/man{1,8},\ /bin,/sbin,/usr/bin,/usr/sbin,%{_infodir}} @@ -554,6 +558,12 @@ fi #/usr/bin/ia64 #%endif %changelog +* Wed Nov 21 2007 - mkoenig@suse.de +- update to git20071121: + add sector size check for mkfs.minix [#308256] + fix canonicalization for cifs [#338375] +- provide Short-Description for raw init script +- add rpmlintrc * Tue Nov 20 2007 - mkoenig@suse.de - fix raw path in init script * Tue Nov 06 2007 - mkoenig@suse.de From 9122f7513a456db489d82d5a0b83f972dd94d1e4cd23a11db308365b5d8964c8 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 29 Nov 2007 17:31:43 +0000 Subject: [PATCH 036/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=36 --- ...h => util-linux-mount_losetup_crypto.patch | 363 ++++++++++++------ util-linux.changes | 9 + util-linux.spec | 10 +- 3 files changed, 252 insertions(+), 130 deletions(-) rename util-linux-2.13-mount_losetup_crypto.patch => util-linux-mount_losetup_crypto.patch (85%) diff --git a/util-linux-2.13-mount_losetup_crypto.patch b/util-linux-mount_losetup_crypto.patch similarity index 85% rename from util-linux-2.13-mount_losetup_crypto.patch rename to util-linux-mount_losetup_crypto.patch index ed6b607..57a815d 100644 --- a/util-linux-2.13-mount_losetup_crypto.patch +++ b/util-linux-mount_losetup_crypto.patch @@ -1,51 +1,69 @@ -* password hashing based on debian patch (rmd160, sha*) adds losetup options -k - and -H -* add support for loop-AES compatible strings like "twofish256" +From a062df268df66641ed94d5c0e968e92c67b585e4 Mon Sep 17 00:00:00 2001 +From: Ludwig Nussel +Date: Thu, 29 Nov 2007 17:46:36 +0100 +Subject: [PATCH] losetup: support password hashing and specifying the key length + +* add support for password hashing (sha512, sha384, sha256, rmd160). +* add support for loop-AES style strings like "twofish256" for + specifying the encryption algorithm and key length. + +Based on the SUSE patch from Ludwig Nussel , +this patch adds password hashing for cryptoloop devices. While +cryptoloop is deprecated, users may still wish to access existing +volumes. + +Incompatible change: + Default is now to hash using sha256, sha384 or sha512 depending + on key length (16, 24, or 32 bytes). Debian users will need to + specify "--phash rmd160" to access existing Debian devices. + Others will need to specify '--phash none'. + +sha512.c is from loop-AES. Signed-off-by: Ludwig Nussel +--- + mount/Makefile.am | 2 + + mount/lomount.c | 178 +++++++++++++++--- + mount/lomount.h | 4 +- + mount/losetup.8 | 11 + + mount/mount.8 | 13 ++ + mount/mount.c | 23 ++- + mount/my_dev_t.h | 5 + + mount/rmd160.c | 532 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + mount/rmd160.h | 11 + + mount/sha512.c | 432 +++++++++++++++++++++++++++++++++++++++++++ + mount/sha512.h | 45 +++++ + 11 files changed, 1225 insertions(+), 31 deletions(-) + create mode 100644 mount/my_dev_t.h + create mode 100644 mount/rmd160.c + create mode 100644 mount/rmd160.h + create mode 100644 mount/sha512.c + create mode 100644 mount/sha512.h -Index: util-linux-ng-2.13.0.1+git20071121/mount/Makefile.am -=================================================================== ---- util-linux-ng-2.13.0.1+git20071121.orig/mount/Makefile.am -+++ util-linux-ng-2.13.0.1+git20071121/mount/Makefile.am -@@ -12,7 +12,7 @@ headers_common = fstab.h mount_mntent.h - mount_paths.h lomount.h fsprobe.h realpath.h xmalloc.h \ +diff --git a/mount/Makefile.am b/mount/Makefile.am +index 01643b2..cb7af0a 100644 +--- a/mount/Makefile.am ++++ b/mount/Makefile.am +@@ -13,6 +13,7 @@ headers_common = fstab.h mount_mntent.h mount_constants.h \ getusername.h loop.h sundries.h --mount_common = fstab.c mount_mntent.c getusername.c lomount.c \ -+mount_common = fstab.c mount_mntent.c getusername.c lomount.c rmd160.c sha512.c \ + mount_common = fstab.c mount_mntent.c getusername.c lomount.c \ ++ rmd160.c sha512.c \ $(utils_common) $(headers_common) ../lib/env.c ../lib/linux_version.c \ ../lib/blkdev.c -@@ -26,7 +26,7 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD - +@@ -27,6 +28,7 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) swapon_SOURCES = swapon.c swap_constants.h $(utils_common) --losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c \ -+losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c rmd160.c sha512.c \ + losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c \ ++ rmd160.c sha512.c \ loop.h lomount.h xmalloc.h sundries.h realpath.h losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) -Index: util-linux-ng-2.13.0.1+git20071121/mount/rmd160.h -=================================================================== ---- /dev/null -+++ util-linux-ng-2.13.0.1+git20071121/mount/rmd160.h -@@ -0,0 +1,11 @@ -+#ifndef RMD160_H -+#define RMD160_H -+ -+#define RMD160_HASH_SIZE 20 -+ -+void -+rmd160_hash_buffer( unsigned char *outbuf, const unsigned char *buffer, size_t length ); -+ -+#endif /*RMD160_H*/ -+ -+ -Index: util-linux-ng-2.13.0.1+git20071121/mount/lomount.c -=================================================================== ---- util-linux-ng-2.13.0.1+git20071121.orig/mount/lomount.c -+++ util-linux-ng-2.13.0.1+git20071121/mount/lomount.c +diff --git a/mount/lomount.c b/mount/lomount.c +index 5bd8954..98f144f 100644 +--- a/mount/lomount.c ++++ b/mount/lomount.c @@ -20,12 +20,18 @@ #include "loop.h" @@ -58,8 +76,8 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/lomount.c #include "xmalloc.h" #include "realpath.h" -+#ifndef MAX -+#define MAX(a,b) ((a>b)?(a):(b)) ++#ifndef MIN ++#define MIN(a,b) ((a>3:LO_KEY_SIZE; @@ -218,13 +238,16 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/lomount.c + if(!keysz) { + if(verbose) + fprintf(stderr, _("please specify a key length\n")); -+ close(fd); -+ close(ffd); + return 1; + } + loopinfo64.lo_encrypt_key_size = keysz>>3; + } + ++ if((unsigned)loopinfo64.lo_encrypt_key_size > sizeof(loopinfo64.lo_encrypt_key)) { ++ fprintf(stderr, _("invalid key length\n")); ++ return 1; ++ } ++ + if (phash) { + if(!strcasecmp(phash, "sha512")) { + hfunc = sha512_hash_buffer; @@ -233,28 +256,26 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/lomount.c + } else if(!strcasecmp(phash, "sha256")) { + hfunc = sha256_hash_buffer; + } else if(!strcasecmp(phash, "rmd160")) { -+ hfunc = phash_rmd160; -+ } else if(!strcasecmp(phash, "none")) { -+ hfunc = phash_none; -+ } else { -+ fprintf(stderr, _("unsupported hash method '%s'\n"), phash); -+ close(fd); -+ close(ffd); -+ return 1; -+ } -+ } ++ hfunc = phash_rmd160; ++ } else if(!strcasecmp(phash, "none")) { ++ hfunc = phash_none; ++ } else { ++ fprintf(stderr, _("unsupported hash method '%s'\n"), phash); ++ return 1; ++ } ++ } + -+ if(hfunc) { -+ hfunc((unsigned char*)pass, strlen(pass), loopinfo64.lo_encrypt_key, loopinfo64.lo_encrypt_key_size); -+ } ++ if(hfunc) { ++ hfunc((unsigned char*)pass, strlen(pass), loopinfo64.lo_encrypt_key, loopinfo64.lo_encrypt_key_size); ++ } + -+ // zero buffer ++ // zero buffer memset(pass, 0, strlen(pass)); - loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE; } if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { -@@ -532,8 +638,8 @@ mutter(void) { +@@ -532,8 +640,8 @@ mutter(void) { } int @@ -265,11 +286,11 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/lomount.c mutter(); return 1; } -@@ -569,7 +675,13 @@ usage(void) { +@@ -569,7 +677,13 @@ usage(void) { " %1$s [ options ] {-f|--find|loop_device} file # setup\n" "\nOptions:\n" " -e | --encryption enable data encryption with specified \n" -+ " -H | --phash hash password using specified algorithm (rmd160/sha512/sha256/sha384/none)\n" ++ " -H | --phash hash password using specified algorithm (sha512/sha256/sha384/rmd160/none)\n" " -h | --help this help\n" + " -k | --keybits specify number of bits in the hashed key given\n" + " to the cipher. Some ciphers support several key\n" @@ -279,7 +300,7 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/lomount.c " -o | --offset start at offset into file\n" " -p | --pass-fd read passphrase from file descriptor \n" " -r | --read-only setup read-only loop device\n" -@@ -582,11 +694,14 @@ usage(void) { +@@ -582,11 +696,14 @@ usage(void) { int main(int argc, char **argv) { char *p, *offset, *encryption, *passfd, *device, *file; @@ -294,7 +315,7 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/lomount.c unsigned long long off; struct option longopts[] = { { "all", 0, 0, 'a' }, -@@ -594,6 +709,8 @@ main(int argc, char **argv) { +@@ -594,6 +711,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -303,7 +324,7 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/lomount.c { "offset", 1, 0, 'o' }, { "pass-fd", 1, 0, 'p' }, { "read-only", 0, 0, 'r' }, -@@ -609,12 +726,13 @@ main(int argc, char **argv) { +@@ -609,12 +728,13 @@ main(int argc, char **argv) { delete = find = all = 0; off = 0; offset = encryption = passfd = NULL; @@ -314,11 +335,11 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/lomount.c progname = p+1; - while ((c = getopt_long(argc, argv, "ade:E:fho:p:rsv", -+ while ((c = getopt_long(argc, argv, "ade:E:fhk:No:p:rsvH:", ++ while ((c = getopt_long(argc, argv, "ade:E:fhk:o:p:rsvH:", longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -633,6 +751,12 @@ main(int argc, char **argv) { +@@ -633,6 +753,12 @@ main(int argc, char **argv) { case 'f': find = 1; break; @@ -331,7 +352,7 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/lomount.c case 'o': offset = optarg; break; -@@ -696,8 +820,10 @@ main(int argc, char **argv) { +@@ -696,8 +822,10 @@ main(int argc, char **argv) { usage(); if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(); @@ -343,10 +364,82 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/lomount.c if (res == 2 && find) { if (verbose) printf("stolen loop=%s...trying again\n", -Index: util-linux-ng-2.13.0.1+git20071121/mount/mount.c -=================================================================== ---- util-linux-ng-2.13.0.1+git20071121.orig/mount/mount.c -+++ util-linux-ng-2.13.0.1+git20071121/mount/mount.c +diff --git a/mount/lomount.h b/mount/lomount.h +index 38b3a48..3a6210f 100644 +--- a/mount/lomount.h ++++ b/mount/lomount.h +@@ -1,5 +1,5 @@ +-extern int set_loop(const char *, const char *, unsigned long long, +- const char *, int, int *); ++extern int set_loop(const char *device, const char *file, unsigned long long offset, ++ const char *encryption, const char* phash, int pfd, int *loopro, int keysz); + extern int del_loop(const char *); + extern int is_loop_device(const char *); + extern char * find_unused_loop_device(void); +diff --git a/mount/losetup.8 b/mount/losetup.8 +index db2929f..54bbc94 100644 +--- a/mount/losetup.8 ++++ b/mount/losetup.8 +@@ -76,6 +76,15 @@ find the first unused loop device. If a + argument is present, use this device. Otherwise, print its name. + .IP "\fB\-h, \-\-help\fP" + print help ++.IP "\fB\-H, \-\-phash \fIhash_type\fP" ++Specify the password hash function. Valid values are: ++.BR sha512 (default), ++.BR sha256 , ++.BR sha384 , ++.BR rmd160 , ++.BR none . ++.IP "\fB\-k, \-\-keybits \fInum\fP" ++set the number of bits to use in key to \fInum\fP. + .IP "\fB\-o, \-\-offset \fIoffset\fP" + The data start is moved \fIoffset\fP bytes into the specified file or + device. +@@ -140,6 +149,8 @@ the command + .fi + .SH RESTRICTION + DES encryption is painfully slow. On the other hand, XOR is terribly weak. ++Both are insecure nowadays. Some ciphers may require a licence for you to be ++allowed to use them. + + Cryptoloop is deprecated in favor of dm-crypt. For more details see + .B cryptsetup(8). +diff --git a/mount/mount.8 b/mount/mount.8 +index 54b11d4..e79ea04 100644 +--- a/mount/mount.8 ++++ b/mount/mount.8 +@@ -615,6 +615,15 @@ This option implies the options + (unless overridden by subsequent options, as in the option line + .BR group,dev,suid ). + .TP ++.B encryption ++Specifies an encryption algorithm to use. Used in conjunction with the ++.BR loop " option." ++.TP ++.B keybits ++Specifies the key size to use for an encryption algorithm. Used in conjunction ++with the ++.BR loop " and " encryption " options." ++.TP + .B mand + Allow mandatory locks on this filesystem. See + .BR fcntl (2). +@@ -2010,6 +2019,10 @@ that are really options to + .BR \%losetup (8). + (These options can be used in addition to those specific + to the filesystem type.) ++If the mount requires a passphrase, you will be prompted for one unless ++you specify a file descriptor to read from instead with the ++.BR \-\-pass-fd ++option. + + If no explicit loop device is mentioned + (but just an option `\fB\-o loop\fP' is given), then +diff --git a/mount/mount.c b/mount/mount.c +index 60fe4fe..164ae3c 100644 +--- a/mount/mount.c ++++ b/mount/mount.c @@ -88,6 +88,9 @@ static int suid = 0; /* Contains the fd to read the passphrase from, if any. */ static int pfd = -1; @@ -357,25 +450,24 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/mount.c /* Map from -o and fstab option strings to the flag argument to mount(2). */ struct opt_map { const char *opt; /* option name */ -@@ -185,6 +188,7 @@ static int opt_nofail = 0; +@@ -182,6 +185,7 @@ static const struct opt_map opt_map[] = { static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper; -+static const char *opt_keybits, *opt_phash, *opt_nohashpass; ++static const char *opt_keybits, *opt_phash; static int mounted (const char *spec0, const char *node0); static int check_special_mountprog(const char *spec, const char *node, -@@ -199,6 +203,9 @@ static struct string_opt_map { +@@ -196,6 +200,8 @@ static struct string_opt_map { { "vfs=", 1, &opt_vfstype }, { "offset=", 0, &opt_offset }, { "encryption=", 0, &opt_encryption }, + { "phash=", 0, &opt_phash }, + { "keybits=", 0, &opt_keybits }, -+ { "nohashpass", 0, &opt_nohashpass }, { "speed=", 0, &opt_speed }, { "comment=", 1, &opt_comment }, { "uhelper=", 0, &opt_uhelper }, -@@ -902,7 +909,7 @@ loop_check(const char **spec, const char +@@ -897,7 +903,7 @@ loop_check(const char **spec, const char **type, int *flags, *type = opt_vfstype; } @@ -384,27 +476,20 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/mount.c *loopfile = *spec; if (*loop) { -@@ -928,9 +935,17 @@ loop_check(const char **spec, const char +@@ -923,9 +929,10 @@ loop_check(const char **spec, const char **type, int *flags, return EX_SYSERR; /* no more loop devices */ if (verbose) printf(_("mount: going to use the loop device %s\n"), *loopdev); - + if (!keysz && opt_keybits) + keysz = strtoul(opt_keybits, NULL, 0); -+ if (opt_nohashpass) { -+ if(opt_phash && strcmp(opt_phash, "none")) { -+ error(_("mount: please specify either phash=%s or nohashpass\n"), opt_phash); -+ return EX_FAIL; -+ } -+ opt_phash = "none"; -+ } if ((res = set_loop(*loopdev, *loopfile, offset, - opt_encryption, pfd, &loopro))) { + opt_encryption, opt_phash, pfd, &loopro, keysz))) { if (res == 2) { /* loop dev has been grabbed by some other process, try again, if not given explicitly */ -@@ -1668,6 +1683,7 @@ static struct option longopts[] = { +@@ -1661,6 +1668,7 @@ static struct option longopts[] = { { "options", 1, 0, 'o' }, { "test-opts", 1, 0, 'O' }, { "pass-fd", 1, 0, 'p' }, @@ -412,7 +497,7 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/mount.c { "types", 1, 0, 't' }, { "bind", 0, 0, 128 }, { "move", 0, 0, 133 }, -@@ -1814,6 +1830,7 @@ main(int argc, char *argv[]) { +@@ -1807,6 +1815,7 @@ main(int argc, char *argv[]) { char *options = NULL, *test_opts = NULL, *node; const char *spec = NULL; char *label = NULL; @@ -420,7 +505,7 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/mount.c char *uuid = NULL; char *types = NULL; char *p; -@@ -1844,7 +1861,7 @@ main(int argc, char *argv[]) { +@@ -1837,7 +1846,7 @@ main(int argc, char *argv[]) { initproctitle(argc, argv); #endif @@ -429,7 +514,7 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/mount.c longopts, NULL)) != -1) { switch (c) { case 'a': /* mount everything in fstab */ -@@ -1862,6 +1879,9 @@ main(int argc, char *argv[]) { +@@ -1855,6 +1864,9 @@ main(int argc, char *argv[]) { case 'i': external_allowed = 0; break; @@ -439,7 +524,7 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/mount.c case 'l': list_with_volumelabel = 1; break; -@@ -1998,6 +2018,9 @@ main(int argc, char *argv[]) { +@@ -1991,6 +2003,9 @@ main(int argc, char *argv[]) { atexit(unlock_mtab); @@ -449,10 +534,22 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/mount.c switch (argc+specseen) { case 0: /* mount -a */ -Index: util-linux-ng-2.13.0.1+git20071121/mount/rmd160.c -=================================================================== +diff --git a/mount/my_dev_t.h b/mount/my_dev_t.h +new file mode 100644 +index 0000000..5c4c0a1 --- /dev/null -+++ util-linux-ng-2.13.0.1+git20071121/mount/rmd160.c ++++ b/mount/my_dev_t.h +@@ -0,0 +1,5 @@ ++/* silliness to get dev_t defined as the kernel defines it */ ++/* glibc uses a different dev_t */ ++ ++#include ++#define my_dev_t __kernel_old_dev_t +diff --git a/mount/rmd160.c b/mount/rmd160.c +new file mode 100644 +index 0000000..3430954 +--- /dev/null ++++ b/mount/rmd160.c @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -986,10 +1083,28 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/rmd160.c + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -Index: util-linux-ng-2.13.0.1+git20071121/mount/sha512.c -=================================================================== +diff --git a/mount/rmd160.h b/mount/rmd160.h +new file mode 100644 +index 0000000..4b2c61d --- /dev/null -+++ util-linux-ng-2.13.0.1+git20071121/mount/sha512.c ++++ b/mount/rmd160.h +@@ -0,0 +1,11 @@ ++#ifndef RMD160_H ++#define RMD160_H ++ ++#define RMD160_HASH_SIZE 20 ++ ++void ++rmd160_hash_buffer( unsigned char *outbuf, const unsigned char *buffer, size_t length ); ++ ++#endif /*RMD160_H*/ ++ ++ +diff --git a/mount/sha512.c b/mount/sha512.c +new file mode 100644 +index 0000000..e4c9c13 +--- /dev/null ++++ b/mount/sha512.c @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1110,7 +1225,7 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/sha512.c + (((u_int32_t)(datap[2]))<<8 ) | ((u_int32_t)(datap[3])); + datap += 4; + } while(++j < 16); -+ ++ + /* initialize variables a...h */ + a = ctx->sha_H[0]; + b = ctx->sha_H[1]; @@ -1197,7 +1312,7 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/sha512.c + ctx->sha_out[62] = bitLength >> 8; + ctx->sha_out[63] = bitLength; + sha256_transform(ctx, &ctx->sha_out[0]); -+ ++ + /* return results in ctx->sha_out[0...31] */ + datap = &ctx->sha_out[0]; + j = 0; @@ -1267,7 +1382,7 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/sha512.c + (((u_int64_t)(datap[6]))<<8 ) | ((u_int64_t)(datap[7])); + datap += 8; + } while(++j < 16); -+ ++ + /* initialize variables a...h */ + a = ctx->sha_H[0]; + b = ctx->sha_H[1]; @@ -1364,7 +1479,7 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/sha512.c + ctx->sha_out[126] = bitLength >> 8; + ctx->sha_out[127] = bitLength; + sha512_transform(ctx, &ctx->sha_out[0]); -+ ++ + /* return results in ctx->sha_out[0...63] */ + datap = &ctx->sha_out[0]; + j = 0; @@ -1423,10 +1538,11 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/sha512.c + memset(&ctx, 0, sizeof(ctx)); +} +#endif -Index: util-linux-ng-2.13.0.1+git20071121/mount/sha512.h -=================================================================== +diff --git a/mount/sha512.h b/mount/sha512.h +new file mode 100644 +index 0000000..4b57c01 --- /dev/null -+++ util-linux-ng-2.13.0.1+git20071121/mount/sha512.h ++++ b/mount/sha512.h @@ -0,0 +1,45 @@ +/* + * sha512.h @@ -1473,15 +1589,6 @@ Index: util-linux-ng-2.13.0.1+git20071121/mount/sha512.h +/* no sha384_write(), use sha512_write() */ +/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ +extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); -Index: util-linux-ng-2.13.0.1+git20071121/mount/lomount.h -=================================================================== ---- util-linux-ng-2.13.0.1+git20071121.orig/mount/lomount.h -+++ util-linux-ng-2.13.0.1+git20071121/mount/lomount.h -@@ -1,5 +1,5 @@ --extern int set_loop(const char *, const char *, unsigned long long, -- const char *, int, int *); -+extern int set_loop(const char *device, const char *file, unsigned long long offset, -+ const char *encryption, const char* phash, int pfd, int *loopro, int keysz); - extern int del_loop(const char *); - extern int is_loop_device(const char *); - extern char * find_unused_loop_device(void); +-- +1.5.3.4 + diff --git a/util-linux.changes b/util-linux.changes index 035989b..37f5d54 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Nov 29 17:51:17 CET 2007 - lnussel@suse.de + +- update crypto patch + * fix mount buffer overflow when reading the passphrase (#332148) + * add loop_fish2 compatability code to losetup/mount again (#332095) + * change default hash size for 128bit keys to sha256 again + + ------------------------------------------------------------------- Wed Nov 21 13:43:31 CET 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 9f6a7ba..09ad141 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.13.0.1+git20071121 -Release: 1 +Release: 5 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source1: util-linux-2.13-rpmlintrc @@ -64,7 +64,7 @@ Patch5: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # TODO: Needs to be ported to new version Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch # 304861 - support password hashing and key length -Patch10: util-linux-2.13-mount_losetup_crypto.patch +Patch10: util-linux-mount_losetup_crypto.patch Patch11: util-linux-2.13-mount_fd_leak.patch Patch12: util-linux-2.13-fdisk_cfdisk_ncursesw.patch ## @@ -557,7 +557,13 @@ fi #/usr/bin/i386 #/usr/bin/ia64 #%endif + %changelog +* Thu Nov 29 2007 - lnussel@suse.de +- update crypto patch + * fix mount buffer overflow when reading the passphrase (#332148) + * add loop_fish2 compatability code to losetup/mount again (#332095) + * change default hash size for 128bit keys to sha256 again * Wed Nov 21 2007 - mkoenig@suse.de - update to git20071121: add sector size check for mkfs.minix [#308256] From 8266f1364f52cb6685bcdfefe724f00ccfd49dbb68c809733a97cc06b72caf4e Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 3 Dec 2007 10:10:53 +0000 Subject: [PATCH 037/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=37 --- util-linux.changes | 5 +++++ util-linux.spec | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index 37f5d54..f4ada2b 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Dec 3 11:03:57 CET 2007 - ro@suse.de + +- remove "arch", in coreutils now + ------------------------------------------------------------------- Thu Nov 29 17:51:17 CET 2007 - lnussel@suse.de diff --git a/util-linux.spec b/util-linux.spec index 09ad141..c5b2785 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.13.0.1+git20071121 -Release: 5 +Release: 7 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source1: util-linux-2.13-rpmlintrc @@ -183,7 +183,6 @@ CFLAGS=-DCONFIG_SMP --enable-raw \ --enable-rdev \ --enable-write \ - --enable-arch \ --disable-use-tty-group \ CFLAGS="$CFLAGS $RPM_OPT_FLAGS" make @@ -350,7 +349,6 @@ fi %config(noreplace) %attr(644,root,root) /etc/raw %config(noreplace) /etc/filesystems /usr/sbin/rcraw -/bin/arch /bin/dmesg /bin/more /bin/mount @@ -427,7 +425,6 @@ fi %{_infodir}/freeramdisk.info*.gz %{_infodir}/time.info*.gz %{_infodir}/which.info*.gz -%{_mandir}/man1/arch.1.gz %{_mandir}/man1/cal.1.gz %{_mandir}/man1/chrt.1.gz %{_mandir}/man1/col.1.gz @@ -559,6 +556,8 @@ fi #%endif %changelog +* Mon Dec 03 2007 - ro@suse.de +- remove "arch", in coreutils now * Thu Nov 29 2007 - lnussel@suse.de - update crypto patch * fix mount buffer overflow when reading the passphrase (#332148) From 21b88d9ffb6d7642a414f44425ffa1097644c9712a52c36cc764ea8bc79ef502 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 18 Dec 2007 17:58:25 +0000 Subject: [PATCH 038/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=38 --- util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch | 13 +++++++++++++ util-linux.changes | 6 ++++++ util-linux.spec | 7 ++++++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch diff --git a/util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch b/util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch new file mode 100644 index 0000000..0dcad24 --- /dev/null +++ b/util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch @@ -0,0 +1,13 @@ +Index: util-linux-ng-2.13.0.1+git20071121/hwclock/rtc.c +=================================================================== +--- util-linux-ng-2.13.0.1+git20071121.orig/hwclock/rtc.c ++++ util-linux-ng-2.13.0.1+git20071121/hwclock/rtc.c +@@ -225,7 +225,7 @@ int ret; + } else { + int rc; /* Return code from ioctl */ + /* Turn on update interrupts (one per second) */ +-#if defined(__alpha__) || defined(__sparc__) || defined(__x86_64__) ++#if defined(__alpha__) || defined(__sparc__) || defined(__x86_64__) || defined(__i386__) + /* Not all alpha kernels reject RTC_UIE_ON, but probably they should. */ + rc = -1; + errno = EINVAL; diff --git a/util-linux.changes b/util-linux.changes index f4ada2b..599d5e9 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Dec 18 15:55:19 CET 2007 - mkoenig@suse.de + +- add temporary workaround for broken RTC update interrupts + [#338419] + ------------------------------------------------------------------- Mon Dec 3 11:03:57 CET 2007 - ro@suse.de diff --git a/util-linux.spec b/util-linux.spec index c5b2785..cdb51d5 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,7 +21,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.13.0.1+git20071121 -Release: 7 +Release: 11 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source1: util-linux-2.13-rpmlintrc @@ -67,6 +67,7 @@ Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch Patch10: util-linux-mount_losetup_crypto.patch Patch11: util-linux-2.13-mount_fd_leak.patch Patch12: util-linux-2.13-fdisk_cfdisk_ncursesw.patch +Patch13: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch ## ## ## adjtimex @@ -109,6 +110,7 @@ Authors: %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 # cd adjtimex-* %patch50 -p1 @@ -556,6 +558,9 @@ fi #%endif %changelog +* Tue Dec 18 2007 - mkoenig@suse.de +- add temporary workaround for broken RTC update interrupts + [#338419] * Mon Dec 03 2007 - ro@suse.de - remove "arch", in coreutils now * Thu Nov 29 2007 - lnussel@suse.de From a9c5a1a4983066806cd405ff262f0d0e4028c8ad61cc280f22ab213f82d08828 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 8 Feb 2008 20:23:13 +0000 Subject: [PATCH 039/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=39 --- ...-2.12r-mount_swapon_swsuspend_resume.patch | 128 --- util-linux-2.13-mount_fd_leak.patch | 12 - ...ux-2.13.1-canonicalize_loopfile_name.patch | 96 +++ util-linux-2.13.1-getfs_fix.patch | 24 + ...13.1-mkfs.minix_add_sectorsize_check.patch | 65 ++ ....13.1-mkfs.minix_device_size_cleanup.patch | 103 +++ ...nt_loop_mounting_the_same_file_twice.patch | 245 ++++++ util-linux-mount_losetup_crypto.patch | 201 +++-- util-linux-ng-2.13-swapon-swsuspend.patch | 112 +++ util-linux-ng-2.13.0.1+git20071121.tar.bz2 | 3 - util-linux-ng-2.13.1.tar.bz2 | 3 + util-linux.changes | 22 + util-linux.spec | 782 +++++++++--------- 13 files changed, 1166 insertions(+), 630 deletions(-) delete mode 100644 util-linux-2.12r-mount_swapon_swsuspend_resume.patch delete mode 100644 util-linux-2.13-mount_fd_leak.patch create mode 100644 util-linux-2.13.1-canonicalize_loopfile_name.patch create mode 100644 util-linux-2.13.1-getfs_fix.patch create mode 100644 util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch create mode 100644 util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch create mode 100644 util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch create mode 100644 util-linux-ng-2.13-swapon-swsuspend.patch delete mode 100644 util-linux-ng-2.13.0.1+git20071121.tar.bz2 create mode 100644 util-linux-ng-2.13.1.tar.bz2 diff --git a/util-linux-2.12r-mount_swapon_swsuspend_resume.patch b/util-linux-2.12r-mount_swapon_swsuspend_resume.patch deleted file mode 100644 index 8bc8e98..0000000 --- a/util-linux-2.12r-mount_swapon_swsuspend_resume.patch +++ /dev/null @@ -1,128 +0,0 @@ -## 30swsusp-resume.dpatch by Jeff Bailey -Index: util-linux-ng-2.12r+git20070330/mount/swapon.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/swapon.c -+++ util-linux-ng-2.12r+git20070330/mount/swapon.c -@@ -10,7 +10,9 @@ - #include - #include - #include -+#include - #include -+#include - #include "xmalloc.h" - #include "swap_constants.h" - #include "swapargs.h" -@@ -23,6 +25,7 @@ - - #define _PATH_FSTAB "/etc/fstab" - #define PROC_SWAPS "/proc/swaps" -+#define PATH_MKSWAP "/sbin/mkswap" - - #define SWAPON_NEEDS_TWO_ARGS - -@@ -179,6 +182,85 @@ display_summary(void) - return 0 ; - } - -+/* -+ * It's better do swsuspend detection by follow routine than -+ * include huge mount_guess_fstype.o to swapon. We need only -+ * swsuspend and no the others filesystems. -+ */ -+#ifdef HAVE_LIBBLKID -+static int -+swap_is_swsuspend(const char *device) { -+ const char *type = blkid_get_tag_value(blkid, "TYPE", device); -+ -+ if (type && strcmp(type, "swsuspend")==0) -+ return 0; -+ return 1; -+} -+#else -+static int -+swap_is_swsuspend(const char *device) { -+ int fd, re = 1, n = getpagesize() - 10; -+ char buf[10]; -+ -+ fd = open(device, O_RDONLY); -+ if (fd < 0) -+ return -1; -+ -+ if (lseek(fd, n, SEEK_SET) >= 0 && -+ read(fd, buf, sizeof buf) == sizeof buf && -+ (memcmp("S1SUSPEND", buf, 9)==0 || -+ memcmp("S2SUSPEND", buf, 9)==0 || -+ memcmp("ULSUSPEND", buf, 9)==0)) -+ re = 0; -+ -+ close(fd); -+ return re; -+} -+#endif -+ -+/* calls mkswap */ -+static int -+swap_reinitialize(const char *device) { -+ const char *label = mount_get_volume_label_by_spec(device); -+ pid_t pid; -+ -+ switch((pid=fork())) { -+ case -1: /* fork error */ -+ fprintf(stderr, _("%s: cannot fork: %s\n"), -+ progname, strerror(errno)); -+ return -1; -+ -+ case 0: /* child */ -+ if (label && *label) -+ execl(PATH_MKSWAP, PATH_MKSWAP, "-L", label, device, NULL); -+ else -+ execl(PATH_MKSWAP, PATH_MKSWAP, device, NULL); -+ exit(1); /* error */ -+ -+ default: /* parent */ -+ { -+ int status; -+ int ret; -+ -+ do { -+ if ((ret = waitpid(pid, &status, 0)) < 0 -+ && errno == EINTR) -+ continue; -+ else if (ret < 0) { -+ fprintf(stderr, _("%s: waitpid: %s\n"), -+ progname, strerror(errno)); -+ return -1; -+ } -+ } while (0); -+ -+ /* mkswap returns: 0=suss, 1=error */ -+ if (WIFEXITED(status) && WEXITSTATUS(status)==0) -+ return 0; /* ok */ -+ } -+ } -+ return -1; /* error */ -+} -+ - static int - do_swapon(const char *orig_special, int prio) { - int status; -@@ -202,6 +284,18 @@ do_swapon(const char *orig_special, int - return -1; - } - -+ /* We have to reinitialize swap with old (=useless) software suspend -+ * data. The problem is that if we don't do it, then we get data -+ * corruption the next time with suspended on. -+ */ -+ if (swap_is_swsuspend(special)==0) { -+ fprintf(stdout, _("%s: %s: software suspend data detected. " -+ "Reinitializing the swap.\n"), -+ progname, special); -+ if (swap_reinitialize(special) < 0) -+ return -1; -+ } -+ - /* people generally dislike this warning - now it is printed - only when `verbose' is set */ - if (verbose) { diff --git a/util-linux-2.13-mount_fd_leak.patch b/util-linux-2.13-mount_fd_leak.patch deleted file mode 100644 index d88ec05..0000000 --- a/util-linux-2.13-mount_fd_leak.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.c -+++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c -@@ -325,6 +325,7 @@ set_loop(const char *device, const char - } - if ((fd = open(device, mode)) < 0) { - perror (device); -+ close(ffd); - return 1; - } - *loopro = (mode == O_RDONLY); diff --git a/util-linux-2.13.1-canonicalize_loopfile_name.patch b/util-linux-2.13.1-canonicalize_loopfile_name.patch new file mode 100644 index 0000000..04c5e2c --- /dev/null +++ b/util-linux-2.13.1-canonicalize_loopfile_name.patch @@ -0,0 +1,96 @@ +commit bfdb8be5c49d8fadb25118fb4416ab2a68fc3a16 +Author: Karel Zak +Date: Thu Oct 25 12:29:51 2007 +0200 + + losetup: canonicalize loopfile name + + When setting up a loop device, canonicalize the loop file + name. This simplifies a later identification of loop file names + when querying the loop devices. + + Co-Author: Matthias Koenig + Signed-off-by: Matthias Koenig + Signed-off-by: Karel Zak + +Index: util-linux-ng-2.13.1/mount/lomount.c +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/lomount.c ++++ util-linux-ng-2.13.1/mount/lomount.c +@@ -22,10 +22,12 @@ + #include "lomount.h" + #include "xstrncpy.h" + #include "nls.h" ++#include "realpath.h" ++#include "xmalloc.h" ++ + + extern int verbose; + extern char *progname; +-extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ + extern void error (const char *fmt, ...); /* idem */ + + #define SIZE(a) (sizeof(a)/sizeof(a[0])) +@@ -279,6 +281,7 @@ set_loop(const char *device, const char + struct loop_info64 loopinfo64; + int fd, ffd, mode, i; + char *pass; ++ char filename[PATH_MAX+1]; + + mode = (*loopro ? O_RDONLY : O_RDWR); + if ((ffd = open(file, mode)) < 0) { +@@ -298,7 +301,8 @@ set_loop(const char *device, const char + + memset(&loopinfo64, 0, sizeof(loopinfo64)); + +- xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE); ++ myrealpath(file, filename, PATH_MAX); ++ xstrncpy(loopinfo64.lo_file_name, filename, LO_NAME_SIZE); + + if (encryption && *encryption) { + if (digits_only(encryption)) { +@@ -386,7 +390,7 @@ set_loop(const char *device, const char + + if (verbose > 1) + printf(_("set_loop(%s,%s,%llu): success\n"), +- device, file, offset); ++ device, filename, offset); + return 0; + } + +@@ -470,23 +474,6 @@ usage(void) { + exit(1); + } + +-char * +-xstrdup (const char *s) { +- char *t; +- +- if (s == NULL) +- return NULL; +- +- t = strdup (s); +- +- if (t == NULL) { +- fprintf(stderr, _("not enough memory")); +- exit(1); +- } +- +- return t; +-} +- + void + error (const char *fmt, ...) { + va_list args; +Index: util-linux-ng-2.13.1/mount/Makefile.am +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/Makefile.am ++++ util-linux-ng-2.13.1/mount/Makefile.am +@@ -25,7 +25,7 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD + + swapon_SOURCES = swapon.c swap_constants.h $(utils_common) + +-losetup_SOURCES = lomount.c loop.h lomount.h ++losetup_SOURCES = lomount.c loop.h lomount.h realpath.c xmalloc.c + losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) + + mount_LDADD = $(LDADD_common) diff --git a/util-linux-2.13.1-getfs_fix.patch b/util-linux-2.13.1-getfs_fix.patch new file mode 100644 index 0000000..fb0faa7 --- /dev/null +++ b/util-linux-2.13.1-getfs_fix.patch @@ -0,0 +1,24 @@ +Index: util-linux-ng-2.13.1/mount/fstab.c +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/fstab.c ++++ util-linux-ng-2.13.1/mount/fstab.c +@@ -419,11 +419,17 @@ getfs_by_spec (const char *spec) { + struct mntentchn * + getfs_by_devname (const char *devname) { + struct mntentchn *mc, *mc0; ++ char *name; + + mc0 = fstab_head(); +- for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) +- if (streq(mc->m.mnt_fsname, devname)) ++ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) { ++ name = canonicalize(mc->m.mnt_fsname); ++ if (streq(name, devname)) { ++ free(name); + return mc; ++ } ++ } ++ free(name); + return NULL; + } + diff --git a/util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch b/util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch new file mode 100644 index 0000000..f818c34 --- /dev/null +++ b/util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch @@ -0,0 +1,65 @@ +X-Gnus-Coding-System: -*- coding: utf-8; -*- + +Minix filesystem until version 2 has a fixed blocksize of 1024 bytes. +If you try to create a filsystem on a device with a physical sectorsize +larger than 1024 bytes, this resulting minix fs cannot be mounted, +because the physical sectorsize must be smaller than the filesystem +blocksize. +This patch adds a check for this and will refuse to create a filesystem +if the sectorsize is bigger than the blocksize. + +Signed-off-by: Matthias Koenig +--- + + disk-utils/Makefile.am | 4 +++- + disk-utils/mkfs.minix.c | 12 ++++++++++-- + 2 files changed, 13 insertions(+), 3 deletions(-) + +Index: util-linux-ng-2.13.1/disk-utils/mkfs.minix.c +=================================================================== +--- util-linux-ng-2.13.1.orig/disk-utils/mkfs.minix.c ++++ util-linux-ng-2.13.1/disk-utils/mkfs.minix.c +@@ -78,6 +78,7 @@ + #ifndef BLKGETSIZE + #define BLKGETSIZE _IO(0x12,96) /* return device size */ + #endif ++#define BLKSSZGET _IO(0x12,104)/* get block device sector size */ + + #ifndef __GNUC__ + #error "needs gcc for the bitop-__asm__'s" +@@ -238,6 +239,16 @@ get_size(const char *file) { + return size; + } + ++/* get hardware sector size */ ++int ++blkdev_get_sector_size(int fd, int *sector_size) ++{ ++ if (ioctl(fd, BLKSSZGET, sector_size) >= 0) ++ return 0; ++ ++ return -1; ++} ++ + static void + write_tables(void) { + /* Mark the super block valid. */ +@@ -707,9 +718,16 @@ main(int argc, char ** argv) { + DEV = open(device_name,O_RDWR); + if (DEV<0) + die(_("unable to open %s")); +- if (!S_ISBLK(statbuf.st_mode)) ++ if (S_ISBLK(statbuf.st_mode)) { ++ int sectorsize; ++ ++ if (blkdev_get_sector_size(DEV, §orsize) == -1) ++ die(_("cannot determine sector size for %s")); ++ if (BLOCK_SIZE < sectorsize) ++ die(_("block size smaller than physical sector size of %s")); ++ } else if (!S_ISBLK(statbuf.st_mode)) { + check=0; +- else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) ++ } else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) + die(_("will not try to make filesystem on '%s'")); + setup_tables(); + if (check) diff --git a/util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch b/util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch new file mode 100644 index 0000000..b42b6cb --- /dev/null +++ b/util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch @@ -0,0 +1,103 @@ +Index: util-linux-ng-2.13.1/disk-utils/mkfs.minix.c +=================================================================== +--- util-linux-ng-2.13.1.orig/disk-utils/mkfs.minix.c ++++ util-linux-ng-2.13.1/disk-utils/mkfs.minix.c +@@ -78,6 +78,7 @@ + #ifndef BLKGETSIZE + #define BLKGETSIZE _IO(0x12,96) /* return device size */ + #endif ++#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */ + #define BLKSSZGET _IO(0x12,104)/* get block device sector size */ + + #ifndef __GNUC__ +@@ -103,7 +104,7 @@ + static char * program_name = "mkfs"; + static char * device_name = NULL; + static int DEV = -1; +-static long BLOCKS = 0; ++static unsigned long long BLOCKS = 0; + static int check = 0; + static int badblocks = 0; + static int namelen = 30; /* default (changed to 30, per Linus's +@@ -219,24 +220,21 @@ count_blocks (int fd) { + return (low + 1); + } + +-static int +-get_size(const char *file) { +- int fd; +- long size; +- +- fd = open(file, O_RDWR); +- if (fd < 0) { +- perror(file); +- exit(1); +- } ++/* get size in bytes */ ++int ++blkdev_get_size(int fd, unsigned long long *bytes) ++{ ++ unsigned long size; ++ ++ if (ioctl(fd, BLKGETSIZE64, bytes) >= 0) ++ return 0; ++ + if (ioctl(fd, BLKGETSIZE, &size) >= 0) { +- close(fd); +- return (size * 512); ++ *bytes = ((unsigned long long)size << 9); ++ return 0; + } +- +- size = count_blocks(fd); +- close(fd); +- return size; ++ ++ return -1; + } + + /* get hardware sector size */ +@@ -687,19 +685,9 @@ main(int argc, char ** argv) { + } + } + +- if (device_name && !BLOCKS) +- BLOCKS = get_size (device_name) / 1024; +- if (!device_name || BLOCKS<10) { ++ if (!device_name) { + usage(); + } +- if (version2) { +- if (namelen == 14) +- magic = MINIX2_SUPER_MAGIC; +- else +- magic = MINIX2_SUPER_MAGIC2; +- } else +- if (BLOCKS > 65535) +- BLOCKS = 65535; + check_mount(); /* is it already mounted? */ + tmp = root_block; + *(short *)tmp = 1; +@@ -725,10 +713,22 @@ main(int argc, char ** argv) { + die(_("cannot determine sector size for %s")); + if (BLOCK_SIZE < sectorsize) + die(_("block size smaller than physical sector size of %s")); ++ if (!BLOCKS && blkdev_get_size(DEV, &BLOCKS) == -1) ++ die(_("cannot determine size of %s")); + } else if (!S_ISBLK(statbuf.st_mode)) { + check=0; + } else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) + die(_("will not try to make filesystem on '%s'")); ++ if (BLOCKS < 10) ++ die(_("number of blocks too small")); ++ if (version2) { ++ if (namelen == 14) ++ magic = MINIX2_SUPER_MAGIC; ++ else ++ magic = MINIX2_SUPER_MAGIC2; ++ } else ++ if (BLOCKS > 65535) ++ BLOCKS = 65535; + setup_tables(); + if (check) + check_blocks(); diff --git a/util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch b/util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch new file mode 100644 index 0000000..63a2f6b --- /dev/null +++ b/util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch @@ -0,0 +1,245 @@ +commit 2368077223fa5800cf88659c9c57a7f6517f3fad +Author: Karel Zak +Date: Tue Sep 11 14:35:34 2007 +0200 + + mount: prevent loop mounting the same file twice + + The mount syscall prevents mounting the same device twice + to the same mountpoint. When loop mounting a file, for each + file a new loop device gets allocated, which prevents the detection + of loop mounting the same file to the same mountpoint twice. + The patch adds a check to prevent double mounts, if the same loopfile + is going to be mounted with the same offset to the same mountpoint. + + Co-Author: Matthias Koenig + Signed-off-by: Matthias Koenig + Signed-off-by: Karel Zak + +Index: util-linux-ng-2.13.1/mount/lomount.c +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/lomount.c ++++ util-linux-ng-2.13.1/mount/lomount.c +@@ -143,7 +143,7 @@ show_used_loop_devices (void) { + + for (j = 0; j < SIZE(loop_formats); j++) { + for(i = 0; i < 256; i++) { +- sprintf(dev, loop_formats[j], i); ++ snprintf(dev, sizeof(dev), loop_formats[j], i); + if (stat (dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) { + fd = open (dev, O_RDONLY); + if (fd >= 0) { +@@ -169,6 +169,102 @@ show_used_loop_devices (void) { + + #endif + ++/* check if the loopfile is already associated with the same given ++ * parameters. ++ * ++ * returns: -1 error ++ * 0 unused ++ * 1 loop device already used ++ */ ++static int ++is_associated(int dev, struct stat *file, unsigned long long offset) ++{ ++ struct loop_info64 linfo64; ++ struct loop_info64 linfo; ++ int ret = 0; ++ ++ if (ioctl(dev, LOOP_GET_STATUS64, &linfo64) == 0) { ++ if (file->st_dev == linfo64.lo_device && ++ file->st_ino == linfo64.lo_inode && ++ offset == linfo64.lo_offset) ++ ret = 1; ++ return ret; ++ } ++ if (ioctl(dev, LOOP_GET_STATUS, &linfo) == 0) { ++ if (file->st_dev == linfo.lo_device && ++ file->st_ino == linfo.lo_inode && ++ offset == linfo.lo_offset) ++ ret = 1; ++ return ret; ++ } ++ ++ return errno == ENXIO ? 0 : -1; ++} ++ ++/* check if the loop file is already used with the same given ++ * parameters. We check for device no, inode and offset. ++ * returns: associated devname or NULL ++ */ ++char * ++loopfile_used (const char *filename, unsigned long long offset) { ++ char dev[20]; ++ char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" }; ++ int i, j, fd; ++ struct stat devstat, filestat; ++ struct loop_info loopinfo; ++ ++ if (stat(filename, &filestat) == -1) { ++ perror(filename); ++ return NULL; ++ } ++ ++ for (j = 0; j < SIZE(loop_formats); j++) { ++ for(i = 0; i < 256; i++) { ++ snprintf(dev, sizeof(dev), loop_formats[j], i); ++ if (stat (dev, &devstat) == 0 && S_ISBLK(devstat.st_mode)) { ++ fd = open (dev, O_RDONLY); ++ if (fd >= 0) { ++ int res = 0; ++ ++ if(ioctl (fd, LOOP_GET_STATUS, &loopinfo) == 0) ++ res = is_associated(fd, &filestat, offset); ++ close (fd); ++ if (res == 1) ++ return xstrdup(dev); ++ } ++ continue; /* continue trying as long as devices exist */ ++ } ++ break; ++ } ++ } ++ return NULL; ++} ++ ++int ++loopfile_used_with(char *devname, const char *filename, unsigned long long offset) ++{ ++ struct stat statbuf; ++ int fd, ret; ++ ++ if (!is_loop_device(devname)) ++ return 0; ++ ++ if (stat(filename, &statbuf) == -1) { ++ perror(filename); ++ return -1; ++ } ++ ++ fd = open(devname, O_RDONLY); ++ if (fd == -1) { ++ perror(devname); ++ return -1; ++ } ++ ret = is_associated(fd, &statbuf, offset); ++ ++ close(fd); ++ return ret; ++} ++ + int + is_loop_device (const char *device) { + struct stat statbuf; +@@ -284,6 +380,16 @@ set_loop(const char *device, const char + char *filename; + char res_file[PATH_MAX+1]; + ++ if (verbose) { ++ char *xdev = loopfile_used(file, offset); ++ ++ if (xdev) { ++ printf(_("warning: %s is already associated with %s\n"), ++ file, xdev); ++ free(xdev); ++ } ++ } ++ + mode = (*loopro ? O_RDONLY : O_RDWR); + if ((ffd = open(file, mode)) < 0) { + if (!*loopro && errno == EROFS) +Index: util-linux-ng-2.13.1/mount/lomount.h +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/lomount.h ++++ util-linux-ng-2.13.1/mount/lomount.h +@@ -4,3 +4,6 @@ extern int set_loop(const char *, const + extern int del_loop(const char *); + extern int is_loop_device(const char *); + extern char * find_unused_loop_device(void); ++ ++extern int loopfile_used_with(char *devname, const char *filename, unsigned long long offset); ++extern char *loopfile_used (const char *filename, unsigned long long offset); +Index: util-linux-ng-2.13.1/mount/mount.c +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/mount.c ++++ util-linux-ng-2.13.1/mount/mount.c +@@ -42,6 +42,7 @@ + #include "mount_paths.h" + #include "env.h" + #include "nls.h" ++#include "realpath.h" + + #define DO_PS_FIDDLING + +@@ -833,9 +834,49 @@ suid_check(const char *spec, const char + *flags &= ~(MS_OWNER | MS_GROUP); + } + ++/* Check, if there already exists a mounted loop device on the mountpoint node ++ * with the same parameters. ++ */ ++static int ++is_mounted_same_loopfile(const char *node0, const char *loopfile, unsigned long long offset) ++{ ++ struct mntentchn *mnt = NULL; ++ char node[PATH_MAX+1]; ++ int res = 0; ++ ++ myrealpath(node0, node, PATH_MAX); ++ ++ /* Search for mountpoint node in mtab, ++ * procceed if any of these has the loop option set or ++ * the device is a loop device ++ */ ++ mnt = getmntdirbackward(node, mnt); ++ if (!mnt) { ++ return 0; ++ } ++ for(; mnt && res == 0; mnt = getmntdirbackward(node, mnt)) { ++ char *p; ++ ++ if (strncmp(mnt->m.mnt_fsname, "/dev/loop", 9) == 0) ++ res = loopfile_used_with((char *) mnt->m.mnt_fsname, ++ loopfile, offset); ++ ++ else if ((p = strstr(mnt->m.mnt_opts, "loop="))) { ++ char *dev = xstrdup(p+5); ++ if ((p = strchr(dev, ','))) ++ *p = '\0'; ++ res = loopfile_used_with(dev, loopfile, offset); ++ free(dev); ++ } ++ } ++ ++ return res; ++} ++ + static int + loop_check(const char **spec, const char **type, int *flags, +- int *loop, const char **loopdev, const char **loopfile) { ++ int *loop, const char **loopdev, const char **loopfile, ++ const char *node) { + int looptype; + unsigned long long offset; + +@@ -876,6 +917,11 @@ loop_check(const char **spec, const char + + offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0; + ++ if (is_mounted_same_loopfile(node, *loopfile, offset)) { ++ error(_("mount: according to mtab %s is already mounted on %s as loop"), *loopfile, node); ++ return EX_FAIL; ++ } ++ + do { + if (!*loopdev || !**loopdev) + *loopdev = find_unused_loop_device(); +@@ -1061,7 +1107,7 @@ try_mount_one (const char *spec0, const + * stale assignments of files to loop devices. Nasty when used for + * encryption. + */ +- res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile); ++ res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile, node); + if (res) + goto out; + } diff --git a/util-linux-mount_losetup_crypto.patch b/util-linux-mount_losetup_crypto.patch index 57a815d..53f4cff 100644 --- a/util-linux-mount_losetup_crypto.patch +++ b/util-linux-mount_losetup_crypto.patch @@ -40,31 +40,33 @@ Signed-off-by: Ludwig Nussel create mode 100644 mount/sha512.c create mode 100644 mount/sha512.h -diff --git a/mount/Makefile.am b/mount/Makefile.am -index 01643b2..cb7af0a 100644 ---- a/mount/Makefile.am -+++ b/mount/Makefile.am -@@ -13,6 +13,7 @@ headers_common = fstab.h mount_mntent.h mount_constants.h \ +Index: util-linux-ng-2.13.1/mount/Makefile.am +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/Makefile.am ++++ util-linux-ng-2.13.1/mount/Makefile.am +@@ -13,6 +13,7 @@ headers_common = fstab.h linux_fs.h moun getusername.h loop.h sundries.h mount_common = fstab.c mount_mntent.c getusername.c lomount.c \ + rmd160.c sha512.c \ - $(utils_common) $(headers_common) ../lib/env.c ../lib/linux_version.c \ - ../lib/blkdev.c + $(utils_common) $(headers_common) ../lib/env.c + + mount_SOURCES = mount.c $(mount_common) ../lib/setproctitle.c +@@ -25,7 +26,8 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD -@@ -27,6 +28,7 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) swapon_SOURCES = swapon.c swap_constants.h $(utils_common) - losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c \ -+ rmd160.c sha512.c \ - loop.h lomount.h xmalloc.h sundries.h realpath.h +-losetup_SOURCES = lomount.c loop.h lomount.h realpath.c xmalloc.c ++losetup_SOURCES = lomount.c loop.h lomount.h realpath.c xmalloc.c \ ++ rmd160.c sha512.c losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) -diff --git a/mount/lomount.c b/mount/lomount.c -index 5bd8954..98f144f 100644 ---- a/mount/lomount.c -+++ b/mount/lomount.c -@@ -20,12 +20,18 @@ + mount_LDADD = $(LDADD_common) +Index: util-linux-ng-2.13.1/mount/lomount.c +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/lomount.c ++++ util-linux-ng-2.13.1/mount/lomount.c +@@ -20,11 +20,16 @@ #include "loop.h" #include "lomount.h" @@ -72,22 +74,20 @@ index 5bd8954..98f144f 100644 +#include "sha512.h" #include "xstrncpy.h" #include "nls.h" - #include "sundries.h" - #include "xmalloc.h" #include "realpath.h" + #include "xmalloc.h" +#ifndef MIN +#define MIN(a,b) ((a enable data encryption with specified \n" @@ -300,7 +300,7 @@ index 5bd8954..98f144f 100644 " -o | --offset start at offset into file\n" " -p | --pass-fd read passphrase from file descriptor \n" " -r | --read-only setup read-only loop device\n" -@@ -582,11 +696,14 @@ usage(void) { +@@ -594,11 +708,14 @@ error (const char *fmt, ...) { int main(int argc, char **argv) { char *p, *offset, *encryption, *passfd, *device, *file; @@ -315,7 +315,7 @@ index 5bd8954..98f144f 100644 unsigned long long off; struct option longopts[] = { { "all", 0, 0, 'a' }, -@@ -594,6 +711,8 @@ main(int argc, char **argv) { +@@ -606,6 +723,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -324,7 +324,7 @@ index 5bd8954..98f144f 100644 { "offset", 1, 0, 'o' }, { "pass-fd", 1, 0, 'p' }, { "read-only", 0, 0, 'r' }, -@@ -609,12 +728,13 @@ main(int argc, char **argv) { +@@ -621,12 +740,13 @@ main(int argc, char **argv) { delete = find = all = 0; off = 0; offset = encryption = passfd = NULL; @@ -339,7 +339,7 @@ index 5bd8954..98f144f 100644 longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -633,6 +753,12 @@ main(int argc, char **argv) { +@@ -645,6 +765,12 @@ main(int argc, char **argv) { case 'f': find = 1; break; @@ -352,7 +352,7 @@ index 5bd8954..98f144f 100644 case 'o': offset = optarg; break; -@@ -696,8 +822,10 @@ main(int argc, char **argv) { +@@ -708,8 +834,10 @@ main(int argc, char **argv) { usage(); if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(); @@ -364,22 +364,10 @@ index 5bd8954..98f144f 100644 if (res == 2 && find) { if (verbose) printf("stolen loop=%s...trying again\n", -diff --git a/mount/lomount.h b/mount/lomount.h -index 38b3a48..3a6210f 100644 ---- a/mount/lomount.h -+++ b/mount/lomount.h -@@ -1,5 +1,5 @@ --extern int set_loop(const char *, const char *, unsigned long long, -- const char *, int, int *); -+extern int set_loop(const char *device, const char *file, unsigned long long offset, -+ const char *encryption, const char* phash, int pfd, int *loopro, int keysz); - extern int del_loop(const char *); - extern int is_loop_device(const char *); - extern char * find_unused_loop_device(void); -diff --git a/mount/losetup.8 b/mount/losetup.8 -index db2929f..54bbc94 100644 ---- a/mount/losetup.8 -+++ b/mount/losetup.8 +Index: util-linux-ng-2.13.1/mount/losetup.8 +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/losetup.8 ++++ util-linux-ng-2.13.1/mount/losetup.8 @@ -76,6 +76,15 @@ find the first unused loop device. If a argument is present, use this device. Otherwise, print its name. .IP "\fB\-h, \-\-help\fP" @@ -405,11 +393,11 @@ index db2929f..54bbc94 100644 Cryptoloop is deprecated in favor of dm-crypt. For more details see .B cryptsetup(8). -diff --git a/mount/mount.8 b/mount/mount.8 -index 54b11d4..e79ea04 100644 ---- a/mount/mount.8 -+++ b/mount/mount.8 -@@ -615,6 +615,15 @@ This option implies the options +Index: util-linux-ng-2.13.1/mount/mount.8 +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/mount.8 ++++ util-linux-ng-2.13.1/mount/mount.8 +@@ -610,6 +610,15 @@ This option implies the options (unless overridden by subsequent options, as in the option line .BR group,dev,suid ). .TP @@ -425,7 +413,7 @@ index 54b11d4..e79ea04 100644 .B mand Allow mandatory locks on this filesystem. See .BR fcntl (2). -@@ -2010,6 +2019,10 @@ that are really options to +@@ -2008,6 +2017,10 @@ that are really options to .BR \%losetup (8). (These options can be used in addition to those specific to the filesystem type.) @@ -436,11 +424,11 @@ index 54b11d4..e79ea04 100644 If no explicit loop device is mentioned (but just an option `\fB\-o loop\fP' is given), then -diff --git a/mount/mount.c b/mount/mount.c -index 60fe4fe..164ae3c 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -88,6 +88,9 @@ static int suid = 0; +Index: util-linux-ng-2.13.1/mount/mount.c +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/mount.c ++++ util-linux-ng-2.13.1/mount/mount.c +@@ -94,6 +94,9 @@ static int suid = 0; /* Contains the fd to read the passphrase from, if any. */ static int pfd = -1; @@ -450,7 +438,7 @@ index 60fe4fe..164ae3c 100644 /* Map from -o and fstab option strings to the flag argument to mount(2). */ struct opt_map { const char *opt; /* option name */ -@@ -182,6 +185,7 @@ static const struct opt_map opt_map[] = { +@@ -191,6 +194,7 @@ static int opt_nofail = 0; static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper; @@ -458,7 +446,7 @@ index 60fe4fe..164ae3c 100644 static int mounted (const char *spec0, const char *node0); static int check_special_mountprog(const char *spec, const char *node, -@@ -196,6 +200,8 @@ static struct string_opt_map { +@@ -205,6 +209,8 @@ static struct string_opt_map { { "vfs=", 1, &opt_vfstype }, { "offset=", 0, &opt_offset }, { "encryption=", 0, &opt_encryption }, @@ -467,7 +455,7 @@ index 60fe4fe..164ae3c 100644 { "speed=", 0, &opt_speed }, { "comment=", 1, &opt_comment }, { "uhelper=", 0, &opt_uhelper }, -@@ -897,7 +903,7 @@ loop_check(const char **spec, const char **type, int *flags, +@@ -903,7 +909,7 @@ loop_check(const char **spec, const char *type = opt_vfstype; } @@ -476,7 +464,7 @@ index 60fe4fe..164ae3c 100644 *loopfile = *spec; if (*loop) { -@@ -923,9 +929,10 @@ loop_check(const char **spec, const char **type, int *flags, +@@ -929,9 +935,10 @@ loop_check(const char **spec, const char return EX_SYSERR; /* no more loop devices */ if (verbose) printf(_("mount: going to use the loop device %s\n"), *loopdev); @@ -489,15 +477,15 @@ index 60fe4fe..164ae3c 100644 if (res == 2) { /* loop dev has been grabbed by some other process, try again, if not given explicitly */ -@@ -1661,6 +1668,7 @@ static struct option longopts[] = { +@@ -1681,6 +1688,7 @@ static struct option longopts[] = { { "options", 1, 0, 'o' }, { "test-opts", 1, 0, 'O' }, { "pass-fd", 1, 0, 'p' }, + { "keybits", 1, 0, 'k' }, { "types", 1, 0, 't' }, { "bind", 0, 0, 128 }, - { "move", 0, 0, 133 }, -@@ -1807,6 +1815,7 @@ main(int argc, char *argv[]) { + { "replace", 0, 0, 129 }, +@@ -1836,6 +1844,7 @@ main(int argc, char *argv[]) { char *options = NULL, *test_opts = NULL, *node; const char *spec = NULL; char *label = NULL; @@ -505,7 +493,7 @@ index 60fe4fe..164ae3c 100644 char *uuid = NULL; char *types = NULL; char *p; -@@ -1837,7 +1846,7 @@ main(int argc, char *argv[]) { +@@ -1866,7 +1875,7 @@ main(int argc, char *argv[]) { initproctitle(argc, argv); #endif @@ -514,7 +502,7 @@ index 60fe4fe..164ae3c 100644 longopts, NULL)) != -1) { switch (c) { case 'a': /* mount everything in fstab */ -@@ -1855,6 +1864,9 @@ main(int argc, char *argv[]) { +@@ -1884,6 +1893,9 @@ main(int argc, char *argv[]) { case 'i': external_allowed = 0; break; @@ -524,9 +512,9 @@ index 60fe4fe..164ae3c 100644 case 'l': list_with_volumelabel = 1; break; -@@ -1991,6 +2003,9 @@ main(int argc, char *argv[]) { - - atexit(unlock_mtab); +@@ -2030,6 +2042,9 @@ main(int argc, char *argv[]) { + create_mtab (); + } + if (keysize && sscanf(keysize,"%d",&keysz) != 1) + die (EX_USAGE, _("mount: argument to --keybits or -k must be a number")); @@ -534,22 +522,10 @@ index 60fe4fe..164ae3c 100644 switch (argc+specseen) { case 0: /* mount -a */ -diff --git a/mount/my_dev_t.h b/mount/my_dev_t.h -new file mode 100644 -index 0000000..5c4c0a1 +Index: util-linux-ng-2.13.1/mount/rmd160.c +=================================================================== --- /dev/null -+++ b/mount/my_dev_t.h -@@ -0,0 +1,5 @@ -+/* silliness to get dev_t defined as the kernel defines it */ -+/* glibc uses a different dev_t */ -+ -+#include -+#define my_dev_t __kernel_old_dev_t -diff --git a/mount/rmd160.c b/mount/rmd160.c -new file mode 100644 -index 0000000..3430954 ---- /dev/null -+++ b/mount/rmd160.c ++++ util-linux-ng-2.13.1/mount/rmd160.c @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -1083,11 +1059,10 @@ index 0000000..3430954 + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -diff --git a/mount/rmd160.h b/mount/rmd160.h -new file mode 100644 -index 0000000..4b2c61d +Index: util-linux-ng-2.13.1/mount/rmd160.h +=================================================================== --- /dev/null -+++ b/mount/rmd160.h ++++ util-linux-ng-2.13.1/mount/rmd160.h @@ -0,0 +1,11 @@ +#ifndef RMD160_H +#define RMD160_H @@ -1100,11 +1075,10 @@ index 0000000..4b2c61d +#endif /*RMD160_H*/ + + -diff --git a/mount/sha512.c b/mount/sha512.c -new file mode 100644 -index 0000000..e4c9c13 +Index: util-linux-ng-2.13.1/mount/sha512.c +=================================================================== --- /dev/null -+++ b/mount/sha512.c ++++ util-linux-ng-2.13.1/mount/sha512.c @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1538,11 +1512,10 @@ index 0000000..e4c9c13 + memset(&ctx, 0, sizeof(ctx)); +} +#endif -diff --git a/mount/sha512.h b/mount/sha512.h -new file mode 100644 -index 0000000..4b57c01 +Index: util-linux-ng-2.13.1/mount/sha512.h +=================================================================== --- /dev/null -+++ b/mount/sha512.h ++++ util-linux-ng-2.13.1/mount/sha512.h @@ -0,0 +1,45 @@ +/* + * sha512.h @@ -1589,6 +1562,16 @@ index 0000000..4b57c01 +/* no sha384_write(), use sha512_write() */ +/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ +extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); --- -1.5.3.4 - +Index: util-linux-ng-2.13.1/mount/lomount.h +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/lomount.h ++++ util-linux-ng-2.13.1/mount/lomount.h +@@ -1,6 +1,6 @@ + extern int verbose; +-extern int set_loop(const char *, const char *, unsigned long long, +- const char *, int, int *); ++extern int set_loop(const char *device, const char *file, unsigned long long offset, ++ const char *encryption, const char* phash, int pfd, int *loopro, int keysz); + extern int del_loop(const char *); + extern int is_loop_device(const char *); + extern char * find_unused_loop_device(void); diff --git a/util-linux-ng-2.13-swapon-swsuspend.patch b/util-linux-ng-2.13-swapon-swsuspend.patch new file mode 100644 index 0000000..c11b296 --- /dev/null +++ b/util-linux-ng-2.13-swapon-swsuspend.patch @@ -0,0 +1,112 @@ +From db6041b3a569d78f5716baa5a134a3a857014337 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 30 May 2007 13:22:51 +0200 +Subject: [PATCH] mount: automatically reinitialize swap with old swsuspend data + +We have to reinitialize swap area with old (=useless) software suspend +data. The problem is that if we don't do it, then we get data +corruption the next time with suspended on. + +Signed-off-by: Karel Zak +--- + mount/swapon.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 63 insertions(+), 0 deletions(-) + +diff --git a/mount/swapon.c b/mount/swapon.c +index ed91afc..3f9b442 100644 +--- a/mount/swapon.c ++++ b/mount/swapon.c +@@ -10,6 +10,9 @@ + #include + #include + #include ++#include ++#include ++#include + #include "xmalloc.h" + #include "swap_constants.h" + #include "nls.h" +@@ -17,6 +20,8 @@ + #include "realpath.h" + #include "mount_paths.h" + ++#define PATH_MKSWAP "/sbin/mkswap" ++ + #ifdef HAVE_SYS_SWAP_H + # include + #endif +@@ -158,6 +163,52 @@ display_summary(void) + } + + static int ++swap_is_swsuspend(const char *device) { ++ const char *type = fsprobe_get_fstype_by_devname(device); ++ ++ return (type && strcmp(type, "swsuspend") == 0) ? 1 : 0; ++} ++ ++/* calls mkswap */ ++static int ++swap_reinitialize(const char *device) { ++ const char *label = fsprobe_get_label_by_devname(device); ++ pid_t pid; ++ int status, ret; ++ ++ switch((pid=fork())) { ++ case -1: /* fork error */ ++ fprintf(stderr, _("%s: cannot fork: %s\n"), ++ progname, strerror(errno)); ++ return -1; ++ ++ case 0: /* child */ ++ if (label && *label) ++ execl(PATH_MKSWAP, PATH_MKSWAP, "-L", label, device, NULL); ++ else ++ execl(PATH_MKSWAP, PATH_MKSWAP, device, NULL); ++ exit(1); /* error */ ++ ++ default: /* parent */ ++ do { ++ if ((ret = waitpid(pid, &status, 0)) < 0 ++ && errno == EINTR) ++ continue; ++ else if (ret < 0) { ++ fprintf(stderr, _("%s: waitpid: %s\n"), ++ progname, strerror(errno)); ++ return -1; ++ } ++ } while (0); ++ ++ /* mkswap returns: 0=suss, 1=error */ ++ if (WIFEXITED(status) && WEXITSTATUS(status)==0) ++ return 0; /* ok */ ++ } ++ return -1; /* error */ ++} ++ ++static int + do_swapon(const char *orig_special, int prio, int canonic) { + int status; + struct stat st; +@@ -179,6 +230,18 @@ do_swapon(const char *orig_special, int prio, int canonic) { + return -1; + } + ++ /* We have to reinitialize swap with old (=useless) software suspend ++ * data. The problem is that if we don't do it, then we get data ++ * corruption the next time with suspended on. ++ */ ++ if (swap_is_swsuspend(special)) { ++ fprintf(stdout, _("%s: %s: software suspend data detected. " ++ "Reinitializing the swap.\n"), ++ progname, special); ++ if (swap_reinitialize(special) < 0) ++ return -1; ++ } ++ + /* people generally dislike this warning - now it is printed + only when `verbose' is set */ + if (verbose) { +-- +1.5.2.2 + diff --git a/util-linux-ng-2.13.0.1+git20071121.tar.bz2 b/util-linux-ng-2.13.0.1+git20071121.tar.bz2 deleted file mode 100644 index ac50340..0000000 --- a/util-linux-ng-2.13.0.1+git20071121.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:901086dc7bc99a89b9f11839107a0dc83f6b9e89158bccb8b30ad0a5a609123b -size 1585119 diff --git a/util-linux-ng-2.13.1.tar.bz2 b/util-linux-ng-2.13.1.tar.bz2 new file mode 100644 index 0000000..2f38751 --- /dev/null +++ b/util-linux-ng-2.13.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e67d86683adef0855220b6f5a4b7ca2c51a15faa142e2ecd69925ede76854a4d +size 2854716 diff --git a/util-linux.changes b/util-linux.changes index 599d5e9..1389521 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Thu Feb 7 12:41:25 CET 2008 - mkoenig@suse.de + +- update to version 2.13.1: + mount: + * -L|-U segfault when label or uuid doesn't exist + * chain of symlinks to fstab causes use of pointer after free + * don't call canonicalize(SPEC) for cifs, smbfs and nfs + * improve error message when helper program not present + losetup: + * fix errno usage + mkswap: + * possible to crash with SELinux relabeling support + sfdisk: + * allow partitioning drives of over 2^31 sectors + hwclock: + * check for ENODEV +- mount: fix problem with device canonicalization when using + persistent name in fstab but call mount with real bd name +- patches merged: + util-linux-2.13-mount_fd_leak.patch + ------------------------------------------------------------------- Tue Dec 18 15:55:19 CET 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index cdb51d5..5e948dc 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # -# spec file for package util-linux (Version 2.13.0.1+git20071121) +# spec file for package util-linux (Version 2.13.1) # -# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -20,8 +20,8 @@ PreReq: %install_info_prereq permissions License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on -Version: 2.13.0.1+git20071121 -Release: 11 +Version: 2.13.1 +Release: 1 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source1: util-linux-2.13-rpmlintrc @@ -46,28 +46,30 @@ Source28: mkzimage_cmdline.8 Source29: mkzimage_cmdline.c Source30: README.largedisk ## -## util-linux +## util-linux patches ## -# # add hostid Patch1: util-linux-2.12-misc_utils_hostid.patch # 104405 - mount -a doesn't work with hotpluggable devices Patch2: util-linux-mount_opt_nofail.patch -# 176582 - If the user doesn't specify -t mount.fstype will never be called -#TODO: check alternative upstream fix -#Patch96: util-linux-2.12r-mount_external_prog_on_guess.patch # 160822 - fix for 153657 Patch3: util-linux-2.12r-fdisk_cyl.patch # 241372 - remove legacy warnings from fdisk -Patch5: util-linux-2.12r-fdisk_remove_bogus_warnings.patch -# 254437 - swapon should automatically reset the suspend signature -# TODO: Needs to be ported to new version -Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch +Patch4: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # 304861 - support password hashing and key length -Patch10: util-linux-mount_losetup_crypto.patch -Patch11: util-linux-2.13-mount_fd_leak.patch -Patch12: util-linux-2.13-fdisk_cfdisk_ncursesw.patch -Patch13: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch +Patch6: util-linux-2.13-fdisk_cfdisk_ncursesw.patch +# 338419 +Patch7: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch +# in upstream git, but not yet released +Patch8: util-linux-2.13.1-canonicalize_loopfile_name.patch +Patch9: util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch +Patch10: util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch +Patch11: util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch +# +Patch12: util-linux-2.13.1-getfs_fix.patch +# 254437 - swapon should automatically reset the suspend signature +Patch13: util-linux-ng-2.13-swapon-swsuspend.patch +Patch20: util-linux-mount_losetup_crypto.patch ## ## ## adjtimex @@ -105,12 +107,17 @@ Authors: %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch5 -p1 -#%patch38 -p1 +%patch4 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch20 -p1 +#%patch38 -p1 # cd adjtimex-* %patch50 -p1 @@ -558,33 +565,52 @@ fi #%endif %changelog -* Tue Dec 18 2007 - mkoenig@suse.de +* Thu Feb 07 2008 mkoenig@suse.de +- update to version 2.13.1: + mount: + * -L|-U segfault when label or uuid doesn't exist + * chain of symlinks to fstab causes use of pointer after free + * don't call canonicalize(SPEC) for cifs, smbfs and nfs + * improve error message when helper program not present + losetup: + * fix errno usage + mkswap: + * possible to crash with SELinux relabeling support + sfdisk: + * allow partitioning drives of over 2^31 sectors + hwclock: + * check for ENODEV +- mount: fix problem with device canonicalization when using + persistent name in fstab but call mount with real bd name +- patches merged: + util-linux-2.13-mount_fd_leak.patch +* Tue Dec 18 2007 mkoenig@suse.de - add temporary workaround for broken RTC update interrupts [#338419] -* Mon Dec 03 2007 - ro@suse.de +* Mon Dec 03 2007 ro@suse.de - remove "arch", in coreutils now -* Thu Nov 29 2007 - lnussel@suse.de +* Thu Nov 29 2007 lnussel@suse.de - update crypto patch * fix mount buffer overflow when reading the passphrase (#332148) * add loop_fish2 compatability code to losetup/mount again (#332095) * change default hash size for 128bit keys to sha256 again -* Wed Nov 21 2007 - mkoenig@suse.de +* Wed Nov 21 2007 mkoenig@suse.de - update to git20071121: add sector size check for mkfs.minix [#308256] fix canonicalization for cifs [#338375] - provide Short-Description for raw init script - add rpmlintrc -* Tue Nov 20 2007 - mkoenig@suse.de +* Tue Nov 20 2007 mkoenig@suse.de - fix raw path in init script -* Tue Nov 06 2007 - mkoenig@suse.de +* Tue Nov 06 2007 mkoenig@suse.de - update to 2.13.0.1+git20071106 - prevent loop mounting the same file twice [#240653] - merged upstream: util-linux-2.13-mount_helper_fix.patch util-linux-2.13-hwclock_rtc_option.patch -* Thu Oct 04 2007 - bg@suse.de +* Thu Oct 04 2007 bg@suse.de - don't use parisc, parisc32 and parisc64. -* Mon Oct 01 2007 - mkoenig@suse.de +* Mon Oct 01 2007 mkoenig@suse.de - update to version 2.13 merged upstream: util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch @@ -594,28 +620,28 @@ fi util-linux-2.13-sys_utils_build_rdev_x86_64.patch - fix hwclock --rtc option [#326106] - fix setuid/setgid mixup and error checking [#327022] -* Fri Sep 14 2007 - mkoenig@suse.de +* Fri Sep 14 2007 mkoenig@suse.de - link cfdisk against libncursesw instead libncurses to fix broken utf-8 characters [#307353] -* Wed Aug 29 2007 - mkoenig@suse.de +* Wed Aug 29 2007 mkoenig@suse.de - fix fd leaks in previous patch -* Tue Aug 28 2007 - lnussel@suse.de +* Tue Aug 28 2007 lnussel@suse.de - add support for specifying the key length and password hash algorithm [#304861] -* Fri Aug 24 2007 - mkoenig@suse.de +* Fri Aug 24 2007 mkoenig@suse.de - avoid duplicates of root fs if defined with LABEL in fstab [#297959] - fix ionice error handling [#301675] -* Thu Aug 16 2007 - ssommer@suse.de +* Thu Aug 16 2007 ssommer@suse.de - free loop devices when mount fails [#297172] -* Wed Jul 25 2007 - mkoenig@suse.de +* Wed Jul 25 2007 mkoenig@suse.de - update to git20070725 - removed patches (merged upstream): util-linux-2.12r-mount_mount.8_xfs_update.patch util-linux-2.12r-sys_utils_readprofile_mapfile.patch util-linux-2.12r-disk_utils_mkswap_fix.patch util-linux-2.13-schedutils_ionice_idle.patch -* Tue Jul 17 2007 - mkoenig@suse.de +* Tue Jul 17 2007 mkoenig@suse.de - updated to version 2.13-rc2: * add wakertc - cleanup ionice usage [#270251] @@ -629,7 +655,7 @@ fi util-linux-2.12a-mount_mountpointwithcolon.patch util-linux-2.12a-mount_procswapcheck.patch util-linux-2.12q-mount_umount2_not_static.patch -* Fri Jul 13 2007 - mkoenig@suse.de +* Fri Jul 13 2007 mkoenig@suse.de - replace hotplug with nofail option and fix it to not use syscall reserved values. - removed patch @@ -637,16 +663,16 @@ fi it is intentional that suid hwclock capabilities are limited - removed patch (fixed upstream) util-linux-2.12q-mount_--move.patch -* Mon Jul 09 2007 - mkoenig@suse.de +* Mon Jul 09 2007 mkoenig@suse.de - add libuuid-devel to BuildRequires to let mkswap use UUIDs -* Thu Jul 05 2007 - mkoenig@suse.de +* Thu Jul 05 2007 mkoenig@suse.de - use %%config(noreplace) for /etc/filesystems - Keep rdev stuff for x86_64 util-linux-2.13-sys_utils_build_rdev_x86_64.patch - removed patches (merged upstream) util-linux-2.12r-misc_utils_cal_formatting.patch util-linux-2.12q-sys_utils_ionice.patch -* Thu Jul 05 2007 - mkoenig@suse.de +* Thu Jul 05 2007 mkoenig@suse.de - update to 2.13-rc1: * mount fixes * agetty: add 'O' escape code to display domain name @@ -660,23 +686,23 @@ fi util-linux-2.13-misc_utils_cal_ncurses.patch util-linux-2.13-mount_volumeid_label.patch - use %%find_lang -* Thu Jun 21 2007 - mkoenig@suse.de +* Thu Jun 21 2007 mkoenig@suse.de - use encoded label names with volume_id [#232929] util-linux-2.13-mount_volumeid_label.patch -* Thu Jun 14 2007 - mkoenig@suse.de +* Thu Jun 14 2007 mkoenig@suse.de - mkzimage_cmdline: activate commandline if used with -s [#279935] -* Wed Jun 13 2007 - mkoenig@suse.de +* Wed Jun 13 2007 mkoenig@suse.de - schedutils: let chrt accept pid 0 for current process and fix some documentation bugs [#266879] util-linux-2.13-schedutils_chrt.patch -* Wed Jun 06 2007 - mkoenig@suse.de +* Wed Jun 06 2007 mkoenig@suse.de - update to git20070530 - removed patches util-linux-2.13-mount_volume_id.patch util-linux-2.12r-mount_by_uuid.patch util-linux-2.13-build_gnu_source.patch - fix build with ncurses -* Tue Jun 05 2007 - mkoenig@suse.de +* Tue Jun 05 2007 mkoenig@suse.de - update to git20070509 mount: NFS code removed (use mount.nfs{,4} from nfs-utils) - remove sm-notify (nfs-utils) @@ -693,16 +719,16 @@ fi util-linux-2.13-mount_nfs_timeo.patch util-linux-mount_nfs.8.patch util-linux-mount_warn_nfsudp.patch -* Tue Jun 05 2007 - pth@suse.de +* Tue Jun 05 2007 pth@suse.de - Update to which-2.16, mainly because regenerating configure with newer autotools works. - Fix the patch for AC_CHECK_STATICLIB - Our distribution doesn't install libiberty.a, so pass --disable-iberty to configure of which to not use a libiberty from somewhere else. -* Mon Jun 04 2007 - pth@suse.de +* Mon Jun 04 2007 pth@suse.de - Make configure of which search for static libs in lib64 subdirs. -* Mon Apr 23 2007 - mkoenig@suse.de +* Mon Apr 23 2007 mkoenig@suse.de - update to git20070412 - remove chkdupexe and scriptreplay to get rid of the perl dependency [#265757] @@ -711,10 +737,10 @@ fi - merged patches: util-linux-2.13-misc_utils_add_man_scriptreplay.patch util-linux-2.13-tests_missing_include.patch -* Mon Apr 16 2007 - mkoenig@suse.de +* Mon Apr 16 2007 mkoenig@suse.de - fix initialization of offset in util-linux-2.12r-mount_racy_loop.patch [#264225] -* Tue Apr 10 2007 - mkoenig@suse.de +* Tue Apr 10 2007 mkoenig@suse.de - update to version git20070330 of new forked development tree - removed Suse crypto patches for losetup [FATE#302001] - removed binaries: @@ -754,205 +780,205 @@ fi detect also x86_64 as INTEL architecture - rename patches to identify them clearly by subsystem - schedutils now part of util-linux itself -* Wed Apr 04 2007 - mkoenig@suse.de +* Wed Apr 04 2007 mkoenig@suse.de - add Supplements line [FATE#301966] -* Mon Mar 26 2007 - rguenther@suse.de +* Mon Mar 26 2007 rguenther@suse.de - add ncurses-devel and zlib-devel BuildRequires -* Thu Mar 15 2007 - mkoenig@suse.de +* Thu Mar 15 2007 mkoenig@suse.de - mount: Let swapon automatically reinitialize a suspended swap partition [#254437] -* Fri Mar 09 2007 - mkoenig@suse.de +* Fri Mar 09 2007 mkoenig@suse.de - mount: fix mtablock patch to avoid mtab corruption [#226783] -* Thu Mar 08 2007 - mkoenig@suse.de +* Thu Mar 08 2007 mkoenig@suse.de - partx: fix warning for too long literal -* Wed Mar 07 2007 - rguenther@suse.de +* Wed Mar 07 2007 rguenther@suse.de - fix changelog entry order -* Tue Feb 27 2007 - mkoenig@suse.de +* Tue Feb 27 2007 mkoenig@suse.de - fix missing return code in util-linux-2.12r-losetup_password.patch - mount: fix race condition in mount -o loop [#242750] -* Mon Feb 12 2007 - mkoenig@suse.de +* Mon Feb 12 2007 mkoenig@suse.de - remove legacy warnings from fdisk [#241372] -* Fri Feb 02 2007 - mkoenig@suse.de +* Fri Feb 02 2007 mkoenig@suse.de - do not use O_EXCL for mkfs.cramfs [#241466] -* Wed Jan 31 2007 - mkoenig@suse.de +* Wed Jan 31 2007 mkoenig@suse.de - let mkfs tools open with O_EXCL [#238687] -* Tue Dec 12 2006 - mkoenig@suse.de +* Tue Dec 12 2006 mkoenig@suse.de - provide different return codes for losetup with encryption for empty and too short passwords. [#197493] -* Tue Dec 05 2006 - mkoenig@suse.de +* Tue Dec 05 2006 mkoenig@suse.de - default swap to V1 in any case [#205956] patch: util-linux-2.12r-mkswap_fix.patch - do not append addr option with each nfs remount [#130625] patch: util-linux-2.12r-nfs_remount_options.patch - add README.largedisk about fdisk partition size constraints [#153657] -* Tue Nov 07 2006 - mkoenig@suse.de +* Tue Nov 07 2006 mkoenig@suse.de - enable partx [#214992] -* Tue Oct 10 2006 - mkoenig@suse.de +* Tue Oct 10 2006 mkoenig@suse.de - Round up partition end LBA to a cylinder boundary during add_partition() [#174892] - Fix readprofile on ppc64 [#179122] - Fix cal formatting bug [#203469] -* Mon Oct 09 2006 - mkoenig@suse.de +* Mon Oct 09 2006 mkoenig@suse.de - Fix llseek issues. - swapon.c: Do not use PAGE_SIZE macro. -* Mon Aug 21 2006 - mkoenig@suse.de +* Mon Aug 21 2006 mkoenig@suse.de - Added sysfs to list of filesystems not to unmount with umount -a, resolves #190385 -* Mon Jun 12 2006 - kay.sievers@suse.de +* Mon Jun 12 2006 kay.sievers@suse.de - use libvolume_id from provided as a rpm by udev 094 -* Wed May 17 2006 - jeffm@suse.com +* Thu May 18 2006 jeffm@suse.com - Fixed support for calling external programs w/o -t , it would add mtab twice [#176582] -* Mon Apr 24 2006 - hvogel@suse.de +* Mon Apr 24 2006 hvogel@suse.de - document xfs dmapi mount options better [#158955] -* Fri Apr 21 2006 - olh@suse.de +* Fri Apr 21 2006 olh@suse.de - add mkzimage_cmdline to edit CHRP zImage kernel cmdline (168313) -* Tue Apr 18 2006 - hvogel@suse.de +* Tue Apr 18 2006 hvogel@suse.de - fix number of supported raw devices [#165570] -* Wed Mar 29 2006 - olh@suse.de +* Wed Mar 29 2006 olh@suse.de - clearify comments about mac disk label handling in fdisk -* Tue Mar 28 2006 - hvogel@suse.de +* Tue Mar 28 2006 hvogel@suse.de - more fixes for the fdiskwrap patch [#160822] -* Tue Mar 21 2006 - okir@suse.de +* Tue Mar 21 2006 okir@suse.de - Update nfs(5) manpage to document security flavors [#159368] -* Mon Mar 20 2006 - hvogel@suse.de +* Mon Mar 20 2006 hvogel@suse.de - fix numbers of supported raw devices to match the kernel [#158203] - make NFSv3 client support RPCSEC_GSS [#158401] - fix that if the user doesn't specify -t mount.fstype will never be called. [#155147] -* Fri Mar 10 2006 - hvogel@suse.de +* Fri Mar 10 2006 hvogel@suse.de - Fix init.d/raw script to parse device names with , in them correctly [#155653] -* Thu Mar 09 2006 - hare@suse.de +* Thu Mar 09 2006 hare@suse.de - Fix potential security hole in libvolume_id (#133256) -* Mon Mar 06 2006 - hvogel@suse.de +* Mon Mar 06 2006 hvogel@suse.de - patch fdiskmaclabel.h too -* Thu Mar 02 2006 - hvogel@suse.de +* Thu Mar 02 2006 hvogel@suse.de - axboe made fdisk not wrap at 2TB [#153657] -* Fri Feb 17 2006 - lmuelle@suse.de +* Fri Feb 17 2006 lmuelle@suse.de - Use cifs instead of smbfs if the source starts with // and we do not set a different fs type. -* Sun Feb 12 2006 - olh@suse.de +* Sun Feb 12 2006 olh@suse.de - cosmetic fix for option_hotplug declaration fix unininitalized string for unknown filesystems (#148855) -* Fri Feb 10 2006 - hvogel@suse.de +* Fri Feb 10 2006 hvogel@suse.de - mount should not put / in the mtab twice if mount -f / is called [#148409] - fix hostid printf [#149163] -* Wed Feb 01 2006 - olh@suse.de +* Wed Feb 01 2006 olh@suse.de - dont invent our own MS_FLAGS (#147132) -* Wed Feb 01 2006 - ro@suse.de +* Wed Feb 01 2006 ro@suse.de - fix typo in previous change, binary negation is "~" -* Fri Jan 27 2006 - sscheler@suse.de +* Fri Jan 27 2006 sscheler@suse.de - fixed mount hotplug option (#143352). now we don't send the MS_HOTPLUG flag to the kernel any longer, because the kernel doesn't know this option (EINVAL) and actually doesn't need to know about it. -* Fri Jan 27 2006 - olh@suse.de +* Fri Jan 27 2006 olh@suse.de - remove clock symlink, hwclock exists since 7 years -* Fri Jan 27 2006 - olh@suse.de +* Fri Jan 27 2006 olh@suse.de - lsprop and nvsetenv moved to powerpc-utils [#144758] -* Thu Jan 26 2006 - hvogel@suse.de +* Thu Jan 26 2006 hvogel@suse.de - Make nfsboot world readable [#145418] -* Wed Jan 25 2006 - mls@suse.de +* Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires -* Tue Jan 24 2006 - mmj@suse.de +* Tue Jan 24 2006 mmj@suse.de - Remove faulty nfs fallback code [#139019] -* Mon Jan 16 2006 - mmj@suse.de +* Mon Jan 16 2006 mmj@suse.de - Add patch for nsetenv to fix short reads/short writes [#142546] -* Wed Jan 11 2006 - mmj@suse.de +* Wed Jan 11 2006 mmj@suse.de - Update sm-notify [#141542] -* Wed Jan 04 2006 - mmj@suse.de +* Wed Jan 04 2006 mmj@suse.de - Update to 2.12r including since 2.12q: o cfdisk: fix a segfault with ReiserFS partitions o umount: disallow -r option for non-root users -* Tue Nov 22 2005 - mmj@suse.de +* Tue Nov 22 2005 mmj@suse.de - install proper renice manpage [#132470] -* Tue Nov 15 2005 - uli@suse.de +* Tue Nov 15 2005 uli@suse.de - umount2 is not static (only fails on ARM, surprisingly) - added ARM ionice syscalls -* Fri Nov 11 2005 - hare@suse.de +* Fri Nov 11 2005 hare@suse.de - Fix reverse-mapping of by-UUID and by-LABEL mounts. -* Thu Nov 10 2005 - hare@suse.de +* Thu Nov 10 2005 hare@suse.de - Fix a mishandling of by-UUID mounts. - Use libvolume_id from udev. -* Sat Oct 22 2005 - mmj@suse.de +* Sat Oct 22 2005 mmj@suse.de - Increase lsprop.c max property size to 4k [#128155] -* Mon Oct 10 2005 - mmj@suse.de +* Mon Oct 10 2005 mmj@suse.de - Add -fno-strict-aliasing to nfsmount_xdr.c -* Mon Oct 03 2005 - mmj@suse.de +* Mon Oct 03 2005 mmj@suse.de - Teach the mount manual page about nodiratime [#118987] -* Thu Sep 29 2005 - mmj@suse.de +* Thu Sep 29 2005 mmj@suse.de - Patch from jakub007@go2.pl to make mount --move update /etc/mtab correctly [#115129] -* Tue Sep 13 2005 - mmj@suse.de +* Tue Sep 13 2005 mmj@suse.de - Only allow root to pass -r to umount [#116741] -* Mon Sep 05 2005 - mmj@suse.de +* Mon Sep 05 2005 mmj@suse.de - MAC -> Mac [#104081] -* Fri Sep 02 2005 - mmj@suse.de +* Fri Sep 02 2005 mmj@suse.de - Don't package manual executable [#114849] -* Thu Sep 01 2005 - mmj@suse.de +* Thu Sep 01 2005 mmj@suse.de - Add patch for device-mapper mount by label support [#75966] -* Thu Sep 01 2005 - ro@suse.de +* Thu Sep 01 2005 ro@suse.de - provide and obsolete schedutils -* Tue Aug 23 2005 - hvogel@suse.de +* Tue Aug 23 2005 hvogel@suse.de - update ionice patch by axboe so that ionice will complain about missing sys_ioprio_set support, but it will still execute the process. -* Mon Aug 22 2005 - hvogel@suse.de +* Mon Aug 22 2005 hvogel@suse.de - Fix rpm verify output [#105807] (ghost entry for /var/lib/nfs/state) -* Mon Aug 22 2005 - schwab@suse.de +* Mon Aug 22 2005 schwab@suse.de - Fix stupid buffer overflow bug in cfdisk [#66020]. -* Wed Aug 17 2005 - hare@suse.de +* Wed Aug 17 2005 hare@suse.de - Add option 'hotplug' to mount (#104405) -* Mon Aug 15 2005 - schwab@suse.de +* Mon Aug 15 2005 schwab@suse.de - Always build with RPM_OPT_FLAGS. -* Thu Aug 11 2005 - mmj@suse.de +* Thu Aug 11 2005 mmj@suse.de - Patch from Patrick Kirsch to make fdisk detect MAC-fs [#104081] -* Wed Aug 03 2005 - mmj@suse.de +* Wed Aug 03 2005 mmj@suse.de - Merge schedutils to here (it's happened upstream already) -* Tue Aug 02 2005 - mmj@suse.de +* Tue Aug 02 2005 mmj@suse.de - Support for s390 and s390x -* Mon Aug 01 2005 - mmj@suse.de +* Mon Aug 01 2005 mmj@suse.de - It's not __ppc_ and __ppc64__ but __powerpc__ and __powerpc64__ -* Mon Aug 01 2005 - mmj@suse.de +* Mon Aug 01 2005 mmj@suse.de - Add ionice binary from Jens Axboe -* Wed Jun 29 2005 - mmj@suse.de +* Wed Jun 29 2005 mmj@suse.de - Document load and clearly issues about NFS over UDP [#80263] - Don't compile with -fsigned-char [#93886] -* Tue May 31 2005 - okir@suse.de +* Tue May 31 2005 okir@suse.de - Added NFSv4 support -* Mon May 09 2005 - hvogel@suse.de +* Mon May 09 2005 hvogel@suse.de - move hashalot and cryptsetup tools to util-linux-crypto -* Tue Apr 12 2005 - mmj@suse.de +* Tue Apr 12 2005 mmj@suse.de - bump TCP timeo to 600 [#76198] -* Tue Mar 29 2005 - mmj@suse.de +* Tue Mar 29 2005 mmj@suse.de - Add awareness of twofishSL92 [#74359] - Update hashalot to version 0.3 -* Mon Mar 14 2005 - okir@suse.de +* Mon Mar 14 2005 okir@suse.de - Changed sm-notify to recognize host names as well as addresses. -* Thu Mar 10 2005 - mmj@suse.de +* Thu Mar 10 2005 mmj@suse.de - Don't strip anything explicitly - Don't compile with -fno-strict-aliasing [#66020] -* Fri Feb 04 2005 - schwab@suse.de +* Fri Feb 04 2005 schwab@suse.de - Fix stupid programmer. -* Mon Jan 24 2005 - meissner@suse.de +* Mon Jan 24 2005 meissner@suse.de - implicit strcmp / strerror in setctsid fixed. - 0 -> NULL in an execl -* Fri Jan 21 2005 - mmj@suse.de +* Fri Jan 21 2005 mmj@suse.de - Sleep after inserting the raw module to make sure it's ready [#49807] - Update to 2.12q including since 2.12p: o New upstream maintainer - Adrian Bunk o sfdisk: add -G option o Updated translations -* Tue Jan 18 2005 - okir@suse.de +* Tue Jan 18 2005 okir@suse.de - Updated sm-notify; try not to stall bootup my moving the NSM state update after we've backgrounded (#49072). -* Mon Jan 10 2005 - mmj@suse.de +* Mon Jan 10 2005 mmj@suse.de - Update adjtimex to 1.20 - Update to util-linux-2.12p including since 2.12i: o cfdisk: fix number of new partition when partitions not in disk order @@ -990,15 +1016,15 @@ fi o umount: use special umount program if it exists o new flock binary o New messages -* Tue Nov 30 2004 - mmj@suse.de +* Tue Nov 30 2004 mmj@suse.de - Install ramsize, rdev, rootflags and vidmode on x86-64 [#48633] -* Fri Nov 12 2004 - schwab@suse.de +* Fri Nov 12 2004 schwab@suse.de - Don't install *fdisk on ia64. -* Fri Nov 12 2004 - ro@suse.de +* Fri Nov 12 2004 ro@suse.de - correct permissions handling for wall and write -* Tue Nov 09 2004 - mmj@suse.de +* Tue Nov 09 2004 mmj@suse.de - Fix segfault with mount -l [#48029] -* Fri Nov 05 2004 - mmj@suse.de +* Fri Nov 05 2004 mmj@suse.de - Update to util-linux-2.12i including: o MCONFIG: fix build conditions o chfn, chsh: add error checking @@ -1010,7 +1036,7 @@ fi o sfdisk: correct typo in __attribute__used nonsense o sfdisk: use PACKED on __arm__ o sfdisk: fix warning printout -* Thu Nov 04 2004 - mmj@suse.de +* Thu Nov 04 2004 mmj@suse.de - Update to util-linux-2.12h including: o cfdisk: avoid crash if no partition table o elvtune: tell user that this only works on 2.4 kernels @@ -1025,19 +1051,19 @@ fi o mount: support jfs mount-by-label, improve reiserfs support o sfdisk: remove strange "ends in a digit" heuristic o *fdisk: use common disksize() routine -* Tue Oct 19 2004 - mmj@suse.de +* Tue Oct 19 2004 mmj@suse.de - Add patch from SGI for fdisk label [#47368] -* Tue Sep 28 2004 - mmj@suse.de +* Tue Sep 28 2004 mmj@suse.de - And another one [#46201] -* Wed Sep 15 2004 - mmj@suse.de +* Thu Sep 16 2004 mmj@suse.de - Add patch from Andries to fix cfdisk [#44996] -* Tue Sep 07 2004 - mmj@suse.de +* Tue Sep 07 2004 mmj@suse.de - Update to util-linux-2.12c including: o mount.8: added recent ext2 mount options o mount: support jfs mount-by-label, improve reiserfs support o sfdisk: remove strange "ends in a digit" heuristic o *fdisk: use common disksize() routine [#44678] -* Wed Aug 25 2004 - mmj@suse.de +* Wed Aug 25 2004 mmj@suse.de - Update to util-linux-2.12b including: o chsh: improved error message o dmesg: ask kernel proper buffer size @@ -1062,36 +1088,36 @@ fi Turkish, Ukrainian messages - Update the loop-AES patch, thanks to Sumit Bose - Change the minimum password length to 8 chars -* Tue Aug 24 2004 - mmj@suse.de +* Tue Aug 24 2004 mmj@suse.de - Fix signed/unsigned bug in lsprop [#44048] -* Wed Aug 18 2004 - mmj@suse.de +* Wed Aug 18 2004 mmj@suse.de - Readd patch that got lost to make fdisk -l work better with RAID controllers [#43485] -* Mon Aug 09 2004 - mmj@suse.de +* Mon Aug 09 2004 mmj@suse.de - Add an improved version of the dmesg bufsize patch. -* Tue Jun 22 2004 - mmj@suse.de +* Tue Jun 22 2004 mmj@suse.de - Add patch to try and guess a filesystem type before blindly assuming it's nfs because of the colon [#42097] -* Mon Jun 14 2004 - agruen@suse.de +* Mon Jun 14 2004 agruen@suse.de - Formatting error in mount.8 manual page. -* Wed Jun 09 2004 - mmj@suse.de +* Wed Jun 09 2004 mmj@suse.de - Add patch from Olaf Kirch to make protocol selection for mount independent of protocol selection for NFS, and picks what is available (preferring TCP over UDP) [#41735] -* Wed Jun 09 2004 - mls@suse.de +* Wed Jun 09 2004 mls@suse.de - add '-f' option to setctsid -* Thu May 27 2004 - okir@suse.de +* Thu May 27 2004 okir@suse.de - sm-notify now binds to a reserved port -* Sat May 15 2004 - mmj@suse.de +* Sat May 15 2004 mmj@suse.de - Add documentation about raw device handling [#39037] -* Mon May 10 2004 - mmj@suse.de +* Mon May 10 2004 mmj@suse.de - Make dmesg dump entire buffer. Patch from Andries/odabrunz [#39761] -* Thu May 06 2004 - mmj@suse.de +* Thu May 06 2004 mmj@suse.de - Also check if the device is the same when doing swapon. Could be the same block device with 2 different names [#39436] -* Wed May 05 2004 - mmj@suse.de +* Wed May 05 2004 mmj@suse.de - Do a /sbin/modprobe raw when invoking raw devices [#39037] -* Tue Apr 20 2004 - mmj@suse.de +* Tue Apr 20 2004 mmj@suse.de - Update to 2.12a including: o fdisk: fix for kernels 2.4.15-2.4.17 o fdisk: fix when all partitions are in use @@ -1105,67 +1131,67 @@ fi o setterm.1: clarification o sfdisk: fix check for is_ide_cdrom_or_tape o umount: skip proc, devfs, devpts on umount -a -* Mon Apr 19 2004 - mmj@suse.de +* Mon Apr 19 2004 mmj@suse.de - Add patch for unlimited raw devices [#39037] -* Thu Apr 15 2004 - mmj@suse.de +* Thu Apr 15 2004 mmj@suse.de - Make sm-notify be more quiet when nothing wrong, and log to sys- log when something is. -* Tue Apr 06 2004 - mmj@suse.de +* Tue Apr 06 2004 mmj@suse.de - Don't use startproc for sm-notify [#38481] -* Mon Apr 05 2004 - mmj@suse.de +* Mon Apr 05 2004 mmj@suse.de - Removing elvtune alltogether was a bit drastic, since it of course works fine with 2.4 kernels. So print a warning in case the BLKELVGET ioctl returns something indicating 2.6 kernels. -* Thu Apr 01 2004 - mmj@suse.de +* Thu Apr 01 2004 mmj@suse.de - Don't package elvtune anymore since it's obsolete now that io scheduler can be tuned in /sys/block/hdX/queue/iosched/* [#37869] -* Wed Mar 31 2004 - mmj@suse.de +* Wed Mar 31 2004 mmj@suse.de - Apply util-linux-2.12a fixes for hwclock and readprofile. The hwclock bit is a timout fix which hopefully fixes [#35877] - Move sm-notify to here from nfs-utils [#36737] -* Mon Mar 29 2004 - mmj@suse.de +* Mon Mar 29 2004 mmj@suse.de - Adjust warnings about Crypto-API -* Sun Mar 28 2004 - mmj@suse.de +* Sun Mar 28 2004 mmj@suse.de - Add patch to make script allways use the same LC_NUMERIC [#35476] -* Fri Mar 26 2004 - od@suse.de +* Fri Mar 26 2004 od@suse.de - Add setctsid by Werner Fink [#37177] -* Fri Mar 26 2004 - mmj@suse.de +* Fri Mar 26 2004 mmj@suse.de - Mount option "code" is now "codepage" so update /etc/fstab in postinstall [#36950] -* Fri Mar 26 2004 - mmj@suse.de +* Fri Mar 26 2004 mmj@suse.de - Remove false statement in nfs.5 about the linux kernel not supporting nfs over tcp [#37060] -* Wed Mar 17 2004 - mmj@suse.de +* Wed Mar 17 2004 mmj@suse.de - Use correct permissions for README.hashalot [#36303] -* Mon Mar 08 2004 - mmj@suse.de +* Mon Mar 08 2004 mmj@suse.de - Enable build of replay [#35434] -* Wed Feb 25 2004 - mmj@suse.de +* Wed Feb 25 2004 mmj@suse.de - Use loop-AES-v2.0f-util-linux-2.12.diff instead of losetup patch added earlier. Thanks Sumit Bose! -* Thu Feb 19 2004 - mmj@suse.de +* Thu Feb 19 2004 mmj@suse.de - Add cryptsetup script from Christophe Saout, for usage with the new dm-crypt. -* Mon Feb 16 2004 - mmj@suse.de +* Mon Feb 16 2004 mmj@suse.de - Add losetup patch and hashalot program from Ben Slusky -* Sun Feb 01 2004 - kukuk@suse.de +* Sun Feb 01 2004 kukuk@suse.de - Remove newgrp again (will use POSIX conform version) -* Fri Jan 16 2004 - kukuk@suse.de +* Fri Jan 16 2004 kukuk@suse.de - Add pam-devel to neededforbuild -* Mon Jan 12 2004 - mmj@suse.de +* Mon Jan 12 2004 mmj@suse.de - Adjust the nfs.5 manual page to reflect we're mounting nfs over tcp pr. default. - Collapse two similar patches 2 one. -* Fri Dec 19 2003 - garloff@suse.de +* Fri Dec 19 2003 garloff@suse.de - Fix by okir for previous patch. -* Fri Dec 19 2003 - garloff@suse.de +* Fri Dec 19 2003 garloff@suse.de - Add patch to fallback to UDP if TCP NFS mount fails. -* Tue Dec 02 2003 - mmj@suse.de +* Tue Dec 02 2003 mmj@suse.de - Make patch to guess if a CD is a CD-Extra [#30316] - Adjust patch that moves ext2/3 in front of vfat - Regenerate patches (filename still tells when they were added) -* Tue Nov 18 2003 - mmj@suse.de +* Tue Nov 18 2003 mmj@suse.de - Mount NFS over TCP pr. default [#33018] -* Thu Nov 13 2003 - mmj@suse.de +* Thu Nov 13 2003 mmj@suse.de - Update to util-linux-2.12 including: o losetup: -p option specifies fd for passphrase o fdisk: sgi layout fix @@ -1196,64 +1222,64 @@ fi o sfdisk.8: added an example of partitioning with logical partitions o sfdisk: only add a AA55 signature for DOS-type partition tables o tailf: new -* Tue Oct 21 2003 - mmj@suse.de +* Tue Oct 21 2003 mmj@suse.de - Correct permissions -* Tue Oct 21 2003 - ja@suse.cz +* Tue Oct 21 2003 ja@suse.cz - added support for cryptoloop in 2.6.x kernels. -* Wed Oct 15 2003 - mmj@suse.de +* Wed Oct 15 2003 mmj@suse.de - Don't build as root -* Mon Oct 13 2003 - kukuk@suse.de +* Mon Oct 13 2003 kukuk@suse.de - Enable newgrp -* Thu Oct 02 2003 - kukuk@suse.de +* Thu Oct 02 2003 kukuk@suse.de - Fix compiling with kernel 2.6.0-test6 header files -* Tue Aug 12 2003 - mmj@suse.de +* Tue Aug 12 2003 mmj@suse.de - Update to pmac-utils-2.1 sources and only include nvsetenv -* Tue Aug 12 2003 - mmj@suse.de +* Tue Aug 12 2003 mmj@suse.de - Add mount_guessfstype support for PCDOS [#27814] -* Wed Jun 18 2003 - ak@suse.de +* Wed Jun 18 2003 ak@suse.de - support noreserved option for NFS (#27428) -* Thu Jun 05 2003 - mmj@suse.de +* Thu Jun 05 2003 mmj@suse.de - Rearrange the specfile wrt. archs -* Tue May 13 2003 - mmj@suse.de +* Tue May 13 2003 mmj@suse.de - Use %%defattr - Remove files we don't package -* Wed May 07 2003 - mmj@suse.de +* Wed May 07 2003 mmj@suse.de - Rearrange the do_guess_fstype() code to look for ext2/3 before vfat [#26581] -* Thu Apr 24 2003 - ro@suse.de +* Thu Apr 24 2003 ro@suse.de - fix install_info --delete call and move from preun to postun -* Mon Apr 14 2003 - pthomas@suse.de +* Mon Apr 14 2003 pthomas@suse.de - Get rid of the syscall for adjtimex in selective cases and just call the glibc wrapper. Fixes build on s390. -* Mon Apr 14 2003 - pthomas@suse.de +* Mon Apr 14 2003 pthomas@suse.de - Use geteuid instead of getuid in hwclock to enable making hwclock suid root. -* Mon Apr 07 2003 - mmj@suse.de +* Mon Apr 07 2003 mmj@suse.de - Only delete info entries when removing last version. -* Thu Mar 13 2003 - mmj@suse.de +* Thu Mar 13 2003 mmj@suse.de - Apply patch to make sfdisk not destroy BSD slices [#25093] -* Mon Mar 03 2003 - mmj@suse.de +* Mon Mar 03 2003 mmj@suse.de - Remove superflous umask(033); calls [#23292] -* Mon Mar 03 2003 - ro@suse.de +* Mon Mar 03 2003 ro@suse.de - add missing info dir entries -* Tue Feb 18 2003 - agruen@suse.de +* Tue Feb 18 2003 agruen@suse.de - Add description of the effect of `mount -t nfs -o noacl' on the use of the GETACL and SETACL remote procedure calls to the nfs(5) manual page. -* Mon Feb 17 2003 - mmj@suse.de +* Mon Feb 17 2003 mmj@suse.de - It's called smbfs not smb [#23697] -* Thu Feb 13 2003 - mmj@suse.de +* Thu Feb 13 2003 mmj@suse.de - Readd patch for passphrase timeout that got lost [#23527] -* Fri Feb 07 2003 - mmj@suse.de +* Fri Feb 07 2003 mmj@suse.de - The install_info macros need PreReq: %%install_info_prereq -* Fri Feb 07 2003 - ro@suse.de +* Fri Feb 07 2003 ro@suse.de - added install_info macros -* Tue Feb 04 2003 - ro@suse.de +* Tue Feb 04 2003 ro@suse.de - don't package /bin/kill (part of coreutils now) -* Tue Feb 04 2003 - meissner@suse.de +* Tue Feb 04 2003 meissner@suse.de - Include tarball with pmac-utils manpages, so we do not need sgmltool and all its dependents. -* Wed Jan 29 2003 - mmj@suse.de +* Wed Jan 29 2003 mmj@suse.de - Update to util-linux-2.11z including: · Translation updates · mount: fix LABEL= handling for user umount, don't abort on read @@ -1261,22 +1287,22 @@ fi · setterm: accept devfs name · simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails · umount: allow user umount after mount by label or uuid -* Wed Jan 22 2003 - sf@suse.de +* Wed Jan 22 2003 sf@suse.de - removed last patch, added new (correct) patch -* Wed Jan 22 2003 - sf@suse.de +* Wed Jan 22 2003 sf@suse.de - removed eliminate_doubles() from mkfs.cramfs.c for x86_64, as it segfaults. (makes the images slightly larger, about 10%%) -* Tue Jan 21 2003 - mmj@suse.de +* Tue Jan 21 2003 mmj@suse.de - Added description of ISO mount options to mount.8 [#22915] -* Mon Dec 02 2002 - mmj@suse.de +* Mon Dec 02 2002 mmj@suse.de - Update the ReiserFS patch from Chris Mason -* Fri Nov 29 2002 - mmj@suse.de +* Fri Nov 29 2002 mmj@suse.de - Fix missing #include -* Thu Nov 28 2002 - mmj@suse.de +* Thu Nov 28 2002 mmj@suse.de - Make readprofile also try to locate the System.map in /boot/System.map-`uname -r` [#22168] -* Wed Nov 27 2002 - mmj@suse.de +* Wed Nov 27 2002 mmj@suse.de - Update to util-linux-2.11y including: o Translation updates o fdisk,cfdisk: cosmetic fixes @@ -1284,7 +1310,7 @@ fi o more: kill external help file o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC fails (patch we had, now folded upstream) -* Wed Nov 20 2002 - mmj@suse.de +* Wed Nov 20 2002 mmj@suse.de - Update to util-linux-2.11x including: o Translation updates for several languages o cfdisk: correct error printout @@ -1297,56 +1323,56 @@ fi o setpwnam.c: open temp pw file with O_EXCL o simpleinit: fix for "spawn too fast" o swapon: new -e option -* Tue Nov 19 2002 - mmj@suse.de +* Tue Nov 19 2002 mmj@suse.de - Fix multistring assignment in adjtimex -* Mon Nov 11 2002 - ro@suse.de +* Mon Nov 11 2002 ro@suse.de - changed neededforbuild to - changed neededforbuild to <> -* Thu Oct 31 2002 - mmj@suse.de +* Thu Oct 31 2002 mmj@suse.de - Add -b option to mkfs.cramfs (needed for biarch architectures) -* Thu Oct 31 2002 - ro@suse.de +* Thu Oct 31 2002 ro@suse.de - hack time to build on alpha -* Tue Oct 22 2002 - mmj@suse.de +* Tue Oct 22 2002 mmj@suse.de - Add correction to the ReiserFS patch that fixes the case where it was possible but unlikely to detect a logged copy of a super on a dedicated logging device as the real thing. From Chris Mason. -* Tue Oct 22 2002 - mmj@suse.de +* Tue Oct 22 2002 mmj@suse.de - Update to util-linux-2.11w including: o fdisk and cfdisk fixes o more bigendian fix o translation updates o > 2GB swapspace o mount umask, cramfs and ocfs stuff -* Tue Oct 08 2002 - mmj@suse.de +* Tue Oct 08 2002 mmj@suse.de - Only enable below patch on ix86 and x86_64 -* Mon Oct 07 2002 - mmj@suse.de +* Mon Oct 07 2002 mmj@suse.de - Make small bugfix to below patch -* Sat Oct 05 2002 - mmj@suse.de +* Sat Oct 05 2002 mmj@suse.de - Apply patch to enable > 2GB swap (redhat) [#20533] -* Wed Oct 02 2002 - mmj@suse.de +* Wed Oct 02 2002 mmj@suse.de - Add one-liner security fix to mount and umount. -* Mon Sep 23 2002 - mmj@suse.de +* Mon Sep 23 2002 mmj@suse.de - Readd fix for klogconsole that got lost [#19834] -* Fri Sep 13 2002 - mmj@suse.de +* Fri Sep 13 2002 mmj@suse.de - Added patch from Oracle to mount ocfs by label [#19262] -* Thu Sep 12 2002 - mmj@suse.de +* Thu Sep 12 2002 mmj@suse.de - more: Do not cast char * to int and back [#18896] -* Sat Aug 31 2002 - olh@suse.de +* Sat Aug 31 2002 olh@suse.de - add mount_cramfs_be.diff to allow mount -oloop cramfsfile loopdir -* Mon Aug 26 2002 - mmj@suse.de +* Mon Aug 26 2002 mmj@suse.de - Make mode not 666 when writing /etc/mtab [#18342] -* Mon Aug 26 2002 - meissner@suse.de +* Mon Aug 26 2002 meissner@suse.de - quieten klogconsole if the console does not support TIOCLINUX [#12516] -* Thu Aug 22 2002 - mmj@suse.de +* Thu Aug 22 2002 mmj@suse.de - Added patch from Andreas Gruenbacher for nfs-access-acl [#18183] -* Wed Aug 21 2002 - mmj@suse.de +* Wed Aug 21 2002 mmj@suse.de - Fixed an mtab locking bug with patch from Olaf Kirch [#17637] -* Mon Aug 19 2002 - mmj@suse.de +* Mon Aug 19 2002 mmj@suse.de - Updated reiserfs patch from Chris Mason - Added patch for mount.8, thanks Andreas Gruenbacher -* Thu Aug 15 2002 - mmj@suse.de +* Thu Aug 15 2002 mmj@suse.de - Correct PreReq: -* Mon Aug 05 2002 - mmj@suse.de +* Mon Aug 05 2002 mmj@suse.de - Update to 2.11u which includes: o Danish, German, Spanish, Swedish and Turkish updates. o configure: for fsck.cramfs, mkfs.cramfs: add test for libz @@ -1354,22 +1380,22 @@ fi o agetty: use same test as login does to find utmp entry o fdisk: fix for fdisk on empty disk o mount updates -* Tue Jul 23 2002 - schwab@suse.de +* Tue Jul 23 2002 schwab@suse.de - Fix mkfs.cramfs for architectures with non-4k pages. -* Wed Jul 17 2002 - mmj@suse.de +* Wed Jul 17 2002 mmj@suse.de - Merged base into util-linux -* Mon Jul 15 2002 - mmj@suse.de +* Mon Jul 15 2002 mmj@suse.de - Added JFSv2 patch from Christoph Hellwig for volume label. Does for JFS, what below patch does for ReiserFS. -* Sun Jul 14 2002 - adrian@suse.de +* Sun Jul 14 2002 adrian@suse.de - fix ul-2.10m-sgi-fdisk.diff patch to apply again -* Thu Jul 11 2002 - mmj@suse.de +* Thu Jul 11 2002 mmj@suse.de - Added patch from Chris Mason for volume label on reiserfs -* Wed Jul 10 2002 - olh@suse.de +* Wed Jul 10 2002 olh@suse.de - add mkfs.cramfs and fsck.cramfs to file list -* Wed Jul 10 2002 - mmj@suse.de +* Wed Jul 10 2002 mmj@suse.de - Fixed nfs.5 to tell nfsver defaults to 3 [#16815] -* Mon Jul 08 2002 - mmj@suse.de +* Mon Jul 08 2002 mmj@suse.de - Update to 2.11t which includes * fdformat: remove test on major * fdisk, hwclock and swap polishing @@ -1377,340 +1403,340 @@ fi * cramfs tools includes from the kernel * swap{on,off} honours /proc/swaps * mount small fixups -* Fri Jul 05 2002 - kukuk@suse.de +* Fri Jul 05 2002 kukuk@suse.de - Use %%ix86 macro -* Mon Jul 01 2002 - bk@suse.de +* Mon Jul 01 2002 bk@suse.de - get raw built on s390 and s390x - remove %%ifarchs s390 s390x for fdisk(needed for SCSI disks) -* Mon Jun 17 2002 - mmj@suse.de +* Mon Jun 17 2002 mmj@suse.de - Added a fix for simpleinit exploit. -* Thu Jun 13 2002 - olh@suse.de +* Thu Jun 13 2002 olh@suse.de - disable hwclock ppc patch, maybe obsolete with recent kernels -* Thu May 16 2002 - mmj@suse.de +* Thu May 16 2002 mmj@suse.de - Added manpage guessfstype(8) -* Thu May 09 2002 - mmj@suse.de +* Thu May 09 2002 mmj@suse.de - Updated to util-linux-2.11r, including translations, x86-64 sup- port and small bugfixes. -* Sat Apr 13 2002 - mmj@suse.de +* Sat Apr 13 2002 mmj@suse.de - Updated to util-linux-2.11q, includes bugfixes. - util-linux-mkswap.patch for ia64 was folded into mainline -* Fri Apr 12 2002 - stepan@suse.de +* Fri Apr 12 2002 stepan@suse.de - added x86-64 support. -* Thu Apr 04 2002 - ihno@suse.de +* Thu Apr 04 2002 ihno@suse.de - corrected printf to report shared memories sizes bigger than 2 GByte correct (Bug #15585). It was reportet on s390x, but should effect other 64-Bit systems as well. -* Tue Mar 19 2002 - mmj@suse.de +* Tue Mar 19 2002 mmj@suse.de - Updated to 2.11o. The hexdump patch have been dropped since it was folded to mainline util-linux. -* Fri Mar 15 2002 - schwab@suse.de +* Fri Mar 15 2002 schwab@suse.de - Fix mkswap for ia64. -* Mon Mar 04 2002 - draht@suse.de +* Mon Mar 04 2002 draht@suse.de - permissions fixes for write(1) and wall(1) -* Fri Feb 01 2002 - mmj@suse.de +* Fri Feb 01 2002 mmj@suse.de - Moved /usr/bin/logger to /bin/logger (needed by sysconfig) -* Mon Jan 28 2002 - mmj@suse.de +* Mon Jan 28 2002 mmj@suse.de - Added the guessfstype binary from msvec/fehr -* Thu Jan 24 2002 - ro@suse.de +* Thu Jan 24 2002 ro@suse.de - modified fillup_and_insserv call (perl-hack not needed here) -* Mon Jan 21 2002 - mmj@suse.de +* Mon Jan 21 2002 mmj@suse.de - Merge NetBSD hexdump changes, fixes bugzilla #12801 -* Thu Jan 10 2002 - ro@suse.de +* Thu Jan 10 2002 ro@suse.de - removed ACTIVATE_RAW_DEV -* Mon Dec 31 2001 - adrian@suse.de +* Mon Dec 31 2001 adrian@suse.de - add patch for mips to create SGI partition tables with fdisk -* Tue Dec 18 2001 - bjacke@suse.de +* Tue Dec 18 2001 bjacke@suse.de - add adjtimex -* Mon Dec 10 2001 - mmj@suse.de +* Mon Dec 10 2001 mmj@suse.de - Update to util-linux-2.11n -* Tue Nov 20 2001 - mmj@suse.de +* Tue Nov 20 2001 mmj@suse.de - Added a patch to 'wall' to remove unwanted newline (#12181) -* Wed Nov 07 2001 - kukuk@suse.de +* Wed Nov 07 2001 kukuk@suse.de - Remove unneeded SPARC patch for hwclock -* Sat Oct 13 2001 - kukuk@suse.de +* Sat Oct 13 2001 kukuk@suse.de - Update to util-linux 2.11l -* Wed Sep 12 2001 - garloff@suse.de +* Wed Sep 12 2001 garloff@suse.de - Fixed some dutch translations. (bug #10276) -* Mon Sep 10 2001 - olh@suse.de +* Mon Sep 10 2001 olh@suse.de - marry fdisk and AIX label again... add lsprop for ppc dumps the device tree in a human readable format -* Mon Sep 03 2001 - kukuk@suse.de +* Mon Sep 03 2001 kukuk@suse.de - Update to version 2.11i: - blockdev: corrected ioctl numbers - cal: fixed for multibyte locales - line: new - mount: added vxfs magic -* Sat Sep 01 2001 - kukuk@suse.de +* Sat Sep 01 2001 kukuk@suse.de - Let mount follow symlinks again -* Wed Aug 29 2001 - kukuk@suse.de +* Wed Aug 29 2001 kukuk@suse.de - Add new option to losetup manual page -* Tue Aug 28 2001 - draht@suse.de +* Tue Aug 28 2001 draht@suse.de - added timeout support for losetup (-t ) -* Mon Aug 27 2001 - kukuk@suse.de +* Mon Aug 27 2001 kukuk@suse.de - Add raw rc scripts, too -* Sun Aug 26 2001 - bjacke@suse.de +* Sun Aug 26 2001 bjacke@suse.de - added raw binary and put rawio into obsoletes and provides -* Sat Aug 25 2001 - kukuk@suse.de +* Sat Aug 25 2001 kukuk@suse.de - Fix path in getopt.1 manual page to example directory [Bug #9831] -* Fri Aug 24 2001 - kukuk@suse.de +* Fri Aug 24 2001 kukuk@suse.de - Small fix for hwclock on newer SPARCs -* Mon Aug 13 2001 - ro@suse.de +* Mon Aug 13 2001 ro@suse.de - changed neededforbuild to -* Mon Jul 30 2001 - kukuk@suse.de +* Mon Jul 30 2001 kukuk@suse.de - Update to util-linux-2.11h - Add nologin program -* Tue Jul 10 2001 - kukuk@suse.de +* Tue Jul 10 2001 kukuk@suse.de - Remove swapdev from filelist -* Tue Jul 10 2001 - kukuk@suse.de +* Tue Jul 10 2001 kukuk@suse.de - Update to util-linux-2.11g -* Wed Jun 06 2001 - bk@suse.de +* Thu Jun 07 2001 bk@suse.de - added s390x to all ifnarch s390 -* Fri Apr 20 2001 - kukuk@suse.de +* Fri Apr 20 2001 kukuk@suse.de - Fix wall bug (character 80, 160, 240, are missing) [Bug #6962] -* Mon Mar 26 2001 - kukuk@suse.de +* Mon Mar 26 2001 kukuk@suse.de - Add exception for broken i2o disk device numbering scheme, kernel hacker are not able to fix this and make it right [Bug #5881]. -* Sat Mar 24 2001 - kukuk@suse.de +* Sat Mar 24 2001 kukuk@suse.de - Update to util-linux 2.11b -* Thu Mar 15 2001 - kukuk@suse.de +* Thu Mar 15 2001 kukuk@suse.de - Fix changing of partitions with ID 0 on SPARC - Remove duplicate mount patch -* Wed Mar 14 2001 - schwab@suse.de +* Wed Mar 14 2001 schwab@suse.de - Don't use _syscallX on ia64. - Fix missing includes. -* Wed Mar 14 2001 - kukuk@suse.de +* Wed Mar 14 2001 kukuk@suse.de - Update to version 2.11a -* Fri Mar 02 2001 - kukuk@suse.de +* Fri Mar 02 2001 kukuk@suse.de - enable write again -* Mon Feb 12 2001 - kukuk@suse.de +* Mon Feb 12 2001 kukuk@suse.de - cmos.c: Use sys/io.h, fix PowerPC hack -* Tue Feb 06 2001 - ro@suse.de +* Tue Feb 06 2001 ro@suse.de - wall.c: include time.h -* Mon Feb 05 2001 - kukuk@suse.de +* Mon Feb 05 2001 kukuk@suse.de - Split hex to extra package - Update to util-linux-2.10s -* Fri Feb 02 2001 - werner@suse.de +* Fri Feb 02 2001 werner@suse.de - Make swapon/swapoff more handy: * Ignore swap files on ro mounted file systems * If -a is given ignore already active devices at swapon * If -a is given ignore not active devices at swapoff -* Thu Jan 25 2001 - ro@suse.de +* Thu Jan 25 2001 ro@suse.de - added Provides: util -* Fri Jan 12 2001 - garloff@suse.de +* Fri Jan 12 2001 garloff@suse.de - Apply patch to lomount to allow all kerneli crypt algos to be passed and allow to pass passwd with -k. - losetup seems to support >2GB files just fine (#5433) -* Tue Jan 02 2001 - kukuk@suse.de +* Tue Jan 02 2001 kukuk@suse.de - Save permissions of /etc/mtab [Bug #5027] -* Tue Dec 05 2000 - kukuk@suse.de +* Tue Dec 05 2000 kukuk@suse.de - Search first in /etc/filesystems, then in /proc/filesystems -* Tue Dec 05 2000 - kukuk@suse.de +* Tue Dec 05 2000 kukuk@suse.de - Use AIX/fdisk patch from util-linux-2.10r - Backport "guess filesystems" from util-linux-2.10r -* Tue Dec 05 2000 - schwab@suse.de +* Tue Dec 05 2000 schwab@suse.de - Don't use _syscallX on ia64. -* Mon Dec 04 2000 - olh@suse.de +* Mon Dec 04 2000 olh@suse.de - fix diff again -* Sun Dec 03 2000 - olh@suse.de +* Sun Dec 03 2000 olh@suse.de - no segfaults with AIX disklabels -* Wed Nov 29 2000 - uli@suse.de +* Wed Nov 29 2000 uli@suse.de - fixed to build on PPC -* Mon Nov 27 2000 - schwab@suse.de +* Mon Nov 27 2000 schwab@suse.de - Fix broken casts in hwclock. -* Thu Nov 23 2000 - bk@suse.de +* Thu Nov 23 2000 bk@suse.de - temporary disable pivot_root on s390(2.4 kernel is not yet built) -* Wed Nov 22 2000 - schwab@suse.de +* Wed Nov 22 2000 schwab@suse.de - Add pivot_root to file list. -* Mon Nov 20 2000 - kukuk@suse.de +* Mon Nov 20 2000 kukuk@suse.de - Fix pmac-utils to compile with new kernel -* Fri Nov 17 2000 - kukuk@suse.de +* Fri Nov 17 2000 kukuk@suse.de - Fix hwclock to compile on PPC -* Wed Nov 15 2000 - kukuk@suse.de +* Wed Nov 15 2000 kukuk@suse.de - Update util-linux to 2.10q, merge flushb.diff -* Thu Nov 02 2000 - kukuk@suse.de +* Thu Nov 02 2000 kukuk@suse.de - Remove some of the last specfile changes -* Wed Nov 01 2000 - olh@suse.de +* Wed Nov 01 2000 olh@suse.de - update pmac-utils for new powermacs, cleanup specfile -* Fri Oct 20 2000 - kukuk@suse.de +* Fri Oct 20 2000 kukuk@suse.de - Update util-linux to 2.10p - Rename package from util to util-linux -* Wed Sep 27 2000 - kukuk@suse.de +* Wed Sep 27 2000 kukuk@suse.de - Allow NFS v3 with 2.2.17.SuSE -* Tue Sep 26 2000 - kukuk@suse.de +* Tue Sep 26 2000 kukuk@suse.de - Fix mount for new NFS kernel patch -* Sat Sep 09 2000 - kukuk@suse.de +* Sat Sep 09 2000 kukuk@suse.de - Remove tcsh dependency - Update to util-linux 2.10o, use of /etc/filesystems is still broken -* Fri Aug 25 2000 - pthomas@suse.de +* Fri Aug 25 2000 pthomas@suse.de - use %%{_mandir} and %%{_infodir} exclusively. This allows building from source rpm on platforms other than 7.0. -* Wed Jul 19 2000 - bk@suse.de +* Wed Jul 19 2000 bk@suse.de - s390: removed dasdfmt and silo, %%ifnarch s390 for some non-s390 things. -* Tue May 30 2000 - bk@suse.de +* Tue May 30 2000 bk@suse.de - added dasdfmt and silo on s390 -* Mon May 15 2000 - kukuk@suse.de +* Mon May 15 2000 kukuk@suse.de - util-linux: Update to 2.10m -* Wed Apr 26 2000 - kukuk@suse.de +* Wed Apr 26 2000 kukuk@suse.de - flusb: Don't use kernel headers, even if we don't need them! -* Wed Apr 19 2000 - kukuk@suse.de +* Wed Apr 19 2000 kukuk@suse.de - util-linux: Update to 2.10l -* Mon Apr 17 2000 - kukuk@suse.de +* Mon Apr 17 2000 kukuk@suse.de - util-linux: Update to 2.10k -* Thu Apr 13 2000 - kukuk@suse.de +* Thu Apr 13 2000 kukuk@suse.de - Move /sbin/setserial to /bin/setserial, add compat link to /sbin. This fixes [Bug 1084] and is necessary for FHS 2.1 -* Wed Apr 12 2000 - kukuk@suse.de +* Wed Apr 12 2000 kukuk@suse.de - Fix util-linux for Alpha -* Wed Apr 12 2000 - kukuk@suse.de +* Wed Apr 12 2000 kukuk@suse.de - util-linux: Update to 2.10j -* Sun Apr 02 2000 - bk@suse.de +* Sun Apr 02 2000 bk@suse.de - suse s390 team added support for s390 -* Thu Mar 30 2000 - uli@suse.de +* Thu Mar 30 2000 uli@suse.de - hwclock/PPC: added support for MK48T559 RTC chip used in MTX+ boards -* Fri Mar 24 2000 - kukuk@suse.de +* Fri Mar 24 2000 kukuk@suse.de - Add Linux LVM partition tag to fdisk - Fix a lot of more possible buffer overruns - Fix some fdisk sunlabel bugs - added BuildRoot fixes from nadvorni@suse.cz -* Wed Mar 22 2000 - kukuk@suse.de +* Wed Mar 22 2000 kukuk@suse.de - Update util-linux to 2.10h - Add clock again for non PPC platforms -* Fri Mar 17 2000 - uli@suse.de +* Fri Mar 17 2000 uli@suse.de - now contains both hwclock and clock on PPC (/sbin/init.d/boot chooses what to run at runtime) -* Tue Mar 14 2000 - schwab@suse.de +* Tue Mar 14 2000 schwab@suse.de - Add support for ia64. -* Thu Mar 09 2000 - kukuk@suse.de +* Thu Mar 09 2000 kukuk@suse.de - fdisk: Fix -l for Mylex RAID controller -* Tue Mar 07 2000 - kukuk@suse.de +* Tue Mar 07 2000 kukuk@suse.de - etc/filesystems: Add minix and reiserfs -* Tue Mar 07 2000 - kukuk@suse.de +* Tue Mar 07 2000 kukuk@suse.de - mount: fix endian problem with minix fs -* Tue Feb 15 2000 - kukuk@suse.de +* Tue Feb 15 2000 kukuk@suse.de - mount: Add hack for PPC/syscall mount problem -* Sun Feb 13 2000 - bk@suse.de +* Sun Feb 13 2000 bk@suse.de - let rdev continue in case it stubles over a bad file in /dev (/dev/snd fix) -* Fri Feb 04 2000 - kukuk@suse.de +* Fri Feb 04 2000 kukuk@suse.de - Make PPC clock parameter compatible to hwclock -* Thu Feb 03 2000 - kukuk@suse.de +* Thu Feb 03 2000 kukuk@suse.de - Fix filelist for SPARC -* Thu Feb 03 2000 - kukuk@suse.de +* Thu Feb 03 2000 kukuk@suse.de - util-linux: Update to 2.10f (mount security fix) -* Sun Jan 23 2000 - kukuk@suse.de +* Sun Jan 23 2000 kukuk@suse.de - util-linux: Update to 2.10e -* Tue Jan 18 2000 - kukuk@suse.de +* Tue Jan 18 2000 kukuk@suse.de - mount now looks at first in /etc/filesystems and then in /proc/filesystems -* Tue Jan 18 2000 - ro@suse.de +* Tue Jan 18 2000 ro@suse.de - fixed pmac-utils to build with 2.3 as well -* Tue Jan 18 2000 - kukuk@suse.de +* Tue Jan 18 2000 kukuk@suse.de - Fix a lot of fdisk buffer overruns [Bug 1642] -* Mon Jan 17 2000 - kukuk@suse.de +* Mon Jan 17 2000 kukuk@suse.de - Fix setserial for Linux 2.3.40 - Remove write, is now in nkitb - Build minix and bfs tools for SPARC - Fix some buffer overflows in fdisk -* Fri Dec 17 1999 - kukuk@suse.de +* Fri Dec 17 1999 kukuk@suse.de - util-linux: Update to 2.10d - hex: Update to 1.2 - Move manual pages to /usr/share/man -* Tue Nov 30 1999 - uli@suse.de +* Tue Nov 30 1999 uli@suse.de - re-added hwclock link for PPC (2nd try) -* Tue Nov 30 1999 - uli@suse.de +* Tue Nov 30 1999 uli@suse.de - re-added hwclock link for PPC -* Mon Nov 15 1999 - kukuk@suse.de +* Mon Nov 15 1999 kukuk@suse.de - util-linux: Update to 2.10b -* Sat Nov 13 1999 - kukuk@suse.de +* Sat Nov 13 1999 kukuk@suse.de - setserial: Add Patch for Sparc - Fix filelist for Sparc -* Wed Oct 27 1999 - garloff@suse.de +* Wed Oct 27 1999 garloff@suse.de - added flushb (moved here from ddrescue). - fix bug in logger (remove trailing newlines). -* Fri Oct 22 1999 - kukuk@suse.de +* Fri Oct 22 1999 kukuk@suse.de - util-linux: Remove old patches for mk_loop_h -* Sat Oct 16 1999 - kukuk@suse.de +* Sat Oct 16 1999 kukuk@suse.de - util-linux: Update to 2.9z -* Fri Oct 08 1999 - kukuk@suse.de +* Fri Oct 08 1999 kukuk@suse.de - Update to util-linux-2.9y (execpt fdisk) -* Tue Sep 14 1999 - uli@suse.de +* Tue Sep 14 1999 uli@suse.de - added PMac-specific utils for PPC -* Mon Sep 13 1999 - bs@suse.de +* Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. -* Thu Aug 26 1999 - uli@suse.de +* Thu Aug 26 1999 uli@suse.de - disabled hayesesp for PPC -* Wed Aug 25 1999 - kukuk@suse.de +* Wed Aug 25 1999 kukuk@suse.de - Don´t install tsort, its now in textutils 2.0 -* Tue Aug 24 1999 - kukuk@suse.de +* Tue Aug 24 1999 kukuk@suse.de - Update to util-linux-2.9w (execpt fdisk) -* Mon Aug 09 1999 - kukuk@suse.de +* Mon Aug 09 1999 kukuk@suse.de - Update to util-linux-2.9v (execpt fdisk) -* Tue Jul 20 1999 - garloff@suse.de +* Tue Jul 20 1999 garloff@suse.de - Added hex from Erich S. Raymond -* Mon Jul 12 1999 - kukuk@suse.de +* Mon Jul 12 1999 kukuk@suse.de - Add fdisk patch from Klaus G. Wagner - Add mount patch from util-linux 2.9u -* Tue Jul 06 1999 - kukuk@suse.de +* Tue Jul 06 1999 kukuk@suse.de - update to util-linux-2.9t -* Fri Jun 25 1999 - kukuk@suse.de +* Fri Jun 25 1999 kukuk@suse.de - update to util-linux-2.9s -* Wed Mar 03 1999 - ro@suse.de +* Wed Mar 03 1999 ro@suse.de - hwclock.c: always use busywait to get rtctime (it's hard to find out at runtime if we will get an irq) -* Tue Mar 02 1999 - ro@suse.de +* Tue Mar 02 1999 ro@suse.de - update to util-linux-2.9i - update to setserial-2.15 - using diffs from jurix and add-ons from kgw for compaq smart raid -* Mon Feb 01 1999 - ro@suse.de +* Mon Feb 01 1999 ro@suse.de - rdev is not built on alpha -* Mon Jan 18 1999 - florian@suse.de +* Mon Jan 18 1999 florian@suse.de - fixed one broken case to delete a partition in fdisk -* Sun Dec 13 1998 - bs@suse.de +* Sun Dec 13 1998 bs@suse.de - fixed file list -* Thu Dec 10 1998 - fehr@suse.de +* Thu Dec 10 1998 fehr@suse.de - fix bug in fdisk -* Tue Dec 08 1998 - ro@suse.de +* Tue Dec 08 1998 ro@suse.de - removed last from filelist - added link /sbin/clock -> hwclock -* Wed Nov 04 1998 - ro@suse.de +* Wed Nov 04 1998 ro@suse.de - fdisksunlabel: don't include scsi/scsi.h for glibc-2.0 -* Fri Oct 30 1998 - ro@suse.de +* Fri Oct 30 1998 ro@suse.de - update to 2.9 / added hostid from previous diff - copied some glibc changes from previous diff (strcpy..) -* Thu Sep 17 1998 - ro@suse.de +* Thu Sep 17 1998 ro@suse.de - define _GNU_SOURCE when using getopt -* Mon Aug 31 1998 - ro@suse.de +* Mon Aug 31 1998 ro@suse.de - full switch to util-linux 2.8 -- sync has moved to pkg fileutils -- chroot has moved to pkg sh_utils (has been there for a while) -- adopted hostid from previous suse-pkg -* Mon Aug 24 1998 - ro@suse.de +* Mon Aug 24 1998 ro@suse.de - switched to use mount from util-linux-2.8 -* Tue Jun 23 1998 - ro@suse.de +* Tue Jun 23 1998 ro@suse.de - added fdisk, sfdisk, cfdisk from util-linux-2.8 (including man-pages,readmes) -* Mon Nov 17 1997 - ro@suse.de +* Mon Nov 17 1997 ro@suse.de - changed /local/bin/perl5 in chkdupexe to /usr/bin/perl -* Fri Oct 31 1997 - ro@suse.de +* Fri Oct 31 1997 ro@suse.de - temporarily removed mount-hacker -* Wed Oct 29 1997 - florian@suse.de +* Thu Oct 30 1997 florian@suse.de - add changes from ms@suse.de for hostid.c -* Tue May 20 1997 - florian@suse.de +* Tue May 20 1997 florian@suse.de - only support kernel 2.0.x for nfs mounts, please use /bin/mount-hacker for kernel 2.1.x -* Wed Apr 30 1997 - florian@suse.de +* Wed Apr 30 1997 florian@suse.de - update to mount 2.6g -* Sun Apr 13 1997 - florian@suse.de +* Mon Apr 14 1997 florian@suse.de - update to new version util-linux 2.6 - update to new version mount 2.6e -* Thu Jan 02 1997 - florian@suse.de +* Thu Jan 02 1997 florian@suse.de - update to mount 2.5p -* Thu Jan 02 1997 - florian@suse.de +* Thu Jan 02 1997 florian@suse.de - Update auf neue Version von mount 2.5o. -* Thu Jan 02 1997 - florian@suse.de +* Thu Jan 02 1997 florian@suse.de - updated to new version mount 2.5m - (u)mount now gives much better error messages -* Thu Jan 02 1997 - bs@suse.de +* Thu Jan 02 1997 bs@suse.de compile setterm with libtermcap and not libncurses use newer mount instead of the old version in util-linux (security fix) From 9094b1a16599ce491c5cf3bb673d081c0d559b2a2686ba39e1891ef9240beccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sun, 10 Feb 2008 16:59:00 +0000 Subject: [PATCH 040/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=40 --- ready | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ready diff --git a/ready b/ready deleted file mode 100644 index 473a0f4..0000000 From 773dce969a0166b42f306920888e531ee8c6258cff3ecca7562531a673ec7516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sun, 10 Feb 2008 16:59:02 +0000 Subject: [PATCH 041/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=41 --- util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch diff --git a/util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch b/util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch deleted file mode 100644 index 0dcad24..0000000 --- a/util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-ng-2.13.0.1+git20071121/hwclock/rtc.c -=================================================================== ---- util-linux-ng-2.13.0.1+git20071121.orig/hwclock/rtc.c -+++ util-linux-ng-2.13.0.1+git20071121/hwclock/rtc.c -@@ -225,7 +225,7 @@ int ret; - } else { - int rc; /* Return code from ioctl */ - /* Turn on update interrupts (one per second) */ --#if defined(__alpha__) || defined(__sparc__) || defined(__x86_64__) -+#if defined(__alpha__) || defined(__sparc__) || defined(__x86_64__) || defined(__i386__) - /* Not all alpha kernels reject RTC_UIE_ON, but probably they should. */ - rc = -1; - errno = EINVAL; From 5eb514e48b10e4da3d63aedbccaed35ec7b9cf7a12dd5007421f7b873787c61b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sun, 10 Feb 2008 16:59:03 +0000 Subject: [PATCH 042/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=42 --- util-linux-2.13-rpmlintrc | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 util-linux-2.13-rpmlintrc diff --git a/util-linux-2.13-rpmlintrc b/util-linux-2.13-rpmlintrc deleted file mode 100644 index 1741f88..0000000 --- a/util-linux-2.13-rpmlintrc +++ /dev/null @@ -1,5 +0,0 @@ -addFilter("init-script-without-%stop_on_removal-preun /etc/init.d/raw") -addFilter("incoherent-init-script-name raw") -addFilter("no-reload-entry /etc/init.d/raw") -addFilter("files-duplicate .*(rootflags|ramsize|vidmode)") - From f4d5ea15e2fbbcaa2f2224b47b45dc8210214c4afc9df41f82db6743916e182e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sun, 10 Feb 2008 16:59:04 +0000 Subject: [PATCH 043/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=43 --- ...ux-2.13.1-canonicalize_loopfile_name.patch | 96 ------------------- 1 file changed, 96 deletions(-) delete mode 100644 util-linux-2.13.1-canonicalize_loopfile_name.patch diff --git a/util-linux-2.13.1-canonicalize_loopfile_name.patch b/util-linux-2.13.1-canonicalize_loopfile_name.patch deleted file mode 100644 index 04c5e2c..0000000 --- a/util-linux-2.13.1-canonicalize_loopfile_name.patch +++ /dev/null @@ -1,96 +0,0 @@ -commit bfdb8be5c49d8fadb25118fb4416ab2a68fc3a16 -Author: Karel Zak -Date: Thu Oct 25 12:29:51 2007 +0200 - - losetup: canonicalize loopfile name - - When setting up a loop device, canonicalize the loop file - name. This simplifies a later identification of loop file names - when querying the loop devices. - - Co-Author: Matthias Koenig - Signed-off-by: Matthias Koenig - Signed-off-by: Karel Zak - -Index: util-linux-ng-2.13.1/mount/lomount.c -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/lomount.c -+++ util-linux-ng-2.13.1/mount/lomount.c -@@ -22,10 +22,12 @@ - #include "lomount.h" - #include "xstrncpy.h" - #include "nls.h" -+#include "realpath.h" -+#include "xmalloc.h" -+ - - extern int verbose; - extern char *progname; --extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ - extern void error (const char *fmt, ...); /* idem */ - - #define SIZE(a) (sizeof(a)/sizeof(a[0])) -@@ -279,6 +281,7 @@ set_loop(const char *device, const char - struct loop_info64 loopinfo64; - int fd, ffd, mode, i; - char *pass; -+ char filename[PATH_MAX+1]; - - mode = (*loopro ? O_RDONLY : O_RDWR); - if ((ffd = open(file, mode)) < 0) { -@@ -298,7 +301,8 @@ set_loop(const char *device, const char - - memset(&loopinfo64, 0, sizeof(loopinfo64)); - -- xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE); -+ myrealpath(file, filename, PATH_MAX); -+ xstrncpy(loopinfo64.lo_file_name, filename, LO_NAME_SIZE); - - if (encryption && *encryption) { - if (digits_only(encryption)) { -@@ -386,7 +390,7 @@ set_loop(const char *device, const char - - if (verbose > 1) - printf(_("set_loop(%s,%s,%llu): success\n"), -- device, file, offset); -+ device, filename, offset); - return 0; - } - -@@ -470,23 +474,6 @@ usage(void) { - exit(1); - } - --char * --xstrdup (const char *s) { -- char *t; -- -- if (s == NULL) -- return NULL; -- -- t = strdup (s); -- -- if (t == NULL) { -- fprintf(stderr, _("not enough memory")); -- exit(1); -- } -- -- return t; --} -- - void - error (const char *fmt, ...) { - va_list args; -Index: util-linux-ng-2.13.1/mount/Makefile.am -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/Makefile.am -+++ util-linux-ng-2.13.1/mount/Makefile.am -@@ -25,7 +25,7 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD - - swapon_SOURCES = swapon.c swap_constants.h $(utils_common) - --losetup_SOURCES = lomount.c loop.h lomount.h -+losetup_SOURCES = lomount.c loop.h lomount.h realpath.c xmalloc.c - losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) - - mount_LDADD = $(LDADD_common) From 08e0b41ef1db5b9c3c6681378d29e77e2393a0e610cf2e04fa9c377b60ce8409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sun, 10 Feb 2008 16:59:05 +0000 Subject: [PATCH 044/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=44 --- util-linux-2.13.1-getfs_fix.patch | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 util-linux-2.13.1-getfs_fix.patch diff --git a/util-linux-2.13.1-getfs_fix.patch b/util-linux-2.13.1-getfs_fix.patch deleted file mode 100644 index fb0faa7..0000000 --- a/util-linux-2.13.1-getfs_fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -Index: util-linux-ng-2.13.1/mount/fstab.c -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/fstab.c -+++ util-linux-ng-2.13.1/mount/fstab.c -@@ -419,11 +419,17 @@ getfs_by_spec (const char *spec) { - struct mntentchn * - getfs_by_devname (const char *devname) { - struct mntentchn *mc, *mc0; -+ char *name; - - mc0 = fstab_head(); -- for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) -- if (streq(mc->m.mnt_fsname, devname)) -+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) { -+ name = canonicalize(mc->m.mnt_fsname); -+ if (streq(name, devname)) { -+ free(name); - return mc; -+ } -+ } -+ free(name); - return NULL; - } - From 62331c53cc16d00cc845a552c2e9c6c78baac1bfdffa74b238807f82d5e02b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sun, 10 Feb 2008 16:59:06 +0000 Subject: [PATCH 045/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=45 --- ...13.1-mkfs.minix_add_sectorsize_check.patch | 65 ------------------- 1 file changed, 65 deletions(-) delete mode 100644 util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch diff --git a/util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch b/util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch deleted file mode 100644 index f818c34..0000000 --- a/util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch +++ /dev/null @@ -1,65 +0,0 @@ -X-Gnus-Coding-System: -*- coding: utf-8; -*- - -Minix filesystem until version 2 has a fixed blocksize of 1024 bytes. -If you try to create a filsystem on a device with a physical sectorsize -larger than 1024 bytes, this resulting minix fs cannot be mounted, -because the physical sectorsize must be smaller than the filesystem -blocksize. -This patch adds a check for this and will refuse to create a filesystem -if the sectorsize is bigger than the blocksize. - -Signed-off-by: Matthias Koenig ---- - - disk-utils/Makefile.am | 4 +++- - disk-utils/mkfs.minix.c | 12 ++++++++++-- - 2 files changed, 13 insertions(+), 3 deletions(-) - -Index: util-linux-ng-2.13.1/disk-utils/mkfs.minix.c -=================================================================== ---- util-linux-ng-2.13.1.orig/disk-utils/mkfs.minix.c -+++ util-linux-ng-2.13.1/disk-utils/mkfs.minix.c -@@ -78,6 +78,7 @@ - #ifndef BLKGETSIZE - #define BLKGETSIZE _IO(0x12,96) /* return device size */ - #endif -+#define BLKSSZGET _IO(0x12,104)/* get block device sector size */ - - #ifndef __GNUC__ - #error "needs gcc for the bitop-__asm__'s" -@@ -238,6 +239,16 @@ get_size(const char *file) { - return size; - } - -+/* get hardware sector size */ -+int -+blkdev_get_sector_size(int fd, int *sector_size) -+{ -+ if (ioctl(fd, BLKSSZGET, sector_size) >= 0) -+ return 0; -+ -+ return -1; -+} -+ - static void - write_tables(void) { - /* Mark the super block valid. */ -@@ -707,9 +718,16 @@ main(int argc, char ** argv) { - DEV = open(device_name,O_RDWR); - if (DEV<0) - die(_("unable to open %s")); -- if (!S_ISBLK(statbuf.st_mode)) -+ if (S_ISBLK(statbuf.st_mode)) { -+ int sectorsize; -+ -+ if (blkdev_get_sector_size(DEV, §orsize) == -1) -+ die(_("cannot determine sector size for %s")); -+ if (BLOCK_SIZE < sectorsize) -+ die(_("block size smaller than physical sector size of %s")); -+ } else if (!S_ISBLK(statbuf.st_mode)) { - check=0; -- else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) -+ } else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) - die(_("will not try to make filesystem on '%s'")); - setup_tables(); - if (check) From f7be42ec4a9ba225a27c127b16ea585295022126061957c30637caf3b05c9bff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sun, 10 Feb 2008 16:59:07 +0000 Subject: [PATCH 046/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=46 --- ....13.1-mkfs.minix_device_size_cleanup.patch | 103 ------------------ 1 file changed, 103 deletions(-) delete mode 100644 util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch diff --git a/util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch b/util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch deleted file mode 100644 index b42b6cb..0000000 --- a/util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch +++ /dev/null @@ -1,103 +0,0 @@ -Index: util-linux-ng-2.13.1/disk-utils/mkfs.minix.c -=================================================================== ---- util-linux-ng-2.13.1.orig/disk-utils/mkfs.minix.c -+++ util-linux-ng-2.13.1/disk-utils/mkfs.minix.c -@@ -78,6 +78,7 @@ - #ifndef BLKGETSIZE - #define BLKGETSIZE _IO(0x12,96) /* return device size */ - #endif -+#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */ - #define BLKSSZGET _IO(0x12,104)/* get block device sector size */ - - #ifndef __GNUC__ -@@ -103,7 +104,7 @@ - static char * program_name = "mkfs"; - static char * device_name = NULL; - static int DEV = -1; --static long BLOCKS = 0; -+static unsigned long long BLOCKS = 0; - static int check = 0; - static int badblocks = 0; - static int namelen = 30; /* default (changed to 30, per Linus's -@@ -219,24 +220,21 @@ count_blocks (int fd) { - return (low + 1); - } - --static int --get_size(const char *file) { -- int fd; -- long size; -- -- fd = open(file, O_RDWR); -- if (fd < 0) { -- perror(file); -- exit(1); -- } -+/* get size in bytes */ -+int -+blkdev_get_size(int fd, unsigned long long *bytes) -+{ -+ unsigned long size; -+ -+ if (ioctl(fd, BLKGETSIZE64, bytes) >= 0) -+ return 0; -+ - if (ioctl(fd, BLKGETSIZE, &size) >= 0) { -- close(fd); -- return (size * 512); -+ *bytes = ((unsigned long long)size << 9); -+ return 0; - } -- -- size = count_blocks(fd); -- close(fd); -- return size; -+ -+ return -1; - } - - /* get hardware sector size */ -@@ -687,19 +685,9 @@ main(int argc, char ** argv) { - } - } - -- if (device_name && !BLOCKS) -- BLOCKS = get_size (device_name) / 1024; -- if (!device_name || BLOCKS<10) { -+ if (!device_name) { - usage(); - } -- if (version2) { -- if (namelen == 14) -- magic = MINIX2_SUPER_MAGIC; -- else -- magic = MINIX2_SUPER_MAGIC2; -- } else -- if (BLOCKS > 65535) -- BLOCKS = 65535; - check_mount(); /* is it already mounted? */ - tmp = root_block; - *(short *)tmp = 1; -@@ -725,10 +713,22 @@ main(int argc, char ** argv) { - die(_("cannot determine sector size for %s")); - if (BLOCK_SIZE < sectorsize) - die(_("block size smaller than physical sector size of %s")); -+ if (!BLOCKS && blkdev_get_size(DEV, &BLOCKS) == -1) -+ die(_("cannot determine size of %s")); - } else if (!S_ISBLK(statbuf.st_mode)) { - check=0; - } else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) - die(_("will not try to make filesystem on '%s'")); -+ if (BLOCKS < 10) -+ die(_("number of blocks too small")); -+ if (version2) { -+ if (namelen == 14) -+ magic = MINIX2_SUPER_MAGIC; -+ else -+ magic = MINIX2_SUPER_MAGIC2; -+ } else -+ if (BLOCKS > 65535) -+ BLOCKS = 65535; - setup_tables(); - if (check) - check_blocks(); From da40f0b463fbe5a1f300a8a78a46ed11eda4d3b59000b7f907265e27c3ffa691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sun, 10 Feb 2008 16:59:07 +0000 Subject: [PATCH 047/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=47 --- ...nt_loop_mounting_the_same_file_twice.patch | 245 ------------------ 1 file changed, 245 deletions(-) delete mode 100644 util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch diff --git a/util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch b/util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch deleted file mode 100644 index 63a2f6b..0000000 --- a/util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch +++ /dev/null @@ -1,245 +0,0 @@ -commit 2368077223fa5800cf88659c9c57a7f6517f3fad -Author: Karel Zak -Date: Tue Sep 11 14:35:34 2007 +0200 - - mount: prevent loop mounting the same file twice - - The mount syscall prevents mounting the same device twice - to the same mountpoint. When loop mounting a file, for each - file a new loop device gets allocated, which prevents the detection - of loop mounting the same file to the same mountpoint twice. - The patch adds a check to prevent double mounts, if the same loopfile - is going to be mounted with the same offset to the same mountpoint. - - Co-Author: Matthias Koenig - Signed-off-by: Matthias Koenig - Signed-off-by: Karel Zak - -Index: util-linux-ng-2.13.1/mount/lomount.c -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/lomount.c -+++ util-linux-ng-2.13.1/mount/lomount.c -@@ -143,7 +143,7 @@ show_used_loop_devices (void) { - - for (j = 0; j < SIZE(loop_formats); j++) { - for(i = 0; i < 256; i++) { -- sprintf(dev, loop_formats[j], i); -+ snprintf(dev, sizeof(dev), loop_formats[j], i); - if (stat (dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) { - fd = open (dev, O_RDONLY); - if (fd >= 0) { -@@ -169,6 +169,102 @@ show_used_loop_devices (void) { - - #endif - -+/* check if the loopfile is already associated with the same given -+ * parameters. -+ * -+ * returns: -1 error -+ * 0 unused -+ * 1 loop device already used -+ */ -+static int -+is_associated(int dev, struct stat *file, unsigned long long offset) -+{ -+ struct loop_info64 linfo64; -+ struct loop_info64 linfo; -+ int ret = 0; -+ -+ if (ioctl(dev, LOOP_GET_STATUS64, &linfo64) == 0) { -+ if (file->st_dev == linfo64.lo_device && -+ file->st_ino == linfo64.lo_inode && -+ offset == linfo64.lo_offset) -+ ret = 1; -+ return ret; -+ } -+ if (ioctl(dev, LOOP_GET_STATUS, &linfo) == 0) { -+ if (file->st_dev == linfo.lo_device && -+ file->st_ino == linfo.lo_inode && -+ offset == linfo.lo_offset) -+ ret = 1; -+ return ret; -+ } -+ -+ return errno == ENXIO ? 0 : -1; -+} -+ -+/* check if the loop file is already used with the same given -+ * parameters. We check for device no, inode and offset. -+ * returns: associated devname or NULL -+ */ -+char * -+loopfile_used (const char *filename, unsigned long long offset) { -+ char dev[20]; -+ char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" }; -+ int i, j, fd; -+ struct stat devstat, filestat; -+ struct loop_info loopinfo; -+ -+ if (stat(filename, &filestat) == -1) { -+ perror(filename); -+ return NULL; -+ } -+ -+ for (j = 0; j < SIZE(loop_formats); j++) { -+ for(i = 0; i < 256; i++) { -+ snprintf(dev, sizeof(dev), loop_formats[j], i); -+ if (stat (dev, &devstat) == 0 && S_ISBLK(devstat.st_mode)) { -+ fd = open (dev, O_RDONLY); -+ if (fd >= 0) { -+ int res = 0; -+ -+ if(ioctl (fd, LOOP_GET_STATUS, &loopinfo) == 0) -+ res = is_associated(fd, &filestat, offset); -+ close (fd); -+ if (res == 1) -+ return xstrdup(dev); -+ } -+ continue; /* continue trying as long as devices exist */ -+ } -+ break; -+ } -+ } -+ return NULL; -+} -+ -+int -+loopfile_used_with(char *devname, const char *filename, unsigned long long offset) -+{ -+ struct stat statbuf; -+ int fd, ret; -+ -+ if (!is_loop_device(devname)) -+ return 0; -+ -+ if (stat(filename, &statbuf) == -1) { -+ perror(filename); -+ return -1; -+ } -+ -+ fd = open(devname, O_RDONLY); -+ if (fd == -1) { -+ perror(devname); -+ return -1; -+ } -+ ret = is_associated(fd, &statbuf, offset); -+ -+ close(fd); -+ return ret; -+} -+ - int - is_loop_device (const char *device) { - struct stat statbuf; -@@ -284,6 +380,16 @@ set_loop(const char *device, const char - char *filename; - char res_file[PATH_MAX+1]; - -+ if (verbose) { -+ char *xdev = loopfile_used(file, offset); -+ -+ if (xdev) { -+ printf(_("warning: %s is already associated with %s\n"), -+ file, xdev); -+ free(xdev); -+ } -+ } -+ - mode = (*loopro ? O_RDONLY : O_RDWR); - if ((ffd = open(file, mode)) < 0) { - if (!*loopro && errno == EROFS) -Index: util-linux-ng-2.13.1/mount/lomount.h -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/lomount.h -+++ util-linux-ng-2.13.1/mount/lomount.h -@@ -4,3 +4,6 @@ extern int set_loop(const char *, const - extern int del_loop(const char *); - extern int is_loop_device(const char *); - extern char * find_unused_loop_device(void); -+ -+extern int loopfile_used_with(char *devname, const char *filename, unsigned long long offset); -+extern char *loopfile_used (const char *filename, unsigned long long offset); -Index: util-linux-ng-2.13.1/mount/mount.c -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/mount.c -+++ util-linux-ng-2.13.1/mount/mount.c -@@ -42,6 +42,7 @@ - #include "mount_paths.h" - #include "env.h" - #include "nls.h" -+#include "realpath.h" - - #define DO_PS_FIDDLING - -@@ -833,9 +834,49 @@ suid_check(const char *spec, const char - *flags &= ~(MS_OWNER | MS_GROUP); - } - -+/* Check, if there already exists a mounted loop device on the mountpoint node -+ * with the same parameters. -+ */ -+static int -+is_mounted_same_loopfile(const char *node0, const char *loopfile, unsigned long long offset) -+{ -+ struct mntentchn *mnt = NULL; -+ char node[PATH_MAX+1]; -+ int res = 0; -+ -+ myrealpath(node0, node, PATH_MAX); -+ -+ /* Search for mountpoint node in mtab, -+ * procceed if any of these has the loop option set or -+ * the device is a loop device -+ */ -+ mnt = getmntdirbackward(node, mnt); -+ if (!mnt) { -+ return 0; -+ } -+ for(; mnt && res == 0; mnt = getmntdirbackward(node, mnt)) { -+ char *p; -+ -+ if (strncmp(mnt->m.mnt_fsname, "/dev/loop", 9) == 0) -+ res = loopfile_used_with((char *) mnt->m.mnt_fsname, -+ loopfile, offset); -+ -+ else if ((p = strstr(mnt->m.mnt_opts, "loop="))) { -+ char *dev = xstrdup(p+5); -+ if ((p = strchr(dev, ','))) -+ *p = '\0'; -+ res = loopfile_used_with(dev, loopfile, offset); -+ free(dev); -+ } -+ } -+ -+ return res; -+} -+ - static int - loop_check(const char **spec, const char **type, int *flags, -- int *loop, const char **loopdev, const char **loopfile) { -+ int *loop, const char **loopdev, const char **loopfile, -+ const char *node) { - int looptype; - unsigned long long offset; - -@@ -876,6 +917,11 @@ loop_check(const char **spec, const char - - offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0; - -+ if (is_mounted_same_loopfile(node, *loopfile, offset)) { -+ error(_("mount: according to mtab %s is already mounted on %s as loop"), *loopfile, node); -+ return EX_FAIL; -+ } -+ - do { - if (!*loopdev || !**loopdev) - *loopdev = find_unused_loop_device(); -@@ -1061,7 +1107,7 @@ try_mount_one (const char *spec0, const - * stale assignments of files to loop devices. Nasty when used for - * encryption. - */ -- res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile); -+ res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile, node); - if (res) - goto out; - } From df46cf17c731fb00b4764da95493c212246b2b87828cfd71d2b3b6aea7dd6ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sun, 10 Feb 2008 16:59:08 +0000 Subject: [PATCH 048/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=48 --- util-linux-mount_losetup_crypto.patch | 1577 ------------------------- 1 file changed, 1577 deletions(-) delete mode 100644 util-linux-mount_losetup_crypto.patch diff --git a/util-linux-mount_losetup_crypto.patch b/util-linux-mount_losetup_crypto.patch deleted file mode 100644 index 53f4cff..0000000 --- a/util-linux-mount_losetup_crypto.patch +++ /dev/null @@ -1,1577 +0,0 @@ -From a062df268df66641ed94d5c0e968e92c67b585e4 Mon Sep 17 00:00:00 2001 -From: Ludwig Nussel -Date: Thu, 29 Nov 2007 17:46:36 +0100 -Subject: [PATCH] losetup: support password hashing and specifying the key length - -* add support for password hashing (sha512, sha384, sha256, rmd160). -* add support for loop-AES style strings like "twofish256" for - specifying the encryption algorithm and key length. - -Based on the SUSE patch from Ludwig Nussel , -this patch adds password hashing for cryptoloop devices. While -cryptoloop is deprecated, users may still wish to access existing -volumes. - -Incompatible change: - Default is now to hash using sha256, sha384 or sha512 depending - on key length (16, 24, or 32 bytes). Debian users will need to - specify "--phash rmd160" to access existing Debian devices. - Others will need to specify '--phash none'. - -sha512.c is from loop-AES. - -Signed-off-by: Ludwig Nussel ---- - mount/Makefile.am | 2 + - mount/lomount.c | 178 +++++++++++++++--- - mount/lomount.h | 4 +- - mount/losetup.8 | 11 + - mount/mount.8 | 13 ++ - mount/mount.c | 23 ++- - mount/my_dev_t.h | 5 + - mount/rmd160.c | 532 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - mount/rmd160.h | 11 + - mount/sha512.c | 432 +++++++++++++++++++++++++++++++++++++++++++ - mount/sha512.h | 45 +++++ - 11 files changed, 1225 insertions(+), 31 deletions(-) - create mode 100644 mount/my_dev_t.h - create mode 100644 mount/rmd160.c - create mode 100644 mount/rmd160.h - create mode 100644 mount/sha512.c - create mode 100644 mount/sha512.h - -Index: util-linux-ng-2.13.1/mount/Makefile.am -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/Makefile.am -+++ util-linux-ng-2.13.1/mount/Makefile.am -@@ -13,6 +13,7 @@ headers_common = fstab.h linux_fs.h moun - getusername.h loop.h sundries.h - - mount_common = fstab.c mount_mntent.c getusername.c lomount.c \ -+ rmd160.c sha512.c \ - $(utils_common) $(headers_common) ../lib/env.c - - mount_SOURCES = mount.c $(mount_common) ../lib/setproctitle.c -@@ -25,7 +26,8 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD - - swapon_SOURCES = swapon.c swap_constants.h $(utils_common) - --losetup_SOURCES = lomount.c loop.h lomount.h realpath.c xmalloc.c -+losetup_SOURCES = lomount.c loop.h lomount.h realpath.c xmalloc.c \ -+ rmd160.c sha512.c - losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) - - mount_LDADD = $(LDADD_common) -Index: util-linux-ng-2.13.1/mount/lomount.c -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/lomount.c -+++ util-linux-ng-2.13.1/mount/lomount.c -@@ -20,11 +20,16 @@ - - #include "loop.h" - #include "lomount.h" -+#include "rmd160.h" -+#include "sha512.h" - #include "xstrncpy.h" - #include "nls.h" - #include "realpath.h" - #include "xmalloc.h" - -+#ifndef MIN -+#define MIN(a,b) ((a 3) { -+ if(isdigit(loopinfo64.lo_crypt_name[len-3]) -+ && isdigit(loopinfo64.lo_crypt_name[len-2]) -+ && isdigit(loopinfo64.lo_crypt_name[len-1])) { -+ loopinfo64.lo_encrypt_key_size = atoi((char*)&loopinfo64.lo_crypt_name[len-3]) >> 3; -+ loopinfo64.lo_crypt_name[len-3] = 0; -+ } -+ } -+ -+ if(keysz && loopinfo64.lo_encrypt_key_size && loopinfo64.lo_encrypt_key_size != keysz >> 3) { -+ fprintf(stderr, _("please either specify '%s%d' or -e '%s' -k '%d'\n"), -+ loopinfo64.lo_crypt_name, loopinfo64.lo_encrypt_key_size<<3, -+ loopinfo64.lo_crypt_name, keysz); -+ return 1; -+ } -+ loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI; - } - } - -@@ -436,20 +494,70 @@ set_loop(const char *device, const char - } - #endif - -- switch (loopinfo64.lo_encrypt_type) { -- case LO_CRYPT_NONE: -- loopinfo64.lo_encrypt_key_size = 0; -- break; -- case LO_CRYPT_XOR: -- pass = getpass(_("Password: ")); -- goto gotpass; -- default: -- pass = xgetpass(pfd, _("Password: ")); -- gotpass: -+ if (loopinfo64.lo_encrypt_type != LO_CRYPT_NONE) { -+ void (*hfunc)(const unsigned char*, size_t, unsigned char*, size_t) = NULL; -+ - memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE); -- xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE); -+ -+ pass = xgetpass(pfd, _("Password: ")); -+ if(!pass) -+ return 1; -+ -+ // set default hash functions, loop-AES compatible -+ if(loopinfo64.lo_encrypt_type == LO_CRYPT_CRYPTOAPI) { -+ hfunc = sha256_hash_buffer; -+ if(loopinfo64.lo_encrypt_key_size == 24) hfunc = sha384_hash_buffer; -+ if(loopinfo64.lo_encrypt_key_size == 32) hfunc = sha512_hash_buffer; -+ } else if(loopinfo64.lo_encrypt_type == 3 ) { // LO_CRYPT_FISH -+ if(!strcmp(encryption, "twofishSL92")) { -+ hfunc = sha512_hash_buffer; -+ loopinfo64.lo_encrypt_key_size = 32; -+ } else { -+ hfunc = phash_rmd160; -+ loopinfo64.lo_encrypt_key_size = 20; -+ } -+ } else { -+ hfunc = phash_none; -+ loopinfo64.lo_encrypt_key_size = keysz?keysz>>3:LO_KEY_SIZE; -+ } -+ -+ if(!loopinfo64.lo_encrypt_key_size) { -+ if(!keysz) { -+ if(verbose) -+ fprintf(stderr, _("please specify a key length\n")); -+ return 1; -+ } -+ loopinfo64.lo_encrypt_key_size = keysz>>3; -+ } -+ -+ if((unsigned)loopinfo64.lo_encrypt_key_size > sizeof(loopinfo64.lo_encrypt_key)) { -+ fprintf(stderr, _("invalid key length\n")); -+ return 1; -+ } -+ -+ if (phash) { -+ if(!strcasecmp(phash, "sha512")) { -+ hfunc = sha512_hash_buffer; -+ } else if(!strcasecmp(phash, "sha384")) { -+ hfunc = sha384_hash_buffer; -+ } else if(!strcasecmp(phash, "sha256")) { -+ hfunc = sha256_hash_buffer; -+ } else if(!strcasecmp(phash, "rmd160")) { -+ hfunc = phash_rmd160; -+ } else if(!strcasecmp(phash, "none")) { -+ hfunc = phash_none; -+ } else { -+ fprintf(stderr, _("unsupported hash method '%s'\n"), phash); -+ return 1; -+ } -+ } -+ -+ if(hfunc) { -+ hfunc((unsigned char*)pass, strlen(pass), loopinfo64.lo_encrypt_key, loopinfo64.lo_encrypt_key_size); -+ } -+ -+ // zero buffer - memset(pass, 0, strlen(pass)); -- loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE; - } - - if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { -@@ -530,8 +638,8 @@ mutter(void) { - } - - int --set_loop (const char *device, const char *file, unsigned long long offset, -- const char *encryption, int *loopro) { -+set_loop(const char *device, const char *file, unsigned long long offset, -+ const char *encryption, const char* phash, int pfd, int *loopro, int keysz) { - mutter(); - return 1; - } -@@ -570,7 +678,13 @@ usage(void) { - " %1$s [ options ] {-f|--find|loop_device} file # setup\n" - "\nOptions:\n" - " -e | --encryption enable data encryption with specified \n" -+ " -H | --phash hash password using specified algorithm (sha512/sha256/sha384/rmd160/none)\n" - " -h | --help this help\n" -+ " -k | --keybits specify number of bits in the hashed key given\n" -+ " to the cipher. Some ciphers support several key\n" -+ " sizes and might be more efficient with a smaller\n" -+ " key size. Key sizes < 128 are generally not\n" -+ " recommended\n" - " -o | --offset start at offset into file\n" - " -p | --pass-fd read passphrase from file descriptor \n" - " -r | --read-only setup read-only loop device\n" -@@ -594,11 +708,14 @@ error (const char *fmt, ...) { - int - main(int argc, char **argv) { - char *p, *offset, *encryption, *passfd, *device, *file; -+ char *keysize; -+ char *phash = NULL; - int delete, find, c, all; - int res = 0; - int showdev = 0; - int ro = 0; - int pfd = -1; -+ int keysz = 0; - unsigned long long off; - struct option longopts[] = { - { "all", 0, 0, 'a' }, -@@ -606,6 +723,8 @@ main(int argc, char **argv) { - { "encryption", 1, 0, 'e' }, - { "find", 0, 0, 'f' }, - { "help", 0, 0, 'h' }, -+ { "keybits", 1, 0, 'k' }, -+ { "phash", 1, 0, 'H' }, - { "offset", 1, 0, 'o' }, - { "pass-fd", 1, 0, 'p' }, - { "read-only", 0, 0, 'r' }, -@@ -621,12 +740,13 @@ main(int argc, char **argv) { - delete = find = all = 0; - off = 0; - offset = encryption = passfd = NULL; -+ keysize = NULL; - - progname = argv[0]; - if ((p = strrchr(progname, '/')) != NULL) - progname = p+1; - -- while ((c = getopt_long(argc, argv, "ade:E:fho:p:rsv", -+ while ((c = getopt_long(argc, argv, "ade:E:fhk:o:p:rsvH:", - longopts, NULL)) != -1) { - switch (c) { - case 'a': -@@ -645,6 +765,12 @@ main(int argc, char **argv) { - case 'f': - find = 1; - break; -+ case 'k': -+ keysize = optarg; -+ break; -+ case 'H': -+ phash = optarg; -+ break; - case 'o': - offset = optarg; - break; -@@ -708,8 +834,10 @@ main(int argc, char **argv) { - usage(); - if (passfd && sscanf(passfd, "%d", &pfd) != 1) - usage(); -+ if (keysize && sscanf(keysize,"%d",&keysz) != 1) -+ usage(); - do { -- res = set_loop(device, file, off, encryption, pfd, &ro); -+ res = set_loop(device, file, off, encryption, phash, pfd, &ro, keysz); - if (res == 2 && find) { - if (verbose) - printf("stolen loop=%s...trying again\n", -Index: util-linux-ng-2.13.1/mount/losetup.8 -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/losetup.8 -+++ util-linux-ng-2.13.1/mount/losetup.8 -@@ -76,6 +76,15 @@ find the first unused loop device. If a - argument is present, use this device. Otherwise, print its name. - .IP "\fB\-h, \-\-help\fP" - print help -+.IP "\fB\-H, \-\-phash \fIhash_type\fP" -+Specify the password hash function. Valid values are: -+.BR sha512 (default), -+.BR sha256 , -+.BR sha384 , -+.BR rmd160 , -+.BR none . -+.IP "\fB\-k, \-\-keybits \fInum\fP" -+set the number of bits to use in key to \fInum\fP. - .IP "\fB\-o, \-\-offset \fIoffset\fP" - The data start is moved \fIoffset\fP bytes into the specified file or - device. -@@ -140,6 +149,8 @@ the command - .fi - .SH RESTRICTION - DES encryption is painfully slow. On the other hand, XOR is terribly weak. -+Both are insecure nowadays. Some ciphers may require a licence for you to be -+allowed to use them. - - Cryptoloop is deprecated in favor of dm-crypt. For more details see - .B cryptsetup(8). -Index: util-linux-ng-2.13.1/mount/mount.8 -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/mount.8 -+++ util-linux-ng-2.13.1/mount/mount.8 -@@ -610,6 +610,15 @@ This option implies the options - (unless overridden by subsequent options, as in the option line - .BR group,dev,suid ). - .TP -+.B encryption -+Specifies an encryption algorithm to use. Used in conjunction with the -+.BR loop " option." -+.TP -+.B keybits -+Specifies the key size to use for an encryption algorithm. Used in conjunction -+with the -+.BR loop " and " encryption " options." -+.TP - .B mand - Allow mandatory locks on this filesystem. See - .BR fcntl (2). -@@ -2008,6 +2017,10 @@ that are really options to - .BR \%losetup (8). - (These options can be used in addition to those specific - to the filesystem type.) -+If the mount requires a passphrase, you will be prompted for one unless -+you specify a file descriptor to read from instead with the -+.BR \-\-pass-fd -+option. - - If no explicit loop device is mentioned - (but just an option `\fB\-o loop\fP' is given), then -Index: util-linux-ng-2.13.1/mount/mount.c -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/mount.c -+++ util-linux-ng-2.13.1/mount/mount.c -@@ -94,6 +94,9 @@ static int suid = 0; - /* Contains the fd to read the passphrase from, if any. */ - static int pfd = -1; - -+/* Contains the preferred keysize in bits we want to use */ -+static int keysz = 0; -+ - /* Map from -o and fstab option strings to the flag argument to mount(2). */ - struct opt_map { - const char *opt; /* option name */ -@@ -191,6 +194,7 @@ static int opt_nofail = 0; - - static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, - *opt_speed, *opt_comment, *opt_uhelper; -+static const char *opt_keybits, *opt_phash; - - static int mounted (const char *spec0, const char *node0); - static int check_special_mountprog(const char *spec, const char *node, -@@ -205,6 +209,8 @@ static struct string_opt_map { - { "vfs=", 1, &opt_vfstype }, - { "offset=", 0, &opt_offset }, - { "encryption=", 0, &opt_encryption }, -+ { "phash=", 0, &opt_phash }, -+ { "keybits=", 0, &opt_keybits }, - { "speed=", 0, &opt_speed }, - { "comment=", 1, &opt_comment }, - { "uhelper=", 0, &opt_uhelper }, -@@ -903,7 +909,7 @@ loop_check(const char **spec, const char - *type = opt_vfstype; - } - -- *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_encryption); -+ *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_encryption || opt_phash || opt_keybits); - *loopfile = *spec; - - if (*loop) { -@@ -929,9 +935,10 @@ loop_check(const char **spec, const char - return EX_SYSERR; /* no more loop devices */ - if (verbose) - printf(_("mount: going to use the loop device %s\n"), *loopdev); -- -+ if (!keysz && opt_keybits) -+ keysz = strtoul(opt_keybits, NULL, 0); - if ((res = set_loop(*loopdev, *loopfile, offset, -- opt_encryption, pfd, &loopro))) { -+ opt_encryption, opt_phash, pfd, &loopro, keysz))) { - if (res == 2) { - /* loop dev has been grabbed by some other process, - try again, if not given explicitly */ -@@ -1681,6 +1688,7 @@ static struct option longopts[] = { - { "options", 1, 0, 'o' }, - { "test-opts", 1, 0, 'O' }, - { "pass-fd", 1, 0, 'p' }, -+ { "keybits", 1, 0, 'k' }, - { "types", 1, 0, 't' }, - { "bind", 0, 0, 128 }, - { "replace", 0, 0, 129 }, -@@ -1836,6 +1844,7 @@ main(int argc, char *argv[]) { - char *options = NULL, *test_opts = NULL, *node; - const char *spec = NULL; - char *label = NULL; -+ char *keysize = NULL; - char *uuid = NULL; - char *types = NULL; - char *p; -@@ -1866,7 +1875,7 @@ main(int argc, char *argv[]) { - initproctitle(argc, argv); - #endif - -- while ((c = getopt_long (argc, argv, "afFhilL:no:O:p:rsU:vVwt:", -+ while ((c = getopt_long (argc, argv, "afFhik:lL:no:O:p:rsU:vVwt:", - longopts, NULL)) != -1) { - switch (c) { - case 'a': /* mount everything in fstab */ -@@ -1884,6 +1893,9 @@ main(int argc, char *argv[]) { - case 'i': - external_allowed = 0; - break; -+ case 'k': -+ keysize = optarg; -+ break; - case 'l': - list_with_volumelabel = 1; - break; -@@ -2030,6 +2042,9 @@ main(int argc, char *argv[]) { - create_mtab (); - } - -+ if (keysize && sscanf(keysize,"%d",&keysz) != 1) -+ die (EX_USAGE, _("mount: argument to --keybits or -k must be a number")); -+ - switch (argc+specseen) { - case 0: - /* mount -a */ -Index: util-linux-ng-2.13.1/mount/rmd160.c -=================================================================== ---- /dev/null -+++ util-linux-ng-2.13.1/mount/rmd160.c -@@ -0,0 +1,532 @@ -+/* rmd160.c - RIPE-MD160 -+ * Copyright (C) 1998 Free Software Foundation, Inc. -+ */ -+ -+/* This file was part of GnuPG. Modified for use within the Linux -+ * mount utility by Marc Mutz . None of this code is -+ * by myself. I just removed everything that you don't need when all -+ * you want to do is to use rmd160_hash_buffer(). -+ * My comments are marked with (mm). */ -+ -+/* GnuPG is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * GnuPG is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -+ -+#include /* (mm) for memcpy */ -+#include /* (mm) for BIG_ENDIAN and BYTE_ORDER */ -+#include "rmd160.h" -+ -+/* (mm) these are used by the original GnuPG file. In order to modify -+ * that file not too much, we keep the notations. maybe it would be -+ * better to include linux/types.h and typedef __u32 to u32 and __u8 -+ * to byte? */ -+typedef unsigned int u32; /* taken from e.g. util-linux's minix.h */ -+typedef unsigned char byte; -+ -+typedef struct { -+ u32 h0,h1,h2,h3,h4; -+ u32 nblocks; -+ byte buf[64]; -+ int count; -+} RMD160_CONTEXT; -+ -+/**************** -+ * Rotate a 32 bit integer by n bytes -+ */ -+#if defined(__GNUC__) && defined(__i386__) -+static inline u32 -+rol( u32 x, int n) -+{ -+ __asm__("roll %%cl,%0" -+ :"=r" (x) -+ :"0" (x),"c" (n)); -+ return x; -+} -+#else -+ #define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) ) -+#endif -+ -+/********************************* -+ * RIPEMD-160 is not patented, see (as of 25.10.97) -+ * http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html -+ * Note that the code uses Little Endian byteorder, which is good for -+ * 386 etc, but we must add some conversion when used on a big endian box. -+ * -+ * -+ * Pseudo-code for RIPEMD-160 -+ * -+ * RIPEMD-160 is an iterative hash function that operates on 32-bit words. -+ * The round function takes as input a 5-word chaining variable and a 16-word -+ * message block and maps this to a new chaining variable. All operations are -+ * defined on 32-bit words. Padding is identical to that of MD4. -+ * -+ * -+ * RIPEMD-160: definitions -+ * -+ * -+ * nonlinear functions at bit level: exor, mux, -, mux, - -+ * -+ * f(j, x, y, z) = x XOR y XOR z (0 <= j <= 15) -+ * f(j, x, y, z) = (x AND y) OR (NOT(x) AND z) (16 <= j <= 31) -+ * f(j, x, y, z) = (x OR NOT(y)) XOR z (32 <= j <= 47) -+ * f(j, x, y, z) = (x AND z) OR (y AND NOT(z)) (48 <= j <= 63) -+ * f(j, x, y, z) = x XOR (y OR NOT(z)) (64 <= j <= 79) -+ * -+ * -+ * added constants (hexadecimal) -+ * -+ * K(j) = 0x00000000 (0 <= j <= 15) -+ * K(j) = 0x5A827999 (16 <= j <= 31) int(2**30 x sqrt(2)) -+ * K(j) = 0x6ED9EBA1 (32 <= j <= 47) int(2**30 x sqrt(3)) -+ * K(j) = 0x8F1BBCDC (48 <= j <= 63) int(2**30 x sqrt(5)) -+ * K(j) = 0xA953FD4E (64 <= j <= 79) int(2**30 x sqrt(7)) -+ * K'(j) = 0x50A28BE6 (0 <= j <= 15) int(2**30 x cbrt(2)) -+ * K'(j) = 0x5C4DD124 (16 <= j <= 31) int(2**30 x cbrt(3)) -+ * K'(j) = 0x6D703EF3 (32 <= j <= 47) int(2**30 x cbrt(5)) -+ * K'(j) = 0x7A6D76E9 (48 <= j <= 63) int(2**30 x cbrt(7)) -+ * K'(j) = 0x00000000 (64 <= j <= 79) -+ * -+ * -+ * selection of message word -+ * -+ * r(j) = j (0 <= j <= 15) -+ * r(16..31) = 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8 -+ * r(32..47) = 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12 -+ * r(48..63) = 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2 -+ * r(64..79) = 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 -+ * r0(0..15) = 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12 -+ * r0(16..31)= 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2 -+ * r0(32..47)= 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13 -+ * r0(48..63)= 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14 -+ * r0(64..79)= 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 -+ * -+ * -+ * amount for rotate left (rol) -+ * -+ * s(0..15) = 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8 -+ * s(16..31) = 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12 -+ * s(32..47) = 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5 -+ * s(48..63) = 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12 -+ * s(64..79) = 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 -+ * s'(0..15) = 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6 -+ * s'(16..31)= 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11 -+ * s'(32..47)= 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5 -+ * s'(48..63)= 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8 -+ * s'(64..79)= 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 -+ * -+ * -+ * initial value (hexadecimal) -+ * -+ * h0 = 0x67452301; h1 = 0xEFCDAB89; h2 = 0x98BADCFE; h3 = 0x10325476; -+ * h4 = 0xC3D2E1F0; -+ * -+ * -+ * RIPEMD-160: pseudo-code -+ * -+ * It is assumed that the message after padding consists of t 16-word blocks -+ * that will be denoted with X[i][j], with 0 <= i <= t-1 and 0 <= j <= 15. -+ * The symbol [+] denotes addition modulo 2**32 and rol_s denotes cyclic left -+ * shift (rotate) over s positions. -+ * -+ * -+ * for i := 0 to t-1 { -+ * A := h0; B := h1; C := h2; D = h3; E = h4; -+ * A' := h0; B' := h1; C' := h2; D' = h3; E' = h4; -+ * for j := 0 to 79 { -+ * T := rol_s(j)(A [+] f(j, B, C, D) [+] X[i][r(j)] [+] K(j)) [+] E; -+ * A := E; E := D; D := rol_10(C); C := B; B := T; -+ * T := rol_s'(j)(A' [+] f(79-j, B', C', D') [+] X[i][r'(j)] -+ [+] K'(j)) [+] E'; -+ * A' := E'; E' := D'; D' := rol_10(C'); C' := B'; B' := T; -+ * } -+ * T := h1 [+] C [+] D'; h1 := h2 [+] D [+] E'; h2 := h3 [+] E [+] A'; -+ * h3 := h4 [+] A [+] B'; h4 := h0 [+] B [+] C'; h0 := T; -+ * } -+ */ -+ -+/* Some examples: -+ * "" 9c1185a5c5e9fc54612808977ee8f548b2258d31 -+ * "a" 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe -+ * "abc" 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc -+ * "message digest" 5d0689ef49d2fae572b881b123a85ffa21595f36 -+ * "a...z" f71c27109c692c1b56bbdceb5b9d2865b3708dbc -+ * "abcdbcde...nopq" 12a053384a9c0c88e405a06c27dcf49ada62eb2b -+ * "A...Za...z0...9" b0e20b6e3116640286ed3a87a5713079b21f5189 -+ * 8 times "1234567890" 9b752e45573d4b39f4dbd3323cab82bf63326bfb -+ * 1 million times "a" 52783243c1697bdbe16d37f97f68f08325dc1528 -+ */ -+ -+ -+static void -+rmd160_init( RMD160_CONTEXT *hd ) -+{ -+ hd->h0 = 0x67452301; -+ hd->h1 = 0xEFCDAB89; -+ hd->h2 = 0x98BADCFE; -+ hd->h3 = 0x10325476; -+ hd->h4 = 0xC3D2E1F0; -+ hd->nblocks = 0; -+ hd->count = 0; -+} -+ -+ -+ -+/**************** -+ * Transform the message X which consists of 16 32-bit-words -+ */ -+static void -+transform( RMD160_CONTEXT *hd, const byte *data ) -+{ -+ u32 a,b,c,d,e,aa,bb,cc,dd,ee,t; -+ #if BYTE_ORDER == BIG_ENDIAN -+ u32 x[16]; -+ { int i; -+ byte *p2, *p1; -+ for(i=0, p1=data, p2=(byte*)x; i < 16; i++, p2 += 4 ) { -+ p2[3] = *p1++; -+ p2[2] = *p1++; -+ p2[1] = *p1++; -+ p2[0] = *p1++; -+ } -+ } -+ #else -+ #if 0 -+ u32 *x =(u32*)data; -+ #else -+ /* this version is better because it is always aligned; -+ * The performance penalty on a 586-100 is about 6% which -+ * is acceptable - because the data is more local it might -+ * also be possible that this is faster on some machines. -+ * This function (when compiled with -02 on gcc 2.7.2) -+ * executes on a 586-100 (39.73 bogomips) at about 1900kb/sec; -+ * [measured with a 4MB data and "gpgm --print-md rmd160"] */ -+ u32 x[16]; -+ memcpy( x, data, 64 ); -+ #endif -+ #endif -+ -+ -+#define K0 0x00000000 -+#define K1 0x5A827999 -+#define K2 0x6ED9EBA1 -+#define K3 0x8F1BBCDC -+#define K4 0xA953FD4E -+#define KK0 0x50A28BE6 -+#define KK1 0x5C4DD124 -+#define KK2 0x6D703EF3 -+#define KK3 0x7A6D76E9 -+#define KK4 0x00000000 -+#define F0(x,y,z) ( (x) ^ (y) ^ (z) ) -+#define F1(x,y,z) ( ((x) & (y)) | (~(x) & (z)) ) -+#define F2(x,y,z) ( ((x) | ~(y)) ^ (z) ) -+#define F3(x,y,z) ( ((x) & (z)) | ((y) & ~(z)) ) -+#define F4(x,y,z) ( (x) ^ ((y) | ~(z)) ) -+#define R(a,b,c,d,e,f,k,r,s) do { t = a + f(b,c,d) + k + x[r]; \ -+ a = rol(t,s) + e; \ -+ c = rol(c,10); \ -+ } while(0) -+ -+ /* left lane */ -+ a = hd->h0; -+ b = hd->h1; -+ c = hd->h2; -+ d = hd->h3; -+ e = hd->h4; -+ R( a, b, c, d, e, F0, K0, 0, 11 ); -+ R( e, a, b, c, d, F0, K0, 1, 14 ); -+ R( d, e, a, b, c, F0, K0, 2, 15 ); -+ R( c, d, e, a, b, F0, K0, 3, 12 ); -+ R( b, c, d, e, a, F0, K0, 4, 5 ); -+ R( a, b, c, d, e, F0, K0, 5, 8 ); -+ R( e, a, b, c, d, F0, K0, 6, 7 ); -+ R( d, e, a, b, c, F0, K0, 7, 9 ); -+ R( c, d, e, a, b, F0, K0, 8, 11 ); -+ R( b, c, d, e, a, F0, K0, 9, 13 ); -+ R( a, b, c, d, e, F0, K0, 10, 14 ); -+ R( e, a, b, c, d, F0, K0, 11, 15 ); -+ R( d, e, a, b, c, F0, K0, 12, 6 ); -+ R( c, d, e, a, b, F0, K0, 13, 7 ); -+ R( b, c, d, e, a, F0, K0, 14, 9 ); -+ R( a, b, c, d, e, F0, K0, 15, 8 ); -+ R( e, a, b, c, d, F1, K1, 7, 7 ); -+ R( d, e, a, b, c, F1, K1, 4, 6 ); -+ R( c, d, e, a, b, F1, K1, 13, 8 ); -+ R( b, c, d, e, a, F1, K1, 1, 13 ); -+ R( a, b, c, d, e, F1, K1, 10, 11 ); -+ R( e, a, b, c, d, F1, K1, 6, 9 ); -+ R( d, e, a, b, c, F1, K1, 15, 7 ); -+ R( c, d, e, a, b, F1, K1, 3, 15 ); -+ R( b, c, d, e, a, F1, K1, 12, 7 ); -+ R( a, b, c, d, e, F1, K1, 0, 12 ); -+ R( e, a, b, c, d, F1, K1, 9, 15 ); -+ R( d, e, a, b, c, F1, K1, 5, 9 ); -+ R( c, d, e, a, b, F1, K1, 2, 11 ); -+ R( b, c, d, e, a, F1, K1, 14, 7 ); -+ R( a, b, c, d, e, F1, K1, 11, 13 ); -+ R( e, a, b, c, d, F1, K1, 8, 12 ); -+ R( d, e, a, b, c, F2, K2, 3, 11 ); -+ R( c, d, e, a, b, F2, K2, 10, 13 ); -+ R( b, c, d, e, a, F2, K2, 14, 6 ); -+ R( a, b, c, d, e, F2, K2, 4, 7 ); -+ R( e, a, b, c, d, F2, K2, 9, 14 ); -+ R( d, e, a, b, c, F2, K2, 15, 9 ); -+ R( c, d, e, a, b, F2, K2, 8, 13 ); -+ R( b, c, d, e, a, F2, K2, 1, 15 ); -+ R( a, b, c, d, e, F2, K2, 2, 14 ); -+ R( e, a, b, c, d, F2, K2, 7, 8 ); -+ R( d, e, a, b, c, F2, K2, 0, 13 ); -+ R( c, d, e, a, b, F2, K2, 6, 6 ); -+ R( b, c, d, e, a, F2, K2, 13, 5 ); -+ R( a, b, c, d, e, F2, K2, 11, 12 ); -+ R( e, a, b, c, d, F2, K2, 5, 7 ); -+ R( d, e, a, b, c, F2, K2, 12, 5 ); -+ R( c, d, e, a, b, F3, K3, 1, 11 ); -+ R( b, c, d, e, a, F3, K3, 9, 12 ); -+ R( a, b, c, d, e, F3, K3, 11, 14 ); -+ R( e, a, b, c, d, F3, K3, 10, 15 ); -+ R( d, e, a, b, c, F3, K3, 0, 14 ); -+ R( c, d, e, a, b, F3, K3, 8, 15 ); -+ R( b, c, d, e, a, F3, K3, 12, 9 ); -+ R( a, b, c, d, e, F3, K3, 4, 8 ); -+ R( e, a, b, c, d, F3, K3, 13, 9 ); -+ R( d, e, a, b, c, F3, K3, 3, 14 ); -+ R( c, d, e, a, b, F3, K3, 7, 5 ); -+ R( b, c, d, e, a, F3, K3, 15, 6 ); -+ R( a, b, c, d, e, F3, K3, 14, 8 ); -+ R( e, a, b, c, d, F3, K3, 5, 6 ); -+ R( d, e, a, b, c, F3, K3, 6, 5 ); -+ R( c, d, e, a, b, F3, K3, 2, 12 ); -+ R( b, c, d, e, a, F4, K4, 4, 9 ); -+ R( a, b, c, d, e, F4, K4, 0, 15 ); -+ R( e, a, b, c, d, F4, K4, 5, 5 ); -+ R( d, e, a, b, c, F4, K4, 9, 11 ); -+ R( c, d, e, a, b, F4, K4, 7, 6 ); -+ R( b, c, d, e, a, F4, K4, 12, 8 ); -+ R( a, b, c, d, e, F4, K4, 2, 13 ); -+ R( e, a, b, c, d, F4, K4, 10, 12 ); -+ R( d, e, a, b, c, F4, K4, 14, 5 ); -+ R( c, d, e, a, b, F4, K4, 1, 12 ); -+ R( b, c, d, e, a, F4, K4, 3, 13 ); -+ R( a, b, c, d, e, F4, K4, 8, 14 ); -+ R( e, a, b, c, d, F4, K4, 11, 11 ); -+ R( d, e, a, b, c, F4, K4, 6, 8 ); -+ R( c, d, e, a, b, F4, K4, 15, 5 ); -+ R( b, c, d, e, a, F4, K4, 13, 6 ); -+ -+ aa = a; bb = b; cc = c; dd = d; ee = e; -+ -+ /* right lane */ -+ a = hd->h0; -+ b = hd->h1; -+ c = hd->h2; -+ d = hd->h3; -+ e = hd->h4; -+ R( a, b, c, d, e, F4, KK0, 5, 8); -+ R( e, a, b, c, d, F4, KK0, 14, 9); -+ R( d, e, a, b, c, F4, KK0, 7, 9); -+ R( c, d, e, a, b, F4, KK0, 0, 11); -+ R( b, c, d, e, a, F4, KK0, 9, 13); -+ R( a, b, c, d, e, F4, KK0, 2, 15); -+ R( e, a, b, c, d, F4, KK0, 11, 15); -+ R( d, e, a, b, c, F4, KK0, 4, 5); -+ R( c, d, e, a, b, F4, KK0, 13, 7); -+ R( b, c, d, e, a, F4, KK0, 6, 7); -+ R( a, b, c, d, e, F4, KK0, 15, 8); -+ R( e, a, b, c, d, F4, KK0, 8, 11); -+ R( d, e, a, b, c, F4, KK0, 1, 14); -+ R( c, d, e, a, b, F4, KK0, 10, 14); -+ R( b, c, d, e, a, F4, KK0, 3, 12); -+ R( a, b, c, d, e, F4, KK0, 12, 6); -+ R( e, a, b, c, d, F3, KK1, 6, 9); -+ R( d, e, a, b, c, F3, KK1, 11, 13); -+ R( c, d, e, a, b, F3, KK1, 3, 15); -+ R( b, c, d, e, a, F3, KK1, 7, 7); -+ R( a, b, c, d, e, F3, KK1, 0, 12); -+ R( e, a, b, c, d, F3, KK1, 13, 8); -+ R( d, e, a, b, c, F3, KK1, 5, 9); -+ R( c, d, e, a, b, F3, KK1, 10, 11); -+ R( b, c, d, e, a, F3, KK1, 14, 7); -+ R( a, b, c, d, e, F3, KK1, 15, 7); -+ R( e, a, b, c, d, F3, KK1, 8, 12); -+ R( d, e, a, b, c, F3, KK1, 12, 7); -+ R( c, d, e, a, b, F3, KK1, 4, 6); -+ R( b, c, d, e, a, F3, KK1, 9, 15); -+ R( a, b, c, d, e, F3, KK1, 1, 13); -+ R( e, a, b, c, d, F3, KK1, 2, 11); -+ R( d, e, a, b, c, F2, KK2, 15, 9); -+ R( c, d, e, a, b, F2, KK2, 5, 7); -+ R( b, c, d, e, a, F2, KK2, 1, 15); -+ R( a, b, c, d, e, F2, KK2, 3, 11); -+ R( e, a, b, c, d, F2, KK2, 7, 8); -+ R( d, e, a, b, c, F2, KK2, 14, 6); -+ R( c, d, e, a, b, F2, KK2, 6, 6); -+ R( b, c, d, e, a, F2, KK2, 9, 14); -+ R( a, b, c, d, e, F2, KK2, 11, 12); -+ R( e, a, b, c, d, F2, KK2, 8, 13); -+ R( d, e, a, b, c, F2, KK2, 12, 5); -+ R( c, d, e, a, b, F2, KK2, 2, 14); -+ R( b, c, d, e, a, F2, KK2, 10, 13); -+ R( a, b, c, d, e, F2, KK2, 0, 13); -+ R( e, a, b, c, d, F2, KK2, 4, 7); -+ R( d, e, a, b, c, F2, KK2, 13, 5); -+ R( c, d, e, a, b, F1, KK3, 8, 15); -+ R( b, c, d, e, a, F1, KK3, 6, 5); -+ R( a, b, c, d, e, F1, KK3, 4, 8); -+ R( e, a, b, c, d, F1, KK3, 1, 11); -+ R( d, e, a, b, c, F1, KK3, 3, 14); -+ R( c, d, e, a, b, F1, KK3, 11, 14); -+ R( b, c, d, e, a, F1, KK3, 15, 6); -+ R( a, b, c, d, e, F1, KK3, 0, 14); -+ R( e, a, b, c, d, F1, KK3, 5, 6); -+ R( d, e, a, b, c, F1, KK3, 12, 9); -+ R( c, d, e, a, b, F1, KK3, 2, 12); -+ R( b, c, d, e, a, F1, KK3, 13, 9); -+ R( a, b, c, d, e, F1, KK3, 9, 12); -+ R( e, a, b, c, d, F1, KK3, 7, 5); -+ R( d, e, a, b, c, F1, KK3, 10, 15); -+ R( c, d, e, a, b, F1, KK3, 14, 8); -+ R( b, c, d, e, a, F0, KK4, 12, 8); -+ R( a, b, c, d, e, F0, KK4, 15, 5); -+ R( e, a, b, c, d, F0, KK4, 10, 12); -+ R( d, e, a, b, c, F0, KK4, 4, 9); -+ R( c, d, e, a, b, F0, KK4, 1, 12); -+ R( b, c, d, e, a, F0, KK4, 5, 5); -+ R( a, b, c, d, e, F0, KK4, 8, 14); -+ R( e, a, b, c, d, F0, KK4, 7, 6); -+ R( d, e, a, b, c, F0, KK4, 6, 8); -+ R( c, d, e, a, b, F0, KK4, 2, 13); -+ R( b, c, d, e, a, F0, KK4, 13, 6); -+ R( a, b, c, d, e, F0, KK4, 14, 5); -+ R( e, a, b, c, d, F0, KK4, 0, 15); -+ R( d, e, a, b, c, F0, KK4, 3, 13); -+ R( c, d, e, a, b, F0, KK4, 9, 11); -+ R( b, c, d, e, a, F0, KK4, 11, 11); -+ -+ -+ t = hd->h1 + d + cc; -+ hd->h1 = hd->h2 + e + dd; -+ hd->h2 = hd->h3 + a + ee; -+ hd->h3 = hd->h4 + b + aa; -+ hd->h4 = hd->h0 + c + bb; -+ hd->h0 = t; -+} -+ -+ -+/* Update the message digest with the contents -+ * of INBUF with length INLEN. -+ */ -+static void -+rmd160_write( RMD160_CONTEXT *hd, const byte *inbuf, size_t inlen) -+{ -+ if( hd->count == 64 ) { /* flush the buffer */ -+ transform( hd, hd->buf ); -+ hd->count = 0; -+ hd->nblocks++; -+ } -+ if( !inbuf ) -+ return; -+ if( hd->count ) { -+ for( ; inlen && hd->count < 64; inlen-- ) -+ hd->buf[hd->count++] = *inbuf++; -+ rmd160_write( hd, NULL, 0 ); -+ if( !inlen ) -+ return; -+ } -+ -+ while( inlen >= 64 ) { -+ transform( hd, inbuf ); -+ hd->count = 0; -+ hd->nblocks++; -+ inlen -= 64; -+ inbuf += 64; -+ } -+ for( ; inlen && hd->count < 64; inlen-- ) -+ hd->buf[hd->count++] = *inbuf++; -+} -+ -+/* The routine terminates the computation -+ */ -+ -+static void -+rmd160_final( RMD160_CONTEXT *hd ) -+{ -+ u32 t, msb, lsb; -+ byte *p; -+ -+ rmd160_write(hd, NULL, 0); /* flush */; -+ -+ msb = 0; -+ t = hd->nblocks; -+ if( (lsb = t << 6) < t ) /* multiply by 64 to make a byte count */ -+ msb++; -+ msb += t >> 26; -+ t = lsb; -+ if( (lsb = t + hd->count) < t ) /* add the count */ -+ msb++; -+ t = lsb; -+ if( (lsb = t << 3) < t ) /* multiply by 8 to make a bit count */ -+ msb++; -+ msb += t >> 29; -+ -+ if( hd->count < 56 ) { /* enough room */ -+ hd->buf[hd->count++] = 0x80; /* pad */ -+ while( hd->count < 56 ) -+ hd->buf[hd->count++] = 0; /* pad */ -+ } -+ else { /* need one extra block */ -+ hd->buf[hd->count++] = 0x80; /* pad character */ -+ while( hd->count < 64 ) -+ hd->buf[hd->count++] = 0; -+ rmd160_write(hd, NULL, 0); /* flush */; -+ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */ -+ } -+ /* append the 64 bit count */ -+ hd->buf[56] = lsb ; -+ hd->buf[57] = lsb >> 8; -+ hd->buf[58] = lsb >> 16; -+ hd->buf[59] = lsb >> 24; -+ hd->buf[60] = msb ; -+ hd->buf[61] = msb >> 8; -+ hd->buf[62] = msb >> 16; -+ hd->buf[63] = msb >> 24; -+ transform( hd, hd->buf ); -+ -+ p = hd->buf; -+ #if BYTE_ORDER == BIG_ENDIAN -+ #define X(a) do { *p++ = hd->h##a ; *p++ = hd->h##a >> 8; \ -+ *p++ = hd->h##a >> 16; *p++ = hd->h##a >> 24; } while(0) -+ #else /* little endian */ -+ #define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0) -+ #endif -+ X(0); -+ X(1); -+ X(2); -+ X(3); -+ X(4); -+ #undef X -+} -+ -+/**************** -+ * Shortcut functions which puts the hash value of the supplied buffer -+ * into outbuf which must have a size of 20 bytes. -+ */ -+void -+rmd160_hash_buffer( unsigned char *outbuf, const unsigned char *buffer, size_t length ) -+{ -+ RMD160_CONTEXT hd; -+ -+ rmd160_init( &hd ); -+ rmd160_write( &hd, buffer, length ); -+ rmd160_final( &hd ); -+ memcpy( outbuf, hd.buf, 20 ); -+} -Index: util-linux-ng-2.13.1/mount/rmd160.h -=================================================================== ---- /dev/null -+++ util-linux-ng-2.13.1/mount/rmd160.h -@@ -0,0 +1,11 @@ -+#ifndef RMD160_H -+#define RMD160_H -+ -+#define RMD160_HASH_SIZE 20 -+ -+void -+rmd160_hash_buffer( unsigned char *outbuf, const unsigned char *buffer, size_t length ); -+ -+#endif /*RMD160_H*/ -+ -+ -Index: util-linux-ng-2.13.1/mount/sha512.c -=================================================================== ---- /dev/null -+++ util-linux-ng-2.13.1/mount/sha512.c -@@ -0,0 +1,432 @@ -+/* -+ * sha512.c -+ * -+ * Written by Jari Ruusu, April 16 2001 -+ * -+ * Copyright 2001 by Jari Ruusu. -+ * Redistribution of this file is permitted under the GNU Public License. -+ */ -+ -+#include -+#include -+#include "sha512.h" -+ -+/* Define one or more of these. If none is defined, you get all of them */ -+#if !defined(SHA256_NEEDED)&&!defined(SHA512_NEEDED)&&!defined(SHA384_NEEDED) -+# define SHA256_NEEDED 1 -+# define SHA512_NEEDED 1 -+# define SHA384_NEEDED 1 -+#endif -+ -+#if defined(SHA256_NEEDED) -+static const u_int32_t sha256_hashInit[8] = { -+ 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, -+ 0x1f83d9ab, 0x5be0cd19 -+}; -+static const u_int32_t sha256_K[64] = { -+ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, -+ 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, -+ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, -+ 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, -+ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, -+ 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, -+ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, -+ 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, -+ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, -+ 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, -+ 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 -+}; -+#endif -+ -+#if defined(SHA512_NEEDED) -+static const u_int64_t sha512_hashInit[8] = { -+ 0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, 0x3c6ef372fe94f82bULL, -+ 0xa54ff53a5f1d36f1ULL, 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, -+ 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL -+}; -+#endif -+ -+#if defined(SHA384_NEEDED) -+static const u_int64_t sha384_hashInit[8] = { -+ 0xcbbb9d5dc1059ed8ULL, 0x629a292a367cd507ULL, 0x9159015a3070dd17ULL, -+ 0x152fecd8f70e5939ULL, 0x67332667ffc00b31ULL, 0x8eb44a8768581511ULL, -+ 0xdb0c2e0d64f98fa7ULL, 0x47b5481dbefa4fa4ULL -+}; -+#endif -+ -+#if defined(SHA512_NEEDED) || defined(SHA384_NEEDED) -+static const u_int64_t sha512_K[80] = { -+ 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL, -+ 0xe9b5dba58189dbbcULL, 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL, -+ 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL, 0xd807aa98a3030242ULL, -+ 0x12835b0145706fbeULL, 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL, -+ 0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL, 0x9bdc06a725c71235ULL, -+ 0xc19bf174cf692694ULL, 0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL, -+ 0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL, 0x2de92c6f592b0275ULL, -+ 0x4a7484aa6ea6e483ULL, 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL, -+ 0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL, 0xb00327c898fb213fULL, -+ 0xbf597fc7beef0ee4ULL, 0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL, -+ 0x06ca6351e003826fULL, 0x142929670a0e6e70ULL, 0x27b70a8546d22ffcULL, -+ 0x2e1b21385c26c926ULL, 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL, -+ 0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL, 0x81c2c92e47edaee6ULL, -+ 0x92722c851482353bULL, 0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL, -+ 0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL, 0xd192e819d6ef5218ULL, -+ 0xd69906245565a910ULL, 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL, -+ 0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL, 0x2748774cdf8eeb99ULL, -+ 0x34b0bcb5e19b48a8ULL, 0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL, -+ 0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL, 0x748f82ee5defb2fcULL, -+ 0x78a5636f43172f60ULL, 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL, -+ 0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL, 0xbef9a3f7b2c67915ULL, -+ 0xc67178f2e372532bULL, 0xca273eceea26619cULL, 0xd186b8c721c0c207ULL, -+ 0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL, 0x06f067aa72176fbaULL, -+ 0x0a637dc5a2c898a6ULL, 0x113f9804bef90daeULL, 0x1b710b35131c471bULL, -+ 0x28db77f523047d84ULL, 0x32caab7b40c72493ULL, 0x3c9ebe0a15c9bebcULL, -+ 0x431d67c49c100d4cULL, 0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL, -+ 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL -+}; -+#endif -+ -+#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z))) -+#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) -+#define R(x,y) ((y) >> (x)) -+ -+#if defined(SHA256_NEEDED) -+void sha256_init(sha256_context *ctx) -+{ -+ memcpy(&ctx->sha_H[0], &sha256_hashInit[0], sizeof(ctx->sha_H)); -+ ctx->sha_blocks = 0; -+ ctx->sha_bufCnt = 0; -+} -+ -+#define S(x,y) (((y) >> (x)) | ((y) << (32 - (x)))) -+#define uSig0(x) ((S(2,(x))) ^ (S(13,(x))) ^ (S(22,(x)))) -+#define uSig1(x) ((S(6,(x))) ^ (S(11,(x))) ^ (S(25,(x)))) -+#define lSig0(x) ((S(7,(x))) ^ (S(18,(x))) ^ (R(3,(x)))) -+#define lSig1(x) ((S(17,(x))) ^ (S(19,(x))) ^ (R(10,(x)))) -+ -+static void sha256_transform(sha256_context *ctx, const unsigned char *datap) -+{ -+ register int j; -+ u_int32_t a, b, c, d, e, f, g, h; -+ u_int32_t T1, T2, W[64], Wm2, Wm15; -+ -+ /* read the data, big endian byte order */ -+ j = 0; -+ do { -+ W[j] = (((u_int32_t)(datap[0]))<<24) | (((u_int32_t)(datap[1]))<<16) | -+ (((u_int32_t)(datap[2]))<<8 ) | ((u_int32_t)(datap[3])); -+ datap += 4; -+ } while(++j < 16); -+ -+ /* initialize variables a...h */ -+ a = ctx->sha_H[0]; -+ b = ctx->sha_H[1]; -+ c = ctx->sha_H[2]; -+ d = ctx->sha_H[3]; -+ e = ctx->sha_H[4]; -+ f = ctx->sha_H[5]; -+ g = ctx->sha_H[6]; -+ h = ctx->sha_H[7]; -+ -+ /* apply compression function */ -+ j = 0; -+ do { -+ if(j >= 16) { -+ Wm2 = W[j - 2]; -+ Wm15 = W[j - 15]; -+ W[j] = lSig1(Wm2) + W[j - 7] + lSig0(Wm15) + W[j - 16]; -+ } -+ T1 = h + uSig1(e) + Ch(e,f,g) + sha256_K[j] + W[j]; -+ T2 = uSig0(a) + Maj(a,b,c); -+ h = g; g = f; f = e; -+ e = d + T1; -+ d = c; c = b; b = a; -+ a = T1 + T2; -+ } while(++j < 64); -+ -+ /* compute intermediate hash value */ -+ ctx->sha_H[0] += a; -+ ctx->sha_H[1] += b; -+ ctx->sha_H[2] += c; -+ ctx->sha_H[3] += d; -+ ctx->sha_H[4] += e; -+ ctx->sha_H[5] += f; -+ ctx->sha_H[6] += g; -+ ctx->sha_H[7] += h; -+ -+ ctx->sha_blocks++; -+} -+ -+void sha256_write(sha256_context *ctx, const unsigned char *datap, int length) -+{ -+ while(length > 0) { -+ if(!ctx->sha_bufCnt) { -+ while(length >= sizeof(ctx->sha_out)) { -+ sha256_transform(ctx, datap); -+ datap += sizeof(ctx->sha_out); -+ length -= sizeof(ctx->sha_out); -+ } -+ if(!length) return; -+ } -+ ctx->sha_out[ctx->sha_bufCnt] = *datap++; -+ length--; -+ if(++ctx->sha_bufCnt == sizeof(ctx->sha_out)) { -+ sha256_transform(ctx, &ctx->sha_out[0]); -+ ctx->sha_bufCnt = 0; -+ } -+ } -+} -+ -+void sha256_final(sha256_context *ctx) -+{ -+ register int j; -+ u_int64_t bitLength; -+ u_int32_t i; -+ unsigned char padByte, *datap; -+ -+ bitLength = (ctx->sha_blocks << 9) | (ctx->sha_bufCnt << 3); -+ padByte = 0x80; -+ sha256_write(ctx, &padByte, 1); -+ -+ /* pad extra space with zeroes */ -+ padByte = 0; -+ while(ctx->sha_bufCnt != 56) { -+ sha256_write(ctx, &padByte, 1); -+ } -+ -+ /* write bit length, big endian byte order */ -+ ctx->sha_out[56] = bitLength >> 56; -+ ctx->sha_out[57] = bitLength >> 48; -+ ctx->sha_out[58] = bitLength >> 40; -+ ctx->sha_out[59] = bitLength >> 32; -+ ctx->sha_out[60] = bitLength >> 24; -+ ctx->sha_out[61] = bitLength >> 16; -+ ctx->sha_out[62] = bitLength >> 8; -+ ctx->sha_out[63] = bitLength; -+ sha256_transform(ctx, &ctx->sha_out[0]); -+ -+ /* return results in ctx->sha_out[0...31] */ -+ datap = &ctx->sha_out[0]; -+ j = 0; -+ do { -+ i = ctx->sha_H[j]; -+ datap[0] = i >> 24; -+ datap[1] = i >> 16; -+ datap[2] = i >> 8; -+ datap[3] = i; -+ datap += 4; -+ } while(++j < 8); -+ -+ /* clear sensitive information */ -+ memset(&ctx->sha_out[32], 0, sizeof(sha256_context) - 32); -+} -+ -+void sha256_hash_buffer(const unsigned char *ib, size_t ile, unsigned char *ob, size_t ole) -+{ -+ sha256_context ctx; -+ -+ if(ole < 1) return; -+ memset(ob, 0, ole); -+ if(ole > 32) ole = 32; -+ sha256_init(&ctx); -+ sha256_write(&ctx, ib, ile); -+ sha256_final(&ctx); -+ memcpy(ob, &ctx.sha_out[0], ole); -+ memset(&ctx, 0, sizeof(ctx)); -+} -+ -+#endif -+ -+#if defined(SHA512_NEEDED) -+void sha512_init(sha512_context *ctx) -+{ -+ memcpy(&ctx->sha_H[0], &sha512_hashInit[0], sizeof(ctx->sha_H)); -+ ctx->sha_blocks = 0; -+ ctx->sha_blocksMSB = 0; -+ ctx->sha_bufCnt = 0; -+} -+#endif -+ -+#if defined(SHA512_NEEDED) || defined(SHA384_NEEDED) -+#undef S -+#undef uSig0 -+#undef uSig1 -+#undef lSig0 -+#undef lSig1 -+#define S(x,y) (((y) >> (x)) | ((y) << (64 - (x)))) -+#define uSig0(x) ((S(28,(x))) ^ (S(34,(x))) ^ (S(39,(x)))) -+#define uSig1(x) ((S(14,(x))) ^ (S(18,(x))) ^ (S(41,(x)))) -+#define lSig0(x) ((S(1,(x))) ^ (S(8,(x))) ^ (R(7,(x)))) -+#define lSig1(x) ((S(19,(x))) ^ (S(61,(x))) ^ (R(6,(x)))) -+ -+static void sha512_transform(sha512_context *ctx, const unsigned char *datap) -+{ -+ register int j; -+ u_int64_t a, b, c, d, e, f, g, h; -+ u_int64_t T1, T2, W[80], Wm2, Wm15; -+ -+ /* read the data, big endian byte order */ -+ j = 0; -+ do { -+ W[j] = (((u_int64_t)(datap[0]))<<56) | (((u_int64_t)(datap[1]))<<48) | -+ (((u_int64_t)(datap[2]))<<40) | (((u_int64_t)(datap[3]))<<32) | -+ (((u_int64_t)(datap[4]))<<24) | (((u_int64_t)(datap[5]))<<16) | -+ (((u_int64_t)(datap[6]))<<8 ) | ((u_int64_t)(datap[7])); -+ datap += 8; -+ } while(++j < 16); -+ -+ /* initialize variables a...h */ -+ a = ctx->sha_H[0]; -+ b = ctx->sha_H[1]; -+ c = ctx->sha_H[2]; -+ d = ctx->sha_H[3]; -+ e = ctx->sha_H[4]; -+ f = ctx->sha_H[5]; -+ g = ctx->sha_H[6]; -+ h = ctx->sha_H[7]; -+ -+ /* apply compression function */ -+ j = 0; -+ do { -+ if(j >= 16) { -+ Wm2 = W[j - 2]; -+ Wm15 = W[j - 15]; -+ W[j] = lSig1(Wm2) + W[j - 7] + lSig0(Wm15) + W[j - 16]; -+ } -+ T1 = h + uSig1(e) + Ch(e,f,g) + sha512_K[j] + W[j]; -+ T2 = uSig0(a) + Maj(a,b,c); -+ h = g; g = f; f = e; -+ e = d + T1; -+ d = c; c = b; b = a; -+ a = T1 + T2; -+ } while(++j < 80); -+ -+ /* compute intermediate hash value */ -+ ctx->sha_H[0] += a; -+ ctx->sha_H[1] += b; -+ ctx->sha_H[2] += c; -+ ctx->sha_H[3] += d; -+ ctx->sha_H[4] += e; -+ ctx->sha_H[5] += f; -+ ctx->sha_H[6] += g; -+ ctx->sha_H[7] += h; -+ -+ ctx->sha_blocks++; -+ if(!ctx->sha_blocks) ctx->sha_blocksMSB++; -+} -+ -+void sha512_write(sha512_context *ctx, const unsigned char *datap, int length) -+{ -+ while(length > 0) { -+ if(!ctx->sha_bufCnt) { -+ while(length >= sizeof(ctx->sha_out)) { -+ sha512_transform(ctx, datap); -+ datap += sizeof(ctx->sha_out); -+ length -= sizeof(ctx->sha_out); -+ } -+ if(!length) return; -+ } -+ ctx->sha_out[ctx->sha_bufCnt] = *datap++; -+ length--; -+ if(++ctx->sha_bufCnt == sizeof(ctx->sha_out)) { -+ sha512_transform(ctx, &ctx->sha_out[0]); -+ ctx->sha_bufCnt = 0; -+ } -+ } -+} -+ -+void sha512_final(sha512_context *ctx) -+{ -+ register int j; -+ u_int64_t bitLength, bitLengthMSB; -+ u_int64_t i; -+ unsigned char padByte, *datap; -+ -+ bitLength = (ctx->sha_blocks << 10) | (ctx->sha_bufCnt << 3); -+ bitLengthMSB = (ctx->sha_blocksMSB << 10) | (ctx->sha_blocks >> 54); -+ padByte = 0x80; -+ sha512_write(ctx, &padByte, 1); -+ -+ /* pad extra space with zeroes */ -+ padByte = 0; -+ while(ctx->sha_bufCnt != 112) { -+ sha512_write(ctx, &padByte, 1); -+ } -+ -+ /* write bit length, big endian byte order */ -+ ctx->sha_out[112] = bitLengthMSB >> 56; -+ ctx->sha_out[113] = bitLengthMSB >> 48; -+ ctx->sha_out[114] = bitLengthMSB >> 40; -+ ctx->sha_out[115] = bitLengthMSB >> 32; -+ ctx->sha_out[116] = bitLengthMSB >> 24; -+ ctx->sha_out[117] = bitLengthMSB >> 16; -+ ctx->sha_out[118] = bitLengthMSB >> 8; -+ ctx->sha_out[119] = bitLengthMSB; -+ ctx->sha_out[120] = bitLength >> 56; -+ ctx->sha_out[121] = bitLength >> 48; -+ ctx->sha_out[122] = bitLength >> 40; -+ ctx->sha_out[123] = bitLength >> 32; -+ ctx->sha_out[124] = bitLength >> 24; -+ ctx->sha_out[125] = bitLength >> 16; -+ ctx->sha_out[126] = bitLength >> 8; -+ ctx->sha_out[127] = bitLength; -+ sha512_transform(ctx, &ctx->sha_out[0]); -+ -+ /* return results in ctx->sha_out[0...63] */ -+ datap = &ctx->sha_out[0]; -+ j = 0; -+ do { -+ i = ctx->sha_H[j]; -+ datap[0] = i >> 56; -+ datap[1] = i >> 48; -+ datap[2] = i >> 40; -+ datap[3] = i >> 32; -+ datap[4] = i >> 24; -+ datap[5] = i >> 16; -+ datap[6] = i >> 8; -+ datap[7] = i; -+ datap += 8; -+ } while(++j < 8); -+ -+ /* clear sensitive information */ -+ memset(&ctx->sha_out[64], 0, sizeof(sha512_context) - 64); -+} -+ -+void sha512_hash_buffer(const unsigned char *ib, size_t ile, unsigned char *ob, size_t ole) -+{ -+ sha512_context ctx; -+ -+ if(ole < 1) return; -+ memset(ob, 0, ole); -+ if(ole > 64) ole = 64; -+ sha512_init(&ctx); -+ sha512_write(&ctx, ib, ile); -+ sha512_final(&ctx); -+ memcpy(ob, &ctx.sha_out[0], ole); -+ memset(&ctx, 0, sizeof(ctx)); -+} -+#endif -+ -+#if defined(SHA384_NEEDED) -+void sha384_init(sha512_context *ctx) -+{ -+ memcpy(&ctx->sha_H[0], &sha384_hashInit[0], sizeof(ctx->sha_H)); -+ ctx->sha_blocks = 0; -+ ctx->sha_blocksMSB = 0; -+ ctx->sha_bufCnt = 0; -+} -+ -+void sha384_hash_buffer(const unsigned char *ib, size_t ile, unsigned char *ob, size_t ole) -+{ -+ sha512_context ctx; -+ -+ if(ole < 1) return; -+ memset(ob, 0, ole); -+ if(ole > 48) ole = 48; -+ sha384_init(&ctx); -+ sha512_write(&ctx, ib, ile); -+ sha512_final(&ctx); -+ memcpy(ob, &ctx.sha_out[0], ole); -+ memset(&ctx, 0, sizeof(ctx)); -+} -+#endif -Index: util-linux-ng-2.13.1/mount/sha512.h -=================================================================== ---- /dev/null -+++ util-linux-ng-2.13.1/mount/sha512.h -@@ -0,0 +1,45 @@ -+/* -+ * sha512.h -+ * -+ * Written by Jari Ruusu, April 16 2001 -+ * -+ * Copyright 2001 by Jari Ruusu. -+ * Redistribution of this file is permitted under the GNU Public License. -+ */ -+ -+#include -+ -+typedef struct { -+ unsigned char sha_out[64]; /* results are here, bytes 0...31 */ -+ u_int32_t sha_H[8]; -+ u_int64_t sha_blocks; -+ int sha_bufCnt; -+} sha256_context; -+ -+typedef struct { -+ unsigned char sha_out[128]; /* results are here, bytes 0...63 */ -+ u_int64_t sha_H[8]; -+ u_int64_t sha_blocks; -+ u_int64_t sha_blocksMSB; -+ int sha_bufCnt; -+} sha512_context; -+ -+/* no sha384_context, use sha512_context */ -+ -+/* 256 bit hash, provides 128 bits of security against collision attacks */ -+extern void sha256_init(sha256_context *); -+extern void sha256_write(sha256_context *, const unsigned char *, int); -+extern void sha256_final(sha256_context *); -+extern void sha256_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); -+ -+/* 512 bit hash, provides 256 bits of security against collision attacks */ -+extern void sha512_init(sha512_context *); -+extern void sha512_write(sha512_context *, const unsigned char *, int); -+extern void sha512_final(sha512_context *); -+extern void sha512_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); -+ -+/* 384 bit hash, provides 192 bits of security against collision attacks */ -+extern void sha384_init(sha512_context *); -+/* no sha384_write(), use sha512_write() */ -+/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ -+extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); -Index: util-linux-ng-2.13.1/mount/lomount.h -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/lomount.h -+++ util-linux-ng-2.13.1/mount/lomount.h -@@ -1,6 +1,6 @@ - extern int verbose; --extern int set_loop(const char *, const char *, unsigned long long, -- const char *, int, int *); -+extern int set_loop(const char *device, const char *file, unsigned long long offset, -+ const char *encryption, const char* phash, int pfd, int *loopro, int keysz); - extern int del_loop(const char *); - extern int is_loop_device(const char *); - extern char * find_unused_loop_device(void); From 2645a63ffb92474b27fe621805e8eb1d0854721b497abf656d0b0575ba7f7080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sun, 10 Feb 2008 16:59:08 +0000 Subject: [PATCH 049/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=49 --- util-linux-ng-2.13-swapon-swsuspend.patch | 112 ---------------------- 1 file changed, 112 deletions(-) delete mode 100644 util-linux-ng-2.13-swapon-swsuspend.patch diff --git a/util-linux-ng-2.13-swapon-swsuspend.patch b/util-linux-ng-2.13-swapon-swsuspend.patch deleted file mode 100644 index c11b296..0000000 --- a/util-linux-ng-2.13-swapon-swsuspend.patch +++ /dev/null @@ -1,112 +0,0 @@ -From db6041b3a569d78f5716baa5a134a3a857014337 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 30 May 2007 13:22:51 +0200 -Subject: [PATCH] mount: automatically reinitialize swap with old swsuspend data - -We have to reinitialize swap area with old (=useless) software suspend -data. The problem is that if we don't do it, then we get data -corruption the next time with suspended on. - -Signed-off-by: Karel Zak ---- - mount/swapon.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 63 insertions(+), 0 deletions(-) - -diff --git a/mount/swapon.c b/mount/swapon.c -index ed91afc..3f9b442 100644 ---- a/mount/swapon.c -+++ b/mount/swapon.c -@@ -10,6 +10,9 @@ - #include - #include - #include -+#include -+#include -+#include - #include "xmalloc.h" - #include "swap_constants.h" - #include "nls.h" -@@ -17,6 +20,8 @@ - #include "realpath.h" - #include "mount_paths.h" - -+#define PATH_MKSWAP "/sbin/mkswap" -+ - #ifdef HAVE_SYS_SWAP_H - # include - #endif -@@ -158,6 +163,52 @@ display_summary(void) - } - - static int -+swap_is_swsuspend(const char *device) { -+ const char *type = fsprobe_get_fstype_by_devname(device); -+ -+ return (type && strcmp(type, "swsuspend") == 0) ? 1 : 0; -+} -+ -+/* calls mkswap */ -+static int -+swap_reinitialize(const char *device) { -+ const char *label = fsprobe_get_label_by_devname(device); -+ pid_t pid; -+ int status, ret; -+ -+ switch((pid=fork())) { -+ case -1: /* fork error */ -+ fprintf(stderr, _("%s: cannot fork: %s\n"), -+ progname, strerror(errno)); -+ return -1; -+ -+ case 0: /* child */ -+ if (label && *label) -+ execl(PATH_MKSWAP, PATH_MKSWAP, "-L", label, device, NULL); -+ else -+ execl(PATH_MKSWAP, PATH_MKSWAP, device, NULL); -+ exit(1); /* error */ -+ -+ default: /* parent */ -+ do { -+ if ((ret = waitpid(pid, &status, 0)) < 0 -+ && errno == EINTR) -+ continue; -+ else if (ret < 0) { -+ fprintf(stderr, _("%s: waitpid: %s\n"), -+ progname, strerror(errno)); -+ return -1; -+ } -+ } while (0); -+ -+ /* mkswap returns: 0=suss, 1=error */ -+ if (WIFEXITED(status) && WEXITSTATUS(status)==0) -+ return 0; /* ok */ -+ } -+ return -1; /* error */ -+} -+ -+static int - do_swapon(const char *orig_special, int prio, int canonic) { - int status; - struct stat st; -@@ -179,6 +230,18 @@ do_swapon(const char *orig_special, int prio, int canonic) { - return -1; - } - -+ /* We have to reinitialize swap with old (=useless) software suspend -+ * data. The problem is that if we don't do it, then we get data -+ * corruption the next time with suspended on. -+ */ -+ if (swap_is_swsuspend(special)) { -+ fprintf(stdout, _("%s: %s: software suspend data detected. " -+ "Reinitializing the swap.\n"), -+ progname, special); -+ if (swap_reinitialize(special) < 0) -+ return -1; -+ } -+ - /* people generally dislike this warning - now it is printed - only when `verbose' is set */ - if (verbose) { --- -1.5.2.2 - From 72534ebe0cfb5388b5f3e2a86a1088b0c5cb9782f1d836747795f3a8fbeaa084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sun, 10 Feb 2008 16:59:09 +0000 Subject: [PATCH 050/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=50 --- util-linux-ng-2.13.1.tar.bz2 | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 util-linux-ng-2.13.1.tar.bz2 diff --git a/util-linux-ng-2.13.1.tar.bz2 b/util-linux-ng-2.13.1.tar.bz2 deleted file mode 100644 index 2f38751..0000000 --- a/util-linux-ng-2.13.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e67d86683adef0855220b6f5a4b7ca2c51a15faa142e2ecd69925ede76854a4d -size 2854716 From ce79c8872cd8d2bbc07d369f0f878c00e2faa300f03410bf935b0ad83a5026a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sun, 10 Feb 2008 16:59:21 +0000 Subject: [PATCH 051/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=51 --- cryptsetup-2.13-crypto.diff | 1497 +++++++++++++++++ raw.init | 3 +- ...2.12r-disk_utils_mkfs_open_exclusive.patch | 39 + ...-2.12r-mount_swapon_swsuspend_resume.patch | 128 ++ util-linux-2.13-loop.patch | 32 + util-linux-2.13-mount_create_mtab.patch | 13 + util-linux-2.13-mount_fd_leak.patch | 12 + ...linux-2.13-schedutils_error_handling.patch | 55 + ...nux-2.13-sys_utils_build_rdev_x86_64.patch | 16 + util-linux-ng-2.13rc2+git20070725.tar.bz2 | 3 + util-linux-ng-CVE-2007-5191.diff | 50 + ...linux-ng-add-loop_fish2-compatability.diff | 38 + util-linux-ng-fix-buffer-overflow.diff | 55 + util-linux.changes | 84 +- util-linux.spec | 838 +++++---- 15 files changed, 2337 insertions(+), 526 deletions(-) create mode 100644 cryptsetup-2.13-crypto.diff create mode 100644 util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch create mode 100644 util-linux-2.12r-mount_swapon_swsuspend_resume.patch create mode 100644 util-linux-2.13-loop.patch create mode 100644 util-linux-2.13-mount_create_mtab.patch create mode 100644 util-linux-2.13-mount_fd_leak.patch create mode 100644 util-linux-2.13-schedutils_error_handling.patch create mode 100644 util-linux-2.13-sys_utils_build_rdev_x86_64.patch create mode 100644 util-linux-ng-2.13rc2+git20070725.tar.bz2 create mode 100644 util-linux-ng-CVE-2007-5191.diff create mode 100644 util-linux-ng-add-loop_fish2-compatability.diff create mode 100644 util-linux-ng-fix-buffer-overflow.diff diff --git a/cryptsetup-2.13-crypto.diff b/cryptsetup-2.13-crypto.diff new file mode 100644 index 0000000..2c55a42 --- /dev/null +++ b/cryptsetup-2.13-crypto.diff @@ -0,0 +1,1497 @@ +* password hashing based on debian patch (rmd160, sha*) adds losetup options -k + and -H +* add support for loop-AES compatible strings like "twofish256" + +Signed-off-by: Ludwig Nussel + +Index: util-linux-ng-2.13rc2+git20070725/mount/Makefile.am +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/Makefile.am ++++ util-linux-ng-2.13rc2+git20070725/mount/Makefile.am +@@ -12,7 +12,7 @@ headers_common = fstab.h linux_fs.h moun + mount_paths.h lomount.h fsprobe.h realpath.h xmalloc.h \ + getusername.h loop.h sundries.h + +-mount_common = fstab.c mount_mntent.c getusername.c lomount.c \ ++mount_common = fstab.c mount_mntent.c getusername.c lomount.c rmd160.c sha512.c \ + $(utils_common) $(headers_common) ../lib/env.c + + mount_SOURCES = mount.c $(mount_common) ../lib/setproctitle.c +@@ -25,7 +25,7 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD + + swapon_SOURCES = swapon.c swap_constants.h $(utils_common) + +-losetup_SOURCES = lomount.c loop.h lomount.h ++losetup_SOURCES = lomount.c loop.h lomount.h rmd160.c sha512.c + losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) + + mount_LDADD = $(LDADD_common) +Index: util-linux-ng-2.13rc2+git20070725/mount/rmd160.h +=================================================================== +--- /dev/null ++++ util-linux-ng-2.13rc2+git20070725/mount/rmd160.h +@@ -0,0 +1,11 @@ ++#ifndef RMD160_H ++#define RMD160_H ++ ++#define RMD160_HASH_SIZE 20 ++ ++void ++rmd160_hash_buffer( unsigned char *outbuf, const unsigned char *buffer, size_t length ); ++ ++#endif /*RMD160_H*/ ++ ++ +Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.c ++++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c +@@ -20,9 +20,15 @@ + + #include "loop.h" + #include "lomount.h" ++#include "rmd160.h" ++#include "sha512.h" + #include "xstrncpy.h" + #include "nls.h" + ++#ifndef MAX ++#define MAX(a,b) ((a>b)?(a):(b)) ++#endif ++ + extern int verbose; + extern char *progname; + extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ +@@ -95,12 +101,22 @@ show_loop(char *device) { + + if (loopinfo64.lo_encrypt_type || + loopinfo64.lo_crypt_name[0]) { +- char *e = loopinfo64.lo_crypt_name; ++ const char *e = (const char*)loopinfo64.lo_crypt_name; + + if (*e == 0 && loopinfo64.lo_encrypt_type == 1) + e = "XOR"; +- printf(_(", encryption %s (type %d)"), +- e, loopinfo64.lo_encrypt_type); ++ printf(_(", encryption %s (type %d), key length %u"), ++ e, loopinfo64.lo_encrypt_type, loopinfo64.lo_encrypt_key_size); ++ ++#if 0 ++ if(loopinfo64.lo_encrypt_key_size) { ++ unsigned i; ++ printf("\nkey "); ++ for(i = 0; i < loopinfo64.lo_encrypt_key_size; ++i) { ++ printf("%hhx",loopinfo64.lo_encrypt_key[i]); ++ } ++ } ++#endif + } + printf("\n"); + close (fd); +@@ -259,7 +275,7 @@ xgetpass(int pfd, const char *prompt) { + } + + if (pass == NULL) +- return ""; ++ return NULL; + + pass[i] = 0; + return pass; +@@ -273,12 +289,30 @@ digits_only(const char *s) { + return 1; + } + ++static void phash_none(const unsigned char *key, size_t keylen, unsigned char* buf, size_t buflen) ++{ ++ memcpy(buf, key, MAX(buflen, keylen)); ++} ++ ++static void phash_rmd160(const unsigned char *key, size_t keylen, unsigned char* buf, size_t buflen) ++{ ++ unsigned char tmpbuf[RMD160_HASH_SIZE*2]; ++ unsigned char* tmp = malloc(keylen+1); ++ tmp[0]='A'; ++ memcpy(tmp+1, key, keylen); ++ rmd160_hash_buffer(tmpbuf, key, keylen); ++ rmd160_hash_buffer(tmpbuf + RMD160_HASH_SIZE, tmp, keylen+1); ++ memset(tmp, 0, keylen+1); ++ free(tmp); ++ memcpy(buf, tmpbuf, MAX(buflen, sizeof(tmpbuf))); ++} ++ + int + set_loop(const char *device, const char *file, unsigned long long offset, +- const char *encryption, int pfd, int *loopro) { ++ const char *encryption, const char* phash, int pfd, int *loopro, int keysz) { + struct loop_info64 loopinfo64; + int fd, ffd, mode, i; +- char *pass; ++ char *pass = NULL; + + mode = (*loopro ? O_RDONLY : O_RDWR); + if ((ffd = open(file, mode)) < 0) { +@@ -297,15 +331,43 @@ set_loop(const char *device, const char + + memset(&loopinfo64, 0, sizeof(loopinfo64)); + +- xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE); ++ xstrncpy((char*)loopinfo64.lo_file_name, file, LO_NAME_SIZE); ++ ++ loopinfo64.lo_encrypt_key_size = 0; + + if (encryption && *encryption) { ++ // a hint for suse users ++ if(!strcmp(encryption, "twofishSL92")) { ++ fprintf(stderr, _("twofishSL92 is not supported via cryptoloop, please use dm-crypt to access the volume\n")); ++ close(fd); ++ close(ffd); ++ return 1; ++ } + if (digits_only(encryption)) { + loopinfo64.lo_encrypt_type = atoi(encryption); + } else { +- loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI; +- snprintf(loopinfo64.lo_crypt_name, LO_NAME_SIZE, ++ // check for something like twofish256 ++ unsigned len = strlen(encryption); ++ snprintf((char*)loopinfo64.lo_crypt_name, LO_NAME_SIZE, + "%s", encryption); ++ if(len > 3) { ++ if(isdigit(loopinfo64.lo_crypt_name[len-3]) ++ && isdigit(loopinfo64.lo_crypt_name[len-2]) ++ && isdigit(loopinfo64.lo_crypt_name[len-1])) { ++ loopinfo64.lo_encrypt_key_size = atoi((char*)&loopinfo64.lo_crypt_name[len-3]) >> 3; ++ loopinfo64.lo_crypt_name[len-3] = 0; ++ } ++ } ++ ++ if(keysz && loopinfo64.lo_encrypt_key_size && loopinfo64.lo_encrypt_key_size != keysz >> 3) { ++ fprintf(stderr, _("please either specify '%s%d' or -e '%s' -k '%d'\n"), ++ loopinfo64.lo_crypt_name, loopinfo64.lo_encrypt_key_size<<3, ++ loopinfo64.lo_crypt_name, keysz); ++ close(fd); ++ close(ffd); ++ return 1; ++ } ++ loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI; + } + } + +@@ -325,20 +387,64 @@ set_loop(const char *device, const char + } + #endif + +- switch (loopinfo64.lo_encrypt_type) { +- case LO_CRYPT_NONE: +- loopinfo64.lo_encrypt_key_size = 0; +- break; +- case LO_CRYPT_XOR: +- pass = getpass(_("Password: ")); +- goto gotpass; +- default: +- pass = xgetpass(pfd, _("Password: ")); +- gotpass: ++ if (loopinfo64.lo_encrypt_type != LO_CRYPT_NONE) { ++ void (*hfunc)(const unsigned char*, size_t, unsigned char*, size_t) = NULL; ++ + memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE); +- xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE); ++ ++ pass = xgetpass(pfd, _("Password: ")); ++ if(!pass) { ++ close(fd); ++ close(ffd); ++ return 1; ++ } ++ ++ // set default hash functions, loop-AES compatible ++ if(loopinfo64.lo_encrypt_type == LO_CRYPT_CRYPTOAPI) { ++ hfunc = sha512_hash_buffer; ++ if(loopinfo64.lo_encrypt_key_size == 24) hfunc = sha384_hash_buffer; ++ if(loopinfo64.lo_encrypt_key_size == 32) hfunc = sha512_hash_buffer; ++ } else { ++ hfunc = phash_none; ++ loopinfo64.lo_encrypt_key_size = keysz?keysz>>3:LO_KEY_SIZE; ++ } ++ ++ if(!loopinfo64.lo_encrypt_key_size) { ++ if(!keysz) { ++ if(verbose) ++ fprintf(stderr, _("please specify a key length\n")); ++ close(fd); ++ close(ffd); ++ return 1; ++ } ++ loopinfo64.lo_encrypt_key_size = keysz>>3; ++ } ++ ++ if (phash) { ++ if(!strcasecmp(phash, "sha512")) { ++ hfunc = sha512_hash_buffer; ++ } else if(!strcasecmp(phash, "sha384")) { ++ hfunc = sha384_hash_buffer; ++ } else if(!strcasecmp(phash, "sha256")) { ++ hfunc = sha256_hash_buffer; ++ } else if(!strcasecmp(phash, "rmd160")) { ++ hfunc = phash_rmd160; ++ } else if(!strcasecmp(phash, "none")) { ++ hfunc = phash_none; ++ } else { ++ fprintf(stderr, _("unsupported hash method '%s'\n"), phash); ++ close(fd); ++ close(ffd); ++ return 1; ++ } ++ } ++ ++ if(hfunc) { ++ hfunc((unsigned char*)pass, strlen(pass), loopinfo64.lo_encrypt_key, loopinfo64.lo_encrypt_key_size); ++ } ++ ++ // zero buffer + memset(pass, 0, strlen(pass)); +- loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE; + } + + if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { +@@ -416,8 +522,8 @@ mutter(void) { + } + + int +-set_loop (const char *device, const char *file, unsigned long long offset, +- const char *encryption, int *loopro) { ++set_loop(const char *device, const char *file, unsigned long long offset, ++ const char *encryption, const char* phash, int pfd, int *loopro, int keysz) { + mutter(); + return 1; + } +@@ -456,7 +562,13 @@ usage(void) { + " %1$s [ options ] {-f|--find|loop_device} file # setup\n" + "\nOptions:\n" + " -e | --encryption enable data encryption with specified \n" ++ " -H | --phash hash password using specified algorithm (rmd160/sha512/sha256/sha384/none)\n" + " -h | --help this help\n" ++ " -k | --keybits specify number of bits in the hashed key given\n" ++ " to the cipher. Some ciphers support several key\n" ++ " sizes and might be more efficient with a smaller\n" ++ " key size. Key sizes < 128 are generally not\n" ++ " recommended\n" + " -o | --offset start at offset into file\n" + " -p | --pass-fd read passphrase from file descriptor \n" + " -r | --read-only setup read-only loop device\n" +@@ -497,11 +609,14 @@ error (const char *fmt, ...) { + int + main(int argc, char **argv) { + char *p, *offset, *encryption, *passfd, *device, *file; ++ char *keysize; ++ char *phash = NULL; + int delete, find, c, all; + int res = 0; + int showdev = 0; + int ro = 0; + int pfd = -1; ++ int keysz = 0; + unsigned long long off; + struct option longopts[] = { + { "all", 0, 0, 'a' }, +@@ -509,6 +624,8 @@ main(int argc, char **argv) { + { "encryption", 1, 0, 'e' }, + { "find", 0, 0, 'f' }, + { "help", 0, 0, 'h' }, ++ { "keybits", 1, 0, 'k' }, ++ { "phash", 1, 0, 'H' }, + { "offset", 1, 0, 'o' }, + { "pass-fd", 1, 0, 'p' }, + { "read-only", 0, 0, 'r' }, +@@ -524,12 +641,13 @@ main(int argc, char **argv) { + delete = find = all = 0; + off = 0; + offset = encryption = passfd = NULL; ++ keysize = NULL; + + progname = argv[0]; + if ((p = strrchr(progname, '/')) != NULL) + progname = p+1; + +- while ((c = getopt_long(argc, argv, "ade:E:fho:p:rsv", ++ while ((c = getopt_long(argc, argv, "ade:E:fhk:No:p:rsvH:", + longopts, NULL)) != -1) { + switch (c) { + case 'a': +@@ -548,6 +666,12 @@ main(int argc, char **argv) { + case 'f': + find = 1; + break; ++ case 'k': ++ keysize = optarg; ++ break; ++ case 'H': ++ phash = optarg; ++ break; + case 'o': + offset = optarg; + break; +@@ -611,8 +735,10 @@ main(int argc, char **argv) { + usage(); + if (passfd && sscanf(passfd, "%d", &pfd) != 1) + usage(); ++ if (keysize && sscanf(keysize,"%d",&keysz) != 1) ++ usage(); + do { +- res = set_loop(device, file, off, encryption, pfd, &ro); ++ res = set_loop(device, file, off, encryption, phash, pfd, &ro, keysz); + if (res == 2 && find) { + if (verbose) + printf("stolen loop=%s...trying again\n", +Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/mount.c ++++ util-linux-ng-2.13rc2+git20070725/mount/mount.c +@@ -93,6 +93,9 @@ static int suid = 0; + /* Contains the fd to read the passphrase from, if any. */ + static int pfd = -1; + ++/* Contains the preferred keysize in bits we want to use */ ++static int keysz = 0; ++ + /* Map from -o and fstab option strings to the flag argument to mount(2). */ + struct opt_map { + const char *opt; /* option name */ +@@ -190,6 +193,7 @@ static int opt_nofail = 0; + + static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, + *opt_speed, *opt_comment, *opt_uhelper; ++static const char *opt_keybits, *opt_phash, *opt_nohashpass; + + static int mounted (const char *spec0, const char *node0); + static int check_special_mountprog(const char *spec, const char *node, +@@ -204,6 +208,9 @@ static struct string_opt_map { + { "vfs=", 1, &opt_vfstype }, + { "offset=", 0, &opt_offset }, + { "encryption=", 0, &opt_encryption }, ++ { "phash=", 0, &opt_phash }, ++ { "keybits=", 0, &opt_keybits }, ++ { "nohashpass", 0, &opt_nohashpass }, + { "speed=", 0, &opt_speed }, + { "comment=", 1, &opt_comment }, + { "uhelper=", 0, &opt_uhelper }, +@@ -858,7 +865,7 @@ loop_check(const char **spec, const char + *type = opt_vfstype; + } + +- *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_encryption); ++ *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_encryption || opt_phash || opt_keybits); + *loopfile = *spec; + + if (*loop) { +@@ -879,9 +886,17 @@ loop_check(const char **spec, const char + return EX_SYSERR; /* no more loop devices */ + if (verbose) + printf(_("mount: going to use the loop device %s\n"), *loopdev); +- ++ if (!keysz && opt_keybits) ++ keysz = strtoul(opt_keybits, NULL, 0); ++ if (opt_nohashpass) { ++ if(opt_phash && strcmp(opt_phash, "none")) { ++ error(_("mount: please specify either phash=%s or nohashpass\n")); ++ return EX_FAIL; ++ } ++ opt_phash = "none"; ++ } + if ((res = set_loop(*loopdev, *loopfile, offset, +- opt_encryption, pfd, &loopro))) { ++ opt_encryption, opt_phash, pfd, &loopro, keysz))) { + if (res == 2) { + /* loop dev has been grabbed by some other process, + try again, if not given explicitly */ +@@ -1184,7 +1199,7 @@ try_mount_one (const char *spec0, const + error (_("mount: %s not mounted already, or bad option"), node); + } else { + error (_("mount: wrong fs type, bad option, bad superblock on %s,\n" +- " missing codepage or other error"), ++ " missing codepage or helper program, or other error"), + spec); + + if (stat(spec, &statbuf) == 0 && S_ISBLK(statbuf.st_mode) +@@ -1629,6 +1644,7 @@ static struct option longopts[] = { + { "options", 1, 0, 'o' }, + { "test-opts", 1, 0, 'O' }, + { "pass-fd", 1, 0, 'p' }, ++ { "keybits", 1, 0, 'k' }, + { "types", 1, 0, 't' }, + { "bind", 0, 0, 128 }, + { "replace", 0, 0, 129 }, +@@ -1781,6 +1797,7 @@ main(int argc, char *argv[]) { + char *options = NULL, *test_opts = NULL, *node; + const char *spec = NULL; + char *label = NULL; ++ char *keysize = NULL; + char *uuid = NULL; + char *types = NULL; + char *p; +@@ -1811,7 +1828,7 @@ main(int argc, char *argv[]) { + initproctitle(argc, argv); + #endif + +- while ((c = getopt_long (argc, argv, "afFhilL:no:O:p:rsU:vVwt:", ++ while ((c = getopt_long (argc, argv, "afFhik:lL:no:O:p:rsU:vVwt:", + longopts, NULL)) != -1) { + switch (c) { + case 'a': /* mount everything in fstab */ +@@ -1829,6 +1846,9 @@ main(int argc, char *argv[]) { + case 'i': + external_allowed = 0; + break; ++ case 'k': ++ keysize = optarg; ++ break; + case 'l': + list_with_volumelabel = 1; + break; +@@ -1975,6 +1995,9 @@ main(int argc, char *argv[]) { + create_mtab (); + } + ++ if (keysize && sscanf(keysize,"%d",&keysz) != 1) ++ die (EX_USAGE, _("mount: argument to --keybits or -k must be a number")); ++ + switch (argc+specseen) { + case 0: + /* mount -a */ +Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.h +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.h ++++ util-linux-ng-2.13rc2+git20070725/mount/lomount.h +@@ -1,6 +1,6 @@ + extern int verbose; +-extern int set_loop(const char *, const char *, unsigned long long, +- const char *, int, int *); ++extern int set_loop(const char *device, const char *file, unsigned long long offset, ++ const char *encryption, const char* phash, int pfd, int *loopro, int keysz); + extern int del_loop(const char *); + extern int is_loop_device(const char *); + extern char * find_unused_loop_device(void); +Index: util-linux-ng-2.13rc2+git20070725/mount/rmd160.c +=================================================================== +--- /dev/null ++++ util-linux-ng-2.13rc2+git20070725/mount/rmd160.c +@@ -0,0 +1,532 @@ ++/* rmd160.c - RIPE-MD160 ++ * Copyright (C) 1998 Free Software Foundation, Inc. ++ */ ++ ++/* This file was part of GnuPG. Modified for use within the Linux ++ * mount utility by Marc Mutz . None of this code is ++ * by myself. I just removed everything that you don't need when all ++ * you want to do is to use rmd160_hash_buffer(). ++ * My comments are marked with (mm). */ ++ ++/* GnuPG is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * GnuPG is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ ++ ++#include /* (mm) for memcpy */ ++#include /* (mm) for BIG_ENDIAN and BYTE_ORDER */ ++#include "rmd160.h" ++ ++/* (mm) these are used by the original GnuPG file. In order to modify ++ * that file not too much, we keep the notations. maybe it would be ++ * better to include linux/types.h and typedef __u32 to u32 and __u8 ++ * to byte? */ ++typedef unsigned int u32; /* taken from e.g. util-linux's minix.h */ ++typedef unsigned char byte; ++ ++typedef struct { ++ u32 h0,h1,h2,h3,h4; ++ u32 nblocks; ++ byte buf[64]; ++ int count; ++} RMD160_CONTEXT; ++ ++/**************** ++ * Rotate a 32 bit integer by n bytes ++ */ ++#if defined(__GNUC__) && defined(__i386__) ++static inline u32 ++rol( u32 x, int n) ++{ ++ __asm__("roll %%cl,%0" ++ :"=r" (x) ++ :"0" (x),"c" (n)); ++ return x; ++} ++#else ++ #define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) ) ++#endif ++ ++/********************************* ++ * RIPEMD-160 is not patented, see (as of 25.10.97) ++ * http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html ++ * Note that the code uses Little Endian byteorder, which is good for ++ * 386 etc, but we must add some conversion when used on a big endian box. ++ * ++ * ++ * Pseudo-code for RIPEMD-160 ++ * ++ * RIPEMD-160 is an iterative hash function that operates on 32-bit words. ++ * The round function takes as input a 5-word chaining variable and a 16-word ++ * message block and maps this to a new chaining variable. All operations are ++ * defined on 32-bit words. Padding is identical to that of MD4. ++ * ++ * ++ * RIPEMD-160: definitions ++ * ++ * ++ * nonlinear functions at bit level: exor, mux, -, mux, - ++ * ++ * f(j, x, y, z) = x XOR y XOR z (0 <= j <= 15) ++ * f(j, x, y, z) = (x AND y) OR (NOT(x) AND z) (16 <= j <= 31) ++ * f(j, x, y, z) = (x OR NOT(y)) XOR z (32 <= j <= 47) ++ * f(j, x, y, z) = (x AND z) OR (y AND NOT(z)) (48 <= j <= 63) ++ * f(j, x, y, z) = x XOR (y OR NOT(z)) (64 <= j <= 79) ++ * ++ * ++ * added constants (hexadecimal) ++ * ++ * K(j) = 0x00000000 (0 <= j <= 15) ++ * K(j) = 0x5A827999 (16 <= j <= 31) int(2**30 x sqrt(2)) ++ * K(j) = 0x6ED9EBA1 (32 <= j <= 47) int(2**30 x sqrt(3)) ++ * K(j) = 0x8F1BBCDC (48 <= j <= 63) int(2**30 x sqrt(5)) ++ * K(j) = 0xA953FD4E (64 <= j <= 79) int(2**30 x sqrt(7)) ++ * K'(j) = 0x50A28BE6 (0 <= j <= 15) int(2**30 x cbrt(2)) ++ * K'(j) = 0x5C4DD124 (16 <= j <= 31) int(2**30 x cbrt(3)) ++ * K'(j) = 0x6D703EF3 (32 <= j <= 47) int(2**30 x cbrt(5)) ++ * K'(j) = 0x7A6D76E9 (48 <= j <= 63) int(2**30 x cbrt(7)) ++ * K'(j) = 0x00000000 (64 <= j <= 79) ++ * ++ * ++ * selection of message word ++ * ++ * r(j) = j (0 <= j <= 15) ++ * r(16..31) = 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8 ++ * r(32..47) = 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12 ++ * r(48..63) = 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2 ++ * r(64..79) = 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 ++ * r0(0..15) = 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12 ++ * r0(16..31)= 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2 ++ * r0(32..47)= 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13 ++ * r0(48..63)= 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14 ++ * r0(64..79)= 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 ++ * ++ * ++ * amount for rotate left (rol) ++ * ++ * s(0..15) = 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8 ++ * s(16..31) = 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12 ++ * s(32..47) = 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5 ++ * s(48..63) = 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12 ++ * s(64..79) = 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ++ * s'(0..15) = 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6 ++ * s'(16..31)= 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11 ++ * s'(32..47)= 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5 ++ * s'(48..63)= 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8 ++ * s'(64..79)= 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ++ * ++ * ++ * initial value (hexadecimal) ++ * ++ * h0 = 0x67452301; h1 = 0xEFCDAB89; h2 = 0x98BADCFE; h3 = 0x10325476; ++ * h4 = 0xC3D2E1F0; ++ * ++ * ++ * RIPEMD-160: pseudo-code ++ * ++ * It is assumed that the message after padding consists of t 16-word blocks ++ * that will be denoted with X[i][j], with 0 <= i <= t-1 and 0 <= j <= 15. ++ * The symbol [+] denotes addition modulo 2**32 and rol_s denotes cyclic left ++ * shift (rotate) over s positions. ++ * ++ * ++ * for i := 0 to t-1 { ++ * A := h0; B := h1; C := h2; D = h3; E = h4; ++ * A' := h0; B' := h1; C' := h2; D' = h3; E' = h4; ++ * for j := 0 to 79 { ++ * T := rol_s(j)(A [+] f(j, B, C, D) [+] X[i][r(j)] [+] K(j)) [+] E; ++ * A := E; E := D; D := rol_10(C); C := B; B := T; ++ * T := rol_s'(j)(A' [+] f(79-j, B', C', D') [+] X[i][r'(j)] ++ [+] K'(j)) [+] E'; ++ * A' := E'; E' := D'; D' := rol_10(C'); C' := B'; B' := T; ++ * } ++ * T := h1 [+] C [+] D'; h1 := h2 [+] D [+] E'; h2 := h3 [+] E [+] A'; ++ * h3 := h4 [+] A [+] B'; h4 := h0 [+] B [+] C'; h0 := T; ++ * } ++ */ ++ ++/* Some examples: ++ * "" 9c1185a5c5e9fc54612808977ee8f548b2258d31 ++ * "a" 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe ++ * "abc" 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc ++ * "message digest" 5d0689ef49d2fae572b881b123a85ffa21595f36 ++ * "a...z" f71c27109c692c1b56bbdceb5b9d2865b3708dbc ++ * "abcdbcde...nopq" 12a053384a9c0c88e405a06c27dcf49ada62eb2b ++ * "A...Za...z0...9" b0e20b6e3116640286ed3a87a5713079b21f5189 ++ * 8 times "1234567890" 9b752e45573d4b39f4dbd3323cab82bf63326bfb ++ * 1 million times "a" 52783243c1697bdbe16d37f97f68f08325dc1528 ++ */ ++ ++ ++static void ++rmd160_init( RMD160_CONTEXT *hd ) ++{ ++ hd->h0 = 0x67452301; ++ hd->h1 = 0xEFCDAB89; ++ hd->h2 = 0x98BADCFE; ++ hd->h3 = 0x10325476; ++ hd->h4 = 0xC3D2E1F0; ++ hd->nblocks = 0; ++ hd->count = 0; ++} ++ ++ ++ ++/**************** ++ * Transform the message X which consists of 16 32-bit-words ++ */ ++static void ++transform( RMD160_CONTEXT *hd, const byte *data ) ++{ ++ u32 a,b,c,d,e,aa,bb,cc,dd,ee,t; ++ #if BYTE_ORDER == BIG_ENDIAN ++ u32 x[16]; ++ { int i; ++ byte *p2, *p1; ++ for(i=0, p1=data, p2=(byte*)x; i < 16; i++, p2 += 4 ) { ++ p2[3] = *p1++; ++ p2[2] = *p1++; ++ p2[1] = *p1++; ++ p2[0] = *p1++; ++ } ++ } ++ #else ++ #if 0 ++ u32 *x =(u32*)data; ++ #else ++ /* this version is better because it is always aligned; ++ * The performance penalty on a 586-100 is about 6% which ++ * is acceptable - because the data is more local it might ++ * also be possible that this is faster on some machines. ++ * This function (when compiled with -02 on gcc 2.7.2) ++ * executes on a 586-100 (39.73 bogomips) at about 1900kb/sec; ++ * [measured with a 4MB data and "gpgm --print-md rmd160"] */ ++ u32 x[16]; ++ memcpy( x, data, 64 ); ++ #endif ++ #endif ++ ++ ++#define K0 0x00000000 ++#define K1 0x5A827999 ++#define K2 0x6ED9EBA1 ++#define K3 0x8F1BBCDC ++#define K4 0xA953FD4E ++#define KK0 0x50A28BE6 ++#define KK1 0x5C4DD124 ++#define KK2 0x6D703EF3 ++#define KK3 0x7A6D76E9 ++#define KK4 0x00000000 ++#define F0(x,y,z) ( (x) ^ (y) ^ (z) ) ++#define F1(x,y,z) ( ((x) & (y)) | (~(x) & (z)) ) ++#define F2(x,y,z) ( ((x) | ~(y)) ^ (z) ) ++#define F3(x,y,z) ( ((x) & (z)) | ((y) & ~(z)) ) ++#define F4(x,y,z) ( (x) ^ ((y) | ~(z)) ) ++#define R(a,b,c,d,e,f,k,r,s) do { t = a + f(b,c,d) + k + x[r]; \ ++ a = rol(t,s) + e; \ ++ c = rol(c,10); \ ++ } while(0) ++ ++ /* left lane */ ++ a = hd->h0; ++ b = hd->h1; ++ c = hd->h2; ++ d = hd->h3; ++ e = hd->h4; ++ R( a, b, c, d, e, F0, K0, 0, 11 ); ++ R( e, a, b, c, d, F0, K0, 1, 14 ); ++ R( d, e, a, b, c, F0, K0, 2, 15 ); ++ R( c, d, e, a, b, F0, K0, 3, 12 ); ++ R( b, c, d, e, a, F0, K0, 4, 5 ); ++ R( a, b, c, d, e, F0, K0, 5, 8 ); ++ R( e, a, b, c, d, F0, K0, 6, 7 ); ++ R( d, e, a, b, c, F0, K0, 7, 9 ); ++ R( c, d, e, a, b, F0, K0, 8, 11 ); ++ R( b, c, d, e, a, F0, K0, 9, 13 ); ++ R( a, b, c, d, e, F0, K0, 10, 14 ); ++ R( e, a, b, c, d, F0, K0, 11, 15 ); ++ R( d, e, a, b, c, F0, K0, 12, 6 ); ++ R( c, d, e, a, b, F0, K0, 13, 7 ); ++ R( b, c, d, e, a, F0, K0, 14, 9 ); ++ R( a, b, c, d, e, F0, K0, 15, 8 ); ++ R( e, a, b, c, d, F1, K1, 7, 7 ); ++ R( d, e, a, b, c, F1, K1, 4, 6 ); ++ R( c, d, e, a, b, F1, K1, 13, 8 ); ++ R( b, c, d, e, a, F1, K1, 1, 13 ); ++ R( a, b, c, d, e, F1, K1, 10, 11 ); ++ R( e, a, b, c, d, F1, K1, 6, 9 ); ++ R( d, e, a, b, c, F1, K1, 15, 7 ); ++ R( c, d, e, a, b, F1, K1, 3, 15 ); ++ R( b, c, d, e, a, F1, K1, 12, 7 ); ++ R( a, b, c, d, e, F1, K1, 0, 12 ); ++ R( e, a, b, c, d, F1, K1, 9, 15 ); ++ R( d, e, a, b, c, F1, K1, 5, 9 ); ++ R( c, d, e, a, b, F1, K1, 2, 11 ); ++ R( b, c, d, e, a, F1, K1, 14, 7 ); ++ R( a, b, c, d, e, F1, K1, 11, 13 ); ++ R( e, a, b, c, d, F1, K1, 8, 12 ); ++ R( d, e, a, b, c, F2, K2, 3, 11 ); ++ R( c, d, e, a, b, F2, K2, 10, 13 ); ++ R( b, c, d, e, a, F2, K2, 14, 6 ); ++ R( a, b, c, d, e, F2, K2, 4, 7 ); ++ R( e, a, b, c, d, F2, K2, 9, 14 ); ++ R( d, e, a, b, c, F2, K2, 15, 9 ); ++ R( c, d, e, a, b, F2, K2, 8, 13 ); ++ R( b, c, d, e, a, F2, K2, 1, 15 ); ++ R( a, b, c, d, e, F2, K2, 2, 14 ); ++ R( e, a, b, c, d, F2, K2, 7, 8 ); ++ R( d, e, a, b, c, F2, K2, 0, 13 ); ++ R( c, d, e, a, b, F2, K2, 6, 6 ); ++ R( b, c, d, e, a, F2, K2, 13, 5 ); ++ R( a, b, c, d, e, F2, K2, 11, 12 ); ++ R( e, a, b, c, d, F2, K2, 5, 7 ); ++ R( d, e, a, b, c, F2, K2, 12, 5 ); ++ R( c, d, e, a, b, F3, K3, 1, 11 ); ++ R( b, c, d, e, a, F3, K3, 9, 12 ); ++ R( a, b, c, d, e, F3, K3, 11, 14 ); ++ R( e, a, b, c, d, F3, K3, 10, 15 ); ++ R( d, e, a, b, c, F3, K3, 0, 14 ); ++ R( c, d, e, a, b, F3, K3, 8, 15 ); ++ R( b, c, d, e, a, F3, K3, 12, 9 ); ++ R( a, b, c, d, e, F3, K3, 4, 8 ); ++ R( e, a, b, c, d, F3, K3, 13, 9 ); ++ R( d, e, a, b, c, F3, K3, 3, 14 ); ++ R( c, d, e, a, b, F3, K3, 7, 5 ); ++ R( b, c, d, e, a, F3, K3, 15, 6 ); ++ R( a, b, c, d, e, F3, K3, 14, 8 ); ++ R( e, a, b, c, d, F3, K3, 5, 6 ); ++ R( d, e, a, b, c, F3, K3, 6, 5 ); ++ R( c, d, e, a, b, F3, K3, 2, 12 ); ++ R( b, c, d, e, a, F4, K4, 4, 9 ); ++ R( a, b, c, d, e, F4, K4, 0, 15 ); ++ R( e, a, b, c, d, F4, K4, 5, 5 ); ++ R( d, e, a, b, c, F4, K4, 9, 11 ); ++ R( c, d, e, a, b, F4, K4, 7, 6 ); ++ R( b, c, d, e, a, F4, K4, 12, 8 ); ++ R( a, b, c, d, e, F4, K4, 2, 13 ); ++ R( e, a, b, c, d, F4, K4, 10, 12 ); ++ R( d, e, a, b, c, F4, K4, 14, 5 ); ++ R( c, d, e, a, b, F4, K4, 1, 12 ); ++ R( b, c, d, e, a, F4, K4, 3, 13 ); ++ R( a, b, c, d, e, F4, K4, 8, 14 ); ++ R( e, a, b, c, d, F4, K4, 11, 11 ); ++ R( d, e, a, b, c, F4, K4, 6, 8 ); ++ R( c, d, e, a, b, F4, K4, 15, 5 ); ++ R( b, c, d, e, a, F4, K4, 13, 6 ); ++ ++ aa = a; bb = b; cc = c; dd = d; ee = e; ++ ++ /* right lane */ ++ a = hd->h0; ++ b = hd->h1; ++ c = hd->h2; ++ d = hd->h3; ++ e = hd->h4; ++ R( a, b, c, d, e, F4, KK0, 5, 8); ++ R( e, a, b, c, d, F4, KK0, 14, 9); ++ R( d, e, a, b, c, F4, KK0, 7, 9); ++ R( c, d, e, a, b, F4, KK0, 0, 11); ++ R( b, c, d, e, a, F4, KK0, 9, 13); ++ R( a, b, c, d, e, F4, KK0, 2, 15); ++ R( e, a, b, c, d, F4, KK0, 11, 15); ++ R( d, e, a, b, c, F4, KK0, 4, 5); ++ R( c, d, e, a, b, F4, KK0, 13, 7); ++ R( b, c, d, e, a, F4, KK0, 6, 7); ++ R( a, b, c, d, e, F4, KK0, 15, 8); ++ R( e, a, b, c, d, F4, KK0, 8, 11); ++ R( d, e, a, b, c, F4, KK0, 1, 14); ++ R( c, d, e, a, b, F4, KK0, 10, 14); ++ R( b, c, d, e, a, F4, KK0, 3, 12); ++ R( a, b, c, d, e, F4, KK0, 12, 6); ++ R( e, a, b, c, d, F3, KK1, 6, 9); ++ R( d, e, a, b, c, F3, KK1, 11, 13); ++ R( c, d, e, a, b, F3, KK1, 3, 15); ++ R( b, c, d, e, a, F3, KK1, 7, 7); ++ R( a, b, c, d, e, F3, KK1, 0, 12); ++ R( e, a, b, c, d, F3, KK1, 13, 8); ++ R( d, e, a, b, c, F3, KK1, 5, 9); ++ R( c, d, e, a, b, F3, KK1, 10, 11); ++ R( b, c, d, e, a, F3, KK1, 14, 7); ++ R( a, b, c, d, e, F3, KK1, 15, 7); ++ R( e, a, b, c, d, F3, KK1, 8, 12); ++ R( d, e, a, b, c, F3, KK1, 12, 7); ++ R( c, d, e, a, b, F3, KK1, 4, 6); ++ R( b, c, d, e, a, F3, KK1, 9, 15); ++ R( a, b, c, d, e, F3, KK1, 1, 13); ++ R( e, a, b, c, d, F3, KK1, 2, 11); ++ R( d, e, a, b, c, F2, KK2, 15, 9); ++ R( c, d, e, a, b, F2, KK2, 5, 7); ++ R( b, c, d, e, a, F2, KK2, 1, 15); ++ R( a, b, c, d, e, F2, KK2, 3, 11); ++ R( e, a, b, c, d, F2, KK2, 7, 8); ++ R( d, e, a, b, c, F2, KK2, 14, 6); ++ R( c, d, e, a, b, F2, KK2, 6, 6); ++ R( b, c, d, e, a, F2, KK2, 9, 14); ++ R( a, b, c, d, e, F2, KK2, 11, 12); ++ R( e, a, b, c, d, F2, KK2, 8, 13); ++ R( d, e, a, b, c, F2, KK2, 12, 5); ++ R( c, d, e, a, b, F2, KK2, 2, 14); ++ R( b, c, d, e, a, F2, KK2, 10, 13); ++ R( a, b, c, d, e, F2, KK2, 0, 13); ++ R( e, a, b, c, d, F2, KK2, 4, 7); ++ R( d, e, a, b, c, F2, KK2, 13, 5); ++ R( c, d, e, a, b, F1, KK3, 8, 15); ++ R( b, c, d, e, a, F1, KK3, 6, 5); ++ R( a, b, c, d, e, F1, KK3, 4, 8); ++ R( e, a, b, c, d, F1, KK3, 1, 11); ++ R( d, e, a, b, c, F1, KK3, 3, 14); ++ R( c, d, e, a, b, F1, KK3, 11, 14); ++ R( b, c, d, e, a, F1, KK3, 15, 6); ++ R( a, b, c, d, e, F1, KK3, 0, 14); ++ R( e, a, b, c, d, F1, KK3, 5, 6); ++ R( d, e, a, b, c, F1, KK3, 12, 9); ++ R( c, d, e, a, b, F1, KK3, 2, 12); ++ R( b, c, d, e, a, F1, KK3, 13, 9); ++ R( a, b, c, d, e, F1, KK3, 9, 12); ++ R( e, a, b, c, d, F1, KK3, 7, 5); ++ R( d, e, a, b, c, F1, KK3, 10, 15); ++ R( c, d, e, a, b, F1, KK3, 14, 8); ++ R( b, c, d, e, a, F0, KK4, 12, 8); ++ R( a, b, c, d, e, F0, KK4, 15, 5); ++ R( e, a, b, c, d, F0, KK4, 10, 12); ++ R( d, e, a, b, c, F0, KK4, 4, 9); ++ R( c, d, e, a, b, F0, KK4, 1, 12); ++ R( b, c, d, e, a, F0, KK4, 5, 5); ++ R( a, b, c, d, e, F0, KK4, 8, 14); ++ R( e, a, b, c, d, F0, KK4, 7, 6); ++ R( d, e, a, b, c, F0, KK4, 6, 8); ++ R( c, d, e, a, b, F0, KK4, 2, 13); ++ R( b, c, d, e, a, F0, KK4, 13, 6); ++ R( a, b, c, d, e, F0, KK4, 14, 5); ++ R( e, a, b, c, d, F0, KK4, 0, 15); ++ R( d, e, a, b, c, F0, KK4, 3, 13); ++ R( c, d, e, a, b, F0, KK4, 9, 11); ++ R( b, c, d, e, a, F0, KK4, 11, 11); ++ ++ ++ t = hd->h1 + d + cc; ++ hd->h1 = hd->h2 + e + dd; ++ hd->h2 = hd->h3 + a + ee; ++ hd->h3 = hd->h4 + b + aa; ++ hd->h4 = hd->h0 + c + bb; ++ hd->h0 = t; ++} ++ ++ ++/* Update the message digest with the contents ++ * of INBUF with length INLEN. ++ */ ++static void ++rmd160_write( RMD160_CONTEXT *hd, const byte *inbuf, size_t inlen) ++{ ++ if( hd->count == 64 ) { /* flush the buffer */ ++ transform( hd, hd->buf ); ++ hd->count = 0; ++ hd->nblocks++; ++ } ++ if( !inbuf ) ++ return; ++ if( hd->count ) { ++ for( ; inlen && hd->count < 64; inlen-- ) ++ hd->buf[hd->count++] = *inbuf++; ++ rmd160_write( hd, NULL, 0 ); ++ if( !inlen ) ++ return; ++ } ++ ++ while( inlen >= 64 ) { ++ transform( hd, inbuf ); ++ hd->count = 0; ++ hd->nblocks++; ++ inlen -= 64; ++ inbuf += 64; ++ } ++ for( ; inlen && hd->count < 64; inlen-- ) ++ hd->buf[hd->count++] = *inbuf++; ++} ++ ++/* The routine terminates the computation ++ */ ++ ++static void ++rmd160_final( RMD160_CONTEXT *hd ) ++{ ++ u32 t, msb, lsb; ++ byte *p; ++ ++ rmd160_write(hd, NULL, 0); /* flush */; ++ ++ msb = 0; ++ t = hd->nblocks; ++ if( (lsb = t << 6) < t ) /* multiply by 64 to make a byte count */ ++ msb++; ++ msb += t >> 26; ++ t = lsb; ++ if( (lsb = t + hd->count) < t ) /* add the count */ ++ msb++; ++ t = lsb; ++ if( (lsb = t << 3) < t ) /* multiply by 8 to make a bit count */ ++ msb++; ++ msb += t >> 29; ++ ++ if( hd->count < 56 ) { /* enough room */ ++ hd->buf[hd->count++] = 0x80; /* pad */ ++ while( hd->count < 56 ) ++ hd->buf[hd->count++] = 0; /* pad */ ++ } ++ else { /* need one extra block */ ++ hd->buf[hd->count++] = 0x80; /* pad character */ ++ while( hd->count < 64 ) ++ hd->buf[hd->count++] = 0; ++ rmd160_write(hd, NULL, 0); /* flush */; ++ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */ ++ } ++ /* append the 64 bit count */ ++ hd->buf[56] = lsb ; ++ hd->buf[57] = lsb >> 8; ++ hd->buf[58] = lsb >> 16; ++ hd->buf[59] = lsb >> 24; ++ hd->buf[60] = msb ; ++ hd->buf[61] = msb >> 8; ++ hd->buf[62] = msb >> 16; ++ hd->buf[63] = msb >> 24; ++ transform( hd, hd->buf ); ++ ++ p = hd->buf; ++ #if BYTE_ORDER == BIG_ENDIAN ++ #define X(a) do { *p++ = hd->h##a ; *p++ = hd->h##a >> 8; \ ++ *p++ = hd->h##a >> 16; *p++ = hd->h##a >> 24; } while(0) ++ #else /* little endian */ ++ #define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0) ++ #endif ++ X(0); ++ X(1); ++ X(2); ++ X(3); ++ X(4); ++ #undef X ++} ++ ++/**************** ++ * Shortcut functions which puts the hash value of the supplied buffer ++ * into outbuf which must have a size of 20 bytes. ++ */ ++void ++rmd160_hash_buffer( unsigned char *outbuf, const unsigned char *buffer, size_t length ) ++{ ++ RMD160_CONTEXT hd; ++ ++ rmd160_init( &hd ); ++ rmd160_write( &hd, buffer, length ); ++ rmd160_final( &hd ); ++ memcpy( outbuf, hd.buf, 20 ); ++} +Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c +=================================================================== +--- /dev/null ++++ util-linux-ng-2.13rc2+git20070725/mount/sha512.c +@@ -0,0 +1,432 @@ ++/* ++ * sha512.c ++ * ++ * Written by Jari Ruusu, April 16 2001 ++ * ++ * Copyright 2001 by Jari Ruusu. ++ * Redistribution of this file is permitted under the GNU Public License. ++ */ ++ ++#include ++#include ++#include "sha512.h" ++ ++/* Define one or more of these. If none is defined, you get all of them */ ++#if !defined(SHA256_NEEDED)&&!defined(SHA512_NEEDED)&&!defined(SHA384_NEEDED) ++# define SHA256_NEEDED 1 ++# define SHA512_NEEDED 1 ++# define SHA384_NEEDED 1 ++#endif ++ ++#if defined(SHA256_NEEDED) ++static const u_int32_t sha256_hashInit[8] = { ++ 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, ++ 0x1f83d9ab, 0x5be0cd19 ++}; ++static const u_int32_t sha256_K[64] = { ++ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, ++ 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, ++ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, ++ 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, ++ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, ++ 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, ++ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, ++ 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, ++ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, ++ 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, ++ 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 ++}; ++#endif ++ ++#if defined(SHA512_NEEDED) ++static const u_int64_t sha512_hashInit[8] = { ++ 0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, 0x3c6ef372fe94f82bULL, ++ 0xa54ff53a5f1d36f1ULL, 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, ++ 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL ++}; ++#endif ++ ++#if defined(SHA384_NEEDED) ++static const u_int64_t sha384_hashInit[8] = { ++ 0xcbbb9d5dc1059ed8ULL, 0x629a292a367cd507ULL, 0x9159015a3070dd17ULL, ++ 0x152fecd8f70e5939ULL, 0x67332667ffc00b31ULL, 0x8eb44a8768581511ULL, ++ 0xdb0c2e0d64f98fa7ULL, 0x47b5481dbefa4fa4ULL ++}; ++#endif ++ ++#if defined(SHA512_NEEDED) || defined(SHA384_NEEDED) ++static const u_int64_t sha512_K[80] = { ++ 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL, ++ 0xe9b5dba58189dbbcULL, 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL, ++ 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL, 0xd807aa98a3030242ULL, ++ 0x12835b0145706fbeULL, 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL, ++ 0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL, 0x9bdc06a725c71235ULL, ++ 0xc19bf174cf692694ULL, 0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL, ++ 0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL, 0x2de92c6f592b0275ULL, ++ 0x4a7484aa6ea6e483ULL, 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL, ++ 0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL, 0xb00327c898fb213fULL, ++ 0xbf597fc7beef0ee4ULL, 0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL, ++ 0x06ca6351e003826fULL, 0x142929670a0e6e70ULL, 0x27b70a8546d22ffcULL, ++ 0x2e1b21385c26c926ULL, 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL, ++ 0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL, 0x81c2c92e47edaee6ULL, ++ 0x92722c851482353bULL, 0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL, ++ 0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL, 0xd192e819d6ef5218ULL, ++ 0xd69906245565a910ULL, 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL, ++ 0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL, 0x2748774cdf8eeb99ULL, ++ 0x34b0bcb5e19b48a8ULL, 0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL, ++ 0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL, 0x748f82ee5defb2fcULL, ++ 0x78a5636f43172f60ULL, 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL, ++ 0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL, 0xbef9a3f7b2c67915ULL, ++ 0xc67178f2e372532bULL, 0xca273eceea26619cULL, 0xd186b8c721c0c207ULL, ++ 0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL, 0x06f067aa72176fbaULL, ++ 0x0a637dc5a2c898a6ULL, 0x113f9804bef90daeULL, 0x1b710b35131c471bULL, ++ 0x28db77f523047d84ULL, 0x32caab7b40c72493ULL, 0x3c9ebe0a15c9bebcULL, ++ 0x431d67c49c100d4cULL, 0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL, ++ 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL ++}; ++#endif ++ ++#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z))) ++#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) ++#define R(x,y) ((y) >> (x)) ++ ++#if defined(SHA256_NEEDED) ++void sha256_init(sha256_context *ctx) ++{ ++ memcpy(&ctx->sha_H[0], &sha256_hashInit[0], sizeof(ctx->sha_H)); ++ ctx->sha_blocks = 0; ++ ctx->sha_bufCnt = 0; ++} ++ ++#define S(x,y) (((y) >> (x)) | ((y) << (32 - (x)))) ++#define uSig0(x) ((S(2,(x))) ^ (S(13,(x))) ^ (S(22,(x)))) ++#define uSig1(x) ((S(6,(x))) ^ (S(11,(x))) ^ (S(25,(x)))) ++#define lSig0(x) ((S(7,(x))) ^ (S(18,(x))) ^ (R(3,(x)))) ++#define lSig1(x) ((S(17,(x))) ^ (S(19,(x))) ^ (R(10,(x)))) ++ ++static void sha256_transform(sha256_context *ctx, const unsigned char *datap) ++{ ++ register int j; ++ u_int32_t a, b, c, d, e, f, g, h; ++ u_int32_t T1, T2, W[64], Wm2, Wm15; ++ ++ /* read the data, big endian byte order */ ++ j = 0; ++ do { ++ W[j] = (((u_int32_t)(datap[0]))<<24) | (((u_int32_t)(datap[1]))<<16) | ++ (((u_int32_t)(datap[2]))<<8 ) | ((u_int32_t)(datap[3])); ++ datap += 4; ++ } while(++j < 16); ++ ++ /* initialize variables a...h */ ++ a = ctx->sha_H[0]; ++ b = ctx->sha_H[1]; ++ c = ctx->sha_H[2]; ++ d = ctx->sha_H[3]; ++ e = ctx->sha_H[4]; ++ f = ctx->sha_H[5]; ++ g = ctx->sha_H[6]; ++ h = ctx->sha_H[7]; ++ ++ /* apply compression function */ ++ j = 0; ++ do { ++ if(j >= 16) { ++ Wm2 = W[j - 2]; ++ Wm15 = W[j - 15]; ++ W[j] = lSig1(Wm2) + W[j - 7] + lSig0(Wm15) + W[j - 16]; ++ } ++ T1 = h + uSig1(e) + Ch(e,f,g) + sha256_K[j] + W[j]; ++ T2 = uSig0(a) + Maj(a,b,c); ++ h = g; g = f; f = e; ++ e = d + T1; ++ d = c; c = b; b = a; ++ a = T1 + T2; ++ } while(++j < 64); ++ ++ /* compute intermediate hash value */ ++ ctx->sha_H[0] += a; ++ ctx->sha_H[1] += b; ++ ctx->sha_H[2] += c; ++ ctx->sha_H[3] += d; ++ ctx->sha_H[4] += e; ++ ctx->sha_H[5] += f; ++ ctx->sha_H[6] += g; ++ ctx->sha_H[7] += h; ++ ++ ctx->sha_blocks++; ++} ++ ++void sha256_write(sha256_context *ctx, const unsigned char *datap, int length) ++{ ++ while(length > 0) { ++ if(!ctx->sha_bufCnt) { ++ while(length >= sizeof(ctx->sha_out)) { ++ sha256_transform(ctx, datap); ++ datap += sizeof(ctx->sha_out); ++ length -= sizeof(ctx->sha_out); ++ } ++ if(!length) return; ++ } ++ ctx->sha_out[ctx->sha_bufCnt] = *datap++; ++ length--; ++ if(++ctx->sha_bufCnt == sizeof(ctx->sha_out)) { ++ sha256_transform(ctx, &ctx->sha_out[0]); ++ ctx->sha_bufCnt = 0; ++ } ++ } ++} ++ ++void sha256_final(sha256_context *ctx) ++{ ++ register int j; ++ u_int64_t bitLength; ++ u_int32_t i; ++ unsigned char padByte, *datap; ++ ++ bitLength = (ctx->sha_blocks << 9) | (ctx->sha_bufCnt << 3); ++ padByte = 0x80; ++ sha256_write(ctx, &padByte, 1); ++ ++ /* pad extra space with zeroes */ ++ padByte = 0; ++ while(ctx->sha_bufCnt != 56) { ++ sha256_write(ctx, &padByte, 1); ++ } ++ ++ /* write bit length, big endian byte order */ ++ ctx->sha_out[56] = bitLength >> 56; ++ ctx->sha_out[57] = bitLength >> 48; ++ ctx->sha_out[58] = bitLength >> 40; ++ ctx->sha_out[59] = bitLength >> 32; ++ ctx->sha_out[60] = bitLength >> 24; ++ ctx->sha_out[61] = bitLength >> 16; ++ ctx->sha_out[62] = bitLength >> 8; ++ ctx->sha_out[63] = bitLength; ++ sha256_transform(ctx, &ctx->sha_out[0]); ++ ++ /* return results in ctx->sha_out[0...31] */ ++ datap = &ctx->sha_out[0]; ++ j = 0; ++ do { ++ i = ctx->sha_H[j]; ++ datap[0] = i >> 24; ++ datap[1] = i >> 16; ++ datap[2] = i >> 8; ++ datap[3] = i; ++ datap += 4; ++ } while(++j < 8); ++ ++ /* clear sensitive information */ ++ memset(&ctx->sha_out[32], 0, sizeof(sha256_context) - 32); ++} ++ ++void sha256_hash_buffer(const unsigned char *ib, size_t ile, unsigned char *ob, size_t ole) ++{ ++ sha256_context ctx; ++ ++ if(ole < 1) return; ++ memset(ob, 0, ole); ++ if(ole > 32) ole = 32; ++ sha256_init(&ctx); ++ sha256_write(&ctx, ib, ile); ++ sha256_final(&ctx); ++ memcpy(ob, &ctx.sha_out[0], ole); ++ memset(&ctx, 0, sizeof(ctx)); ++} ++ ++#endif ++ ++#if defined(SHA512_NEEDED) ++void sha512_init(sha512_context *ctx) ++{ ++ memcpy(&ctx->sha_H[0], &sha512_hashInit[0], sizeof(ctx->sha_H)); ++ ctx->sha_blocks = 0; ++ ctx->sha_blocksMSB = 0; ++ ctx->sha_bufCnt = 0; ++} ++#endif ++ ++#if defined(SHA512_NEEDED) || defined(SHA384_NEEDED) ++#undef S ++#undef uSig0 ++#undef uSig1 ++#undef lSig0 ++#undef lSig1 ++#define S(x,y) (((y) >> (x)) | ((y) << (64 - (x)))) ++#define uSig0(x) ((S(28,(x))) ^ (S(34,(x))) ^ (S(39,(x)))) ++#define uSig1(x) ((S(14,(x))) ^ (S(18,(x))) ^ (S(41,(x)))) ++#define lSig0(x) ((S(1,(x))) ^ (S(8,(x))) ^ (R(7,(x)))) ++#define lSig1(x) ((S(19,(x))) ^ (S(61,(x))) ^ (R(6,(x)))) ++ ++static void sha512_transform(sha512_context *ctx, const unsigned char *datap) ++{ ++ register int j; ++ u_int64_t a, b, c, d, e, f, g, h; ++ u_int64_t T1, T2, W[80], Wm2, Wm15; ++ ++ /* read the data, big endian byte order */ ++ j = 0; ++ do { ++ W[j] = (((u_int64_t)(datap[0]))<<56) | (((u_int64_t)(datap[1]))<<48) | ++ (((u_int64_t)(datap[2]))<<40) | (((u_int64_t)(datap[3]))<<32) | ++ (((u_int64_t)(datap[4]))<<24) | (((u_int64_t)(datap[5]))<<16) | ++ (((u_int64_t)(datap[6]))<<8 ) | ((u_int64_t)(datap[7])); ++ datap += 8; ++ } while(++j < 16); ++ ++ /* initialize variables a...h */ ++ a = ctx->sha_H[0]; ++ b = ctx->sha_H[1]; ++ c = ctx->sha_H[2]; ++ d = ctx->sha_H[3]; ++ e = ctx->sha_H[4]; ++ f = ctx->sha_H[5]; ++ g = ctx->sha_H[6]; ++ h = ctx->sha_H[7]; ++ ++ /* apply compression function */ ++ j = 0; ++ do { ++ if(j >= 16) { ++ Wm2 = W[j - 2]; ++ Wm15 = W[j - 15]; ++ W[j] = lSig1(Wm2) + W[j - 7] + lSig0(Wm15) + W[j - 16]; ++ } ++ T1 = h + uSig1(e) + Ch(e,f,g) + sha512_K[j] + W[j]; ++ T2 = uSig0(a) + Maj(a,b,c); ++ h = g; g = f; f = e; ++ e = d + T1; ++ d = c; c = b; b = a; ++ a = T1 + T2; ++ } while(++j < 80); ++ ++ /* compute intermediate hash value */ ++ ctx->sha_H[0] += a; ++ ctx->sha_H[1] += b; ++ ctx->sha_H[2] += c; ++ ctx->sha_H[3] += d; ++ ctx->sha_H[4] += e; ++ ctx->sha_H[5] += f; ++ ctx->sha_H[6] += g; ++ ctx->sha_H[7] += h; ++ ++ ctx->sha_blocks++; ++ if(!ctx->sha_blocks) ctx->sha_blocksMSB++; ++} ++ ++void sha512_write(sha512_context *ctx, const unsigned char *datap, int length) ++{ ++ while(length > 0) { ++ if(!ctx->sha_bufCnt) { ++ while(length >= sizeof(ctx->sha_out)) { ++ sha512_transform(ctx, datap); ++ datap += sizeof(ctx->sha_out); ++ length -= sizeof(ctx->sha_out); ++ } ++ if(!length) return; ++ } ++ ctx->sha_out[ctx->sha_bufCnt] = *datap++; ++ length--; ++ if(++ctx->sha_bufCnt == sizeof(ctx->sha_out)) { ++ sha512_transform(ctx, &ctx->sha_out[0]); ++ ctx->sha_bufCnt = 0; ++ } ++ } ++} ++ ++void sha512_final(sha512_context *ctx) ++{ ++ register int j; ++ u_int64_t bitLength, bitLengthMSB; ++ u_int64_t i; ++ unsigned char padByte, *datap; ++ ++ bitLength = (ctx->sha_blocks << 10) | (ctx->sha_bufCnt << 3); ++ bitLengthMSB = (ctx->sha_blocksMSB << 10) | (ctx->sha_blocks >> 54); ++ padByte = 0x80; ++ sha512_write(ctx, &padByte, 1); ++ ++ /* pad extra space with zeroes */ ++ padByte = 0; ++ while(ctx->sha_bufCnt != 112) { ++ sha512_write(ctx, &padByte, 1); ++ } ++ ++ /* write bit length, big endian byte order */ ++ ctx->sha_out[112] = bitLengthMSB >> 56; ++ ctx->sha_out[113] = bitLengthMSB >> 48; ++ ctx->sha_out[114] = bitLengthMSB >> 40; ++ ctx->sha_out[115] = bitLengthMSB >> 32; ++ ctx->sha_out[116] = bitLengthMSB >> 24; ++ ctx->sha_out[117] = bitLengthMSB >> 16; ++ ctx->sha_out[118] = bitLengthMSB >> 8; ++ ctx->sha_out[119] = bitLengthMSB; ++ ctx->sha_out[120] = bitLength >> 56; ++ ctx->sha_out[121] = bitLength >> 48; ++ ctx->sha_out[122] = bitLength >> 40; ++ ctx->sha_out[123] = bitLength >> 32; ++ ctx->sha_out[124] = bitLength >> 24; ++ ctx->sha_out[125] = bitLength >> 16; ++ ctx->sha_out[126] = bitLength >> 8; ++ ctx->sha_out[127] = bitLength; ++ sha512_transform(ctx, &ctx->sha_out[0]); ++ ++ /* return results in ctx->sha_out[0...63] */ ++ datap = &ctx->sha_out[0]; ++ j = 0; ++ do { ++ i = ctx->sha_H[j]; ++ datap[0] = i >> 56; ++ datap[1] = i >> 48; ++ datap[2] = i >> 40; ++ datap[3] = i >> 32; ++ datap[4] = i >> 24; ++ datap[5] = i >> 16; ++ datap[6] = i >> 8; ++ datap[7] = i; ++ datap += 8; ++ } while(++j < 8); ++ ++ /* clear sensitive information */ ++ memset(&ctx->sha_out[64], 0, sizeof(sha512_context) - 64); ++} ++ ++void sha512_hash_buffer(const unsigned char *ib, size_t ile, unsigned char *ob, size_t ole) ++{ ++ sha512_context ctx; ++ ++ if(ole < 1) return; ++ memset(ob, 0, ole); ++ if(ole > 64) ole = 64; ++ sha512_init(&ctx); ++ sha512_write(&ctx, ib, ile); ++ sha512_final(&ctx); ++ memcpy(ob, &ctx.sha_out[0], ole); ++ memset(&ctx, 0, sizeof(ctx)); ++} ++#endif ++ ++#if defined(SHA384_NEEDED) ++void sha384_init(sha512_context *ctx) ++{ ++ memcpy(&ctx->sha_H[0], &sha384_hashInit[0], sizeof(ctx->sha_H)); ++ ctx->sha_blocks = 0; ++ ctx->sha_blocksMSB = 0; ++ ctx->sha_bufCnt = 0; ++} ++ ++void sha384_hash_buffer(const unsigned char *ib, size_t ile, unsigned char *ob, size_t ole) ++{ ++ sha512_context ctx; ++ ++ if(ole < 1) return; ++ memset(ob, 0, ole); ++ if(ole > 48) ole = 48; ++ sha384_init(&ctx); ++ sha512_write(&ctx, ib, ile); ++ sha512_final(&ctx); ++ memcpy(ob, &ctx.sha_out[0], ole); ++ memset(&ctx, 0, sizeof(ctx)); ++} ++#endif +Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.h +=================================================================== +--- /dev/null ++++ util-linux-ng-2.13rc2+git20070725/mount/sha512.h +@@ -0,0 +1,45 @@ ++/* ++ * sha512.h ++ * ++ * Written by Jari Ruusu, April 16 2001 ++ * ++ * Copyright 2001 by Jari Ruusu. ++ * Redistribution of this file is permitted under the GNU Public License. ++ */ ++ ++#include ++ ++typedef struct { ++ unsigned char sha_out[64]; /* results are here, bytes 0...31 */ ++ u_int32_t sha_H[8]; ++ u_int64_t sha_blocks; ++ int sha_bufCnt; ++} sha256_context; ++ ++typedef struct { ++ unsigned char sha_out[128]; /* results are here, bytes 0...63 */ ++ u_int64_t sha_H[8]; ++ u_int64_t sha_blocks; ++ u_int64_t sha_blocksMSB; ++ int sha_bufCnt; ++} sha512_context; ++ ++/* no sha384_context, use sha512_context */ ++ ++/* 256 bit hash, provides 128 bits of security against collision attacks */ ++extern void sha256_init(sha256_context *); ++extern void sha256_write(sha256_context *, const unsigned char *, int); ++extern void sha256_final(sha256_context *); ++extern void sha256_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); ++ ++/* 512 bit hash, provides 256 bits of security against collision attacks */ ++extern void sha512_init(sha512_context *); ++extern void sha512_write(sha512_context *, const unsigned char *, int); ++extern void sha512_final(sha512_context *); ++extern void sha512_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); ++ ++/* 384 bit hash, provides 192 bits of security against collision attacks */ ++extern void sha384_init(sha512_context *); ++/* no sha384_write(), use sha512_write() */ ++/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ ++extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); diff --git a/raw.init b/raw.init index 7fb0069..76623b7 100644 --- a/raw.init +++ b/raw.init @@ -15,14 +15,13 @@ # Required-Stop: # Default-Start: 2 3 5 # Default-Stop: 0 1 6 -# Short-Description: raw devices # Description: raw-devices ### END INIT INFO . /etc/rc.status CONFIG=/etc/raw -RAW_BIN=/sbin/raw +RAW_BIN=/usr/sbin/raw RAW_MODULE=raw test -x $RAW_BIN || exit 5 diff --git a/util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch b/util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch new file mode 100644 index 0000000..260392e --- /dev/null +++ b/util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch @@ -0,0 +1,39 @@ +Index: util-linux-ng-2.12r+git20070330/disk-utils/mkswap.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/disk-utils/mkswap.c ++++ util-linux-ng-2.12r+git20070330/disk-utils/mkswap.c +@@ -660,7 +660,7 @@ main(int argc, char ** argv) { + usage(); + } + +- DEV = open(device_name,O_RDWR); ++ DEV = open(device_name, O_RDWR | O_EXCL); + if (DEV < 0 || fstat(DEV, &statbuf) < 0) { + perror(device_name); + exit(1); +Index: util-linux-ng-2.12r+git20070330/disk-utils/mkfs.minix.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/disk-utils/mkfs.minix.c ++++ util-linux-ng-2.12r+git20070330/disk-utils/mkfs.minix.c +@@ -699,7 +699,7 @@ main(int argc, char ** argv) { + tmp += dirsize; + *(short *)tmp = 2; + strcpy(tmp+2,".badblocks"); +- DEV = open(device_name,O_RDWR ); ++ DEV = open(device_name,O_RDWR | O_EXCL); + if (DEV<0) + die(_("unable to open %s")); + if (fstat(DEV,&statbuf)<0) +Index: util-linux-ng-2.12r+git20070330/disk-utils/mkfs.bfs.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/disk-utils/mkfs.bfs.c ++++ util-linux-ng-2.12r+git20070330/disk-utils/mkfs.bfs.c +@@ -170,7 +170,7 @@ main(int argc, char *argv[]) { + if (!S_ISBLK(statbuf.st_mode)) + fatal(_("%s is not a block special device"), device); + +- fd = open(device, O_RDWR); ++ fd = open(device, O_RDWR | O_EXCL); + if (fd == -1) { + perror(device); + fatal(_("cannot open %s"), device); diff --git a/util-linux-2.12r-mount_swapon_swsuspend_resume.patch b/util-linux-2.12r-mount_swapon_swsuspend_resume.patch new file mode 100644 index 0000000..8bc8e98 --- /dev/null +++ b/util-linux-2.12r-mount_swapon_swsuspend_resume.patch @@ -0,0 +1,128 @@ +## 30swsusp-resume.dpatch by Jeff Bailey +Index: util-linux-ng-2.12r+git20070330/mount/swapon.c +=================================================================== +--- util-linux-ng-2.12r+git20070330.orig/mount/swapon.c ++++ util-linux-ng-2.12r+git20070330/mount/swapon.c +@@ -10,7 +10,9 @@ + #include + #include + #include ++#include + #include ++#include + #include "xmalloc.h" + #include "swap_constants.h" + #include "swapargs.h" +@@ -23,6 +25,7 @@ + + #define _PATH_FSTAB "/etc/fstab" + #define PROC_SWAPS "/proc/swaps" ++#define PATH_MKSWAP "/sbin/mkswap" + + #define SWAPON_NEEDS_TWO_ARGS + +@@ -179,6 +182,85 @@ display_summary(void) + return 0 ; + } + ++/* ++ * It's better do swsuspend detection by follow routine than ++ * include huge mount_guess_fstype.o to swapon. We need only ++ * swsuspend and no the others filesystems. ++ */ ++#ifdef HAVE_LIBBLKID ++static int ++swap_is_swsuspend(const char *device) { ++ const char *type = blkid_get_tag_value(blkid, "TYPE", device); ++ ++ if (type && strcmp(type, "swsuspend")==0) ++ return 0; ++ return 1; ++} ++#else ++static int ++swap_is_swsuspend(const char *device) { ++ int fd, re = 1, n = getpagesize() - 10; ++ char buf[10]; ++ ++ fd = open(device, O_RDONLY); ++ if (fd < 0) ++ return -1; ++ ++ if (lseek(fd, n, SEEK_SET) >= 0 && ++ read(fd, buf, sizeof buf) == sizeof buf && ++ (memcmp("S1SUSPEND", buf, 9)==0 || ++ memcmp("S2SUSPEND", buf, 9)==0 || ++ memcmp("ULSUSPEND", buf, 9)==0)) ++ re = 0; ++ ++ close(fd); ++ return re; ++} ++#endif ++ ++/* calls mkswap */ ++static int ++swap_reinitialize(const char *device) { ++ const char *label = mount_get_volume_label_by_spec(device); ++ pid_t pid; ++ ++ switch((pid=fork())) { ++ case -1: /* fork error */ ++ fprintf(stderr, _("%s: cannot fork: %s\n"), ++ progname, strerror(errno)); ++ return -1; ++ ++ case 0: /* child */ ++ if (label && *label) ++ execl(PATH_MKSWAP, PATH_MKSWAP, "-L", label, device, NULL); ++ else ++ execl(PATH_MKSWAP, PATH_MKSWAP, device, NULL); ++ exit(1); /* error */ ++ ++ default: /* parent */ ++ { ++ int status; ++ int ret; ++ ++ do { ++ if ((ret = waitpid(pid, &status, 0)) < 0 ++ && errno == EINTR) ++ continue; ++ else if (ret < 0) { ++ fprintf(stderr, _("%s: waitpid: %s\n"), ++ progname, strerror(errno)); ++ return -1; ++ } ++ } while (0); ++ ++ /* mkswap returns: 0=suss, 1=error */ ++ if (WIFEXITED(status) && WEXITSTATUS(status)==0) ++ return 0; /* ok */ ++ } ++ } ++ return -1; /* error */ ++} ++ + static int + do_swapon(const char *orig_special, int prio) { + int status; +@@ -202,6 +284,18 @@ do_swapon(const char *orig_special, int + return -1; + } + ++ /* We have to reinitialize swap with old (=useless) software suspend ++ * data. The problem is that if we don't do it, then we get data ++ * corruption the next time with suspended on. ++ */ ++ if (swap_is_swsuspend(special)==0) { ++ fprintf(stdout, _("%s: %s: software suspend data detected. " ++ "Reinitializing the swap.\n"), ++ progname, special); ++ if (swap_reinitialize(special) < 0) ++ return -1; ++ } ++ + /* people generally dislike this warning - now it is printed + only when `verbose' is set */ + if (verbose) { diff --git a/util-linux-2.13-loop.patch b/util-linux-2.13-loop.patch new file mode 100644 index 0000000..ca5698c --- /dev/null +++ b/util-linux-2.13-loop.patch @@ -0,0 +1,32 @@ +--- util-linux-ng-2.13rc2+git20070725/mount/lomount.c.org 2007-08-16 17:09:33.258902000 +0200 ++++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c 2007-08-16 17:09:43.016135000 +0200 +@@ -398,6 +398,7 @@ + } + if (ioctl (fd, LOOP_CLR_FD, 0) < 0) { + perror ("ioctl: LOOP_CLR_FD"); ++ close(fd); + return 1; + } + close (fd); +--- util-linux-ng-2.13rc2+git20070725/mount/fsprobe_volumeid.c.org 2007-08-16 18:16:03.120065000 +0200 ++++ util-linux-ng-2.13rc2+git20070725/mount/fsprobe_volumeid.c 2007-08-16 18:27:43.967526000 +0200 +@@ -34,8 +34,10 @@ + return NULL; + + id = volume_id_open_fd(fd); +- if (!id) ++ if (!id) { ++ close(fd); + return NULL; ++ } + + /* TODO: use blkdev_get_size() */ + if (ioctl(fd, BLKGETSIZE64, &size) != 0) +@@ -61,6 +63,7 @@ + } + + volume_id_close(id); ++ close(fd); + return value; + } + diff --git a/util-linux-2.13-mount_create_mtab.patch b/util-linux-2.13-mount_create_mtab.patch new file mode 100644 index 0000000..4d26d69 --- /dev/null +++ b/util-linux-2.13-mount_create_mtab.patch @@ -0,0 +1,13 @@ +Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/mount.c ++++ util-linux-ng-2.13rc2+git20070725/mount/mount.c +@@ -546,7 +546,7 @@ create_mtab (void) { + char *extra_opts; + parse_opts (fstab->m.mnt_opts, &flags, &extra_opts); + mnt.mnt_dir = "/"; +- mnt.mnt_fsname = canonicalize (fstab->m.mnt_fsname); ++ mnt.mnt_fsname = fsprobe_get_devname(fstab->m.mnt_fsname); + mnt.mnt_type = fstab->m.mnt_type; + mnt.mnt_opts = fix_opts_string (flags, extra_opts, NULL); + mnt.mnt_freq = mnt.mnt_passno = 0; diff --git a/util-linux-2.13-mount_fd_leak.patch b/util-linux-2.13-mount_fd_leak.patch new file mode 100644 index 0000000..d88ec05 --- /dev/null +++ b/util-linux-2.13-mount_fd_leak.patch @@ -0,0 +1,12 @@ +Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.c ++++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c +@@ -325,6 +325,7 @@ set_loop(const char *device, const char + } + if ((fd = open(device, mode)) < 0) { + perror (device); ++ close(ffd); + return 1; + } + *loopro = (mode == O_RDONLY); diff --git a/util-linux-2.13-schedutils_error_handling.patch b/util-linux-2.13-schedutils_error_handling.patch new file mode 100644 index 0000000..2bd26b2 --- /dev/null +++ b/util-linux-2.13-schedutils_error_handling.patch @@ -0,0 +1,55 @@ +Original patch from Bernhard Voelker. + +Index: util-linux-ng-2.13rc2+git20070725/schedutils/ionice.c +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/schedutils/ionice.c ++++ util-linux-ng-2.13rc2+git20070725/schedutils/ionice.c +@@ -107,7 +107,7 @@ int main(int argc, char *argv[]) + case 'h': + default: + usage(); +- exit(0); ++ exit(EXIT_SUCCESS); + } + } + +@@ -125,7 +125,7 @@ int main(int argc, char *argv[]) + break; + default: + printf("bad prio class %d\n", ioprio_class); +- return 1; ++ exit(EXIT_FAILURE); + } + + if (!set) { +@@ -134,9 +134,10 @@ int main(int argc, char *argv[]) + + ioprio = ioprio_get(IOPRIO_WHO_PROCESS, pid); + +- if (ioprio == -1) ++ if (ioprio == -1) { + perror("ioprio_get"); +- else { ++ exit(EXIT_FAILURE); ++ } else { + ioprio_class = ioprio >> IOPRIO_CLASS_SHIFT; + if (ioprio_class != IOPRIO_CLASS_IDLE) { + ioprio = ioprio & 0xff; +@@ -147,11 +148,15 @@ int main(int argc, char *argv[]) + } else { + if (ioprio_set(IOPRIO_WHO_PROCESS, pid, ioprio | ioprio_class << IOPRIO_CLASS_SHIFT) == -1) { + perror("ioprio_set"); +- return 1; ++ exit(EXIT_FAILURE); + } + +- if (argv[optind]) ++ if (argv[optind]) { + execvp(argv[optind], &argv[optind]); ++ /* execvp should never return */ ++ perror("execvp"); ++ exit(EXIT_FAILURE); ++ } + } + + return 0; diff --git a/util-linux-2.13-sys_utils_build_rdev_x86_64.patch b/util-linux-2.13-sys_utils_build_rdev_x86_64.patch new file mode 100644 index 0000000..6e9381d --- /dev/null +++ b/util-linux-2.13-sys_utils_build_rdev_x86_64.patch @@ -0,0 +1,16 @@ +Index: util-linux-ng-2.13-rc1/sys-utils/Makefile.am +=================================================================== +--- util-linux-ng-2.13-rc1.orig/sys-utils/Makefile.am ++++ util-linux-ng-2.13-rc1/sys-utils/Makefile.am +@@ -26,6 +26,11 @@ usrsbinexec_PROGRAMS += rdev + man_MANS += rdev.8 ramsize.8 rootflags.8 vidmode.8 + RDEV_LINKS = ramsize vidmode rootflags + endif ++if ARCH_86_64 ++usrsbinexec_PROGRAMS += rdev ++man_MANS += rdev.8 ramsize.8 rootflags.8 vidmode.8 ++RDEV_LINKS = ramsize vidmode rootflags ++endif + endif + + SETARCH_LINKS = linux32 linux64 diff --git a/util-linux-ng-2.13rc2+git20070725.tar.bz2 b/util-linux-ng-2.13rc2+git20070725.tar.bz2 new file mode 100644 index 0000000..bd0e5e3 --- /dev/null +++ b/util-linux-ng-2.13rc2+git20070725.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74640e1af0289d3be9397c8a7c8b62f147a3dbfad232fd4a7ec15a41e9ac1cf8 +size 1544622 diff --git a/util-linux-ng-CVE-2007-5191.diff b/util-linux-ng-CVE-2007-5191.diff new file mode 100644 index 0000000..a05de49 --- /dev/null +++ b/util-linux-ng-CVE-2007-5191.diff @@ -0,0 +1,50 @@ +commit ebbeb2c7ac1b00b6083905957837a271e80b187e +Author: Ludwig Nussel +Date: Thu Sep 20 14:57:20 2007 +0200 + + mount: doesn't drop privileges properly when calling helpers + + {,u}mount calls setuid() and setgid() in the wrong order and doesn't checking + the return value of set{u,g}id(() when running helpers like mount.nfs. + + Signed-off-by: Ludwig Nussel + Signed-off-by: Karel Zak + +Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/mount.c ++++ util-linux-ng-2.13rc2+git20070725/mount/mount.c +@@ -646,8 +646,12 @@ check_special_mountprog(const char *spec + char *oo, *mountargs[10]; + int i = 0; + +- setuid(getuid()); +- setgid(getgid()); ++ if(setgid(getgid()) < 0) ++ die(EX_FAIL, _("mount: cannot set group id: %s"), strerror(errno)); ++ ++ if(setuid(getuid()) < 0) ++ die(EX_FAIL, _("mount: cannot set user id: %s"), strerror(errno)); ++ + oo = fix_opts_string (flags, extra_opts, NULL); + mountargs[i++] = mountprog; /* 1 */ + mountargs[i++] = (char *) spec; /* 2 */ +Index: util-linux-ng-2.13rc2+git20070725/mount/umount.c +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/umount.c ++++ util-linux-ng-2.13rc2+git20070725/mount/umount.c +@@ -102,8 +102,12 @@ check_special_umountprog(const char *spe + char *umountargs[8]; + int i = 0; + +- setuid(getuid()); +- setgid(getgid()); ++ if(setgid(getgid()) < 0) ++ die(EX_FAIL, _("umount: cannot set group id: %s"), strerror(errno)); ++ ++ if(setuid(getuid()) < 0) ++ die(EX_FAIL, _("umount: cannot set user id: %s"), strerror(errno)); ++ + umountargs[i++] = umountprog; + umountargs[i++] = xstrdup(node); + if (nomtab) diff --git a/util-linux-ng-add-loop_fish2-compatability.diff b/util-linux-ng-add-loop_fish2-compatability.diff new file mode 100644 index 0000000..0fcdf4f --- /dev/null +++ b/util-linux-ng-add-loop_fish2-compatability.diff @@ -0,0 +1,38 @@ +Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.c ++++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c +@@ -338,13 +338,11 @@ set_loop(const char *device, const char + + if (encryption && *encryption) { + // a hint for suse users +- if(!strcmp(encryption, "twofishSL92")) { +- fprintf(stderr, _("twofishSL92 is not supported via cryptoloop, please use dm-crypt to access the volume\n")); +- close(fd); +- close(ffd); +- return 1; +- } +- if (digits_only(encryption)) { ++ if(!phash && (!strcmp(encryption, "twofishSL92") || (!strcmp(encryption, "twofish") && !keysz))) { ++ fprintf(stderr,"Switching to old S.u.S.E. loop_fish2 compatibility mode.\n"); ++ fprintf(stderr, _("Warning: This mode is deprecated, support for it will be removed in the future.\n")); ++ loopinfo64.lo_encrypt_type = 3; // LO_CRYPT_FISH ++ } else if (digits_only(encryption)) { + loopinfo64.lo_encrypt_type = atoi(encryption); + } else { + // check for something like twofish256 +@@ -405,6 +403,14 @@ set_loop(const char *device, const char + hfunc = sha512_hash_buffer; + if(loopinfo64.lo_encrypt_key_size == 24) hfunc = sha384_hash_buffer; + if(loopinfo64.lo_encrypt_key_size == 32) hfunc = sha512_hash_buffer; ++ } else if(loopinfo64.lo_encrypt_type == 3 ) { // LO_CRYPT_FISH ++ if(!strcmp(encryption, "twofishSL92")) { ++ hfunc = sha512_hash_buffer; ++ loopinfo64.lo_encrypt_key_size = 32; ++ } else { ++ hfunc = phash_rmd160; ++ loopinfo64.lo_encrypt_key_size = 20; ++ } + } else { + hfunc = phash_none; + loopinfo64.lo_encrypt_key_size = keysz?keysz>>3:LO_KEY_SIZE; diff --git a/util-linux-ng-fix-buffer-overflow.diff b/util-linux-ng-fix-buffer-overflow.diff new file mode 100644 index 0000000..a1b2492 --- /dev/null +++ b/util-linux-ng-fix-buffer-overflow.diff @@ -0,0 +1,55 @@ +From 0e7b44f7f89291d8ae75e4f099d8aa2bcca1cfc5 Mon Sep 17 00:00:00 2001 +From: Ludwig Nussel +Date: Tue, 9 Oct 2007 14:34:15 +0200 +Subject: [PATCH] fix buffer overflow + +Signed-off-by: Ludwig Nussel +--- + mount/lomount.c | 13 +++++++++---- + 1 files changed, 9 insertions(+), 4 deletions(-) + +Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c +=================================================================== +--- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.c ++++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c +@@ -25,8 +25,8 @@ + #include "xstrncpy.h" + #include "nls.h" + +-#ifndef MAX +-#define MAX(a,b) ((a>b)?(a):(b)) ++#ifndef MIN ++#define MIN(a,b) ((a>3; + } + ++ if((unsigned)loopinfo64.lo_encrypt_key_size > sizeof(loopinfo64.lo_encrypt_key)) { ++ fprintf(stderr, _("invalid key length\n")); ++ return 1; ++ } ++ + if (phash) { + if(!strcasecmp(phash, "sha512")) { + hfunc = sha512_hash_buffer; diff --git a/util-linux.changes b/util-linux.changes index 1389521..61fb472 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,85 +1,9 @@ ------------------------------------------------------------------- -Thu Feb 7 12:41:25 CET 2008 - mkoenig@suse.de +Fri Oct 12 14:52:21 CEST 2007 - lnussel@suse.de -- update to version 2.13.1: - mount: - * -L|-U segfault when label or uuid doesn't exist - * chain of symlinks to fstab causes use of pointer after free - * don't call canonicalize(SPEC) for cifs, smbfs and nfs - * improve error message when helper program not present - losetup: - * fix errno usage - mkswap: - * possible to crash with SELinux relabeling support - sfdisk: - * allow partitioning drives of over 2^31 sectors - hwclock: - * check for ENODEV -- mount: fix problem with device canonicalization when using - persistent name in fstab but call mount with real bd name -- patches merged: - util-linux-2.13-mount_fd_leak.patch - -------------------------------------------------------------------- -Tue Dec 18 15:55:19 CET 2007 - mkoenig@suse.de - -- add temporary workaround for broken RTC update interrupts - [#338419] - -------------------------------------------------------------------- -Mon Dec 3 11:03:57 CET 2007 - ro@suse.de - -- remove "arch", in coreutils now - -------------------------------------------------------------------- -Thu Nov 29 17:51:17 CET 2007 - lnussel@suse.de - -- update crypto patch - * fix mount buffer overflow when reading the passphrase (#332148) - * add loop_fish2 compatability code to losetup/mount again (#332095) - * change default hash size for 128bit keys to sha256 again - - -------------------------------------------------------------------- -Wed Nov 21 13:43:31 CET 2007 - mkoenig@suse.de - -- update to git20071121: - add sector size check for mkfs.minix [#308256] - fix canonicalization for cifs [#338375] -- provide Short-Description for raw init script -- add rpmlintrc - -------------------------------------------------------------------- -Tue Nov 20 17:49:35 CET 2007 - mkoenig@suse.de - -- fix raw path in init script - -------------------------------------------------------------------- -Tue Nov 6 16:11:02 CET 2007 - mkoenig@suse.de - -- update to 2.13.0.1+git20071106 -- prevent loop mounting the same file twice [#240653] -- merged upstream: - util-linux-2.13-mount_helper_fix.patch - util-linux-2.13-hwclock_rtc_option.patch - -------------------------------------------------------------------- -Thu Oct 4 22:24:04 CEST 2007 - bg@suse.de - -- don't use parisc, parisc32 and parisc64. - -------------------------------------------------------------------- -Mon Oct 1 17:08:06 CEST 2007 - mkoenig@suse.de - -- update to version 2.13 - merged upstream: - util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch - util-linux-2.13-loop.patch - util-linux-2.13-mount_create_mtab.patch - util-linux-2.13-schedutils_error_handling.patch - util-linux-2.13-sys_utils_build_rdev_x86_64.patch -- fix hwclock --rtc option [#326106] -- fix setuid/setgid mixup and error checking [#327022] +- fix mount not checking return value of setuid (#327022, CVE-2007-5191) +- fix mount buffer overflow when reading the passphrase (#332148) +- add loop_fish2 compatability code to losetup/mount again (#332095) ------------------------------------------------------------------- Fri Sep 14 11:24:33 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 5e948dc..0951873 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # -# spec file for package util-linux (Version 2.13.1) +# spec file for package util-linux (Version 2.12r+2.13rc2+git20070725) # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -20,11 +20,11 @@ PreReq: %install_info_prereq permissions License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on -Version: 2.13.1 -Release: 1 +Version: 2.12r+2.13rc2+git20070725 +Release: 24.1 +%define upver 2.13rc2+git20070725 Summary: A collection of basic system utilities -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 -Source1: util-linux-2.13-rpmlintrc +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 Source2: nologin.c Source3: nologin.8 Source4: raw.init @@ -46,30 +46,39 @@ Source28: mkzimage_cmdline.8 Source29: mkzimage_cmdline.c Source30: README.largedisk ## -## util-linux patches +## util-linux ## +# # add hostid Patch1: util-linux-2.12-misc_utils_hostid.patch # 104405 - mount -a doesn't work with hotpluggable devices Patch2: util-linux-mount_opt_nofail.patch +# 176582 - If the user doesn't specify -t mount.fstype will never be called +#TODO: check alternative upstream fix +#Patch96: util-linux-2.12r-mount_external_prog_on_guess.patch # 160822 - fix for 153657 Patch3: util-linux-2.12r-fdisk_cyl.patch +# 238687 - let mkfs tools open block devices with O_EXCL +Patch4: util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch # 241372 - remove legacy warnings from fdisk -Patch4: util-linux-2.12r-fdisk_remove_bogus_warnings.patch -# 304861 - support password hashing and key length -Patch6: util-linux-2.13-fdisk_cfdisk_ncursesw.patch -# 338419 -Patch7: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch -# in upstream git, but not yet released -Patch8: util-linux-2.13.1-canonicalize_loopfile_name.patch -Patch9: util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch -Patch10: util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch -Patch11: util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch -# -Patch12: util-linux-2.13.1-getfs_fix.patch +Patch5: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # 254437 - swapon should automatically reset the suspend signature -Patch13: util-linux-ng-2.13-swapon-swsuspend.patch -Patch20: util-linux-mount_losetup_crypto.patch +# TODO: Needs to be ported to new version +Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch +# suse48633 - util-linux on x86_64 does not contain "rdev" and "vidmode" +Patch6: util-linux-2.13-sys_utils_build_rdev_x86_64.patch +# 297172 - mount does not free loop devices if it fails +Patch7: util-linux-2.13-loop.patch +Patch8: util-linux-2.13-mount_create_mtab.patch +Patch9: util-linux-2.13-schedutils_error_handling.patch +# 304861 - support password hashing and key length +Patch10: cryptsetup-2.13-crypto.diff +Patch11: util-linux-2.13-mount_fd_leak.patch +Patch12: util-linux-2.13-fdisk_cfdisk_ncursesw.patch +# security fix +Patch13: util-linux-ng-CVE-2007-5191.diff +Patch14: util-linux-ng-fix-buffer-overflow.diff +Patch15: util-linux-ng-add-loop_fish2-compatability.diff ## ## ## adjtimex @@ -103,11 +112,13 @@ Authors: Karel Zak %prep -%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%version +%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%upver %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 +#%patch38 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 @@ -116,8 +127,8 @@ Authors: %patch11 -p1 %patch12 -p1 %patch13 -p1 -%patch20 -p1 -#%patch38 -p1 +%patch14 -p1 +%patch15 -p1 # cd adjtimex-* %patch50 -p1 @@ -164,6 +175,7 @@ CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE " INSTALL_PROGRAM='$(INSTALL)' \ --infodir=%{_infodir} \ %{_target_cpu}-suse-linux make +make check cd .. # klogconsole build cd klogconsole @@ -192,16 +204,13 @@ CFLAGS=-DCONFIG_SMP --enable-raw \ --enable-rdev \ --enable-write \ + --enable-arch \ --disable-use-tty-group \ CFLAGS="$CFLAGS $RPM_OPT_FLAGS" make gcc $RPM_OPT_FLAGS -o nologin nologin.c gcc $RPM_OPT_FLAGS -o mkzimage_cmdline %{S:29} -%check -cd ../time-%{time_ver} -make check - %install mkdir -p "$RPM_BUILD_ROOT"{/etc/init.d,%{_mandir}/man{1,8},\ /bin,/sbin,/usr/bin,/usr/sbin,%{_infodir}} @@ -280,16 +289,7 @@ rm -f $RPM_BUILD_ROOT/usr/bin/ppc rm -f $RPM_BUILD_ROOT/usr/bin/ppc32 rm -f $RPM_BUILD_ROOT/usr/bin/ppc64 rm -f $RPM_BUILD_ROOT/usr/bin/ia64 -rm -f $RPM_BUILD_ROOT/usr/bin/parisc -rm -f $RPM_BUILD_ROOT/usr/bin/parisc32 -rm -f $RPM_BUILD_ROOT/usr/bin/parisc64 rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/setarch.8 -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/i386.8 -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/x86_64.8 -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/linux{32,64}.8 -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/ia64.8 -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/s390{,x}.8 -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/ppc{,32,64}.8 # arch dependent %ifarch s390 s390x rm -f $RPM_BUILD_ROOT/etc/fdprm @@ -358,6 +358,7 @@ fi %config(noreplace) %attr(644,root,root) /etc/raw %config(noreplace) /etc/filesystems /usr/sbin/rcraw +/bin/arch /bin/dmesg /bin/more /bin/mount @@ -434,6 +435,7 @@ fi %{_infodir}/freeramdisk.info*.gz %{_infodir}/time.info*.gz %{_infodir}/which.info*.gz +%{_mandir}/man1/arch.1.gz %{_mandir}/man1/cal.1.gz %{_mandir}/man1/chrt.1.gz %{_mandir}/man1/col.1.gz @@ -563,85 +565,33 @@ fi #/usr/bin/i386 #/usr/bin/ia64 #%endif - %changelog -* Thu Feb 07 2008 mkoenig@suse.de -- update to version 2.13.1: - mount: - * -L|-U segfault when label or uuid doesn't exist - * chain of symlinks to fstab causes use of pointer after free - * don't call canonicalize(SPEC) for cifs, smbfs and nfs - * improve error message when helper program not present - losetup: - * fix errno usage - mkswap: - * possible to crash with SELinux relabeling support - sfdisk: - * allow partitioning drives of over 2^31 sectors - hwclock: - * check for ENODEV -- mount: fix problem with device canonicalization when using - persistent name in fstab but call mount with real bd name -- patches merged: - util-linux-2.13-mount_fd_leak.patch -* Tue Dec 18 2007 mkoenig@suse.de -- add temporary workaround for broken RTC update interrupts - [#338419] -* Mon Dec 03 2007 ro@suse.de -- remove "arch", in coreutils now -* Thu Nov 29 2007 lnussel@suse.de -- update crypto patch - * fix mount buffer overflow when reading the passphrase (#332148) - * add loop_fish2 compatability code to losetup/mount again (#332095) - * change default hash size for 128bit keys to sha256 again -* Wed Nov 21 2007 mkoenig@suse.de -- update to git20071121: - add sector size check for mkfs.minix [#308256] - fix canonicalization for cifs [#338375] -- provide Short-Description for raw init script -- add rpmlintrc -* Tue Nov 20 2007 mkoenig@suse.de -- fix raw path in init script -* Tue Nov 06 2007 mkoenig@suse.de -- update to 2.13.0.1+git20071106 -- prevent loop mounting the same file twice [#240653] -- merged upstream: - util-linux-2.13-mount_helper_fix.patch - util-linux-2.13-hwclock_rtc_option.patch -* Thu Oct 04 2007 bg@suse.de -- don't use parisc, parisc32 and parisc64. -* Mon Oct 01 2007 mkoenig@suse.de -- update to version 2.13 - merged upstream: - util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch - util-linux-2.13-loop.patch - util-linux-2.13-mount_create_mtab.patch - util-linux-2.13-schedutils_error_handling.patch - util-linux-2.13-sys_utils_build_rdev_x86_64.patch -- fix hwclock --rtc option [#326106] -- fix setuid/setgid mixup and error checking [#327022] -* Fri Sep 14 2007 mkoenig@suse.de +* Fri Oct 12 2007 - lnussel@suse.de +- fix mount not checking return value of setuid (#327022, CVE-2007-5191) +- fix mount buffer overflow when reading the passphrase (#332148) +- add loop_fish2 compatability code to losetup/mount again (#332095) +* Fri Sep 14 2007 - mkoenig@suse.de - link cfdisk against libncursesw instead libncurses to fix broken utf-8 characters [#307353] -* Wed Aug 29 2007 mkoenig@suse.de +* Wed Aug 29 2007 - mkoenig@suse.de - fix fd leaks in previous patch -* Tue Aug 28 2007 lnussel@suse.de +* Tue Aug 28 2007 - lnussel@suse.de - add support for specifying the key length and password hash algorithm [#304861] -* Fri Aug 24 2007 mkoenig@suse.de +* Fri Aug 24 2007 - mkoenig@suse.de - avoid duplicates of root fs if defined with LABEL in fstab [#297959] - fix ionice error handling [#301675] -* Thu Aug 16 2007 ssommer@suse.de +* Thu Aug 16 2007 - ssommer@suse.de - free loop devices when mount fails [#297172] -* Wed Jul 25 2007 mkoenig@suse.de +* Wed Jul 25 2007 - mkoenig@suse.de - update to git20070725 - removed patches (merged upstream): util-linux-2.12r-mount_mount.8_xfs_update.patch util-linux-2.12r-sys_utils_readprofile_mapfile.patch util-linux-2.12r-disk_utils_mkswap_fix.patch util-linux-2.13-schedutils_ionice_idle.patch -* Tue Jul 17 2007 mkoenig@suse.de +* Tue Jul 17 2007 - mkoenig@suse.de - updated to version 2.13-rc2: * add wakertc - cleanup ionice usage [#270251] @@ -655,7 +605,7 @@ fi util-linux-2.12a-mount_mountpointwithcolon.patch util-linux-2.12a-mount_procswapcheck.patch util-linux-2.12q-mount_umount2_not_static.patch -* Fri Jul 13 2007 mkoenig@suse.de +* Fri Jul 13 2007 - mkoenig@suse.de - replace hotplug with nofail option and fix it to not use syscall reserved values. - removed patch @@ -663,16 +613,16 @@ fi it is intentional that suid hwclock capabilities are limited - removed patch (fixed upstream) util-linux-2.12q-mount_--move.patch -* Mon Jul 09 2007 mkoenig@suse.de +* Mon Jul 09 2007 - mkoenig@suse.de - add libuuid-devel to BuildRequires to let mkswap use UUIDs -* Thu Jul 05 2007 mkoenig@suse.de +* Thu Jul 05 2007 - mkoenig@suse.de - use %%config(noreplace) for /etc/filesystems - Keep rdev stuff for x86_64 util-linux-2.13-sys_utils_build_rdev_x86_64.patch - removed patches (merged upstream) util-linux-2.12r-misc_utils_cal_formatting.patch util-linux-2.12q-sys_utils_ionice.patch -* Thu Jul 05 2007 mkoenig@suse.de +* Thu Jul 05 2007 - mkoenig@suse.de - update to 2.13-rc1: * mount fixes * agetty: add 'O' escape code to display domain name @@ -686,23 +636,23 @@ fi util-linux-2.13-misc_utils_cal_ncurses.patch util-linux-2.13-mount_volumeid_label.patch - use %%find_lang -* Thu Jun 21 2007 mkoenig@suse.de +* Thu Jun 21 2007 - mkoenig@suse.de - use encoded label names with volume_id [#232929] util-linux-2.13-mount_volumeid_label.patch -* Thu Jun 14 2007 mkoenig@suse.de +* Thu Jun 14 2007 - mkoenig@suse.de - mkzimage_cmdline: activate commandline if used with -s [#279935] -* Wed Jun 13 2007 mkoenig@suse.de +* Wed Jun 13 2007 - mkoenig@suse.de - schedutils: let chrt accept pid 0 for current process and fix some documentation bugs [#266879] util-linux-2.13-schedutils_chrt.patch -* Wed Jun 06 2007 mkoenig@suse.de +* Wed Jun 06 2007 - mkoenig@suse.de - update to git20070530 - removed patches util-linux-2.13-mount_volume_id.patch util-linux-2.12r-mount_by_uuid.patch util-linux-2.13-build_gnu_source.patch - fix build with ncurses -* Tue Jun 05 2007 mkoenig@suse.de +* Tue Jun 05 2007 - mkoenig@suse.de - update to git20070509 mount: NFS code removed (use mount.nfs{,4} from nfs-utils) - remove sm-notify (nfs-utils) @@ -719,16 +669,16 @@ fi util-linux-2.13-mount_nfs_timeo.patch util-linux-mount_nfs.8.patch util-linux-mount_warn_nfsudp.patch -* Tue Jun 05 2007 pth@suse.de +* Tue Jun 05 2007 - pth@suse.de - Update to which-2.16, mainly because regenerating configure with newer autotools works. - Fix the patch for AC_CHECK_STATICLIB - Our distribution doesn't install libiberty.a, so pass --disable-iberty to configure of which to not use a libiberty from somewhere else. -* Mon Jun 04 2007 pth@suse.de +* Mon Jun 04 2007 - pth@suse.de - Make configure of which search for static libs in lib64 subdirs. -* Mon Apr 23 2007 mkoenig@suse.de +* Mon Apr 23 2007 - mkoenig@suse.de - update to git20070412 - remove chkdupexe and scriptreplay to get rid of the perl dependency [#265757] @@ -737,10 +687,10 @@ fi - merged patches: util-linux-2.13-misc_utils_add_man_scriptreplay.patch util-linux-2.13-tests_missing_include.patch -* Mon Apr 16 2007 mkoenig@suse.de +* Mon Apr 16 2007 - mkoenig@suse.de - fix initialization of offset in util-linux-2.12r-mount_racy_loop.patch [#264225] -* Tue Apr 10 2007 mkoenig@suse.de +* Tue Apr 10 2007 - mkoenig@suse.de - update to version git20070330 of new forked development tree - removed Suse crypto patches for losetup [FATE#302001] - removed binaries: @@ -780,205 +730,205 @@ fi detect also x86_64 as INTEL architecture - rename patches to identify them clearly by subsystem - schedutils now part of util-linux itself -* Wed Apr 04 2007 mkoenig@suse.de +* Wed Apr 04 2007 - mkoenig@suse.de - add Supplements line [FATE#301966] -* Mon Mar 26 2007 rguenther@suse.de +* Mon Mar 26 2007 - rguenther@suse.de - add ncurses-devel and zlib-devel BuildRequires -* Thu Mar 15 2007 mkoenig@suse.de +* Thu Mar 15 2007 - mkoenig@suse.de - mount: Let swapon automatically reinitialize a suspended swap partition [#254437] -* Fri Mar 09 2007 mkoenig@suse.de +* Fri Mar 09 2007 - mkoenig@suse.de - mount: fix mtablock patch to avoid mtab corruption [#226783] -* Thu Mar 08 2007 mkoenig@suse.de +* Thu Mar 08 2007 - mkoenig@suse.de - partx: fix warning for too long literal -* Wed Mar 07 2007 rguenther@suse.de +* Wed Mar 07 2007 - rguenther@suse.de - fix changelog entry order -* Tue Feb 27 2007 mkoenig@suse.de +* Tue Feb 27 2007 - mkoenig@suse.de - fix missing return code in util-linux-2.12r-losetup_password.patch - mount: fix race condition in mount -o loop [#242750] -* Mon Feb 12 2007 mkoenig@suse.de +* Mon Feb 12 2007 - mkoenig@suse.de - remove legacy warnings from fdisk [#241372] -* Fri Feb 02 2007 mkoenig@suse.de +* Fri Feb 02 2007 - mkoenig@suse.de - do not use O_EXCL for mkfs.cramfs [#241466] -* Wed Jan 31 2007 mkoenig@suse.de +* Wed Jan 31 2007 - mkoenig@suse.de - let mkfs tools open with O_EXCL [#238687] -* Tue Dec 12 2006 mkoenig@suse.de +* Tue Dec 12 2006 - mkoenig@suse.de - provide different return codes for losetup with encryption for empty and too short passwords. [#197493] -* Tue Dec 05 2006 mkoenig@suse.de +* Tue Dec 05 2006 - mkoenig@suse.de - default swap to V1 in any case [#205956] patch: util-linux-2.12r-mkswap_fix.patch - do not append addr option with each nfs remount [#130625] patch: util-linux-2.12r-nfs_remount_options.patch - add README.largedisk about fdisk partition size constraints [#153657] -* Tue Nov 07 2006 mkoenig@suse.de +* Tue Nov 07 2006 - mkoenig@suse.de - enable partx [#214992] -* Tue Oct 10 2006 mkoenig@suse.de +* Tue Oct 10 2006 - mkoenig@suse.de - Round up partition end LBA to a cylinder boundary during add_partition() [#174892] - Fix readprofile on ppc64 [#179122] - Fix cal formatting bug [#203469] -* Mon Oct 09 2006 mkoenig@suse.de +* Mon Oct 09 2006 - mkoenig@suse.de - Fix llseek issues. - swapon.c: Do not use PAGE_SIZE macro. -* Mon Aug 21 2006 mkoenig@suse.de +* Mon Aug 21 2006 - mkoenig@suse.de - Added sysfs to list of filesystems not to unmount with umount -a, resolves #190385 -* Mon Jun 12 2006 kay.sievers@suse.de +* Mon Jun 12 2006 - kay.sievers@suse.de - use libvolume_id from provided as a rpm by udev 094 -* Thu May 18 2006 jeffm@suse.com +* Wed May 17 2006 - jeffm@suse.com - Fixed support for calling external programs w/o -t , it would add mtab twice [#176582] -* Mon Apr 24 2006 hvogel@suse.de +* Mon Apr 24 2006 - hvogel@suse.de - document xfs dmapi mount options better [#158955] -* Fri Apr 21 2006 olh@suse.de +* Fri Apr 21 2006 - olh@suse.de - add mkzimage_cmdline to edit CHRP zImage kernel cmdline (168313) -* Tue Apr 18 2006 hvogel@suse.de +* Tue Apr 18 2006 - hvogel@suse.de - fix number of supported raw devices [#165570] -* Wed Mar 29 2006 olh@suse.de +* Wed Mar 29 2006 - olh@suse.de - clearify comments about mac disk label handling in fdisk -* Tue Mar 28 2006 hvogel@suse.de +* Tue Mar 28 2006 - hvogel@suse.de - more fixes for the fdiskwrap patch [#160822] -* Tue Mar 21 2006 okir@suse.de +* Tue Mar 21 2006 - okir@suse.de - Update nfs(5) manpage to document security flavors [#159368] -* Mon Mar 20 2006 hvogel@suse.de +* Mon Mar 20 2006 - hvogel@suse.de - fix numbers of supported raw devices to match the kernel [#158203] - make NFSv3 client support RPCSEC_GSS [#158401] - fix that if the user doesn't specify -t mount.fstype will never be called. [#155147] -* Fri Mar 10 2006 hvogel@suse.de +* Fri Mar 10 2006 - hvogel@suse.de - Fix init.d/raw script to parse device names with , in them correctly [#155653] -* Thu Mar 09 2006 hare@suse.de +* Thu Mar 09 2006 - hare@suse.de - Fix potential security hole in libvolume_id (#133256) -* Mon Mar 06 2006 hvogel@suse.de +* Mon Mar 06 2006 - hvogel@suse.de - patch fdiskmaclabel.h too -* Thu Mar 02 2006 hvogel@suse.de +* Thu Mar 02 2006 - hvogel@suse.de - axboe made fdisk not wrap at 2TB [#153657] -* Fri Feb 17 2006 lmuelle@suse.de +* Fri Feb 17 2006 - lmuelle@suse.de - Use cifs instead of smbfs if the source starts with // and we do not set a different fs type. -* Sun Feb 12 2006 olh@suse.de +* Sun Feb 12 2006 - olh@suse.de - cosmetic fix for option_hotplug declaration fix unininitalized string for unknown filesystems (#148855) -* Fri Feb 10 2006 hvogel@suse.de +* Fri Feb 10 2006 - hvogel@suse.de - mount should not put / in the mtab twice if mount -f / is called [#148409] - fix hostid printf [#149163] -* Wed Feb 01 2006 olh@suse.de +* Wed Feb 01 2006 - olh@suse.de - dont invent our own MS_FLAGS (#147132) -* Wed Feb 01 2006 ro@suse.de +* Wed Feb 01 2006 - ro@suse.de - fix typo in previous change, binary negation is "~" -* Fri Jan 27 2006 sscheler@suse.de +* Fri Jan 27 2006 - sscheler@suse.de - fixed mount hotplug option (#143352). now we don't send the MS_HOTPLUG flag to the kernel any longer, because the kernel doesn't know this option (EINVAL) and actually doesn't need to know about it. -* Fri Jan 27 2006 olh@suse.de +* Fri Jan 27 2006 - olh@suse.de - remove clock symlink, hwclock exists since 7 years -* Fri Jan 27 2006 olh@suse.de +* Fri Jan 27 2006 - olh@suse.de - lsprop and nvsetenv moved to powerpc-utils [#144758] -* Thu Jan 26 2006 hvogel@suse.de +* Thu Jan 26 2006 - hvogel@suse.de - Make nfsboot world readable [#145418] -* Wed Jan 25 2006 mls@suse.de +* Wed Jan 25 2006 - mls@suse.de - converted neededforbuild to BuildRequires -* Tue Jan 24 2006 mmj@suse.de +* Tue Jan 24 2006 - mmj@suse.de - Remove faulty nfs fallback code [#139019] -* Mon Jan 16 2006 mmj@suse.de +* Mon Jan 16 2006 - mmj@suse.de - Add patch for nsetenv to fix short reads/short writes [#142546] -* Wed Jan 11 2006 mmj@suse.de +* Wed Jan 11 2006 - mmj@suse.de - Update sm-notify [#141542] -* Wed Jan 04 2006 mmj@suse.de +* Wed Jan 04 2006 - mmj@suse.de - Update to 2.12r including since 2.12q: o cfdisk: fix a segfault with ReiserFS partitions o umount: disallow -r option for non-root users -* Tue Nov 22 2005 mmj@suse.de +* Tue Nov 22 2005 - mmj@suse.de - install proper renice manpage [#132470] -* Tue Nov 15 2005 uli@suse.de +* Tue Nov 15 2005 - uli@suse.de - umount2 is not static (only fails on ARM, surprisingly) - added ARM ionice syscalls -* Fri Nov 11 2005 hare@suse.de +* Fri Nov 11 2005 - hare@suse.de - Fix reverse-mapping of by-UUID and by-LABEL mounts. -* Thu Nov 10 2005 hare@suse.de +* Thu Nov 10 2005 - hare@suse.de - Fix a mishandling of by-UUID mounts. - Use libvolume_id from udev. -* Sat Oct 22 2005 mmj@suse.de +* Sat Oct 22 2005 - mmj@suse.de - Increase lsprop.c max property size to 4k [#128155] -* Mon Oct 10 2005 mmj@suse.de +* Mon Oct 10 2005 - mmj@suse.de - Add -fno-strict-aliasing to nfsmount_xdr.c -* Mon Oct 03 2005 mmj@suse.de +* Mon Oct 03 2005 - mmj@suse.de - Teach the mount manual page about nodiratime [#118987] -* Thu Sep 29 2005 mmj@suse.de +* Thu Sep 29 2005 - mmj@suse.de - Patch from jakub007@go2.pl to make mount --move update /etc/mtab correctly [#115129] -* Tue Sep 13 2005 mmj@suse.de +* Tue Sep 13 2005 - mmj@suse.de - Only allow root to pass -r to umount [#116741] -* Mon Sep 05 2005 mmj@suse.de +* Mon Sep 05 2005 - mmj@suse.de - MAC -> Mac [#104081] -* Fri Sep 02 2005 mmj@suse.de +* Fri Sep 02 2005 - mmj@suse.de - Don't package manual executable [#114849] -* Thu Sep 01 2005 mmj@suse.de +* Thu Sep 01 2005 - mmj@suse.de - Add patch for device-mapper mount by label support [#75966] -* Thu Sep 01 2005 ro@suse.de +* Thu Sep 01 2005 - ro@suse.de - provide and obsolete schedutils -* Tue Aug 23 2005 hvogel@suse.de +* Tue Aug 23 2005 - hvogel@suse.de - update ionice patch by axboe so that ionice will complain about missing sys_ioprio_set support, but it will still execute the process. -* Mon Aug 22 2005 hvogel@suse.de +* Mon Aug 22 2005 - hvogel@suse.de - Fix rpm verify output [#105807] (ghost entry for /var/lib/nfs/state) -* Mon Aug 22 2005 schwab@suse.de +* Mon Aug 22 2005 - schwab@suse.de - Fix stupid buffer overflow bug in cfdisk [#66020]. -* Wed Aug 17 2005 hare@suse.de +* Wed Aug 17 2005 - hare@suse.de - Add option 'hotplug' to mount (#104405) -* Mon Aug 15 2005 schwab@suse.de +* Mon Aug 15 2005 - schwab@suse.de - Always build with RPM_OPT_FLAGS. -* Thu Aug 11 2005 mmj@suse.de +* Thu Aug 11 2005 - mmj@suse.de - Patch from Patrick Kirsch to make fdisk detect MAC-fs [#104081] -* Wed Aug 03 2005 mmj@suse.de +* Wed Aug 03 2005 - mmj@suse.de - Merge schedutils to here (it's happened upstream already) -* Tue Aug 02 2005 mmj@suse.de +* Tue Aug 02 2005 - mmj@suse.de - Support for s390 and s390x -* Mon Aug 01 2005 mmj@suse.de +* Mon Aug 01 2005 - mmj@suse.de - It's not __ppc_ and __ppc64__ but __powerpc__ and __powerpc64__ -* Mon Aug 01 2005 mmj@suse.de +* Mon Aug 01 2005 - mmj@suse.de - Add ionice binary from Jens Axboe -* Wed Jun 29 2005 mmj@suse.de +* Wed Jun 29 2005 - mmj@suse.de - Document load and clearly issues about NFS over UDP [#80263] - Don't compile with -fsigned-char [#93886] -* Tue May 31 2005 okir@suse.de +* Tue May 31 2005 - okir@suse.de - Added NFSv4 support -* Mon May 09 2005 hvogel@suse.de +* Mon May 09 2005 - hvogel@suse.de - move hashalot and cryptsetup tools to util-linux-crypto -* Tue Apr 12 2005 mmj@suse.de +* Tue Apr 12 2005 - mmj@suse.de - bump TCP timeo to 600 [#76198] -* Tue Mar 29 2005 mmj@suse.de +* Tue Mar 29 2005 - mmj@suse.de - Add awareness of twofishSL92 [#74359] - Update hashalot to version 0.3 -* Mon Mar 14 2005 okir@suse.de +* Mon Mar 14 2005 - okir@suse.de - Changed sm-notify to recognize host names as well as addresses. -* Thu Mar 10 2005 mmj@suse.de +* Thu Mar 10 2005 - mmj@suse.de - Don't strip anything explicitly - Don't compile with -fno-strict-aliasing [#66020] -* Fri Feb 04 2005 schwab@suse.de +* Fri Feb 04 2005 - schwab@suse.de - Fix stupid programmer. -* Mon Jan 24 2005 meissner@suse.de +* Mon Jan 24 2005 - meissner@suse.de - implicit strcmp / strerror in setctsid fixed. - 0 -> NULL in an execl -* Fri Jan 21 2005 mmj@suse.de +* Fri Jan 21 2005 - mmj@suse.de - Sleep after inserting the raw module to make sure it's ready [#49807] - Update to 2.12q including since 2.12p: o New upstream maintainer - Adrian Bunk o sfdisk: add -G option o Updated translations -* Tue Jan 18 2005 okir@suse.de +* Tue Jan 18 2005 - okir@suse.de - Updated sm-notify; try not to stall bootup my moving the NSM state update after we've backgrounded (#49072). -* Mon Jan 10 2005 mmj@suse.de +* Mon Jan 10 2005 - mmj@suse.de - Update adjtimex to 1.20 - Update to util-linux-2.12p including since 2.12i: o cfdisk: fix number of new partition when partitions not in disk order @@ -1016,15 +966,15 @@ fi o umount: use special umount program if it exists o new flock binary o New messages -* Tue Nov 30 2004 mmj@suse.de +* Tue Nov 30 2004 - mmj@suse.de - Install ramsize, rdev, rootflags and vidmode on x86-64 [#48633] -* Fri Nov 12 2004 schwab@suse.de +* Fri Nov 12 2004 - schwab@suse.de - Don't install *fdisk on ia64. -* Fri Nov 12 2004 ro@suse.de +* Fri Nov 12 2004 - ro@suse.de - correct permissions handling for wall and write -* Tue Nov 09 2004 mmj@suse.de +* Tue Nov 09 2004 - mmj@suse.de - Fix segfault with mount -l [#48029] -* Fri Nov 05 2004 mmj@suse.de +* Fri Nov 05 2004 - mmj@suse.de - Update to util-linux-2.12i including: o MCONFIG: fix build conditions o chfn, chsh: add error checking @@ -1036,7 +986,7 @@ fi o sfdisk: correct typo in __attribute__used nonsense o sfdisk: use PACKED on __arm__ o sfdisk: fix warning printout -* Thu Nov 04 2004 mmj@suse.de +* Thu Nov 04 2004 - mmj@suse.de - Update to util-linux-2.12h including: o cfdisk: avoid crash if no partition table o elvtune: tell user that this only works on 2.4 kernels @@ -1051,19 +1001,19 @@ fi o mount: support jfs mount-by-label, improve reiserfs support o sfdisk: remove strange "ends in a digit" heuristic o *fdisk: use common disksize() routine -* Tue Oct 19 2004 mmj@suse.de +* Tue Oct 19 2004 - mmj@suse.de - Add patch from SGI for fdisk label [#47368] -* Tue Sep 28 2004 mmj@suse.de +* Tue Sep 28 2004 - mmj@suse.de - And another one [#46201] -* Thu Sep 16 2004 mmj@suse.de +* Wed Sep 15 2004 - mmj@suse.de - Add patch from Andries to fix cfdisk [#44996] -* Tue Sep 07 2004 mmj@suse.de +* Tue Sep 07 2004 - mmj@suse.de - Update to util-linux-2.12c including: o mount.8: added recent ext2 mount options o mount: support jfs mount-by-label, improve reiserfs support o sfdisk: remove strange "ends in a digit" heuristic o *fdisk: use common disksize() routine [#44678] -* Wed Aug 25 2004 mmj@suse.de +* Wed Aug 25 2004 - mmj@suse.de - Update to util-linux-2.12b including: o chsh: improved error message o dmesg: ask kernel proper buffer size @@ -1088,36 +1038,36 @@ fi Turkish, Ukrainian messages - Update the loop-AES patch, thanks to Sumit Bose - Change the minimum password length to 8 chars -* Tue Aug 24 2004 mmj@suse.de +* Tue Aug 24 2004 - mmj@suse.de - Fix signed/unsigned bug in lsprop [#44048] -* Wed Aug 18 2004 mmj@suse.de +* Wed Aug 18 2004 - mmj@suse.de - Readd patch that got lost to make fdisk -l work better with RAID controllers [#43485] -* Mon Aug 09 2004 mmj@suse.de +* Mon Aug 09 2004 - mmj@suse.de - Add an improved version of the dmesg bufsize patch. -* Tue Jun 22 2004 mmj@suse.de +* Tue Jun 22 2004 - mmj@suse.de - Add patch to try and guess a filesystem type before blindly assuming it's nfs because of the colon [#42097] -* Mon Jun 14 2004 agruen@suse.de +* Mon Jun 14 2004 - agruen@suse.de - Formatting error in mount.8 manual page. -* Wed Jun 09 2004 mmj@suse.de +* Wed Jun 09 2004 - mmj@suse.de - Add patch from Olaf Kirch to make protocol selection for mount independent of protocol selection for NFS, and picks what is available (preferring TCP over UDP) [#41735] -* Wed Jun 09 2004 mls@suse.de +* Wed Jun 09 2004 - mls@suse.de - add '-f' option to setctsid -* Thu May 27 2004 okir@suse.de +* Thu May 27 2004 - okir@suse.de - sm-notify now binds to a reserved port -* Sat May 15 2004 mmj@suse.de +* Sat May 15 2004 - mmj@suse.de - Add documentation about raw device handling [#39037] -* Mon May 10 2004 mmj@suse.de +* Mon May 10 2004 - mmj@suse.de - Make dmesg dump entire buffer. Patch from Andries/odabrunz [#39761] -* Thu May 06 2004 mmj@suse.de +* Thu May 06 2004 - mmj@suse.de - Also check if the device is the same when doing swapon. Could be the same block device with 2 different names [#39436] -* Wed May 05 2004 mmj@suse.de +* Wed May 05 2004 - mmj@suse.de - Do a /sbin/modprobe raw when invoking raw devices [#39037] -* Tue Apr 20 2004 mmj@suse.de +* Tue Apr 20 2004 - mmj@suse.de - Update to 2.12a including: o fdisk: fix for kernels 2.4.15-2.4.17 o fdisk: fix when all partitions are in use @@ -1131,67 +1081,67 @@ fi o setterm.1: clarification o sfdisk: fix check for is_ide_cdrom_or_tape o umount: skip proc, devfs, devpts on umount -a -* Mon Apr 19 2004 mmj@suse.de +* Mon Apr 19 2004 - mmj@suse.de - Add patch for unlimited raw devices [#39037] -* Thu Apr 15 2004 mmj@suse.de +* Thu Apr 15 2004 - mmj@suse.de - Make sm-notify be more quiet when nothing wrong, and log to sys- log when something is. -* Tue Apr 06 2004 mmj@suse.de +* Tue Apr 06 2004 - mmj@suse.de - Don't use startproc for sm-notify [#38481] -* Mon Apr 05 2004 mmj@suse.de +* Mon Apr 05 2004 - mmj@suse.de - Removing elvtune alltogether was a bit drastic, since it of course works fine with 2.4 kernels. So print a warning in case the BLKELVGET ioctl returns something indicating 2.6 kernels. -* Thu Apr 01 2004 mmj@suse.de +* Thu Apr 01 2004 - mmj@suse.de - Don't package elvtune anymore since it's obsolete now that io scheduler can be tuned in /sys/block/hdX/queue/iosched/* [#37869] -* Wed Mar 31 2004 mmj@suse.de +* Wed Mar 31 2004 - mmj@suse.de - Apply util-linux-2.12a fixes for hwclock and readprofile. The hwclock bit is a timout fix which hopefully fixes [#35877] - Move sm-notify to here from nfs-utils [#36737] -* Mon Mar 29 2004 mmj@suse.de +* Mon Mar 29 2004 - mmj@suse.de - Adjust warnings about Crypto-API -* Sun Mar 28 2004 mmj@suse.de +* Sun Mar 28 2004 - mmj@suse.de - Add patch to make script allways use the same LC_NUMERIC [#35476] -* Fri Mar 26 2004 od@suse.de +* Fri Mar 26 2004 - od@suse.de - Add setctsid by Werner Fink [#37177] -* Fri Mar 26 2004 mmj@suse.de +* Fri Mar 26 2004 - mmj@suse.de - Mount option "code" is now "codepage" so update /etc/fstab in postinstall [#36950] -* Fri Mar 26 2004 mmj@suse.de +* Fri Mar 26 2004 - mmj@suse.de - Remove false statement in nfs.5 about the linux kernel not supporting nfs over tcp [#37060] -* Wed Mar 17 2004 mmj@suse.de +* Wed Mar 17 2004 - mmj@suse.de - Use correct permissions for README.hashalot [#36303] -* Mon Mar 08 2004 mmj@suse.de +* Mon Mar 08 2004 - mmj@suse.de - Enable build of replay [#35434] -* Wed Feb 25 2004 mmj@suse.de +* Wed Feb 25 2004 - mmj@suse.de - Use loop-AES-v2.0f-util-linux-2.12.diff instead of losetup patch added earlier. Thanks Sumit Bose! -* Thu Feb 19 2004 mmj@suse.de +* Thu Feb 19 2004 - mmj@suse.de - Add cryptsetup script from Christophe Saout, for usage with the new dm-crypt. -* Mon Feb 16 2004 mmj@suse.de +* Mon Feb 16 2004 - mmj@suse.de - Add losetup patch and hashalot program from Ben Slusky -* Sun Feb 01 2004 kukuk@suse.de +* Sun Feb 01 2004 - kukuk@suse.de - Remove newgrp again (will use POSIX conform version) -* Fri Jan 16 2004 kukuk@suse.de +* Fri Jan 16 2004 - kukuk@suse.de - Add pam-devel to neededforbuild -* Mon Jan 12 2004 mmj@suse.de +* Mon Jan 12 2004 - mmj@suse.de - Adjust the nfs.5 manual page to reflect we're mounting nfs over tcp pr. default. - Collapse two similar patches 2 one. -* Fri Dec 19 2003 garloff@suse.de +* Fri Dec 19 2003 - garloff@suse.de - Fix by okir for previous patch. -* Fri Dec 19 2003 garloff@suse.de +* Fri Dec 19 2003 - garloff@suse.de - Add patch to fallback to UDP if TCP NFS mount fails. -* Tue Dec 02 2003 mmj@suse.de +* Tue Dec 02 2003 - mmj@suse.de - Make patch to guess if a CD is a CD-Extra [#30316] - Adjust patch that moves ext2/3 in front of vfat - Regenerate patches (filename still tells when they were added) -* Tue Nov 18 2003 mmj@suse.de +* Tue Nov 18 2003 - mmj@suse.de - Mount NFS over TCP pr. default [#33018] -* Thu Nov 13 2003 mmj@suse.de +* Thu Nov 13 2003 - mmj@suse.de - Update to util-linux-2.12 including: o losetup: -p option specifies fd for passphrase o fdisk: sgi layout fix @@ -1222,64 +1172,64 @@ fi o sfdisk.8: added an example of partitioning with logical partitions o sfdisk: only add a AA55 signature for DOS-type partition tables o tailf: new -* Tue Oct 21 2003 mmj@suse.de +* Tue Oct 21 2003 - mmj@suse.de - Correct permissions -* Tue Oct 21 2003 ja@suse.cz +* Tue Oct 21 2003 - ja@suse.cz - added support for cryptoloop in 2.6.x kernels. -* Wed Oct 15 2003 mmj@suse.de +* Wed Oct 15 2003 - mmj@suse.de - Don't build as root -* Mon Oct 13 2003 kukuk@suse.de +* Mon Oct 13 2003 - kukuk@suse.de - Enable newgrp -* Thu Oct 02 2003 kukuk@suse.de +* Thu Oct 02 2003 - kukuk@suse.de - Fix compiling with kernel 2.6.0-test6 header files -* Tue Aug 12 2003 mmj@suse.de +* Tue Aug 12 2003 - mmj@suse.de - Update to pmac-utils-2.1 sources and only include nvsetenv -* Tue Aug 12 2003 mmj@suse.de +* Tue Aug 12 2003 - mmj@suse.de - Add mount_guessfstype support for PCDOS [#27814] -* Wed Jun 18 2003 ak@suse.de +* Wed Jun 18 2003 - ak@suse.de - support noreserved option for NFS (#27428) -* Thu Jun 05 2003 mmj@suse.de +* Thu Jun 05 2003 - mmj@suse.de - Rearrange the specfile wrt. archs -* Tue May 13 2003 mmj@suse.de +* Tue May 13 2003 - mmj@suse.de - Use %%defattr - Remove files we don't package -* Wed May 07 2003 mmj@suse.de +* Wed May 07 2003 - mmj@suse.de - Rearrange the do_guess_fstype() code to look for ext2/3 before vfat [#26581] -* Thu Apr 24 2003 ro@suse.de +* Thu Apr 24 2003 - ro@suse.de - fix install_info --delete call and move from preun to postun -* Mon Apr 14 2003 pthomas@suse.de +* Mon Apr 14 2003 - pthomas@suse.de - Get rid of the syscall for adjtimex in selective cases and just call the glibc wrapper. Fixes build on s390. -* Mon Apr 14 2003 pthomas@suse.de +* Mon Apr 14 2003 - pthomas@suse.de - Use geteuid instead of getuid in hwclock to enable making hwclock suid root. -* Mon Apr 07 2003 mmj@suse.de +* Mon Apr 07 2003 - mmj@suse.de - Only delete info entries when removing last version. -* Thu Mar 13 2003 mmj@suse.de +* Thu Mar 13 2003 - mmj@suse.de - Apply patch to make sfdisk not destroy BSD slices [#25093] -* Mon Mar 03 2003 mmj@suse.de +* Mon Mar 03 2003 - mmj@suse.de - Remove superflous umask(033); calls [#23292] -* Mon Mar 03 2003 ro@suse.de +* Mon Mar 03 2003 - ro@suse.de - add missing info dir entries -* Tue Feb 18 2003 agruen@suse.de +* Tue Feb 18 2003 - agruen@suse.de - Add description of the effect of `mount -t nfs -o noacl' on the use of the GETACL and SETACL remote procedure calls to the nfs(5) manual page. -* Mon Feb 17 2003 mmj@suse.de +* Mon Feb 17 2003 - mmj@suse.de - It's called smbfs not smb [#23697] -* Thu Feb 13 2003 mmj@suse.de +* Thu Feb 13 2003 - mmj@suse.de - Readd patch for passphrase timeout that got lost [#23527] -* Fri Feb 07 2003 mmj@suse.de +* Fri Feb 07 2003 - mmj@suse.de - The install_info macros need PreReq: %%install_info_prereq -* Fri Feb 07 2003 ro@suse.de +* Fri Feb 07 2003 - ro@suse.de - added install_info macros -* Tue Feb 04 2003 ro@suse.de +* Tue Feb 04 2003 - ro@suse.de - don't package /bin/kill (part of coreutils now) -* Tue Feb 04 2003 meissner@suse.de +* Tue Feb 04 2003 - meissner@suse.de - Include tarball with pmac-utils manpages, so we do not need sgmltool and all its dependents. -* Wed Jan 29 2003 mmj@suse.de +* Wed Jan 29 2003 - mmj@suse.de - Update to util-linux-2.11z including: · Translation updates · mount: fix LABEL= handling for user umount, don't abort on read @@ -1287,22 +1237,22 @@ fi · setterm: accept devfs name · simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails · umount: allow user umount after mount by label or uuid -* Wed Jan 22 2003 sf@suse.de +* Wed Jan 22 2003 - sf@suse.de - removed last patch, added new (correct) patch -* Wed Jan 22 2003 sf@suse.de +* Wed Jan 22 2003 - sf@suse.de - removed eliminate_doubles() from mkfs.cramfs.c for x86_64, as it segfaults. (makes the images slightly larger, about 10%%) -* Tue Jan 21 2003 mmj@suse.de +* Tue Jan 21 2003 - mmj@suse.de - Added description of ISO mount options to mount.8 [#22915] -* Mon Dec 02 2002 mmj@suse.de +* Mon Dec 02 2002 - mmj@suse.de - Update the ReiserFS patch from Chris Mason -* Fri Nov 29 2002 mmj@suse.de +* Fri Nov 29 2002 - mmj@suse.de - Fix missing #include -* Thu Nov 28 2002 mmj@suse.de +* Thu Nov 28 2002 - mmj@suse.de - Make readprofile also try to locate the System.map in /boot/System.map-`uname -r` [#22168] -* Wed Nov 27 2002 mmj@suse.de +* Wed Nov 27 2002 - mmj@suse.de - Update to util-linux-2.11y including: o Translation updates o fdisk,cfdisk: cosmetic fixes @@ -1310,7 +1260,7 @@ fi o more: kill external help file o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC fails (patch we had, now folded upstream) -* Wed Nov 20 2002 mmj@suse.de +* Wed Nov 20 2002 - mmj@suse.de - Update to util-linux-2.11x including: o Translation updates for several languages o cfdisk: correct error printout @@ -1323,56 +1273,56 @@ fi o setpwnam.c: open temp pw file with O_EXCL o simpleinit: fix for "spawn too fast" o swapon: new -e option -* Tue Nov 19 2002 mmj@suse.de +* Tue Nov 19 2002 - mmj@suse.de - Fix multistring assignment in adjtimex -* Mon Nov 11 2002 ro@suse.de +* Mon Nov 11 2002 - ro@suse.de - changed neededforbuild to - changed neededforbuild to <> -* Thu Oct 31 2002 mmj@suse.de +* Thu Oct 31 2002 - mmj@suse.de - Add -b option to mkfs.cramfs (needed for biarch architectures) -* Thu Oct 31 2002 ro@suse.de +* Thu Oct 31 2002 - ro@suse.de - hack time to build on alpha -* Tue Oct 22 2002 mmj@suse.de +* Tue Oct 22 2002 - mmj@suse.de - Add correction to the ReiserFS patch that fixes the case where it was possible but unlikely to detect a logged copy of a super on a dedicated logging device as the real thing. From Chris Mason. -* Tue Oct 22 2002 mmj@suse.de +* Tue Oct 22 2002 - mmj@suse.de - Update to util-linux-2.11w including: o fdisk and cfdisk fixes o more bigendian fix o translation updates o > 2GB swapspace o mount umask, cramfs and ocfs stuff -* Tue Oct 08 2002 mmj@suse.de +* Tue Oct 08 2002 - mmj@suse.de - Only enable below patch on ix86 and x86_64 -* Mon Oct 07 2002 mmj@suse.de +* Mon Oct 07 2002 - mmj@suse.de - Make small bugfix to below patch -* Sat Oct 05 2002 mmj@suse.de +* Sat Oct 05 2002 - mmj@suse.de - Apply patch to enable > 2GB swap (redhat) [#20533] -* Wed Oct 02 2002 mmj@suse.de +* Wed Oct 02 2002 - mmj@suse.de - Add one-liner security fix to mount and umount. -* Mon Sep 23 2002 mmj@suse.de +* Mon Sep 23 2002 - mmj@suse.de - Readd fix for klogconsole that got lost [#19834] -* Fri Sep 13 2002 mmj@suse.de +* Fri Sep 13 2002 - mmj@suse.de - Added patch from Oracle to mount ocfs by label [#19262] -* Thu Sep 12 2002 mmj@suse.de +* Thu Sep 12 2002 - mmj@suse.de - more: Do not cast char * to int and back [#18896] -* Sat Aug 31 2002 olh@suse.de +* Sat Aug 31 2002 - olh@suse.de - add mount_cramfs_be.diff to allow mount -oloop cramfsfile loopdir -* Mon Aug 26 2002 mmj@suse.de +* Mon Aug 26 2002 - mmj@suse.de - Make mode not 666 when writing /etc/mtab [#18342] -* Mon Aug 26 2002 meissner@suse.de +* Mon Aug 26 2002 - meissner@suse.de - quieten klogconsole if the console does not support TIOCLINUX [#12516] -* Thu Aug 22 2002 mmj@suse.de +* Thu Aug 22 2002 - mmj@suse.de - Added patch from Andreas Gruenbacher for nfs-access-acl [#18183] -* Wed Aug 21 2002 mmj@suse.de +* Wed Aug 21 2002 - mmj@suse.de - Fixed an mtab locking bug with patch from Olaf Kirch [#17637] -* Mon Aug 19 2002 mmj@suse.de +* Mon Aug 19 2002 - mmj@suse.de - Updated reiserfs patch from Chris Mason - Added patch for mount.8, thanks Andreas Gruenbacher -* Thu Aug 15 2002 mmj@suse.de +* Thu Aug 15 2002 - mmj@suse.de - Correct PreReq: -* Mon Aug 05 2002 mmj@suse.de +* Mon Aug 05 2002 - mmj@suse.de - Update to 2.11u which includes: o Danish, German, Spanish, Swedish and Turkish updates. o configure: for fsck.cramfs, mkfs.cramfs: add test for libz @@ -1380,22 +1330,22 @@ fi o agetty: use same test as login does to find utmp entry o fdisk: fix for fdisk on empty disk o mount updates -* Tue Jul 23 2002 schwab@suse.de +* Tue Jul 23 2002 - schwab@suse.de - Fix mkfs.cramfs for architectures with non-4k pages. -* Wed Jul 17 2002 mmj@suse.de +* Wed Jul 17 2002 - mmj@suse.de - Merged base into util-linux -* Mon Jul 15 2002 mmj@suse.de +* Mon Jul 15 2002 - mmj@suse.de - Added JFSv2 patch from Christoph Hellwig for volume label. Does for JFS, what below patch does for ReiserFS. -* Sun Jul 14 2002 adrian@suse.de +* Sun Jul 14 2002 - adrian@suse.de - fix ul-2.10m-sgi-fdisk.diff patch to apply again -* Thu Jul 11 2002 mmj@suse.de +* Thu Jul 11 2002 - mmj@suse.de - Added patch from Chris Mason for volume label on reiserfs -* Wed Jul 10 2002 olh@suse.de +* Wed Jul 10 2002 - olh@suse.de - add mkfs.cramfs and fsck.cramfs to file list -* Wed Jul 10 2002 mmj@suse.de +* Wed Jul 10 2002 - mmj@suse.de - Fixed nfs.5 to tell nfsver defaults to 3 [#16815] -* Mon Jul 08 2002 mmj@suse.de +* Mon Jul 08 2002 - mmj@suse.de - Update to 2.11t which includes * fdformat: remove test on major * fdisk, hwclock and swap polishing @@ -1403,340 +1353,340 @@ fi * cramfs tools includes from the kernel * swap{on,off} honours /proc/swaps * mount small fixups -* Fri Jul 05 2002 kukuk@suse.de +* Fri Jul 05 2002 - kukuk@suse.de - Use %%ix86 macro -* Mon Jul 01 2002 bk@suse.de +* Mon Jul 01 2002 - bk@suse.de - get raw built on s390 and s390x - remove %%ifarchs s390 s390x for fdisk(needed for SCSI disks) -* Mon Jun 17 2002 mmj@suse.de +* Mon Jun 17 2002 - mmj@suse.de - Added a fix for simpleinit exploit. -* Thu Jun 13 2002 olh@suse.de +* Thu Jun 13 2002 - olh@suse.de - disable hwclock ppc patch, maybe obsolete with recent kernels -* Thu May 16 2002 mmj@suse.de +* Thu May 16 2002 - mmj@suse.de - Added manpage guessfstype(8) -* Thu May 09 2002 mmj@suse.de +* Thu May 09 2002 - mmj@suse.de - Updated to util-linux-2.11r, including translations, x86-64 sup- port and small bugfixes. -* Sat Apr 13 2002 mmj@suse.de +* Sat Apr 13 2002 - mmj@suse.de - Updated to util-linux-2.11q, includes bugfixes. - util-linux-mkswap.patch for ia64 was folded into mainline -* Fri Apr 12 2002 stepan@suse.de +* Fri Apr 12 2002 - stepan@suse.de - added x86-64 support. -* Thu Apr 04 2002 ihno@suse.de +* Thu Apr 04 2002 - ihno@suse.de - corrected printf to report shared memories sizes bigger than 2 GByte correct (Bug #15585). It was reportet on s390x, but should effect other 64-Bit systems as well. -* Tue Mar 19 2002 mmj@suse.de +* Tue Mar 19 2002 - mmj@suse.de - Updated to 2.11o. The hexdump patch have been dropped since it was folded to mainline util-linux. -* Fri Mar 15 2002 schwab@suse.de +* Fri Mar 15 2002 - schwab@suse.de - Fix mkswap for ia64. -* Mon Mar 04 2002 draht@suse.de +* Mon Mar 04 2002 - draht@suse.de - permissions fixes for write(1) and wall(1) -* Fri Feb 01 2002 mmj@suse.de +* Fri Feb 01 2002 - mmj@suse.de - Moved /usr/bin/logger to /bin/logger (needed by sysconfig) -* Mon Jan 28 2002 mmj@suse.de +* Mon Jan 28 2002 - mmj@suse.de - Added the guessfstype binary from msvec/fehr -* Thu Jan 24 2002 ro@suse.de +* Thu Jan 24 2002 - ro@suse.de - modified fillup_and_insserv call (perl-hack not needed here) -* Mon Jan 21 2002 mmj@suse.de +* Mon Jan 21 2002 - mmj@suse.de - Merge NetBSD hexdump changes, fixes bugzilla #12801 -* Thu Jan 10 2002 ro@suse.de +* Thu Jan 10 2002 - ro@suse.de - removed ACTIVATE_RAW_DEV -* Mon Dec 31 2001 adrian@suse.de +* Mon Dec 31 2001 - adrian@suse.de - add patch for mips to create SGI partition tables with fdisk -* Tue Dec 18 2001 bjacke@suse.de +* Tue Dec 18 2001 - bjacke@suse.de - add adjtimex -* Mon Dec 10 2001 mmj@suse.de +* Mon Dec 10 2001 - mmj@suse.de - Update to util-linux-2.11n -* Tue Nov 20 2001 mmj@suse.de +* Tue Nov 20 2001 - mmj@suse.de - Added a patch to 'wall' to remove unwanted newline (#12181) -* Wed Nov 07 2001 kukuk@suse.de +* Wed Nov 07 2001 - kukuk@suse.de - Remove unneeded SPARC patch for hwclock -* Sat Oct 13 2001 kukuk@suse.de +* Sat Oct 13 2001 - kukuk@suse.de - Update to util-linux 2.11l -* Wed Sep 12 2001 garloff@suse.de +* Wed Sep 12 2001 - garloff@suse.de - Fixed some dutch translations. (bug #10276) -* Mon Sep 10 2001 olh@suse.de +* Mon Sep 10 2001 - olh@suse.de - marry fdisk and AIX label again... add lsprop for ppc dumps the device tree in a human readable format -* Mon Sep 03 2001 kukuk@suse.de +* Mon Sep 03 2001 - kukuk@suse.de - Update to version 2.11i: - blockdev: corrected ioctl numbers - cal: fixed for multibyte locales - line: new - mount: added vxfs magic -* Sat Sep 01 2001 kukuk@suse.de +* Sat Sep 01 2001 - kukuk@suse.de - Let mount follow symlinks again -* Wed Aug 29 2001 kukuk@suse.de +* Wed Aug 29 2001 - kukuk@suse.de - Add new option to losetup manual page -* Tue Aug 28 2001 draht@suse.de +* Tue Aug 28 2001 - draht@suse.de - added timeout support for losetup (-t ) -* Mon Aug 27 2001 kukuk@suse.de +* Mon Aug 27 2001 - kukuk@suse.de - Add raw rc scripts, too -* Sun Aug 26 2001 bjacke@suse.de +* Sun Aug 26 2001 - bjacke@suse.de - added raw binary and put rawio into obsoletes and provides -* Sat Aug 25 2001 kukuk@suse.de +* Sat Aug 25 2001 - kukuk@suse.de - Fix path in getopt.1 manual page to example directory [Bug #9831] -* Fri Aug 24 2001 kukuk@suse.de +* Fri Aug 24 2001 - kukuk@suse.de - Small fix for hwclock on newer SPARCs -* Mon Aug 13 2001 ro@suse.de +* Mon Aug 13 2001 - ro@suse.de - changed neededforbuild to -* Mon Jul 30 2001 kukuk@suse.de +* Mon Jul 30 2001 - kukuk@suse.de - Update to util-linux-2.11h - Add nologin program -* Tue Jul 10 2001 kukuk@suse.de +* Tue Jul 10 2001 - kukuk@suse.de - Remove swapdev from filelist -* Tue Jul 10 2001 kukuk@suse.de +* Tue Jul 10 2001 - kukuk@suse.de - Update to util-linux-2.11g -* Thu Jun 07 2001 bk@suse.de +* Wed Jun 06 2001 - bk@suse.de - added s390x to all ifnarch s390 -* Fri Apr 20 2001 kukuk@suse.de +* Fri Apr 20 2001 - kukuk@suse.de - Fix wall bug (character 80, 160, 240, are missing) [Bug #6962] -* Mon Mar 26 2001 kukuk@suse.de +* Mon Mar 26 2001 - kukuk@suse.de - Add exception for broken i2o disk device numbering scheme, kernel hacker are not able to fix this and make it right [Bug #5881]. -* Sat Mar 24 2001 kukuk@suse.de +* Sat Mar 24 2001 - kukuk@suse.de - Update to util-linux 2.11b -* Thu Mar 15 2001 kukuk@suse.de +* Thu Mar 15 2001 - kukuk@suse.de - Fix changing of partitions with ID 0 on SPARC - Remove duplicate mount patch -* Wed Mar 14 2001 schwab@suse.de +* Wed Mar 14 2001 - schwab@suse.de - Don't use _syscallX on ia64. - Fix missing includes. -* Wed Mar 14 2001 kukuk@suse.de +* Wed Mar 14 2001 - kukuk@suse.de - Update to version 2.11a -* Fri Mar 02 2001 kukuk@suse.de +* Fri Mar 02 2001 - kukuk@suse.de - enable write again -* Mon Feb 12 2001 kukuk@suse.de +* Mon Feb 12 2001 - kukuk@suse.de - cmos.c: Use sys/io.h, fix PowerPC hack -* Tue Feb 06 2001 ro@suse.de +* Tue Feb 06 2001 - ro@suse.de - wall.c: include time.h -* Mon Feb 05 2001 kukuk@suse.de +* Mon Feb 05 2001 - kukuk@suse.de - Split hex to extra package - Update to util-linux-2.10s -* Fri Feb 02 2001 werner@suse.de +* Fri Feb 02 2001 - werner@suse.de - Make swapon/swapoff more handy: * Ignore swap files on ro mounted file systems * If -a is given ignore already active devices at swapon * If -a is given ignore not active devices at swapoff -* Thu Jan 25 2001 ro@suse.de +* Thu Jan 25 2001 - ro@suse.de - added Provides: util -* Fri Jan 12 2001 garloff@suse.de +* Fri Jan 12 2001 - garloff@suse.de - Apply patch to lomount to allow all kerneli crypt algos to be passed and allow to pass passwd with -k. - losetup seems to support >2GB files just fine (#5433) -* Tue Jan 02 2001 kukuk@suse.de +* Tue Jan 02 2001 - kukuk@suse.de - Save permissions of /etc/mtab [Bug #5027] -* Tue Dec 05 2000 kukuk@suse.de +* Tue Dec 05 2000 - kukuk@suse.de - Search first in /etc/filesystems, then in /proc/filesystems -* Tue Dec 05 2000 kukuk@suse.de +* Tue Dec 05 2000 - kukuk@suse.de - Use AIX/fdisk patch from util-linux-2.10r - Backport "guess filesystems" from util-linux-2.10r -* Tue Dec 05 2000 schwab@suse.de +* Tue Dec 05 2000 - schwab@suse.de - Don't use _syscallX on ia64. -* Mon Dec 04 2000 olh@suse.de +* Mon Dec 04 2000 - olh@suse.de - fix diff again -* Sun Dec 03 2000 olh@suse.de +* Sun Dec 03 2000 - olh@suse.de - no segfaults with AIX disklabels -* Wed Nov 29 2000 uli@suse.de +* Wed Nov 29 2000 - uli@suse.de - fixed to build on PPC -* Mon Nov 27 2000 schwab@suse.de +* Mon Nov 27 2000 - schwab@suse.de - Fix broken casts in hwclock. -* Thu Nov 23 2000 bk@suse.de +* Thu Nov 23 2000 - bk@suse.de - temporary disable pivot_root on s390(2.4 kernel is not yet built) -* Wed Nov 22 2000 schwab@suse.de +* Wed Nov 22 2000 - schwab@suse.de - Add pivot_root to file list. -* Mon Nov 20 2000 kukuk@suse.de +* Mon Nov 20 2000 - kukuk@suse.de - Fix pmac-utils to compile with new kernel -* Fri Nov 17 2000 kukuk@suse.de +* Fri Nov 17 2000 - kukuk@suse.de - Fix hwclock to compile on PPC -* Wed Nov 15 2000 kukuk@suse.de +* Wed Nov 15 2000 - kukuk@suse.de - Update util-linux to 2.10q, merge flushb.diff -* Thu Nov 02 2000 kukuk@suse.de +* Thu Nov 02 2000 - kukuk@suse.de - Remove some of the last specfile changes -* Wed Nov 01 2000 olh@suse.de +* Wed Nov 01 2000 - olh@suse.de - update pmac-utils for new powermacs, cleanup specfile -* Fri Oct 20 2000 kukuk@suse.de +* Fri Oct 20 2000 - kukuk@suse.de - Update util-linux to 2.10p - Rename package from util to util-linux -* Wed Sep 27 2000 kukuk@suse.de +* Wed Sep 27 2000 - kukuk@suse.de - Allow NFS v3 with 2.2.17.SuSE -* Tue Sep 26 2000 kukuk@suse.de +* Tue Sep 26 2000 - kukuk@suse.de - Fix mount for new NFS kernel patch -* Sat Sep 09 2000 kukuk@suse.de +* Sat Sep 09 2000 - kukuk@suse.de - Remove tcsh dependency - Update to util-linux 2.10o, use of /etc/filesystems is still broken -* Fri Aug 25 2000 pthomas@suse.de +* Fri Aug 25 2000 - pthomas@suse.de - use %%{_mandir} and %%{_infodir} exclusively. This allows building from source rpm on platforms other than 7.0. -* Wed Jul 19 2000 bk@suse.de +* Wed Jul 19 2000 - bk@suse.de - s390: removed dasdfmt and silo, %%ifnarch s390 for some non-s390 things. -* Tue May 30 2000 bk@suse.de +* Tue May 30 2000 - bk@suse.de - added dasdfmt and silo on s390 -* Mon May 15 2000 kukuk@suse.de +* Mon May 15 2000 - kukuk@suse.de - util-linux: Update to 2.10m -* Wed Apr 26 2000 kukuk@suse.de +* Wed Apr 26 2000 - kukuk@suse.de - flusb: Don't use kernel headers, even if we don't need them! -* Wed Apr 19 2000 kukuk@suse.de +* Wed Apr 19 2000 - kukuk@suse.de - util-linux: Update to 2.10l -* Mon Apr 17 2000 kukuk@suse.de +* Mon Apr 17 2000 - kukuk@suse.de - util-linux: Update to 2.10k -* Thu Apr 13 2000 kukuk@suse.de +* Thu Apr 13 2000 - kukuk@suse.de - Move /sbin/setserial to /bin/setserial, add compat link to /sbin. This fixes [Bug 1084] and is necessary for FHS 2.1 -* Wed Apr 12 2000 kukuk@suse.de +* Wed Apr 12 2000 - kukuk@suse.de - Fix util-linux for Alpha -* Wed Apr 12 2000 kukuk@suse.de +* Wed Apr 12 2000 - kukuk@suse.de - util-linux: Update to 2.10j -* Sun Apr 02 2000 bk@suse.de +* Sun Apr 02 2000 - bk@suse.de - suse s390 team added support for s390 -* Thu Mar 30 2000 uli@suse.de +* Thu Mar 30 2000 - uli@suse.de - hwclock/PPC: added support for MK48T559 RTC chip used in MTX+ boards -* Fri Mar 24 2000 kukuk@suse.de +* Fri Mar 24 2000 - kukuk@suse.de - Add Linux LVM partition tag to fdisk - Fix a lot of more possible buffer overruns - Fix some fdisk sunlabel bugs - added BuildRoot fixes from nadvorni@suse.cz -* Wed Mar 22 2000 kukuk@suse.de +* Wed Mar 22 2000 - kukuk@suse.de - Update util-linux to 2.10h - Add clock again for non PPC platforms -* Fri Mar 17 2000 uli@suse.de +* Fri Mar 17 2000 - uli@suse.de - now contains both hwclock and clock on PPC (/sbin/init.d/boot chooses what to run at runtime) -* Tue Mar 14 2000 schwab@suse.de +* Tue Mar 14 2000 - schwab@suse.de - Add support for ia64. -* Thu Mar 09 2000 kukuk@suse.de +* Thu Mar 09 2000 - kukuk@suse.de - fdisk: Fix -l for Mylex RAID controller -* Tue Mar 07 2000 kukuk@suse.de +* Tue Mar 07 2000 - kukuk@suse.de - etc/filesystems: Add minix and reiserfs -* Tue Mar 07 2000 kukuk@suse.de +* Tue Mar 07 2000 - kukuk@suse.de - mount: fix endian problem with minix fs -* Tue Feb 15 2000 kukuk@suse.de +* Tue Feb 15 2000 - kukuk@suse.de - mount: Add hack for PPC/syscall mount problem -* Sun Feb 13 2000 bk@suse.de +* Sun Feb 13 2000 - bk@suse.de - let rdev continue in case it stubles over a bad file in /dev (/dev/snd fix) -* Fri Feb 04 2000 kukuk@suse.de +* Fri Feb 04 2000 - kukuk@suse.de - Make PPC clock parameter compatible to hwclock -* Thu Feb 03 2000 kukuk@suse.de +* Thu Feb 03 2000 - kukuk@suse.de - Fix filelist for SPARC -* Thu Feb 03 2000 kukuk@suse.de +* Thu Feb 03 2000 - kukuk@suse.de - util-linux: Update to 2.10f (mount security fix) -* Sun Jan 23 2000 kukuk@suse.de +* Sun Jan 23 2000 - kukuk@suse.de - util-linux: Update to 2.10e -* Tue Jan 18 2000 kukuk@suse.de +* Tue Jan 18 2000 - kukuk@suse.de - mount now looks at first in /etc/filesystems and then in /proc/filesystems -* Tue Jan 18 2000 ro@suse.de +* Tue Jan 18 2000 - ro@suse.de - fixed pmac-utils to build with 2.3 as well -* Tue Jan 18 2000 kukuk@suse.de +* Tue Jan 18 2000 - kukuk@suse.de - Fix a lot of fdisk buffer overruns [Bug 1642] -* Mon Jan 17 2000 kukuk@suse.de +* Mon Jan 17 2000 - kukuk@suse.de - Fix setserial for Linux 2.3.40 - Remove write, is now in nkitb - Build minix and bfs tools for SPARC - Fix some buffer overflows in fdisk -* Fri Dec 17 1999 kukuk@suse.de +* Fri Dec 17 1999 - kukuk@suse.de - util-linux: Update to 2.10d - hex: Update to 1.2 - Move manual pages to /usr/share/man -* Tue Nov 30 1999 uli@suse.de +* Tue Nov 30 1999 - uli@suse.de - re-added hwclock link for PPC (2nd try) -* Tue Nov 30 1999 uli@suse.de +* Tue Nov 30 1999 - uli@suse.de - re-added hwclock link for PPC -* Mon Nov 15 1999 kukuk@suse.de +* Mon Nov 15 1999 - kukuk@suse.de - util-linux: Update to 2.10b -* Sat Nov 13 1999 kukuk@suse.de +* Sat Nov 13 1999 - kukuk@suse.de - setserial: Add Patch for Sparc - Fix filelist for Sparc -* Wed Oct 27 1999 garloff@suse.de +* Wed Oct 27 1999 - garloff@suse.de - added flushb (moved here from ddrescue). - fix bug in logger (remove trailing newlines). -* Fri Oct 22 1999 kukuk@suse.de +* Fri Oct 22 1999 - kukuk@suse.de - util-linux: Remove old patches for mk_loop_h -* Sat Oct 16 1999 kukuk@suse.de +* Sat Oct 16 1999 - kukuk@suse.de - util-linux: Update to 2.9z -* Fri Oct 08 1999 kukuk@suse.de +* Fri Oct 08 1999 - kukuk@suse.de - Update to util-linux-2.9y (execpt fdisk) -* Tue Sep 14 1999 uli@suse.de +* Tue Sep 14 1999 - uli@suse.de - added PMac-specific utils for PPC -* Mon Sep 13 1999 bs@suse.de +* Mon Sep 13 1999 - bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. -* Thu Aug 26 1999 uli@suse.de +* Thu Aug 26 1999 - uli@suse.de - disabled hayesesp for PPC -* Wed Aug 25 1999 kukuk@suse.de +* Wed Aug 25 1999 - kukuk@suse.de - Don´t install tsort, its now in textutils 2.0 -* Tue Aug 24 1999 kukuk@suse.de +* Tue Aug 24 1999 - kukuk@suse.de - Update to util-linux-2.9w (execpt fdisk) -* Mon Aug 09 1999 kukuk@suse.de +* Mon Aug 09 1999 - kukuk@suse.de - Update to util-linux-2.9v (execpt fdisk) -* Tue Jul 20 1999 garloff@suse.de +* Tue Jul 20 1999 - garloff@suse.de - Added hex from Erich S. Raymond -* Mon Jul 12 1999 kukuk@suse.de +* Mon Jul 12 1999 - kukuk@suse.de - Add fdisk patch from Klaus G. Wagner - Add mount patch from util-linux 2.9u -* Tue Jul 06 1999 kukuk@suse.de +* Tue Jul 06 1999 - kukuk@suse.de - update to util-linux-2.9t -* Fri Jun 25 1999 kukuk@suse.de +* Fri Jun 25 1999 - kukuk@suse.de - update to util-linux-2.9s -* Wed Mar 03 1999 ro@suse.de +* Wed Mar 03 1999 - ro@suse.de - hwclock.c: always use busywait to get rtctime (it's hard to find out at runtime if we will get an irq) -* Tue Mar 02 1999 ro@suse.de +* Tue Mar 02 1999 - ro@suse.de - update to util-linux-2.9i - update to setserial-2.15 - using diffs from jurix and add-ons from kgw for compaq smart raid -* Mon Feb 01 1999 ro@suse.de +* Mon Feb 01 1999 - ro@suse.de - rdev is not built on alpha -* Mon Jan 18 1999 florian@suse.de +* Mon Jan 18 1999 - florian@suse.de - fixed one broken case to delete a partition in fdisk -* Sun Dec 13 1998 bs@suse.de +* Sun Dec 13 1998 - bs@suse.de - fixed file list -* Thu Dec 10 1998 fehr@suse.de +* Thu Dec 10 1998 - fehr@suse.de - fix bug in fdisk -* Tue Dec 08 1998 ro@suse.de +* Tue Dec 08 1998 - ro@suse.de - removed last from filelist - added link /sbin/clock -> hwclock -* Wed Nov 04 1998 ro@suse.de +* Wed Nov 04 1998 - ro@suse.de - fdisksunlabel: don't include scsi/scsi.h for glibc-2.0 -* Fri Oct 30 1998 ro@suse.de +* Fri Oct 30 1998 - ro@suse.de - update to 2.9 / added hostid from previous diff - copied some glibc changes from previous diff (strcpy..) -* Thu Sep 17 1998 ro@suse.de +* Thu Sep 17 1998 - ro@suse.de - define _GNU_SOURCE when using getopt -* Mon Aug 31 1998 ro@suse.de +* Mon Aug 31 1998 - ro@suse.de - full switch to util-linux 2.8 -- sync has moved to pkg fileutils -- chroot has moved to pkg sh_utils (has been there for a while) -- adopted hostid from previous suse-pkg -* Mon Aug 24 1998 ro@suse.de +* Mon Aug 24 1998 - ro@suse.de - switched to use mount from util-linux-2.8 -* Tue Jun 23 1998 ro@suse.de +* Tue Jun 23 1998 - ro@suse.de - added fdisk, sfdisk, cfdisk from util-linux-2.8 (including man-pages,readmes) -* Mon Nov 17 1997 ro@suse.de +* Mon Nov 17 1997 - ro@suse.de - changed /local/bin/perl5 in chkdupexe to /usr/bin/perl -* Fri Oct 31 1997 ro@suse.de +* Fri Oct 31 1997 - ro@suse.de - temporarily removed mount-hacker -* Thu Oct 30 1997 florian@suse.de +* Wed Oct 29 1997 - florian@suse.de - add changes from ms@suse.de for hostid.c -* Tue May 20 1997 florian@suse.de +* Tue May 20 1997 - florian@suse.de - only support kernel 2.0.x for nfs mounts, please use /bin/mount-hacker for kernel 2.1.x -* Wed Apr 30 1997 florian@suse.de +* Wed Apr 30 1997 - florian@suse.de - update to mount 2.6g -* Mon Apr 14 1997 florian@suse.de +* Sun Apr 13 1997 - florian@suse.de - update to new version util-linux 2.6 - update to new version mount 2.6e -* Thu Jan 02 1997 florian@suse.de +* Thu Jan 02 1997 - florian@suse.de - update to mount 2.5p -* Thu Jan 02 1997 florian@suse.de +* Thu Jan 02 1997 - florian@suse.de - Update auf neue Version von mount 2.5o. -* Thu Jan 02 1997 florian@suse.de +* Thu Jan 02 1997 - florian@suse.de - updated to new version mount 2.5m - (u)mount now gives much better error messages -* Thu Jan 02 1997 bs@suse.de +* Thu Jan 02 1997 - bs@suse.de compile setterm with libtermcap and not libncurses use newer mount instead of the old version in util-linux (security fix) From 5e5e9235e7de530d9102cc534b697afa7e7394e7a1c9ccc2266f8646399bfc92 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sun, 10 Feb 2008 17:13:34 +0000 Subject: [PATCH 052/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=52 --- raw.init | 3 +- ready | 0 ...2.12r-disk_utils_mkfs_open_exclusive.patch | 39 - ...x-2.13-hwclock_rtc_wait_busy_tempfix.patch | 13 + util-linux-2.13-loop.patch | 32 - util-linux-2.13-mount_create_mtab.patch | 13 - util-linux-2.13-rpmlintrc | 5 + ...linux-2.13-schedutils_error_handling.patch | 55 -- ...nux-2.13-sys_utils_build_rdev_x86_64.patch | 16 - ...f => util-linux-mount_losetup_crypto.patch | 389 +++++---- util-linux-ng-2.13.0.1+git20071121.tar.bz2 | 3 + util-linux-ng-2.13rc2+git20070725.tar.bz2 | 3 - util-linux-ng-CVE-2007-5191.diff | 50 -- ...linux-ng-add-loop_fish2-compatability.diff | 38 - util-linux-ng-fix-buffer-overflow.diff | 55 -- util-linux.changes | 90 +- util-linux.spec | 818 +++++++++--------- 17 files changed, 784 insertions(+), 838 deletions(-) create mode 100644 ready delete mode 100644 util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch create mode 100644 util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch delete mode 100644 util-linux-2.13-loop.patch delete mode 100644 util-linux-2.13-mount_create_mtab.patch create mode 100644 util-linux-2.13-rpmlintrc delete mode 100644 util-linux-2.13-schedutils_error_handling.patch delete mode 100644 util-linux-2.13-sys_utils_build_rdev_x86_64.patch rename cryptsetup-2.13-crypto.diff => util-linux-mount_losetup_crypto.patch (84%) create mode 100644 util-linux-ng-2.13.0.1+git20071121.tar.bz2 delete mode 100644 util-linux-ng-2.13rc2+git20070725.tar.bz2 delete mode 100644 util-linux-ng-CVE-2007-5191.diff delete mode 100644 util-linux-ng-add-loop_fish2-compatability.diff delete mode 100644 util-linux-ng-fix-buffer-overflow.diff diff --git a/raw.init b/raw.init index 76623b7..7fb0069 100644 --- a/raw.init +++ b/raw.init @@ -15,13 +15,14 @@ # Required-Stop: # Default-Start: 2 3 5 # Default-Stop: 0 1 6 +# Short-Description: raw devices # Description: raw-devices ### END INIT INFO . /etc/rc.status CONFIG=/etc/raw -RAW_BIN=/usr/sbin/raw +RAW_BIN=/sbin/raw RAW_MODULE=raw test -x $RAW_BIN || exit 5 diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4 diff --git a/util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch b/util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch deleted file mode 100644 index 260392e..0000000 --- a/util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch +++ /dev/null @@ -1,39 +0,0 @@ -Index: util-linux-ng-2.12r+git20070330/disk-utils/mkswap.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/disk-utils/mkswap.c -+++ util-linux-ng-2.12r+git20070330/disk-utils/mkswap.c -@@ -660,7 +660,7 @@ main(int argc, char ** argv) { - usage(); - } - -- DEV = open(device_name,O_RDWR); -+ DEV = open(device_name, O_RDWR | O_EXCL); - if (DEV < 0 || fstat(DEV, &statbuf) < 0) { - perror(device_name); - exit(1); -Index: util-linux-ng-2.12r+git20070330/disk-utils/mkfs.minix.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/disk-utils/mkfs.minix.c -+++ util-linux-ng-2.12r+git20070330/disk-utils/mkfs.minix.c -@@ -699,7 +699,7 @@ main(int argc, char ** argv) { - tmp += dirsize; - *(short *)tmp = 2; - strcpy(tmp+2,".badblocks"); -- DEV = open(device_name,O_RDWR ); -+ DEV = open(device_name,O_RDWR | O_EXCL); - if (DEV<0) - die(_("unable to open %s")); - if (fstat(DEV,&statbuf)<0) -Index: util-linux-ng-2.12r+git20070330/disk-utils/mkfs.bfs.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/disk-utils/mkfs.bfs.c -+++ util-linux-ng-2.12r+git20070330/disk-utils/mkfs.bfs.c -@@ -170,7 +170,7 @@ main(int argc, char *argv[]) { - if (!S_ISBLK(statbuf.st_mode)) - fatal(_("%s is not a block special device"), device); - -- fd = open(device, O_RDWR); -+ fd = open(device, O_RDWR | O_EXCL); - if (fd == -1) { - perror(device); - fatal(_("cannot open %s"), device); diff --git a/util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch b/util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch new file mode 100644 index 0000000..0dcad24 --- /dev/null +++ b/util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch @@ -0,0 +1,13 @@ +Index: util-linux-ng-2.13.0.1+git20071121/hwclock/rtc.c +=================================================================== +--- util-linux-ng-2.13.0.1+git20071121.orig/hwclock/rtc.c ++++ util-linux-ng-2.13.0.1+git20071121/hwclock/rtc.c +@@ -225,7 +225,7 @@ int ret; + } else { + int rc; /* Return code from ioctl */ + /* Turn on update interrupts (one per second) */ +-#if defined(__alpha__) || defined(__sparc__) || defined(__x86_64__) ++#if defined(__alpha__) || defined(__sparc__) || defined(__x86_64__) || defined(__i386__) + /* Not all alpha kernels reject RTC_UIE_ON, but probably they should. */ + rc = -1; + errno = EINVAL; diff --git a/util-linux-2.13-loop.patch b/util-linux-2.13-loop.patch deleted file mode 100644 index ca5698c..0000000 --- a/util-linux-2.13-loop.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- util-linux-ng-2.13rc2+git20070725/mount/lomount.c.org 2007-08-16 17:09:33.258902000 +0200 -+++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c 2007-08-16 17:09:43.016135000 +0200 -@@ -398,6 +398,7 @@ - } - if (ioctl (fd, LOOP_CLR_FD, 0) < 0) { - perror ("ioctl: LOOP_CLR_FD"); -+ close(fd); - return 1; - } - close (fd); ---- util-linux-ng-2.13rc2+git20070725/mount/fsprobe_volumeid.c.org 2007-08-16 18:16:03.120065000 +0200 -+++ util-linux-ng-2.13rc2+git20070725/mount/fsprobe_volumeid.c 2007-08-16 18:27:43.967526000 +0200 -@@ -34,8 +34,10 @@ - return NULL; - - id = volume_id_open_fd(fd); -- if (!id) -+ if (!id) { -+ close(fd); - return NULL; -+ } - - /* TODO: use blkdev_get_size() */ - if (ioctl(fd, BLKGETSIZE64, &size) != 0) -@@ -61,6 +63,7 @@ - } - - volume_id_close(id); -+ close(fd); - return value; - } - diff --git a/util-linux-2.13-mount_create_mtab.patch b/util-linux-2.13-mount_create_mtab.patch deleted file mode 100644 index 4d26d69..0000000 --- a/util-linux-2.13-mount_create_mtab.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/mount.c -+++ util-linux-ng-2.13rc2+git20070725/mount/mount.c -@@ -546,7 +546,7 @@ create_mtab (void) { - char *extra_opts; - parse_opts (fstab->m.mnt_opts, &flags, &extra_opts); - mnt.mnt_dir = "/"; -- mnt.mnt_fsname = canonicalize (fstab->m.mnt_fsname); -+ mnt.mnt_fsname = fsprobe_get_devname(fstab->m.mnt_fsname); - mnt.mnt_type = fstab->m.mnt_type; - mnt.mnt_opts = fix_opts_string (flags, extra_opts, NULL); - mnt.mnt_freq = mnt.mnt_passno = 0; diff --git a/util-linux-2.13-rpmlintrc b/util-linux-2.13-rpmlintrc new file mode 100644 index 0000000..1741f88 --- /dev/null +++ b/util-linux-2.13-rpmlintrc @@ -0,0 +1,5 @@ +addFilter("init-script-without-%stop_on_removal-preun /etc/init.d/raw") +addFilter("incoherent-init-script-name raw") +addFilter("no-reload-entry /etc/init.d/raw") +addFilter("files-duplicate .*(rootflags|ramsize|vidmode)") + diff --git a/util-linux-2.13-schedutils_error_handling.patch b/util-linux-2.13-schedutils_error_handling.patch deleted file mode 100644 index 2bd26b2..0000000 --- a/util-linux-2.13-schedutils_error_handling.patch +++ /dev/null @@ -1,55 +0,0 @@ -Original patch from Bernhard Voelker. - -Index: util-linux-ng-2.13rc2+git20070725/schedutils/ionice.c -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/schedutils/ionice.c -+++ util-linux-ng-2.13rc2+git20070725/schedutils/ionice.c -@@ -107,7 +107,7 @@ int main(int argc, char *argv[]) - case 'h': - default: - usage(); -- exit(0); -+ exit(EXIT_SUCCESS); - } - } - -@@ -125,7 +125,7 @@ int main(int argc, char *argv[]) - break; - default: - printf("bad prio class %d\n", ioprio_class); -- return 1; -+ exit(EXIT_FAILURE); - } - - if (!set) { -@@ -134,9 +134,10 @@ int main(int argc, char *argv[]) - - ioprio = ioprio_get(IOPRIO_WHO_PROCESS, pid); - -- if (ioprio == -1) -+ if (ioprio == -1) { - perror("ioprio_get"); -- else { -+ exit(EXIT_FAILURE); -+ } else { - ioprio_class = ioprio >> IOPRIO_CLASS_SHIFT; - if (ioprio_class != IOPRIO_CLASS_IDLE) { - ioprio = ioprio & 0xff; -@@ -147,11 +148,15 @@ int main(int argc, char *argv[]) - } else { - if (ioprio_set(IOPRIO_WHO_PROCESS, pid, ioprio | ioprio_class << IOPRIO_CLASS_SHIFT) == -1) { - perror("ioprio_set"); -- return 1; -+ exit(EXIT_FAILURE); - } - -- if (argv[optind]) -+ if (argv[optind]) { - execvp(argv[optind], &argv[optind]); -+ /* execvp should never return */ -+ perror("execvp"); -+ exit(EXIT_FAILURE); -+ } - } - - return 0; diff --git a/util-linux-2.13-sys_utils_build_rdev_x86_64.patch b/util-linux-2.13-sys_utils_build_rdev_x86_64.patch deleted file mode 100644 index 6e9381d..0000000 --- a/util-linux-2.13-sys_utils_build_rdev_x86_64.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: util-linux-ng-2.13-rc1/sys-utils/Makefile.am -=================================================================== ---- util-linux-ng-2.13-rc1.orig/sys-utils/Makefile.am -+++ util-linux-ng-2.13-rc1/sys-utils/Makefile.am -@@ -26,6 +26,11 @@ usrsbinexec_PROGRAMS += rdev - man_MANS += rdev.8 ramsize.8 rootflags.8 vidmode.8 - RDEV_LINKS = ramsize vidmode rootflags - endif -+if ARCH_86_64 -+usrsbinexec_PROGRAMS += rdev -+man_MANS += rdev.8 ramsize.8 rootflags.8 vidmode.8 -+RDEV_LINKS = ramsize vidmode rootflags -+endif - endif - - SETARCH_LINKS = linux32 linux64 diff --git a/cryptsetup-2.13-crypto.diff b/util-linux-mount_losetup_crypto.patch similarity index 84% rename from cryptsetup-2.13-crypto.diff rename to util-linux-mount_losetup_crypto.patch index 2c55a42..57a815d 100644 --- a/cryptsetup-2.13-crypto.diff +++ b/util-linux-mount_losetup_crypto.patch @@ -1,52 +1,70 @@ -* password hashing based on debian patch (rmd160, sha*) adds losetup options -k - and -H -* add support for loop-AES compatible strings like "twofish256" +From a062df268df66641ed94d5c0e968e92c67b585e4 Mon Sep 17 00:00:00 2001 +From: Ludwig Nussel +Date: Thu, 29 Nov 2007 17:46:36 +0100 +Subject: [PATCH] losetup: support password hashing and specifying the key length + +* add support for password hashing (sha512, sha384, sha256, rmd160). +* add support for loop-AES style strings like "twofish256" for + specifying the encryption algorithm and key length. + +Based on the SUSE patch from Ludwig Nussel , +this patch adds password hashing for cryptoloop devices. While +cryptoloop is deprecated, users may still wish to access existing +volumes. + +Incompatible change: + Default is now to hash using sha256, sha384 or sha512 depending + on key length (16, 24, or 32 bytes). Debian users will need to + specify "--phash rmd160" to access existing Debian devices. + Others will need to specify '--phash none'. + +sha512.c is from loop-AES. Signed-off-by: Ludwig Nussel +--- + mount/Makefile.am | 2 + + mount/lomount.c | 178 +++++++++++++++--- + mount/lomount.h | 4 +- + mount/losetup.8 | 11 + + mount/mount.8 | 13 ++ + mount/mount.c | 23 ++- + mount/my_dev_t.h | 5 + + mount/rmd160.c | 532 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + mount/rmd160.h | 11 + + mount/sha512.c | 432 +++++++++++++++++++++++++++++++++++++++++++ + mount/sha512.h | 45 +++++ + 11 files changed, 1225 insertions(+), 31 deletions(-) + create mode 100644 mount/my_dev_t.h + create mode 100644 mount/rmd160.c + create mode 100644 mount/rmd160.h + create mode 100644 mount/sha512.c + create mode 100644 mount/sha512.h -Index: util-linux-ng-2.13rc2+git20070725/mount/Makefile.am -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/Makefile.am -+++ util-linux-ng-2.13rc2+git20070725/mount/Makefile.am -@@ -12,7 +12,7 @@ headers_common = fstab.h linux_fs.h moun - mount_paths.h lomount.h fsprobe.h realpath.h xmalloc.h \ +diff --git a/mount/Makefile.am b/mount/Makefile.am +index 01643b2..cb7af0a 100644 +--- a/mount/Makefile.am ++++ b/mount/Makefile.am +@@ -13,6 +13,7 @@ headers_common = fstab.h mount_mntent.h mount_constants.h \ getusername.h loop.h sundries.h --mount_common = fstab.c mount_mntent.c getusername.c lomount.c \ -+mount_common = fstab.c mount_mntent.c getusername.c lomount.c rmd160.c sha512.c \ - $(utils_common) $(headers_common) ../lib/env.c - - mount_SOURCES = mount.c $(mount_common) ../lib/setproctitle.c -@@ -25,7 +25,7 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD + mount_common = fstab.c mount_mntent.c getusername.c lomount.c \ ++ rmd160.c sha512.c \ + $(utils_common) $(headers_common) ../lib/env.c ../lib/linux_version.c \ + ../lib/blkdev.c +@@ -27,6 +28,7 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) swapon_SOURCES = swapon.c swap_constants.h $(utils_common) --losetup_SOURCES = lomount.c loop.h lomount.h -+losetup_SOURCES = lomount.c loop.h lomount.h rmd160.c sha512.c + losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c \ ++ rmd160.c sha512.c \ + loop.h lomount.h xmalloc.h sundries.h realpath.h losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) - mount_LDADD = $(LDADD_common) -Index: util-linux-ng-2.13rc2+git20070725/mount/rmd160.h -=================================================================== ---- /dev/null -+++ util-linux-ng-2.13rc2+git20070725/mount/rmd160.h -@@ -0,0 +1,11 @@ -+#ifndef RMD160_H -+#define RMD160_H -+ -+#define RMD160_HASH_SIZE 20 -+ -+void -+rmd160_hash_buffer( unsigned char *outbuf, const unsigned char *buffer, size_t length ); -+ -+#endif /*RMD160_H*/ -+ -+ -Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.c -+++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c -@@ -20,9 +20,15 @@ +diff --git a/mount/lomount.c b/mount/lomount.c +index 5bd8954..98f144f 100644 +--- a/mount/lomount.c ++++ b/mount/lomount.c +@@ -20,12 +20,18 @@ #include "loop.h" #include "lomount.h" @@ -54,19 +72,22 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c +#include "sha512.h" #include "xstrncpy.h" #include "nls.h" + #include "sundries.h" + #include "xmalloc.h" + #include "realpath.h" -+#ifndef MAX -+#define MAX(a,b) ((a>b)?(a):(b)) ++#ifndef MIN ++#define MIN(a,b) ((a>3:LO_KEY_SIZE; @@ -218,13 +238,16 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c + if(!keysz) { + if(verbose) + fprintf(stderr, _("please specify a key length\n")); -+ close(fd); -+ close(ffd); + return 1; + } + loopinfo64.lo_encrypt_key_size = keysz>>3; + } + ++ if((unsigned)loopinfo64.lo_encrypt_key_size > sizeof(loopinfo64.lo_encrypt_key)) { ++ fprintf(stderr, _("invalid key length\n")); ++ return 1; ++ } ++ + if (phash) { + if(!strcasecmp(phash, "sha512")) { + hfunc = sha512_hash_buffer; @@ -238,8 +261,6 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c + hfunc = phash_none; + } else { + fprintf(stderr, _("unsupported hash method '%s'\n"), phash); -+ close(fd); -+ close(ffd); + return 1; + } + } @@ -254,7 +275,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c } if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { -@@ -416,8 +522,8 @@ mutter(void) { +@@ -532,8 +640,8 @@ mutter(void) { } int @@ -265,11 +286,11 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c mutter(); return 1; } -@@ -456,7 +562,13 @@ usage(void) { +@@ -569,7 +677,13 @@ usage(void) { " %1$s [ options ] {-f|--find|loop_device} file # setup\n" "\nOptions:\n" " -e | --encryption enable data encryption with specified \n" -+ " -H | --phash hash password using specified algorithm (rmd160/sha512/sha256/sha384/none)\n" ++ " -H | --phash hash password using specified algorithm (sha512/sha256/sha384/rmd160/none)\n" " -h | --help this help\n" + " -k | --keybits specify number of bits in the hashed key given\n" + " to the cipher. Some ciphers support several key\n" @@ -279,7 +300,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c " -o | --offset start at offset into file\n" " -p | --pass-fd read passphrase from file descriptor \n" " -r | --read-only setup read-only loop device\n" -@@ -497,11 +609,14 @@ error (const char *fmt, ...) { +@@ -582,11 +696,14 @@ usage(void) { int main(int argc, char **argv) { char *p, *offset, *encryption, *passfd, *device, *file; @@ -294,7 +315,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c unsigned long long off; struct option longopts[] = { { "all", 0, 0, 'a' }, -@@ -509,6 +624,8 @@ main(int argc, char **argv) { +@@ -594,6 +711,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -303,7 +324,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c { "offset", 1, 0, 'o' }, { "pass-fd", 1, 0, 'p' }, { "read-only", 0, 0, 'r' }, -@@ -524,12 +641,13 @@ main(int argc, char **argv) { +@@ -609,12 +728,13 @@ main(int argc, char **argv) { delete = find = all = 0; off = 0; offset = encryption = passfd = NULL; @@ -314,11 +335,11 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c progname = p+1; - while ((c = getopt_long(argc, argv, "ade:E:fho:p:rsv", -+ while ((c = getopt_long(argc, argv, "ade:E:fhk:No:p:rsvH:", ++ while ((c = getopt_long(argc, argv, "ade:E:fhk:o:p:rsvH:", longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -548,6 +666,12 @@ main(int argc, char **argv) { +@@ -633,6 +753,12 @@ main(int argc, char **argv) { case 'f': find = 1; break; @@ -331,7 +352,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c case 'o': offset = optarg; break; -@@ -611,8 +735,10 @@ main(int argc, char **argv) { +@@ -696,8 +822,10 @@ main(int argc, char **argv) { usage(); if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(); @@ -343,11 +364,83 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c if (res == 2 && find) { if (verbose) printf("stolen loop=%s...trying again\n", -Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/mount.c -+++ util-linux-ng-2.13rc2+git20070725/mount/mount.c -@@ -93,6 +93,9 @@ static int suid = 0; +diff --git a/mount/lomount.h b/mount/lomount.h +index 38b3a48..3a6210f 100644 +--- a/mount/lomount.h ++++ b/mount/lomount.h +@@ -1,5 +1,5 @@ +-extern int set_loop(const char *, const char *, unsigned long long, +- const char *, int, int *); ++extern int set_loop(const char *device, const char *file, unsigned long long offset, ++ const char *encryption, const char* phash, int pfd, int *loopro, int keysz); + extern int del_loop(const char *); + extern int is_loop_device(const char *); + extern char * find_unused_loop_device(void); +diff --git a/mount/losetup.8 b/mount/losetup.8 +index db2929f..54bbc94 100644 +--- a/mount/losetup.8 ++++ b/mount/losetup.8 +@@ -76,6 +76,15 @@ find the first unused loop device. If a + argument is present, use this device. Otherwise, print its name. + .IP "\fB\-h, \-\-help\fP" + print help ++.IP "\fB\-H, \-\-phash \fIhash_type\fP" ++Specify the password hash function. Valid values are: ++.BR sha512 (default), ++.BR sha256 , ++.BR sha384 , ++.BR rmd160 , ++.BR none . ++.IP "\fB\-k, \-\-keybits \fInum\fP" ++set the number of bits to use in key to \fInum\fP. + .IP "\fB\-o, \-\-offset \fIoffset\fP" + The data start is moved \fIoffset\fP bytes into the specified file or + device. +@@ -140,6 +149,8 @@ the command + .fi + .SH RESTRICTION + DES encryption is painfully slow. On the other hand, XOR is terribly weak. ++Both are insecure nowadays. Some ciphers may require a licence for you to be ++allowed to use them. + + Cryptoloop is deprecated in favor of dm-crypt. For more details see + .B cryptsetup(8). +diff --git a/mount/mount.8 b/mount/mount.8 +index 54b11d4..e79ea04 100644 +--- a/mount/mount.8 ++++ b/mount/mount.8 +@@ -615,6 +615,15 @@ This option implies the options + (unless overridden by subsequent options, as in the option line + .BR group,dev,suid ). + .TP ++.B encryption ++Specifies an encryption algorithm to use. Used in conjunction with the ++.BR loop " option." ++.TP ++.B keybits ++Specifies the key size to use for an encryption algorithm. Used in conjunction ++with the ++.BR loop " and " encryption " options." ++.TP + .B mand + Allow mandatory locks on this filesystem. See + .BR fcntl (2). +@@ -2010,6 +2019,10 @@ that are really options to + .BR \%losetup (8). + (These options can be used in addition to those specific + to the filesystem type.) ++If the mount requires a passphrase, you will be prompted for one unless ++you specify a file descriptor to read from instead with the ++.BR \-\-pass-fd ++option. + + If no explicit loop device is mentioned + (but just an option `\fB\-o loop\fP' is given), then +diff --git a/mount/mount.c b/mount/mount.c +index 60fe4fe..164ae3c 100644 +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -88,6 +88,9 @@ static int suid = 0; /* Contains the fd to read the passphrase from, if any. */ static int pfd = -1; @@ -357,25 +450,24 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c /* Map from -o and fstab option strings to the flag argument to mount(2). */ struct opt_map { const char *opt; /* option name */ -@@ -190,6 +193,7 @@ static int opt_nofail = 0; +@@ -182,6 +185,7 @@ static const struct opt_map opt_map[] = { static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper; -+static const char *opt_keybits, *opt_phash, *opt_nohashpass; ++static const char *opt_keybits, *opt_phash; static int mounted (const char *spec0, const char *node0); static int check_special_mountprog(const char *spec, const char *node, -@@ -204,6 +208,9 @@ static struct string_opt_map { +@@ -196,6 +200,8 @@ static struct string_opt_map { { "vfs=", 1, &opt_vfstype }, { "offset=", 0, &opt_offset }, { "encryption=", 0, &opt_encryption }, + { "phash=", 0, &opt_phash }, + { "keybits=", 0, &opt_keybits }, -+ { "nohashpass", 0, &opt_nohashpass }, { "speed=", 0, &opt_speed }, { "comment=", 1, &opt_comment }, { "uhelper=", 0, &opt_uhelper }, -@@ -858,7 +865,7 @@ loop_check(const char **spec, const char +@@ -897,7 +903,7 @@ loop_check(const char **spec, const char **type, int *flags, *type = opt_vfstype; } @@ -384,44 +476,28 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c *loopfile = *spec; if (*loop) { -@@ -879,9 +886,17 @@ loop_check(const char **spec, const char +@@ -923,9 +929,10 @@ loop_check(const char **spec, const char **type, int *flags, return EX_SYSERR; /* no more loop devices */ if (verbose) printf(_("mount: going to use the loop device %s\n"), *loopdev); - + if (!keysz && opt_keybits) + keysz = strtoul(opt_keybits, NULL, 0); -+ if (opt_nohashpass) { -+ if(opt_phash && strcmp(opt_phash, "none")) { -+ error(_("mount: please specify either phash=%s or nohashpass\n")); -+ return EX_FAIL; -+ } -+ opt_phash = "none"; -+ } if ((res = set_loop(*loopdev, *loopfile, offset, - opt_encryption, pfd, &loopro))) { + opt_encryption, opt_phash, pfd, &loopro, keysz))) { if (res == 2) { /* loop dev has been grabbed by some other process, try again, if not given explicitly */ -@@ -1184,7 +1199,7 @@ try_mount_one (const char *spec0, const - error (_("mount: %s not mounted already, or bad option"), node); - } else { - error (_("mount: wrong fs type, bad option, bad superblock on %s,\n" -- " missing codepage or other error"), -+ " missing codepage or helper program, or other error"), - spec); - - if (stat(spec, &statbuf) == 0 && S_ISBLK(statbuf.st_mode) -@@ -1629,6 +1644,7 @@ static struct option longopts[] = { +@@ -1661,6 +1668,7 @@ static struct option longopts[] = { { "options", 1, 0, 'o' }, { "test-opts", 1, 0, 'O' }, { "pass-fd", 1, 0, 'p' }, + { "keybits", 1, 0, 'k' }, { "types", 1, 0, 't' }, { "bind", 0, 0, 128 }, - { "replace", 0, 0, 129 }, -@@ -1781,6 +1797,7 @@ main(int argc, char *argv[]) { + { "move", 0, 0, 133 }, +@@ -1807,6 +1815,7 @@ main(int argc, char *argv[]) { char *options = NULL, *test_opts = NULL, *node; const char *spec = NULL; char *label = NULL; @@ -429,7 +505,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c char *uuid = NULL; char *types = NULL; char *p; -@@ -1811,7 +1828,7 @@ main(int argc, char *argv[]) { +@@ -1837,7 +1846,7 @@ main(int argc, char *argv[]) { initproctitle(argc, argv); #endif @@ -438,7 +514,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c longopts, NULL)) != -1) { switch (c) { case 'a': /* mount everything in fstab */ -@@ -1829,6 +1846,9 @@ main(int argc, char *argv[]) { +@@ -1855,6 +1864,9 @@ main(int argc, char *argv[]) { case 'i': external_allowed = 0; break; @@ -448,9 +524,9 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c case 'l': list_with_volumelabel = 1; break; -@@ -1975,6 +1995,9 @@ main(int argc, char *argv[]) { - create_mtab (); - } +@@ -1991,6 +2003,9 @@ main(int argc, char *argv[]) { + + atexit(unlock_mtab); + if (keysize && sscanf(keysize,"%d",&keysz) != 1) + die (EX_USAGE, _("mount: argument to --keybits or -k must be a number")); @@ -458,23 +534,22 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c switch (argc+specseen) { case 0: /* mount -a */ -Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.h -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.h -+++ util-linux-ng-2.13rc2+git20070725/mount/lomount.h -@@ -1,6 +1,6 @@ - extern int verbose; --extern int set_loop(const char *, const char *, unsigned long long, -- const char *, int, int *); -+extern int set_loop(const char *device, const char *file, unsigned long long offset, -+ const char *encryption, const char* phash, int pfd, int *loopro, int keysz); - extern int del_loop(const char *); - extern int is_loop_device(const char *); - extern char * find_unused_loop_device(void); -Index: util-linux-ng-2.13rc2+git20070725/mount/rmd160.c -=================================================================== +diff --git a/mount/my_dev_t.h b/mount/my_dev_t.h +new file mode 100644 +index 0000000..5c4c0a1 --- /dev/null -+++ util-linux-ng-2.13rc2+git20070725/mount/rmd160.c ++++ b/mount/my_dev_t.h +@@ -0,0 +1,5 @@ ++/* silliness to get dev_t defined as the kernel defines it */ ++/* glibc uses a different dev_t */ ++ ++#include ++#define my_dev_t __kernel_old_dev_t +diff --git a/mount/rmd160.c b/mount/rmd160.c +new file mode 100644 +index 0000000..3430954 +--- /dev/null ++++ b/mount/rmd160.c @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -1008,10 +1083,28 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/rmd160.c + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c -=================================================================== +diff --git a/mount/rmd160.h b/mount/rmd160.h +new file mode 100644 +index 0000000..4b2c61d --- /dev/null -+++ util-linux-ng-2.13rc2+git20070725/mount/sha512.c ++++ b/mount/rmd160.h +@@ -0,0 +1,11 @@ ++#ifndef RMD160_H ++#define RMD160_H ++ ++#define RMD160_HASH_SIZE 20 ++ ++void ++rmd160_hash_buffer( unsigned char *outbuf, const unsigned char *buffer, size_t length ); ++ ++#endif /*RMD160_H*/ ++ ++ +diff --git a/mount/sha512.c b/mount/sha512.c +new file mode 100644 +index 0000000..e4c9c13 +--- /dev/null ++++ b/mount/sha512.c @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1445,10 +1538,11 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c + memset(&ctx, 0, sizeof(ctx)); +} +#endif -Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.h -=================================================================== +diff --git a/mount/sha512.h b/mount/sha512.h +new file mode 100644 +index 0000000..4b57c01 --- /dev/null -+++ util-linux-ng-2.13rc2+git20070725/mount/sha512.h ++++ b/mount/sha512.h @@ -0,0 +1,45 @@ +/* + * sha512.h @@ -1495,3 +1589,6 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.h +/* no sha384_write(), use sha512_write() */ +/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ +extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); +-- +1.5.3.4 + diff --git a/util-linux-ng-2.13.0.1+git20071121.tar.bz2 b/util-linux-ng-2.13.0.1+git20071121.tar.bz2 new file mode 100644 index 0000000..ac50340 --- /dev/null +++ b/util-linux-ng-2.13.0.1+git20071121.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:901086dc7bc99a89b9f11839107a0dc83f6b9e89158bccb8b30ad0a5a609123b +size 1585119 diff --git a/util-linux-ng-2.13rc2+git20070725.tar.bz2 b/util-linux-ng-2.13rc2+git20070725.tar.bz2 deleted file mode 100644 index bd0e5e3..0000000 --- a/util-linux-ng-2.13rc2+git20070725.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:74640e1af0289d3be9397c8a7c8b62f147a3dbfad232fd4a7ec15a41e9ac1cf8 -size 1544622 diff --git a/util-linux-ng-CVE-2007-5191.diff b/util-linux-ng-CVE-2007-5191.diff deleted file mode 100644 index a05de49..0000000 --- a/util-linux-ng-CVE-2007-5191.diff +++ /dev/null @@ -1,50 +0,0 @@ -commit ebbeb2c7ac1b00b6083905957837a271e80b187e -Author: Ludwig Nussel -Date: Thu Sep 20 14:57:20 2007 +0200 - - mount: doesn't drop privileges properly when calling helpers - - {,u}mount calls setuid() and setgid() in the wrong order and doesn't checking - the return value of set{u,g}id(() when running helpers like mount.nfs. - - Signed-off-by: Ludwig Nussel - Signed-off-by: Karel Zak - -Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/mount.c -+++ util-linux-ng-2.13rc2+git20070725/mount/mount.c -@@ -646,8 +646,12 @@ check_special_mountprog(const char *spec - char *oo, *mountargs[10]; - int i = 0; - -- setuid(getuid()); -- setgid(getgid()); -+ if(setgid(getgid()) < 0) -+ die(EX_FAIL, _("mount: cannot set group id: %s"), strerror(errno)); -+ -+ if(setuid(getuid()) < 0) -+ die(EX_FAIL, _("mount: cannot set user id: %s"), strerror(errno)); -+ - oo = fix_opts_string (flags, extra_opts, NULL); - mountargs[i++] = mountprog; /* 1 */ - mountargs[i++] = (char *) spec; /* 2 */ -Index: util-linux-ng-2.13rc2+git20070725/mount/umount.c -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/umount.c -+++ util-linux-ng-2.13rc2+git20070725/mount/umount.c -@@ -102,8 +102,12 @@ check_special_umountprog(const char *spe - char *umountargs[8]; - int i = 0; - -- setuid(getuid()); -- setgid(getgid()); -+ if(setgid(getgid()) < 0) -+ die(EX_FAIL, _("umount: cannot set group id: %s"), strerror(errno)); -+ -+ if(setuid(getuid()) < 0) -+ die(EX_FAIL, _("umount: cannot set user id: %s"), strerror(errno)); -+ - umountargs[i++] = umountprog; - umountargs[i++] = xstrdup(node); - if (nomtab) diff --git a/util-linux-ng-add-loop_fish2-compatability.diff b/util-linux-ng-add-loop_fish2-compatability.diff deleted file mode 100644 index 0fcdf4f..0000000 --- a/util-linux-ng-add-loop_fish2-compatability.diff +++ /dev/null @@ -1,38 +0,0 @@ -Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.c -+++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c -@@ -338,13 +338,11 @@ set_loop(const char *device, const char - - if (encryption && *encryption) { - // a hint for suse users -- if(!strcmp(encryption, "twofishSL92")) { -- fprintf(stderr, _("twofishSL92 is not supported via cryptoloop, please use dm-crypt to access the volume\n")); -- close(fd); -- close(ffd); -- return 1; -- } -- if (digits_only(encryption)) { -+ if(!phash && (!strcmp(encryption, "twofishSL92") || (!strcmp(encryption, "twofish") && !keysz))) { -+ fprintf(stderr,"Switching to old S.u.S.E. loop_fish2 compatibility mode.\n"); -+ fprintf(stderr, _("Warning: This mode is deprecated, support for it will be removed in the future.\n")); -+ loopinfo64.lo_encrypt_type = 3; // LO_CRYPT_FISH -+ } else if (digits_only(encryption)) { - loopinfo64.lo_encrypt_type = atoi(encryption); - } else { - // check for something like twofish256 -@@ -405,6 +403,14 @@ set_loop(const char *device, const char - hfunc = sha512_hash_buffer; - if(loopinfo64.lo_encrypt_key_size == 24) hfunc = sha384_hash_buffer; - if(loopinfo64.lo_encrypt_key_size == 32) hfunc = sha512_hash_buffer; -+ } else if(loopinfo64.lo_encrypt_type == 3 ) { // LO_CRYPT_FISH -+ if(!strcmp(encryption, "twofishSL92")) { -+ hfunc = sha512_hash_buffer; -+ loopinfo64.lo_encrypt_key_size = 32; -+ } else { -+ hfunc = phash_rmd160; -+ loopinfo64.lo_encrypt_key_size = 20; -+ } - } else { - hfunc = phash_none; - loopinfo64.lo_encrypt_key_size = keysz?keysz>>3:LO_KEY_SIZE; diff --git a/util-linux-ng-fix-buffer-overflow.diff b/util-linux-ng-fix-buffer-overflow.diff deleted file mode 100644 index a1b2492..0000000 --- a/util-linux-ng-fix-buffer-overflow.diff +++ /dev/null @@ -1,55 +0,0 @@ -From 0e7b44f7f89291d8ae75e4f099d8aa2bcca1cfc5 Mon Sep 17 00:00:00 2001 -From: Ludwig Nussel -Date: Tue, 9 Oct 2007 14:34:15 +0200 -Subject: [PATCH] fix buffer overflow - -Signed-off-by: Ludwig Nussel ---- - mount/lomount.c | 13 +++++++++---- - 1 files changed, 9 insertions(+), 4 deletions(-) - -Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.c -+++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c -@@ -25,8 +25,8 @@ - #include "xstrncpy.h" - #include "nls.h" - --#ifndef MAX --#define MAX(a,b) ((a>b)?(a):(b)) -+#ifndef MIN -+#define MIN(a,b) ((a>3; - } - -+ if((unsigned)loopinfo64.lo_encrypt_key_size > sizeof(loopinfo64.lo_encrypt_key)) { -+ fprintf(stderr, _("invalid key length\n")); -+ return 1; -+ } -+ - if (phash) { - if(!strcasecmp(phash, "sha512")) { - hfunc = sha512_hash_buffer; diff --git a/util-linux.changes b/util-linux.changes index 61fb472..6098917 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,9 +1,91 @@ ------------------------------------------------------------------- -Fri Oct 12 14:52:21 CEST 2007 - lnussel@suse.de +Sun Feb 10 18:11:07 CET 2008 - lrupp@suse.de -- fix mount not checking return value of setuid (#327022, CVE-2007-5191) -- fix mount buffer overflow when reading the passphrase (#332148) -- add loop_fish2 compatability code to losetup/mount again (#332095) +- revert to 2.13.0.1+git20071121 + breaks current 'mount' call in Buildservice + +------------------------------------------------------------------- +Thu Feb 7 12:41:25 CET 2008 - mkoenig@suse.de + +- update to version 2.13.1: + mount: + * -L|-U segfault when label or uuid doesn't exist + * chain of symlinks to fstab causes use of pointer after free + * don't call canonicalize(SPEC) for cifs, smbfs and nfs + * improve error message when helper program not present + losetup: + * fix errno usage + mkswap: + * possible to crash with SELinux relabeling support + sfdisk: + * allow partitioning drives of over 2^31 sectors + hwclock: + * check for ENODEV +- mount: fix problem with device canonicalization when using + persistent name in fstab but call mount with real bd name +- patches merged: + util-linux-2.13-mount_fd_leak.patch + +------------------------------------------------------------------- +Tue Dec 18 15:55:19 CET 2007 - mkoenig@suse.de + +- add temporary workaround for broken RTC update interrupts + [#338419] + +------------------------------------------------------------------- +Mon Dec 3 11:03:57 CET 2007 - ro@suse.de + +- remove "arch", in coreutils now + +------------------------------------------------------------------- +Thu Nov 29 17:51:17 CET 2007 - lnussel@suse.de + +- update crypto patch + * fix mount buffer overflow when reading the passphrase (#332148) + * add loop_fish2 compatability code to losetup/mount again (#332095) + * change default hash size for 128bit keys to sha256 again + + +------------------------------------------------------------------- +Wed Nov 21 13:43:31 CET 2007 - mkoenig@suse.de + +- update to git20071121: + add sector size check for mkfs.minix [#308256] + fix canonicalization for cifs [#338375] +- provide Short-Description for raw init script +- add rpmlintrc + +------------------------------------------------------------------- +Tue Nov 20 17:49:35 CET 2007 - mkoenig@suse.de + +- fix raw path in init script + +------------------------------------------------------------------- +Tue Nov 6 16:11:02 CET 2007 - mkoenig@suse.de + +- update to 2.13.0.1+git20071106 +- prevent loop mounting the same file twice [#240653] +- merged upstream: + util-linux-2.13-mount_helper_fix.patch + util-linux-2.13-hwclock_rtc_option.patch + +------------------------------------------------------------------- +Thu Oct 4 22:24:04 CEST 2007 - bg@suse.de + +- don't use parisc, parisc32 and parisc64. + +------------------------------------------------------------------- +Mon Oct 1 17:08:06 CEST 2007 - mkoenig@suse.de + +- update to version 2.13 + merged upstream: + util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch + util-linux-2.13-loop.patch + util-linux-2.13-mount_create_mtab.patch + util-linux-2.13-schedutils_error_handling.patch + util-linux-2.13-sys_utils_build_rdev_x86_64.patch +- fix hwclock --rtc option [#326106] +- fix setuid/setgid mixup and error checking [#327022] ------------------------------------------------------------------- Fri Sep 14 11:24:33 CEST 2007 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 0951873..079cb95 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # -# spec file for package util-linux (Version 2.12r+2.13rc2+git20070725) +# spec file for package util-linux (Version 2.13.0.1+git20071121) # -# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -20,11 +20,11 @@ PreReq: %install_info_prereq permissions License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on -Version: 2.12r+2.13rc2+git20070725 -Release: 24.1 -%define upver 2.13rc2+git20070725 +Version: 2.13.0.1+git20071121 +Release: 22 Summary: A collection of basic system utilities -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 +Source1: util-linux-2.13-rpmlintrc Source2: nologin.c Source3: nologin.8 Source4: raw.init @@ -58,27 +58,16 @@ Patch2: util-linux-mount_opt_nofail.patch #Patch96: util-linux-2.12r-mount_external_prog_on_guess.patch # 160822 - fix for 153657 Patch3: util-linux-2.12r-fdisk_cyl.patch -# 238687 - let mkfs tools open block devices with O_EXCL -Patch4: util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch # 241372 - remove legacy warnings from fdisk Patch5: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # 254437 - swapon should automatically reset the suspend signature # TODO: Needs to be ported to new version Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch -# suse48633 - util-linux on x86_64 does not contain "rdev" and "vidmode" -Patch6: util-linux-2.13-sys_utils_build_rdev_x86_64.patch -# 297172 - mount does not free loop devices if it fails -Patch7: util-linux-2.13-loop.patch -Patch8: util-linux-2.13-mount_create_mtab.patch -Patch9: util-linux-2.13-schedutils_error_handling.patch # 304861 - support password hashing and key length -Patch10: cryptsetup-2.13-crypto.diff +Patch10: util-linux-mount_losetup_crypto.patch Patch11: util-linux-2.13-mount_fd_leak.patch Patch12: util-linux-2.13-fdisk_cfdisk_ncursesw.patch -# security fix -Patch13: util-linux-ng-CVE-2007-5191.diff -Patch14: util-linux-ng-fix-buffer-overflow.diff -Patch15: util-linux-ng-add-loop_fish2-compatability.diff +Patch13: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch ## ## ## adjtimex @@ -112,23 +101,16 @@ Authors: Karel Zak %prep -%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%upver +%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%version %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 %patch5 -p1 #%patch38 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 -%patch14 -p1 -%patch15 -p1 # cd adjtimex-* %patch50 -p1 @@ -175,7 +157,6 @@ CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE " INSTALL_PROGRAM='$(INSTALL)' \ --infodir=%{_infodir} \ %{_target_cpu}-suse-linux make -make check cd .. # klogconsole build cd klogconsole @@ -204,13 +185,16 @@ CFLAGS=-DCONFIG_SMP --enable-raw \ --enable-rdev \ --enable-write \ - --enable-arch \ --disable-use-tty-group \ CFLAGS="$CFLAGS $RPM_OPT_FLAGS" make gcc $RPM_OPT_FLAGS -o nologin nologin.c gcc $RPM_OPT_FLAGS -o mkzimage_cmdline %{S:29} +%check +cd ../time-%{time_ver} +make check + %install mkdir -p "$RPM_BUILD_ROOT"{/etc/init.d,%{_mandir}/man{1,8},\ /bin,/sbin,/usr/bin,/usr/sbin,%{_infodir}} @@ -289,7 +273,16 @@ rm -f $RPM_BUILD_ROOT/usr/bin/ppc rm -f $RPM_BUILD_ROOT/usr/bin/ppc32 rm -f $RPM_BUILD_ROOT/usr/bin/ppc64 rm -f $RPM_BUILD_ROOT/usr/bin/ia64 +rm -f $RPM_BUILD_ROOT/usr/bin/parisc +rm -f $RPM_BUILD_ROOT/usr/bin/parisc32 +rm -f $RPM_BUILD_ROOT/usr/bin/parisc64 rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/setarch.8 +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/i386.8 +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/x86_64.8 +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/linux{32,64}.8 +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/ia64.8 +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/s390{,x}.8 +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/ppc{,32,64}.8 # arch dependent %ifarch s390 s390x rm -f $RPM_BUILD_ROOT/etc/fdprm @@ -358,7 +351,6 @@ fi %config(noreplace) %attr(644,root,root) /etc/raw %config(noreplace) /etc/filesystems /usr/sbin/rcraw -/bin/arch /bin/dmesg /bin/more /bin/mount @@ -435,7 +427,6 @@ fi %{_infodir}/freeramdisk.info*.gz %{_infodir}/time.info*.gz %{_infodir}/which.info*.gz -%{_mandir}/man1/arch.1.gz %{_mandir}/man1/cal.1.gz %{_mandir}/man1/chrt.1.gz %{_mandir}/man1/col.1.gz @@ -565,33 +556,88 @@ fi #/usr/bin/i386 #/usr/bin/ia64 #%endif + %changelog -* Fri Oct 12 2007 - lnussel@suse.de -- fix mount not checking return value of setuid (#327022, CVE-2007-5191) -- fix mount buffer overflow when reading the passphrase (#332148) -- add loop_fish2 compatability code to losetup/mount again (#332095) -* Fri Sep 14 2007 - mkoenig@suse.de +* Sun Feb 10 2008 lrupp@suse.de +- revert to 2.13.0.1+git20071121 + breaks current 'mount' call in Buildservice +* Thu Feb 07 2008 mkoenig@suse.de +- update to version 2.13.1: + mount: + * -L|-U segfault when label or uuid doesn't exist + * chain of symlinks to fstab causes use of pointer after free + * don't call canonicalize(SPEC) for cifs, smbfs and nfs + * improve error message when helper program not present + losetup: + * fix errno usage + mkswap: + * possible to crash with SELinux relabeling support + sfdisk: + * allow partitioning drives of over 2^31 sectors + hwclock: + * check for ENODEV +- mount: fix problem with device canonicalization when using + persistent name in fstab but call mount with real bd name +- patches merged: + util-linux-2.13-mount_fd_leak.patch +* Tue Dec 18 2007 mkoenig@suse.de +- add temporary workaround for broken RTC update interrupts + [#338419] +* Mon Dec 03 2007 ro@suse.de +- remove "arch", in coreutils now +* Thu Nov 29 2007 lnussel@suse.de +- update crypto patch + * fix mount buffer overflow when reading the passphrase (#332148) + * add loop_fish2 compatability code to losetup/mount again (#332095) + * change default hash size for 128bit keys to sha256 again +* Wed Nov 21 2007 mkoenig@suse.de +- update to git20071121: + add sector size check for mkfs.minix [#308256] + fix canonicalization for cifs [#338375] +- provide Short-Description for raw init script +- add rpmlintrc +* Tue Nov 20 2007 mkoenig@suse.de +- fix raw path in init script +* Tue Nov 06 2007 mkoenig@suse.de +- update to 2.13.0.1+git20071106 +- prevent loop mounting the same file twice [#240653] +- merged upstream: + util-linux-2.13-mount_helper_fix.patch + util-linux-2.13-hwclock_rtc_option.patch +* Thu Oct 04 2007 bg@suse.de +- don't use parisc, parisc32 and parisc64. +* Mon Oct 01 2007 mkoenig@suse.de +- update to version 2.13 + merged upstream: + util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch + util-linux-2.13-loop.patch + util-linux-2.13-mount_create_mtab.patch + util-linux-2.13-schedutils_error_handling.patch + util-linux-2.13-sys_utils_build_rdev_x86_64.patch +- fix hwclock --rtc option [#326106] +- fix setuid/setgid mixup and error checking [#327022] +* Fri Sep 14 2007 mkoenig@suse.de - link cfdisk against libncursesw instead libncurses to fix broken utf-8 characters [#307353] -* Wed Aug 29 2007 - mkoenig@suse.de +* Wed Aug 29 2007 mkoenig@suse.de - fix fd leaks in previous patch -* Tue Aug 28 2007 - lnussel@suse.de +* Tue Aug 28 2007 lnussel@suse.de - add support for specifying the key length and password hash algorithm [#304861] -* Fri Aug 24 2007 - mkoenig@suse.de +* Fri Aug 24 2007 mkoenig@suse.de - avoid duplicates of root fs if defined with LABEL in fstab [#297959] - fix ionice error handling [#301675] -* Thu Aug 16 2007 - ssommer@suse.de +* Thu Aug 16 2007 ssommer@suse.de - free loop devices when mount fails [#297172] -* Wed Jul 25 2007 - mkoenig@suse.de +* Wed Jul 25 2007 mkoenig@suse.de - update to git20070725 - removed patches (merged upstream): util-linux-2.12r-mount_mount.8_xfs_update.patch util-linux-2.12r-sys_utils_readprofile_mapfile.patch util-linux-2.12r-disk_utils_mkswap_fix.patch util-linux-2.13-schedutils_ionice_idle.patch -* Tue Jul 17 2007 - mkoenig@suse.de +* Tue Jul 17 2007 mkoenig@suse.de - updated to version 2.13-rc2: * add wakertc - cleanup ionice usage [#270251] @@ -605,7 +651,7 @@ fi util-linux-2.12a-mount_mountpointwithcolon.patch util-linux-2.12a-mount_procswapcheck.patch util-linux-2.12q-mount_umount2_not_static.patch -* Fri Jul 13 2007 - mkoenig@suse.de +* Fri Jul 13 2007 mkoenig@suse.de - replace hotplug with nofail option and fix it to not use syscall reserved values. - removed patch @@ -613,16 +659,16 @@ fi it is intentional that suid hwclock capabilities are limited - removed patch (fixed upstream) util-linux-2.12q-mount_--move.patch -* Mon Jul 09 2007 - mkoenig@suse.de +* Mon Jul 09 2007 mkoenig@suse.de - add libuuid-devel to BuildRequires to let mkswap use UUIDs -* Thu Jul 05 2007 - mkoenig@suse.de +* Thu Jul 05 2007 mkoenig@suse.de - use %%config(noreplace) for /etc/filesystems - Keep rdev stuff for x86_64 util-linux-2.13-sys_utils_build_rdev_x86_64.patch - removed patches (merged upstream) util-linux-2.12r-misc_utils_cal_formatting.patch util-linux-2.12q-sys_utils_ionice.patch -* Thu Jul 05 2007 - mkoenig@suse.de +* Thu Jul 05 2007 mkoenig@suse.de - update to 2.13-rc1: * mount fixes * agetty: add 'O' escape code to display domain name @@ -636,23 +682,23 @@ fi util-linux-2.13-misc_utils_cal_ncurses.patch util-linux-2.13-mount_volumeid_label.patch - use %%find_lang -* Thu Jun 21 2007 - mkoenig@suse.de +* Thu Jun 21 2007 mkoenig@suse.de - use encoded label names with volume_id [#232929] util-linux-2.13-mount_volumeid_label.patch -* Thu Jun 14 2007 - mkoenig@suse.de +* Thu Jun 14 2007 mkoenig@suse.de - mkzimage_cmdline: activate commandline if used with -s [#279935] -* Wed Jun 13 2007 - mkoenig@suse.de +* Wed Jun 13 2007 mkoenig@suse.de - schedutils: let chrt accept pid 0 for current process and fix some documentation bugs [#266879] util-linux-2.13-schedutils_chrt.patch -* Wed Jun 06 2007 - mkoenig@suse.de +* Wed Jun 06 2007 mkoenig@suse.de - update to git20070530 - removed patches util-linux-2.13-mount_volume_id.patch util-linux-2.12r-mount_by_uuid.patch util-linux-2.13-build_gnu_source.patch - fix build with ncurses -* Tue Jun 05 2007 - mkoenig@suse.de +* Tue Jun 05 2007 mkoenig@suse.de - update to git20070509 mount: NFS code removed (use mount.nfs{,4} from nfs-utils) - remove sm-notify (nfs-utils) @@ -669,16 +715,16 @@ fi util-linux-2.13-mount_nfs_timeo.patch util-linux-mount_nfs.8.patch util-linux-mount_warn_nfsudp.patch -* Tue Jun 05 2007 - pth@suse.de +* Tue Jun 05 2007 pth@suse.de - Update to which-2.16, mainly because regenerating configure with newer autotools works. - Fix the patch for AC_CHECK_STATICLIB - Our distribution doesn't install libiberty.a, so pass --disable-iberty to configure of which to not use a libiberty from somewhere else. -* Mon Jun 04 2007 - pth@suse.de +* Mon Jun 04 2007 pth@suse.de - Make configure of which search for static libs in lib64 subdirs. -* Mon Apr 23 2007 - mkoenig@suse.de +* Mon Apr 23 2007 mkoenig@suse.de - update to git20070412 - remove chkdupexe and scriptreplay to get rid of the perl dependency [#265757] @@ -687,10 +733,10 @@ fi - merged patches: util-linux-2.13-misc_utils_add_man_scriptreplay.patch util-linux-2.13-tests_missing_include.patch -* Mon Apr 16 2007 - mkoenig@suse.de +* Mon Apr 16 2007 mkoenig@suse.de - fix initialization of offset in util-linux-2.12r-mount_racy_loop.patch [#264225] -* Tue Apr 10 2007 - mkoenig@suse.de +* Tue Apr 10 2007 mkoenig@suse.de - update to version git20070330 of new forked development tree - removed Suse crypto patches for losetup [FATE#302001] - removed binaries: @@ -730,205 +776,205 @@ fi detect also x86_64 as INTEL architecture - rename patches to identify them clearly by subsystem - schedutils now part of util-linux itself -* Wed Apr 04 2007 - mkoenig@suse.de +* Wed Apr 04 2007 mkoenig@suse.de - add Supplements line [FATE#301966] -* Mon Mar 26 2007 - rguenther@suse.de +* Mon Mar 26 2007 rguenther@suse.de - add ncurses-devel and zlib-devel BuildRequires -* Thu Mar 15 2007 - mkoenig@suse.de +* Thu Mar 15 2007 mkoenig@suse.de - mount: Let swapon automatically reinitialize a suspended swap partition [#254437] -* Fri Mar 09 2007 - mkoenig@suse.de +* Fri Mar 09 2007 mkoenig@suse.de - mount: fix mtablock patch to avoid mtab corruption [#226783] -* Thu Mar 08 2007 - mkoenig@suse.de +* Thu Mar 08 2007 mkoenig@suse.de - partx: fix warning for too long literal -* Wed Mar 07 2007 - rguenther@suse.de +* Wed Mar 07 2007 rguenther@suse.de - fix changelog entry order -* Tue Feb 27 2007 - mkoenig@suse.de +* Tue Feb 27 2007 mkoenig@suse.de - fix missing return code in util-linux-2.12r-losetup_password.patch - mount: fix race condition in mount -o loop [#242750] -* Mon Feb 12 2007 - mkoenig@suse.de +* Mon Feb 12 2007 mkoenig@suse.de - remove legacy warnings from fdisk [#241372] -* Fri Feb 02 2007 - mkoenig@suse.de +* Fri Feb 02 2007 mkoenig@suse.de - do not use O_EXCL for mkfs.cramfs [#241466] -* Wed Jan 31 2007 - mkoenig@suse.de +* Wed Jan 31 2007 mkoenig@suse.de - let mkfs tools open with O_EXCL [#238687] -* Tue Dec 12 2006 - mkoenig@suse.de +* Tue Dec 12 2006 mkoenig@suse.de - provide different return codes for losetup with encryption for empty and too short passwords. [#197493] -* Tue Dec 05 2006 - mkoenig@suse.de +* Tue Dec 05 2006 mkoenig@suse.de - default swap to V1 in any case [#205956] patch: util-linux-2.12r-mkswap_fix.patch - do not append addr option with each nfs remount [#130625] patch: util-linux-2.12r-nfs_remount_options.patch - add README.largedisk about fdisk partition size constraints [#153657] -* Tue Nov 07 2006 - mkoenig@suse.de +* Tue Nov 07 2006 mkoenig@suse.de - enable partx [#214992] -* Tue Oct 10 2006 - mkoenig@suse.de +* Tue Oct 10 2006 mkoenig@suse.de - Round up partition end LBA to a cylinder boundary during add_partition() [#174892] - Fix readprofile on ppc64 [#179122] - Fix cal formatting bug [#203469] -* Mon Oct 09 2006 - mkoenig@suse.de +* Mon Oct 09 2006 mkoenig@suse.de - Fix llseek issues. - swapon.c: Do not use PAGE_SIZE macro. -* Mon Aug 21 2006 - mkoenig@suse.de +* Mon Aug 21 2006 mkoenig@suse.de - Added sysfs to list of filesystems not to unmount with umount -a, resolves #190385 -* Mon Jun 12 2006 - kay.sievers@suse.de +* Mon Jun 12 2006 kay.sievers@suse.de - use libvolume_id from provided as a rpm by udev 094 -* Wed May 17 2006 - jeffm@suse.com +* Thu May 18 2006 jeffm@suse.com - Fixed support for calling external programs w/o -t , it would add mtab twice [#176582] -* Mon Apr 24 2006 - hvogel@suse.de +* Mon Apr 24 2006 hvogel@suse.de - document xfs dmapi mount options better [#158955] -* Fri Apr 21 2006 - olh@suse.de +* Fri Apr 21 2006 olh@suse.de - add mkzimage_cmdline to edit CHRP zImage kernel cmdline (168313) -* Tue Apr 18 2006 - hvogel@suse.de +* Tue Apr 18 2006 hvogel@suse.de - fix number of supported raw devices [#165570] -* Wed Mar 29 2006 - olh@suse.de +* Wed Mar 29 2006 olh@suse.de - clearify comments about mac disk label handling in fdisk -* Tue Mar 28 2006 - hvogel@suse.de +* Tue Mar 28 2006 hvogel@suse.de - more fixes for the fdiskwrap patch [#160822] -* Tue Mar 21 2006 - okir@suse.de +* Tue Mar 21 2006 okir@suse.de - Update nfs(5) manpage to document security flavors [#159368] -* Mon Mar 20 2006 - hvogel@suse.de +* Mon Mar 20 2006 hvogel@suse.de - fix numbers of supported raw devices to match the kernel [#158203] - make NFSv3 client support RPCSEC_GSS [#158401] - fix that if the user doesn't specify -t mount.fstype will never be called. [#155147] -* Fri Mar 10 2006 - hvogel@suse.de +* Fri Mar 10 2006 hvogel@suse.de - Fix init.d/raw script to parse device names with , in them correctly [#155653] -* Thu Mar 09 2006 - hare@suse.de +* Thu Mar 09 2006 hare@suse.de - Fix potential security hole in libvolume_id (#133256) -* Mon Mar 06 2006 - hvogel@suse.de +* Mon Mar 06 2006 hvogel@suse.de - patch fdiskmaclabel.h too -* Thu Mar 02 2006 - hvogel@suse.de +* Thu Mar 02 2006 hvogel@suse.de - axboe made fdisk not wrap at 2TB [#153657] -* Fri Feb 17 2006 - lmuelle@suse.de +* Fri Feb 17 2006 lmuelle@suse.de - Use cifs instead of smbfs if the source starts with // and we do not set a different fs type. -* Sun Feb 12 2006 - olh@suse.de +* Sun Feb 12 2006 olh@suse.de - cosmetic fix for option_hotplug declaration fix unininitalized string for unknown filesystems (#148855) -* Fri Feb 10 2006 - hvogel@suse.de +* Fri Feb 10 2006 hvogel@suse.de - mount should not put / in the mtab twice if mount -f / is called [#148409] - fix hostid printf [#149163] -* Wed Feb 01 2006 - olh@suse.de +* Wed Feb 01 2006 olh@suse.de - dont invent our own MS_FLAGS (#147132) -* Wed Feb 01 2006 - ro@suse.de +* Wed Feb 01 2006 ro@suse.de - fix typo in previous change, binary negation is "~" -* Fri Jan 27 2006 - sscheler@suse.de +* Fri Jan 27 2006 sscheler@suse.de - fixed mount hotplug option (#143352). now we don't send the MS_HOTPLUG flag to the kernel any longer, because the kernel doesn't know this option (EINVAL) and actually doesn't need to know about it. -* Fri Jan 27 2006 - olh@suse.de +* Fri Jan 27 2006 olh@suse.de - remove clock symlink, hwclock exists since 7 years -* Fri Jan 27 2006 - olh@suse.de +* Fri Jan 27 2006 olh@suse.de - lsprop and nvsetenv moved to powerpc-utils [#144758] -* Thu Jan 26 2006 - hvogel@suse.de +* Thu Jan 26 2006 hvogel@suse.de - Make nfsboot world readable [#145418] -* Wed Jan 25 2006 - mls@suse.de +* Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires -* Tue Jan 24 2006 - mmj@suse.de +* Tue Jan 24 2006 mmj@suse.de - Remove faulty nfs fallback code [#139019] -* Mon Jan 16 2006 - mmj@suse.de +* Mon Jan 16 2006 mmj@suse.de - Add patch for nsetenv to fix short reads/short writes [#142546] -* Wed Jan 11 2006 - mmj@suse.de +* Wed Jan 11 2006 mmj@suse.de - Update sm-notify [#141542] -* Wed Jan 04 2006 - mmj@suse.de +* Wed Jan 04 2006 mmj@suse.de - Update to 2.12r including since 2.12q: o cfdisk: fix a segfault with ReiserFS partitions o umount: disallow -r option for non-root users -* Tue Nov 22 2005 - mmj@suse.de +* Tue Nov 22 2005 mmj@suse.de - install proper renice manpage [#132470] -* Tue Nov 15 2005 - uli@suse.de +* Tue Nov 15 2005 uli@suse.de - umount2 is not static (only fails on ARM, surprisingly) - added ARM ionice syscalls -* Fri Nov 11 2005 - hare@suse.de +* Fri Nov 11 2005 hare@suse.de - Fix reverse-mapping of by-UUID and by-LABEL mounts. -* Thu Nov 10 2005 - hare@suse.de +* Thu Nov 10 2005 hare@suse.de - Fix a mishandling of by-UUID mounts. - Use libvolume_id from udev. -* Sat Oct 22 2005 - mmj@suse.de +* Sat Oct 22 2005 mmj@suse.de - Increase lsprop.c max property size to 4k [#128155] -* Mon Oct 10 2005 - mmj@suse.de +* Mon Oct 10 2005 mmj@suse.de - Add -fno-strict-aliasing to nfsmount_xdr.c -* Mon Oct 03 2005 - mmj@suse.de +* Mon Oct 03 2005 mmj@suse.de - Teach the mount manual page about nodiratime [#118987] -* Thu Sep 29 2005 - mmj@suse.de +* Thu Sep 29 2005 mmj@suse.de - Patch from jakub007@go2.pl to make mount --move update /etc/mtab correctly [#115129] -* Tue Sep 13 2005 - mmj@suse.de +* Tue Sep 13 2005 mmj@suse.de - Only allow root to pass -r to umount [#116741] -* Mon Sep 05 2005 - mmj@suse.de +* Mon Sep 05 2005 mmj@suse.de - MAC -> Mac [#104081] -* Fri Sep 02 2005 - mmj@suse.de +* Fri Sep 02 2005 mmj@suse.de - Don't package manual executable [#114849] -* Thu Sep 01 2005 - mmj@suse.de +* Thu Sep 01 2005 mmj@suse.de - Add patch for device-mapper mount by label support [#75966] -* Thu Sep 01 2005 - ro@suse.de +* Thu Sep 01 2005 ro@suse.de - provide and obsolete schedutils -* Tue Aug 23 2005 - hvogel@suse.de +* Tue Aug 23 2005 hvogel@suse.de - update ionice patch by axboe so that ionice will complain about missing sys_ioprio_set support, but it will still execute the process. -* Mon Aug 22 2005 - hvogel@suse.de +* Mon Aug 22 2005 hvogel@suse.de - Fix rpm verify output [#105807] (ghost entry for /var/lib/nfs/state) -* Mon Aug 22 2005 - schwab@suse.de +* Mon Aug 22 2005 schwab@suse.de - Fix stupid buffer overflow bug in cfdisk [#66020]. -* Wed Aug 17 2005 - hare@suse.de +* Wed Aug 17 2005 hare@suse.de - Add option 'hotplug' to mount (#104405) -* Mon Aug 15 2005 - schwab@suse.de +* Mon Aug 15 2005 schwab@suse.de - Always build with RPM_OPT_FLAGS. -* Thu Aug 11 2005 - mmj@suse.de +* Thu Aug 11 2005 mmj@suse.de - Patch from Patrick Kirsch to make fdisk detect MAC-fs [#104081] -* Wed Aug 03 2005 - mmj@suse.de +* Wed Aug 03 2005 mmj@suse.de - Merge schedutils to here (it's happened upstream already) -* Tue Aug 02 2005 - mmj@suse.de +* Tue Aug 02 2005 mmj@suse.de - Support for s390 and s390x -* Mon Aug 01 2005 - mmj@suse.de +* Mon Aug 01 2005 mmj@suse.de - It's not __ppc_ and __ppc64__ but __powerpc__ and __powerpc64__ -* Mon Aug 01 2005 - mmj@suse.de +* Mon Aug 01 2005 mmj@suse.de - Add ionice binary from Jens Axboe -* Wed Jun 29 2005 - mmj@suse.de +* Wed Jun 29 2005 mmj@suse.de - Document load and clearly issues about NFS over UDP [#80263] - Don't compile with -fsigned-char [#93886] -* Tue May 31 2005 - okir@suse.de +* Tue May 31 2005 okir@suse.de - Added NFSv4 support -* Mon May 09 2005 - hvogel@suse.de +* Mon May 09 2005 hvogel@suse.de - move hashalot and cryptsetup tools to util-linux-crypto -* Tue Apr 12 2005 - mmj@suse.de +* Tue Apr 12 2005 mmj@suse.de - bump TCP timeo to 600 [#76198] -* Tue Mar 29 2005 - mmj@suse.de +* Tue Mar 29 2005 mmj@suse.de - Add awareness of twofishSL92 [#74359] - Update hashalot to version 0.3 -* Mon Mar 14 2005 - okir@suse.de +* Mon Mar 14 2005 okir@suse.de - Changed sm-notify to recognize host names as well as addresses. -* Thu Mar 10 2005 - mmj@suse.de +* Thu Mar 10 2005 mmj@suse.de - Don't strip anything explicitly - Don't compile with -fno-strict-aliasing [#66020] -* Fri Feb 04 2005 - schwab@suse.de +* Fri Feb 04 2005 schwab@suse.de - Fix stupid programmer. -* Mon Jan 24 2005 - meissner@suse.de +* Mon Jan 24 2005 meissner@suse.de - implicit strcmp / strerror in setctsid fixed. - 0 -> NULL in an execl -* Fri Jan 21 2005 - mmj@suse.de +* Fri Jan 21 2005 mmj@suse.de - Sleep after inserting the raw module to make sure it's ready [#49807] - Update to 2.12q including since 2.12p: o New upstream maintainer - Adrian Bunk o sfdisk: add -G option o Updated translations -* Tue Jan 18 2005 - okir@suse.de +* Tue Jan 18 2005 okir@suse.de - Updated sm-notify; try not to stall bootup my moving the NSM state update after we've backgrounded (#49072). -* Mon Jan 10 2005 - mmj@suse.de +* Mon Jan 10 2005 mmj@suse.de - Update adjtimex to 1.20 - Update to util-linux-2.12p including since 2.12i: o cfdisk: fix number of new partition when partitions not in disk order @@ -966,15 +1012,15 @@ fi o umount: use special umount program if it exists o new flock binary o New messages -* Tue Nov 30 2004 - mmj@suse.de +* Tue Nov 30 2004 mmj@suse.de - Install ramsize, rdev, rootflags and vidmode on x86-64 [#48633] -* Fri Nov 12 2004 - schwab@suse.de +* Fri Nov 12 2004 schwab@suse.de - Don't install *fdisk on ia64. -* Fri Nov 12 2004 - ro@suse.de +* Fri Nov 12 2004 ro@suse.de - correct permissions handling for wall and write -* Tue Nov 09 2004 - mmj@suse.de +* Tue Nov 09 2004 mmj@suse.de - Fix segfault with mount -l [#48029] -* Fri Nov 05 2004 - mmj@suse.de +* Fri Nov 05 2004 mmj@suse.de - Update to util-linux-2.12i including: o MCONFIG: fix build conditions o chfn, chsh: add error checking @@ -986,7 +1032,7 @@ fi o sfdisk: correct typo in __attribute__used nonsense o sfdisk: use PACKED on __arm__ o sfdisk: fix warning printout -* Thu Nov 04 2004 - mmj@suse.de +* Thu Nov 04 2004 mmj@suse.de - Update to util-linux-2.12h including: o cfdisk: avoid crash if no partition table o elvtune: tell user that this only works on 2.4 kernels @@ -1001,19 +1047,19 @@ fi o mount: support jfs mount-by-label, improve reiserfs support o sfdisk: remove strange "ends in a digit" heuristic o *fdisk: use common disksize() routine -* Tue Oct 19 2004 - mmj@suse.de +* Tue Oct 19 2004 mmj@suse.de - Add patch from SGI for fdisk label [#47368] -* Tue Sep 28 2004 - mmj@suse.de +* Tue Sep 28 2004 mmj@suse.de - And another one [#46201] -* Wed Sep 15 2004 - mmj@suse.de +* Thu Sep 16 2004 mmj@suse.de - Add patch from Andries to fix cfdisk [#44996] -* Tue Sep 07 2004 - mmj@suse.de +* Tue Sep 07 2004 mmj@suse.de - Update to util-linux-2.12c including: o mount.8: added recent ext2 mount options o mount: support jfs mount-by-label, improve reiserfs support o sfdisk: remove strange "ends in a digit" heuristic o *fdisk: use common disksize() routine [#44678] -* Wed Aug 25 2004 - mmj@suse.de +* Wed Aug 25 2004 mmj@suse.de - Update to util-linux-2.12b including: o chsh: improved error message o dmesg: ask kernel proper buffer size @@ -1038,36 +1084,36 @@ fi Turkish, Ukrainian messages - Update the loop-AES patch, thanks to Sumit Bose - Change the minimum password length to 8 chars -* Tue Aug 24 2004 - mmj@suse.de +* Tue Aug 24 2004 mmj@suse.de - Fix signed/unsigned bug in lsprop [#44048] -* Wed Aug 18 2004 - mmj@suse.de +* Wed Aug 18 2004 mmj@suse.de - Readd patch that got lost to make fdisk -l work better with RAID controllers [#43485] -* Mon Aug 09 2004 - mmj@suse.de +* Mon Aug 09 2004 mmj@suse.de - Add an improved version of the dmesg bufsize patch. -* Tue Jun 22 2004 - mmj@suse.de +* Tue Jun 22 2004 mmj@suse.de - Add patch to try and guess a filesystem type before blindly assuming it's nfs because of the colon [#42097] -* Mon Jun 14 2004 - agruen@suse.de +* Mon Jun 14 2004 agruen@suse.de - Formatting error in mount.8 manual page. -* Wed Jun 09 2004 - mmj@suse.de +* Wed Jun 09 2004 mmj@suse.de - Add patch from Olaf Kirch to make protocol selection for mount independent of protocol selection for NFS, and picks what is available (preferring TCP over UDP) [#41735] -* Wed Jun 09 2004 - mls@suse.de +* Wed Jun 09 2004 mls@suse.de - add '-f' option to setctsid -* Thu May 27 2004 - okir@suse.de +* Thu May 27 2004 okir@suse.de - sm-notify now binds to a reserved port -* Sat May 15 2004 - mmj@suse.de +* Sat May 15 2004 mmj@suse.de - Add documentation about raw device handling [#39037] -* Mon May 10 2004 - mmj@suse.de +* Mon May 10 2004 mmj@suse.de - Make dmesg dump entire buffer. Patch from Andries/odabrunz [#39761] -* Thu May 06 2004 - mmj@suse.de +* Thu May 06 2004 mmj@suse.de - Also check if the device is the same when doing swapon. Could be the same block device with 2 different names [#39436] -* Wed May 05 2004 - mmj@suse.de +* Wed May 05 2004 mmj@suse.de - Do a /sbin/modprobe raw when invoking raw devices [#39037] -* Tue Apr 20 2004 - mmj@suse.de +* Tue Apr 20 2004 mmj@suse.de - Update to 2.12a including: o fdisk: fix for kernels 2.4.15-2.4.17 o fdisk: fix when all partitions are in use @@ -1081,67 +1127,67 @@ fi o setterm.1: clarification o sfdisk: fix check for is_ide_cdrom_or_tape o umount: skip proc, devfs, devpts on umount -a -* Mon Apr 19 2004 - mmj@suse.de +* Mon Apr 19 2004 mmj@suse.de - Add patch for unlimited raw devices [#39037] -* Thu Apr 15 2004 - mmj@suse.de +* Thu Apr 15 2004 mmj@suse.de - Make sm-notify be more quiet when nothing wrong, and log to sys- log when something is. -* Tue Apr 06 2004 - mmj@suse.de +* Tue Apr 06 2004 mmj@suse.de - Don't use startproc for sm-notify [#38481] -* Mon Apr 05 2004 - mmj@suse.de +* Mon Apr 05 2004 mmj@suse.de - Removing elvtune alltogether was a bit drastic, since it of course works fine with 2.4 kernels. So print a warning in case the BLKELVGET ioctl returns something indicating 2.6 kernels. -* Thu Apr 01 2004 - mmj@suse.de +* Thu Apr 01 2004 mmj@suse.de - Don't package elvtune anymore since it's obsolete now that io scheduler can be tuned in /sys/block/hdX/queue/iosched/* [#37869] -* Wed Mar 31 2004 - mmj@suse.de +* Wed Mar 31 2004 mmj@suse.de - Apply util-linux-2.12a fixes for hwclock and readprofile. The hwclock bit is a timout fix which hopefully fixes [#35877] - Move sm-notify to here from nfs-utils [#36737] -* Mon Mar 29 2004 - mmj@suse.de +* Mon Mar 29 2004 mmj@suse.de - Adjust warnings about Crypto-API -* Sun Mar 28 2004 - mmj@suse.de +* Sun Mar 28 2004 mmj@suse.de - Add patch to make script allways use the same LC_NUMERIC [#35476] -* Fri Mar 26 2004 - od@suse.de +* Fri Mar 26 2004 od@suse.de - Add setctsid by Werner Fink [#37177] -* Fri Mar 26 2004 - mmj@suse.de +* Fri Mar 26 2004 mmj@suse.de - Mount option "code" is now "codepage" so update /etc/fstab in postinstall [#36950] -* Fri Mar 26 2004 - mmj@suse.de +* Fri Mar 26 2004 mmj@suse.de - Remove false statement in nfs.5 about the linux kernel not supporting nfs over tcp [#37060] -* Wed Mar 17 2004 - mmj@suse.de +* Wed Mar 17 2004 mmj@suse.de - Use correct permissions for README.hashalot [#36303] -* Mon Mar 08 2004 - mmj@suse.de +* Mon Mar 08 2004 mmj@suse.de - Enable build of replay [#35434] -* Wed Feb 25 2004 - mmj@suse.de +* Wed Feb 25 2004 mmj@suse.de - Use loop-AES-v2.0f-util-linux-2.12.diff instead of losetup patch added earlier. Thanks Sumit Bose! -* Thu Feb 19 2004 - mmj@suse.de +* Thu Feb 19 2004 mmj@suse.de - Add cryptsetup script from Christophe Saout, for usage with the new dm-crypt. -* Mon Feb 16 2004 - mmj@suse.de +* Mon Feb 16 2004 mmj@suse.de - Add losetup patch and hashalot program from Ben Slusky -* Sun Feb 01 2004 - kukuk@suse.de +* Sun Feb 01 2004 kukuk@suse.de - Remove newgrp again (will use POSIX conform version) -* Fri Jan 16 2004 - kukuk@suse.de +* Fri Jan 16 2004 kukuk@suse.de - Add pam-devel to neededforbuild -* Mon Jan 12 2004 - mmj@suse.de +* Mon Jan 12 2004 mmj@suse.de - Adjust the nfs.5 manual page to reflect we're mounting nfs over tcp pr. default. - Collapse two similar patches 2 one. -* Fri Dec 19 2003 - garloff@suse.de +* Fri Dec 19 2003 garloff@suse.de - Fix by okir for previous patch. -* Fri Dec 19 2003 - garloff@suse.de +* Fri Dec 19 2003 garloff@suse.de - Add patch to fallback to UDP if TCP NFS mount fails. -* Tue Dec 02 2003 - mmj@suse.de +* Tue Dec 02 2003 mmj@suse.de - Make patch to guess if a CD is a CD-Extra [#30316] - Adjust patch that moves ext2/3 in front of vfat - Regenerate patches (filename still tells when they were added) -* Tue Nov 18 2003 - mmj@suse.de +* Tue Nov 18 2003 mmj@suse.de - Mount NFS over TCP pr. default [#33018] -* Thu Nov 13 2003 - mmj@suse.de +* Thu Nov 13 2003 mmj@suse.de - Update to util-linux-2.12 including: o losetup: -p option specifies fd for passphrase o fdisk: sgi layout fix @@ -1172,64 +1218,64 @@ fi o sfdisk.8: added an example of partitioning with logical partitions o sfdisk: only add a AA55 signature for DOS-type partition tables o tailf: new -* Tue Oct 21 2003 - mmj@suse.de +* Tue Oct 21 2003 mmj@suse.de - Correct permissions -* Tue Oct 21 2003 - ja@suse.cz +* Tue Oct 21 2003 ja@suse.cz - added support for cryptoloop in 2.6.x kernels. -* Wed Oct 15 2003 - mmj@suse.de +* Wed Oct 15 2003 mmj@suse.de - Don't build as root -* Mon Oct 13 2003 - kukuk@suse.de +* Mon Oct 13 2003 kukuk@suse.de - Enable newgrp -* Thu Oct 02 2003 - kukuk@suse.de +* Thu Oct 02 2003 kukuk@suse.de - Fix compiling with kernel 2.6.0-test6 header files -* Tue Aug 12 2003 - mmj@suse.de +* Tue Aug 12 2003 mmj@suse.de - Update to pmac-utils-2.1 sources and only include nvsetenv -* Tue Aug 12 2003 - mmj@suse.de +* Tue Aug 12 2003 mmj@suse.de - Add mount_guessfstype support for PCDOS [#27814] -* Wed Jun 18 2003 - ak@suse.de +* Wed Jun 18 2003 ak@suse.de - support noreserved option for NFS (#27428) -* Thu Jun 05 2003 - mmj@suse.de +* Thu Jun 05 2003 mmj@suse.de - Rearrange the specfile wrt. archs -* Tue May 13 2003 - mmj@suse.de +* Tue May 13 2003 mmj@suse.de - Use %%defattr - Remove files we don't package -* Wed May 07 2003 - mmj@suse.de +* Wed May 07 2003 mmj@suse.de - Rearrange the do_guess_fstype() code to look for ext2/3 before vfat [#26581] -* Thu Apr 24 2003 - ro@suse.de +* Thu Apr 24 2003 ro@suse.de - fix install_info --delete call and move from preun to postun -* Mon Apr 14 2003 - pthomas@suse.de +* Mon Apr 14 2003 pthomas@suse.de - Get rid of the syscall for adjtimex in selective cases and just call the glibc wrapper. Fixes build on s390. -* Mon Apr 14 2003 - pthomas@suse.de +* Mon Apr 14 2003 pthomas@suse.de - Use geteuid instead of getuid in hwclock to enable making hwclock suid root. -* Mon Apr 07 2003 - mmj@suse.de +* Mon Apr 07 2003 mmj@suse.de - Only delete info entries when removing last version. -* Thu Mar 13 2003 - mmj@suse.de +* Thu Mar 13 2003 mmj@suse.de - Apply patch to make sfdisk not destroy BSD slices [#25093] -* Mon Mar 03 2003 - mmj@suse.de +* Mon Mar 03 2003 mmj@suse.de - Remove superflous umask(033); calls [#23292] -* Mon Mar 03 2003 - ro@suse.de +* Mon Mar 03 2003 ro@suse.de - add missing info dir entries -* Tue Feb 18 2003 - agruen@suse.de +* Tue Feb 18 2003 agruen@suse.de - Add description of the effect of `mount -t nfs -o noacl' on the use of the GETACL and SETACL remote procedure calls to the nfs(5) manual page. -* Mon Feb 17 2003 - mmj@suse.de +* Mon Feb 17 2003 mmj@suse.de - It's called smbfs not smb [#23697] -* Thu Feb 13 2003 - mmj@suse.de +* Thu Feb 13 2003 mmj@suse.de - Readd patch for passphrase timeout that got lost [#23527] -* Fri Feb 07 2003 - mmj@suse.de +* Fri Feb 07 2003 mmj@suse.de - The install_info macros need PreReq: %%install_info_prereq -* Fri Feb 07 2003 - ro@suse.de +* Fri Feb 07 2003 ro@suse.de - added install_info macros -* Tue Feb 04 2003 - ro@suse.de +* Tue Feb 04 2003 ro@suse.de - don't package /bin/kill (part of coreutils now) -* Tue Feb 04 2003 - meissner@suse.de +* Tue Feb 04 2003 meissner@suse.de - Include tarball with pmac-utils manpages, so we do not need sgmltool and all its dependents. -* Wed Jan 29 2003 - mmj@suse.de +* Wed Jan 29 2003 mmj@suse.de - Update to util-linux-2.11z including: · Translation updates · mount: fix LABEL= handling for user umount, don't abort on read @@ -1237,22 +1283,22 @@ fi · setterm: accept devfs name · simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails · umount: allow user umount after mount by label or uuid -* Wed Jan 22 2003 - sf@suse.de +* Wed Jan 22 2003 sf@suse.de - removed last patch, added new (correct) patch -* Wed Jan 22 2003 - sf@suse.de +* Wed Jan 22 2003 sf@suse.de - removed eliminate_doubles() from mkfs.cramfs.c for x86_64, as it segfaults. (makes the images slightly larger, about 10%%) -* Tue Jan 21 2003 - mmj@suse.de +* Tue Jan 21 2003 mmj@suse.de - Added description of ISO mount options to mount.8 [#22915] -* Mon Dec 02 2002 - mmj@suse.de +* Mon Dec 02 2002 mmj@suse.de - Update the ReiserFS patch from Chris Mason -* Fri Nov 29 2002 - mmj@suse.de +* Fri Nov 29 2002 mmj@suse.de - Fix missing #include -* Thu Nov 28 2002 - mmj@suse.de +* Thu Nov 28 2002 mmj@suse.de - Make readprofile also try to locate the System.map in /boot/System.map-`uname -r` [#22168] -* Wed Nov 27 2002 - mmj@suse.de +* Wed Nov 27 2002 mmj@suse.de - Update to util-linux-2.11y including: o Translation updates o fdisk,cfdisk: cosmetic fixes @@ -1260,7 +1306,7 @@ fi o more: kill external help file o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC fails (patch we had, now folded upstream) -* Wed Nov 20 2002 - mmj@suse.de +* Wed Nov 20 2002 mmj@suse.de - Update to util-linux-2.11x including: o Translation updates for several languages o cfdisk: correct error printout @@ -1273,56 +1319,56 @@ fi o setpwnam.c: open temp pw file with O_EXCL o simpleinit: fix for "spawn too fast" o swapon: new -e option -* Tue Nov 19 2002 - mmj@suse.de +* Tue Nov 19 2002 mmj@suse.de - Fix multistring assignment in adjtimex -* Mon Nov 11 2002 - ro@suse.de +* Mon Nov 11 2002 ro@suse.de - changed neededforbuild to - changed neededforbuild to <> -* Thu Oct 31 2002 - mmj@suse.de +* Thu Oct 31 2002 mmj@suse.de - Add -b option to mkfs.cramfs (needed for biarch architectures) -* Thu Oct 31 2002 - ro@suse.de +* Thu Oct 31 2002 ro@suse.de - hack time to build on alpha -* Tue Oct 22 2002 - mmj@suse.de +* Tue Oct 22 2002 mmj@suse.de - Add correction to the ReiserFS patch that fixes the case where it was possible but unlikely to detect a logged copy of a super on a dedicated logging device as the real thing. From Chris Mason. -* Tue Oct 22 2002 - mmj@suse.de +* Tue Oct 22 2002 mmj@suse.de - Update to util-linux-2.11w including: o fdisk and cfdisk fixes o more bigendian fix o translation updates o > 2GB swapspace o mount umask, cramfs and ocfs stuff -* Tue Oct 08 2002 - mmj@suse.de +* Tue Oct 08 2002 mmj@suse.de - Only enable below patch on ix86 and x86_64 -* Mon Oct 07 2002 - mmj@suse.de +* Mon Oct 07 2002 mmj@suse.de - Make small bugfix to below patch -* Sat Oct 05 2002 - mmj@suse.de +* Sat Oct 05 2002 mmj@suse.de - Apply patch to enable > 2GB swap (redhat) [#20533] -* Wed Oct 02 2002 - mmj@suse.de +* Wed Oct 02 2002 mmj@suse.de - Add one-liner security fix to mount and umount. -* Mon Sep 23 2002 - mmj@suse.de +* Mon Sep 23 2002 mmj@suse.de - Readd fix for klogconsole that got lost [#19834] -* Fri Sep 13 2002 - mmj@suse.de +* Fri Sep 13 2002 mmj@suse.de - Added patch from Oracle to mount ocfs by label [#19262] -* Thu Sep 12 2002 - mmj@suse.de +* Thu Sep 12 2002 mmj@suse.de - more: Do not cast char * to int and back [#18896] -* Sat Aug 31 2002 - olh@suse.de +* Sat Aug 31 2002 olh@suse.de - add mount_cramfs_be.diff to allow mount -oloop cramfsfile loopdir -* Mon Aug 26 2002 - mmj@suse.de +* Mon Aug 26 2002 mmj@suse.de - Make mode not 666 when writing /etc/mtab [#18342] -* Mon Aug 26 2002 - meissner@suse.de +* Mon Aug 26 2002 meissner@suse.de - quieten klogconsole if the console does not support TIOCLINUX [#12516] -* Thu Aug 22 2002 - mmj@suse.de +* Thu Aug 22 2002 mmj@suse.de - Added patch from Andreas Gruenbacher for nfs-access-acl [#18183] -* Wed Aug 21 2002 - mmj@suse.de +* Wed Aug 21 2002 mmj@suse.de - Fixed an mtab locking bug with patch from Olaf Kirch [#17637] -* Mon Aug 19 2002 - mmj@suse.de +* Mon Aug 19 2002 mmj@suse.de - Updated reiserfs patch from Chris Mason - Added patch for mount.8, thanks Andreas Gruenbacher -* Thu Aug 15 2002 - mmj@suse.de +* Thu Aug 15 2002 mmj@suse.de - Correct PreReq: -* Mon Aug 05 2002 - mmj@suse.de +* Mon Aug 05 2002 mmj@suse.de - Update to 2.11u which includes: o Danish, German, Spanish, Swedish and Turkish updates. o configure: for fsck.cramfs, mkfs.cramfs: add test for libz @@ -1330,22 +1376,22 @@ fi o agetty: use same test as login does to find utmp entry o fdisk: fix for fdisk on empty disk o mount updates -* Tue Jul 23 2002 - schwab@suse.de +* Tue Jul 23 2002 schwab@suse.de - Fix mkfs.cramfs for architectures with non-4k pages. -* Wed Jul 17 2002 - mmj@suse.de +* Wed Jul 17 2002 mmj@suse.de - Merged base into util-linux -* Mon Jul 15 2002 - mmj@suse.de +* Mon Jul 15 2002 mmj@suse.de - Added JFSv2 patch from Christoph Hellwig for volume label. Does for JFS, what below patch does for ReiserFS. -* Sun Jul 14 2002 - adrian@suse.de +* Sun Jul 14 2002 adrian@suse.de - fix ul-2.10m-sgi-fdisk.diff patch to apply again -* Thu Jul 11 2002 - mmj@suse.de +* Thu Jul 11 2002 mmj@suse.de - Added patch from Chris Mason for volume label on reiserfs -* Wed Jul 10 2002 - olh@suse.de +* Wed Jul 10 2002 olh@suse.de - add mkfs.cramfs and fsck.cramfs to file list -* Wed Jul 10 2002 - mmj@suse.de +* Wed Jul 10 2002 mmj@suse.de - Fixed nfs.5 to tell nfsver defaults to 3 [#16815] -* Mon Jul 08 2002 - mmj@suse.de +* Mon Jul 08 2002 mmj@suse.de - Update to 2.11t which includes * fdformat: remove test on major * fdisk, hwclock and swap polishing @@ -1353,340 +1399,340 @@ fi * cramfs tools includes from the kernel * swap{on,off} honours /proc/swaps * mount small fixups -* Fri Jul 05 2002 - kukuk@suse.de +* Fri Jul 05 2002 kukuk@suse.de - Use %%ix86 macro -* Mon Jul 01 2002 - bk@suse.de +* Mon Jul 01 2002 bk@suse.de - get raw built on s390 and s390x - remove %%ifarchs s390 s390x for fdisk(needed for SCSI disks) -* Mon Jun 17 2002 - mmj@suse.de +* Mon Jun 17 2002 mmj@suse.de - Added a fix for simpleinit exploit. -* Thu Jun 13 2002 - olh@suse.de +* Thu Jun 13 2002 olh@suse.de - disable hwclock ppc patch, maybe obsolete with recent kernels -* Thu May 16 2002 - mmj@suse.de +* Thu May 16 2002 mmj@suse.de - Added manpage guessfstype(8) -* Thu May 09 2002 - mmj@suse.de +* Thu May 09 2002 mmj@suse.de - Updated to util-linux-2.11r, including translations, x86-64 sup- port and small bugfixes. -* Sat Apr 13 2002 - mmj@suse.de +* Sat Apr 13 2002 mmj@suse.de - Updated to util-linux-2.11q, includes bugfixes. - util-linux-mkswap.patch for ia64 was folded into mainline -* Fri Apr 12 2002 - stepan@suse.de +* Fri Apr 12 2002 stepan@suse.de - added x86-64 support. -* Thu Apr 04 2002 - ihno@suse.de +* Thu Apr 04 2002 ihno@suse.de - corrected printf to report shared memories sizes bigger than 2 GByte correct (Bug #15585). It was reportet on s390x, but should effect other 64-Bit systems as well. -* Tue Mar 19 2002 - mmj@suse.de +* Tue Mar 19 2002 mmj@suse.de - Updated to 2.11o. The hexdump patch have been dropped since it was folded to mainline util-linux. -* Fri Mar 15 2002 - schwab@suse.de +* Fri Mar 15 2002 schwab@suse.de - Fix mkswap for ia64. -* Mon Mar 04 2002 - draht@suse.de +* Mon Mar 04 2002 draht@suse.de - permissions fixes for write(1) and wall(1) -* Fri Feb 01 2002 - mmj@suse.de +* Fri Feb 01 2002 mmj@suse.de - Moved /usr/bin/logger to /bin/logger (needed by sysconfig) -* Mon Jan 28 2002 - mmj@suse.de +* Mon Jan 28 2002 mmj@suse.de - Added the guessfstype binary from msvec/fehr -* Thu Jan 24 2002 - ro@suse.de +* Thu Jan 24 2002 ro@suse.de - modified fillup_and_insserv call (perl-hack not needed here) -* Mon Jan 21 2002 - mmj@suse.de +* Mon Jan 21 2002 mmj@suse.de - Merge NetBSD hexdump changes, fixes bugzilla #12801 -* Thu Jan 10 2002 - ro@suse.de +* Thu Jan 10 2002 ro@suse.de - removed ACTIVATE_RAW_DEV -* Mon Dec 31 2001 - adrian@suse.de +* Mon Dec 31 2001 adrian@suse.de - add patch for mips to create SGI partition tables with fdisk -* Tue Dec 18 2001 - bjacke@suse.de +* Tue Dec 18 2001 bjacke@suse.de - add adjtimex -* Mon Dec 10 2001 - mmj@suse.de +* Mon Dec 10 2001 mmj@suse.de - Update to util-linux-2.11n -* Tue Nov 20 2001 - mmj@suse.de +* Tue Nov 20 2001 mmj@suse.de - Added a patch to 'wall' to remove unwanted newline (#12181) -* Wed Nov 07 2001 - kukuk@suse.de +* Wed Nov 07 2001 kukuk@suse.de - Remove unneeded SPARC patch for hwclock -* Sat Oct 13 2001 - kukuk@suse.de +* Sat Oct 13 2001 kukuk@suse.de - Update to util-linux 2.11l -* Wed Sep 12 2001 - garloff@suse.de +* Wed Sep 12 2001 garloff@suse.de - Fixed some dutch translations. (bug #10276) -* Mon Sep 10 2001 - olh@suse.de +* Mon Sep 10 2001 olh@suse.de - marry fdisk and AIX label again... add lsprop for ppc dumps the device tree in a human readable format -* Mon Sep 03 2001 - kukuk@suse.de +* Mon Sep 03 2001 kukuk@suse.de - Update to version 2.11i: - blockdev: corrected ioctl numbers - cal: fixed for multibyte locales - line: new - mount: added vxfs magic -* Sat Sep 01 2001 - kukuk@suse.de +* Sat Sep 01 2001 kukuk@suse.de - Let mount follow symlinks again -* Wed Aug 29 2001 - kukuk@suse.de +* Wed Aug 29 2001 kukuk@suse.de - Add new option to losetup manual page -* Tue Aug 28 2001 - draht@suse.de +* Tue Aug 28 2001 draht@suse.de - added timeout support for losetup (-t ) -* Mon Aug 27 2001 - kukuk@suse.de +* Mon Aug 27 2001 kukuk@suse.de - Add raw rc scripts, too -* Sun Aug 26 2001 - bjacke@suse.de +* Sun Aug 26 2001 bjacke@suse.de - added raw binary and put rawio into obsoletes and provides -* Sat Aug 25 2001 - kukuk@suse.de +* Sat Aug 25 2001 kukuk@suse.de - Fix path in getopt.1 manual page to example directory [Bug #9831] -* Fri Aug 24 2001 - kukuk@suse.de +* Fri Aug 24 2001 kukuk@suse.de - Small fix for hwclock on newer SPARCs -* Mon Aug 13 2001 - ro@suse.de +* Mon Aug 13 2001 ro@suse.de - changed neededforbuild to -* Mon Jul 30 2001 - kukuk@suse.de +* Mon Jul 30 2001 kukuk@suse.de - Update to util-linux-2.11h - Add nologin program -* Tue Jul 10 2001 - kukuk@suse.de +* Tue Jul 10 2001 kukuk@suse.de - Remove swapdev from filelist -* Tue Jul 10 2001 - kukuk@suse.de +* Tue Jul 10 2001 kukuk@suse.de - Update to util-linux-2.11g -* Wed Jun 06 2001 - bk@suse.de +* Thu Jun 07 2001 bk@suse.de - added s390x to all ifnarch s390 -* Fri Apr 20 2001 - kukuk@suse.de +* Fri Apr 20 2001 kukuk@suse.de - Fix wall bug (character 80, 160, 240, are missing) [Bug #6962] -* Mon Mar 26 2001 - kukuk@suse.de +* Mon Mar 26 2001 kukuk@suse.de - Add exception for broken i2o disk device numbering scheme, kernel hacker are not able to fix this and make it right [Bug #5881]. -* Sat Mar 24 2001 - kukuk@suse.de +* Sat Mar 24 2001 kukuk@suse.de - Update to util-linux 2.11b -* Thu Mar 15 2001 - kukuk@suse.de +* Thu Mar 15 2001 kukuk@suse.de - Fix changing of partitions with ID 0 on SPARC - Remove duplicate mount patch -* Wed Mar 14 2001 - schwab@suse.de +* Wed Mar 14 2001 schwab@suse.de - Don't use _syscallX on ia64. - Fix missing includes. -* Wed Mar 14 2001 - kukuk@suse.de +* Wed Mar 14 2001 kukuk@suse.de - Update to version 2.11a -* Fri Mar 02 2001 - kukuk@suse.de +* Fri Mar 02 2001 kukuk@suse.de - enable write again -* Mon Feb 12 2001 - kukuk@suse.de +* Mon Feb 12 2001 kukuk@suse.de - cmos.c: Use sys/io.h, fix PowerPC hack -* Tue Feb 06 2001 - ro@suse.de +* Tue Feb 06 2001 ro@suse.de - wall.c: include time.h -* Mon Feb 05 2001 - kukuk@suse.de +* Mon Feb 05 2001 kukuk@suse.de - Split hex to extra package - Update to util-linux-2.10s -* Fri Feb 02 2001 - werner@suse.de +* Fri Feb 02 2001 werner@suse.de - Make swapon/swapoff more handy: * Ignore swap files on ro mounted file systems * If -a is given ignore already active devices at swapon * If -a is given ignore not active devices at swapoff -* Thu Jan 25 2001 - ro@suse.de +* Thu Jan 25 2001 ro@suse.de - added Provides: util -* Fri Jan 12 2001 - garloff@suse.de +* Fri Jan 12 2001 garloff@suse.de - Apply patch to lomount to allow all kerneli crypt algos to be passed and allow to pass passwd with -k. - losetup seems to support >2GB files just fine (#5433) -* Tue Jan 02 2001 - kukuk@suse.de +* Tue Jan 02 2001 kukuk@suse.de - Save permissions of /etc/mtab [Bug #5027] -* Tue Dec 05 2000 - kukuk@suse.de +* Tue Dec 05 2000 kukuk@suse.de - Search first in /etc/filesystems, then in /proc/filesystems -* Tue Dec 05 2000 - kukuk@suse.de +* Tue Dec 05 2000 kukuk@suse.de - Use AIX/fdisk patch from util-linux-2.10r - Backport "guess filesystems" from util-linux-2.10r -* Tue Dec 05 2000 - schwab@suse.de +* Tue Dec 05 2000 schwab@suse.de - Don't use _syscallX on ia64. -* Mon Dec 04 2000 - olh@suse.de +* Mon Dec 04 2000 olh@suse.de - fix diff again -* Sun Dec 03 2000 - olh@suse.de +* Sun Dec 03 2000 olh@suse.de - no segfaults with AIX disklabels -* Wed Nov 29 2000 - uli@suse.de +* Wed Nov 29 2000 uli@suse.de - fixed to build on PPC -* Mon Nov 27 2000 - schwab@suse.de +* Mon Nov 27 2000 schwab@suse.de - Fix broken casts in hwclock. -* Thu Nov 23 2000 - bk@suse.de +* Thu Nov 23 2000 bk@suse.de - temporary disable pivot_root on s390(2.4 kernel is not yet built) -* Wed Nov 22 2000 - schwab@suse.de +* Wed Nov 22 2000 schwab@suse.de - Add pivot_root to file list. -* Mon Nov 20 2000 - kukuk@suse.de +* Mon Nov 20 2000 kukuk@suse.de - Fix pmac-utils to compile with new kernel -* Fri Nov 17 2000 - kukuk@suse.de +* Fri Nov 17 2000 kukuk@suse.de - Fix hwclock to compile on PPC -* Wed Nov 15 2000 - kukuk@suse.de +* Wed Nov 15 2000 kukuk@suse.de - Update util-linux to 2.10q, merge flushb.diff -* Thu Nov 02 2000 - kukuk@suse.de +* Thu Nov 02 2000 kukuk@suse.de - Remove some of the last specfile changes -* Wed Nov 01 2000 - olh@suse.de +* Wed Nov 01 2000 olh@suse.de - update pmac-utils for new powermacs, cleanup specfile -* Fri Oct 20 2000 - kukuk@suse.de +* Fri Oct 20 2000 kukuk@suse.de - Update util-linux to 2.10p - Rename package from util to util-linux -* Wed Sep 27 2000 - kukuk@suse.de +* Wed Sep 27 2000 kukuk@suse.de - Allow NFS v3 with 2.2.17.SuSE -* Tue Sep 26 2000 - kukuk@suse.de +* Tue Sep 26 2000 kukuk@suse.de - Fix mount for new NFS kernel patch -* Sat Sep 09 2000 - kukuk@suse.de +* Sat Sep 09 2000 kukuk@suse.de - Remove tcsh dependency - Update to util-linux 2.10o, use of /etc/filesystems is still broken -* Fri Aug 25 2000 - pthomas@suse.de +* Fri Aug 25 2000 pthomas@suse.de - use %%{_mandir} and %%{_infodir} exclusively. This allows building from source rpm on platforms other than 7.0. -* Wed Jul 19 2000 - bk@suse.de +* Wed Jul 19 2000 bk@suse.de - s390: removed dasdfmt and silo, %%ifnarch s390 for some non-s390 things. -* Tue May 30 2000 - bk@suse.de +* Tue May 30 2000 bk@suse.de - added dasdfmt and silo on s390 -* Mon May 15 2000 - kukuk@suse.de +* Mon May 15 2000 kukuk@suse.de - util-linux: Update to 2.10m -* Wed Apr 26 2000 - kukuk@suse.de +* Wed Apr 26 2000 kukuk@suse.de - flusb: Don't use kernel headers, even if we don't need them! -* Wed Apr 19 2000 - kukuk@suse.de +* Wed Apr 19 2000 kukuk@suse.de - util-linux: Update to 2.10l -* Mon Apr 17 2000 - kukuk@suse.de +* Mon Apr 17 2000 kukuk@suse.de - util-linux: Update to 2.10k -* Thu Apr 13 2000 - kukuk@suse.de +* Thu Apr 13 2000 kukuk@suse.de - Move /sbin/setserial to /bin/setserial, add compat link to /sbin. This fixes [Bug 1084] and is necessary for FHS 2.1 -* Wed Apr 12 2000 - kukuk@suse.de +* Wed Apr 12 2000 kukuk@suse.de - Fix util-linux for Alpha -* Wed Apr 12 2000 - kukuk@suse.de +* Wed Apr 12 2000 kukuk@suse.de - util-linux: Update to 2.10j -* Sun Apr 02 2000 - bk@suse.de +* Sun Apr 02 2000 bk@suse.de - suse s390 team added support for s390 -* Thu Mar 30 2000 - uli@suse.de +* Thu Mar 30 2000 uli@suse.de - hwclock/PPC: added support for MK48T559 RTC chip used in MTX+ boards -* Fri Mar 24 2000 - kukuk@suse.de +* Fri Mar 24 2000 kukuk@suse.de - Add Linux LVM partition tag to fdisk - Fix a lot of more possible buffer overruns - Fix some fdisk sunlabel bugs - added BuildRoot fixes from nadvorni@suse.cz -* Wed Mar 22 2000 - kukuk@suse.de +* Wed Mar 22 2000 kukuk@suse.de - Update util-linux to 2.10h - Add clock again for non PPC platforms -* Fri Mar 17 2000 - uli@suse.de +* Fri Mar 17 2000 uli@suse.de - now contains both hwclock and clock on PPC (/sbin/init.d/boot chooses what to run at runtime) -* Tue Mar 14 2000 - schwab@suse.de +* Tue Mar 14 2000 schwab@suse.de - Add support for ia64. -* Thu Mar 09 2000 - kukuk@suse.de +* Thu Mar 09 2000 kukuk@suse.de - fdisk: Fix -l for Mylex RAID controller -* Tue Mar 07 2000 - kukuk@suse.de +* Tue Mar 07 2000 kukuk@suse.de - etc/filesystems: Add minix and reiserfs -* Tue Mar 07 2000 - kukuk@suse.de +* Tue Mar 07 2000 kukuk@suse.de - mount: fix endian problem with minix fs -* Tue Feb 15 2000 - kukuk@suse.de +* Tue Feb 15 2000 kukuk@suse.de - mount: Add hack for PPC/syscall mount problem -* Sun Feb 13 2000 - bk@suse.de +* Sun Feb 13 2000 bk@suse.de - let rdev continue in case it stubles over a bad file in /dev (/dev/snd fix) -* Fri Feb 04 2000 - kukuk@suse.de +* Fri Feb 04 2000 kukuk@suse.de - Make PPC clock parameter compatible to hwclock -* Thu Feb 03 2000 - kukuk@suse.de +* Thu Feb 03 2000 kukuk@suse.de - Fix filelist for SPARC -* Thu Feb 03 2000 - kukuk@suse.de +* Thu Feb 03 2000 kukuk@suse.de - util-linux: Update to 2.10f (mount security fix) -* Sun Jan 23 2000 - kukuk@suse.de +* Sun Jan 23 2000 kukuk@suse.de - util-linux: Update to 2.10e -* Tue Jan 18 2000 - kukuk@suse.de +* Tue Jan 18 2000 kukuk@suse.de - mount now looks at first in /etc/filesystems and then in /proc/filesystems -* Tue Jan 18 2000 - ro@suse.de +* Tue Jan 18 2000 ro@suse.de - fixed pmac-utils to build with 2.3 as well -* Tue Jan 18 2000 - kukuk@suse.de +* Tue Jan 18 2000 kukuk@suse.de - Fix a lot of fdisk buffer overruns [Bug 1642] -* Mon Jan 17 2000 - kukuk@suse.de +* Mon Jan 17 2000 kukuk@suse.de - Fix setserial for Linux 2.3.40 - Remove write, is now in nkitb - Build minix and bfs tools for SPARC - Fix some buffer overflows in fdisk -* Fri Dec 17 1999 - kukuk@suse.de +* Fri Dec 17 1999 kukuk@suse.de - util-linux: Update to 2.10d - hex: Update to 1.2 - Move manual pages to /usr/share/man -* Tue Nov 30 1999 - uli@suse.de +* Tue Nov 30 1999 uli@suse.de - re-added hwclock link for PPC (2nd try) -* Tue Nov 30 1999 - uli@suse.de +* Tue Nov 30 1999 uli@suse.de - re-added hwclock link for PPC -* Mon Nov 15 1999 - kukuk@suse.de +* Mon Nov 15 1999 kukuk@suse.de - util-linux: Update to 2.10b -* Sat Nov 13 1999 - kukuk@suse.de +* Sat Nov 13 1999 kukuk@suse.de - setserial: Add Patch for Sparc - Fix filelist for Sparc -* Wed Oct 27 1999 - garloff@suse.de +* Wed Oct 27 1999 garloff@suse.de - added flushb (moved here from ddrescue). - fix bug in logger (remove trailing newlines). -* Fri Oct 22 1999 - kukuk@suse.de +* Fri Oct 22 1999 kukuk@suse.de - util-linux: Remove old patches for mk_loop_h -* Sat Oct 16 1999 - kukuk@suse.de +* Sat Oct 16 1999 kukuk@suse.de - util-linux: Update to 2.9z -* Fri Oct 08 1999 - kukuk@suse.de +* Fri Oct 08 1999 kukuk@suse.de - Update to util-linux-2.9y (execpt fdisk) -* Tue Sep 14 1999 - uli@suse.de +* Tue Sep 14 1999 uli@suse.de - added PMac-specific utils for PPC -* Mon Sep 13 1999 - bs@suse.de +* Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. -* Thu Aug 26 1999 - uli@suse.de +* Thu Aug 26 1999 uli@suse.de - disabled hayesesp for PPC -* Wed Aug 25 1999 - kukuk@suse.de +* Wed Aug 25 1999 kukuk@suse.de - Don´t install tsort, its now in textutils 2.0 -* Tue Aug 24 1999 - kukuk@suse.de +* Tue Aug 24 1999 kukuk@suse.de - Update to util-linux-2.9w (execpt fdisk) -* Mon Aug 09 1999 - kukuk@suse.de +* Mon Aug 09 1999 kukuk@suse.de - Update to util-linux-2.9v (execpt fdisk) -* Tue Jul 20 1999 - garloff@suse.de +* Tue Jul 20 1999 garloff@suse.de - Added hex from Erich S. Raymond -* Mon Jul 12 1999 - kukuk@suse.de +* Mon Jul 12 1999 kukuk@suse.de - Add fdisk patch from Klaus G. Wagner - Add mount patch from util-linux 2.9u -* Tue Jul 06 1999 - kukuk@suse.de +* Tue Jul 06 1999 kukuk@suse.de - update to util-linux-2.9t -* Fri Jun 25 1999 - kukuk@suse.de +* Fri Jun 25 1999 kukuk@suse.de - update to util-linux-2.9s -* Wed Mar 03 1999 - ro@suse.de +* Wed Mar 03 1999 ro@suse.de - hwclock.c: always use busywait to get rtctime (it's hard to find out at runtime if we will get an irq) -* Tue Mar 02 1999 - ro@suse.de +* Tue Mar 02 1999 ro@suse.de - update to util-linux-2.9i - update to setserial-2.15 - using diffs from jurix and add-ons from kgw for compaq smart raid -* Mon Feb 01 1999 - ro@suse.de +* Mon Feb 01 1999 ro@suse.de - rdev is not built on alpha -* Mon Jan 18 1999 - florian@suse.de +* Mon Jan 18 1999 florian@suse.de - fixed one broken case to delete a partition in fdisk -* Sun Dec 13 1998 - bs@suse.de +* Sun Dec 13 1998 bs@suse.de - fixed file list -* Thu Dec 10 1998 - fehr@suse.de +* Thu Dec 10 1998 fehr@suse.de - fix bug in fdisk -* Tue Dec 08 1998 - ro@suse.de +* Tue Dec 08 1998 ro@suse.de - removed last from filelist - added link /sbin/clock -> hwclock -* Wed Nov 04 1998 - ro@suse.de +* Wed Nov 04 1998 ro@suse.de - fdisksunlabel: don't include scsi/scsi.h for glibc-2.0 -* Fri Oct 30 1998 - ro@suse.de +* Fri Oct 30 1998 ro@suse.de - update to 2.9 / added hostid from previous diff - copied some glibc changes from previous diff (strcpy..) -* Thu Sep 17 1998 - ro@suse.de +* Thu Sep 17 1998 ro@suse.de - define _GNU_SOURCE when using getopt -* Mon Aug 31 1998 - ro@suse.de +* Mon Aug 31 1998 ro@suse.de - full switch to util-linux 2.8 -- sync has moved to pkg fileutils -- chroot has moved to pkg sh_utils (has been there for a while) -- adopted hostid from previous suse-pkg -* Mon Aug 24 1998 - ro@suse.de +* Mon Aug 24 1998 ro@suse.de - switched to use mount from util-linux-2.8 -* Tue Jun 23 1998 - ro@suse.de +* Tue Jun 23 1998 ro@suse.de - added fdisk, sfdisk, cfdisk from util-linux-2.8 (including man-pages,readmes) -* Mon Nov 17 1997 - ro@suse.de +* Mon Nov 17 1997 ro@suse.de - changed /local/bin/perl5 in chkdupexe to /usr/bin/perl -* Fri Oct 31 1997 - ro@suse.de +* Fri Oct 31 1997 ro@suse.de - temporarily removed mount-hacker -* Wed Oct 29 1997 - florian@suse.de +* Thu Oct 30 1997 florian@suse.de - add changes from ms@suse.de for hostid.c -* Tue May 20 1997 - florian@suse.de +* Tue May 20 1997 florian@suse.de - only support kernel 2.0.x for nfs mounts, please use /bin/mount-hacker for kernel 2.1.x -* Wed Apr 30 1997 - florian@suse.de +* Wed Apr 30 1997 florian@suse.de - update to mount 2.6g -* Sun Apr 13 1997 - florian@suse.de +* Mon Apr 14 1997 florian@suse.de - update to new version util-linux 2.6 - update to new version mount 2.6e -* Thu Jan 02 1997 - florian@suse.de +* Thu Jan 02 1997 florian@suse.de - update to mount 2.5p -* Thu Jan 02 1997 - florian@suse.de +* Thu Jan 02 1997 florian@suse.de - Update auf neue Version von mount 2.5o. -* Thu Jan 02 1997 - florian@suse.de +* Thu Jan 02 1997 florian@suse.de - updated to new version mount 2.5m - (u)mount now gives much better error messages -* Thu Jan 02 1997 - bs@suse.de +* Thu Jan 02 1997 bs@suse.de compile setterm with libtermcap and not libncurses use newer mount instead of the old version in util-linux (security fix) From 193d5bdfc9333579e8d977f0c72582240357bcd56167f37bc2a3bb5a037c4632 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 15 Feb 2008 00:43:38 +0000 Subject: [PATCH 053/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=53 --- ...-2.12r-mount_swapon_swsuspend_resume.patch | 128 --------- util-linux-2.13-mount_fd_leak.patch | 12 - ...ux-2.13.1-canonicalize_loopfile_name.patch | 96 +++++++ util-linux-2.13.1-getfs_fix.patch | 24 ++ ...13.1-mkfs.minix_add_sectorsize_check.patch | 65 +++++ ....13.1-mkfs.minix_device_size_cleanup.patch | 103 ++++++++ ...nt_loop_mounting_the_same_file_twice.patch | 245 ++++++++++++++++++ util-linux-mount_losetup_crypto.patch | 201 +++++++------- util-linux-ng-2.13-swapon-swsuspend.patch | 112 ++++++++ util-linux-ng-2.13.0.1+git20071121.tar.bz2 | 3 - util-linux-ng-2.13.1.tar.bz2 | 3 + util-linux.changes | 11 + util-linux.spec | 50 ++-- 13 files changed, 783 insertions(+), 270 deletions(-) delete mode 100644 util-linux-2.12r-mount_swapon_swsuspend_resume.patch delete mode 100644 util-linux-2.13-mount_fd_leak.patch create mode 100644 util-linux-2.13.1-canonicalize_loopfile_name.patch create mode 100644 util-linux-2.13.1-getfs_fix.patch create mode 100644 util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch create mode 100644 util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch create mode 100644 util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch create mode 100644 util-linux-ng-2.13-swapon-swsuspend.patch delete mode 100644 util-linux-ng-2.13.0.1+git20071121.tar.bz2 create mode 100644 util-linux-ng-2.13.1.tar.bz2 diff --git a/util-linux-2.12r-mount_swapon_swsuspend_resume.patch b/util-linux-2.12r-mount_swapon_swsuspend_resume.patch deleted file mode 100644 index 8bc8e98..0000000 --- a/util-linux-2.12r-mount_swapon_swsuspend_resume.patch +++ /dev/null @@ -1,128 +0,0 @@ -## 30swsusp-resume.dpatch by Jeff Bailey -Index: util-linux-ng-2.12r+git20070330/mount/swapon.c -=================================================================== ---- util-linux-ng-2.12r+git20070330.orig/mount/swapon.c -+++ util-linux-ng-2.12r+git20070330/mount/swapon.c -@@ -10,7 +10,9 @@ - #include - #include - #include -+#include - #include -+#include - #include "xmalloc.h" - #include "swap_constants.h" - #include "swapargs.h" -@@ -23,6 +25,7 @@ - - #define _PATH_FSTAB "/etc/fstab" - #define PROC_SWAPS "/proc/swaps" -+#define PATH_MKSWAP "/sbin/mkswap" - - #define SWAPON_NEEDS_TWO_ARGS - -@@ -179,6 +182,85 @@ display_summary(void) - return 0 ; - } - -+/* -+ * It's better do swsuspend detection by follow routine than -+ * include huge mount_guess_fstype.o to swapon. We need only -+ * swsuspend and no the others filesystems. -+ */ -+#ifdef HAVE_LIBBLKID -+static int -+swap_is_swsuspend(const char *device) { -+ const char *type = blkid_get_tag_value(blkid, "TYPE", device); -+ -+ if (type && strcmp(type, "swsuspend")==0) -+ return 0; -+ return 1; -+} -+#else -+static int -+swap_is_swsuspend(const char *device) { -+ int fd, re = 1, n = getpagesize() - 10; -+ char buf[10]; -+ -+ fd = open(device, O_RDONLY); -+ if (fd < 0) -+ return -1; -+ -+ if (lseek(fd, n, SEEK_SET) >= 0 && -+ read(fd, buf, sizeof buf) == sizeof buf && -+ (memcmp("S1SUSPEND", buf, 9)==0 || -+ memcmp("S2SUSPEND", buf, 9)==0 || -+ memcmp("ULSUSPEND", buf, 9)==0)) -+ re = 0; -+ -+ close(fd); -+ return re; -+} -+#endif -+ -+/* calls mkswap */ -+static int -+swap_reinitialize(const char *device) { -+ const char *label = mount_get_volume_label_by_spec(device); -+ pid_t pid; -+ -+ switch((pid=fork())) { -+ case -1: /* fork error */ -+ fprintf(stderr, _("%s: cannot fork: %s\n"), -+ progname, strerror(errno)); -+ return -1; -+ -+ case 0: /* child */ -+ if (label && *label) -+ execl(PATH_MKSWAP, PATH_MKSWAP, "-L", label, device, NULL); -+ else -+ execl(PATH_MKSWAP, PATH_MKSWAP, device, NULL); -+ exit(1); /* error */ -+ -+ default: /* parent */ -+ { -+ int status; -+ int ret; -+ -+ do { -+ if ((ret = waitpid(pid, &status, 0)) < 0 -+ && errno == EINTR) -+ continue; -+ else if (ret < 0) { -+ fprintf(stderr, _("%s: waitpid: %s\n"), -+ progname, strerror(errno)); -+ return -1; -+ } -+ } while (0); -+ -+ /* mkswap returns: 0=suss, 1=error */ -+ if (WIFEXITED(status) && WEXITSTATUS(status)==0) -+ return 0; /* ok */ -+ } -+ } -+ return -1; /* error */ -+} -+ - static int - do_swapon(const char *orig_special, int prio) { - int status; -@@ -202,6 +284,18 @@ do_swapon(const char *orig_special, int - return -1; - } - -+ /* We have to reinitialize swap with old (=useless) software suspend -+ * data. The problem is that if we don't do it, then we get data -+ * corruption the next time with suspended on. -+ */ -+ if (swap_is_swsuspend(special)==0) { -+ fprintf(stdout, _("%s: %s: software suspend data detected. " -+ "Reinitializing the swap.\n"), -+ progname, special); -+ if (swap_reinitialize(special) < 0) -+ return -1; -+ } -+ - /* people generally dislike this warning - now it is printed - only when `verbose' is set */ - if (verbose) { diff --git a/util-linux-2.13-mount_fd_leak.patch b/util-linux-2.13-mount_fd_leak.patch deleted file mode 100644 index d88ec05..0000000 --- a/util-linux-2.13-mount_fd_leak.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.c -+++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c -@@ -325,6 +325,7 @@ set_loop(const char *device, const char - } - if ((fd = open(device, mode)) < 0) { - perror (device); -+ close(ffd); - return 1; - } - *loopro = (mode == O_RDONLY); diff --git a/util-linux-2.13.1-canonicalize_loopfile_name.patch b/util-linux-2.13.1-canonicalize_loopfile_name.patch new file mode 100644 index 0000000..04c5e2c --- /dev/null +++ b/util-linux-2.13.1-canonicalize_loopfile_name.patch @@ -0,0 +1,96 @@ +commit bfdb8be5c49d8fadb25118fb4416ab2a68fc3a16 +Author: Karel Zak +Date: Thu Oct 25 12:29:51 2007 +0200 + + losetup: canonicalize loopfile name + + When setting up a loop device, canonicalize the loop file + name. This simplifies a later identification of loop file names + when querying the loop devices. + + Co-Author: Matthias Koenig + Signed-off-by: Matthias Koenig + Signed-off-by: Karel Zak + +Index: util-linux-ng-2.13.1/mount/lomount.c +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/lomount.c ++++ util-linux-ng-2.13.1/mount/lomount.c +@@ -22,10 +22,12 @@ + #include "lomount.h" + #include "xstrncpy.h" + #include "nls.h" ++#include "realpath.h" ++#include "xmalloc.h" ++ + + extern int verbose; + extern char *progname; +-extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ + extern void error (const char *fmt, ...); /* idem */ + + #define SIZE(a) (sizeof(a)/sizeof(a[0])) +@@ -279,6 +281,7 @@ set_loop(const char *device, const char + struct loop_info64 loopinfo64; + int fd, ffd, mode, i; + char *pass; ++ char filename[PATH_MAX+1]; + + mode = (*loopro ? O_RDONLY : O_RDWR); + if ((ffd = open(file, mode)) < 0) { +@@ -298,7 +301,8 @@ set_loop(const char *device, const char + + memset(&loopinfo64, 0, sizeof(loopinfo64)); + +- xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE); ++ myrealpath(file, filename, PATH_MAX); ++ xstrncpy(loopinfo64.lo_file_name, filename, LO_NAME_SIZE); + + if (encryption && *encryption) { + if (digits_only(encryption)) { +@@ -386,7 +390,7 @@ set_loop(const char *device, const char + + if (verbose > 1) + printf(_("set_loop(%s,%s,%llu): success\n"), +- device, file, offset); ++ device, filename, offset); + return 0; + } + +@@ -470,23 +474,6 @@ usage(void) { + exit(1); + } + +-char * +-xstrdup (const char *s) { +- char *t; +- +- if (s == NULL) +- return NULL; +- +- t = strdup (s); +- +- if (t == NULL) { +- fprintf(stderr, _("not enough memory")); +- exit(1); +- } +- +- return t; +-} +- + void + error (const char *fmt, ...) { + va_list args; +Index: util-linux-ng-2.13.1/mount/Makefile.am +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/Makefile.am ++++ util-linux-ng-2.13.1/mount/Makefile.am +@@ -25,7 +25,7 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD + + swapon_SOURCES = swapon.c swap_constants.h $(utils_common) + +-losetup_SOURCES = lomount.c loop.h lomount.h ++losetup_SOURCES = lomount.c loop.h lomount.h realpath.c xmalloc.c + losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) + + mount_LDADD = $(LDADD_common) diff --git a/util-linux-2.13.1-getfs_fix.patch b/util-linux-2.13.1-getfs_fix.patch new file mode 100644 index 0000000..5dee921 --- /dev/null +++ b/util-linux-2.13.1-getfs_fix.patch @@ -0,0 +1,24 @@ +Index: util-linux-ng-2.13.1/mount/fstab.c +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/fstab.c ++++ util-linux-ng-2.13.1/mount/fstab.c +@@ -419,11 +419,17 @@ getfs_by_spec (const char *spec) { + struct mntentchn * + getfs_by_devname (const char *devname) { + struct mntentchn *mc, *mc0; ++ char *name; + + mc0 = fstab_head(); +- for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) +- if (streq(mc->m.mnt_fsname, devname)) ++ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) { ++ name = canonicalize(mc->m.mnt_fsname); ++ if (streq(name, devname)) { ++ free(name); + return mc; ++ } ++ free(name); ++ } + return NULL; + } + diff --git a/util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch b/util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch new file mode 100644 index 0000000..f818c34 --- /dev/null +++ b/util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch @@ -0,0 +1,65 @@ +X-Gnus-Coding-System: -*- coding: utf-8; -*- + +Minix filesystem until version 2 has a fixed blocksize of 1024 bytes. +If you try to create a filsystem on a device with a physical sectorsize +larger than 1024 bytes, this resulting minix fs cannot be mounted, +because the physical sectorsize must be smaller than the filesystem +blocksize. +This patch adds a check for this and will refuse to create a filesystem +if the sectorsize is bigger than the blocksize. + +Signed-off-by: Matthias Koenig +--- + + disk-utils/Makefile.am | 4 +++- + disk-utils/mkfs.minix.c | 12 ++++++++++-- + 2 files changed, 13 insertions(+), 3 deletions(-) + +Index: util-linux-ng-2.13.1/disk-utils/mkfs.minix.c +=================================================================== +--- util-linux-ng-2.13.1.orig/disk-utils/mkfs.minix.c ++++ util-linux-ng-2.13.1/disk-utils/mkfs.minix.c +@@ -78,6 +78,7 @@ + #ifndef BLKGETSIZE + #define BLKGETSIZE _IO(0x12,96) /* return device size */ + #endif ++#define BLKSSZGET _IO(0x12,104)/* get block device sector size */ + + #ifndef __GNUC__ + #error "needs gcc for the bitop-__asm__'s" +@@ -238,6 +239,16 @@ get_size(const char *file) { + return size; + } + ++/* get hardware sector size */ ++int ++blkdev_get_sector_size(int fd, int *sector_size) ++{ ++ if (ioctl(fd, BLKSSZGET, sector_size) >= 0) ++ return 0; ++ ++ return -1; ++} ++ + static void + write_tables(void) { + /* Mark the super block valid. */ +@@ -707,9 +718,16 @@ main(int argc, char ** argv) { + DEV = open(device_name,O_RDWR); + if (DEV<0) + die(_("unable to open %s")); +- if (!S_ISBLK(statbuf.st_mode)) ++ if (S_ISBLK(statbuf.st_mode)) { ++ int sectorsize; ++ ++ if (blkdev_get_sector_size(DEV, §orsize) == -1) ++ die(_("cannot determine sector size for %s")); ++ if (BLOCK_SIZE < sectorsize) ++ die(_("block size smaller than physical sector size of %s")); ++ } else if (!S_ISBLK(statbuf.st_mode)) { + check=0; +- else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) ++ } else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) + die(_("will not try to make filesystem on '%s'")); + setup_tables(); + if (check) diff --git a/util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch b/util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch new file mode 100644 index 0000000..b42b6cb --- /dev/null +++ b/util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch @@ -0,0 +1,103 @@ +Index: util-linux-ng-2.13.1/disk-utils/mkfs.minix.c +=================================================================== +--- util-linux-ng-2.13.1.orig/disk-utils/mkfs.minix.c ++++ util-linux-ng-2.13.1/disk-utils/mkfs.minix.c +@@ -78,6 +78,7 @@ + #ifndef BLKGETSIZE + #define BLKGETSIZE _IO(0x12,96) /* return device size */ + #endif ++#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */ + #define BLKSSZGET _IO(0x12,104)/* get block device sector size */ + + #ifndef __GNUC__ +@@ -103,7 +104,7 @@ + static char * program_name = "mkfs"; + static char * device_name = NULL; + static int DEV = -1; +-static long BLOCKS = 0; ++static unsigned long long BLOCKS = 0; + static int check = 0; + static int badblocks = 0; + static int namelen = 30; /* default (changed to 30, per Linus's +@@ -219,24 +220,21 @@ count_blocks (int fd) { + return (low + 1); + } + +-static int +-get_size(const char *file) { +- int fd; +- long size; +- +- fd = open(file, O_RDWR); +- if (fd < 0) { +- perror(file); +- exit(1); +- } ++/* get size in bytes */ ++int ++blkdev_get_size(int fd, unsigned long long *bytes) ++{ ++ unsigned long size; ++ ++ if (ioctl(fd, BLKGETSIZE64, bytes) >= 0) ++ return 0; ++ + if (ioctl(fd, BLKGETSIZE, &size) >= 0) { +- close(fd); +- return (size * 512); ++ *bytes = ((unsigned long long)size << 9); ++ return 0; + } +- +- size = count_blocks(fd); +- close(fd); +- return size; ++ ++ return -1; + } + + /* get hardware sector size */ +@@ -687,19 +685,9 @@ main(int argc, char ** argv) { + } + } + +- if (device_name && !BLOCKS) +- BLOCKS = get_size (device_name) / 1024; +- if (!device_name || BLOCKS<10) { ++ if (!device_name) { + usage(); + } +- if (version2) { +- if (namelen == 14) +- magic = MINIX2_SUPER_MAGIC; +- else +- magic = MINIX2_SUPER_MAGIC2; +- } else +- if (BLOCKS > 65535) +- BLOCKS = 65535; + check_mount(); /* is it already mounted? */ + tmp = root_block; + *(short *)tmp = 1; +@@ -725,10 +713,22 @@ main(int argc, char ** argv) { + die(_("cannot determine sector size for %s")); + if (BLOCK_SIZE < sectorsize) + die(_("block size smaller than physical sector size of %s")); ++ if (!BLOCKS && blkdev_get_size(DEV, &BLOCKS) == -1) ++ die(_("cannot determine size of %s")); + } else if (!S_ISBLK(statbuf.st_mode)) { + check=0; + } else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) + die(_("will not try to make filesystem on '%s'")); ++ if (BLOCKS < 10) ++ die(_("number of blocks too small")); ++ if (version2) { ++ if (namelen == 14) ++ magic = MINIX2_SUPER_MAGIC; ++ else ++ magic = MINIX2_SUPER_MAGIC2; ++ } else ++ if (BLOCKS > 65535) ++ BLOCKS = 65535; + setup_tables(); + if (check) + check_blocks(); diff --git a/util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch b/util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch new file mode 100644 index 0000000..63a2f6b --- /dev/null +++ b/util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch @@ -0,0 +1,245 @@ +commit 2368077223fa5800cf88659c9c57a7f6517f3fad +Author: Karel Zak +Date: Tue Sep 11 14:35:34 2007 +0200 + + mount: prevent loop mounting the same file twice + + The mount syscall prevents mounting the same device twice + to the same mountpoint. When loop mounting a file, for each + file a new loop device gets allocated, which prevents the detection + of loop mounting the same file to the same mountpoint twice. + The patch adds a check to prevent double mounts, if the same loopfile + is going to be mounted with the same offset to the same mountpoint. + + Co-Author: Matthias Koenig + Signed-off-by: Matthias Koenig + Signed-off-by: Karel Zak + +Index: util-linux-ng-2.13.1/mount/lomount.c +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/lomount.c ++++ util-linux-ng-2.13.1/mount/lomount.c +@@ -143,7 +143,7 @@ show_used_loop_devices (void) { + + for (j = 0; j < SIZE(loop_formats); j++) { + for(i = 0; i < 256; i++) { +- sprintf(dev, loop_formats[j], i); ++ snprintf(dev, sizeof(dev), loop_formats[j], i); + if (stat (dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) { + fd = open (dev, O_RDONLY); + if (fd >= 0) { +@@ -169,6 +169,102 @@ show_used_loop_devices (void) { + + #endif + ++/* check if the loopfile is already associated with the same given ++ * parameters. ++ * ++ * returns: -1 error ++ * 0 unused ++ * 1 loop device already used ++ */ ++static int ++is_associated(int dev, struct stat *file, unsigned long long offset) ++{ ++ struct loop_info64 linfo64; ++ struct loop_info64 linfo; ++ int ret = 0; ++ ++ if (ioctl(dev, LOOP_GET_STATUS64, &linfo64) == 0) { ++ if (file->st_dev == linfo64.lo_device && ++ file->st_ino == linfo64.lo_inode && ++ offset == linfo64.lo_offset) ++ ret = 1; ++ return ret; ++ } ++ if (ioctl(dev, LOOP_GET_STATUS, &linfo) == 0) { ++ if (file->st_dev == linfo.lo_device && ++ file->st_ino == linfo.lo_inode && ++ offset == linfo.lo_offset) ++ ret = 1; ++ return ret; ++ } ++ ++ return errno == ENXIO ? 0 : -1; ++} ++ ++/* check if the loop file is already used with the same given ++ * parameters. We check for device no, inode and offset. ++ * returns: associated devname or NULL ++ */ ++char * ++loopfile_used (const char *filename, unsigned long long offset) { ++ char dev[20]; ++ char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" }; ++ int i, j, fd; ++ struct stat devstat, filestat; ++ struct loop_info loopinfo; ++ ++ if (stat(filename, &filestat) == -1) { ++ perror(filename); ++ return NULL; ++ } ++ ++ for (j = 0; j < SIZE(loop_formats); j++) { ++ for(i = 0; i < 256; i++) { ++ snprintf(dev, sizeof(dev), loop_formats[j], i); ++ if (stat (dev, &devstat) == 0 && S_ISBLK(devstat.st_mode)) { ++ fd = open (dev, O_RDONLY); ++ if (fd >= 0) { ++ int res = 0; ++ ++ if(ioctl (fd, LOOP_GET_STATUS, &loopinfo) == 0) ++ res = is_associated(fd, &filestat, offset); ++ close (fd); ++ if (res == 1) ++ return xstrdup(dev); ++ } ++ continue; /* continue trying as long as devices exist */ ++ } ++ break; ++ } ++ } ++ return NULL; ++} ++ ++int ++loopfile_used_with(char *devname, const char *filename, unsigned long long offset) ++{ ++ struct stat statbuf; ++ int fd, ret; ++ ++ if (!is_loop_device(devname)) ++ return 0; ++ ++ if (stat(filename, &statbuf) == -1) { ++ perror(filename); ++ return -1; ++ } ++ ++ fd = open(devname, O_RDONLY); ++ if (fd == -1) { ++ perror(devname); ++ return -1; ++ } ++ ret = is_associated(fd, &statbuf, offset); ++ ++ close(fd); ++ return ret; ++} ++ + int + is_loop_device (const char *device) { + struct stat statbuf; +@@ -284,6 +380,16 @@ set_loop(const char *device, const char + char *filename; + char res_file[PATH_MAX+1]; + ++ if (verbose) { ++ char *xdev = loopfile_used(file, offset); ++ ++ if (xdev) { ++ printf(_("warning: %s is already associated with %s\n"), ++ file, xdev); ++ free(xdev); ++ } ++ } ++ + mode = (*loopro ? O_RDONLY : O_RDWR); + if ((ffd = open(file, mode)) < 0) { + if (!*loopro && errno == EROFS) +Index: util-linux-ng-2.13.1/mount/lomount.h +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/lomount.h ++++ util-linux-ng-2.13.1/mount/lomount.h +@@ -4,3 +4,6 @@ extern int set_loop(const char *, const + extern int del_loop(const char *); + extern int is_loop_device(const char *); + extern char * find_unused_loop_device(void); ++ ++extern int loopfile_used_with(char *devname, const char *filename, unsigned long long offset); ++extern char *loopfile_used (const char *filename, unsigned long long offset); +Index: util-linux-ng-2.13.1/mount/mount.c +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/mount.c ++++ util-linux-ng-2.13.1/mount/mount.c +@@ -42,6 +42,7 @@ + #include "mount_paths.h" + #include "env.h" + #include "nls.h" ++#include "realpath.h" + + #define DO_PS_FIDDLING + +@@ -833,9 +834,49 @@ suid_check(const char *spec, const char + *flags &= ~(MS_OWNER | MS_GROUP); + } + ++/* Check, if there already exists a mounted loop device on the mountpoint node ++ * with the same parameters. ++ */ ++static int ++is_mounted_same_loopfile(const char *node0, const char *loopfile, unsigned long long offset) ++{ ++ struct mntentchn *mnt = NULL; ++ char node[PATH_MAX+1]; ++ int res = 0; ++ ++ myrealpath(node0, node, PATH_MAX); ++ ++ /* Search for mountpoint node in mtab, ++ * procceed if any of these has the loop option set or ++ * the device is a loop device ++ */ ++ mnt = getmntdirbackward(node, mnt); ++ if (!mnt) { ++ return 0; ++ } ++ for(; mnt && res == 0; mnt = getmntdirbackward(node, mnt)) { ++ char *p; ++ ++ if (strncmp(mnt->m.mnt_fsname, "/dev/loop", 9) == 0) ++ res = loopfile_used_with((char *) mnt->m.mnt_fsname, ++ loopfile, offset); ++ ++ else if ((p = strstr(mnt->m.mnt_opts, "loop="))) { ++ char *dev = xstrdup(p+5); ++ if ((p = strchr(dev, ','))) ++ *p = '\0'; ++ res = loopfile_used_with(dev, loopfile, offset); ++ free(dev); ++ } ++ } ++ ++ return res; ++} ++ + static int + loop_check(const char **spec, const char **type, int *flags, +- int *loop, const char **loopdev, const char **loopfile) { ++ int *loop, const char **loopdev, const char **loopfile, ++ const char *node) { + int looptype; + unsigned long long offset; + +@@ -876,6 +917,11 @@ loop_check(const char **spec, const char + + offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0; + ++ if (is_mounted_same_loopfile(node, *loopfile, offset)) { ++ error(_("mount: according to mtab %s is already mounted on %s as loop"), *loopfile, node); ++ return EX_FAIL; ++ } ++ + do { + if (!*loopdev || !**loopdev) + *loopdev = find_unused_loop_device(); +@@ -1061,7 +1107,7 @@ try_mount_one (const char *spec0, const + * stale assignments of files to loop devices. Nasty when used for + * encryption. + */ +- res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile); ++ res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile, node); + if (res) + goto out; + } diff --git a/util-linux-mount_losetup_crypto.patch b/util-linux-mount_losetup_crypto.patch index 57a815d..53f4cff 100644 --- a/util-linux-mount_losetup_crypto.patch +++ b/util-linux-mount_losetup_crypto.patch @@ -40,31 +40,33 @@ Signed-off-by: Ludwig Nussel create mode 100644 mount/sha512.c create mode 100644 mount/sha512.h -diff --git a/mount/Makefile.am b/mount/Makefile.am -index 01643b2..cb7af0a 100644 ---- a/mount/Makefile.am -+++ b/mount/Makefile.am -@@ -13,6 +13,7 @@ headers_common = fstab.h mount_mntent.h mount_constants.h \ +Index: util-linux-ng-2.13.1/mount/Makefile.am +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/Makefile.am ++++ util-linux-ng-2.13.1/mount/Makefile.am +@@ -13,6 +13,7 @@ headers_common = fstab.h linux_fs.h moun getusername.h loop.h sundries.h mount_common = fstab.c mount_mntent.c getusername.c lomount.c \ + rmd160.c sha512.c \ - $(utils_common) $(headers_common) ../lib/env.c ../lib/linux_version.c \ - ../lib/blkdev.c + $(utils_common) $(headers_common) ../lib/env.c + + mount_SOURCES = mount.c $(mount_common) ../lib/setproctitle.c +@@ -25,7 +26,8 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD -@@ -27,6 +28,7 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) swapon_SOURCES = swapon.c swap_constants.h $(utils_common) - losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c \ -+ rmd160.c sha512.c \ - loop.h lomount.h xmalloc.h sundries.h realpath.h +-losetup_SOURCES = lomount.c loop.h lomount.h realpath.c xmalloc.c ++losetup_SOURCES = lomount.c loop.h lomount.h realpath.c xmalloc.c \ ++ rmd160.c sha512.c losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) -diff --git a/mount/lomount.c b/mount/lomount.c -index 5bd8954..98f144f 100644 ---- a/mount/lomount.c -+++ b/mount/lomount.c -@@ -20,12 +20,18 @@ + mount_LDADD = $(LDADD_common) +Index: util-linux-ng-2.13.1/mount/lomount.c +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/lomount.c ++++ util-linux-ng-2.13.1/mount/lomount.c +@@ -20,11 +20,16 @@ #include "loop.h" #include "lomount.h" @@ -72,22 +74,20 @@ index 5bd8954..98f144f 100644 +#include "sha512.h" #include "xstrncpy.h" #include "nls.h" - #include "sundries.h" - #include "xmalloc.h" #include "realpath.h" + #include "xmalloc.h" +#ifndef MIN +#define MIN(a,b) ((a enable data encryption with specified \n" @@ -300,7 +300,7 @@ index 5bd8954..98f144f 100644 " -o | --offset start at offset into file\n" " -p | --pass-fd read passphrase from file descriptor \n" " -r | --read-only setup read-only loop device\n" -@@ -582,11 +696,14 @@ usage(void) { +@@ -594,11 +708,14 @@ error (const char *fmt, ...) { int main(int argc, char **argv) { char *p, *offset, *encryption, *passfd, *device, *file; @@ -315,7 +315,7 @@ index 5bd8954..98f144f 100644 unsigned long long off; struct option longopts[] = { { "all", 0, 0, 'a' }, -@@ -594,6 +711,8 @@ main(int argc, char **argv) { +@@ -606,6 +723,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -324,7 +324,7 @@ index 5bd8954..98f144f 100644 { "offset", 1, 0, 'o' }, { "pass-fd", 1, 0, 'p' }, { "read-only", 0, 0, 'r' }, -@@ -609,12 +728,13 @@ main(int argc, char **argv) { +@@ -621,12 +740,13 @@ main(int argc, char **argv) { delete = find = all = 0; off = 0; offset = encryption = passfd = NULL; @@ -339,7 +339,7 @@ index 5bd8954..98f144f 100644 longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -633,6 +753,12 @@ main(int argc, char **argv) { +@@ -645,6 +765,12 @@ main(int argc, char **argv) { case 'f': find = 1; break; @@ -352,7 +352,7 @@ index 5bd8954..98f144f 100644 case 'o': offset = optarg; break; -@@ -696,8 +822,10 @@ main(int argc, char **argv) { +@@ -708,8 +834,10 @@ main(int argc, char **argv) { usage(); if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(); @@ -364,22 +364,10 @@ index 5bd8954..98f144f 100644 if (res == 2 && find) { if (verbose) printf("stolen loop=%s...trying again\n", -diff --git a/mount/lomount.h b/mount/lomount.h -index 38b3a48..3a6210f 100644 ---- a/mount/lomount.h -+++ b/mount/lomount.h -@@ -1,5 +1,5 @@ --extern int set_loop(const char *, const char *, unsigned long long, -- const char *, int, int *); -+extern int set_loop(const char *device, const char *file, unsigned long long offset, -+ const char *encryption, const char* phash, int pfd, int *loopro, int keysz); - extern int del_loop(const char *); - extern int is_loop_device(const char *); - extern char * find_unused_loop_device(void); -diff --git a/mount/losetup.8 b/mount/losetup.8 -index db2929f..54bbc94 100644 ---- a/mount/losetup.8 -+++ b/mount/losetup.8 +Index: util-linux-ng-2.13.1/mount/losetup.8 +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/losetup.8 ++++ util-linux-ng-2.13.1/mount/losetup.8 @@ -76,6 +76,15 @@ find the first unused loop device. If a argument is present, use this device. Otherwise, print its name. .IP "\fB\-h, \-\-help\fP" @@ -405,11 +393,11 @@ index db2929f..54bbc94 100644 Cryptoloop is deprecated in favor of dm-crypt. For more details see .B cryptsetup(8). -diff --git a/mount/mount.8 b/mount/mount.8 -index 54b11d4..e79ea04 100644 ---- a/mount/mount.8 -+++ b/mount/mount.8 -@@ -615,6 +615,15 @@ This option implies the options +Index: util-linux-ng-2.13.1/mount/mount.8 +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/mount.8 ++++ util-linux-ng-2.13.1/mount/mount.8 +@@ -610,6 +610,15 @@ This option implies the options (unless overridden by subsequent options, as in the option line .BR group,dev,suid ). .TP @@ -425,7 +413,7 @@ index 54b11d4..e79ea04 100644 .B mand Allow mandatory locks on this filesystem. See .BR fcntl (2). -@@ -2010,6 +2019,10 @@ that are really options to +@@ -2008,6 +2017,10 @@ that are really options to .BR \%losetup (8). (These options can be used in addition to those specific to the filesystem type.) @@ -436,11 +424,11 @@ index 54b11d4..e79ea04 100644 If no explicit loop device is mentioned (but just an option `\fB\-o loop\fP' is given), then -diff --git a/mount/mount.c b/mount/mount.c -index 60fe4fe..164ae3c 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -88,6 +88,9 @@ static int suid = 0; +Index: util-linux-ng-2.13.1/mount/mount.c +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/mount.c ++++ util-linux-ng-2.13.1/mount/mount.c +@@ -94,6 +94,9 @@ static int suid = 0; /* Contains the fd to read the passphrase from, if any. */ static int pfd = -1; @@ -450,7 +438,7 @@ index 60fe4fe..164ae3c 100644 /* Map from -o and fstab option strings to the flag argument to mount(2). */ struct opt_map { const char *opt; /* option name */ -@@ -182,6 +185,7 @@ static const struct opt_map opt_map[] = { +@@ -191,6 +194,7 @@ static int opt_nofail = 0; static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper; @@ -458,7 +446,7 @@ index 60fe4fe..164ae3c 100644 static int mounted (const char *spec0, const char *node0); static int check_special_mountprog(const char *spec, const char *node, -@@ -196,6 +200,8 @@ static struct string_opt_map { +@@ -205,6 +209,8 @@ static struct string_opt_map { { "vfs=", 1, &opt_vfstype }, { "offset=", 0, &opt_offset }, { "encryption=", 0, &opt_encryption }, @@ -467,7 +455,7 @@ index 60fe4fe..164ae3c 100644 { "speed=", 0, &opt_speed }, { "comment=", 1, &opt_comment }, { "uhelper=", 0, &opt_uhelper }, -@@ -897,7 +903,7 @@ loop_check(const char **spec, const char **type, int *flags, +@@ -903,7 +909,7 @@ loop_check(const char **spec, const char *type = opt_vfstype; } @@ -476,7 +464,7 @@ index 60fe4fe..164ae3c 100644 *loopfile = *spec; if (*loop) { -@@ -923,9 +929,10 @@ loop_check(const char **spec, const char **type, int *flags, +@@ -929,9 +935,10 @@ loop_check(const char **spec, const char return EX_SYSERR; /* no more loop devices */ if (verbose) printf(_("mount: going to use the loop device %s\n"), *loopdev); @@ -489,15 +477,15 @@ index 60fe4fe..164ae3c 100644 if (res == 2) { /* loop dev has been grabbed by some other process, try again, if not given explicitly */ -@@ -1661,6 +1668,7 @@ static struct option longopts[] = { +@@ -1681,6 +1688,7 @@ static struct option longopts[] = { { "options", 1, 0, 'o' }, { "test-opts", 1, 0, 'O' }, { "pass-fd", 1, 0, 'p' }, + { "keybits", 1, 0, 'k' }, { "types", 1, 0, 't' }, { "bind", 0, 0, 128 }, - { "move", 0, 0, 133 }, -@@ -1807,6 +1815,7 @@ main(int argc, char *argv[]) { + { "replace", 0, 0, 129 }, +@@ -1836,6 +1844,7 @@ main(int argc, char *argv[]) { char *options = NULL, *test_opts = NULL, *node; const char *spec = NULL; char *label = NULL; @@ -505,7 +493,7 @@ index 60fe4fe..164ae3c 100644 char *uuid = NULL; char *types = NULL; char *p; -@@ -1837,7 +1846,7 @@ main(int argc, char *argv[]) { +@@ -1866,7 +1875,7 @@ main(int argc, char *argv[]) { initproctitle(argc, argv); #endif @@ -514,7 +502,7 @@ index 60fe4fe..164ae3c 100644 longopts, NULL)) != -1) { switch (c) { case 'a': /* mount everything in fstab */ -@@ -1855,6 +1864,9 @@ main(int argc, char *argv[]) { +@@ -1884,6 +1893,9 @@ main(int argc, char *argv[]) { case 'i': external_allowed = 0; break; @@ -524,9 +512,9 @@ index 60fe4fe..164ae3c 100644 case 'l': list_with_volumelabel = 1; break; -@@ -1991,6 +2003,9 @@ main(int argc, char *argv[]) { - - atexit(unlock_mtab); +@@ -2030,6 +2042,9 @@ main(int argc, char *argv[]) { + create_mtab (); + } + if (keysize && sscanf(keysize,"%d",&keysz) != 1) + die (EX_USAGE, _("mount: argument to --keybits or -k must be a number")); @@ -534,22 +522,10 @@ index 60fe4fe..164ae3c 100644 switch (argc+specseen) { case 0: /* mount -a */ -diff --git a/mount/my_dev_t.h b/mount/my_dev_t.h -new file mode 100644 -index 0000000..5c4c0a1 +Index: util-linux-ng-2.13.1/mount/rmd160.c +=================================================================== --- /dev/null -+++ b/mount/my_dev_t.h -@@ -0,0 +1,5 @@ -+/* silliness to get dev_t defined as the kernel defines it */ -+/* glibc uses a different dev_t */ -+ -+#include -+#define my_dev_t __kernel_old_dev_t -diff --git a/mount/rmd160.c b/mount/rmd160.c -new file mode 100644 -index 0000000..3430954 ---- /dev/null -+++ b/mount/rmd160.c ++++ util-linux-ng-2.13.1/mount/rmd160.c @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -1083,11 +1059,10 @@ index 0000000..3430954 + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -diff --git a/mount/rmd160.h b/mount/rmd160.h -new file mode 100644 -index 0000000..4b2c61d +Index: util-linux-ng-2.13.1/mount/rmd160.h +=================================================================== --- /dev/null -+++ b/mount/rmd160.h ++++ util-linux-ng-2.13.1/mount/rmd160.h @@ -0,0 +1,11 @@ +#ifndef RMD160_H +#define RMD160_H @@ -1100,11 +1075,10 @@ index 0000000..4b2c61d +#endif /*RMD160_H*/ + + -diff --git a/mount/sha512.c b/mount/sha512.c -new file mode 100644 -index 0000000..e4c9c13 +Index: util-linux-ng-2.13.1/mount/sha512.c +=================================================================== --- /dev/null -+++ b/mount/sha512.c ++++ util-linux-ng-2.13.1/mount/sha512.c @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1538,11 +1512,10 @@ index 0000000..e4c9c13 + memset(&ctx, 0, sizeof(ctx)); +} +#endif -diff --git a/mount/sha512.h b/mount/sha512.h -new file mode 100644 -index 0000000..4b57c01 +Index: util-linux-ng-2.13.1/mount/sha512.h +=================================================================== --- /dev/null -+++ b/mount/sha512.h ++++ util-linux-ng-2.13.1/mount/sha512.h @@ -0,0 +1,45 @@ +/* + * sha512.h @@ -1589,6 +1562,16 @@ index 0000000..4b57c01 +/* no sha384_write(), use sha512_write() */ +/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ +extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); --- -1.5.3.4 - +Index: util-linux-ng-2.13.1/mount/lomount.h +=================================================================== +--- util-linux-ng-2.13.1.orig/mount/lomount.h ++++ util-linux-ng-2.13.1/mount/lomount.h +@@ -1,6 +1,6 @@ + extern int verbose; +-extern int set_loop(const char *, const char *, unsigned long long, +- const char *, int, int *); ++extern int set_loop(const char *device, const char *file, unsigned long long offset, ++ const char *encryption, const char* phash, int pfd, int *loopro, int keysz); + extern int del_loop(const char *); + extern int is_loop_device(const char *); + extern char * find_unused_loop_device(void); diff --git a/util-linux-ng-2.13-swapon-swsuspend.patch b/util-linux-ng-2.13-swapon-swsuspend.patch new file mode 100644 index 0000000..c11b296 --- /dev/null +++ b/util-linux-ng-2.13-swapon-swsuspend.patch @@ -0,0 +1,112 @@ +From db6041b3a569d78f5716baa5a134a3a857014337 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 30 May 2007 13:22:51 +0200 +Subject: [PATCH] mount: automatically reinitialize swap with old swsuspend data + +We have to reinitialize swap area with old (=useless) software suspend +data. The problem is that if we don't do it, then we get data +corruption the next time with suspended on. + +Signed-off-by: Karel Zak +--- + mount/swapon.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 63 insertions(+), 0 deletions(-) + +diff --git a/mount/swapon.c b/mount/swapon.c +index ed91afc..3f9b442 100644 +--- a/mount/swapon.c ++++ b/mount/swapon.c +@@ -10,6 +10,9 @@ + #include + #include + #include ++#include ++#include ++#include + #include "xmalloc.h" + #include "swap_constants.h" + #include "nls.h" +@@ -17,6 +20,8 @@ + #include "realpath.h" + #include "mount_paths.h" + ++#define PATH_MKSWAP "/sbin/mkswap" ++ + #ifdef HAVE_SYS_SWAP_H + # include + #endif +@@ -158,6 +163,52 @@ display_summary(void) + } + + static int ++swap_is_swsuspend(const char *device) { ++ const char *type = fsprobe_get_fstype_by_devname(device); ++ ++ return (type && strcmp(type, "swsuspend") == 0) ? 1 : 0; ++} ++ ++/* calls mkswap */ ++static int ++swap_reinitialize(const char *device) { ++ const char *label = fsprobe_get_label_by_devname(device); ++ pid_t pid; ++ int status, ret; ++ ++ switch((pid=fork())) { ++ case -1: /* fork error */ ++ fprintf(stderr, _("%s: cannot fork: %s\n"), ++ progname, strerror(errno)); ++ return -1; ++ ++ case 0: /* child */ ++ if (label && *label) ++ execl(PATH_MKSWAP, PATH_MKSWAP, "-L", label, device, NULL); ++ else ++ execl(PATH_MKSWAP, PATH_MKSWAP, device, NULL); ++ exit(1); /* error */ ++ ++ default: /* parent */ ++ do { ++ if ((ret = waitpid(pid, &status, 0)) < 0 ++ && errno == EINTR) ++ continue; ++ else if (ret < 0) { ++ fprintf(stderr, _("%s: waitpid: %s\n"), ++ progname, strerror(errno)); ++ return -1; ++ } ++ } while (0); ++ ++ /* mkswap returns: 0=suss, 1=error */ ++ if (WIFEXITED(status) && WEXITSTATUS(status)==0) ++ return 0; /* ok */ ++ } ++ return -1; /* error */ ++} ++ ++static int + do_swapon(const char *orig_special, int prio, int canonic) { + int status; + struct stat st; +@@ -179,6 +230,18 @@ do_swapon(const char *orig_special, int prio, int canonic) { + return -1; + } + ++ /* We have to reinitialize swap with old (=useless) software suspend ++ * data. The problem is that if we don't do it, then we get data ++ * corruption the next time with suspended on. ++ */ ++ if (swap_is_swsuspend(special)) { ++ fprintf(stdout, _("%s: %s: software suspend data detected. " ++ "Reinitializing the swap.\n"), ++ progname, special); ++ if (swap_reinitialize(special) < 0) ++ return -1; ++ } ++ + /* people generally dislike this warning - now it is printed + only when `verbose' is set */ + if (verbose) { +-- +1.5.2.2 + diff --git a/util-linux-ng-2.13.0.1+git20071121.tar.bz2 b/util-linux-ng-2.13.0.1+git20071121.tar.bz2 deleted file mode 100644 index ac50340..0000000 --- a/util-linux-ng-2.13.0.1+git20071121.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:901086dc7bc99a89b9f11839107a0dc83f6b9e89158bccb8b30ad0a5a609123b -size 1585119 diff --git a/util-linux-ng-2.13.1.tar.bz2 b/util-linux-ng-2.13.1.tar.bz2 new file mode 100644 index 0000000..2f38751 --- /dev/null +++ b/util-linux-ng-2.13.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e67d86683adef0855220b6f5a4b7ca2c51a15faa142e2ecd69925ede76854a4d +size 2854716 diff --git a/util-linux.changes b/util-linux.changes index 6098917..fe4f59f 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Feb 13 10:21:42 CET 2008 - bg@suse.de + +- don't try to package parisc*.8 manual pages + +------------------------------------------------------------------- +Mon Feb 11 17:49:04 CET 2008 - mkoenig@suse.de + +- update to version 2.13.1 again +- fix broken util-linux-2.13.1-getfs_fix.patch + ------------------------------------------------------------------- Sun Feb 10 18:11:07 CET 2008 - lrupp@suse.de diff --git a/util-linux.spec b/util-linux.spec index 079cb95..a253399 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.13.0.1+git20071121) +# spec file for package util-linux (Version 2.13.1) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -10,6 +10,7 @@ # norootforbuild + Name: util-linux BuildRequires: audit-devel gettext-devel libuuid-devel libvolume_id-devel ncurses-devel pam-devel zlib-devel Url: http://kernel.org/pub/linux/utils/util-linux @@ -20,8 +21,8 @@ PreReq: %install_info_prereq permissions License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on -Version: 2.13.0.1+git20071121 -Release: 22 +Version: 2.13.1 +Release: 3 Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source1: util-linux-2.13-rpmlintrc @@ -46,28 +47,30 @@ Source28: mkzimage_cmdline.8 Source29: mkzimage_cmdline.c Source30: README.largedisk ## -## util-linux +## util-linux patches ## -# # add hostid Patch1: util-linux-2.12-misc_utils_hostid.patch # 104405 - mount -a doesn't work with hotpluggable devices Patch2: util-linux-mount_opt_nofail.patch -# 176582 - If the user doesn't specify -t mount.fstype will never be called -#TODO: check alternative upstream fix -#Patch96: util-linux-2.12r-mount_external_prog_on_guess.patch # 160822 - fix for 153657 Patch3: util-linux-2.12r-fdisk_cyl.patch # 241372 - remove legacy warnings from fdisk -Patch5: util-linux-2.12r-fdisk_remove_bogus_warnings.patch -# 254437 - swapon should automatically reset the suspend signature -# TODO: Needs to be ported to new version -Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch +Patch4: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # 304861 - support password hashing and key length -Patch10: util-linux-mount_losetup_crypto.patch -Patch11: util-linux-2.13-mount_fd_leak.patch -Patch12: util-linux-2.13-fdisk_cfdisk_ncursesw.patch -Patch13: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch +Patch6: util-linux-2.13-fdisk_cfdisk_ncursesw.patch +# 338419 +Patch7: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch +# in upstream git, but not yet released +Patch8: util-linux-2.13.1-canonicalize_loopfile_name.patch +Patch9: util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch +Patch10: util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch +Patch11: util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch +# +Patch12: util-linux-2.13.1-getfs_fix.patch +# 254437 - swapon should automatically reset the suspend signature +Patch13: util-linux-ng-2.13-swapon-swsuspend.patch +Patch20: util-linux-mount_losetup_crypto.patch ## ## ## adjtimex @@ -105,12 +108,17 @@ Authors: %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch5 -p1 -#%patch38 -p1 +%patch4 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch20 -p1 +#%patch38 -p1 # cd adjtimex-* %patch50 -p1 @@ -283,6 +291,7 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/linux{32,64}.8 rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/ia64.8 rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/s390{,x}.8 rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/ppc{,32,64}.8 +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/parisc{,32,64}.8 # arch dependent %ifarch s390 s390x rm -f $RPM_BUILD_ROOT/etc/fdprm @@ -558,6 +567,11 @@ fi #%endif %changelog +* Wed Feb 13 2008 bg@suse.de +- don't try to package parisc*.8 manual pages +* Mon Feb 11 2008 mkoenig@suse.de +- update to version 2.13.1 again +- fix broken util-linux-2.13.1-getfs_fix.patch * Sun Feb 10 2008 lrupp@suse.de - revert to 2.13.0.1+git20071121 breaks current 'mount' call in Buildservice From 007e8143af725e9ab8587ace99c6247fd873959ff0b0fd09bf09b06bc81804dc Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 27 Mar 2008 22:24:22 +0000 Subject: [PATCH 054/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=54 --- util-linux.changes | 11 +++++++++++ util-linux.spec | 13 +++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index fe4f59f..40c0b3c 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Mar 26 22:05:42 CET 2008 - coolo@suse.de + +- actually require the split out package + +------------------------------------------------------------------- +Sun Mar 23 11:13:13 CET 2008 - coolo@suse.de + +- splitting out 60% of the size of the package: + creating lang subpackage + ------------------------------------------------------------------- Wed Feb 13 10:21:42 CET 2008 - bg@suse.de diff --git a/util-linux.spec b/util-linux.spec index a253399..b5b0ab1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -22,7 +22,8 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.13.1 -Release: 3 +Release: 17 +Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source1: util-linux-2.13-rpmlintrc @@ -103,6 +104,7 @@ Authors: -------- Karel Zak +%lang_package %prep %setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%version %patch1 -p1 @@ -343,7 +345,9 @@ fi %verifyscript %verify_permissions -e /usr/bin/wall -e /usr/bin/write -%files -f %{name}.lang +%files lang -f %{name}.lang + +%files # Common files for all archs %defattr(-,root,root) %doc login-utils/README.getty @@ -567,6 +571,11 @@ fi #%endif %changelog +* Wed Mar 26 2008 coolo@suse.de +- actually require the split out package +* Sun Mar 23 2008 coolo@suse.de +- splitting out 60%% of the size of the package: + creating lang subpackage * Wed Feb 13 2008 bg@suse.de - don't try to package parisc*.8 manual pages * Mon Feb 11 2008 mkoenig@suse.de From e4c3fe11e6e862d1a8fda9117dc5256c5c87e7834275801ac9b887dcd388fd08 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 3 Apr 2008 23:49:00 +0000 Subject: [PATCH 055/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=55 --- util-linux-2.13.1-fdisk_cfdisk_yesno.patch | 19 +++++ util-linux-2.13.1-getfs_fix.patch | 24 ------ util-linux-2.13.1-mount_getfs_fix.patch | 86 ++++++++++++++++++++++ util-linux.changes | 6 ++ util-linux.spec | 20 +++-- 5 files changed, 124 insertions(+), 31 deletions(-) create mode 100644 util-linux-2.13.1-fdisk_cfdisk_yesno.patch delete mode 100644 util-linux-2.13.1-getfs_fix.patch create mode 100644 util-linux-2.13.1-mount_getfs_fix.patch diff --git a/util-linux-2.13.1-fdisk_cfdisk_yesno.patch b/util-linux-2.13.1-fdisk_cfdisk_yesno.patch new file mode 100644 index 0000000..1c47308 --- /dev/null +++ b/util-linux-2.13.1-fdisk_cfdisk_yesno.patch @@ -0,0 +1,19 @@ +Index: util-linux-ng-2.13.1/fdisk/cfdisk.c +=================================================================== +--- util-linux-ng-2.13.1.orig/fdisk/cfdisk.c ++++ util-linux-ng-2.13.1/fdisk/cfdisk.c +@@ -1869,10 +1869,12 @@ write_part_table(void) { + clear_warning(); + if (len == GS_ESCAPE) + return; +- else if (strcasecmp(response, _("no")) == 0) { ++ else if (strcasecmp(response, _("no")) == 0 || ++ strcasecmp(response, "no") == 0) { + print_warning(_("Did not write partition table to disk")); + return; +- } else if (strcasecmp(response, _("yes")) == 0) ++ } else if (strcasecmp(response, _("yes")) == 0 || ++ strcasecmp(response, "yes") == 0) + done = TRUE; + else + print_warning(_("Please enter `yes' or `no'")); diff --git a/util-linux-2.13.1-getfs_fix.patch b/util-linux-2.13.1-getfs_fix.patch deleted file mode 100644 index 5dee921..0000000 --- a/util-linux-2.13.1-getfs_fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -Index: util-linux-ng-2.13.1/mount/fstab.c -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/fstab.c -+++ util-linux-ng-2.13.1/mount/fstab.c -@@ -419,11 +419,17 @@ getfs_by_spec (const char *spec) { - struct mntentchn * - getfs_by_devname (const char *devname) { - struct mntentchn *mc, *mc0; -+ char *name; - - mc0 = fstab_head(); -- for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) -- if (streq(mc->m.mnt_fsname, devname)) -+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) { -+ name = canonicalize(mc->m.mnt_fsname); -+ if (streq(name, devname)) { -+ free(name); - return mc; -+ } -+ free(name); -+ } - return NULL; - } - diff --git a/util-linux-2.13.1-mount_getfs_fix.patch b/util-linux-2.13.1-mount_getfs_fix.patch new file mode 100644 index 0000000..e838463 --- /dev/null +++ b/util-linux-2.13.1-mount_getfs_fix.patch @@ -0,0 +1,86 @@ +X-Gnus-Coding-System: -*- coding: utf-8; -*- + +On Mon, Feb 11, 2008 at 05:04:22PM +0100, Matthias Koenig wrote: +> Matthias Koenig writes: +> +> > Fixes a problem when you define a device via a persistent +> > udev device name in /etc/fstab but use the real block device +> > name on mount invocation. + + I didn't test it, but according to the code (and code never lies:-) + you're right. + +> > mc0 = fstab_head(); +> > - for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) +> > - if (streq(mc->m.mnt_fsname, devname)) +> > + for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) { +> > + name = canonicalize(mc->m.mnt_fsname); +> > + if (streq(name, devname)) { +> > + free(name); +> > return mc; +> > + } +> > + free(name); +> > + } +> > return NULL; +> > } + + We can't simply canonicalize only. We have to support non-canonicalized + (/dev/cdrom, ...) versions too. And there shouldn't be a performance + penalization for people who use canonical paths in their fstab. + +> I am dumb, please ignore this patch. +> New patch will follow. + + No problem. Please, test the patch below. + + Karel + +>From a3c6d618c332ed3651fef629739ac246fd31b7ca Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Fri, 15 Feb 2008 01:56:18 +0100 +Subject: [PATCH] mount: use canonicalize in getfs_by_devname + +Fixes a problem when you define a device via a persistent +udev device name in /etc/fstab but use the real block device +name on mount invocation. + +Signed-off-by: Karel Zak +--- + mount/fstab.c | 13 +++++++++++++ + 1 files changed, 13 insertions(+), 0 deletions(-) + +diff --git a/mount/fstab.c b/mount/fstab.c +index 814e6fc..ada8d32 100644 +--- a/mount/fstab.c ++++ b/mount/fstab.c +@@ -425,9 +425,22 @@ getfs_by_devname (const char *devname) { + struct mntentchn *mc, *mc0; + + mc0 = fstab_head(); ++ ++ /* canonical devname in fstab */ + for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) + if (streq(mc->m.mnt_fsname, devname)) + return mc; ++ ++ /* noncanonical devname in fstab */ ++ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) { ++ char *fs = canonicalize(mc->m.mnt_fsname); ++ if (streq(fs, devname)) { ++ free(fs); ++ return mc; ++ } ++ free(fs); ++ } ++ + return NULL; + } + +-- +1.5.3.8 + +- +To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + diff --git a/util-linux.changes b/util-linux.changes index 40c0b3c..92b2680 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 3 17:11:53 CEST 2008 - mkoenig@suse.de + +- cfdisk: accept english answer [bnc#369043] +- use upstream getfs fix + ------------------------------------------------------------------- Wed Mar 26 22:05:42 CET 2008 - coolo@suse.de diff --git a/util-linux.spec b/util-linux.spec index b5b0ab1..063870d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -22,7 +22,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.13.1 -Release: 17 +Release: 19 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -67,10 +67,12 @@ Patch8: util-linux-2.13.1-canonicalize_loopfile_name.patch Patch9: util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch Patch10: util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch Patch11: util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch -# -Patch12: util-linux-2.13.1-getfs_fix.patch +Patch12: util-linux-2.13.1-mount_getfs_fix.patch # 254437 - swapon should automatically reset the suspend signature Patch13: util-linux-ng-2.13-swapon-swsuspend.patch +# +Patch14: util-linux-2.13.1-fdisk_cfdisk_yesno.patch +# crypto patch Patch20: util-linux-mount_losetup_crypto.patch ## ## @@ -119,6 +121,7 @@ Authors: %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 %patch20 -p1 #%patch38 -p1 # @@ -571,7 +574,10 @@ fi #%endif %changelog -* Wed Mar 26 2008 coolo@suse.de +* Thu Apr 03 2008 mkoenig@suse.de +- cfdisk: accept english answer [bnc#369043] +- use upstream getfs fix +* Thu Mar 27 2008 coolo@suse.de - actually require the split out package * Sun Mar 23 2008 coolo@suse.de - splitting out 60%% of the size of the package: @@ -627,7 +633,7 @@ fi - merged upstream: util-linux-2.13-mount_helper_fix.patch util-linux-2.13-hwclock_rtc_option.patch -* Thu Oct 04 2007 bg@suse.de +* Fri Oct 05 2007 bg@suse.de - don't use parisc, parisc32 and parisc64. * Mon Oct 01 2007 mkoenig@suse.de - update to version 2.13 @@ -1293,7 +1299,7 @@ fi - The install_info macros need PreReq: %%install_info_prereq * Fri Feb 07 2003 ro@suse.de - added install_info macros -* Tue Feb 04 2003 ro@suse.de +* Wed Feb 05 2003 ro@suse.de - don't package /bin/kill (part of coreutils now) * Tue Feb 04 2003 meissner@suse.de - Include tarball with pmac-utils manpages, so we do not need @@ -1710,7 +1716,7 @@ fi - rdev is not built on alpha * Mon Jan 18 1999 florian@suse.de - fixed one broken case to delete a partition in fdisk -* Sun Dec 13 1998 bs@suse.de +* Mon Dec 14 1998 bs@suse.de - fixed file list * Thu Dec 10 1998 fehr@suse.de - fix bug in fdisk From 7083e5a5095598280fdd9af940f0d86c2156cf69210b4176f74e04426d0092a9 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 25 Jun 2008 22:34:31 +0000 Subject: [PATCH 056/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=56 --- util-linux-2.12-misc_utils_hostid.patch | 42 +- util-linux-2.13-fdisk_cfdisk_ncursesw.patch | 13 - ...ux-2.13.1-canonicalize_loopfile_name.patch | 96 ---- ...13.1-mkfs.minix_add_sectorsize_check.patch | 65 --- ....13.1-mkfs.minix_device_size_cleanup.patch | 103 ----- util-linux-2.13.1-mount_getfs_fix.patch | 86 ---- ...nt_loop_mounting_the_same_file_twice.patch | 245 ---------- ...-2.14-mount_ignore_ENXIO_in_del_loop.patch | 37 ++ util-linux-2.14-mount_retry_on_nomedium.patch | 123 ++++++ util-linux-mount_losetup_crypto.patch | 288 ++++++------ util-linux-mount_opt_nofail.patch | 61 --- util-linux-ng-2.13-swapon-swsuspend.patch | 112 ----- util-linux-ng-2.13.1.tar.bz2 | 3 - util-linux-ng-2.14.tar.bz2 | 3 + util-linux.changes | 33 ++ util-linux.spec | 93 ++-- v2.14-ChangeLog | 105 +++++ v2.14-ReleaseNotes | 418 ++++++++++++++++++ 18 files changed, 936 insertions(+), 990 deletions(-) delete mode 100644 util-linux-2.13-fdisk_cfdisk_ncursesw.patch delete mode 100644 util-linux-2.13.1-canonicalize_loopfile_name.patch delete mode 100644 util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch delete mode 100644 util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch delete mode 100644 util-linux-2.13.1-mount_getfs_fix.patch delete mode 100644 util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch create mode 100644 util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch create mode 100644 util-linux-2.14-mount_retry_on_nomedium.patch delete mode 100644 util-linux-mount_opt_nofail.patch delete mode 100644 util-linux-ng-2.13-swapon-swsuspend.patch delete mode 100644 util-linux-ng-2.13.1.tar.bz2 create mode 100644 util-linux-ng-2.14.tar.bz2 create mode 100644 v2.14-ChangeLog create mode 100644 v2.14-ReleaseNotes diff --git a/util-linux-2.12-misc_utils_hostid.patch b/util-linux-2.12-misc_utils_hostid.patch index 1e3828b..18e5d32 100644 --- a/util-linux-2.12-misc_utils_hostid.patch +++ b/util-linux-2.12-misc_utils_hostid.patch @@ -1,7 +1,7 @@ -Index: util-linux-ng-2.12r+git20070530/misc-utils/hostid.1 +Index: util-linux-ng-2.14/misc-utils/hostid.1 =================================================================== ---- /dev/null -+++ util-linux-ng-2.12r+git20070530/misc-utils/hostid.1 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ util-linux-ng-2.14/misc-utils/hostid.1 2008-06-24 12:12:17.000000000 +0200 @@ -0,0 +1,24 @@ +.TH hostid 1 +.SH NAME @@ -27,10 +27,10 @@ Index: util-linux-ng-2.12r+git20070530/misc-utils/hostid.1 +.SH SEE ALSO +gethostid(2), sethostid(2) + -Index: util-linux-ng-2.12r+git20070530/misc-utils/hostid.c +Index: util-linux-ng-2.14/misc-utils/hostid.c =================================================================== ---- /dev/null -+++ util-linux-ng-2.12r+git20070530/misc-utils/hostid.c +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ util-linux-ng-2.14/misc-utils/hostid.c 2008-06-24 12:12:17.000000000 +0200 @@ -0,0 +1,88 @@ +/* Program hostid. Changed on 7.10.1997 + New: - Hostid 0 is not permitted. @@ -120,25 +120,25 @@ Index: util-linux-ng-2.12r+git20070530/misc-utils/hostid.c + + return 0; +} -Index: util-linux-ng-2.12r+git20070530/misc-utils/Makefile.am +Index: util-linux-ng-2.14/misc-utils/Makefile.am =================================================================== ---- util-linux-ng-2.12r+git20070530.orig/misc-utils/Makefile.am -+++ util-linux-ng-2.12r+git20070530/misc-utils/Makefile.am -@@ -5,7 +5,7 @@ EXTRA_DIST = README.flushb +--- util-linux-ng-2.14.orig/misc-utils/Makefile.am 2008-05-29 01:01:02.000000000 +0200 ++++ util-linux-ng-2.14/misc-utils/Makefile.am 2008-06-24 12:13:45.000000000 +0200 +@@ -4,7 +4,7 @@ EXTRA_DIST = README.flushb + bin_PROGRAMS = - usrbinexec_PROGRAMS = cal ddate logger look mcookie \ -- namei script whereis -+ namei script whereis hostid +-usrbinexec_PROGRAMS = cal ddate logger look mcookie \ ++usrbinexec_PROGRAMS = cal ddate hostid logger look mcookie \ + namei script whereis scriptreplay EXTRA_DIST += README.cal README.ddate README.namei README.namei2 - mcookie_SOURCES = mcookie.c ../lib/md5.c -@@ -15,7 +15,7 @@ usrbinexec_SCRIPTS = chkdupexe scriptrep - CLEANFILES = chkdupexe scriptreplay +@@ -14,7 +14,7 @@ usrbinexec_SCRIPTS = chkdupexe - man_MANS = cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \ -- namei.1 script.1 whereis.1 scriptreplay.1 -+ namei.1 script.1 whereis.1 scriptreplay.1 hostid.1 + CLEANFILES = chkdupexe - if HAVE_NCURSES - cal_LDADD = -lncurses +-dist_man_MANS = cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \ ++dist_man_MANS = cal.1 chkdupexe.1 ddate.1 hostid.1 logger.1 look.1 mcookie.1 \ + namei.1 script.1 whereis.1 scriptreplay.1 + + if HAVE_TINFO diff --git a/util-linux-2.13-fdisk_cfdisk_ncursesw.patch b/util-linux-2.13-fdisk_cfdisk_ncursesw.patch deleted file mode 100644 index 20f3226..0000000 --- a/util-linux-2.13-fdisk_cfdisk_ncursesw.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-ng-2.13rc2+git20070725/fdisk/Makefile.am -=================================================================== ---- util-linux-ng-2.13rc2+git20070725.orig/fdisk/Makefile.am -+++ util-linux-ng-2.13rc2+git20070725/fdisk/Makefile.am -@@ -29,7 +29,7 @@ if HAVE_NCURSES - sbin_PROGRAMS += cfdisk - man_MANS += cfdisk.8 - cfdisk_SOURCES = cfdisk.c $(fdisk_common) --cfdisk_LDADD = -lncurses -+cfdisk_LDADD = -lncursesw - endif - endif - diff --git a/util-linux-2.13.1-canonicalize_loopfile_name.patch b/util-linux-2.13.1-canonicalize_loopfile_name.patch deleted file mode 100644 index 04c5e2c..0000000 --- a/util-linux-2.13.1-canonicalize_loopfile_name.patch +++ /dev/null @@ -1,96 +0,0 @@ -commit bfdb8be5c49d8fadb25118fb4416ab2a68fc3a16 -Author: Karel Zak -Date: Thu Oct 25 12:29:51 2007 +0200 - - losetup: canonicalize loopfile name - - When setting up a loop device, canonicalize the loop file - name. This simplifies a later identification of loop file names - when querying the loop devices. - - Co-Author: Matthias Koenig - Signed-off-by: Matthias Koenig - Signed-off-by: Karel Zak - -Index: util-linux-ng-2.13.1/mount/lomount.c -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/lomount.c -+++ util-linux-ng-2.13.1/mount/lomount.c -@@ -22,10 +22,12 @@ - #include "lomount.h" - #include "xstrncpy.h" - #include "nls.h" -+#include "realpath.h" -+#include "xmalloc.h" -+ - - extern int verbose; - extern char *progname; --extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ - extern void error (const char *fmt, ...); /* idem */ - - #define SIZE(a) (sizeof(a)/sizeof(a[0])) -@@ -279,6 +281,7 @@ set_loop(const char *device, const char - struct loop_info64 loopinfo64; - int fd, ffd, mode, i; - char *pass; -+ char filename[PATH_MAX+1]; - - mode = (*loopro ? O_RDONLY : O_RDWR); - if ((ffd = open(file, mode)) < 0) { -@@ -298,7 +301,8 @@ set_loop(const char *device, const char - - memset(&loopinfo64, 0, sizeof(loopinfo64)); - -- xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE); -+ myrealpath(file, filename, PATH_MAX); -+ xstrncpy(loopinfo64.lo_file_name, filename, LO_NAME_SIZE); - - if (encryption && *encryption) { - if (digits_only(encryption)) { -@@ -386,7 +390,7 @@ set_loop(const char *device, const char - - if (verbose > 1) - printf(_("set_loop(%s,%s,%llu): success\n"), -- device, file, offset); -+ device, filename, offset); - return 0; - } - -@@ -470,23 +474,6 @@ usage(void) { - exit(1); - } - --char * --xstrdup (const char *s) { -- char *t; -- -- if (s == NULL) -- return NULL; -- -- t = strdup (s); -- -- if (t == NULL) { -- fprintf(stderr, _("not enough memory")); -- exit(1); -- } -- -- return t; --} -- - void - error (const char *fmt, ...) { - va_list args; -Index: util-linux-ng-2.13.1/mount/Makefile.am -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/Makefile.am -+++ util-linux-ng-2.13.1/mount/Makefile.am -@@ -25,7 +25,7 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD - - swapon_SOURCES = swapon.c swap_constants.h $(utils_common) - --losetup_SOURCES = lomount.c loop.h lomount.h -+losetup_SOURCES = lomount.c loop.h lomount.h realpath.c xmalloc.c - losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) - - mount_LDADD = $(LDADD_common) diff --git a/util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch b/util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch deleted file mode 100644 index f818c34..0000000 --- a/util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch +++ /dev/null @@ -1,65 +0,0 @@ -X-Gnus-Coding-System: -*- coding: utf-8; -*- - -Minix filesystem until version 2 has a fixed blocksize of 1024 bytes. -If you try to create a filsystem on a device with a physical sectorsize -larger than 1024 bytes, this resulting minix fs cannot be mounted, -because the physical sectorsize must be smaller than the filesystem -blocksize. -This patch adds a check for this and will refuse to create a filesystem -if the sectorsize is bigger than the blocksize. - -Signed-off-by: Matthias Koenig ---- - - disk-utils/Makefile.am | 4 +++- - disk-utils/mkfs.minix.c | 12 ++++++++++-- - 2 files changed, 13 insertions(+), 3 deletions(-) - -Index: util-linux-ng-2.13.1/disk-utils/mkfs.minix.c -=================================================================== ---- util-linux-ng-2.13.1.orig/disk-utils/mkfs.minix.c -+++ util-linux-ng-2.13.1/disk-utils/mkfs.minix.c -@@ -78,6 +78,7 @@ - #ifndef BLKGETSIZE - #define BLKGETSIZE _IO(0x12,96) /* return device size */ - #endif -+#define BLKSSZGET _IO(0x12,104)/* get block device sector size */ - - #ifndef __GNUC__ - #error "needs gcc for the bitop-__asm__'s" -@@ -238,6 +239,16 @@ get_size(const char *file) { - return size; - } - -+/* get hardware sector size */ -+int -+blkdev_get_sector_size(int fd, int *sector_size) -+{ -+ if (ioctl(fd, BLKSSZGET, sector_size) >= 0) -+ return 0; -+ -+ return -1; -+} -+ - static void - write_tables(void) { - /* Mark the super block valid. */ -@@ -707,9 +718,16 @@ main(int argc, char ** argv) { - DEV = open(device_name,O_RDWR); - if (DEV<0) - die(_("unable to open %s")); -- if (!S_ISBLK(statbuf.st_mode)) -+ if (S_ISBLK(statbuf.st_mode)) { -+ int sectorsize; -+ -+ if (blkdev_get_sector_size(DEV, §orsize) == -1) -+ die(_("cannot determine sector size for %s")); -+ if (BLOCK_SIZE < sectorsize) -+ die(_("block size smaller than physical sector size of %s")); -+ } else if (!S_ISBLK(statbuf.st_mode)) { - check=0; -- else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) -+ } else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) - die(_("will not try to make filesystem on '%s'")); - setup_tables(); - if (check) diff --git a/util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch b/util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch deleted file mode 100644 index b42b6cb..0000000 --- a/util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch +++ /dev/null @@ -1,103 +0,0 @@ -Index: util-linux-ng-2.13.1/disk-utils/mkfs.minix.c -=================================================================== ---- util-linux-ng-2.13.1.orig/disk-utils/mkfs.minix.c -+++ util-linux-ng-2.13.1/disk-utils/mkfs.minix.c -@@ -78,6 +78,7 @@ - #ifndef BLKGETSIZE - #define BLKGETSIZE _IO(0x12,96) /* return device size */ - #endif -+#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */ - #define BLKSSZGET _IO(0x12,104)/* get block device sector size */ - - #ifndef __GNUC__ -@@ -103,7 +104,7 @@ - static char * program_name = "mkfs"; - static char * device_name = NULL; - static int DEV = -1; --static long BLOCKS = 0; -+static unsigned long long BLOCKS = 0; - static int check = 0; - static int badblocks = 0; - static int namelen = 30; /* default (changed to 30, per Linus's -@@ -219,24 +220,21 @@ count_blocks (int fd) { - return (low + 1); - } - --static int --get_size(const char *file) { -- int fd; -- long size; -- -- fd = open(file, O_RDWR); -- if (fd < 0) { -- perror(file); -- exit(1); -- } -+/* get size in bytes */ -+int -+blkdev_get_size(int fd, unsigned long long *bytes) -+{ -+ unsigned long size; -+ -+ if (ioctl(fd, BLKGETSIZE64, bytes) >= 0) -+ return 0; -+ - if (ioctl(fd, BLKGETSIZE, &size) >= 0) { -- close(fd); -- return (size * 512); -+ *bytes = ((unsigned long long)size << 9); -+ return 0; - } -- -- size = count_blocks(fd); -- close(fd); -- return size; -+ -+ return -1; - } - - /* get hardware sector size */ -@@ -687,19 +685,9 @@ main(int argc, char ** argv) { - } - } - -- if (device_name && !BLOCKS) -- BLOCKS = get_size (device_name) / 1024; -- if (!device_name || BLOCKS<10) { -+ if (!device_name) { - usage(); - } -- if (version2) { -- if (namelen == 14) -- magic = MINIX2_SUPER_MAGIC; -- else -- magic = MINIX2_SUPER_MAGIC2; -- } else -- if (BLOCKS > 65535) -- BLOCKS = 65535; - check_mount(); /* is it already mounted? */ - tmp = root_block; - *(short *)tmp = 1; -@@ -725,10 +713,22 @@ main(int argc, char ** argv) { - die(_("cannot determine sector size for %s")); - if (BLOCK_SIZE < sectorsize) - die(_("block size smaller than physical sector size of %s")); -+ if (!BLOCKS && blkdev_get_size(DEV, &BLOCKS) == -1) -+ die(_("cannot determine size of %s")); - } else if (!S_ISBLK(statbuf.st_mode)) { - check=0; - } else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) - die(_("will not try to make filesystem on '%s'")); -+ if (BLOCKS < 10) -+ die(_("number of blocks too small")); -+ if (version2) { -+ if (namelen == 14) -+ magic = MINIX2_SUPER_MAGIC; -+ else -+ magic = MINIX2_SUPER_MAGIC2; -+ } else -+ if (BLOCKS > 65535) -+ BLOCKS = 65535; - setup_tables(); - if (check) - check_blocks(); diff --git a/util-linux-2.13.1-mount_getfs_fix.patch b/util-linux-2.13.1-mount_getfs_fix.patch deleted file mode 100644 index e838463..0000000 --- a/util-linux-2.13.1-mount_getfs_fix.patch +++ /dev/null @@ -1,86 +0,0 @@ -X-Gnus-Coding-System: -*- coding: utf-8; -*- - -On Mon, Feb 11, 2008 at 05:04:22PM +0100, Matthias Koenig wrote: -> Matthias Koenig writes: -> -> > Fixes a problem when you define a device via a persistent -> > udev device name in /etc/fstab but use the real block device -> > name on mount invocation. - - I didn't test it, but according to the code (and code never lies:-) - you're right. - -> > mc0 = fstab_head(); -> > - for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) -> > - if (streq(mc->m.mnt_fsname, devname)) -> > + for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) { -> > + name = canonicalize(mc->m.mnt_fsname); -> > + if (streq(name, devname)) { -> > + free(name); -> > return mc; -> > + } -> > + free(name); -> > + } -> > return NULL; -> > } - - We can't simply canonicalize only. We have to support non-canonicalized - (/dev/cdrom, ...) versions too. And there shouldn't be a performance - penalization for people who use canonical paths in their fstab. - -> I am dumb, please ignore this patch. -> New patch will follow. - - No problem. Please, test the patch below. - - Karel - ->From a3c6d618c332ed3651fef629739ac246fd31b7ca Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Fri, 15 Feb 2008 01:56:18 +0100 -Subject: [PATCH] mount: use canonicalize in getfs_by_devname - -Fixes a problem when you define a device via a persistent -udev device name in /etc/fstab but use the real block device -name on mount invocation. - -Signed-off-by: Karel Zak ---- - mount/fstab.c | 13 +++++++++++++ - 1 files changed, 13 insertions(+), 0 deletions(-) - -diff --git a/mount/fstab.c b/mount/fstab.c -index 814e6fc..ada8d32 100644 ---- a/mount/fstab.c -+++ b/mount/fstab.c -@@ -425,9 +425,22 @@ getfs_by_devname (const char *devname) { - struct mntentchn *mc, *mc0; - - mc0 = fstab_head(); -+ -+ /* canonical devname in fstab */ - for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) - if (streq(mc->m.mnt_fsname, devname)) - return mc; -+ -+ /* noncanonical devname in fstab */ -+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) { -+ char *fs = canonicalize(mc->m.mnt_fsname); -+ if (streq(fs, devname)) { -+ free(fs); -+ return mc; -+ } -+ free(fs); -+ } -+ - return NULL; - } - --- -1.5.3.8 - -- -To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html - diff --git a/util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch b/util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch deleted file mode 100644 index 63a2f6b..0000000 --- a/util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch +++ /dev/null @@ -1,245 +0,0 @@ -commit 2368077223fa5800cf88659c9c57a7f6517f3fad -Author: Karel Zak -Date: Tue Sep 11 14:35:34 2007 +0200 - - mount: prevent loop mounting the same file twice - - The mount syscall prevents mounting the same device twice - to the same mountpoint. When loop mounting a file, for each - file a new loop device gets allocated, which prevents the detection - of loop mounting the same file to the same mountpoint twice. - The patch adds a check to prevent double mounts, if the same loopfile - is going to be mounted with the same offset to the same mountpoint. - - Co-Author: Matthias Koenig - Signed-off-by: Matthias Koenig - Signed-off-by: Karel Zak - -Index: util-linux-ng-2.13.1/mount/lomount.c -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/lomount.c -+++ util-linux-ng-2.13.1/mount/lomount.c -@@ -143,7 +143,7 @@ show_used_loop_devices (void) { - - for (j = 0; j < SIZE(loop_formats); j++) { - for(i = 0; i < 256; i++) { -- sprintf(dev, loop_formats[j], i); -+ snprintf(dev, sizeof(dev), loop_formats[j], i); - if (stat (dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) { - fd = open (dev, O_RDONLY); - if (fd >= 0) { -@@ -169,6 +169,102 @@ show_used_loop_devices (void) { - - #endif - -+/* check if the loopfile is already associated with the same given -+ * parameters. -+ * -+ * returns: -1 error -+ * 0 unused -+ * 1 loop device already used -+ */ -+static int -+is_associated(int dev, struct stat *file, unsigned long long offset) -+{ -+ struct loop_info64 linfo64; -+ struct loop_info64 linfo; -+ int ret = 0; -+ -+ if (ioctl(dev, LOOP_GET_STATUS64, &linfo64) == 0) { -+ if (file->st_dev == linfo64.lo_device && -+ file->st_ino == linfo64.lo_inode && -+ offset == linfo64.lo_offset) -+ ret = 1; -+ return ret; -+ } -+ if (ioctl(dev, LOOP_GET_STATUS, &linfo) == 0) { -+ if (file->st_dev == linfo.lo_device && -+ file->st_ino == linfo.lo_inode && -+ offset == linfo.lo_offset) -+ ret = 1; -+ return ret; -+ } -+ -+ return errno == ENXIO ? 0 : -1; -+} -+ -+/* check if the loop file is already used with the same given -+ * parameters. We check for device no, inode and offset. -+ * returns: associated devname or NULL -+ */ -+char * -+loopfile_used (const char *filename, unsigned long long offset) { -+ char dev[20]; -+ char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" }; -+ int i, j, fd; -+ struct stat devstat, filestat; -+ struct loop_info loopinfo; -+ -+ if (stat(filename, &filestat) == -1) { -+ perror(filename); -+ return NULL; -+ } -+ -+ for (j = 0; j < SIZE(loop_formats); j++) { -+ for(i = 0; i < 256; i++) { -+ snprintf(dev, sizeof(dev), loop_formats[j], i); -+ if (stat (dev, &devstat) == 0 && S_ISBLK(devstat.st_mode)) { -+ fd = open (dev, O_RDONLY); -+ if (fd >= 0) { -+ int res = 0; -+ -+ if(ioctl (fd, LOOP_GET_STATUS, &loopinfo) == 0) -+ res = is_associated(fd, &filestat, offset); -+ close (fd); -+ if (res == 1) -+ return xstrdup(dev); -+ } -+ continue; /* continue trying as long as devices exist */ -+ } -+ break; -+ } -+ } -+ return NULL; -+} -+ -+int -+loopfile_used_with(char *devname, const char *filename, unsigned long long offset) -+{ -+ struct stat statbuf; -+ int fd, ret; -+ -+ if (!is_loop_device(devname)) -+ return 0; -+ -+ if (stat(filename, &statbuf) == -1) { -+ perror(filename); -+ return -1; -+ } -+ -+ fd = open(devname, O_RDONLY); -+ if (fd == -1) { -+ perror(devname); -+ return -1; -+ } -+ ret = is_associated(fd, &statbuf, offset); -+ -+ close(fd); -+ return ret; -+} -+ - int - is_loop_device (const char *device) { - struct stat statbuf; -@@ -284,6 +380,16 @@ set_loop(const char *device, const char - char *filename; - char res_file[PATH_MAX+1]; - -+ if (verbose) { -+ char *xdev = loopfile_used(file, offset); -+ -+ if (xdev) { -+ printf(_("warning: %s is already associated with %s\n"), -+ file, xdev); -+ free(xdev); -+ } -+ } -+ - mode = (*loopro ? O_RDONLY : O_RDWR); - if ((ffd = open(file, mode)) < 0) { - if (!*loopro && errno == EROFS) -Index: util-linux-ng-2.13.1/mount/lomount.h -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/lomount.h -+++ util-linux-ng-2.13.1/mount/lomount.h -@@ -4,3 +4,6 @@ extern int set_loop(const char *, const - extern int del_loop(const char *); - extern int is_loop_device(const char *); - extern char * find_unused_loop_device(void); -+ -+extern int loopfile_used_with(char *devname, const char *filename, unsigned long long offset); -+extern char *loopfile_used (const char *filename, unsigned long long offset); -Index: util-linux-ng-2.13.1/mount/mount.c -=================================================================== ---- util-linux-ng-2.13.1.orig/mount/mount.c -+++ util-linux-ng-2.13.1/mount/mount.c -@@ -42,6 +42,7 @@ - #include "mount_paths.h" - #include "env.h" - #include "nls.h" -+#include "realpath.h" - - #define DO_PS_FIDDLING - -@@ -833,9 +834,49 @@ suid_check(const char *spec, const char - *flags &= ~(MS_OWNER | MS_GROUP); - } - -+/* Check, if there already exists a mounted loop device on the mountpoint node -+ * with the same parameters. -+ */ -+static int -+is_mounted_same_loopfile(const char *node0, const char *loopfile, unsigned long long offset) -+{ -+ struct mntentchn *mnt = NULL; -+ char node[PATH_MAX+1]; -+ int res = 0; -+ -+ myrealpath(node0, node, PATH_MAX); -+ -+ /* Search for mountpoint node in mtab, -+ * procceed if any of these has the loop option set or -+ * the device is a loop device -+ */ -+ mnt = getmntdirbackward(node, mnt); -+ if (!mnt) { -+ return 0; -+ } -+ for(; mnt && res == 0; mnt = getmntdirbackward(node, mnt)) { -+ char *p; -+ -+ if (strncmp(mnt->m.mnt_fsname, "/dev/loop", 9) == 0) -+ res = loopfile_used_with((char *) mnt->m.mnt_fsname, -+ loopfile, offset); -+ -+ else if ((p = strstr(mnt->m.mnt_opts, "loop="))) { -+ char *dev = xstrdup(p+5); -+ if ((p = strchr(dev, ','))) -+ *p = '\0'; -+ res = loopfile_used_with(dev, loopfile, offset); -+ free(dev); -+ } -+ } -+ -+ return res; -+} -+ - static int - loop_check(const char **spec, const char **type, int *flags, -- int *loop, const char **loopdev, const char **loopfile) { -+ int *loop, const char **loopdev, const char **loopfile, -+ const char *node) { - int looptype; - unsigned long long offset; - -@@ -876,6 +917,11 @@ loop_check(const char **spec, const char - - offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0; - -+ if (is_mounted_same_loopfile(node, *loopfile, offset)) { -+ error(_("mount: according to mtab %s is already mounted on %s as loop"), *loopfile, node); -+ return EX_FAIL; -+ } -+ - do { - if (!*loopdev || !**loopdev) - *loopdev = find_unused_loop_device(); -@@ -1061,7 +1107,7 @@ try_mount_one (const char *spec0, const - * stale assignments of files to loop devices. Nasty when used for - * encryption. - */ -- res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile); -+ res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile, node); - if (res) - goto out; - } diff --git a/util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch b/util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch new file mode 100644 index 0000000..e28eb44 --- /dev/null +++ b/util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch @@ -0,0 +1,37 @@ +Index: util-linux-ng-2.14/mount/lomount.c +=================================================================== +--- util-linux-ng-2.14.orig/mount/lomount.c 2008-06-25 11:35:27.000000000 +0200 ++++ util-linux-ng-2.14/mount/lomount.c 2008-06-25 12:47:28.000000000 +0200 +@@ -878,6 +878,7 @@ set_loop(const char *device, const char + int + del_loop (const char *device) { + int fd; ++ int res = 0; + + if ((fd = open (device, O_RDONLY)) < 0) { + int errsv = errno; +@@ -886,10 +887,22 @@ del_loop (const char *device) { + return 1; + } + if (ioctl (fd, LOOP_CLR_FD, 0) < 0) { +- perror ("ioctl: LOOP_CLR_FD"); ++ if (errno == ENXIO) { ++ /* ignore ENXIO, device has probably been ++ * auto-destructed */ ++ if (verbose > 1) ++ printf(_("del_loop(%s): already deleted\n"), ++ device); ++ res = 0; ++ } else { ++ perror ("ioctl: LOOP_CLR_FD"); ++ res = 1; ++ } ++ + close(fd); +- return 1; ++ return res; + } ++ + close (fd); + if (verbose > 1) + printf(_("del_loop(%s): success\n"), device); diff --git a/util-linux-2.14-mount_retry_on_nomedium.patch b/util-linux-2.14-mount_retry_on_nomedium.patch new file mode 100644 index 0000000..5d50d96 --- /dev/null +++ b/util-linux-2.14-mount_retry_on_nomedium.patch @@ -0,0 +1,123 @@ +mount: retry on ENOMEDIUM + +From: Matthias Koenig + +Due to a change in kernel behaviour when opening CDROM devices, +we need to retry the open/mount call when ENOMEDIUM is returned. + +Explanation from Tejun Heo: +Okay, the difference is from the addition of cdrom_get_media_event() +call to both sr_drive_status() and ide_cdrom_drive_status(). +Previously, the cdrom driver can't differentiate between tray closed +w/ no media and tray open and always returned tray open, which +triggers close and retry in the open logic which probably have delayed +things enough to get the media recognized. + +Now the cdrom driver can discern between tray closed w/o media and +device not ready for other reasons and returns -ENOMEDIUM on the +former. This is all good and dandy but the problem seems that some +drives report no media right after the tray is closed but it hasn't +properly detected the media yet. + +It seems the only way to work around the problem is via sensible +retries (e.g. try three times 5 secs apart) and I don't think we can +add that type of retry logic into cdrom open path. Please note that +the previous logic wasn't water proof. Some drives can take longer to +recognize the media is there and could have failed the in-kernel retry +too. Also, reading the media can take quite some time and during that +period the drive reports media present but device not ready. The +driver will retry the command (e.g. READ TOC for open) five times but +all of them can fail w/ EMEDIUMTYPE. + +Signed-off-by: Matthias Koenig +--- + + mount/fsprobe_volumeid.c | 15 +++++++++++++-- + mount/mount.c | 11 +++++++++++ + 2 files changed, 24 insertions(+), 2 deletions(-) + +diff --git a/mount/fsprobe_volumeid.c b/mount/fsprobe_volumeid.c +index 7c98dc6..1ef788c 100644 +--- a/mount/fsprobe_volumeid.c ++++ b/mount/fsprobe_volumeid.c +@@ -3,6 +3,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -15,6 +16,8 @@ + #include "pathnames.h" + #include "sundries.h" + ++#define MAX_RETRIES 5 ++ + enum probe_type { + VOLUME_ID_NONE, + VOLUME_ID_LABEL, +@@ -30,10 +33,18 @@ static char + struct volume_id *id; + const char *val; + char *value = NULL; ++ int retries = 0; + ++retry: + fd = open(device, O_RDONLY); +- if (fd < 0) +- return NULL; ++ if (fd < 0) { ++ if (errno == ENOMEDIUM && retries < MAX_RETRIES) { ++ ++retries; ++ sleep(3); ++ goto retry; ++ } else ++ return NULL; ++ } + + id = volume_id_open_fd(fd); + if (!id) { +diff --git a/mount/mount.c b/mount/mount.c +index bed792d..5d50bca 100644 +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -1061,6 +1061,7 @@ cdrom_setspeed(const char *spec) { + static int + try_mount_one (const char *spec0, const char *node0, const char *types0, + const char *opts0, int freq, int pass, int ro) { ++#define MAX_RETRIES 5 + int res = 0, status = 0, special = 0; + int mnt5_res = 0; /* only for gcc */ + int mnt_err; +@@ -1072,6 +1073,7 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, + int loop = 0; + const char *loopdev = 0, *loopfile = 0; + struct stat statbuf; ++ int retries = 0; /* Nr of retries for mount in case of ENOMEDIUM */ + + /* copies for freeing on exit */ + const char *opts1, *spec1, *node1, *types1, *extra_opts1; +@@ -1134,6 +1136,7 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, + goto out; + } + ++mount_retry: + block_signals (SIG_BLOCK); + + if (!fake) { +@@ -1363,6 +1366,14 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, + } + break; + } ++ case ENOMEDIUM: ++ if (retries < MAX_RETRIES) { ++ ++retries; ++ sleep(3); ++ goto mount_retry; ++ } ++ error(_("mount: No medium found on %s"), spec); ++ break; + default: + error ("mount: %s", strerror (mnt_err)); break; + } diff --git a/util-linux-mount_losetup_crypto.patch b/util-linux-mount_losetup_crypto.patch index 53f4cff..f5dccbf 100644 --- a/util-linux-mount_losetup_crypto.patch +++ b/util-linux-mount_losetup_crypto.patch @@ -40,62 +40,58 @@ Signed-off-by: Ludwig Nussel create mode 100644 mount/sha512.c create mode 100644 mount/sha512.h -Index: util-linux-ng-2.13.1/mount/Makefile.am +Index: util-linux-ng-2.14/mount/Makefile.am =================================================================== ---- util-linux-ng-2.13.1.orig/mount/Makefile.am -+++ util-linux-ng-2.13.1/mount/Makefile.am -@@ -13,6 +13,7 @@ headers_common = fstab.h linux_fs.h moun +--- util-linux-ng-2.14.orig/mount/Makefile.am 2008-05-29 01:01:02.000000000 +0200 ++++ util-linux-ng-2.14/mount/Makefile.am 2008-06-25 11:33:15.000000000 +0200 +@@ -13,6 +13,7 @@ headers_common = fstab.h mount_mntent.h getusername.h loop.h sundries.h mount_common = fstab.c mount_mntent.c getusername.c lomount.c \ -+ rmd160.c sha512.c \ - $(utils_common) $(headers_common) ../lib/env.c - - mount_SOURCES = mount.c $(mount_common) ../lib/setproctitle.c -@@ -25,7 +26,8 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD ++ rmd160.c sha512.c \ + $(utils_common) $(headers_common) ../lib/env.c ../lib/linux_version.c \ + ../lib/blkdev.c +@@ -27,7 +28,8 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD swapon_SOURCES = swapon.c swap_constants.h $(utils_common) --losetup_SOURCES = lomount.c loop.h lomount.h realpath.c xmalloc.c -+losetup_SOURCES = lomount.c loop.h lomount.h realpath.c xmalloc.c \ -+ rmd160.c sha512.c + losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c \ +- loop.h lomount.h xmalloc.h sundries.h realpath.h ++ loop.h lomount.h xmalloc.h sundries.h realpath.h \ ++ rmd160.c sha512.c losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) mount_LDADD = $(LDADD_common) -Index: util-linux-ng-2.13.1/mount/lomount.c +Index: util-linux-ng-2.14/mount/lomount.c =================================================================== ---- util-linux-ng-2.13.1.orig/mount/lomount.c -+++ util-linux-ng-2.13.1/mount/lomount.c -@@ -20,11 +20,16 @@ - - #include "loop.h" - #include "lomount.h" +--- util-linux-ng-2.14.orig/mount/lomount.c 2008-05-29 01:01:02.000000000 +0200 ++++ util-linux-ng-2.14/mount/lomount.c 2008-06-25 11:33:15.000000000 +0200 +@@ -24,6 +24,12 @@ + #include "sundries.h" + #include "xmalloc.h" + #include "realpath.h" +#include "rmd160.h" +#include "sha512.h" - #include "xstrncpy.h" - #include "nls.h" - #include "realpath.h" - #include "xmalloc.h" - ++ +#ifndef MIN +#define MIN(a,b) ((a enable data encryption with specified \n" + " -H | --phash hash password using specified algorithm (sha512/sha256/sha384/rmd160/none)\n" " -h | --help this help\n" @@ -298,50 +283,50 @@ Index: util-linux-ng-2.13.1/mount/lomount.c + " key size. Key sizes < 128 are generally not\n" + " recommended\n" " -o | --offset start at offset into file\n" + " --sizelimit loop limited to only bytes of the file\n" " -p | --pass-fd read passphrase from file descriptor \n" - " -r | --read-only setup read-only loop device\n" -@@ -594,11 +708,14 @@ error (const char *fmt, ...) { +@@ -850,11 +965,14 @@ usage(void) { int main(int argc, char **argv) { - char *p, *offset, *encryption, *passfd, *device, *file; -+ char *keysize; -+ char *phash = NULL; + char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc; ++ char *keysize; ++ char *phash = NULL; int delete, find, c, all; int res = 0; int showdev = 0; int ro = 0; int pfd = -1; -+ int keysz = 0; - unsigned long long off; ++ int keysz = 0; + unsigned long long off, slimit; struct option longopts[] = { { "all", 0, 0, 'a' }, -@@ -606,6 +723,8 @@ main(int argc, char **argv) { +@@ -862,6 +980,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, + { "keybits", 1, 0, 'k' }, + { "phash", 1, 0, 'H' }, + { "associated", 1, 0, 'j' }, { "offset", 1, 0, 'o' }, - { "pass-fd", 1, 0, 'p' }, - { "read-only", 0, 0, 'r' }, -@@ -621,12 +740,13 @@ main(int argc, char **argv) { - delete = find = all = 0; + { "sizelimit", 1, 0, 128 }, +@@ -880,12 +1000,13 @@ main(int argc, char **argv) { off = 0; - offset = encryption = passfd = NULL; + slimit = 0; + assoc = offset = sizelimit = encryption = passfd = NULL; + keysize = NULL; progname = argv[0]; if ((p = strrchr(progname, '/')) != NULL) progname = p+1; -- while ((c = getopt_long(argc, argv, "ade:E:fho:p:rsv", -+ while ((c = getopt_long(argc, argv, "ade:E:fhk:o:p:rsvH:", +- while ((c = getopt_long(argc, argv, "ade:E:fhj:o:p:rsv", ++ while ((c = getopt_long(argc, argv, "ade:E:fhj:k:o:p:rsvH:", longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -645,6 +765,12 @@ main(int argc, char **argv) { - case 'f': - find = 1; +@@ -907,6 +1028,12 @@ main(int argc, char **argv) { + case 'j': + assoc = optarg; break; + case 'k': + keysize = optarg; @@ -352,24 +337,25 @@ Index: util-linux-ng-2.13.1/mount/lomount.c case 'o': offset = optarg; break; -@@ -708,8 +834,10 @@ main(int argc, char **argv) { - usage(); +@@ -985,8 +1112,11 @@ main(int argc, char **argv) { + else { if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(); + if (keysize && sscanf(keysize,"%d",&keysz) != 1) + usage(); do { -- res = set_loop(device, file, off, encryption, pfd, &ro); -+ res = set_loop(device, file, off, encryption, phash, pfd, &ro, keysz); +- res = set_loop(device, file, off, slimit, encryption, pfd, &ro); ++ res = set_loop(device, file, off, slimit, encryption, phash, ++ pfd, &ro, keysz); if (res == 2 && find) { if (verbose) printf("stolen loop=%s...trying again\n", -Index: util-linux-ng-2.13.1/mount/losetup.8 +Index: util-linux-ng-2.14/mount/losetup.8 =================================================================== ---- util-linux-ng-2.13.1.orig/mount/losetup.8 -+++ util-linux-ng-2.13.1/mount/losetup.8 -@@ -76,6 +76,15 @@ find the first unused loop device. If a - argument is present, use this device. Otherwise, print its name. +--- util-linux-ng-2.14.orig/mount/losetup.8 2008-05-29 01:01:02.000000000 +0200 ++++ util-linux-ng-2.14/mount/losetup.8 2008-06-25 11:33:15.000000000 +0200 +@@ -80,9 +80,18 @@ find the first unused loop device. If a + argument is present, use this device. Otherwise, print its name .IP "\fB\-h, \-\-help\fP" print help +.IP "\fB\-H, \-\-phash \fIhash_type\fP" @@ -379,12 +365,15 @@ Index: util-linux-ng-2.13.1/mount/losetup.8 +.BR sha384 , +.BR rmd160 , +.BR none . + .IP "\fB\-j, \-\-associated \fIfile\fP" + show status of all loop devices associated with given + .I file +.IP "\fB\-k, \-\-keybits \fInum\fP" +set the number of bits to use in key to \fInum\fP. .IP "\fB\-o, \-\-offset \fIoffset\fP" - The data start is moved \fIoffset\fP bytes into the specified file or - device. -@@ -140,6 +149,8 @@ the command + the data start is moved \fIoffset\fP bytes into the specified file or + device +@@ -153,6 +162,8 @@ the command .fi .SH RESTRICTION DES encryption is painfully slow. On the other hand, XOR is terribly weak. @@ -393,13 +382,13 @@ Index: util-linux-ng-2.13.1/mount/losetup.8 Cryptoloop is deprecated in favor of dm-crypt. For more details see .B cryptsetup(8). -Index: util-linux-ng-2.13.1/mount/mount.8 +Index: util-linux-ng-2.14/mount/mount.8 =================================================================== ---- util-linux-ng-2.13.1.orig/mount/mount.8 -+++ util-linux-ng-2.13.1/mount/mount.8 -@@ -610,6 +610,15 @@ This option implies the options - (unless overridden by subsequent options, as in the option line - .BR group,dev,suid ). +--- util-linux-ng-2.14.orig/mount/mount.8 2008-06-09 11:28:17.000000000 +0200 ++++ util-linux-ng-2.14/mount/mount.8 2008-06-25 11:33:15.000000000 +0200 +@@ -618,6 +618,15 @@ This option implies the options + .B nofail + Do not report errors for this device if it does not exist. .TP +.B encryption +Specifies an encryption algorithm to use. Used in conjunction with the @@ -407,13 +396,13 @@ Index: util-linux-ng-2.13.1/mount/mount.8 +.TP +.B keybits +Specifies the key size to use for an encryption algorithm. Used in conjunction -+with the ++with the +.BR loop " and " encryption " options." +.TP .B mand Allow mandatory locks on this filesystem. See .BR fcntl (2). -@@ -2008,6 +2017,10 @@ that are really options to +@@ -2034,6 +2043,10 @@ that are really options to .BR \%losetup (8). (These options can be used in addition to those specific to the filesystem type.) @@ -424,11 +413,11 @@ Index: util-linux-ng-2.13.1/mount/mount.8 If no explicit loop device is mentioned (but just an option `\fB\-o loop\fP' is given), then -Index: util-linux-ng-2.13.1/mount/mount.c +Index: util-linux-ng-2.14/mount/mount.c =================================================================== ---- util-linux-ng-2.13.1.orig/mount/mount.c -+++ util-linux-ng-2.13.1/mount/mount.c -@@ -94,6 +94,9 @@ static int suid = 0; +--- util-linux-ng-2.14.orig/mount/mount.c 2008-05-29 01:01:02.000000000 +0200 ++++ util-linux-ng-2.14/mount/mount.c 2008-06-25 11:33:15.000000000 +0200 +@@ -87,6 +87,9 @@ static int suid = 0; /* Contains the fd to read the passphrase from, if any. */ static int pfd = -1; @@ -438,54 +427,51 @@ Index: util-linux-ng-2.13.1/mount/mount.c /* Map from -o and fstab option strings to the flag argument to mount(2). */ struct opt_map { const char *opt; /* option name */ -@@ -191,6 +194,7 @@ static int opt_nofail = 0; +@@ -184,6 +187,7 @@ static int opt_nofail = 0; - static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, - *opt_speed, *opt_comment, *opt_uhelper; + static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_sizelimit, + *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper; +static const char *opt_keybits, *opt_phash; static int mounted (const char *spec0, const char *node0); static int check_special_mountprog(const char *spec, const char *node, -@@ -205,6 +209,8 @@ static struct string_opt_map { - { "vfs=", 1, &opt_vfstype }, +@@ -199,6 +203,8 @@ static struct string_opt_map { { "offset=", 0, &opt_offset }, + { "sizelimit=", 0, &opt_sizelimit }, { "encryption=", 0, &opt_encryption }, + { "phash=", 0, &opt_phash }, + { "keybits=", 0, &opt_keybits }, { "speed=", 0, &opt_speed }, { "comment=", 1, &opt_comment }, { "uhelper=", 0, &opt_uhelper }, -@@ -903,7 +909,7 @@ loop_check(const char **spec, const char +@@ -898,7 +904,8 @@ loop_check(const char **spec, const char *type = opt_vfstype; } -- *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_encryption); -+ *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_encryption || opt_phash || opt_keybits); +- *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_sizelimit || opt_encryption); ++ *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_sizelimit || ++ opt_encryption || opt_phash || opt_keybits); *loopfile = *spec; if (*loop) { -@@ -929,9 +935,10 @@ loop_check(const char **spec, const char - return EX_SYSERR; /* no more loop devices */ - if (verbose) +@@ -930,7 +937,7 @@ loop_check(const char **spec, const char printf(_("mount: going to use the loop device %s\n"), *loopdev); -- -+ if (!keysz && opt_keybits) -+ keysz = strtoul(opt_keybits, NULL, 0); - if ((res = set_loop(*loopdev, *loopfile, offset, -- opt_encryption, pfd, &loopro))) { -+ opt_encryption, opt_phash, pfd, &loopro, keysz))) { + + if ((res = set_loop(*loopdev, *loopfile, offset, sizelimit, +- opt_encryption, pfd, &loop_opts))) { ++ opt_encryption, opt_phash, pfd, &loop_opts, keysz))) { if (res == 2) { /* loop dev has been grabbed by some other process, try again, if not given explicitly */ -@@ -1681,6 +1688,7 @@ static struct option longopts[] = { +@@ -1650,6 +1657,7 @@ static struct option longopts[] = { { "options", 1, 0, 'o' }, { "test-opts", 1, 0, 'O' }, { "pass-fd", 1, 0, 'p' }, + { "keybits", 1, 0, 'k' }, { "types", 1, 0, 't' }, { "bind", 0, 0, 128 }, - { "replace", 0, 0, 129 }, -@@ -1836,6 +1844,7 @@ main(int argc, char *argv[]) { + { "move", 0, 0, 133 }, +@@ -1811,6 +1819,7 @@ main(int argc, char *argv[]) { char *options = NULL, *test_opts = NULL, *node; const char *spec = NULL; char *label = NULL; @@ -493,7 +479,7 @@ Index: util-linux-ng-2.13.1/mount/mount.c char *uuid = NULL; char *types = NULL; char *p; -@@ -1866,7 +1875,7 @@ main(int argc, char *argv[]) { +@@ -1841,7 +1850,7 @@ main(int argc, char *argv[]) { initproctitle(argc, argv); #endif @@ -502,7 +488,7 @@ Index: util-linux-ng-2.13.1/mount/mount.c longopts, NULL)) != -1) { switch (c) { case 'a': /* mount everything in fstab */ -@@ -1884,6 +1893,9 @@ main(int argc, char *argv[]) { +@@ -1859,6 +1868,9 @@ main(int argc, char *argv[]) { case 'i': external_allowed = 0; break; @@ -512,9 +498,9 @@ Index: util-linux-ng-2.13.1/mount/mount.c case 'l': list_with_volumelabel = 1; break; -@@ -2030,6 +2042,9 @@ main(int argc, char *argv[]) { - create_mtab (); - } +@@ -1989,6 +2001,9 @@ main(int argc, char *argv[]) { + + atexit(unlock_mtab); + if (keysize && sscanf(keysize,"%d",&keysz) != 1) + die (EX_USAGE, _("mount: argument to --keybits or -k must be a number")); @@ -522,10 +508,10 @@ Index: util-linux-ng-2.13.1/mount/mount.c switch (argc+specseen) { case 0: /* mount -a */ -Index: util-linux-ng-2.13.1/mount/rmd160.c +Index: util-linux-ng-2.14/mount/rmd160.c =================================================================== ---- /dev/null -+++ util-linux-ng-2.13.1/mount/rmd160.c +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ util-linux-ng-2.14/mount/rmd160.c 2008-06-25 11:33:15.000000000 +0200 @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -1059,10 +1045,10 @@ Index: util-linux-ng-2.13.1/mount/rmd160.c + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -Index: util-linux-ng-2.13.1/mount/rmd160.h +Index: util-linux-ng-2.14/mount/rmd160.h =================================================================== ---- /dev/null -+++ util-linux-ng-2.13.1/mount/rmd160.h +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ util-linux-ng-2.14/mount/rmd160.h 2008-06-25 11:33:15.000000000 +0200 @@ -0,0 +1,11 @@ +#ifndef RMD160_H +#define RMD160_H @@ -1075,10 +1061,10 @@ Index: util-linux-ng-2.13.1/mount/rmd160.h +#endif /*RMD160_H*/ + + -Index: util-linux-ng-2.13.1/mount/sha512.c +Index: util-linux-ng-2.14/mount/sha512.c =================================================================== ---- /dev/null -+++ util-linux-ng-2.13.1/mount/sha512.c +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ util-linux-ng-2.14/mount/sha512.c 2008-06-25 11:33:15.000000000 +0200 @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1199,7 +1185,7 @@ Index: util-linux-ng-2.13.1/mount/sha512.c + (((u_int32_t)(datap[2]))<<8 ) | ((u_int32_t)(datap[3])); + datap += 4; + } while(++j < 16); -+ ++ + /* initialize variables a...h */ + a = ctx->sha_H[0]; + b = ctx->sha_H[1]; @@ -1286,7 +1272,7 @@ Index: util-linux-ng-2.13.1/mount/sha512.c + ctx->sha_out[62] = bitLength >> 8; + ctx->sha_out[63] = bitLength; + sha256_transform(ctx, &ctx->sha_out[0]); -+ ++ + /* return results in ctx->sha_out[0...31] */ + datap = &ctx->sha_out[0]; + j = 0; @@ -1356,7 +1342,7 @@ Index: util-linux-ng-2.13.1/mount/sha512.c + (((u_int64_t)(datap[6]))<<8 ) | ((u_int64_t)(datap[7])); + datap += 8; + } while(++j < 16); -+ ++ + /* initialize variables a...h */ + a = ctx->sha_H[0]; + b = ctx->sha_H[1]; @@ -1453,7 +1439,7 @@ Index: util-linux-ng-2.13.1/mount/sha512.c + ctx->sha_out[126] = bitLength >> 8; + ctx->sha_out[127] = bitLength; + sha512_transform(ctx, &ctx->sha_out[0]); -+ ++ + /* return results in ctx->sha_out[0...63] */ + datap = &ctx->sha_out[0]; + j = 0; @@ -1512,10 +1498,10 @@ Index: util-linux-ng-2.13.1/mount/sha512.c + memset(&ctx, 0, sizeof(ctx)); +} +#endif -Index: util-linux-ng-2.13.1/mount/sha512.h +Index: util-linux-ng-2.14/mount/sha512.h =================================================================== ---- /dev/null -+++ util-linux-ng-2.13.1/mount/sha512.h +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ util-linux-ng-2.14/mount/sha512.h 2008-06-25 11:33:15.000000000 +0200 @@ -0,0 +1,45 @@ +/* + * sha512.h @@ -1562,16 +1548,16 @@ Index: util-linux-ng-2.13.1/mount/sha512.h +/* no sha384_write(), use sha512_write() */ +/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ +extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); -Index: util-linux-ng-2.13.1/mount/lomount.h +Index: util-linux-ng-2.14/mount/lomount.h =================================================================== ---- util-linux-ng-2.13.1.orig/mount/lomount.h -+++ util-linux-ng-2.13.1/mount/lomount.h -@@ -1,6 +1,6 @@ - extern int verbose; --extern int set_loop(const char *, const char *, unsigned long long, +--- util-linux-ng-2.14.orig/mount/lomount.h 2008-05-29 01:01:02.000000000 +0200 ++++ util-linux-ng-2.14/mount/lomount.h 2008-06-25 11:33:15.000000000 +0200 +@@ -1,5 +1,6 @@ +-extern int set_loop(const char *, const char *, unsigned long long, unsigned long long, - const char *, int, int *); -+extern int set_loop(const char *device, const char *file, unsigned long long offset, -+ const char *encryption, const char* phash, int pfd, int *loopro, int keysz); ++extern int set_loop(const char * device, const char * file, unsigned long long offset, ++ unsigned long long, const char *encryption, const char *phash, ++ int pfd, int *options, int keysz); extern int del_loop(const char *); extern int is_loop_device(const char *); extern char * find_unused_loop_device(void); diff --git a/util-linux-mount_opt_nofail.patch b/util-linux-mount_opt_nofail.patch deleted file mode 100644 index a326a42..0000000 --- a/util-linux-mount_opt_nofail.patch +++ /dev/null @@ -1,61 +0,0 @@ -Do not fail on ENOENT - -Introduces a new mount option "nofail" which prevents mount -to fail if the device does not exist. - -Signed-off-by: Matthias Koenig - -Index: util-linux-ng-2.13-rc1/mount/mount.8 -=================================================================== ---- util-linux-ng-2.13-rc1.orig/mount/mount.8 -+++ util-linux-ng-2.13-rc1/mount/mount.8 -@@ -625,6 +625,9 @@ access on the news spool to speed up new - .B nodiratime - Do not update directory inode access times on this filesystem. - .TP -+.B nofail -+Do not report errors for this device if it does not exist. -+.TP - .B relatime - Update inode access times relative to modify or change time. Access - time is only updated if the previous access time was earlier than the -Index: util-linux-ng-2.13-rc1/mount/mount.c -=================================================================== ---- util-linux-ng-2.13-rc1.orig/mount/mount.c -+++ util-linux-ng-2.13-rc1/mount/mount.c -@@ -182,9 +182,12 @@ static const struct opt_map opt_map[] = - { "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard - to mtime/ctime */ - #endif -+ { "nofail", 0, 0, MS_COMMENT}, /* Do not fail if ENOENT on dev */ - { NULL, 0, 0, 0 } - }; - -+static int opt_nofail = 0; -+ - static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, - *opt_speed, *opt_comment, *opt_uhelper; - -@@ -389,6 +392,8 @@ parse_opt(char *opt, int *mask, char **e - verbose = 0; - } - #endif -+ if (streq(opt, "nofail")) -+ opt_nofail = 1; - return; - } - -@@ -1150,9 +1155,11 @@ try_mount_one (const char *spec0, const - else if (stat (node, &statbuf)) - error (_("mount: mount point %s is a symbolic link to nowhere"), - node); -- else if (stat (spec, &statbuf)) -+ else if (stat (spec, &statbuf)) { -+ if (opt_nofail) -+ goto out; - error (_("mount: special device %s does not exist"), spec); -- else { -+ } else { - errno = mnt_err; - perror("mount"); - } diff --git a/util-linux-ng-2.13-swapon-swsuspend.patch b/util-linux-ng-2.13-swapon-swsuspend.patch deleted file mode 100644 index c11b296..0000000 --- a/util-linux-ng-2.13-swapon-swsuspend.patch +++ /dev/null @@ -1,112 +0,0 @@ -From db6041b3a569d78f5716baa5a134a3a857014337 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 30 May 2007 13:22:51 +0200 -Subject: [PATCH] mount: automatically reinitialize swap with old swsuspend data - -We have to reinitialize swap area with old (=useless) software suspend -data. The problem is that if we don't do it, then we get data -corruption the next time with suspended on. - -Signed-off-by: Karel Zak ---- - mount/swapon.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 63 insertions(+), 0 deletions(-) - -diff --git a/mount/swapon.c b/mount/swapon.c -index ed91afc..3f9b442 100644 ---- a/mount/swapon.c -+++ b/mount/swapon.c -@@ -10,6 +10,9 @@ - #include - #include - #include -+#include -+#include -+#include - #include "xmalloc.h" - #include "swap_constants.h" - #include "nls.h" -@@ -17,6 +20,8 @@ - #include "realpath.h" - #include "mount_paths.h" - -+#define PATH_MKSWAP "/sbin/mkswap" -+ - #ifdef HAVE_SYS_SWAP_H - # include - #endif -@@ -158,6 +163,52 @@ display_summary(void) - } - - static int -+swap_is_swsuspend(const char *device) { -+ const char *type = fsprobe_get_fstype_by_devname(device); -+ -+ return (type && strcmp(type, "swsuspend") == 0) ? 1 : 0; -+} -+ -+/* calls mkswap */ -+static int -+swap_reinitialize(const char *device) { -+ const char *label = fsprobe_get_label_by_devname(device); -+ pid_t pid; -+ int status, ret; -+ -+ switch((pid=fork())) { -+ case -1: /* fork error */ -+ fprintf(stderr, _("%s: cannot fork: %s\n"), -+ progname, strerror(errno)); -+ return -1; -+ -+ case 0: /* child */ -+ if (label && *label) -+ execl(PATH_MKSWAP, PATH_MKSWAP, "-L", label, device, NULL); -+ else -+ execl(PATH_MKSWAP, PATH_MKSWAP, device, NULL); -+ exit(1); /* error */ -+ -+ default: /* parent */ -+ do { -+ if ((ret = waitpid(pid, &status, 0)) < 0 -+ && errno == EINTR) -+ continue; -+ else if (ret < 0) { -+ fprintf(stderr, _("%s: waitpid: %s\n"), -+ progname, strerror(errno)); -+ return -1; -+ } -+ } while (0); -+ -+ /* mkswap returns: 0=suss, 1=error */ -+ if (WIFEXITED(status) && WEXITSTATUS(status)==0) -+ return 0; /* ok */ -+ } -+ return -1; /* error */ -+} -+ -+static int - do_swapon(const char *orig_special, int prio, int canonic) { - int status; - struct stat st; -@@ -179,6 +230,18 @@ do_swapon(const char *orig_special, int prio, int canonic) { - return -1; - } - -+ /* We have to reinitialize swap with old (=useless) software suspend -+ * data. The problem is that if we don't do it, then we get data -+ * corruption the next time with suspended on. -+ */ -+ if (swap_is_swsuspend(special)) { -+ fprintf(stdout, _("%s: %s: software suspend data detected. " -+ "Reinitializing the swap.\n"), -+ progname, special); -+ if (swap_reinitialize(special) < 0) -+ return -1; -+ } -+ - /* people generally dislike this warning - now it is printed - only when `verbose' is set */ - if (verbose) { --- -1.5.2.2 - diff --git a/util-linux-ng-2.13.1.tar.bz2 b/util-linux-ng-2.13.1.tar.bz2 deleted file mode 100644 index 2f38751..0000000 --- a/util-linux-ng-2.13.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e67d86683adef0855220b6f5a4b7ca2c51a15faa142e2ecd69925ede76854a4d -size 2854716 diff --git a/util-linux-ng-2.14.tar.bz2 b/util-linux-ng-2.14.tar.bz2 new file mode 100644 index 0000000..04ee073 --- /dev/null +++ b/util-linux-ng-2.14.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7736d8d7d3b39654e350416585b3e00af9f55670cce8b3dddd2c2494cbaae81c +size 2868987 diff --git a/util-linux.changes b/util-linux.changes index 92b2680..a4657f0 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,36 @@ +------------------------------------------------------------------- +Wed Jun 25 14:26:49 CEST 2008 - mkoenig@suse.de + +- update to version 2.14 + most important changes: + * new command ldattach + mount: + * support auto-destruction of loop devices + losetup: + * new option -j + * supports unlimited number of loop devices + * new option --sizelimit to set data end + * option -s (short form of --show) now deprecated + mkswap: + * new option -U to set UUID explicitly + fdisk: + * calculate partition size in 2^N [bnc#381270] + hwclock: + * new option --adjfile to override default /etc/adjtime +- readd scriptreplay, implemented now in C +- add retry for mount if ENOMEDIUM is returned [bnc#390204] +- ignore ENXIO in del_loop, because they might have been + auto-destructed +- removed patches: + util-linux-2.13.1-canonicalize_loopfile_name.patch + util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch + util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch + util-linux-2.13.1-mount_getfs_fix.patch + util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch + util-linux-2.13-fdisk_cfdisk_ncursesw.patch + util-linux-mount_opt_nofail.patch + util-linux-ng-2.13-swapon-swsuspend.patch + ------------------------------------------------------------------- Thu Apr 3 17:11:53 CEST 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 063870d..cec6f2d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.13.1) +# spec file for package util-linux (Version 2.14) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -21,8 +21,8 @@ PreReq: %install_info_prereq permissions License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on -Version: 2.13.1 -Release: 19 +Version: 2.14 +Release: 1 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -32,6 +32,8 @@ Source3: nologin.8 Source4: raw.init Source5: etc.raw Source6: etc_filesystems +Source7: v2.14-ChangeLog +Source8: v2.14-ReleaseNotes %define time_ver 1.7 %define which_ver 2.16 %define adjtimex_ver 1.20 @@ -52,26 +54,16 @@ Source30: README.largedisk ## # add hostid Patch1: util-linux-2.12-misc_utils_hostid.patch -# 104405 - mount -a doesn't work with hotpluggable devices -Patch2: util-linux-mount_opt_nofail.patch # 160822 - fix for 153657 -Patch3: util-linux-2.12r-fdisk_cyl.patch +Patch2: util-linux-2.12r-fdisk_cyl.patch # 241372 - remove legacy warnings from fdisk -Patch4: util-linux-2.12r-fdisk_remove_bogus_warnings.patch -# 304861 - support password hashing and key length -Patch6: util-linux-2.13-fdisk_cfdisk_ncursesw.patch +Patch3: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # 338419 -Patch7: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch -# in upstream git, but not yet released -Patch8: util-linux-2.13.1-canonicalize_loopfile_name.patch -Patch9: util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch -Patch10: util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch -Patch11: util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch -Patch12: util-linux-2.13.1-mount_getfs_fix.patch -# 254437 - swapon should automatically reset the suspend signature -Patch13: util-linux-ng-2.13-swapon-swsuspend.patch +Patch4: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch # -Patch14: util-linux-2.13.1-fdisk_cfdisk_yesno.patch +Patch5: util-linux-2.13.1-fdisk_cfdisk_yesno.patch +Patch6: util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch +Patch7: util-linux-2.14-mount_retry_on_nomedium.patch # crypto patch Patch20: util-linux-mount_losetup_crypto.patch ## @@ -113,17 +105,11 @@ Authors: %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 %patch20 -p1 -#%patch38 -p1 +cp %{SOURCE7} %{SOURCE8} . # cd adjtimex-* %patch50 -p1 @@ -185,9 +171,14 @@ make setctsid CFLAGS="$RPM_OPT_FLAGS" %ifarch s390 s390x CFLAGS=-DCONFIG_SMP %endif +# architecture dependent builds +BUILD_ENABLE= +%ifarch %ix86 x86_64 +BUILD_ENABLE="--enable-rdev" +%endif # Use autogen, when building from git tree -#autoreconf -fi -./autogen.sh +autoreconf -fi +#./autogen.sh ./configure --mandir=%{_mandir} \ --datadir=%{_datadir} \ --with-fsprobe=volume_id \ @@ -196,9 +187,9 @@ CFLAGS=-DCONFIG_SMP --enable-mesg \ --enable-partx \ --enable-raw \ - --enable-rdev \ --enable-write \ --disable-use-tty-group \ + $BUILD_ENABLE \ CFLAGS="$CFLAGS $RPM_OPT_FLAGS" make gcc $RPM_OPT_FLAGS -o nologin nologin.c @@ -271,9 +262,7 @@ rm -f $RPM_BUILD_ROOT/usr/bin/pg rm -f $RPM_BUILD_ROOT/usr/share/man/man1/pg.1* # Do not package these files to get rid of the perl dependency rm -f $RPM_BUILD_ROOT/usr/bin/chkdupexe -rm -f $RPM_BUILD_ROOT/usr/bin/scriptreplay rm -f $RPM_BUILD_ROOT/usr/share/man/man1/chkdupexe.1 -rm -f $RPM_BUILD_ROOT/usr/share/man/man1/scriptreplay.1 # For now, do not package setarch and related symlinks rm -f $RPM_BUILD_ROOT/usr/bin/setarch rm -f $RPM_BUILD_ROOT/usr/bin/linux32 @@ -301,7 +290,7 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/parisc{,32,64}.8 %ifarch s390 s390x rm -f $RPM_BUILD_ROOT/etc/fdprm rm -f $RPM_BUILD_ROOT/usr/bin/cytune -rm -f $RPM_BUILD_ROOT/usr/bin/fdformat +rm -f $RPM_BUILD_ROOT/usr/sbin/fdformat rm -f $RPM_BUILD_ROOT/sbin/hwclock rm -f $RPM_BUILD_ROOT/usr/sbin/klogconsole rm -f $RPM_BUILD_ROOT/usr/bin/setterm @@ -353,6 +342,8 @@ fi %files # Common files for all archs %defattr(-,root,root) +%doc v2.14-ChangeLog +%doc v2.14-ReleaseNotes %doc login-utils/README.getty %doc login-utils/README.modems-with-agetty %doc login-utils/README.poeigl @@ -419,6 +410,7 @@ fi /usr/bin/rev /usr/bin/script #/usr/bin/setarch +/usr/bin/scriptreplay /usr/bin/setsid /usr/bin/ul /usr/bin/tailf @@ -427,6 +419,7 @@ fi /usr/bin/which /usr/sbin/addpart /usr/sbin/delpart +/usr/sbin/ldattach /usr/sbin/freeramdisk /usr/sbin/partx /usr/sbin/rtcwake @@ -471,6 +464,7 @@ fi %{_mandir}/man1/renice.1.gz %{_mandir}/man1/setsid.1.gz %{_mandir}/man1/script.1.gz +%{_mandir}/man1/scriptreplay.1.gz %{_mandir}/man1/setterm.1.gz %{_mandir}/man1/tailf.1.gz %{_mandir}/man1/taskset.1.gz @@ -491,6 +485,7 @@ fi %{_mandir}/man8/mkfs.minix.8.gz %{_mandir}/man8/fsck.minix.8.gz %{_mandir}/man8/isosize.8.gz +%{_mandir}/man8/ldattach.8.gz %{_mandir}/man8/losetup.8.gz %{_mandir}/man8/mkfs.8.gz %{_mandir}/man8/mkswap.8.gz @@ -541,7 +536,7 @@ fi %ifnarch s390 s390x #%config(noreplace) /etc/fdprm /usr/bin/cytune -/usr/bin/fdformat +/usr/sbin/fdformat /sbin/hwclock /usr/sbin/klogconsole /usr/bin/setterm @@ -574,6 +569,36 @@ fi #%endif %changelog +* Wed Jun 25 2008 mkoenig@suse.de +- update to version 2.14 + most important changes: + * new command ldattach + mount: + * support auto-destruction of loop devices + losetup: + * new option -j + * supports unlimited number of loop devices + * new option --sizelimit to set data end + * option -s (short form of --show) now deprecated + mkswap: + * new option -U to set UUID explicitly + fdisk: + * calculate partition size in 2^N [bnc#381270] + hwclock: + * new option --adjfile to override default /etc/adjtime +- readd scriptreplay, implemented now in C +- add retry for mount if ENOMEDIUM is returned [bnc#390204] +- ignore ENXIO in del_loop, because they might have been + auto-destructed +- removed patches: + util-linux-2.13.1-canonicalize_loopfile_name.patch + util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch + util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch + util-linux-2.13.1-mount_getfs_fix.patch + util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch + util-linux-2.13-fdisk_cfdisk_ncursesw.patch + util-linux-mount_opt_nofail.patch + util-linux-ng-2.13-swapon-swsuspend.patch * Thu Apr 03 2008 mkoenig@suse.de - cfdisk: accept english answer [bnc#369043] - use upstream getfs fix diff --git a/v2.14-ChangeLog b/v2.14-ChangeLog new file mode 100644 index 0000000..34e292e --- /dev/null +++ b/v2.14-ChangeLog @@ -0,0 +1,105 @@ +Changes between v2.14-rc3 and v2.14 +----------------------------------- + +commit fba4e21fa000748112d39c8e9fc266f1cbe9a08f +Author: Karel Zak +Date: Mon Jun 9 13:58:54 2008 +0200 + + build-sys: release++ (v2.14) + + Signed-off-by: Karel Zak + + NEWS | 4 ++++ + configure.ac | 2 +- + docs/v2.14-ReleaseNotes | 2 +- + 3 files changed, 6 insertions(+), 2 deletions(-) + +commit 1d66f79c80e6c655dbd1633f9e7d4efd1562bc20 +Author: Karel Zak +Date: Mon Jun 9 12:53:27 2008 +0200 + + docs: update v2.14 ReleaseNotes + + Signed-off-by: Karel Zak + + docs/v2.14-ReleaseNotes | 5 ++++- + 1 files changed, 4 insertions(+), 1 deletions(-) + +commit d5b64541978b45af5eaa60050d2b1a5f3a5da243 +Author: Karel Zak +Date: Mon Jun 9 12:20:40 2008 +0200 + + docs: update AUTHORS file + + Signed-off-by: Karel Zak + + AUTHORS | 5 ++++- + 1 files changed, 4 insertions(+), 1 deletions(-) + +commit 754ba29e2b9d6569cf502a3c6cd0a59c6513e25a +Author: Karel Zak +Date: Mon Jun 9 12:18:26 2008 +0200 + + po: merge changes + + Signed-off-by: Karel Zak + + po/hu.po | 852 +++++++++++++++++++++++++++++++++++++++++++------------------- + 1 files changed, 597 insertions(+), 255 deletions(-) + +commit 568ea3a7f1516f86769230ccdb2682479be326e9 +Author: Gabor Kelemen +Date: Mon Jun 9 12:02:00 2008 +0200 + + po: update hu.po (from translationproject.org) + + po/hu.po | 1542 +++++++++++++++++++++++--------------------------------------- + 1 files changed, 559 insertions(+), 983 deletions(-) + +commit 0eab17b95d813c93c8e7b5e7f5943f0940420f00 +Author: Volker Schatz +Date: Tue Jun 3 23:52:04 2008 +0200 + + ddate: 11th, 12th and 13th of month + + the Discordian date utility ddate gives the 11th, 12th and 13th of the month as + the "11st", "12nd" and "13rd". Unless this is a religious thing, please apply + the patch below. + + Signed-off-by: Volker Schatz + + misc-utils/ddate.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 47bf8ef7f1d084befe2efcdd37a5f7c7c9d9da70 +Author: Paulius Zaleckas +Date: Mon Jun 9 11:35:59 2008 +0200 + + rtcwake: fix the default mode to "standby" + + Writing "suspend" to /sys/power/state does nothing. + Even "man rtcwake" says that default should be "standby" :) + + Signed-off-by: Paulius Zaleckas + Signed-off-by: Karel Zak + + sys-utils/rtcwake.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit eaf58a8697926711efec9e494e810d3f6bfd3938 +Author: Christophe Blaess +Date: Mon Jun 9 11:32:19 2008 +0200 + + mount: fix a small typo in mount.8 + + While working on french translation of the Linux Man Pages, I've found a + small typo in mount.8. + + Only one wrong letter : the option "osyncis_o_sync" for XFS filesystem + is erroneously replaced by "osyncis_d_sync" (the previous option). + + Signed-off-by: Christophe Blaess + Signed-off-by: Karel Zak + + mount/mount.8 | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/v2.14-ReleaseNotes b/v2.14-ReleaseNotes new file mode 100644 index 0000000..739bc40 --- /dev/null +++ b/v2.14-ReleaseNotes @@ -0,0 +1,418 @@ + +Util-linux-ng 2.14 Release Notes (09-Jun-2008) +============================================== + +Release highlights +------------------ + + mount(8) supports new "nofail" mount option. + + mount(8) supports auto-destruction of loop devices. + + losetup(8) supports new command line option "-j" to show status of all + loop devices associated with given file. + + losetup(8) supports unlimited number of loop devices. + + losetup(8) supports new command line option "--sizelimit" to set data end. + + ldattach(8) command has been added to util-linux-ng. The ldattach + daemon opens the specified device file and attaches the line discipline + to it for processing of the sent and/or received data. + + setterm(8) supports new command line option "-blank [force|poke]" for + TIOCL_{BLANKED,BLANK}SCREEN. + + tailf(8) has been reimplemented to use inotify. + + tailf(8) supports new command line option "-n" to specifying output lines. + + mkswap(8) supports new command line option "-U" to set UUID explicitly. + + fdisk(8) has been fixed to calculate partition size in 2^N. + + cal(8) supports highlighting an arbitrary date. + + agetty(8) makes username-in-uppercase feature optional (off by default). + Users who use uppercase-only terminals need to use the option "-U" now. + + losetup(8), mount(8), umount(8), fdisk(8) and sfdisk(8) support static + linking when compiled with --enable-static-programs. + + hwclock(8) supports new command line option "adjfile" to override + the default /etc/adjtime. + + scriptreplay(1) command has been re-written from Perl to C. + + +Deprecated +---------- + + The losetup(8) '-s' option (introduced by util-linux-ng-2.13) is deprecated + now. This short form of the option '--show' could be in collision with + Loop-AES losetup implementation where the same option is used for the loop + sizelimit. + + +Fixed security issues +--------------------- + + CVE-2008-1926 - audit log injection via login + + The problem was originally reported for OpenSSH few months + ago (CVE-2007-3102). The login(1) is affected by the same + bug when built with the option "--with-audit". + + +Stable maintenance releases between v2.13 and v2.14 +--------------------------------------------------- + +util-linux-ng 2.13.1.1 [22-Apr-2008] + + * ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1.1-ReleaseNotes + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1.1-ChangeLog + +util-linux-ng 2.13.1 [16-Jan-2008] + + * ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1-ReleaseNotes + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1-ChangeLog + + +ChangeLog between v2.13 and v2.14 +--------------------------------- + + For more details see ChangeLog files at: + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/ + +agetty: + - cleanup MAXHOSTNAMELEN [Karel Zak] + - make username-in-uppercase feature optional (off by default.) [Hamish Coleman] + - non-linux support (use pathnames.h) [Karel Zak] + - replace termio with termios interface [Samuel Thibault] + - ungettextize several debugging messages. [Benno Schulenberg] +blockdev: + - add --getsz to blockdev.8 [Karel Zak] + - add missing description about option --report in manpage [Li Zefan] + - fix opened file leaving unclosed [lizf] + - use lib/blkdev.c, fix --report [Karel Zak] +build-sys: + - add --enable-static-programs [Stepan Kasal, Karel Zak] + - add AC_CANONICAL_HOST [Miklos Szeredi] + - add VARSUFFIX to UTIL_CHECK_LIB [Karel Zak] + - add err.h check [Karel Zak] + - add support ionice for Super-H architecture [Karel Zak] + - add v2.14 to NEWS [Karel Zak] + - autogen.sh reports versions of autotools now [Karel Zak] + - build arch(1) during distcheck [Stepan Kasal] + - cleanup "x$foo" usage [Karel Zak] + - cleanup disk-utils/Makefile.am (use $utils_common) [Karel Zak] + - cleanup usage of linux/major.h [Samuel Thibault] + - disable syscall fallbacks for non-linux systems [Karel Zak] + - do not add -luuid to BLKID_LIBS [Stepan Kasal] + - fix missing deps for swapon [Matthias Koenig] + - ignore a bunch of generated files, mostly binaries [James Youngman] + - nls/locale handling in util-linux-ng general [Mike Frysinger] + - non-linux support [Samuel Thibault] + - release++ [Karel Zak] + - remove errs.h [Karel Zak] + - remove files that are no longer delivered from git [LaMont Jones] + - remove hardcoded _GNU_SOURCE [Karel Zak] + - remove unnecessary check-local target from login-utils/ [Karel Zak] + - set AC_PREREQ to 2.60, increment version to 2.14 [Karel Zak] + - simplify code around RDEV_LINKS and SETARCH_LINKS [Stepan Kasal] + - unify method for checking system calls and fallback handling [Mike Frysinger, Stepan Kasal] + - update .gitignore files [Karel Zak] + - use dist_man_MANS instead of man_MANS [Stepan Kasal] + - use ncursesw (wide version) when possibe [Karel Zak, Mike Frysinger] + - use pkg-config to find the libs for static build [Stepan Kasal] + - use portable $(VAR =) instead of gmake-specific $(addsuffix) [Stepan Kasal] +cal: + - add description about option -V to manpage [Li Zefan] + - add support for highlighting an arbitrary date [Pádraig Brady] + - avoid -Wformat warnings [Jim Meyering] + - fix weekday alignment for certain locales [Pádraig Brady] + - replace errs.h with libc err.h [Karel Zak] + - use HAVE_LIB{NCURSES,NCURSESW} instead HAVE_NCURSES [Karel Zak] +cfdisk: + - define portable {DEFAULT,ALTERNATE}_DEVICE [Samuel Thibault] + - display cylinders beyond 1024 [Peter Breitenlohner] + - slightly increase the size of menu buttons [Benno Schulenberg] + - translate partition-type names when they are printed. [Benno Schulenberg] +chfn: + - add pam_end() call and cleanup PAM code [Karel Zak] + - fix compiler warnings in selinux stuff [Karel Zak] +chfn, chsh, login: + - collapsing three similar messages into a single one [Benno Schulenberg] +chsh: + - should use pam_end function to terminate the PAM transaction [Yu Zhiguo, Karel Zak] +column: + - replace errs.h with libc err.h [Karel Zak] +ddate: + - 11th, 12th and 13th of month [Volker Schatz] +docs: + - add a note about minix v3 to TODO file [Karel Zak] + - add info about .bugfix releases and branches [Karel Zak] + - add note about incorrect tag 2.13.1 [Karel Zak] + - add note about losetup --sizelimit to ReleaseNotes [Karel Zak] + - add note about static linking [Karel Zak] + - add v2.14 ReleaseNotes [Karel Zak] + - cleanup DEPRECATED file [Karel Zak] + - cleanup README.devel, add note about coding style and Signed-off-by [Karel Zak] + - fix ChangeLog URL [Pascal Terjan] + - fix stable branche name in README.devel [Karel Zak] + - mark vipw(1) is deprecated in favor of vipw from shadow-utils [Karel Zak] + - refresh TODO list [Karel Zak] + - remove date from ReleasNotes [Karel Zak] + - tweak a few messages for clarity [Benno Schulenberg] + - update AUTHORS file [Karel Zak] + - update TODO file [Karel Zak] + - update v2.14 ReleaseNotes [Karel Zak] + - we already rewrote the scriptreplay script; remove that TODO entry [James Youngman] +elvtune: + - use get_linux_version() [Karel Zak] +fdformat: + - install to /usr/sbin instead to /usr/bin [Karel Zak] +fdisk: + - better fallback for get_random_id() [H. Peter Anvin] + - calculate +size{K,M,G} in 2^N [Karel Zak] + - cleanup BLK* ioctls usage [Karel Zak] + - doesn't recognize the VMware ESX partitions [Karel Zak] + - doing useless ioctl when editing an image [Pascal Terjan] + - fix building for AVR32 and CRIS [Imre Kaloz] + - fix typo [Karel Zak] + - message tweak [Karel Zak] + - non-linux support (MAXPATHLEN) [Karel Zak] + - non-linux support (use standard uintxy_t instead __uxy) [Samuel Thibault] + - use more readable "GPT" name rather than "EFI GPT" [Robert Millan] + - use swab macros from bitops.h [Karel Zak] +flock: + - typo in man page [A. Costa] +fsck.cramfs: + - clean up gcc warnings [Randy Dunlap] +fsck.minix: + - correct the error message given when we can't open the device [James Youngman] + - reset the terminal state if we are killed by a fatal signal [James Youngman] +getopt: + - fix path to examples in getopt.1 [Karel Zak] + - install example scripts as SCRIPTS, not DATA [Peter Breitenlohner] +hwclock: + - add --adjfile=path option [Karel Zak] + - check for ENODEV [David Woodhouse] + - do not create a zero adjfile [Alain Guibert] + - fix --rtc option [Matthias Koenig, Karel Zak] +include: + - provides everything [Samuel Thibault] + - add bitops.h with swab{16,32,64} macros [Karel Zak] + - add mount paths to pathnames.h [Karel Zak] + - cleanup pathnames.h [Karel Zak] +ionice: + - add a note about permissions to ionice.1 [Karel Zak] + - update man page to reflect IDLE class change in 2.6.25 [Karel Zak] +ipcs: + - add information about POSIX compatibility to ipcs.1 [Karel Zak] +kill: + - man page is missing a description of "kill -0" [Karel Zak] +ldattach: + - add NLS support [Karel Zak] + - new command [Tilman Schmidt] + - use glibc termios [Karel Zak] +lib: + - add blkdev.{c,h} [Stefan Krah, Karel Zak] + - add linux_version.{c,h} [Stefan Krah] +login: + - audit log injection attack via login [Steve Grubb] + - fix a small memory leak and remove unnecessary zeroing [Karel Zak] + - login segfaults on EOF (rh#298461) [Karel Zak] + - replace termio with termios interface [Samuel Thibault] + - rewrite is_local() to remove limits on line length [James Youngman] +login-utils: + - cleanup strlen() and fgets() usage [James Youngman] +losetup: + - add --associated option [Karel Zak] + - add --sizelimit option [Shachar Shemesh] + - canonicalize loopfile name [Karel Zak, Matthias Koenig] + - clean up gcc warnings [Randy Dunlap] + - fix errno usage [Karel Zak] + - fix typo in losetup.8 [Karel Zak] + - mark the option -s as deprecated [Karel Zak] + - remove duplicate xstrdup() and error() [Karel Zak] + - split help message into two smaller parts [Benno Schulenberg] + - support unlimited number of loops [Karel Zak] + - use standard uintxy_t types (struct loop_info64) [Samuel Thibault] +mesg: + - replace errs.h with libc err.h [Karel Zak] +mkfs.cramfs: + - clean up gcc warnings [Randy Dunlap, Karel Zak] + - remove unused header file [lizf] + - switch on localization. [Benno Schulenberg] +mkfs.minix: + - add sectorsize check [Matthias Koenig] + - clean up gcc warnings [Karel Zak] + - clean up gcc warnings [Randy Dunlap] + - device size cleanup [Matthias Koenig] +mkswap: + - BLKGETSIZE cleanup [Karel Zak] + - cleanup kB vs. KiB usage in error messages [Karel Zak] + - fix compiler warnings [Karel Zak] + - linux_version() code consolidation [Karel Zak] + - possible to crash with SELinux relabeling support [KaiGai Kohei] + - set UUID for swap space (add -U option) [Martin Schulze] + - set errno=0 in write_all() [Karel Zak] + - when writing the signature page, handle EINTR returns [Karel Zak] +more: + - cleanup gcc warnings [Randy Dunlap] + - non-linux support [Samuel Thibault] + - replace CBAUD with cfgetispeed() [Samuel Thibault] + - use HAVE_WIDECHAR instead ENABLE_WIDECHAR [Karel Zak] +mount: + - "can't create lock file" message sometimes means failure, sometimes not [Mark McLoughlin] + - "nofail" mount option [Matthias Koenig, Karel Zak] + - -L|-U segfault when label or uuid doesn't exist [Karel Zak] + - add more details to the --version output [Karel Zak] + - add support for sizelimit= mount option (for loop mounts) [Shachar Shemesh] + - allow auto-destruction of loop devices [Bernardo Innocenti] + - chain of symlinks to fstab causes use of pointer after free [Norbert Buchmuller] + - clean up gcc warnings (mount_mntent.c) [Randy Dunlap] + - clean up global variables [Karel Zak] + - cleanup "none" fstype usage [Karel Zak] + - cleanup KERNEL_VERSION, remove my_dev_t.h [Karel Zak] + - cleanup canonicalize() usage [Karel Zak] + - cleanup error() and die() [Karel Zak] + - cleanup usage of _PATH_* [Karel Zak] + - doesn't drop privileges properly when calling helpers [Ludwig Nussel] + - don't call canonicalize(SPEC) for cifs, smbfs and nfs [Karel Zak] + - don't canonicalize LABEL= or UUID= spec [Karel Zak] + - drop the part always true from a while condition [Pascal Terjan] + - fix a small typo in mount.8 [Christophe Blaess] + - fix fd leak [Matthias Koenig] + - fix typo in mount.8 [Karel Zak] + - hint about helper program if device doesn't exist [Karel Zak] + - improve chmod & chown usage and clean up gcc warnings (fstab.c) [Karel Zak] + - improve error message when helper program not present [LaMont Jones] + - prevent loop mounting the same file twice [Karel Zak, Matthias Koenig] + - remount doesn't care about loop= [Karel Zak] + - remove MS_{REPLACE,AFTER,BEFORE,OVER} [Karel Zak] + - remove built-in support for background mounts [Karel Zak] + - remove redundant fflush [Karel Zak] + - remove set_proc_name() [Karel Zak] + - remove useless if-before-my_free, define my_free as a macro [Karel Zak] + - use MNTTYPE_SWAP (from mntent.h) [Karel Zak] + - use atexit() rather than (*at_die)() [Karel Zak] + - use blkdev_get_size() [Karel Zak] + - use canonicalize in getfs_by_devname [Karel Zak] +namei: + - add to identify FIFO (named pipe) and update manpage [Li Zefan] + - cleanup tailing white-spaces [Karel Zak] + - non-linux support (get_current_dir_name() and PATH_MAX) [Karel Zak, Samuel Thibault] +partx: + - fix compiler warnings [Karel Zak] + - use swab macros from bitops.h [Karel Zak] +pg: + - fix segfault on search [Rajeev V. Pillai] +po: + - add eu.po (from translationproject.org) [Mikel Olasagasti] + - add pl.po (from translationproject.org) [Andrzej Krzysztofowicz] + - fix typo in de.po [Karel Zak] + - merge changes [Karel Zak] + - update POTFILES.in [Karel Zak] + - update ca.po (from translationproject.org) [Josep Puigdemont] + - update cs.po (from translationproject.org) [Petr Pisar] + - update da.po (from translationproject.org) [Claus Hindsgaul] + - update de.po (from translationproject.org) [Michael Piefel] + - update es.po (from translationproject.org) [Santiago Vila Doncel] + - update et.po (from translationproject.org) [Meelis Roos] + - update fi.po (from translationproject.org) [Lauri Nurmi] + - update fr.po (from translationproject.org) [Michel Robitaille] + - update hu.po (from translationproject.org) [Gabor Kelemen] + - update id.po (from translationproject.org) [Arif E. Nugroho] + - update it.po (from translationproject.org) [Marco Colombo] + - update ja.po (from translationproject.org) [Daisuke Yamashita] + - update nl.po (from translationproject.org) [Benno Schulenberg] + - update po files [Karel Zak] + - update pt_BR.po (from translationproject.org) [Rodrigo Stulzer Lopes] + - update ru.po (from translationproject.org) [Pavel Maryanov] + - update sl.po (from translationproject.org) [Simon Mihevc] + - update sv.po (from translationproject.org) [Daniel Nylander] + - update tr.po (from translationproject.org) [Nilgün Belma Bugüner] + - update uk.po (from translationproject.org) [Maxim V. Dziumanenko] + - update vi.po (from translationproject.org) [Clytie Siddall] +rename: + - add description about option -V to manpage [Li Zefan] + - remove useless variable [Li Zefan] +renice: + - detect errors in arguments, add -v, -h and long options [LaMont Jones, Karel Zak] +rev: + - use warn() in errs.h [Li Zefan] +rtcwake: + - fix UTC time usage [David Brownell] + - fix the default mode to "standby" [Paulius Zaleckas] + - fix typo [Karel Zak] + - fix typo SATE -> STATE [Mike Frysinger] + - fix verbose message [Karel Zak] + - include libgen.h for basename prototype [Mike Frysinger] + - misc cleanups [David Brownell] +script: + - cleanup gcc warnings [Randy Dunlap] + - cleanup includes [Samuel Thibault] + - dies on SIGWINCH [Karel Zak] + - read returns a size_t [James Youngman] +scriptreplay: + - gettextize a forgotten messages [Karel Zak] + - rewrite in C [Karel Zak, James Youngman] +setarch: + - add fallback for linux/personality [Karel Zak] + - add long options to setarch and update manpage [Karel Zak, Li Zefan] + - add missing alpha subarchs [Oliver Falk] + - adding groff symlinks to setarch manual page [Arkadiusz Miskiewicz] + - fix compiler warning [LaMont Jones] + - generate groff links in a better way [Karel Zak] + - provide backwards compatibility [Dmitry V. Levin] + - tweak the help text, and gettextize a forgotten message [Benno Schulenberg] +setterm: + - add -blan [force|poke] options for TIOCL_{BLANKED,BLANK}SCREEN [Samuel Thibault, Karel Zak] + - dump by TIOCLINUX is deprecated since linux 1.1.92. [Karel Zak] + - opened file leaving unclosed [Karel Zak, lizf] + - remove unnecessaty ifndef TCGETS [Samuel Thibault] +sfdisk: + - allow partitioning drives of over 2^31 sectors. [Kunihiko IMAI] + - cleanup 83 gcc warnings [Randy Dunlap] + - opened files leaving unclosed [Karel Zak, Li Zefan] + - remove unnecessary linux/unistd.h [Samuel Thibault] + - use get_linux_version() [Karel Zak] +shutdown: + - use _PATH_MOUNTED instead of _PATH_MTAB [Stepan Kasal] +swapon: + - Reinitialize software suspend areas to avoid future corruption. [Kees Cook, Karel Zak] + - add sundries.h [Karel Zak] + - clean up gcc warnings [Randy Dunlap] + - cleanup usage output [Karel Zak] + - cleanup usage() [Karel Zak] + - fix swsuspend detection [Karel Zak] + - fix typo in usage() [Karel Zak] + - readjust the usage summaries [Benno Schulenberg] + - remove unnecessary myrealpath() call [Karel Zak] +sys-utils: + - correct setarch.8 manpage link creation [Frédéric Bothamy] +tailf: + - add option -n to specifying output lines [Li Zefan] + - clean up gcc warnings & fix use of errno [Karel Zak] + - inotify based reimplementation [Karel Zak] + - non-linux support [Samuel Thibault] + - opened file leaving unclosed [lizf] + - replace errs.h with libc err.h [Karel Zak] +tests: + - add "sort" to cramfs test [Karel Zak] + - add test for include/pathnames.h [Karel Zak] + - add ts-mount-noncanonical [Karel Zak] + - exactly define a time format in ls -l output [Karel Zak] + - fix blkid cache usage [Karel Zak] + - move test_bkdev to lib/ [Karel Zak] + - redirect libblkid cache to BLKID_FILE [Karel Zak] + - rename test_sysinfo, remove tailing white-spaces [Karel Zak] + - use losetup -s [Karel Zak] +umount: + - add hint about lsof & fuser [Karel Zak] + - don't print duplicate error messages [Karel Zak] + - use atexit() rather than (*at_die)() [Karel Zak] +wall: + - cleanup MAXHOSTNAMELEN [Karel Zak] From 35a9ff314b3a7e80003315d973acbe777abba88e345f21ac5d5dcb7363cca8a8 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sat, 5 Jul 2008 00:37:13 +0000 Subject: [PATCH 057/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=57 --- util-linux-2.14-loop_autoclear.patch | 127 ++++++++++++++++++ ...-2.14-mount_ignore_ENXIO_in_del_loop.patch | 37 ----- util-linux.changes | 12 ++ util-linux.spec | 10 +- which-lib64.patch | 17 ++- 5 files changed, 158 insertions(+), 45 deletions(-) create mode 100644 util-linux-2.14-loop_autoclear.patch delete mode 100644 util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch diff --git a/util-linux-2.14-loop_autoclear.patch b/util-linux-2.14-loop_autoclear.patch new file mode 100644 index 0000000..cfebe4a --- /dev/null +++ b/util-linux-2.14-loop_autoclear.patch @@ -0,0 +1,127 @@ +On Wed, Jun 25, 2008 at 12:59:32PM +0200, Matthias Koenig wrote: +> The new loop auto-destruct feature detaches automatically loop devices +> when no longer used. This means they are detached with the umount() +> call. But when we call umount with -d, del_loop is called and fails +> because the ioctl() returns ENXIO. + + ah, good catch. Thanks! + +> We probably should ignore this error here. + + I think we could be smarter. We can try to detect autoclear + loop devices. See the patch below. + + [I'm going to create a stable/v2.14 branch.] + + Karel + + +>From e84feaecfdf44a33ef9eccc5a56c8a6999466140 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 2 Jul 2008 14:26:51 +0200 +Subject: [PATCH] umount: improve "-d" option for autoclear loops + +The new loop auto-destruct feature detaches automatically loop devices +when no longer used. This means they are detached with the umount() +call. But when we call umount with -d, del_loop() is called and fails +because the ioctl() returns ENXIO. We have to check for autoclear +loop devices rather than blindly call del_loop(). + +Reported-by: Matthias Koenig +Signed-off-by: Karel Zak +--- + mount/lomount.c | 23 +++++++++++++++++++++++ + mount/lomount.h | 1 + + mount/umount.c | 12 ++++++++++-- + 3 files changed, 34 insertions(+), 2 deletions(-) + +diff --git a/mount/lomount.c b/mount/lomount.c +index c3ac68a..7937052 100644 +--- a/mount/lomount.c ++++ b/mount/lomount.c +@@ -102,6 +102,29 @@ is_loop_used(int fd) + return ioctl (fd, LOOP_GET_STATUS, &li) == 0; + } + ++int ++is_loop_autoclear(const char *device) ++{ ++ struct loop_info lo; ++ struct loop_info64 lo64; ++ int fd, rc = 0; ++ ++ if ((fd = open(device, O_RDONLY)) < 0) ++ return 0; ++ ++ if (ioctl(fd, LOOP_GET_STATUS64, &lo64) == 0) { ++ if (lo64.lo_flags & LO_FLAGS_AUTOCLEAR) ++ rc = 1; ++ ++ } else if (ioctl(fd, LOOP_GET_STATUS, &lo) == 0) { ++ if (lo.lo_flags & LO_FLAGS_AUTOCLEAR) ++ rc = 1; ++ } ++ ++ close(fd); ++ return rc; ++} ++ + static char * + looplist_mk_devname(struct looplist *ll, int num) + { +diff --git a/mount/lomount.h b/mount/lomount.h +index f332a70..59108d4 100644 +--- a/mount/lomount.h ++++ b/mount/lomount.h +@@ -2,6 +2,7 @@ extern int set_loop(const char *, const char *, unsigned long long, unsigned lon + const char *, int, int *); + extern int del_loop(const char *); + extern int is_loop_device(const char *); ++extern int is_loop_autoclear(const char *device); + extern char * find_unused_loop_device(void); + + extern int loopfile_used_with(char *devname, const char *filename, unsigned long long offset); +diff --git a/mount/umount.c b/mount/umount.c +index 65c8622..b2bbdae 100644 +--- a/mount/umount.c ++++ b/mount/umount.c +@@ -190,6 +190,7 @@ umount_one (const char *spec, const char *node, const char *type, + int res; + int status; + const char *loopdev; ++ int myloop = 0; + + /* Special case for root. As of 0.99pl10 we can (almost) unmount root; + the kernel will remount it readonly so that we can carry on running +@@ -201,7 +202,7 @@ umount_one (const char *spec, const char *node, const char *type, + || streq (node, "rootfs")); + if (isroot) + nomtab++; +- ++ + /* + * Call umount.TYPE for types that require a separate umount program. + * All such special things must occur isolated in the types string. +@@ -209,6 +210,13 @@ umount_one (const char *spec, const char *node, const char *type, + if (check_special_umountprog(spec, node, type, &status)) + return status; + ++ /* ++ * Ignore the option "-d" for non-loop devices and loop devices with ++ * LO_FLAGS_AUTOCLEAR flag. ++ */ ++ if (delloop && is_loop_device(spec) && !is_loop_autoclear(spec)) ++ myloop = 1; ++ + umnt_err = umnt_err2 = 0; + if (lazy) { + res = umount2 (node, MNT_DETACH); +@@ -310,7 +318,7 @@ umount_one (const char *spec, const char *node, const char *type, + } + + /* Also free loop devices when -d flag is given */ +- if (delloop && is_loop_device(spec)) ++ if (myloop) + loopdev = spec; + } + gotloop: diff --git a/util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch b/util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch deleted file mode 100644 index e28eb44..0000000 --- a/util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch +++ /dev/null @@ -1,37 +0,0 @@ -Index: util-linux-ng-2.14/mount/lomount.c -=================================================================== ---- util-linux-ng-2.14.orig/mount/lomount.c 2008-06-25 11:35:27.000000000 +0200 -+++ util-linux-ng-2.14/mount/lomount.c 2008-06-25 12:47:28.000000000 +0200 -@@ -878,6 +878,7 @@ set_loop(const char *device, const char - int - del_loop (const char *device) { - int fd; -+ int res = 0; - - if ((fd = open (device, O_RDONLY)) < 0) { - int errsv = errno; -@@ -886,10 +887,22 @@ del_loop (const char *device) { - return 1; - } - if (ioctl (fd, LOOP_CLR_FD, 0) < 0) { -- perror ("ioctl: LOOP_CLR_FD"); -+ if (errno == ENXIO) { -+ /* ignore ENXIO, device has probably been -+ * auto-destructed */ -+ if (verbose > 1) -+ printf(_("del_loop(%s): already deleted\n"), -+ device); -+ res = 0; -+ } else { -+ perror ("ioctl: LOOP_CLR_FD"); -+ res = 1; -+ } -+ - close(fd); -- return 1; -+ return res; - } -+ - close (fd); - if (verbose > 1) - printf(_("del_loop(%s): success\n"), device); diff --git a/util-linux.changes b/util-linux.changes index a4657f0..cbccc7b 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Jul 2 15:47:08 CEST 2008 - mkoenig@suse.de + +- replace util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch + with upstream version + util-linux-2.14-loop_autoclear.patch + +------------------------------------------------------------------- +Fri Jun 27 17:05:46 CEST 2008 - schwab@suse.de + +- Fix lib64 check. + ------------------------------------------------------------------- Wed Jun 25 14:26:49 CEST 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index cec6f2d..d1d9e17 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -22,7 +22,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14 -Release: 1 +Release: 3 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -62,7 +62,7 @@ Patch3: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch4: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch # Patch5: util-linux-2.13.1-fdisk_cfdisk_yesno.patch -Patch6: util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch +Patch6: util-linux-2.14-loop_autoclear.patch Patch7: util-linux-2.14-mount_retry_on_nomedium.patch # crypto patch Patch20: util-linux-mount_losetup_crypto.patch @@ -569,6 +569,12 @@ fi #%endif %changelog +* Wed Jul 02 2008 mkoenig@suse.de +- replace util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch + with upstream version + util-linux-2.14-loop_autoclear.patch +* Fri Jun 27 2008 schwab@suse.de +- Fix lib64 check. * Wed Jun 25 2008 mkoenig@suse.de - update to version 2.14 most important changes: diff --git a/which-lib64.patch b/which-lib64.patch index 278aab6..1252735 100644 --- a/which-lib64.patch +++ b/which-lib64.patch @@ -1,6 +1,6 @@ --- acinclude.m4 +++ acinclude.m4 -@@ -3,7 +3,7 @@ +@@ -3,21 +3,26 @@ dnl [, ACTION-IF-NOT-FOUND [, OTHER-L dnl Like AC_CHECK_LIB but looking for static libraries. dnl LIBRARY must be of the form libxxx.a. dnl The current language must be C (AC_LANG_C). @@ -9,14 +9,15 @@ [AC_MSG_CHECKING([for $2 in $1]) dnl Use a cache variable name containing both the library and function name, dnl because the test really is for library $1 defining function $2, not -@@ -11,10 +11,15 @@ + dnl just for library $1. Separate tests with the same $1 and different $2s dnl may have different results. ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` - AC_CACHE_VAL(ac_cv_lib_static_$ac_lib_var, +-AC_CACHE_VAL(ac_cv_lib_static_$ac_lib_var, ++AC_CACHE_VAL(ac_cv_lib_static_$ac_lib_var, [ +if test "$libdir" != "${exec_prefix}/lib"; then -+ if test ! -z `grep 64 $libdir`&& test ; then ++ case $libdir in *64) + libsuffix=64 -+ fi ++ esac +fi if test -r /etc/ld.so.conf ; then - ld_so_paths="/lib /usr/lib `cat /etc/ld.so.conf`" @@ -26,4 +27,8 @@ + ld_so_paths="/lib${libsuffix} /usr/lib${libsuffix}" fi for path in $ld_so_paths; do - [ac_save_LIBS="$LIBS" +- [ac_save_LIBS="$LIBS" ++ ac_save_LIBS="$LIBS" + LIBS="$path/$1 $5 $LIBS" + AC_TRY_LINK(dnl + ifelse([$2], [main], , dnl Avoid conflicting decl of main. From 8907a901ec2765c6c1a90212283681cfb3715680aaa7cfa5be8721ce2ad4f1dd Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 8 Jul 2008 23:56:54 +0000 Subject: [PATCH 058/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=58 --- util-linux.changes | 14 ++++++++++++++ util-linux.spec | 22 ++++++++++++++++++---- which-2.16.tar.bz2 | 3 --- which-2.19.tar.bz2 | 3 +++ which-lib64.patch | 18 ++++++------------ 5 files changed, 41 insertions(+), 19 deletions(-) delete mode 100644 which-2.16.tar.bz2 create mode 100644 which-2.19.tar.bz2 diff --git a/util-linux.changes b/util-linux.changes index cbccc7b..67207ea 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Mon Jul 7 15:13:24 CEST 2008 - mkoenig@suse.de + +- update which to version 2.19 + * Upgraded code from bash to version 3.2. This DOES has influence + on how Which behaves under certain circumstances. + * When the environment variable HOME is not set, the home directory + is now read from /etc/passwd or set to '/' if no home directory + could be found (this now matches the tilde lib used in bash) + * Changed the license to GPLv3 + * Add support for shells that output '{' on the same line as the + function name in the output of 'declare -f' (ie zsh). +- fix build + ------------------------------------------------------------------- Wed Jul 2 15:47:08 CEST 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index d1d9e17..1fa35b1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -12,7 +12,7 @@ Name: util-linux -BuildRequires: audit-devel gettext-devel libuuid-devel libvolume_id-devel ncurses-devel pam-devel zlib-devel +BuildRequires: audit-devel gettext-devel libuuid-devel libvolume_id-devel ncurses-devel pam-devel readline-devel zlib-devel Url: http://kernel.org/pub/linux/utils/util-linux Provides: util rawio raw base schedutils Supplements: filesystem(minix) @@ -22,7 +22,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14 -Release: 3 +Release: 4 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -35,7 +35,7 @@ Source6: etc_filesystems Source7: v2.14-ChangeLog Source8: v2.14-ReleaseNotes %define time_ver 1.7 -%define which_ver 2.16 +%define which_ver 2.19 %define adjtimex_ver 1.20 Source9: adjtimex-%{adjtimex_ver}.tar.bz2 Source10: freeramdisk.tar.bz2 @@ -139,7 +139,10 @@ make CFLAGS="$RPM_OPT_FLAGS" freeramdisk cd .. # which build cd which-%{which_ver} -autoreconf -fi +#autoreconf -fi +aclocal --force +autoconf --force +automake --force-missing --add-missing --foreign %{?suse_update_config:%{suse_update_config}} CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr \ --mandir=%{_mandir} \ @@ -569,6 +572,17 @@ fi #%endif %changelog +* Mon Jul 07 2008 mkoenig@suse.de +- update which to version 2.19 + * Upgraded code from bash to version 3.2. This DOES has influence + on how Which behaves under certain circumstances. + * When the environment variable HOME is not set, the home directory + is now read from /etc/passwd or set to '/' if no home directory + could be found (this now matches the tilde lib used in bash) + * Changed the license to GPLv3 + * Add support for shells that output '{' on the same line as the + function name in the output of 'declare -f' (ie zsh). +- fix build * Wed Jul 02 2008 mkoenig@suse.de - replace util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch with upstream version diff --git a/which-2.16.tar.bz2 b/which-2.16.tar.bz2 deleted file mode 100644 index 9ab7c1b..0000000 --- a/which-2.16.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:37db49d0f9b5364ac181fd151b8e272645341b73e08675e05031ef564ea539f3 -size 100172 diff --git a/which-2.19.tar.bz2 b/which-2.19.tar.bz2 new file mode 100644 index 0000000..3de4dde --- /dev/null +++ b/which-2.19.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0fb382412c553f05f1336a43591e7de106e9ca3c675113973160e72196001df6 +size 105483 diff --git a/which-lib64.patch b/which-lib64.patch index 1252735..0e03a29 100644 --- a/which-lib64.patch +++ b/which-lib64.patch @@ -1,20 +1,14 @@ ---- acinclude.m4 -+++ acinclude.m4 -@@ -3,21 +3,26 @@ dnl [, ACTION-IF-NOT-FOUND [, OTHER-L - dnl Like AC_CHECK_LIB but looking for static libraries. - dnl LIBRARY must be of the form libxxx.a. - dnl The current language must be C (AC_LANG_C). --AC_DEFUN(AC_CHECK_STATICLIB, -+AC_DEFUN([AC_CHECK_STATICLIB], - [AC_MSG_CHECKING([for $2 in $1]) - dnl Use a cache variable name containing both the library and function name, - dnl because the test really is for library $1 defining function $2, not +Index: acinclude.m4 +=================================================================== +--- acinclude.m4.orig 2006-02-02 05:06:43.000000000 +0100 ++++ acinclude.m4 2008-07-07 14:14:59.000000000 +0200 +@@ -10,14 +10,19 @@ dnl because the test really is for libra dnl just for library $1. Separate tests with the same $1 and different $2s dnl may have different results. ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` -AC_CACHE_VAL(ac_cv_lib_static_$ac_lib_var, +AC_CACHE_VAL(ac_cv_lib_static_$ac_lib_var, [ -+if test "$libdir" != "${exec_prefix}/lib"; then ++if test "$libdir" != "${exec_prefix}/lib"; then + case $libdir in *64) + libsuffix=64 + esac From b5b01598495927b24cba62e6f49c455ae1c7e5c5c578ebcf2cda62c8903692ca Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 18 Aug 2008 20:57:09 +0000 Subject: [PATCH 059/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=59 --- raw.init | 2 +- util-linux.changes | 10 ++++++++++ util-linux.spec | 19 +++++++++++++++---- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/raw.init b/raw.init index 7fb0069..3b5d849 100644 --- a/raw.init +++ b/raw.init @@ -12,7 +12,7 @@ ### BEGIN INIT INFO # Provides: raw # Required-Start: $local_fs $remote_fs -# Required-Stop: +# Required-Stop: $local_fs $remote_fs # Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Short-Description: raw devices diff --git a/util-linux.changes b/util-linux.changes index 67207ea..b1d20b2 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Mon Aug 18 18:13:10 CEST 2008 - mrueckert@suse.de + +- remove outdated options in the fillup_and_insserv call + +------------------------------------------------------------------- +Mon Aug 18 12:36:39 CEST 2008 - mkoenig@suse.de + +- raw: fix init script tags + ------------------------------------------------------------------- Mon Jul 7 15:13:24 CEST 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 1fa35b1..5b85e19 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,9 +2,16 @@ # spec file for package util-linux (Version 2.14) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. # +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + # Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -22,7 +29,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14 -Release: 4 +Release: 18 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -320,7 +327,7 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man8/fdisk.8* rm -rf $RPM_BUILD_ROOT %post -%{fillup_and_insserv -ps raw ACTIVATE_RAW_DEV} +%{fillup_and_insserv raw} %install_info --entry="* freeramdisk: (freeramdisk). tell kernel to free allocated memory for ramdisk" --info-dir=%{_infodir} %{_infodir}/freeramdisk.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %install_info --entry="* time: (time). summarizing used system resources" --info-dir=%{_infodir} %{_infodir}/time.info.gz @@ -572,6 +579,10 @@ fi #%endif %changelog +* Mon Aug 18 2008 mrueckert@suse.de +- remove outdated options in the fillup_and_insserv call +* Mon Aug 18 2008 mkoenig@suse.de +- raw: fix init script tags * Mon Jul 07 2008 mkoenig@suse.de - update which to version 2.19 * Upgraded code from bash to version 3.2. This DOES has influence From 61b6e6fd5f46b37e2cbd2bad75415250502c5e398aef86828cb9f47e2f303417 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 21 Aug 2008 17:02:58 +0000 Subject: [PATCH 060/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=60 --- util-linux.changes | 5 +++++ util-linux.spec | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index b1d20b2..f2c8c10 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Aug 20 15:20:06 CEST 2008 - mkoenig@suse.de + +- enable SELinux support [fate#303662] + ------------------------------------------------------------------- Mon Aug 18 18:13:10 CEST 2008 - mrueckert@suse.de diff --git a/util-linux.spec b/util-linux.spec index 5b85e19..de3761c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -19,7 +19,8 @@ Name: util-linux -BuildRequires: audit-devel gettext-devel libuuid-devel libvolume_id-devel ncurses-devel pam-devel readline-devel zlib-devel +BuildRequires: audit-devel gettext-devel libuuid-devel libvolume_id-devel +BuildRequires: libselinux-devel ncurses-devel pam-devel readline-devel zlib-devel Url: http://kernel.org/pub/linux/utils/util-linux Provides: util rawio raw base schedutils Supplements: filesystem(minix) @@ -29,7 +30,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14 -Release: 18 +Release: 21 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -193,6 +194,7 @@ autoreconf -fi --datadir=%{_datadir} \ --with-fsprobe=volume_id \ --with-audit \ + --with-selinux \ --enable-elvtune \ --enable-mesg \ --enable-partx \ @@ -579,6 +581,8 @@ fi #%endif %changelog +* Wed Aug 20 2008 mkoenig@suse.de +- enable SELinux support [fate#303662] * Mon Aug 18 2008 mrueckert@suse.de - remove outdated options in the fillup_and_insserv call * Mon Aug 18 2008 mkoenig@suse.de From 422442a4c0a133a506c62d126de42e67b087fdae5316b743598077e5d083b5df Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 15 Sep 2008 10:25:53 +0000 Subject: [PATCH 061/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=61 --- util-linux-2.14-loop_autoclear.patch | 127 -------- util-linux-mount_losetup_crypto.patch | 106 +++---- util-linux-ng-2.14.1.tar.bz2 | 3 + util-linux-ng-2.14.tar.bz2 | 3 - util-linux.changes | 13 + util-linux.spec | 26 +- v2.14-ChangeLog | 105 ------- v2.14-ReleaseNotes | 418 -------------------------- v2.14.1-ChangeLog | 95 ++++++ v2.14.1-ReleaseNotes | 49 +++ 10 files changed, 230 insertions(+), 715 deletions(-) delete mode 100644 util-linux-2.14-loop_autoclear.patch create mode 100644 util-linux-ng-2.14.1.tar.bz2 delete mode 100644 util-linux-ng-2.14.tar.bz2 delete mode 100644 v2.14-ChangeLog delete mode 100644 v2.14-ReleaseNotes create mode 100644 v2.14.1-ChangeLog create mode 100644 v2.14.1-ReleaseNotes diff --git a/util-linux-2.14-loop_autoclear.patch b/util-linux-2.14-loop_autoclear.patch deleted file mode 100644 index cfebe4a..0000000 --- a/util-linux-2.14-loop_autoclear.patch +++ /dev/null @@ -1,127 +0,0 @@ -On Wed, Jun 25, 2008 at 12:59:32PM +0200, Matthias Koenig wrote: -> The new loop auto-destruct feature detaches automatically loop devices -> when no longer used. This means they are detached with the umount() -> call. But when we call umount with -d, del_loop is called and fails -> because the ioctl() returns ENXIO. - - ah, good catch. Thanks! - -> We probably should ignore this error here. - - I think we could be smarter. We can try to detect autoclear - loop devices. See the patch below. - - [I'm going to create a stable/v2.14 branch.] - - Karel - - ->From e84feaecfdf44a33ef9eccc5a56c8a6999466140 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 2 Jul 2008 14:26:51 +0200 -Subject: [PATCH] umount: improve "-d" option for autoclear loops - -The new loop auto-destruct feature detaches automatically loop devices -when no longer used. This means they are detached with the umount() -call. But when we call umount with -d, del_loop() is called and fails -because the ioctl() returns ENXIO. We have to check for autoclear -loop devices rather than blindly call del_loop(). - -Reported-by: Matthias Koenig -Signed-off-by: Karel Zak ---- - mount/lomount.c | 23 +++++++++++++++++++++++ - mount/lomount.h | 1 + - mount/umount.c | 12 ++++++++++-- - 3 files changed, 34 insertions(+), 2 deletions(-) - -diff --git a/mount/lomount.c b/mount/lomount.c -index c3ac68a..7937052 100644 ---- a/mount/lomount.c -+++ b/mount/lomount.c -@@ -102,6 +102,29 @@ is_loop_used(int fd) - return ioctl (fd, LOOP_GET_STATUS, &li) == 0; - } - -+int -+is_loop_autoclear(const char *device) -+{ -+ struct loop_info lo; -+ struct loop_info64 lo64; -+ int fd, rc = 0; -+ -+ if ((fd = open(device, O_RDONLY)) < 0) -+ return 0; -+ -+ if (ioctl(fd, LOOP_GET_STATUS64, &lo64) == 0) { -+ if (lo64.lo_flags & LO_FLAGS_AUTOCLEAR) -+ rc = 1; -+ -+ } else if (ioctl(fd, LOOP_GET_STATUS, &lo) == 0) { -+ if (lo.lo_flags & LO_FLAGS_AUTOCLEAR) -+ rc = 1; -+ } -+ -+ close(fd); -+ return rc; -+} -+ - static char * - looplist_mk_devname(struct looplist *ll, int num) - { -diff --git a/mount/lomount.h b/mount/lomount.h -index f332a70..59108d4 100644 ---- a/mount/lomount.h -+++ b/mount/lomount.h -@@ -2,6 +2,7 @@ extern int set_loop(const char *, const char *, unsigned long long, unsigned lon - const char *, int, int *); - extern int del_loop(const char *); - extern int is_loop_device(const char *); -+extern int is_loop_autoclear(const char *device); - extern char * find_unused_loop_device(void); - - extern int loopfile_used_with(char *devname, const char *filename, unsigned long long offset); -diff --git a/mount/umount.c b/mount/umount.c -index 65c8622..b2bbdae 100644 ---- a/mount/umount.c -+++ b/mount/umount.c -@@ -190,6 +190,7 @@ umount_one (const char *spec, const char *node, const char *type, - int res; - int status; - const char *loopdev; -+ int myloop = 0; - - /* Special case for root. As of 0.99pl10 we can (almost) unmount root; - the kernel will remount it readonly so that we can carry on running -@@ -201,7 +202,7 @@ umount_one (const char *spec, const char *node, const char *type, - || streq (node, "rootfs")); - if (isroot) - nomtab++; -- -+ - /* - * Call umount.TYPE for types that require a separate umount program. - * All such special things must occur isolated in the types string. -@@ -209,6 +210,13 @@ umount_one (const char *spec, const char *node, const char *type, - if (check_special_umountprog(spec, node, type, &status)) - return status; - -+ /* -+ * Ignore the option "-d" for non-loop devices and loop devices with -+ * LO_FLAGS_AUTOCLEAR flag. -+ */ -+ if (delloop && is_loop_device(spec) && !is_loop_autoclear(spec)) -+ myloop = 1; -+ - umnt_err = umnt_err2 = 0; - if (lazy) { - res = umount2 (node, MNT_DETACH); -@@ -310,7 +318,7 @@ umount_one (const char *spec, const char *node, const char *type, - } - - /* Also free loop devices when -d flag is given */ -- if (delloop && is_loop_device(spec)) -+ if (myloop) - loopdev = spec; - } - gotloop: diff --git a/util-linux-mount_losetup_crypto.patch b/util-linux-mount_losetup_crypto.patch index f5dccbf..29a879c 100644 --- a/util-linux-mount_losetup_crypto.patch +++ b/util-linux-mount_losetup_crypto.patch @@ -40,32 +40,32 @@ Signed-off-by: Ludwig Nussel create mode 100644 mount/sha512.c create mode 100644 mount/sha512.h -Index: util-linux-ng-2.14/mount/Makefile.am +Index: util-linux-ng-2.14.1-rc2/mount/Makefile.am =================================================================== ---- util-linux-ng-2.14.orig/mount/Makefile.am 2008-05-29 01:01:02.000000000 +0200 -+++ util-linux-ng-2.14/mount/Makefile.am 2008-06-25 11:33:15.000000000 +0200 -@@ -13,6 +13,7 @@ headers_common = fstab.h mount_mntent.h +--- util-linux-ng-2.14.1-rc2.orig/mount/Makefile.am 2008-08-22 11:11:26.000000000 +0200 ++++ util-linux-ng-2.14.1-rc2/mount/Makefile.am 2008-09-09 17:07:40.000000000 +0200 +@@ -17,6 +17,7 @@ headers_common = fstab.h mount_mntent.h getusername.h loop.h sundries.h mount_common = fstab.c mount_mntent.c getusername.c lomount.c \ + rmd160.c sha512.c \ $(utils_common) $(headers_common) ../lib/env.c ../lib/linux_version.c \ - ../lib/blkdev.c + ../lib/blkdev.c $(fallback) -@@ -27,7 +28,8 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD +@@ -32,7 +33,8 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD swapon_SOURCES = swapon.c swap_constants.h $(utils_common) losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c \ -- loop.h lomount.h xmalloc.h sundries.h realpath.h -+ loop.h lomount.h xmalloc.h sundries.h realpath.h \ -+ rmd160.c sha512.c +- loop.h lomount.h xmalloc.h sundries.h realpath.h $(fallback) ++ loop.h lomount.h xmalloc.h sundries.h realpath.h $(fallback) \ ++ rmd160.c sha512.c losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) - mount_LDADD = $(LDADD_common) -Index: util-linux-ng-2.14/mount/lomount.c + +Index: util-linux-ng-2.14.1-rc2/mount/lomount.c =================================================================== ---- util-linux-ng-2.14.orig/mount/lomount.c 2008-05-29 01:01:02.000000000 +0200 -+++ util-linux-ng-2.14/mount/lomount.c 2008-06-25 11:33:15.000000000 +0200 +--- util-linux-ng-2.14.1-rc2.orig/mount/lomount.c 2008-08-22 11:11:26.000000000 +0200 ++++ util-linux-ng-2.14.1-rc2/mount/lomount.c 2008-09-09 17:06:21.000000000 +0200 @@ -24,6 +24,12 @@ #include "sundries.h" #include "xmalloc.h" @@ -77,9 +77,9 @@ Index: util-linux-ng-2.14/mount/lomount.c +#define MIN(a,b) ((a enable data encryption with specified \n" @@ -285,7 +285,7 @@ Index: util-linux-ng-2.14/mount/lomount.c " -o | --offset start at offset into file\n" " --sizelimit loop limited to only bytes of the file\n" " -p | --pass-fd read passphrase from file descriptor \n" -@@ -850,11 +965,14 @@ usage(void) { +@@ -876,11 +991,14 @@ usage(void) { int main(int argc, char **argv) { char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc; @@ -300,7 +300,7 @@ Index: util-linux-ng-2.14/mount/lomount.c unsigned long long off, slimit; struct option longopts[] = { { "all", 0, 0, 'a' }, -@@ -862,6 +980,8 @@ main(int argc, char **argv) { +@@ -888,6 +1006,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -309,7 +309,7 @@ Index: util-linux-ng-2.14/mount/lomount.c { "associated", 1, 0, 'j' }, { "offset", 1, 0, 'o' }, { "sizelimit", 1, 0, 128 }, -@@ -880,12 +1000,13 @@ main(int argc, char **argv) { +@@ -906,12 +1026,13 @@ main(int argc, char **argv) { off = 0; slimit = 0; assoc = offset = sizelimit = encryption = passfd = NULL; @@ -324,7 +324,7 @@ Index: util-linux-ng-2.14/mount/lomount.c longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -907,6 +1028,12 @@ main(int argc, char **argv) { +@@ -933,6 +1054,12 @@ main(int argc, char **argv) { case 'j': assoc = optarg; break; @@ -337,7 +337,7 @@ Index: util-linux-ng-2.14/mount/lomount.c case 'o': offset = optarg; break; -@@ -985,8 +1112,11 @@ main(int argc, char **argv) { +@@ -1011,8 +1138,11 @@ main(int argc, char **argv) { else { if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(); @@ -350,10 +350,10 @@ Index: util-linux-ng-2.14/mount/lomount.c if (res == 2 && find) { if (verbose) printf("stolen loop=%s...trying again\n", -Index: util-linux-ng-2.14/mount/losetup.8 +Index: util-linux-ng-2.14.1-rc2/mount/losetup.8 =================================================================== ---- util-linux-ng-2.14.orig/mount/losetup.8 2008-05-29 01:01:02.000000000 +0200 -+++ util-linux-ng-2.14/mount/losetup.8 2008-06-25 11:33:15.000000000 +0200 +--- util-linux-ng-2.14.1-rc2.orig/mount/losetup.8 2008-05-29 01:01:02.000000000 +0200 ++++ util-linux-ng-2.14.1-rc2/mount/losetup.8 2008-09-09 17:06:21.000000000 +0200 @@ -80,9 +80,18 @@ find the first unused loop device. If a argument is present, use this device. Otherwise, print its name .IP "\fB\-h, \-\-help\fP" @@ -382,10 +382,10 @@ Index: util-linux-ng-2.14/mount/losetup.8 Cryptoloop is deprecated in favor of dm-crypt. For more details see .B cryptsetup(8). -Index: util-linux-ng-2.14/mount/mount.8 +Index: util-linux-ng-2.14.1-rc2/mount/mount.8 =================================================================== ---- util-linux-ng-2.14.orig/mount/mount.8 2008-06-09 11:28:17.000000000 +0200 -+++ util-linux-ng-2.14/mount/mount.8 2008-06-25 11:33:15.000000000 +0200 +--- util-linux-ng-2.14.1-rc2.orig/mount/mount.8 2008-08-22 11:11:26.000000000 +0200 ++++ util-linux-ng-2.14.1-rc2/mount/mount.8 2008-09-09 17:06:21.000000000 +0200 @@ -618,6 +618,15 @@ This option implies the options .B nofail Do not report errors for this device if it does not exist. @@ -402,7 +402,7 @@ Index: util-linux-ng-2.14/mount/mount.8 .B mand Allow mandatory locks on this filesystem. See .BR fcntl (2). -@@ -2034,6 +2043,10 @@ that are really options to +@@ -2049,6 +2058,10 @@ that are really options to .BR \%losetup (8). (These options can be used in addition to those specific to the filesystem type.) @@ -413,10 +413,10 @@ Index: util-linux-ng-2.14/mount/mount.8 If no explicit loop device is mentioned (but just an option `\fB\-o loop\fP' is given), then -Index: util-linux-ng-2.14/mount/mount.c +Index: util-linux-ng-2.14.1-rc2/mount/mount.c =================================================================== ---- util-linux-ng-2.14.orig/mount/mount.c 2008-05-29 01:01:02.000000000 +0200 -+++ util-linux-ng-2.14/mount/mount.c 2008-06-25 11:33:15.000000000 +0200 +--- util-linux-ng-2.14.1-rc2.orig/mount/mount.c 2008-09-09 16:50:12.000000000 +0200 ++++ util-linux-ng-2.14.1-rc2/mount/mount.c 2008-09-09 17:06:21.000000000 +0200 @@ -87,6 +87,9 @@ static int suid = 0; /* Contains the fd to read the passphrase from, if any. */ static int pfd = -1; @@ -463,7 +463,7 @@ Index: util-linux-ng-2.14/mount/mount.c if (res == 2) { /* loop dev has been grabbed by some other process, try again, if not given explicitly */ -@@ -1650,6 +1657,7 @@ static struct option longopts[] = { +@@ -1661,6 +1668,7 @@ static struct option longopts[] = { { "options", 1, 0, 'o' }, { "test-opts", 1, 0, 'O' }, { "pass-fd", 1, 0, 'p' }, @@ -471,7 +471,7 @@ Index: util-linux-ng-2.14/mount/mount.c { "types", 1, 0, 't' }, { "bind", 0, 0, 128 }, { "move", 0, 0, 133 }, -@@ -1811,6 +1819,7 @@ main(int argc, char *argv[]) { +@@ -1822,6 +1830,7 @@ main(int argc, char *argv[]) { char *options = NULL, *test_opts = NULL, *node; const char *spec = NULL; char *label = NULL; @@ -479,7 +479,7 @@ Index: util-linux-ng-2.14/mount/mount.c char *uuid = NULL; char *types = NULL; char *p; -@@ -1841,7 +1850,7 @@ main(int argc, char *argv[]) { +@@ -1852,7 +1861,7 @@ main(int argc, char *argv[]) { initproctitle(argc, argv); #endif @@ -488,7 +488,7 @@ Index: util-linux-ng-2.14/mount/mount.c longopts, NULL)) != -1) { switch (c) { case 'a': /* mount everything in fstab */ -@@ -1859,6 +1868,9 @@ main(int argc, char *argv[]) { +@@ -1870,6 +1879,9 @@ main(int argc, char *argv[]) { case 'i': external_allowed = 0; break; @@ -498,7 +498,7 @@ Index: util-linux-ng-2.14/mount/mount.c case 'l': list_with_volumelabel = 1; break; -@@ -1989,6 +2001,9 @@ main(int argc, char *argv[]) { +@@ -2000,6 +2012,9 @@ main(int argc, char *argv[]) { atexit(unlock_mtab); @@ -508,10 +508,10 @@ Index: util-linux-ng-2.14/mount/mount.c switch (argc+specseen) { case 0: /* mount -a */ -Index: util-linux-ng-2.14/mount/rmd160.c +Index: util-linux-ng-2.14.1-rc2/mount/rmd160.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14/mount/rmd160.c 2008-06-25 11:33:15.000000000 +0200 ++++ util-linux-ng-2.14.1-rc2/mount/rmd160.c 2008-09-09 17:06:21.000000000 +0200 @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -1045,10 +1045,10 @@ Index: util-linux-ng-2.14/mount/rmd160.c + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -Index: util-linux-ng-2.14/mount/rmd160.h +Index: util-linux-ng-2.14.1-rc2/mount/rmd160.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14/mount/rmd160.h 2008-06-25 11:33:15.000000000 +0200 ++++ util-linux-ng-2.14.1-rc2/mount/rmd160.h 2008-09-09 17:06:21.000000000 +0200 @@ -0,0 +1,11 @@ +#ifndef RMD160_H +#define RMD160_H @@ -1061,10 +1061,10 @@ Index: util-linux-ng-2.14/mount/rmd160.h +#endif /*RMD160_H*/ + + -Index: util-linux-ng-2.14/mount/sha512.c +Index: util-linux-ng-2.14.1-rc2/mount/sha512.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14/mount/sha512.c 2008-06-25 11:33:15.000000000 +0200 ++++ util-linux-ng-2.14.1-rc2/mount/sha512.c 2008-09-09 17:06:21.000000000 +0200 @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1498,10 +1498,10 @@ Index: util-linux-ng-2.14/mount/sha512.c + memset(&ctx, 0, sizeof(ctx)); +} +#endif -Index: util-linux-ng-2.14/mount/sha512.h +Index: util-linux-ng-2.14.1-rc2/mount/sha512.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14/mount/sha512.h 2008-06-25 11:33:15.000000000 +0200 ++++ util-linux-ng-2.14.1-rc2/mount/sha512.h 2008-09-09 17:06:21.000000000 +0200 @@ -0,0 +1,45 @@ +/* + * sha512.h @@ -1548,10 +1548,10 @@ Index: util-linux-ng-2.14/mount/sha512.h +/* no sha384_write(), use sha512_write() */ +/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ +extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); -Index: util-linux-ng-2.14/mount/lomount.h +Index: util-linux-ng-2.14.1-rc2/mount/lomount.h =================================================================== ---- util-linux-ng-2.14.orig/mount/lomount.h 2008-05-29 01:01:02.000000000 +0200 -+++ util-linux-ng-2.14/mount/lomount.h 2008-06-25 11:33:15.000000000 +0200 +--- util-linux-ng-2.14.1-rc2.orig/mount/lomount.h 2008-07-02 15:08:50.000000000 +0200 ++++ util-linux-ng-2.14.1-rc2/mount/lomount.h 2008-09-09 17:06:21.000000000 +0200 @@ -1,5 +1,6 @@ -extern int set_loop(const char *, const char *, unsigned long long, unsigned long long, - const char *, int, int *); @@ -1560,4 +1560,4 @@ Index: util-linux-ng-2.14/mount/lomount.h + int pfd, int *options, int keysz); extern int del_loop(const char *); extern int is_loop_device(const char *); - extern char * find_unused_loop_device(void); + extern int is_loop_autoclear(const char *device); diff --git a/util-linux-ng-2.14.1.tar.bz2 b/util-linux-ng-2.14.1.tar.bz2 new file mode 100644 index 0000000..a5d1565 --- /dev/null +++ b/util-linux-ng-2.14.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf289c5399ab78674d9662ff2906a63ab540e88bf8bb1d3c7326dc8b1bef802c +size 2929618 diff --git a/util-linux-ng-2.14.tar.bz2 b/util-linux-ng-2.14.tar.bz2 deleted file mode 100644 index 04ee073..0000000 --- a/util-linux-ng-2.14.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7736d8d7d3b39654e350416585b3e00af9f55670cce8b3dddd2c2494cbaae81c -size 2868987 diff --git a/util-linux.changes b/util-linux.changes index f2c8c10..7076ccc 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Sep 10 15:58:52 CEST 2008 - mkoenig@suse.de + +- update to version 2.14.1 + * fdisk: don't check for GPT when asked for disk size only + * losetup: remove unnecessary minor number check + * rtcwake: prefer RTC_WKALM_SET over RTC_ALM_SET + * scriptreplay: new implementation is out-of-sync + * selinux: is_selinux_enabled() returns 0, 1 and -1 + * umount: improve "-d" option for autoclear loops +- remove patch + util-linux-2.14-loop_autoclear.patch + ------------------------------------------------------------------- Wed Aug 20 15:20:06 CEST 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index de3761c..b4bc546 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.14) +# spec file for package util-linux (Version 2.14.1) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -29,8 +29,8 @@ PreReq: %install_info_prereq permissions License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on -Version: 2.14 -Release: 21 +Version: 2.14.1 +Release: 1 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -40,8 +40,8 @@ Source3: nologin.8 Source4: raw.init Source5: etc.raw Source6: etc_filesystems -Source7: v2.14-ChangeLog -Source8: v2.14-ReleaseNotes +Source7: v2.14.1-ChangeLog +Source8: v2.14.1-ReleaseNotes %define time_ver 1.7 %define which_ver 2.19 %define adjtimex_ver 1.20 @@ -70,7 +70,6 @@ Patch3: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch4: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch # Patch5: util-linux-2.13.1-fdisk_cfdisk_yesno.patch -Patch6: util-linux-2.14-loop_autoclear.patch Patch7: util-linux-2.14-mount_retry_on_nomedium.patch # crypto patch Patch20: util-linux-mount_losetup_crypto.patch @@ -114,7 +113,6 @@ Authors: %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 %patch7 -p1 %patch20 -p1 cp %{SOURCE7} %{SOURCE8} . @@ -354,8 +352,8 @@ fi %files # Common files for all archs %defattr(-,root,root) -%doc v2.14-ChangeLog -%doc v2.14-ReleaseNotes +%doc v2.14.1-ReleaseNotes +%doc v2.14.1-ChangeLog %doc login-utils/README.getty %doc login-utils/README.modems-with-agetty %doc login-utils/README.poeigl @@ -581,6 +579,16 @@ fi #%endif %changelog +* Wed Sep 10 2008 mkoenig@suse.de +- update to version 2.14.1 + * fdisk: don't check for GPT when asked for disk size only + * losetup: remove unnecessary minor number check + * rtcwake: prefer RTC_WKALM_SET over RTC_ALM_SET + * scriptreplay: new implementation is out-of-sync + * selinux: is_selinux_enabled() returns 0, 1 and -1 + * umount: improve "-d" option for autoclear loops +- remove patch + util-linux-2.14-loop_autoclear.patch * Wed Aug 20 2008 mkoenig@suse.de - enable SELinux support [fate#303662] * Mon Aug 18 2008 mrueckert@suse.de diff --git a/v2.14-ChangeLog b/v2.14-ChangeLog deleted file mode 100644 index 34e292e..0000000 --- a/v2.14-ChangeLog +++ /dev/null @@ -1,105 +0,0 @@ -Changes between v2.14-rc3 and v2.14 ------------------------------------ - -commit fba4e21fa000748112d39c8e9fc266f1cbe9a08f -Author: Karel Zak -Date: Mon Jun 9 13:58:54 2008 +0200 - - build-sys: release++ (v2.14) - - Signed-off-by: Karel Zak - - NEWS | 4 ++++ - configure.ac | 2 +- - docs/v2.14-ReleaseNotes | 2 +- - 3 files changed, 6 insertions(+), 2 deletions(-) - -commit 1d66f79c80e6c655dbd1633f9e7d4efd1562bc20 -Author: Karel Zak -Date: Mon Jun 9 12:53:27 2008 +0200 - - docs: update v2.14 ReleaseNotes - - Signed-off-by: Karel Zak - - docs/v2.14-ReleaseNotes | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) - -commit d5b64541978b45af5eaa60050d2b1a5f3a5da243 -Author: Karel Zak -Date: Mon Jun 9 12:20:40 2008 +0200 - - docs: update AUTHORS file - - Signed-off-by: Karel Zak - - AUTHORS | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) - -commit 754ba29e2b9d6569cf502a3c6cd0a59c6513e25a -Author: Karel Zak -Date: Mon Jun 9 12:18:26 2008 +0200 - - po: merge changes - - Signed-off-by: Karel Zak - - po/hu.po | 852 +++++++++++++++++++++++++++++++++++++++++++------------------- - 1 files changed, 597 insertions(+), 255 deletions(-) - -commit 568ea3a7f1516f86769230ccdb2682479be326e9 -Author: Gabor Kelemen -Date: Mon Jun 9 12:02:00 2008 +0200 - - po: update hu.po (from translationproject.org) - - po/hu.po | 1542 +++++++++++++++++++++++--------------------------------------- - 1 files changed, 559 insertions(+), 983 deletions(-) - -commit 0eab17b95d813c93c8e7b5e7f5943f0940420f00 -Author: Volker Schatz -Date: Tue Jun 3 23:52:04 2008 +0200 - - ddate: 11th, 12th and 13th of month - - the Discordian date utility ddate gives the 11th, 12th and 13th of the month as - the "11st", "12nd" and "13rd". Unless this is a religious thing, please apply - the patch below. - - Signed-off-by: Volker Schatz - - misc-utils/ddate.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -commit 47bf8ef7f1d084befe2efcdd37a5f7c7c9d9da70 -Author: Paulius Zaleckas -Date: Mon Jun 9 11:35:59 2008 +0200 - - rtcwake: fix the default mode to "standby" - - Writing "suspend" to /sys/power/state does nothing. - Even "man rtcwake" says that default should be "standby" :) - - Signed-off-by: Paulius Zaleckas - Signed-off-by: Karel Zak - - sys-utils/rtcwake.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -commit eaf58a8697926711efec9e494e810d3f6bfd3938 -Author: Christophe Blaess -Date: Mon Jun 9 11:32:19 2008 +0200 - - mount: fix a small typo in mount.8 - - While working on french translation of the Linux Man Pages, I've found a - small typo in mount.8. - - Only one wrong letter : the option "osyncis_o_sync" for XFS filesystem - is erroneously replaced by "osyncis_d_sync" (the previous option). - - Signed-off-by: Christophe Blaess - Signed-off-by: Karel Zak - - mount/mount.8 | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/v2.14-ReleaseNotes b/v2.14-ReleaseNotes deleted file mode 100644 index 739bc40..0000000 --- a/v2.14-ReleaseNotes +++ /dev/null @@ -1,418 +0,0 @@ - -Util-linux-ng 2.14 Release Notes (09-Jun-2008) -============================================== - -Release highlights ------------------- - - mount(8) supports new "nofail" mount option. - - mount(8) supports auto-destruction of loop devices. - - losetup(8) supports new command line option "-j" to show status of all - loop devices associated with given file. - - losetup(8) supports unlimited number of loop devices. - - losetup(8) supports new command line option "--sizelimit" to set data end. - - ldattach(8) command has been added to util-linux-ng. The ldattach - daemon opens the specified device file and attaches the line discipline - to it for processing of the sent and/or received data. - - setterm(8) supports new command line option "-blank [force|poke]" for - TIOCL_{BLANKED,BLANK}SCREEN. - - tailf(8) has been reimplemented to use inotify. - - tailf(8) supports new command line option "-n" to specifying output lines. - - mkswap(8) supports new command line option "-U" to set UUID explicitly. - - fdisk(8) has been fixed to calculate partition size in 2^N. - - cal(8) supports highlighting an arbitrary date. - - agetty(8) makes username-in-uppercase feature optional (off by default). - Users who use uppercase-only terminals need to use the option "-U" now. - - losetup(8), mount(8), umount(8), fdisk(8) and sfdisk(8) support static - linking when compiled with --enable-static-programs. - - hwclock(8) supports new command line option "adjfile" to override - the default /etc/adjtime. - - scriptreplay(1) command has been re-written from Perl to C. - - -Deprecated ----------- - - The losetup(8) '-s' option (introduced by util-linux-ng-2.13) is deprecated - now. This short form of the option '--show' could be in collision with - Loop-AES losetup implementation where the same option is used for the loop - sizelimit. - - -Fixed security issues ---------------------- - - CVE-2008-1926 - audit log injection via login - - The problem was originally reported for OpenSSH few months - ago (CVE-2007-3102). The login(1) is affected by the same - bug when built with the option "--with-audit". - - -Stable maintenance releases between v2.13 and v2.14 ---------------------------------------------------- - -util-linux-ng 2.13.1.1 [22-Apr-2008] - - * ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1.1-ReleaseNotes - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1.1-ChangeLog - -util-linux-ng 2.13.1 [16-Jan-2008] - - * ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1-ReleaseNotes - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1-ChangeLog - - -ChangeLog between v2.13 and v2.14 ---------------------------------- - - For more details see ChangeLog files at: - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/ - -agetty: - - cleanup MAXHOSTNAMELEN [Karel Zak] - - make username-in-uppercase feature optional (off by default.) [Hamish Coleman] - - non-linux support (use pathnames.h) [Karel Zak] - - replace termio with termios interface [Samuel Thibault] - - ungettextize several debugging messages. [Benno Schulenberg] -blockdev: - - add --getsz to blockdev.8 [Karel Zak] - - add missing description about option --report in manpage [Li Zefan] - - fix opened file leaving unclosed [lizf] - - use lib/blkdev.c, fix --report [Karel Zak] -build-sys: - - add --enable-static-programs [Stepan Kasal, Karel Zak] - - add AC_CANONICAL_HOST [Miklos Szeredi] - - add VARSUFFIX to UTIL_CHECK_LIB [Karel Zak] - - add err.h check [Karel Zak] - - add support ionice for Super-H architecture [Karel Zak] - - add v2.14 to NEWS [Karel Zak] - - autogen.sh reports versions of autotools now [Karel Zak] - - build arch(1) during distcheck [Stepan Kasal] - - cleanup "x$foo" usage [Karel Zak] - - cleanup disk-utils/Makefile.am (use $utils_common) [Karel Zak] - - cleanup usage of linux/major.h [Samuel Thibault] - - disable syscall fallbacks for non-linux systems [Karel Zak] - - do not add -luuid to BLKID_LIBS [Stepan Kasal] - - fix missing deps for swapon [Matthias Koenig] - - ignore a bunch of generated files, mostly binaries [James Youngman] - - nls/locale handling in util-linux-ng general [Mike Frysinger] - - non-linux support [Samuel Thibault] - - release++ [Karel Zak] - - remove errs.h [Karel Zak] - - remove files that are no longer delivered from git [LaMont Jones] - - remove hardcoded _GNU_SOURCE [Karel Zak] - - remove unnecessary check-local target from login-utils/ [Karel Zak] - - set AC_PREREQ to 2.60, increment version to 2.14 [Karel Zak] - - simplify code around RDEV_LINKS and SETARCH_LINKS [Stepan Kasal] - - unify method for checking system calls and fallback handling [Mike Frysinger, Stepan Kasal] - - update .gitignore files [Karel Zak] - - use dist_man_MANS instead of man_MANS [Stepan Kasal] - - use ncursesw (wide version) when possibe [Karel Zak, Mike Frysinger] - - use pkg-config to find the libs for static build [Stepan Kasal] - - use portable $(VAR =) instead of gmake-specific $(addsuffix) [Stepan Kasal] -cal: - - add description about option -V to manpage [Li Zefan] - - add support for highlighting an arbitrary date [Pádraig Brady] - - avoid -Wformat warnings [Jim Meyering] - - fix weekday alignment for certain locales [Pádraig Brady] - - replace errs.h with libc err.h [Karel Zak] - - use HAVE_LIB{NCURSES,NCURSESW} instead HAVE_NCURSES [Karel Zak] -cfdisk: - - define portable {DEFAULT,ALTERNATE}_DEVICE [Samuel Thibault] - - display cylinders beyond 1024 [Peter Breitenlohner] - - slightly increase the size of menu buttons [Benno Schulenberg] - - translate partition-type names when they are printed. [Benno Schulenberg] -chfn: - - add pam_end() call and cleanup PAM code [Karel Zak] - - fix compiler warnings in selinux stuff [Karel Zak] -chfn, chsh, login: - - collapsing three similar messages into a single one [Benno Schulenberg] -chsh: - - should use pam_end function to terminate the PAM transaction [Yu Zhiguo, Karel Zak] -column: - - replace errs.h with libc err.h [Karel Zak] -ddate: - - 11th, 12th and 13th of month [Volker Schatz] -docs: - - add a note about minix v3 to TODO file [Karel Zak] - - add info about .bugfix releases and branches [Karel Zak] - - add note about incorrect tag 2.13.1 [Karel Zak] - - add note about losetup --sizelimit to ReleaseNotes [Karel Zak] - - add note about static linking [Karel Zak] - - add v2.14 ReleaseNotes [Karel Zak] - - cleanup DEPRECATED file [Karel Zak] - - cleanup README.devel, add note about coding style and Signed-off-by [Karel Zak] - - fix ChangeLog URL [Pascal Terjan] - - fix stable branche name in README.devel [Karel Zak] - - mark vipw(1) is deprecated in favor of vipw from shadow-utils [Karel Zak] - - refresh TODO list [Karel Zak] - - remove date from ReleasNotes [Karel Zak] - - tweak a few messages for clarity [Benno Schulenberg] - - update AUTHORS file [Karel Zak] - - update TODO file [Karel Zak] - - update v2.14 ReleaseNotes [Karel Zak] - - we already rewrote the scriptreplay script; remove that TODO entry [James Youngman] -elvtune: - - use get_linux_version() [Karel Zak] -fdformat: - - install to /usr/sbin instead to /usr/bin [Karel Zak] -fdisk: - - better fallback for get_random_id() [H. Peter Anvin] - - calculate +size{K,M,G} in 2^N [Karel Zak] - - cleanup BLK* ioctls usage [Karel Zak] - - doesn't recognize the VMware ESX partitions [Karel Zak] - - doing useless ioctl when editing an image [Pascal Terjan] - - fix building for AVR32 and CRIS [Imre Kaloz] - - fix typo [Karel Zak] - - message tweak [Karel Zak] - - non-linux support (MAXPATHLEN) [Karel Zak] - - non-linux support (use standard uintxy_t instead __uxy) [Samuel Thibault] - - use more readable "GPT" name rather than "EFI GPT" [Robert Millan] - - use swab macros from bitops.h [Karel Zak] -flock: - - typo in man page [A. Costa] -fsck.cramfs: - - clean up gcc warnings [Randy Dunlap] -fsck.minix: - - correct the error message given when we can't open the device [James Youngman] - - reset the terminal state if we are killed by a fatal signal [James Youngman] -getopt: - - fix path to examples in getopt.1 [Karel Zak] - - install example scripts as SCRIPTS, not DATA [Peter Breitenlohner] -hwclock: - - add --adjfile=path option [Karel Zak] - - check for ENODEV [David Woodhouse] - - do not create a zero adjfile [Alain Guibert] - - fix --rtc option [Matthias Koenig, Karel Zak] -include: - - provides everything [Samuel Thibault] - - add bitops.h with swab{16,32,64} macros [Karel Zak] - - add mount paths to pathnames.h [Karel Zak] - - cleanup pathnames.h [Karel Zak] -ionice: - - add a note about permissions to ionice.1 [Karel Zak] - - update man page to reflect IDLE class change in 2.6.25 [Karel Zak] -ipcs: - - add information about POSIX compatibility to ipcs.1 [Karel Zak] -kill: - - man page is missing a description of "kill -0" [Karel Zak] -ldattach: - - add NLS support [Karel Zak] - - new command [Tilman Schmidt] - - use glibc termios [Karel Zak] -lib: - - add blkdev.{c,h} [Stefan Krah, Karel Zak] - - add linux_version.{c,h} [Stefan Krah] -login: - - audit log injection attack via login [Steve Grubb] - - fix a small memory leak and remove unnecessary zeroing [Karel Zak] - - login segfaults on EOF (rh#298461) [Karel Zak] - - replace termio with termios interface [Samuel Thibault] - - rewrite is_local() to remove limits on line length [James Youngman] -login-utils: - - cleanup strlen() and fgets() usage [James Youngman] -losetup: - - add --associated option [Karel Zak] - - add --sizelimit option [Shachar Shemesh] - - canonicalize loopfile name [Karel Zak, Matthias Koenig] - - clean up gcc warnings [Randy Dunlap] - - fix errno usage [Karel Zak] - - fix typo in losetup.8 [Karel Zak] - - mark the option -s as deprecated [Karel Zak] - - remove duplicate xstrdup() and error() [Karel Zak] - - split help message into two smaller parts [Benno Schulenberg] - - support unlimited number of loops [Karel Zak] - - use standard uintxy_t types (struct loop_info64) [Samuel Thibault] -mesg: - - replace errs.h with libc err.h [Karel Zak] -mkfs.cramfs: - - clean up gcc warnings [Randy Dunlap, Karel Zak] - - remove unused header file [lizf] - - switch on localization. [Benno Schulenberg] -mkfs.minix: - - add sectorsize check [Matthias Koenig] - - clean up gcc warnings [Karel Zak] - - clean up gcc warnings [Randy Dunlap] - - device size cleanup [Matthias Koenig] -mkswap: - - BLKGETSIZE cleanup [Karel Zak] - - cleanup kB vs. KiB usage in error messages [Karel Zak] - - fix compiler warnings [Karel Zak] - - linux_version() code consolidation [Karel Zak] - - possible to crash with SELinux relabeling support [KaiGai Kohei] - - set UUID for swap space (add -U option) [Martin Schulze] - - set errno=0 in write_all() [Karel Zak] - - when writing the signature page, handle EINTR returns [Karel Zak] -more: - - cleanup gcc warnings [Randy Dunlap] - - non-linux support [Samuel Thibault] - - replace CBAUD with cfgetispeed() [Samuel Thibault] - - use HAVE_WIDECHAR instead ENABLE_WIDECHAR [Karel Zak] -mount: - - "can't create lock file" message sometimes means failure, sometimes not [Mark McLoughlin] - - "nofail" mount option [Matthias Koenig, Karel Zak] - - -L|-U segfault when label or uuid doesn't exist [Karel Zak] - - add more details to the --version output [Karel Zak] - - add support for sizelimit= mount option (for loop mounts) [Shachar Shemesh] - - allow auto-destruction of loop devices [Bernardo Innocenti] - - chain of symlinks to fstab causes use of pointer after free [Norbert Buchmuller] - - clean up gcc warnings (mount_mntent.c) [Randy Dunlap] - - clean up global variables [Karel Zak] - - cleanup "none" fstype usage [Karel Zak] - - cleanup KERNEL_VERSION, remove my_dev_t.h [Karel Zak] - - cleanup canonicalize() usage [Karel Zak] - - cleanup error() and die() [Karel Zak] - - cleanup usage of _PATH_* [Karel Zak] - - doesn't drop privileges properly when calling helpers [Ludwig Nussel] - - don't call canonicalize(SPEC) for cifs, smbfs and nfs [Karel Zak] - - don't canonicalize LABEL= or UUID= spec [Karel Zak] - - drop the part always true from a while condition [Pascal Terjan] - - fix a small typo in mount.8 [Christophe Blaess] - - fix fd leak [Matthias Koenig] - - fix typo in mount.8 [Karel Zak] - - hint about helper program if device doesn't exist [Karel Zak] - - improve chmod & chown usage and clean up gcc warnings (fstab.c) [Karel Zak] - - improve error message when helper program not present [LaMont Jones] - - prevent loop mounting the same file twice [Karel Zak, Matthias Koenig] - - remount doesn't care about loop= [Karel Zak] - - remove MS_{REPLACE,AFTER,BEFORE,OVER} [Karel Zak] - - remove built-in support for background mounts [Karel Zak] - - remove redundant fflush [Karel Zak] - - remove set_proc_name() [Karel Zak] - - remove useless if-before-my_free, define my_free as a macro [Karel Zak] - - use MNTTYPE_SWAP (from mntent.h) [Karel Zak] - - use atexit() rather than (*at_die)() [Karel Zak] - - use blkdev_get_size() [Karel Zak] - - use canonicalize in getfs_by_devname [Karel Zak] -namei: - - add to identify FIFO (named pipe) and update manpage [Li Zefan] - - cleanup tailing white-spaces [Karel Zak] - - non-linux support (get_current_dir_name() and PATH_MAX) [Karel Zak, Samuel Thibault] -partx: - - fix compiler warnings [Karel Zak] - - use swab macros from bitops.h [Karel Zak] -pg: - - fix segfault on search [Rajeev V. Pillai] -po: - - add eu.po (from translationproject.org) [Mikel Olasagasti] - - add pl.po (from translationproject.org) [Andrzej Krzysztofowicz] - - fix typo in de.po [Karel Zak] - - merge changes [Karel Zak] - - update POTFILES.in [Karel Zak] - - update ca.po (from translationproject.org) [Josep Puigdemont] - - update cs.po (from translationproject.org) [Petr Pisar] - - update da.po (from translationproject.org) [Claus Hindsgaul] - - update de.po (from translationproject.org) [Michael Piefel] - - update es.po (from translationproject.org) [Santiago Vila Doncel] - - update et.po (from translationproject.org) [Meelis Roos] - - update fi.po (from translationproject.org) [Lauri Nurmi] - - update fr.po (from translationproject.org) [Michel Robitaille] - - update hu.po (from translationproject.org) [Gabor Kelemen] - - update id.po (from translationproject.org) [Arif E. Nugroho] - - update it.po (from translationproject.org) [Marco Colombo] - - update ja.po (from translationproject.org) [Daisuke Yamashita] - - update nl.po (from translationproject.org) [Benno Schulenberg] - - update po files [Karel Zak] - - update pt_BR.po (from translationproject.org) [Rodrigo Stulzer Lopes] - - update ru.po (from translationproject.org) [Pavel Maryanov] - - update sl.po (from translationproject.org) [Simon Mihevc] - - update sv.po (from translationproject.org) [Daniel Nylander] - - update tr.po (from translationproject.org) [Nilgün Belma Bugüner] - - update uk.po (from translationproject.org) [Maxim V. Dziumanenko] - - update vi.po (from translationproject.org) [Clytie Siddall] -rename: - - add description about option -V to manpage [Li Zefan] - - remove useless variable [Li Zefan] -renice: - - detect errors in arguments, add -v, -h and long options [LaMont Jones, Karel Zak] -rev: - - use warn() in errs.h [Li Zefan] -rtcwake: - - fix UTC time usage [David Brownell] - - fix the default mode to "standby" [Paulius Zaleckas] - - fix typo [Karel Zak] - - fix typo SATE -> STATE [Mike Frysinger] - - fix verbose message [Karel Zak] - - include libgen.h for basename prototype [Mike Frysinger] - - misc cleanups [David Brownell] -script: - - cleanup gcc warnings [Randy Dunlap] - - cleanup includes [Samuel Thibault] - - dies on SIGWINCH [Karel Zak] - - read returns a size_t [James Youngman] -scriptreplay: - - gettextize a forgotten messages [Karel Zak] - - rewrite in C [Karel Zak, James Youngman] -setarch: - - add fallback for linux/personality [Karel Zak] - - add long options to setarch and update manpage [Karel Zak, Li Zefan] - - add missing alpha subarchs [Oliver Falk] - - adding groff symlinks to setarch manual page [Arkadiusz Miskiewicz] - - fix compiler warning [LaMont Jones] - - generate groff links in a better way [Karel Zak] - - provide backwards compatibility [Dmitry V. Levin] - - tweak the help text, and gettextize a forgotten message [Benno Schulenberg] -setterm: - - add -blan [force|poke] options for TIOCL_{BLANKED,BLANK}SCREEN [Samuel Thibault, Karel Zak] - - dump by TIOCLINUX is deprecated since linux 1.1.92. [Karel Zak] - - opened file leaving unclosed [Karel Zak, lizf] - - remove unnecessaty ifndef TCGETS [Samuel Thibault] -sfdisk: - - allow partitioning drives of over 2^31 sectors. [Kunihiko IMAI] - - cleanup 83 gcc warnings [Randy Dunlap] - - opened files leaving unclosed [Karel Zak, Li Zefan] - - remove unnecessary linux/unistd.h [Samuel Thibault] - - use get_linux_version() [Karel Zak] -shutdown: - - use _PATH_MOUNTED instead of _PATH_MTAB [Stepan Kasal] -swapon: - - Reinitialize software suspend areas to avoid future corruption. [Kees Cook, Karel Zak] - - add sundries.h [Karel Zak] - - clean up gcc warnings [Randy Dunlap] - - cleanup usage output [Karel Zak] - - cleanup usage() [Karel Zak] - - fix swsuspend detection [Karel Zak] - - fix typo in usage() [Karel Zak] - - readjust the usage summaries [Benno Schulenberg] - - remove unnecessary myrealpath() call [Karel Zak] -sys-utils: - - correct setarch.8 manpage link creation [Frédéric Bothamy] -tailf: - - add option -n to specifying output lines [Li Zefan] - - clean up gcc warnings & fix use of errno [Karel Zak] - - inotify based reimplementation [Karel Zak] - - non-linux support [Samuel Thibault] - - opened file leaving unclosed [lizf] - - replace errs.h with libc err.h [Karel Zak] -tests: - - add "sort" to cramfs test [Karel Zak] - - add test for include/pathnames.h [Karel Zak] - - add ts-mount-noncanonical [Karel Zak] - - exactly define a time format in ls -l output [Karel Zak] - - fix blkid cache usage [Karel Zak] - - move test_bkdev to lib/ [Karel Zak] - - redirect libblkid cache to BLKID_FILE [Karel Zak] - - rename test_sysinfo, remove tailing white-spaces [Karel Zak] - - use losetup -s [Karel Zak] -umount: - - add hint about lsof & fuser [Karel Zak] - - don't print duplicate error messages [Karel Zak] - - use atexit() rather than (*at_die)() [Karel Zak] -wall: - - cleanup MAXHOSTNAMELEN [Karel Zak] diff --git a/v2.14.1-ChangeLog b/v2.14.1-ChangeLog new file mode 100644 index 0000000..565bb64 --- /dev/null +++ b/v2.14.1-ChangeLog @@ -0,0 +1,95 @@ +Changes between 2.14.1-rc2 and 2.14.1 +------------------------------------- + +commit 0c24888de6470137673519eb5c20bef98be24e0f +Author: Karel Zak +Date: Wed Sep 10 12:17:22 2008 +0200 + + build-sys: release++ (v2.14.1) + + Signed-off-by: Karel Zak + + NEWS | 4 ++++ + configure.ac | 2 +- + 2 files changed, 5 insertions(+), 1 deletions(-) + +commit 204d2a7ff7e0bd39e1769a3d8c071484061b878a +Author: Karel Zak +Date: Wed Sep 10 12:11:21 2008 +0200 + + docs: update v2.14.1 ReleaseNotes + + Signed-off-by: Karel Zak + + docs/v2.14.1-ReleaseNotes | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) + +commit 00dd2edec25e68bfe58ea538f7a220fcd4d42f83 +Author: Karel Zak +Date: Wed Sep 10 11:21:54 2008 +0200 + + po: merge changes + + Signed-off-by: Karel Zak + + po/cs.po | 536 +++++++++++++++++++++++++++------------ + po/fi.po | 620 ++++++++++++++++++++++++++++++++-------------- + po/id.po | 802 ++++++++++++++++++++++++++++++++++++++++++----------------- + po/nl.po | 591 ++++++++++++++++++++++++++++++------------- + po/vi.po | 594 +++++++++++++++++++++++++++++++------------- + po/zh_CN.po | 223 ++++++++++++----- + 6 files changed, 2375 insertions(+), 991 deletions(-) + +commit af470cdb8d8cd81cb6032d90b74cb848dd569d1b +Author: Ray Wang +Date: Wed Sep 10 11:02:59 2008 +0200 + + po: update zh_CN.po (from translationproject.org) + + po/zh_CN.po | 394 ++++++++++++++++++++++++++++------------------------------- + 1 files changed, 187 insertions(+), 207 deletions(-) + +commit c147882de248158dba60d278a8ad5447cbbdd3e8 +Author: Clytie Siddall +Date: Wed Sep 10 11:02:59 2008 +0200 + + po: update vi.po (from translationproject.org) + + po/vi.po | 628 ++++++++++++++++++-------------------------------------------- + 1 files changed, 177 insertions(+), 451 deletions(-) + +commit 59d683e572c05a4ecc36da63c6c04ec7a73b6efc +Author: Benno Schulenberg +Date: Wed Sep 10 11:02:59 2008 +0200 + + po: update nl.po (from translationproject.org) + + po/nl.po | 649 +++++++++++++++++++------------------------------------------- + 1 files changed, 193 insertions(+), 456 deletions(-) + +commit 2da935df47b5b9c7571383366da4e3b82352752d +Author: Arif E. Nugroho +Date: Wed Sep 10 11:02:59 2008 +0200 + + po: update id.po (from translationproject.org) + + po/id.po | 1598 ++++++++++++++++++++++++++------------------------------------ + 1 files changed, 665 insertions(+), 933 deletions(-) + +commit fc5ac303f066040d737e1e4b9033fb6b3036b5fc +Author: Lauri Nurmi +Date: Wed Sep 10 11:02:59 2008 +0200 + + po: update fi.po (from translationproject.org) + + po/fi.po | 873 ++++++++++++++++++++++---------------------------------------- + 1 files changed, 314 insertions(+), 559 deletions(-) + +commit 0bd69ee4a38b56e5b82b98d77b00c4b4146bf60d +Author: Petr Pisar +Date: Wed Sep 10 11:02:59 2008 +0200 + + po: update cs.po (from translationproject.org) + + po/cs.po | 544 +++++++++++++++++++------------------------------------------- + 1 files changed, 167 insertions(+), 377 deletions(-) diff --git a/v2.14.1-ReleaseNotes b/v2.14.1-ReleaseNotes new file mode 100644 index 0000000..ad0ea6f --- /dev/null +++ b/v2.14.1-ReleaseNotes @@ -0,0 +1,49 @@ +Util-linux-ng 2.14.1 Release Notes (??-Aug-2008) +================================================ + +ChangeLog between v2.14 and v2.14.1 +----------------------------------- + + For more details see ChangeLog files at: + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/ + +build-sys: + - cleanup sys-utils/Makefile.am [Karel Zak] + - fix dmesg.1 installation [Karel Zak] + - release++ (v2.14.1-rc1) [Karel Zak] + - tgets is not in ncurses but in tinfo [Arkadiusz Miskiewicz] +docs: + - update AUTHORS file [Karel Zak] + - update v2.14.1 ReleaseNotes [Karel Zak] +fdisk: + - don't check for GPT when asked for disk size only [Karel Zak] +hwclock: + - omit warning about drift if --noadjfile given [Matthias Koenig] + - unshadow a diagnostic printf [Kalev Soikonen] +ipcs: + - ungettextize the spacing of the table headers [Benno Schulenberg] +losetup: + - remove unnecessary minor number check [Karel Zak] +mount: + - add docs about utf8=0 for vfat [Karel Zak] + - add fallback for versionsort() [Karel Zak] + - add info about tz=UTC option for FAT to mount.8 [Karel Zak] + - add norealtime to mount.8 [Karel Zak] +po: + - add zh_CN.po (from translationproject.org) [Ray Wang] + - merge changes [Karel Zak] + - update cs.po (from translationproject.org) [Petr Pisar] + - update nl.po (from translationproject.org) [Benno Schulenberg] +rtcwake: + - cleanup return codes [Karel Zak] + - prefer RTC_WKALM_SET over RTC_ALM_SET [Gabriel Burt] +scriptreplay: + - new implementation is out-of-sync [Karel Zak] +selinux: + - is_selinux_enabled() returns 0, 1 and -1 [Karel Zak] +sfdisk: + - print version should end with a newline [Denis ChengRq] +umount: + - improve "-d" option for autoclear loops [Karel Zak] +write: + - doesn't check for tty group [Karel Zak] From e497322978d3cfdeba3a015153dbae39f3688d29f8ddd9e19ec19272a7cdc4f8 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 24 Sep 2008 15:39:02 +0000 Subject: [PATCH 062/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=62 --- util-linux-2.14.1-hypervisor_detection.patch | 250 +++++++++++++++++++ util-linux.changes | 7 + util-linux.spec | 12 +- 3 files changed, 267 insertions(+), 2 deletions(-) create mode 100644 util-linux-2.14.1-hypervisor_detection.patch diff --git a/util-linux-2.14.1-hypervisor_detection.patch b/util-linux-2.14.1-hypervisor_detection.patch new file mode 100644 index 0000000..6ac8c11 --- /dev/null +++ b/util-linux-2.14.1-hypervisor_detection.patch @@ -0,0 +1,250 @@ +Index: util-linux-ng-2.14.1/sys-utils/hypervisor.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ util-linux-ng-2.14.1/sys-utils/hypervisor.c 2008-09-24 12:21:05.000000000 +0200 +@@ -0,0 +1,169 @@ ++/* Detect the presence of a hypervisor ++ * Copyright (C) 2008 Novell, Inc. ++ * Author: Ky Srinivasan ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public ++ * License along with this program; if not, write to the Free ++ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++static int opt_quiet = 0; ++ ++struct option options[] = { ++ { "help", no_argument, NULL, 'h' }, ++ { "quiet", no_argument, NULL, 'q' }, ++ { NULL, 9, NULL, 0 } ++}; ++ ++enum { ++ HYPER_NONE = 0, ++ HYPER_XEN, ++ HYPER_KVM, ++ HYPER_MSHV, ++ HYPER_MSHV_XENPV ++}; ++ ++static inline void cpuid(unsigned int op, ++ unsigned int *eax, unsigned int *ebx, ++ unsigned int *ecx, unsigned int *edx) ++{ ++ __asm__("cpuid" ++ : "=a" (*eax), ++ "=b" (*ebx), ++ "=c" (*ecx), ++ "=d" (*edx) ++ : "0" (op), "c"(0)); ++} ++ ++static int hypervisor(void) ++{ ++ unsigned int eax, ebx, ecx, edx; ++ char signature[13]; ++ int xen_pv =0; ++ ++ /* ++ * First check if we are running in a para-virtualized guest. ++ */ ++ if ((!access("/sys/hypervisor", F_OK) || ++ (!access("/proc/xen", F_OK)))) { ++ /* ++ * For now we are only dealing with para-virtualized ++ * Linux guests (para-virtualized on Xen). So, this must be ++ * Xen based. ++ */ ++ xen_pv = 1; ++ } ++ cpuid(0x40000000, &eax, &ebx, &ecx, &edx); ++ *(unsigned int*)(signature + 0) = ebx; ++ *(unsigned int*)(signature + 4) = ecx; ++ *(unsigned int*)(signature + 8) = edx; ++ signature[12] = 0; ++ ++ if ((!strncmp("XenVMMXenVMM", signature, 12) || (xen_pv))) ++ return HYPER_XEN; ++ if (!strncmp("KVMKVMKVM", signature, 9)) ++ return HYPER_KVM; ++ if (!strncmp("Microsoft Hv", signature, 12)) { ++ if (xen_pv) ++ return HYPER_MSHV_XENPV; ++ else ++ return HYPER_MSHV; ++ } ++ ++ return 0; ++} ++ ++static void help(void) ++{ ++ printf("Usage: hypervisor [OPTION]\n"); ++ printf("Detects the presence/absence of a hypervisor.\n\n"); ++ printf("Options:\n"); ++ printf(" -h, --help\tShow this message and exit.\n"); ++ printf(" -q, --quiet\tDo not show output message.\n\n"); ++ printf("Exit status:\n"); ++ printf(" 0\tNo hypervisor detected.\n"); ++ printf(" 1\tXen detected.\n"); ++ printf(" 2\tKVM detected.\n"); ++ printf(" 3\tHyperV detected.\n"); ++ printf(" 4\tHyperV emulating Xen detected.\n"); ++} ++ ++ ++/* ++ * Program to determine if we are being hosted on the hypervisor. ++ * If the exit status is 0; we are running on bare hardware. The details of ++ * non-zero return values are as follows: ++ * ++ * 0: No hypervisor (running on bare hardware) ++ * 1: Xen is the hypervisor ++ * 2: KVM is the hypervisor ++ * 3: Veridian ++ * 4: Veridian hypervisor emulating Xen. ++ * TODO: VmWare Detection. ++ */ ++int main(int argc, char **argv) ++{ ++ int option_index, c; ++ int ret; ++ ++ while (1) { ++ c = getopt_long(argc, argv, "hq", options, &option_index); ++ if (c == -1) ++ break; ++ ++ switch (c) { ++ case 'h': ++ help(); ++ exit(EXIT_SUCCESS); ++ case 'q': ++ opt_quiet = 1; ++ break; ++ default: ++ break; ++ } ++ } ++ ++ ret = hypervisor(); ++ ++ if (!opt_quiet) { ++ switch (ret) { ++ case HYPER_NONE: ++ printf("No"); ++ break; ++ case HYPER_XEN: ++ printf("Xen"); ++ break; ++ case HYPER_KVM: ++ printf("KVM"); ++ break; ++ case HYPER_MSHV: ++ case HYPER_MSHV_XENPV: ++ printf("Microsoft"); ++ break; ++ default: ++ break; ++ } ++ printf(" Hypervisor found\n"); ++ } ++ ++ return ret; ++} ++ +Index: util-linux-ng-2.14.1/sys-utils/Makefile.am +=================================================================== +--- util-linux-ng-2.14.1.orig/sys-utils/Makefile.am 2008-09-10 11:02:43.000000000 +0200 ++++ util-linux-ng-2.14.1/sys-utils/Makefile.am 2008-09-24 13:03:21.000000000 +0200 +@@ -35,6 +35,11 @@ RDEV_LINKS += ramsize vidmode rootflags + dist_man_MANS += rdev.8 + endif + ++if BUILD_HYPERVISOR ++bin_PROGRAMS += hypervisor ++dist_man_MANS += hypervisor.1 ++endif ++ + SETARCH_LINKS = linux32 linux64 + + if ARCH_S390 +Index: util-linux-ng-2.14.1/configure.ac +=================================================================== +--- util-linux-ng-2.14.1.orig/configure.ac 2008-09-10 12:13:27.000000000 +0200 ++++ util-linux-ng-2.14.1/configure.ac 2008-09-24 11:43:15.000000000 +0200 +@@ -471,6 +471,12 @@ AC_ARG_ENABLE([elvtune], + ) + AM_CONDITIONAL(BUILD_ELVTUNE, test "x$enable_elvtune" = xyes) + ++AC_ARG_ENABLE([hypervisor], ++ AS_HELP_STRING([--enable-hypervisor], [build hypervisor]), ++ [], enable_hypervisor=no ++) ++AM_CONDITIONAL(BUILD_HYPERVISOR, test "x$enable_hypervisor" = xyes) ++ + + AC_ARG_ENABLE([init], + AS_HELP_STRING([--enable-init], [build simpleinit, shutdown, initctl]), +Index: util-linux-ng-2.14.1/sys-utils/hypervisor.1 +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ util-linux-ng-2.14.1/sys-utils/hypervisor.1 2008-09-24 13:06:24.000000000 +0200 +@@ -0,0 +1,38 @@ ++.TH hypervisor 1 "September 2008" "" "User Commands" ++.SH NAME ++hypervisor \- detect presence of a hypervisor ++.SH SYNOPSIS ++.B hypervisor ++[\fIOPTION\fR] ++.SH DESCRIPTION ++Detects the presence/absence of a hypervisor. ++.SH OPTIONS ++.TP ++\fB\-h\fR, \fB\-\-help\fR ++Show this message and exit. ++.TP ++\fB\-q\fR, \fB\-\-quiet\fR ++Do not show output message. ++.SH EXIT CODES ++.TP ++0 ++No hypervisor detected. ++.TP ++1 ++Xen detected. ++.TP ++2 ++KVM detected. ++.TP ++3 ++HyperV detected. ++.TP ++4 ++HyperV emulating Xen detected. ++.SH AUTHOR ++Ky Srinivasan ++.SH COPYRIGHT ++This is free software. You may redistribute copies of it under the terms ++of the GNU General Public License . ++There is NO WARRANTY, to the extent permitted by law. ++ diff --git a/util-linux.changes b/util-linux.changes index 7076ccc..4320953 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Sep 24 11:28:07 CEST 2008 - mkoenig@suse.de + +- add new tool /bin/hypervisor for x86, x86_64 + from Ky Srinivasan + to detect the presence of a hypervisor [fate#303051] + ------------------------------------------------------------------- Wed Sep 10 15:58:52 CEST 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index b4bc546..c0de37b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -30,7 +30,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14.1 -Release: 1 +Release: 2 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -71,6 +71,7 @@ Patch4: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch # Patch5: util-linux-2.13.1-fdisk_cfdisk_yesno.patch Patch7: util-linux-2.14-mount_retry_on_nomedium.patch +Patch8: util-linux-2.14.1-hypervisor_detection.patch # crypto patch Patch20: util-linux-mount_losetup_crypto.patch ## @@ -114,6 +115,7 @@ Authors: %patch4 -p1 %patch5 -p1 %patch7 -p1 +%patch8 -p1 %patch20 -p1 cp %{SOURCE7} %{SOURCE8} . # @@ -183,7 +185,7 @@ CFLAGS=-DCONFIG_SMP # architecture dependent builds BUILD_ENABLE= %ifarch %ix86 x86_64 -BUILD_ENABLE="--enable-rdev" +BUILD_ENABLE="--enable-rdev --enable-hypervisor" %endif # Use autogen, when building from git tree autoreconf -fi @@ -534,10 +536,12 @@ fi /sbin/sfdisk %endif %ifarch %ix86 x86_64 +/bin/hypervisor /usr/sbin/ramsize /usr/sbin/rdev /usr/sbin/rootflags /usr/sbin/vidmode +%{_mandir}/man1/hypervisor.1.gz %{_mandir}/man8/ramsize.8.gz %{_mandir}/man8/rdev.8.gz %{_mandir}/man8/rootflags.8.gz @@ -579,6 +583,10 @@ fi #%endif %changelog +* Wed Sep 24 2008 mkoenig@suse.de +- add new tool /bin/hypervisor for x86, x86_64 + from Ky Srinivasan + to detect the presence of a hypervisor [fate#303051] * Wed Sep 10 2008 mkoenig@suse.de - update to version 2.14.1 * fdisk: don't check for GPT when asked for disk size only From a42c2690a3de2b5ddffe3cca0ce9a2c293f4f25ff001fc92707bb7e75888c44b Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 8 Oct 2008 16:42:45 +0000 Subject: [PATCH 063/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=63 --- util-linux-2.14.1-hypervisor_detection.patch | 250 ------- util-linux-2.14.1-lscpu.patch | 630 ++++++++++++++++++ ....14.1-lscpu_add_hypervisor_vendor_id.patch | 196 ++++++ util-linux-2.14.1-lscpu_sysroot_option.patch | 267 ++++++++ util-linux.changes | 8 + util-linux.spec | 19 +- 6 files changed, 1115 insertions(+), 255 deletions(-) delete mode 100644 util-linux-2.14.1-hypervisor_detection.patch create mode 100644 util-linux-2.14.1-lscpu.patch create mode 100644 util-linux-2.14.1-lscpu_add_hypervisor_vendor_id.patch create mode 100644 util-linux-2.14.1-lscpu_sysroot_option.patch diff --git a/util-linux-2.14.1-hypervisor_detection.patch b/util-linux-2.14.1-hypervisor_detection.patch deleted file mode 100644 index 6ac8c11..0000000 --- a/util-linux-2.14.1-hypervisor_detection.patch +++ /dev/null @@ -1,250 +0,0 @@ -Index: util-linux-ng-2.14.1/sys-utils/hypervisor.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14.1/sys-utils/hypervisor.c 2008-09-24 12:21:05.000000000 +0200 -@@ -0,0 +1,169 @@ -+/* Detect the presence of a hypervisor -+ * Copyright (C) 2008 Novell, Inc. -+ * Author: Ky Srinivasan -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public -+ * License along with this program; if not, write to the Free -+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -+ * Boston, MA 02110-1301, USA. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+static int opt_quiet = 0; -+ -+struct option options[] = { -+ { "help", no_argument, NULL, 'h' }, -+ { "quiet", no_argument, NULL, 'q' }, -+ { NULL, 9, NULL, 0 } -+}; -+ -+enum { -+ HYPER_NONE = 0, -+ HYPER_XEN, -+ HYPER_KVM, -+ HYPER_MSHV, -+ HYPER_MSHV_XENPV -+}; -+ -+static inline void cpuid(unsigned int op, -+ unsigned int *eax, unsigned int *ebx, -+ unsigned int *ecx, unsigned int *edx) -+{ -+ __asm__("cpuid" -+ : "=a" (*eax), -+ "=b" (*ebx), -+ "=c" (*ecx), -+ "=d" (*edx) -+ : "0" (op), "c"(0)); -+} -+ -+static int hypervisor(void) -+{ -+ unsigned int eax, ebx, ecx, edx; -+ char signature[13]; -+ int xen_pv =0; -+ -+ /* -+ * First check if we are running in a para-virtualized guest. -+ */ -+ if ((!access("/sys/hypervisor", F_OK) || -+ (!access("/proc/xen", F_OK)))) { -+ /* -+ * For now we are only dealing with para-virtualized -+ * Linux guests (para-virtualized on Xen). So, this must be -+ * Xen based. -+ */ -+ xen_pv = 1; -+ } -+ cpuid(0x40000000, &eax, &ebx, &ecx, &edx); -+ *(unsigned int*)(signature + 0) = ebx; -+ *(unsigned int*)(signature + 4) = ecx; -+ *(unsigned int*)(signature + 8) = edx; -+ signature[12] = 0; -+ -+ if ((!strncmp("XenVMMXenVMM", signature, 12) || (xen_pv))) -+ return HYPER_XEN; -+ if (!strncmp("KVMKVMKVM", signature, 9)) -+ return HYPER_KVM; -+ if (!strncmp("Microsoft Hv", signature, 12)) { -+ if (xen_pv) -+ return HYPER_MSHV_XENPV; -+ else -+ return HYPER_MSHV; -+ } -+ -+ return 0; -+} -+ -+static void help(void) -+{ -+ printf("Usage: hypervisor [OPTION]\n"); -+ printf("Detects the presence/absence of a hypervisor.\n\n"); -+ printf("Options:\n"); -+ printf(" -h, --help\tShow this message and exit.\n"); -+ printf(" -q, --quiet\tDo not show output message.\n\n"); -+ printf("Exit status:\n"); -+ printf(" 0\tNo hypervisor detected.\n"); -+ printf(" 1\tXen detected.\n"); -+ printf(" 2\tKVM detected.\n"); -+ printf(" 3\tHyperV detected.\n"); -+ printf(" 4\tHyperV emulating Xen detected.\n"); -+} -+ -+ -+/* -+ * Program to determine if we are being hosted on the hypervisor. -+ * If the exit status is 0; we are running on bare hardware. The details of -+ * non-zero return values are as follows: -+ * -+ * 0: No hypervisor (running on bare hardware) -+ * 1: Xen is the hypervisor -+ * 2: KVM is the hypervisor -+ * 3: Veridian -+ * 4: Veridian hypervisor emulating Xen. -+ * TODO: VmWare Detection. -+ */ -+int main(int argc, char **argv) -+{ -+ int option_index, c; -+ int ret; -+ -+ while (1) { -+ c = getopt_long(argc, argv, "hq", options, &option_index); -+ if (c == -1) -+ break; -+ -+ switch (c) { -+ case 'h': -+ help(); -+ exit(EXIT_SUCCESS); -+ case 'q': -+ opt_quiet = 1; -+ break; -+ default: -+ break; -+ } -+ } -+ -+ ret = hypervisor(); -+ -+ if (!opt_quiet) { -+ switch (ret) { -+ case HYPER_NONE: -+ printf("No"); -+ break; -+ case HYPER_XEN: -+ printf("Xen"); -+ break; -+ case HYPER_KVM: -+ printf("KVM"); -+ break; -+ case HYPER_MSHV: -+ case HYPER_MSHV_XENPV: -+ printf("Microsoft"); -+ break; -+ default: -+ break; -+ } -+ printf(" Hypervisor found\n"); -+ } -+ -+ return ret; -+} -+ -Index: util-linux-ng-2.14.1/sys-utils/Makefile.am -=================================================================== ---- util-linux-ng-2.14.1.orig/sys-utils/Makefile.am 2008-09-10 11:02:43.000000000 +0200 -+++ util-linux-ng-2.14.1/sys-utils/Makefile.am 2008-09-24 13:03:21.000000000 +0200 -@@ -35,6 +35,11 @@ RDEV_LINKS += ramsize vidmode rootflags - dist_man_MANS += rdev.8 - endif - -+if BUILD_HYPERVISOR -+bin_PROGRAMS += hypervisor -+dist_man_MANS += hypervisor.1 -+endif -+ - SETARCH_LINKS = linux32 linux64 - - if ARCH_S390 -Index: util-linux-ng-2.14.1/configure.ac -=================================================================== ---- util-linux-ng-2.14.1.orig/configure.ac 2008-09-10 12:13:27.000000000 +0200 -+++ util-linux-ng-2.14.1/configure.ac 2008-09-24 11:43:15.000000000 +0200 -@@ -471,6 +471,12 @@ AC_ARG_ENABLE([elvtune], - ) - AM_CONDITIONAL(BUILD_ELVTUNE, test "x$enable_elvtune" = xyes) - -+AC_ARG_ENABLE([hypervisor], -+ AS_HELP_STRING([--enable-hypervisor], [build hypervisor]), -+ [], enable_hypervisor=no -+) -+AM_CONDITIONAL(BUILD_HYPERVISOR, test "x$enable_hypervisor" = xyes) -+ - - AC_ARG_ENABLE([init], - AS_HELP_STRING([--enable-init], [build simpleinit, shutdown, initctl]), -Index: util-linux-ng-2.14.1/sys-utils/hypervisor.1 -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14.1/sys-utils/hypervisor.1 2008-09-24 13:06:24.000000000 +0200 -@@ -0,0 +1,38 @@ -+.TH hypervisor 1 "September 2008" "" "User Commands" -+.SH NAME -+hypervisor \- detect presence of a hypervisor -+.SH SYNOPSIS -+.B hypervisor -+[\fIOPTION\fR] -+.SH DESCRIPTION -+Detects the presence/absence of a hypervisor. -+.SH OPTIONS -+.TP -+\fB\-h\fR, \fB\-\-help\fR -+Show this message and exit. -+.TP -+\fB\-q\fR, \fB\-\-quiet\fR -+Do not show output message. -+.SH EXIT CODES -+.TP -+0 -+No hypervisor detected. -+.TP -+1 -+Xen detected. -+.TP -+2 -+KVM detected. -+.TP -+3 -+HyperV detected. -+.TP -+4 -+HyperV emulating Xen detected. -+.SH AUTHOR -+Ky Srinivasan -+.SH COPYRIGHT -+This is free software. You may redistribute copies of it under the terms -+of the GNU General Public License . -+There is NO WARRANTY, to the extent permitted by law. -+ diff --git a/util-linux-2.14.1-lscpu.patch b/util-linux-2.14.1-lscpu.patch new file mode 100644 index 0000000..77392d3 --- /dev/null +++ b/util-linux-2.14.1-lscpu.patch @@ -0,0 +1,630 @@ +commit 5dd7507c18fa3d739266aeda4847be41e0613fad +Author: Cai Qian +Date: Thu Jul 17 14:19:40 2008 +0200 + + lscpu: new command + + Add a lscpu(1) utility program. + + [kzak@redhat.com: + - indent by linux-2.6/scripts/Lindent + - add lscpu.{c,1} to sys-utils/Makefile.am + - add NLS suport + - complete code refactoring + ] + + Co-Author: Karel Zak + Signed-off-by: Cai Qian + Signed-off-by: Karel Zak + +Index: util-linux-ng-2.14.1/README.licensing +=================================================================== +--- util-linux-ng-2.14.1.orig/README.licensing 2008-09-10 11:02:42.000000000 +0200 ++++ util-linux-ng-2.14.1/README.licensing 2008-10-01 17:18:31.000000000 +0200 +@@ -2,6 +2,8 @@ + The project utils-linux-ng doesn't use same license for all code. There are + code with: + ++ * GPLv3+ (GNU General Public License version 3, or any later version) ++ + * GPLv2+ (GNU General Public License version 2, or any later version) + + * GPLv2 (GNU General Public License version 2) +Index: util-linux-ng-2.14.1/po/POTFILES.in +=================================================================== +--- util-linux-ng-2.14.1.orig/po/POTFILES.in 2008-09-10 11:02:43.000000000 +0200 ++++ util-linux-ng-2.14.1/po/POTFILES.in 2008-10-01 17:18:31.000000000 +0200 +@@ -98,6 +98,7 @@ sys-utils/flock.c + sys-utils/ipcrm.c + sys-utils/ipcs.c + sys-utils/ldattach.c ++sys-utils/lscpu.c + sys-utils/rdev.c + sys-utils/readprofile.c + sys-utils/renice.c +Index: util-linux-ng-2.14.1/sys-utils/Makefile.am +=================================================================== +--- util-linux-ng-2.14.1.orig/sys-utils/Makefile.am 2008-09-10 11:02:43.000000000 +0200 ++++ util-linux-ng-2.14.1/sys-utils/Makefile.am 2008-10-01 17:19:50.000000000 +0200 +@@ -11,11 +11,11 @@ dist_man_MANS = flock.1 ipcrm.1 ipcs.1 r + if LINUX + bin_PROGRAMS += dmesg + sbin_PROGRAMS += ctrlaltdel +-usrbinexec_PROGRAMS += cytune setarch ++usrbinexec_PROGRAMS += cytune setarch lscpu + usrsbinexec_PROGRAMS += tunelp rtcwake + + dist_man_MANS += dmesg.1 ctrlaltdel.8 cytune.8 setarch.8 \ +- tunelp.8 rtcwake.8 ++ tunelp.8 rtcwake.8 lscpu.1 + endif + + cytune_SOURCES = cytune.c cyclades.h +Index: util-linux-ng-2.14.1/sys-utils/lscpu.1 +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ util-linux-ng-2.14.1/sys-utils/lscpu.1 2008-10-01 17:18:31.000000000 +0200 +@@ -0,0 +1,29 @@ ++.\" Process this file with ++.\" groff -man -Tascii lscpu.1 ++.\" ++.TH LSCPU 1 "JULY 2008" Linux "User Manuals" ++.SH NAME ++lscpu \- CPU architecture information helper ++.SH SYNOPSIS ++.B lscpu [-hp] ++.SH DESCRIPTION ++.B lscpu ++gathers CPU architecture information like number of CPUs, threads, ++cores, sockets, NUMA nodes, information about CPU caches, CPU family, ++model and stepping from sysfs and /proc/cpuinfo, and prints it in ++human-readable format. Alternatively, it can print out in parsable ++format including how different caches are shared by different CPUs, ++which can also be fed to other programs. ++.SH OPTIONS ++.IP -h, --help ++Print a help message. ++.IP -p, --parse ++Print out in parsable instead of printable format. ++.SH BUGS ++The program at the moment does not handle the system installed with ++different types of physical processors. ++.SH AUTHOR ++Cai Qian ++.SH AVAILABILITY ++The setarch command is part of the util-linux-ng package and is available from ++ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/. +Index: util-linux-ng-2.14.1/sys-utils/lscpu.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ util-linux-ng-2.14.1/sys-utils/lscpu.c 2008-10-01 17:18:31.000000000 +0200 +@@ -0,0 +1,529 @@ ++/* ++ * lscpu - CPU architecture information helper ++ * ++ * Copyright (C) 2008 Cai Qian ++ * Copyright (C) 2008 Karel Zak ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "nls.h" ++ ++#define CACHE_MAX 100 ++ ++/* /sys paths */ ++#define _PATH_SYS_SYSTEM "/sys/devices/system" ++#define _PATH_SYS_CPU0 _PATH_SYS_SYSTEM "/cpu/cpu0" ++#define _PATH_PROC_XENCAP "/proc/xen/capabilities" ++#define _PATH_PROC_CPUINFO "/proc/cpuinfo" ++ ++int have_topology; ++int have_cache; ++int have_node; ++ ++/* CPU(s) description */ ++struct cpu_decs { ++ /* counters */ ++ int ct_cpu; ++ int ct_thread; ++ int ct_core; ++ int ct_socket; ++ int ct_node; ++ int ct_cache; ++ ++ /* who is who */ ++ char *arch; ++ char *vendor; ++ char *family; ++ char *model; ++ ++ /* caches */ ++ char *caname[CACHE_MAX]; ++ char *casize[CACHE_MAX]; ++ int camap[CACHE_MAX]; ++ ++ /* misc */ ++ char *mhz; ++ char *stepping; ++ char *flags; ++ ++ /* NUMA */ ++ int *nodecpu; ++}; ++ ++char pathbuf[PATH_MAX]; ++ ++static void path_scanstr(char *result, const char *path, ...) ++ __attribute__ ((__format__ (__printf__, 2, 3))); ++static int path_exist(const char *path, ...) ++ __attribute__ ((__format__ (__printf__, 1, 2))); ++static int path_sibling(const char *path, ...) ++ __attribute__ ((__format__ (__printf__, 1, 2))); ++ ++static FILE * ++xfopen(const char *path, const char *mode) ++{ ++ FILE *fd = fopen(path, mode); ++ if (!fd) ++ err(EXIT_FAILURE, _("error: %s"), path); ++ return fd; ++} ++ ++static FILE * ++path_vfopen(const char *mode, const char *path, va_list ap) ++{ ++ vsnprintf(pathbuf, sizeof(pathbuf), path, ap); ++ return xfopen(pathbuf, mode); ++} ++ ++static void ++path_scanstr(char *result, const char *path, ...) ++{ ++ FILE *fd; ++ va_list ap; ++ ++ va_start(ap, path); ++ fd = path_vfopen("r", path, ap); ++ va_end(ap); ++ ++ if (fscanf(fd, "%s", result) != 1) { ++ if (ferror(fd)) ++ err(EXIT_FAILURE, _("error: %s"), pathbuf); ++ else ++ errx(EXIT_FAILURE, _("error parse: %s"), pathbuf); ++ } ++ fclose(fd); ++} ++ ++static int ++path_exist(const char *path, ...) ++{ ++ va_list ap; ++ ++ va_start(ap, path); ++ vsnprintf(pathbuf, sizeof(pathbuf), path, ap); ++ va_end(ap); ++ ++ return access(pathbuf, F_OK) == 0; ++} ++ ++char * ++xstrdup(const char *str) ++{ ++ char *s = strdup(str); ++ if (!s) ++ err(EXIT_FAILURE, _("error: strdup failed")); ++ return s; ++} ++ ++/* count the set bit in a mapping file */ ++static int ++path_sibling(const char *path, ...) ++{ ++ int c, n; ++ int result = 0; ++ char s[2]; ++ FILE *fp; ++ va_list ap; ++ ++ va_start(ap, path); ++ fp = path_vfopen("r", path, ap); ++ va_end(ap); ++ ++ while ((c = fgetc(fp)) != EOF) { ++ if (isxdigit(c)) { ++ s[0] = c; ++ s[1] = '\0'; ++ for (n = strtol(s, NULL, 16); n > 0; n /= 2) { ++ if (n % 2) ++ result++; ++ } ++ } ++ } ++ fclose(fp); ++ ++ return result; ++} ++ ++/* Lookup a pattern and get the value from cpuinfo. ++ * Format is: ++ * ++ * " : " ++ */ ++int lookup(char *line, char *pattern, char **value) ++{ ++ char *p, *v; ++ int len = strlen(pattern); ++ ++ if (!*line) ++ return 0; ++ ++ /* pattern */ ++ if (strncmp(line, pattern, len)) ++ return 0; ++ ++ /* white spaces */ ++ for (p = line + len; isspace(*p); p++); ++ ++ /* separator */ ++ if (*p != ':') ++ return 0; ++ ++ /* white spaces */ ++ for (++p; isspace(*p); p++); ++ ++ /* value */ ++ if (!*p) ++ return 0; ++ v = p; ++ ++ /* end of value */ ++ len = strlen(line) - 1; ++ for (p = line + len; isspace(*(p-1)); p--); ++ *p = '\0'; ++ ++ *value = xstrdup(v); ++ return 1; ++} ++ ++static void ++read_basicinfo(struct cpu_decs *cpu) ++{ ++ FILE *fp = xfopen(_PATH_PROC_CPUINFO, "r"); ++ char buf[BUFSIZ]; ++ struct utsname utsbuf; ++ ++ /* architecture */ ++ if (uname(&utsbuf) == -1) ++ err(EXIT_FAILURE, _("error: uname failed")); ++ cpu->arch = xstrdup(utsbuf.machine); ++ ++ /* count CPU(s) */ ++ while(path_exist(_PATH_SYS_SYSTEM "/cpu/cpu%d", cpu->ct_cpu)) ++ cpu->ct_cpu++; ++ ++ /* details */ ++ while (fgets(buf, sizeof(buf), fp) != NULL) { ++ /* IA64 */ ++ if (lookup(buf, "vendor", &cpu->vendor)) ; ++ else if (lookup(buf, "vendor_id", &cpu->vendor)) ; ++ /* IA64 */ ++ else if (lookup(buf, "family", &cpu->family)) ; ++ else if (lookup(buf, "cpu family", &cpu->family)) ; ++ else if (lookup(buf, "model", &cpu->model)) ; ++ else if (lookup(buf, "stepping", &cpu->stepping)) ; ++ else if (lookup(buf, "cpu MHz", &cpu->mhz)) ; ++ else if (lookup(buf, "flags", &cpu->flags)) ; ++ else ++ continue; ++ } ++ fclose(fp); ++} ++ ++static void ++read_topology(struct cpu_decs *cpu) ++{ ++ /* number of threads */ ++ cpu->ct_thread = path_sibling( ++ _PATH_SYS_CPU0 "/topology/thread_siblings"); ++ ++ /* number of cores */ ++ cpu->ct_core = path_sibling( ++ _PATH_SYS_CPU0 "/topology/core_siblings") ++ / cpu->ct_thread; ++ ++ /* number of sockets */ ++ cpu->ct_socket = cpu->ct_cpu / cpu->ct_core / cpu->ct_thread; ++} ++ ++static void ++read_cache(struct cpu_decs *cpu) ++{ ++ char buf[256]; ++ DIR *dp; ++ struct dirent *dir; ++ int level, type; ++ ++ dp = opendir(_PATH_SYS_CPU0 "/cache"); ++ if (dp == NULL) ++ err(EXIT_FAILURE, _("error: %s"), _PATH_SYS_CPU0 "/cache"); ++ ++ while ((dir = readdir(dp)) != NULL) { ++ if (!strcmp(dir->d_name, ".") ++ || !strcmp(dir->d_name, "..")) ++ continue; ++ ++ /* cache type */ ++ path_scanstr(buf, _PATH_SYS_CPU0 "/cache/%s/type", dir->d_name); ++ if (!strcmp(buf, "Data")) ++ type = 'd'; ++ else if (!strcmp(buf, "Instruction")) ++ type = 'i'; ++ else ++ type = 0; ++ ++ /* cache level */ ++ path_scanstr(buf, _PATH_SYS_CPU0 "/cache/%s/level", dir->d_name); ++ level = atoi(buf); ++ ++ if (type) ++ snprintf(buf, sizeof(buf), "L%d%c", level, type); ++ else ++ snprintf(buf, sizeof(buf), "L%d", level); ++ ++ cpu->caname[cpu->ct_cache] = xstrdup(buf); ++ ++ /* cache size */ ++ path_scanstr(buf, _PATH_SYS_CPU0 "/cache/%s/size", dir->d_name); ++ cpu->casize[cpu->ct_cache] = xstrdup(buf); ++ ++ /* information about how CPUs share different caches */ ++ cpu->camap[cpu->ct_cache] = path_sibling( ++ _PATH_SYS_CPU0 "/cache/%s/shared_cpu_map", ++ dir->d_name); ++ cpu->ct_cache++; ++ } ++} ++ ++static void ++read_nodes(struct cpu_decs *cpu) ++{ ++ int i; ++ ++ /* number of NUMA node */ ++ while (path_exist(_PATH_SYS_SYSTEM "/node/node%d", cpu->ct_node)) ++ cpu->ct_node++; ++ ++ cpu->nodecpu = (int *) malloc(cpu->ct_node * sizeof(int)); ++ if (!cpu->nodecpu) ++ err(EXIT_FAILURE, _("error: malloc failed")); ++ ++ /* information about how nodes share different CPUs */ ++ for (i = 0; i < cpu->ct_node; i++) ++ cpu->nodecpu[i] = path_sibling( ++ _PATH_SYS_SYSTEM "/node/node%d/cpumap", ++ i); ++} ++ ++static void ++check_system(void) ++{ ++ FILE *fd; ++ char buf[256]; ++ ++ /* Dom0 Kernel gives wrong information. */ ++ fd = fopen(_PATH_PROC_XENCAP, "r"); ++ if (fd) { ++ if (fscanf(fd, "%s", buf) == 1 && !strcmp(buf, "control_d")) ++ errx(EXIT_FAILURE, ++ _("error: Dom0 Kernel is unsupported.")); ++ fclose(fd); ++ } ++ ++ /* Read through sysfs. */ ++ if (access(_PATH_SYS_SYSTEM, F_OK)) ++ errx(1, _("error: /sys filesystem is not accessable.")); ++ ++ if (!access(_PATH_SYS_SYSTEM "/node", F_OK)) ++ have_node = 1; ++ ++ if (!access(_PATH_SYS_CPU0 "/topology/thread_siblings", F_OK)) ++ have_topology = 1; ++ ++ if (!access(_PATH_SYS_CPU0 "/cache", F_OK)) ++ have_cache = 1; ++} ++ ++static void ++print_parsable(struct cpu_decs *cpu) ++{ ++ int i, j; ++ ++ puts( ++ "# The following is the parsable format, which can be fed to other\n" ++ "# programs. Each different item in every column has a unique ID\n" ++ "# starting from zero.\n" ++ "# CPU,Core,Socket,Node"); ++ ++ if (have_cache) { ++ /* separator between CPU topology and cache information */ ++ putchar(','); ++ ++ for (i = cpu->ct_cache - 1; i >= 0; i--) ++ printf(",%s", cpu->caname[i]); ++ } ++ putchar('\n'); ++ ++ for (i = 0; i < cpu->ct_cpu; i++) { ++ printf("%d", i); ++ ++ if (have_topology) ++ printf(",%d,%d", ++ i / cpu->ct_thread, ++ i / cpu->ct_core / cpu->ct_thread); ++ else ++ printf(",,"); ++ ++ if (have_node) { ++ int c = 0; ++ ++ for (j = 0; j < cpu->ct_node; j++) { ++ c += cpu->nodecpu[j]; ++ if (i < c) { ++ printf(",%d", j); ++ break; ++ } ++ } ++ } else ++ putchar(','); ++ ++ if (have_cache) { ++ putchar(','); ++ ++ for (j = cpu->ct_cache - 1; j >= 0; j--) { ++ /* If shared_cpu_map is 0, all CPUs share the same ++ cache. */ ++ if (cpu->camap[j] == 0) ++ cpu->camap[j] = cpu->ct_core * ++ cpu->ct_thread; ++ ++ printf(",%d", i / cpu->camap[j]); ++ } ++ } ++ putchar('\n'); ++ } ++} ++ ++ ++/* output formats " "*/ ++#define print_s(_key, _val) printf("%-23s%s\n", _key, _val) ++#define print_n(_key, _val) printf("%-23s%d\n", _key, _val) ++ ++static void ++print_readable(struct cpu_decs *cpu) ++{ ++ char buf[BUFSIZ]; ++ ++ print_s("Architecture:", cpu->arch); ++ print_n("CPU(s):", cpu->ct_cpu); ++ ++ if (have_topology) { ++ print_n(_("Thread(s) per core:"), cpu->ct_thread); ++ print_n(_("Core(s) per socket:"), cpu->ct_core); ++ print_n(_("CPU socket(s):"), cpu->ct_socket); ++ } ++ ++ if (have_node) ++ print_n(_("NUMA node(s):"), cpu->ct_node); ++ if (cpu->vendor) ++ print_s(_("Vendor ID:"), cpu->vendor); ++ if (cpu->family) ++ print_s(_("CPU family:"), cpu->family); ++ if (cpu->model) ++ print_s(_("Model:"), cpu->model); ++ if (cpu->stepping) ++ print_s(_("Stepping:"), cpu->stepping); ++ if (cpu->mhz) ++ print_s(_("CPU MHz:"), cpu->mhz); ++ if (cpu->flags) { ++ snprintf(buf, sizeof(buf), " %s ", cpu->flags); ++ if (strstr(buf, " svm ")) ++ print_s(_("Virtualization:"), "AMD-V"); ++ else if (strstr(buf, " vmx ")) ++ print_s(_("Virtualization:"), "VT-x"); ++ } ++ ++ if (have_cache) { ++ int i; ++ ++ for (i = cpu->ct_cache - 1; i >= 0; i--) { ++ snprintf(buf, sizeof(buf), ++ _("%s cache:"), cpu->caname[i]); ++ print_s(buf, cpu->casize[i]); ++ } ++ } ++} ++ ++void usage(int rc) ++{ ++ printf(_("Usage: %s [option]\n"), ++ program_invocation_short_name); ++ ++ puts(_( "CPU architecture information helper\n\n" ++ " -h, --help usage information\n" ++ " -p, --parse print out in parsable instead of printable format.\n")); ++ exit(rc); ++} ++ ++int main(int argc, char *argv[]) ++{ ++ struct cpu_decs _cpu, *cpu = &_cpu; ++ int parsable = 0, c; ++ ++ struct option longopts[] = { ++ { "help", no_argument, 0, 'h' }, ++ { "parse", no_argument, 0, 'p' }, ++ { NULL, 0, 0, 0 } ++ }; ++ ++ setlocale(LC_MESSAGES, ""); ++ bindtextdomain(PACKAGE, LOCALEDIR); ++ textdomain(PACKAGE); ++ ++ while((c = getopt_long(argc, argv, "hp", longopts, NULL)) != -1) { ++ switch (c) { ++ case 'h': ++ usage(EXIT_SUCCESS); ++ case 'p': ++ parsable = 1; ++ break; ++ default: ++ usage(EXIT_FAILURE); ++ } ++ } ++ ++ memset(cpu, 0, sizeof(*cpu)); ++ ++ check_system(); ++ ++ read_basicinfo(cpu); ++ ++ if (have_topology) ++ read_topology(cpu); ++ if (have_cache) ++ read_cache(cpu); ++ if (have_node) ++ read_nodes(cpu); ++ ++ /* Show time! */ ++ if (parsable) ++ print_parsable(cpu); ++ else ++ print_readable(cpu); ++ ++ return EXIT_FAILURE; ++} diff --git a/util-linux-2.14.1-lscpu_add_hypervisor_vendor_id.patch b/util-linux-2.14.1-lscpu_add_hypervisor_vendor_id.patch new file mode 100644 index 0000000..ff3960a --- /dev/null +++ b/util-linux-2.14.1-lscpu_add_hypervisor_vendor_id.patch @@ -0,0 +1,196 @@ +X-Gnus-Coding-System: -*- coding: utf-8; -*- + +On Mon, Sep 29, 2008 at 11:01:05PM +0200, Karel Zak wrote: +> On Mon, Sep 29, 2008 at 03:17:28PM +0200, Matthias Koenig wrote: +> > The tool has been written by Ky Srinivasan . +> +> Do we really need a new tool? IMHO the hypervisor Vendor ID should +> be exported by kernel in /sys or /proc -- or we can add this info to +> lscpu(1) or so. + + The (untested) patch below introduces a new fields "Hypervisor vendor + ID:" and "Para-Virtualized:" in lscpu(1). + + The "Hypervisor vendor ID:" field reports the raw ID, it means it works + for all hypervisors (the same logic like CPU "Vendor ID:"). + + I think this solution is a good compromise to avoid a new tool. + + (Note that lscpu(1) does not support XEN dom0 now. This problem will + be resolved ASAP.) + + Comments? + + Karel + +>From 5a8e8f8b28eb6ea4bdce27ed6629dfb4fb1665b5 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 1 Oct 2008 01:29:32 +0200 +Subject: [PATCH] lscpu: add Hypervisor vendor ID + +Signed-off-by: Karel Zak +--- + sys-utils/lscpu.c | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++-- + 1 files changed, 101 insertions(+), 5 deletions(-) + +diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c +index d6bb8b9..5f39ced 100644 +--- a/sys-utils/lscpu.c ++++ b/sys-utils/lscpu.c +@@ -38,7 +38,8 @@ + /* /sys paths */ + #define _PATH_SYS_SYSTEM "sys/devices/system" + #define _PATH_SYS_CPU0 _PATH_SYS_SYSTEM "/cpu/cpu0" +-#define _PATH_PROC_XENCAP "proc/xen/capabilities" ++#define _PATH_PROC_XEN "proc/xen" ++#define _PATH_PROC_XENCAP _PATH_PROC_XEN "/capabilities" + #define _PATH_PROC_CPUINFO "proc/cpuinfo" + + int have_topology; +@@ -67,6 +68,9 @@ struct cpu_desc { + char *vendor; + char *family; + char *model; ++ char *virtflag; /* virtualization flag (vmx, svm) */ ++ char *hvid; /* hypervisor vendor ID */ ++ int is_para; /* is paravirtualized ? */ + + /* caches */ + struct ca_desc cache[CACHE_MAX]; +@@ -246,9 +250,94 @@ read_basicinfo(struct cpu_desc *cpu) + else + continue; + } ++ ++ if (cpu->flags) { ++ snprintf(buf, sizeof(buf), " %s ", cpu->flags); ++ if (strstr(buf, " svm ")) ++ cpu->virtflag = strdup("svm"); ++ else if (strstr(buf, " vmx ")) ++ cpu->virtflag = strdup("vmx"); ++ } ++ + fclose(fp); + } + ++#if defined(__x86_64__) || defined(__i386__) ++ ++/* ++ * This CPUID leaf returns the information about the hypervisor. ++ * EAX : maximum input value for CPUID supported by the hypervisor. ++ * EBX, ECX, EDX : Hypervisor vendor ID signature. E.g. VMwareVMware. ++ */ ++#define HYPERVISOR_INFO_LEAF 0x40000000 ++ ++static inline void ++cpuid(unsigned int op, unsigned int *eax, unsigned int *ebx, ++ unsigned int *ecx, unsigned int *edx) ++{ ++ __asm__("cpuid" ++ : "=a" (*eax), ++ "=b" (*ebx), ++ "=c" (*ecx), ++ "=d" (*edx) ++ : "0" (op), "c"(0)); ++} ++ ++static void ++read_hypervisor_cpuid(struct cpu_desc *cpu) ++{ ++ unsigned int eax, ebx, ecx, edx; ++ char hyper_vendor_id[13]; ++ ++ memset(hyper_vendor_id, 0, sizeof(hyper_vendor_id)); ++ ++ cpuid(HYPERVISOR_INFO_LEAF, &eax, &ebx, &ecx, &edx); ++ memcpy(hyper_vendor_id + 0, &ebx, 4); ++ memcpy(hyper_vendor_id + 4, &ecx, 4); ++ memcpy(hyper_vendor_id + 8, &edx, 4); ++ hyper_vendor_id[12] = '\0'; ++ ++ if (hyper_vendor_id[0]) ++ cpu->hvid = strdup(hyper_vendor_id); ++} ++ ++#else /* ! __x86_64__ */ ++static void ++read_hypervisor_cpuid(struct cpu_desc *cpu) ++{ ++} ++#endif ++ ++static void ++read_hypervisor(struct cpu_desc *cpu) ++{ ++ read_hypervisor_cpuid(cpu); ++ ++ if (!cpu->hvid) { ++ /* fallback for non-x86 archs */ ++ ++ if (!access(_PATH_PROC_XEN, F_OK)) ++ /* XEN dom0 or domU */ ++ cpu->hvid = strdup("Xen"); ++ } ++ ++ if (!cpu->virtflag && cpu->hvid && !strncmp(cpu->hvid, "Xen", 3)) { ++ ++ FILE *fd = fopen(_PATH_PROC_XENCAP, "r"); ++ int dom0 = 0; ++ ++ if (fd) { ++ char buf[256]; ++ ++ if (fscanf(fd, "%s", buf) == 1 && ++ !strcmp(buf, "control_d")) ++ dom0 = 1; ++ fclose(fd); ++ } ++ cpu->is_para = !dom0; ++ } ++} ++ + static void + read_topology(struct cpu_desc *cpu) + { +@@ -344,6 +433,7 @@ check_system(void) + fd = fopen(_PATH_PROC_XENCAP, "r"); + if (fd) { + if (fscanf(fd, "%s", buf) == 1 && !strcmp(buf, "control_d")) ++ /* !!!!!!!! TODO */ + errx(EXIT_FAILURE, + _("error: Dom0 Kernel is unsupported.")); + fclose(fd); +@@ -455,13 +545,17 @@ print_readable(struct cpu_desc *cpu) + print_s(_("Stepping:"), cpu->stepping); + if (cpu->mhz) + print_s(_("CPU MHz:"), cpu->mhz); +- if (cpu->flags) { +- snprintf(buf, sizeof(buf), " %s ", cpu->flags); +- if (strstr(buf, " svm ")) ++ if (cpu->virtflag) { ++ if (!strcmp(cpu->virtflag, "svm")) + print_s(_("Virtualization:"), "AMD-V"); +- else if (strstr(buf, " vmx ")) ++ else if (!strcmp(cpu->virtflag, "vmx")) + print_s(_("Virtualization:"), "VT-x"); + } ++ if (cpu->hvid) { ++ print_s(_("Hypervisor vendor ID:"), cpu->hvid); ++ print_s(_("Para-Virtualized:"), ++ cpu->is_para ? _("Yes") : _("Not")); ++ } + + if (have_cache) { + int i; +@@ -545,6 +639,8 @@ int main(int argc, char *argv[]) + if (have_node) + read_nodes(cpu); + ++ read_hypervisor(cpu); ++ + /* Show time! */ + if (parsable) + print_parsable(cpu); +-- +1.5.5.1 + diff --git a/util-linux-2.14.1-lscpu_sysroot_option.patch b/util-linux-2.14.1-lscpu_sysroot_option.patch new file mode 100644 index 0000000..839a67f --- /dev/null +++ b/util-linux-2.14.1-lscpu_sysroot_option.patch @@ -0,0 +1,267 @@ +commit 47b6e8b684ad28228c9255fe4237b5a8a1c8c7d3 +Author: Cai Qian +Date: Sun Aug 10 15:33:51 2008 +0800 + + lscpu: --sysroot option and stable cache output + + This patch added a --sysroot command-line option for testing purpose. It + also sorted cache names, and displayed cache information in a sorted + manner instead of randomly before. In addition, it had some other minor + fixes. + + Signed-off-by: Cai Qian + +diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c +index 275d4c7..d6bb8b9 100644 +--- a/sys-utils/lscpu.c ++++ b/sys-utils/lscpu.c +@@ -36,17 +36,24 @@ + #define CACHE_MAX 100 + + /* /sys paths */ +-#define _PATH_SYS_SYSTEM "/sys/devices/system" ++#define _PATH_SYS_SYSTEM "sys/devices/system" + #define _PATH_SYS_CPU0 _PATH_SYS_SYSTEM "/cpu/cpu0" +-#define _PATH_PROC_XENCAP "/proc/xen/capabilities" +-#define _PATH_PROC_CPUINFO "/proc/cpuinfo" ++#define _PATH_PROC_XENCAP "proc/xen/capabilities" ++#define _PATH_PROC_CPUINFO "proc/cpuinfo" + + int have_topology; + int have_cache; + int have_node; + ++/* cache(s) description */ ++struct ca_desc { ++ char *caname; ++ char *casize; ++ int camap; ++}; ++ + /* CPU(s) description */ +-struct cpu_decs { ++struct cpu_desc { + /* counters */ + int ct_cpu; + int ct_thread; +@@ -62,9 +69,7 @@ struct cpu_decs { + char *model; + + /* caches */ +- char *caname[CACHE_MAX]; +- char *casize[CACHE_MAX]; +- int camap[CACHE_MAX]; ++ struct ca_desc cache[CACHE_MAX]; + + /* misc */ + char *mhz; +@@ -75,7 +80,7 @@ struct cpu_decs { + int *nodecpu; + }; + +-char pathbuf[PATH_MAX]; ++char pathbuf[PATH_MAX] = "/"; + + static void path_scanstr(char *result, const char *path, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); +@@ -211,7 +216,7 @@ int lookup(char *line, char *pattern, char **value) + } + + static void +-read_basicinfo(struct cpu_decs *cpu) ++read_basicinfo(struct cpu_desc *cpu) + { + FILE *fp = xfopen(_PATH_PROC_CPUINFO, "r"); + char buf[BUFSIZ]; +@@ -245,7 +250,7 @@ read_basicinfo(struct cpu_decs *cpu) + } + + static void +-read_topology(struct cpu_decs *cpu) ++read_topology(struct cpu_desc *cpu) + { + /* number of threads */ + cpu->ct_thread = path_sibling( +@@ -261,7 +266,7 @@ read_topology(struct cpu_decs *cpu) + } + + static void +-read_cache(struct cpu_decs *cpu) ++read_cache(struct cpu_desc *cpu) + { + char buf[256]; + DIR *dp; +@@ -295,14 +300,14 @@ read_cache(struct cpu_decs *cpu) + else + snprintf(buf, sizeof(buf), "L%d", level); + +- cpu->caname[cpu->ct_cache] = xstrdup(buf); ++ cpu->cache[cpu->ct_cache].caname = xstrdup(buf); + + /* cache size */ + path_scanstr(buf, _PATH_SYS_CPU0 "/cache/%s/size", dir->d_name); +- cpu->casize[cpu->ct_cache] = xstrdup(buf); ++ cpu->cache[cpu->ct_cache].casize = xstrdup(buf); + + /* information about how CPUs share different caches */ +- cpu->camap[cpu->ct_cache] = path_sibling( ++ cpu->cache[cpu->ct_cache].camap = path_sibling( + _PATH_SYS_CPU0 "/cache/%s/shared_cpu_map", + dir->d_name); + cpu->ct_cache++; +@@ -310,7 +315,7 @@ read_cache(struct cpu_decs *cpu) + } + + static void +-read_nodes(struct cpu_decs *cpu) ++read_nodes(struct cpu_desc *cpu) + { + int i; + +@@ -346,7 +351,8 @@ check_system(void) + + /* Read through sysfs. */ + if (access(_PATH_SYS_SYSTEM, F_OK)) +- errx(1, _("error: /sys filesystem is not accessable.")); ++ errx(EXIT_FAILURE, ++ _("error: /sys filesystem is not accessable.")); + + if (!access(_PATH_SYS_SYSTEM "/node", F_OK)) + have_node = 1; +@@ -359,22 +365,22 @@ check_system(void) + } + + static void +-print_parsable(struct cpu_decs *cpu) ++print_parsable(struct cpu_desc *cpu) + { + int i, j; + +- puts( ++ printf(_( + "# The following is the parsable format, which can be fed to other\n" +- "# programs. Each different item in every column has a unique ID\n" ++ "# programs. Each different item in every column has an unique ID\n" + "# starting from zero.\n" +- "# CPU,Core,Socket,Node"); ++ "# CPU,Core,Socket,Node")); + + if (have_cache) { + /* separator between CPU topology and cache information */ + putchar(','); + + for (i = cpu->ct_cache - 1; i >= 0; i--) +- printf(",%s", cpu->caname[i]); ++ printf(",%s", cpu->cache[i].caname); + } + putchar('\n'); + +@@ -407,11 +413,11 @@ print_parsable(struct cpu_decs *cpu) + for (j = cpu->ct_cache - 1; j >= 0; j--) { + /* If shared_cpu_map is 0, all CPUs share the same + cache. */ +- if (cpu->camap[j] == 0) +- cpu->camap[j] = cpu->ct_core * +- cpu->ct_thread; ++ if (cpu->cache[j].camap == 0) ++ cpu->cache[j].camap = cpu->ct_core * ++ cpu->ct_thread; + +- printf(",%d", i / cpu->camap[j]); ++ printf(",%d", i / cpu->cache[j].camap); + } + } + putchar('\n'); +@@ -424,7 +430,7 @@ print_parsable(struct cpu_decs *cpu) + #define print_n(_key, _val) printf("%-23s%d\n", _key, _val) + + static void +-print_readable(struct cpu_decs *cpu) ++print_readable(struct cpu_desc *cpu) + { + char buf[BUFSIZ]; + +@@ -462,8 +468,8 @@ print_readable(struct cpu_decs *cpu) + + for (i = cpu->ct_cache - 1; i >= 0; i--) { + snprintf(buf, sizeof(buf), +- _("%s cache:"), cpu->caname[i]); +- print_s(buf, cpu->casize[i]); ++ _("%s cache:"), cpu->cache[i].caname); ++ print_s(buf, cpu->cache[i].casize); + } + } + } +@@ -475,18 +481,29 @@ void usage(int rc) + + puts(_( "CPU architecture information helper\n\n" + " -h, --help usage information\n" +- " -p, --parse print out in parsable instead of printable format.\n")); ++ " -p, --parse print out in parsable instead of printable format.\n" ++ " -s, --sysroot use the directory as a new system root.\n")); + exit(rc); + } + ++static int ++ca_compare(const void *a, const void *b) ++{ ++ struct ca_desc *cache1 = (struct ca_desc *) a; ++ struct ca_desc *cache2 = (struct ca_desc *) b; ++ ++ return strcmp(cache2->caname, cache1->caname); ++} ++ + int main(int argc, char *argv[]) + { +- struct cpu_decs _cpu, *cpu = &_cpu; ++ struct cpu_desc _cpu, *cpu = &_cpu; + int parsable = 0, c; + + struct option longopts[] = { +- { "help", no_argument, 0, 'h' }, +- { "parse", no_argument, 0, 'p' }, ++ { "help", no_argument, 0, 'h' }, ++ { "parse", no_argument, 0, 'p' }, ++ { "sysroot", required_argument, 0, 's' }, + { NULL, 0, 0, 0 } + }; + +@@ -494,18 +511,25 @@ int main(int argc, char *argv[]) + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + +- while((c = getopt_long(argc, argv, "hp", longopts, NULL)) != -1) { ++ while((c = getopt_long(argc, argv, "hps:", longopts, NULL)) != -1) { + switch (c) { + case 'h': + usage(EXIT_SUCCESS); + case 'p': + parsable = 1; + break; ++ case 's': ++ strncpy(pathbuf, optarg, sizeof(pathbuf)); ++ break; + default: + usage(EXIT_FAILURE); + } + } + ++ if (chdir(pathbuf) == -1) ++ errx(EXIT_FAILURE, ++ _("error: change working directory to %s."), pathbuf); ++ + memset(cpu, 0, sizeof(*cpu)); + + check_system(); +@@ -514,8 +538,10 @@ int main(int argc, char *argv[]) + + if (have_topology) + read_topology(cpu); +- if (have_cache) ++ if (have_cache) { + read_cache(cpu); ++ qsort(cpu->cache, cpu->ct_cache, sizeof(struct ca_desc), ca_compare); ++ } + if (have_node) + read_nodes(cpu); + diff --git a/util-linux.changes b/util-linux.changes index 4320953..932dd36 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Oct 2 11:10:11 CEST 2008 - mkoenig@suse.de + +- add lscpu tool from current util-linux-ng git, + needed for fate#303051 +- replace hypervisor detection tool with the solution blessed by + upstream, which adds hv detection as lscpu feature [fate#303051] + ------------------------------------------------------------------- Wed Sep 24 11:28:07 CEST 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index c0de37b..73063f5 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -30,7 +30,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14.1 -Release: 2 +Release: 3 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -71,7 +71,9 @@ Patch4: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch # Patch5: util-linux-2.13.1-fdisk_cfdisk_yesno.patch Patch7: util-linux-2.14-mount_retry_on_nomedium.patch -Patch8: util-linux-2.14.1-hypervisor_detection.patch +Patch8: util-linux-2.14.1-lscpu.patch +Patch9: util-linux-2.14.1-lscpu_sysroot_option.patch +Patch10: util-linux-2.14.1-lscpu_add_hypervisor_vendor_id.patch # crypto patch Patch20: util-linux-mount_losetup_crypto.patch ## @@ -116,6 +118,8 @@ Authors: %patch5 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 +%patch10 -p1 %patch20 -p1 cp %{SOURCE7} %{SOURCE8} . # @@ -185,7 +189,7 @@ CFLAGS=-DCONFIG_SMP # architecture dependent builds BUILD_ENABLE= %ifarch %ix86 x86_64 -BUILD_ENABLE="--enable-rdev --enable-hypervisor" +BUILD_ENABLE="--enable-rdev" %endif # Use autogen, when building from git tree autoreconf -fi @@ -411,6 +415,7 @@ fi #/usr/bin/linux32 #/usr/bin/linux64 /usr/bin/look +/usr/bin/lscpu /usr/bin/mcookie /usr/bin/mesg %ifnarch ppc ppc64 @@ -465,6 +470,7 @@ fi %{_mandir}/man1/line.1.gz %{_mandir}/man1/logger.1.gz %{_mandir}/man1/look.1.gz +%{_mandir}/man1/lscpu.1.gz %{_mandir}/man1/mcookie.1.gz %{_mandir}/man1/mesg.1.gz %{_mandir}/man1/more.1.gz @@ -536,12 +542,10 @@ fi /sbin/sfdisk %endif %ifarch %ix86 x86_64 -/bin/hypervisor /usr/sbin/ramsize /usr/sbin/rdev /usr/sbin/rootflags /usr/sbin/vidmode -%{_mandir}/man1/hypervisor.1.gz %{_mandir}/man8/ramsize.8.gz %{_mandir}/man8/rdev.8.gz %{_mandir}/man8/rootflags.8.gz @@ -583,6 +587,11 @@ fi #%endif %changelog +* Thu Oct 02 2008 mkoenig@suse.de +- add lscpu tool from current util-linux-ng git, + needed for fate#303051 +- replace hypervisor detection tool with the solution blessed by + upstream, which adds hv detection as lscpu feature [fate#303051] * Wed Sep 24 2008 mkoenig@suse.de - add new tool /bin/hypervisor for x86, x86_64 from Ky Srinivasan From 5eecd85b5058888724ce946515c0aa292cf1c8e7e38d719994d75a85e50775b9 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 24 Oct 2008 13:48:32 +0000 Subject: [PATCH 064/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=64 --- ...utils_mkfs.minix_file_size_detection.patch | 21 ++ ....14.1-lscpu_add_hypervisor_detection.patch | 284 ++++++++++++++++++ ....14.1-lscpu_add_hypervisor_vendor_id.patch | 196 ------------ util-linux-2.14.1-mount_swap_pagesize.patch | 189 ++++++++++++ util-linux-2.14.1-sys-utils_lscpu_exit.patch | 11 + util-linux.changes | 8 + util-linux.spec | 15 +- 7 files changed, 526 insertions(+), 198 deletions(-) create mode 100644 util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch create mode 100644 util-linux-2.14.1-lscpu_add_hypervisor_detection.patch delete mode 100644 util-linux-2.14.1-lscpu_add_hypervisor_vendor_id.patch create mode 100644 util-linux-2.14.1-mount_swap_pagesize.patch create mode 100644 util-linux-2.14.1-sys-utils_lscpu_exit.patch diff --git a/util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch b/util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch new file mode 100644 index 0000000..e86b994 --- /dev/null +++ b/util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch @@ -0,0 +1,21 @@ +Index: util-linux-ng-2.14.1/disk-utils/mkfs.minix.c +=================================================================== +--- util-linux-ng-2.14.1.orig/disk-utils/mkfs.minix.c 2008-09-10 11:02:42.000000000 +0200 ++++ util-linux-ng-2.14.1/disk-utils/mkfs.minix.c 2008-10-23 17:25:49.000000000 +0200 +@@ -653,9 +653,14 @@ main(int argc, char ** argv) { + die(_("cannot determine sector size for %s")); + if (BLOCK_SIZE < sectorsize) + die(_("block size smaller than physical sector size of %s")); +- if (!BLOCKS && blkdev_get_size(DEV, &BLOCKS) == -1) +- die(_("cannot determine size of %s")); ++ if (!BLOCKS) { ++ if (blkdev_get_size(DEV, &BLOCKS) == -1) ++ die(_("cannot determine size of %s")); ++ BLOCKS /= BLOCK_SIZE; ++ } + } else if (!S_ISBLK(statbuf.st_mode)) { ++ if (!BLOCKS) ++ BLOCKS = statbuf.st_size / BLOCK_SIZE; + check=0; + } else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) + die(_("will not try to make filesystem on '%s'")); diff --git a/util-linux-2.14.1-lscpu_add_hypervisor_detection.patch b/util-linux-2.14.1-lscpu_add_hypervisor_detection.patch new file mode 100644 index 0000000..be07d92 --- /dev/null +++ b/util-linux-2.14.1-lscpu_add_hypervisor_detection.patch @@ -0,0 +1,284 @@ +commit c8b64f6d7770d62065bdc4fa5c4f80cc2326e203 +Author: Karel Zak +Date: Wed Oct 1 01:29:32 2008 +0200 + + lscpu: add Hypervisor detection + + This patch adds two new fields: + + * "Hypervisor vendor" -- based on CPUID and hypervisor specific + PCI devices. lscpu(1) supports KVM, XEN, Microsoft HV now. + + * "Virtualization type" + - "none" = Xen dom0 + - "full" = full virtualization (KVM, Xen, ...) + - "para" = Xen paravirtualization + + Co-Author: Ky Srinivasan + Signed-off-by: Karel Zak + +diff --git a/sys-utils/lscpu.1 b/sys-utils/lscpu.1 +index 78da8a1..e0e9935 100644 +--- a/sys-utils/lscpu.1 ++++ b/sys-utils/lscpu.1 +@@ -22,6 +22,8 @@ Print out in parsable instead of printable format. + .SH BUGS + The program at the moment does not handle the system installed with + different types of physical processors. ++ ++Sometimes in Xen Dom0 kernel reports wrong data. + .SH AUTHOR + Cai Qian + .SH AVAILABILITY +diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c +index d6bb8b9..82972b3 100644 +--- a/sys-utils/lscpu.c ++++ b/sys-utils/lscpu.c +@@ -38,8 +38,10 @@ + /* /sys paths */ + #define _PATH_SYS_SYSTEM "sys/devices/system" + #define _PATH_SYS_CPU0 _PATH_SYS_SYSTEM "/cpu/cpu0" +-#define _PATH_PROC_XENCAP "proc/xen/capabilities" ++#define _PATH_PROC_XEN "proc/xen" ++#define _PATH_PROC_XENCAP _PATH_PROC_XEN "/capabilities" + #define _PATH_PROC_CPUINFO "proc/cpuinfo" ++#define _PATH_PROC_PCIDEVS "proc/bus/pci/devices" + + int have_topology; + int have_cache; +@@ -52,6 +54,33 @@ struct ca_desc { + int camap; + }; + ++/* virtualization types */ ++enum { ++ VIRT_NONE = 0, ++ VIRT_PARA, ++ VIRT_FULL ++}; ++const char *virt_types[] = { ++ [VIRT_NONE] = N_("none"), ++ [VIRT_PARA] = N_("para"), ++ [VIRT_FULL] = N_("full") ++}; ++ ++/* hypervisor vendors */ ++enum { ++ HYPER_NONE = 0, ++ HYPER_XEN, ++ HYPER_KVM, ++ HYPER_MSHV ++}; ++const char *hv_vendors[] = { ++ [HYPER_NONE] = NULL, ++ [HYPER_XEN] = "Xen", ++ [HYPER_KVM] = "KVM", ++ [HYPER_MSHV] = "Microsoft" ++}; ++ ++ + /* CPU(s) description */ + struct cpu_desc { + /* counters */ +@@ -67,6 +96,9 @@ struct cpu_desc { + char *vendor; + char *family; + char *model; ++ char *virtflag; /* virtualization flag (vmx, svm) */ ++ int hyper; /* hypervisor vendor ID */ ++ int virtype; /* VIRT_PARA|FULL|NONE ? */ + + /* caches */ + struct ca_desc cache[CACHE_MAX]; +@@ -246,9 +278,130 @@ read_basicinfo(struct cpu_desc *cpu) + else + continue; + } ++ ++ if (cpu->flags) { ++ snprintf(buf, sizeof(buf), " %s ", cpu->flags); ++ if (strstr(buf, " svm ")) ++ cpu->virtflag = strdup("svm"); ++ else if (strstr(buf, " vmx ")) ++ cpu->virtflag = strdup("vmx"); ++ } ++ + fclose(fp); + } + ++static int ++has_pci_device(int vendor, int device) ++{ ++ FILE *f; ++ int num, fn, ven, dev; ++ int res = 1; ++ ++ f = fopen(_PATH_PROC_PCIDEVS, "r"); ++ if (!f) ++ return 0; ++ ++ /* for more details about bus/pci/devices format see ++ * drivers/pci/proc.c in linux kernel ++ */ ++ while(fscanf(f, "%02x%02x\t%04x%04x\t%*[^\n]", ++ &num, &fn, &ven, &dev) == 4) { ++ ++ if (ven == vendor && dev == device) ++ goto found; ++ } ++ ++ res = 0; ++found: ++ fclose(f); ++ return res; ++} ++ ++#if defined(__x86_64__) || defined(__i386__) ++ ++/* ++ * This CPUID leaf returns the information about the hypervisor. ++ * EAX : maximum input value for CPUID supported by the hypervisor. ++ * EBX, ECX, EDX : Hypervisor vendor ID signature. E.g. VMwareVMware. ++ */ ++#define HYPERVISOR_INFO_LEAF 0x40000000 ++ ++static inline void ++cpuid(unsigned int op, unsigned int *eax, unsigned int *ebx, ++ unsigned int *ecx, unsigned int *edx) ++{ ++ __asm__("cpuid" ++ : "=a" (*eax), ++ "=b" (*ebx), ++ "=c" (*ecx), ++ "=d" (*edx) ++ : "0" (op), "c"(0)); ++} ++ ++static void ++read_hypervisor_cpuid(struct cpu_desc *cpu) ++{ ++ unsigned int eax = 0, ebx = 0, ecx = 0, edx = 0; ++ char hyper_vendor_id[13]; ++ ++ memset(hyper_vendor_id, 0, sizeof(hyper_vendor_id)); ++ ++ cpuid(HYPERVISOR_INFO_LEAF, &eax, &ebx, &ecx, &edx); ++ memcpy(hyper_vendor_id + 0, &ebx, 4); ++ memcpy(hyper_vendor_id + 4, &ecx, 4); ++ memcpy(hyper_vendor_id + 8, &edx, 4); ++ hyper_vendor_id[12] = '\0'; ++ ++ if (!hyper_vendor_id[0]) ++ return; ++ ++ if (!strncmp("XenVMMXenVMM", hyper_vendor_id, 12)) ++ cpu->hyper = HYPER_XEN; ++ else if (!strncmp("KVMKVMKVM", hyper_vendor_id, 9)) ++ cpu->hyper = HYPER_KVM; ++ else if (!strncmp("Microsoft Hv", hyper_vendor_id, 12)) ++ cpu->hyper = HYPER_MSHV; ++} ++ ++#else /* ! __x86_64__ */ ++static void ++read_hypervisor_cpuid(struct cpu_desc *cpu) ++{ ++} ++#endif ++ ++static void ++read_hypervisor(struct cpu_desc *cpu) ++{ ++ read_hypervisor_cpuid(cpu); ++ ++ if (cpu->hyper) ++ /* hvm */ ++ cpu->virtype = VIRT_FULL; ++ ++ else if (!access(_PATH_PROC_XEN, F_OK)) { ++ /* Xen para-virt or dom0 */ ++ FILE *fd = fopen(_PATH_PROC_XENCAP, "r"); ++ int dom0 = 0; ++ ++ if (fd) { ++ char buf[256]; ++ ++ if (fscanf(fd, "%s", buf) == 1 && ++ !strcmp(buf, "control_d")) ++ dom0 = 1; ++ fclose(fd); ++ } ++ cpu->virtype = dom0 ? VIRT_NONE : VIRT_PARA; ++ cpu->hyper = HYPER_XEN; ++ ++ } else if (has_pci_device(0x5853, 0x0001)) { ++ /* Xen full-virt on non-x86_64 */ ++ cpu->hyper = HYPER_XEN; ++ cpu->virtype = VIRT_FULL; ++ } ++} ++ + static void + read_topology(struct cpu_desc *cpu) + { +@@ -337,18 +490,6 @@ read_nodes(struct cpu_desc *cpu) + static void + check_system(void) + { +- FILE *fd; +- char buf[256]; +- +- /* Dom0 Kernel gives wrong information. */ +- fd = fopen(_PATH_PROC_XENCAP, "r"); +- if (fd) { +- if (fscanf(fd, "%s", buf) == 1 && !strcmp(buf, "control_d")) +- errx(EXIT_FAILURE, +- _("error: Dom0 Kernel is unsupported.")); +- fclose(fd); +- } +- + /* Read through sysfs. */ + if (access(_PATH_SYS_SYSTEM, F_OK)) + errx(EXIT_FAILURE, +@@ -432,8 +573,6 @@ print_parsable(struct cpu_desc *cpu) + static void + print_readable(struct cpu_desc *cpu) + { +- char buf[BUFSIZ]; +- + print_s("Architecture:", cpu->arch); + print_n("CPU(s):", cpu->ct_cpu); + +@@ -455,15 +594,18 @@ print_readable(struct cpu_desc *cpu) + print_s(_("Stepping:"), cpu->stepping); + if (cpu->mhz) + print_s(_("CPU MHz:"), cpu->mhz); +- if (cpu->flags) { +- snprintf(buf, sizeof(buf), " %s ", cpu->flags); +- if (strstr(buf, " svm ")) ++ if (cpu->virtflag) { ++ if (!strcmp(cpu->virtflag, "svm")) + print_s(_("Virtualization:"), "AMD-V"); +- else if (strstr(buf, " vmx ")) ++ else if (!strcmp(cpu->virtflag, "vmx")) + print_s(_("Virtualization:"), "VT-x"); + } +- ++ if (cpu->hyper) { ++ print_s(_("Hypervisor vendor:"), hv_vendors[cpu->hyper]); ++ print_s(_("Virtualization type:"), virt_types[cpu->virtype]); ++ } + if (have_cache) { ++ char buf[512]; + int i; + + for (i = cpu->ct_cache - 1; i >= 0; i--) { +@@ -545,6 +687,8 @@ int main(int argc, char *argv[]) + if (have_node) + read_nodes(cpu); + ++ read_hypervisor(cpu); ++ + /* Show time! */ + if (parsable) + print_parsable(cpu); diff --git a/util-linux-2.14.1-lscpu_add_hypervisor_vendor_id.patch b/util-linux-2.14.1-lscpu_add_hypervisor_vendor_id.patch deleted file mode 100644 index ff3960a..0000000 --- a/util-linux-2.14.1-lscpu_add_hypervisor_vendor_id.patch +++ /dev/null @@ -1,196 +0,0 @@ -X-Gnus-Coding-System: -*- coding: utf-8; -*- - -On Mon, Sep 29, 2008 at 11:01:05PM +0200, Karel Zak wrote: -> On Mon, Sep 29, 2008 at 03:17:28PM +0200, Matthias Koenig wrote: -> > The tool has been written by Ky Srinivasan . -> -> Do we really need a new tool? IMHO the hypervisor Vendor ID should -> be exported by kernel in /sys or /proc -- or we can add this info to -> lscpu(1) or so. - - The (untested) patch below introduces a new fields "Hypervisor vendor - ID:" and "Para-Virtualized:" in lscpu(1). - - The "Hypervisor vendor ID:" field reports the raw ID, it means it works - for all hypervisors (the same logic like CPU "Vendor ID:"). - - I think this solution is a good compromise to avoid a new tool. - - (Note that lscpu(1) does not support XEN dom0 now. This problem will - be resolved ASAP.) - - Comments? - - Karel - ->From 5a8e8f8b28eb6ea4bdce27ed6629dfb4fb1665b5 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 1 Oct 2008 01:29:32 +0200 -Subject: [PATCH] lscpu: add Hypervisor vendor ID - -Signed-off-by: Karel Zak ---- - sys-utils/lscpu.c | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 files changed, 101 insertions(+), 5 deletions(-) - -diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c -index d6bb8b9..5f39ced 100644 ---- a/sys-utils/lscpu.c -+++ b/sys-utils/lscpu.c -@@ -38,7 +38,8 @@ - /* /sys paths */ - #define _PATH_SYS_SYSTEM "sys/devices/system" - #define _PATH_SYS_CPU0 _PATH_SYS_SYSTEM "/cpu/cpu0" --#define _PATH_PROC_XENCAP "proc/xen/capabilities" -+#define _PATH_PROC_XEN "proc/xen" -+#define _PATH_PROC_XENCAP _PATH_PROC_XEN "/capabilities" - #define _PATH_PROC_CPUINFO "proc/cpuinfo" - - int have_topology; -@@ -67,6 +68,9 @@ struct cpu_desc { - char *vendor; - char *family; - char *model; -+ char *virtflag; /* virtualization flag (vmx, svm) */ -+ char *hvid; /* hypervisor vendor ID */ -+ int is_para; /* is paravirtualized ? */ - - /* caches */ - struct ca_desc cache[CACHE_MAX]; -@@ -246,9 +250,94 @@ read_basicinfo(struct cpu_desc *cpu) - else - continue; - } -+ -+ if (cpu->flags) { -+ snprintf(buf, sizeof(buf), " %s ", cpu->flags); -+ if (strstr(buf, " svm ")) -+ cpu->virtflag = strdup("svm"); -+ else if (strstr(buf, " vmx ")) -+ cpu->virtflag = strdup("vmx"); -+ } -+ - fclose(fp); - } - -+#if defined(__x86_64__) || defined(__i386__) -+ -+/* -+ * This CPUID leaf returns the information about the hypervisor. -+ * EAX : maximum input value for CPUID supported by the hypervisor. -+ * EBX, ECX, EDX : Hypervisor vendor ID signature. E.g. VMwareVMware. -+ */ -+#define HYPERVISOR_INFO_LEAF 0x40000000 -+ -+static inline void -+cpuid(unsigned int op, unsigned int *eax, unsigned int *ebx, -+ unsigned int *ecx, unsigned int *edx) -+{ -+ __asm__("cpuid" -+ : "=a" (*eax), -+ "=b" (*ebx), -+ "=c" (*ecx), -+ "=d" (*edx) -+ : "0" (op), "c"(0)); -+} -+ -+static void -+read_hypervisor_cpuid(struct cpu_desc *cpu) -+{ -+ unsigned int eax, ebx, ecx, edx; -+ char hyper_vendor_id[13]; -+ -+ memset(hyper_vendor_id, 0, sizeof(hyper_vendor_id)); -+ -+ cpuid(HYPERVISOR_INFO_LEAF, &eax, &ebx, &ecx, &edx); -+ memcpy(hyper_vendor_id + 0, &ebx, 4); -+ memcpy(hyper_vendor_id + 4, &ecx, 4); -+ memcpy(hyper_vendor_id + 8, &edx, 4); -+ hyper_vendor_id[12] = '\0'; -+ -+ if (hyper_vendor_id[0]) -+ cpu->hvid = strdup(hyper_vendor_id); -+} -+ -+#else /* ! __x86_64__ */ -+static void -+read_hypervisor_cpuid(struct cpu_desc *cpu) -+{ -+} -+#endif -+ -+static void -+read_hypervisor(struct cpu_desc *cpu) -+{ -+ read_hypervisor_cpuid(cpu); -+ -+ if (!cpu->hvid) { -+ /* fallback for non-x86 archs */ -+ -+ if (!access(_PATH_PROC_XEN, F_OK)) -+ /* XEN dom0 or domU */ -+ cpu->hvid = strdup("Xen"); -+ } -+ -+ if (!cpu->virtflag && cpu->hvid && !strncmp(cpu->hvid, "Xen", 3)) { -+ -+ FILE *fd = fopen(_PATH_PROC_XENCAP, "r"); -+ int dom0 = 0; -+ -+ if (fd) { -+ char buf[256]; -+ -+ if (fscanf(fd, "%s", buf) == 1 && -+ !strcmp(buf, "control_d")) -+ dom0 = 1; -+ fclose(fd); -+ } -+ cpu->is_para = !dom0; -+ } -+} -+ - static void - read_topology(struct cpu_desc *cpu) - { -@@ -344,6 +433,7 @@ check_system(void) - fd = fopen(_PATH_PROC_XENCAP, "r"); - if (fd) { - if (fscanf(fd, "%s", buf) == 1 && !strcmp(buf, "control_d")) -+ /* !!!!!!!! TODO */ - errx(EXIT_FAILURE, - _("error: Dom0 Kernel is unsupported.")); - fclose(fd); -@@ -455,13 +545,17 @@ print_readable(struct cpu_desc *cpu) - print_s(_("Stepping:"), cpu->stepping); - if (cpu->mhz) - print_s(_("CPU MHz:"), cpu->mhz); -- if (cpu->flags) { -- snprintf(buf, sizeof(buf), " %s ", cpu->flags); -- if (strstr(buf, " svm ")) -+ if (cpu->virtflag) { -+ if (!strcmp(cpu->virtflag, "svm")) - print_s(_("Virtualization:"), "AMD-V"); -- else if (strstr(buf, " vmx ")) -+ else if (!strcmp(cpu->virtflag, "vmx")) - print_s(_("Virtualization:"), "VT-x"); - } -+ if (cpu->hvid) { -+ print_s(_("Hypervisor vendor ID:"), cpu->hvid); -+ print_s(_("Para-Virtualized:"), -+ cpu->is_para ? _("Yes") : _("Not")); -+ } - - if (have_cache) { - int i; -@@ -545,6 +639,8 @@ int main(int argc, char *argv[]) - if (have_node) - read_nodes(cpu); - -+ read_hypervisor(cpu); -+ - /* Show time! */ - if (parsable) - print_parsable(cpu); --- -1.5.5.1 - diff --git a/util-linux-2.14.1-mount_swap_pagesize.patch b/util-linux-2.14.1-mount_swap_pagesize.patch new file mode 100644 index 0000000..e423b85 --- /dev/null +++ b/util-linux-2.14.1-mount_swap_pagesize.patch @@ -0,0 +1,189 @@ +Index: util-linux-ng-2.14.1/mount/swapon.c +=================================================================== +--- util-linux-ng-2.14.1.orig/mount/swapon.c 2008-09-10 11:02:43.000000000 +0200 ++++ util-linux-ng-2.14.1/mount/swapon.c 2008-10-24 14:19:06.000000000 +0200 +@@ -13,6 +13,8 @@ + #include + #include + #include ++#include ++#include + #include "xmalloc.h" + #include "swap_constants.h" + #include "nls.h" +@@ -39,6 +41,33 @@ + #define QUIET 1 + #define CANONIC 1 + ++#define MAX_PAGESIZE (64 * 1024) ++static unsigned int page_size[] = { 4 * 1024, ++ 8 * 1024, ++ 16 * 1024, ++ 64 * 1024, ++ 0 }; ++ ++ ++struct swap_info { ++ char bootbits[1024]; /* Space for disklabel etc. */ ++ uint32_t version; ++ uint32_t last_page; ++ uint32_t nr_badpages; ++ unsigned char sws_uuid[16]; ++ unsigned char sws_volume[16]; ++ uint32_t padding[117]; ++ uint32_t badpages[1]; ++}; ++ ++enum { ++ SWAP_V0 = 1, ++ SWAP_V1, ++ SWAP_SUSPEND, ++ SWAP_ULSUSPEND, ++ SWAP_OOTSUSPEND ++}; ++ + int all = 0; + int priority = -1; /* non-prioritized swap by default */ + +@@ -238,11 +267,114 @@ swap_reinitialize(const char *device) { + return -1; /* error */ + } + ++int ++swap_detect_signature(const char *buf) ++{ ++ if (memcmp(buf, "SWAP-SPACE", 10) == 0) ++ return SWAP_V0; ++ else if (memcmp(buf, "SWAPSPACE2", 10) == 0) ++ return SWAP_V1; ++ else if (memcmp(buf, "S1SUSPEND", 9) == 0) ++ return SWAP_SUSPEND; ++ else if (memcmp(buf, "ULSUSPEND", 9) == 0) ++ return SWAP_ULSUSPEND; ++ else if (memcmp(buf, "\xed\xc3\x02\xe9\x98\x56\xe5\x0c", 8) == 0) ++ return SWAP_OOTSUSPEND; ++ ++ return 0; ++} ++ ++/* return the pagesize the swap format has been built with ++ * as swap metadata depends on the pagesize, we have to ++ * reinitialize if it does not match with the current pagesize ++ * returns 0 if not a valid swap format ++ */ ++unsigned int ++swap_get_pagesize(const char *dev) ++{ ++ int fd; ++ char *buf; ++ unsigned int *page, last_page; ++ unsigned int pagesize = 0; ++ off_t size, swap_size; ++ int swap_version; ++ int flip = 0; ++ struct swap_info *s; ++ ++ fd = open(dev, O_RDONLY); ++ if (fd == -1) { ++ perror("open"); ++ return 0; ++ } ++ ++ /* get size */ ++ size = lseek(fd, 0, SEEK_END); ++ if (size == (off_t)-1) { ++ perror("lseek"); ++ goto err; ++ } ++ /* rewind */ ++ if (lseek(fd, 0, SEEK_SET)) { ++ perror("lseek"); ++ goto err; ++ } ++ ++ buf = malloc(MAX_PAGESIZE); ++ if (!buf) { ++ perror("malloc"); ++ goto err; ++ } ++ ++ if (read(fd, buf, MAX_PAGESIZE) == (ssize_t)-1) { ++ perror("read"); ++ goto err1; ++ } ++ ++ for (page = page_size; *page; ++page) { ++ char *off = buf + *page - 10; ++ if (swap_detect_signature(off)) { ++ pagesize = *page; ++ break; ++ } ++ } ++ if (pagesize) { ++ s = (struct swap_info *)buf; ++ if (s->version == 1) ++ last_page = s->last_page; ++ else if (bswap_32(s->version) == 1) { ++ flip = 1; ++ last_page = bswap_32(s->last_page); ++ } ++ if (verbose) ++ fprintf(stderr, _("found %sswap v%d signature string" ++ " for %d KiB PAGE_SIZE\n"), ++ flip ? "other-endian " : "", swap_version - 1, ++ pagesize / 1024); ++ swap_size = (last_page + 1) * pagesize; ++ if (swap_size > size) { ++ if (verbose) ++ fprintf(stderr, _("last_page 0x%08llx is larger" ++ " than actual size of swapspace\n"), ++ (unsigned long long)swap_size); ++ pagesize = 0; ++ } ++ } ++ ++err1: ++ free(buf); ++err: ++ close(fd); ++ return pagesize; ++} ++ + static int + do_swapon(const char *orig_special, int prio, int canonic) { + int status; ++ int reinitialize = 0; + struct stat st; + const char *special = orig_special; ++ unsigned int pagesize = sysconf(_SC_PAGESIZE); ++ unsigned int swap_pagesize = 0; + + if (verbose) + printf(_("%s on %s\n"), progname, orig_special); +@@ -260,6 +392,15 @@ do_swapon(const char *orig_special, int + return -1; + } + ++ swap_pagesize = swap_get_pagesize(special); ++ if (swap_pagesize && (pagesize != swap_pagesize)) { ++ if (verbose) ++ fprintf(stderr, _("swap format pagesize does not match." ++ " Reinitializing the swap.\n"), ++ progname, special); ++ reinitialize = 1; ++ } ++ + /* We have to reinitialize swap with old (=useless) software suspend + * data. The problem is that if we don't do it, then we get data + * corruption the next time an attempt at unsuspending is made. +@@ -268,6 +409,10 @@ do_swapon(const char *orig_special, int + fprintf(stdout, _("%s: %s: software suspend data detected. " + "Reinitializing the swap.\n"), + progname, special); ++ reinitialize = 1; ++ } ++ ++ if (reinitialize) { + if (swap_reinitialize(special) < 0) + return -1; + } diff --git a/util-linux-2.14.1-sys-utils_lscpu_exit.patch b/util-linux-2.14.1-sys-utils_lscpu_exit.patch new file mode 100644 index 0000000..498e304 --- /dev/null +++ b/util-linux-2.14.1-sys-utils_lscpu_exit.patch @@ -0,0 +1,11 @@ +Index: util-linux-ng-2.14.1/sys-utils/lscpu.c +=================================================================== +--- util-linux-ng-2.14.1.orig/sys-utils/lscpu.c 2008-10-20 15:00:44.000000000 +0200 ++++ util-linux-ng-2.14.1/sys-utils/lscpu.c 2008-10-21 18:27:01.000000000 +0200 +@@ -647,5 +647,5 @@ int main(int argc, char *argv[]) + else + print_readable(cpu); + +- return EXIT_FAILURE; ++ return EXIT_SUCCESS; + } diff --git a/util-linux.changes b/util-linux.changes index 932dd36..70863d8 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Oct 23 17:58:28 CEST 2008 - mkoenig@suse.de + +- swapon: add swap pagesize detection [bnc#433028] +- lscpu: fix return code [bnc#437367] +- mkfs.minix: fix device size detection [bnc#437980] +- lscpu: update to most recent version for hypervisor detection + ------------------------------------------------------------------- Thu Oct 2 11:10:11 CEST 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 73063f5..f84e0a1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -30,7 +30,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14.1 -Release: 3 +Release: 4 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -73,7 +73,10 @@ Patch5: util-linux-2.13.1-fdisk_cfdisk_yesno.patch Patch7: util-linux-2.14-mount_retry_on_nomedium.patch Patch8: util-linux-2.14.1-lscpu.patch Patch9: util-linux-2.14.1-lscpu_sysroot_option.patch -Patch10: util-linux-2.14.1-lscpu_add_hypervisor_vendor_id.patch +Patch10: util-linux-2.14.1-lscpu_add_hypervisor_detection.patch +Patch11: util-linux-2.14.1-mount_swap_pagesize.patch +Patch12: util-linux-2.14.1-sys-utils_lscpu_exit.patch +Patch13: util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch # crypto patch Patch20: util-linux-mount_losetup_crypto.patch ## @@ -120,6 +123,9 @@ Authors: %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 %patch20 -p1 cp %{SOURCE7} %{SOURCE8} . # @@ -587,6 +593,11 @@ fi #%endif %changelog +* Thu Oct 23 2008 mkoenig@suse.de +- swapon: add swap pagesize detection [bnc#433028] +- lscpu: fix return code [bnc#437367] +- mkfs.minix: fix device size detection [bnc#437980] +- lscpu: update to most recent version for hypervisor detection * Thu Oct 02 2008 mkoenig@suse.de - add lscpu tool from current util-linux-ng git, needed for fate#303051 From c6a1754ca9e90f1729327213441736aacac96731c2884a4b98dbc10f53c2b8b1 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 3 Nov 2008 00:03:14 +0000 Subject: [PATCH 065/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=65 --- util-linux-2.14.1-fdisk_missing_include.patch | 14 ++++++++++++++ util-linux.changes | 5 +++++ util-linux.spec | 14 +++++++++----- 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 util-linux-2.14.1-fdisk_missing_include.patch diff --git a/util-linux-2.14.1-fdisk_missing_include.patch b/util-linux-2.14.1-fdisk_missing_include.patch new file mode 100644 index 0000000..2bdcbec --- /dev/null +++ b/util-linux-2.14.1-fdisk_missing_include.patch @@ -0,0 +1,14 @@ +Index: util-linux-ng-2.14.1/fdisk/partname.c +=================================================================== +--- util-linux-ng-2.14.1.orig/fdisk/partname.c 2008-05-29 01:01:02.000000000 +0200 ++++ util-linux-ng-2.14.1/fdisk/partname.c 2008-10-27 17:01:15.000000000 +0100 +@@ -1,6 +1,9 @@ + #include + #include + #include ++#include ++#include ++#include "blkdev.h" + #include "common.h" + + /* diff --git a/util-linux.changes b/util-linux.changes index 70863d8..7c5beab 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Oct 27 17:33:01 CET 2008 - mkoenig@suse.de + +- fdisk: add missing includes [bnc#438670] + ------------------------------------------------------------------- Thu Oct 23 17:58:28 CEST 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index f84e0a1..105c3b8 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -30,7 +30,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14.1 -Release: 4 +Release: 5 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -77,6 +77,7 @@ Patch10: util-linux-2.14.1-lscpu_add_hypervisor_detection.patch Patch11: util-linux-2.14.1-mount_swap_pagesize.patch Patch12: util-linux-2.14.1-sys-utils_lscpu_exit.patch Patch13: util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch +Patch14: util-linux-2.14.1-fdisk_missing_include.patch # crypto patch Patch20: util-linux-mount_losetup_crypto.patch ## @@ -126,6 +127,7 @@ Authors: %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 %patch20 -p1 cp %{SOURCE7} %{SOURCE8} . # @@ -593,6 +595,8 @@ fi #%endif %changelog +* Mon Oct 27 2008 mkoenig@suse.de +- fdisk: add missing includes [bnc#438670] * Thu Oct 23 2008 mkoenig@suse.de - swapon: add swap pagesize detection [bnc#433028] - lscpu: fix return code [bnc#437367] @@ -673,7 +677,7 @@ fi * Thu Apr 03 2008 mkoenig@suse.de - cfdisk: accept english answer [bnc#369043] - use upstream getfs fix -* Thu Mar 27 2008 coolo@suse.de +* Wed Mar 26 2008 coolo@suse.de - actually require the split out package * Sun Mar 23 2008 coolo@suse.de - splitting out 60%% of the size of the package: @@ -729,7 +733,7 @@ fi - merged upstream: util-linux-2.13-mount_helper_fix.patch util-linux-2.13-hwclock_rtc_option.patch -* Fri Oct 05 2007 bg@suse.de +* Thu Oct 04 2007 bg@suse.de - don't use parisc, parisc32 and parisc64. * Mon Oct 01 2007 mkoenig@suse.de - update to version 2.13 @@ -1395,7 +1399,7 @@ fi - The install_info macros need PreReq: %%install_info_prereq * Fri Feb 07 2003 ro@suse.de - added install_info macros -* Wed Feb 05 2003 ro@suse.de +* Tue Feb 04 2003 ro@suse.de - don't package /bin/kill (part of coreutils now) * Tue Feb 04 2003 meissner@suse.de - Include tarball with pmac-utils manpages, so we do not need @@ -1812,7 +1816,7 @@ fi - rdev is not built on alpha * Mon Jan 18 1999 florian@suse.de - fixed one broken case to delete a partition in fdisk -* Mon Dec 14 1998 bs@suse.de +* Sun Dec 13 1998 bs@suse.de - fixed file list * Thu Dec 10 1998 fehr@suse.de - fix bug in fdisk From 38c0917b1719da6766f4967d3849208de42bda8de6d3fc47fe4647a913fb67da Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 7 Nov 2008 15:04:55 +0000 Subject: [PATCH 066/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=66 --- util-linux-2.14.1-fdisk_cylinder.patch | 16 ++++++++++++ util-linux-2.14.1-mount_loop_ro_fix.patch | 14 ++++++++++ util-linux-2.14.1-mount_swap_pagesize.patch | 20 +++++++------- util-linux.changes | 8 ++++++ util-linux.spec | 29 ++++++++++++++------- 5 files changed, 68 insertions(+), 19 deletions(-) create mode 100644 util-linux-2.14.1-fdisk_cylinder.patch create mode 100644 util-linux-2.14.1-mount_loop_ro_fix.patch diff --git a/util-linux-2.14.1-fdisk_cylinder.patch b/util-linux-2.14.1-fdisk_cylinder.patch new file mode 100644 index 0000000..ba366b6 --- /dev/null +++ b/util-linux-2.14.1-fdisk_cylinder.patch @@ -0,0 +1,16 @@ +Index: util-linux-ng-2.14.1/fdisk/fdisk.c +=================================================================== +--- util-linux-ng-2.14.1.orig/fdisk/fdisk.c 2008-11-05 16:38:11.000000000 +0100 ++++ util-linux-ng-2.14.1/fdisk/fdisk.c 2008-11-05 17:23:30.000000000 +0100 +@@ -1186,8 +1186,9 @@ read_int(unsigned int low, unsigned int + while(isspace(*(line_ptr + suflen))) + *(line_ptr + suflen--) = '\0'; + +- if ((*line_ptr == 'C' || *line_ptr == 'c') && +- *(line_ptr + 1) == '\0') { ++ if (((*line_ptr == 'C' || *line_ptr == 'c') && ++ *(line_ptr + 1) == '\0') || ++ *line_ptr == '\0') { + /* + * Cylinders + */ diff --git a/util-linux-2.14.1-mount_loop_ro_fix.patch b/util-linux-2.14.1-mount_loop_ro_fix.patch new file mode 100644 index 0000000..a770590 --- /dev/null +++ b/util-linux-2.14.1-mount_loop_ro_fix.patch @@ -0,0 +1,14 @@ +Index: util-linux-ng-2.14.1/mount/lomount.c +=================================================================== +--- util-linux-ng-2.14.1.orig/mount/lomount.c 2008-09-10 11:02:43.000000000 +0200 ++++ util-linux-ng-2.14.1/mount/lomount.c 2008-11-07 14:00:28.000000000 +0100 +@@ -653,7 +653,8 @@ set_loop(const char *device, const char + + mode = (*options & SETLOOP_RDONLY) ? O_RDONLY : O_RDWR; + if ((ffd = open(file, mode)) < 0) { +- if (!(*options & SETLOOP_RDONLY) && errno == EROFS) ++ if (!(*options & SETLOOP_RDONLY) && ++ (errno == EROFS || errno == EACCES)) + ffd = open(file, mode = O_RDONLY); + if (ffd < 0) { + perror(file); diff --git a/util-linux-2.14.1-mount_swap_pagesize.patch b/util-linux-2.14.1-mount_swap_pagesize.patch index e423b85..9fed44d 100644 --- a/util-linux-2.14.1-mount_swap_pagesize.patch +++ b/util-linux-2.14.1-mount_swap_pagesize.patch @@ -1,7 +1,7 @@ Index: util-linux-ng-2.14.1/mount/swapon.c =================================================================== --- util-linux-ng-2.14.1.orig/mount/swapon.c 2008-09-10 11:02:43.000000000 +0200 -+++ util-linux-ng-2.14.1/mount/swapon.c 2008-10-24 14:19:06.000000000 +0200 ++++ util-linux-ng-2.14.1/mount/swapon.c 2008-11-07 14:34:30.000000000 +0100 @@ -13,6 +13,8 @@ #include #include @@ -45,7 +45,7 @@ Index: util-linux-ng-2.14.1/mount/swapon.c int all = 0; int priority = -1; /* non-prioritized swap by default */ -@@ -238,11 +267,114 @@ swap_reinitialize(const char *device) { +@@ -238,11 +267,116 @@ swap_reinitialize(const char *device) { return -1; /* error */ } @@ -76,10 +76,10 @@ Index: util-linux-ng-2.14.1/mount/swapon.c +{ + int fd; + char *buf; -+ unsigned int *page, last_page; ++ unsigned int *page, last_page = 0; + unsigned int pagesize = 0; + off_t size, swap_size; -+ int swap_version; ++ int swap_version = 0; + int flip = 0; + struct swap_info *s; + @@ -121,16 +121,18 @@ Index: util-linux-ng-2.14.1/mount/swapon.c + } + if (pagesize) { + s = (struct swap_info *)buf; -+ if (s->version == 1) ++ if (s->version == 1) { ++ swap_version = 1; + last_page = s->last_page; -+ else if (bswap_32(s->version) == 1) { ++ } else if (bswap_32(s->version) == 1) { + flip = 1; ++ swap_version = 1; + last_page = bswap_32(s->last_page); + } + if (verbose) + fprintf(stderr, _("found %sswap v%d signature string" + " for %d KiB PAGE_SIZE\n"), -+ flip ? "other-endian " : "", swap_version - 1, ++ flip ? "other-endian " : "", swap_version, + pagesize / 1024); + swap_size = (last_page + 1) * pagesize; + if (swap_size > size) { @@ -160,7 +162,7 @@ Index: util-linux-ng-2.14.1/mount/swapon.c if (verbose) printf(_("%s on %s\n"), progname, orig_special); -@@ -260,6 +392,15 @@ do_swapon(const char *orig_special, int +@@ -260,6 +394,15 @@ do_swapon(const char *orig_special, int return -1; } @@ -176,7 +178,7 @@ Index: util-linux-ng-2.14.1/mount/swapon.c /* We have to reinitialize swap with old (=useless) software suspend * data. The problem is that if we don't do it, then we get data * corruption the next time an attempt at unsuspending is made. -@@ -268,6 +409,10 @@ do_swapon(const char *orig_special, int +@@ -268,6 +411,10 @@ do_swapon(const char *orig_special, int fprintf(stdout, _("%s: %s: software suspend data detected. " "Reinitializing the swap.\n"), progname, special); diff --git a/util-linux.changes b/util-linux.changes index 7c5beab..3eb1c76 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Nov 7 14:50:00 CET 2008 - mkoenig@suse.de + +- fdisk: support +cylinder notation [bnc#441871] +- check for EACCES when using ro fallback when loop mounting + a readonly image +- fix uninitialized variable in swapon pagesize detection + ------------------------------------------------------------------- Mon Oct 27 17:33:01 CET 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 105c3b8..bdc086c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -30,7 +30,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14.1 -Release: 5 +Release: 6 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -78,6 +78,8 @@ Patch11: util-linux-2.14.1-mount_swap_pagesize.patch Patch12: util-linux-2.14.1-sys-utils_lscpu_exit.patch Patch13: util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch Patch14: util-linux-2.14.1-fdisk_missing_include.patch +Patch15: util-linux-2.14.1-fdisk_cylinder.patch +Patch16: util-linux-2.14.1-mount_loop_ro_fix.patch # crypto patch Patch20: util-linux-mount_losetup_crypto.patch ## @@ -128,6 +130,8 @@ Authors: %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 +%patch16 -p1 %patch20 -p1 cp %{SOURCE7} %{SOURCE8} . # @@ -595,6 +599,11 @@ fi #%endif %changelog +* Fri Nov 07 2008 mkoenig@suse.de +- fdisk: support +cylinder notation [bnc#441871] +- check for EACCES when using ro fallback when loop mounting + a readonly image +- fix uninitialized variable in swapon pagesize detection * Mon Oct 27 2008 mkoenig@suse.de - fdisk: add missing includes [bnc#438670] * Thu Oct 23 2008 mkoenig@suse.de @@ -953,7 +962,7 @@ fi umount -a, resolves #190385 * Mon Jun 12 2006 kay.sievers@suse.de - use libvolume_id from provided as a rpm by udev 094 -* Thu May 18 2006 jeffm@suse.com +* Wed May 17 2006 jeffm@suse.com - Fixed support for calling external programs w/o -t , it would add mtab twice [#176582] * Mon Apr 24 2006 hvogel@suse.de @@ -1047,7 +1056,7 @@ fi - Don't package manual executable [#114849] * Thu Sep 01 2005 mmj@suse.de - Add patch for device-mapper mount by label support [#75966] -* Thu Sep 01 2005 ro@suse.de +* Wed Aug 31 2005 ro@suse.de - provide and obsolete schedutils * Tue Aug 23 2005 hvogel@suse.de - update ionice patch by axboe so that ionice will complain about @@ -1180,7 +1189,7 @@ fi - Add patch from SGI for fdisk label [#47368] * Tue Sep 28 2004 mmj@suse.de - And another one [#46201] -* Thu Sep 16 2004 mmj@suse.de +* Wed Sep 15 2004 mmj@suse.de - Add patch from Andries to fix cfdisk [#44996] * Tue Sep 07 2004 mmj@suse.de - Update to util-linux-2.12c including: @@ -1507,7 +1516,7 @@ fi o mount updates * Tue Jul 23 2002 schwab@suse.de - Fix mkfs.cramfs for architectures with non-4k pages. -* Wed Jul 17 2002 mmj@suse.de +* Tue Jul 16 2002 mmj@suse.de - Merged base into util-linux * Mon Jul 15 2002 mmj@suse.de - Added JFSv2 patch from Christoph Hellwig for volume label. Does @@ -1580,7 +1589,7 @@ fi - Remove unneeded SPARC patch for hwclock * Sat Oct 13 2001 kukuk@suse.de - Update to util-linux 2.11l -* Wed Sep 12 2001 garloff@suse.de +* Tue Sep 11 2001 garloff@suse.de - Fixed some dutch translations. (bug #10276) * Mon Sep 10 2001 olh@suse.de - marry fdisk and AIX label again... @@ -1615,7 +1624,7 @@ fi - Remove swapdev from filelist * Tue Jul 10 2001 kukuk@suse.de - Update to util-linux-2.11g -* Thu Jun 07 2001 bk@suse.de +* Wed Jun 06 2001 bk@suse.de - added s390x to all ifnarch s390 * Fri Apr 20 2001 kukuk@suse.de - Fix wall bug (character 80, 160, 240, are missing) [Bug #6962] @@ -1696,7 +1705,7 @@ fi * Fri Aug 25 2000 pthomas@suse.de - use %%{_mandir} and %%{_infodir} exclusively. This allows building from source rpm on platforms other than 7.0. -* Wed Jul 19 2000 bk@suse.de +* Tue Jul 18 2000 bk@suse.de - s390: removed dasdfmt and silo, %%ifnarch s390 for some non-s390 things. * Tue May 30 2000 bk@suse.de - added dasdfmt and silo on s390 @@ -1844,14 +1853,14 @@ fi - changed /local/bin/perl5 in chkdupexe to /usr/bin/perl * Fri Oct 31 1997 ro@suse.de - temporarily removed mount-hacker -* Thu Oct 30 1997 florian@suse.de +* Wed Oct 29 1997 florian@suse.de - add changes from ms@suse.de for hostid.c * Tue May 20 1997 florian@suse.de - only support kernel 2.0.x for nfs mounts, please use /bin/mount-hacker for kernel 2.1.x * Wed Apr 30 1997 florian@suse.de - update to mount 2.6g -* Mon Apr 14 1997 florian@suse.de +* Sun Apr 13 1997 florian@suse.de - update to new version util-linux 2.6 - update to new version mount 2.6e * Thu Jan 02 1997 florian@suse.de From eeea72b9f482307d207e97810e0eaf18f53bf785d5afde4c70b4e753021275a8 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 21 Nov 2008 14:54:57 +0000 Subject: [PATCH 067/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=67 --- addnote.c | 205 ++++++++++++++++++ ...ux-2.14.1-hwclock_adjust_and_hctosys.patch | 170 +++++++++++++++ util-linux-2.14.1-mount_race.patch | 151 +++++++++++++ util-linux-2.14.1-mount_skip_sync.patch | 27 +++ util-linux.changes | 11 + util-linux.spec | 22 +- 6 files changed, 584 insertions(+), 2 deletions(-) create mode 100644 addnote.c create mode 100644 util-linux-2.14.1-hwclock_adjust_and_hctosys.patch create mode 100644 util-linux-2.14.1-mount_race.patch create mode 100644 util-linux-2.14.1-mount_skip_sync.patch diff --git a/addnote.c b/addnote.c new file mode 100644 index 0000000..d2be416 --- /dev/null +++ b/addnote.c @@ -0,0 +1,205 @@ +/* + * Program to hack in a PT_NOTE program header entry in an ELF file. + * This is needed for OF on RS/6000s to load an image correctly. + * Note that OF needs a program header entry for the note, not an + * ELF section. + * + * Copyright 2000 Paul Mackerras. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * Usage: addnote zImage + */ +#include +#include +#include +#include +#include + +/* CHRP note section */ +char arch[] = "PowerPC"; + +#define N_DESCR 6 +unsigned int descr[N_DESCR] = { + 0xffffffff, /* real-mode = true */ + 0x02000000, /* real-base, i.e. where we expect OF to be */ + 0xffffffff, /* real-size */ + 0xffffffff, /* virt-base */ + 0xffffffff, /* virt-size */ + 0x4000, /* load-base */ +}; + +/* RPA note section */ +char rpaname[] = "IBM,RPA-Client-Config"; + +/* + * Note: setting ignore_my_client_config *should* mean that OF ignores + * all the other fields, but there is a firmware bug which means that + * it looks at the splpar field at least. So these values need to be + * reasonable. + */ +#define N_RPA_DESCR 8 +unsigned int rpanote[N_RPA_DESCR] = { + 0, /* lparaffinity */ + 64, /* min_rmo_size */ + 0, /* min_rmo_percent */ + 40, /* max_pft_size */ + 1, /* splpar */ + -1, /* min_load */ + 0, /* new_mem_def */ + 1, /* ignore_my_client_config */ +}; + +#define ROUNDUP(len) (((len) + 3) & ~3) + +unsigned char buf[512]; + +#define GET_16BE(off) ((buf[off] << 8) + (buf[(off)+1])) +#define GET_32BE(off) ((GET_16BE(off) << 16) + GET_16BE((off)+2)) + +#define PUT_16BE(off, v) (buf[off] = ((v) >> 8) & 0xff, \ + buf[(off) + 1] = (v) & 0xff) +#define PUT_32BE(off, v) (PUT_16BE((off), (v) >> 16), \ + PUT_16BE((off) + 2, (v))) + +/* Structure of an ELF file */ +#define E_IDENT 0 /* ELF header */ +#define E_PHOFF 28 +#define E_PHENTSIZE 42 +#define E_PHNUM 44 +#define E_HSIZE 52 /* size of ELF header */ + +#define EI_MAGIC 0 /* offsets in E_IDENT area */ +#define EI_CLASS 4 +#define EI_DATA 5 + +#define PH_TYPE 0 /* ELF program header */ +#define PH_OFFSET 4 +#define PH_FILESZ 16 +#define PH_HSIZE 32 /* size of program header */ + +#define PT_NOTE 4 /* Program header type = note */ + +#define ELFCLASS32 1 +#define ELFDATA2MSB 2 + +unsigned char elf_magic[4] = { 0x7f, 'E', 'L', 'F' }; + +int +main(int ac, char **av) +{ + int fd, n, i; + int ph, ps, np; + int nnote, nnote2, ns; + + if (ac != 2) { + fprintf(stderr, "Usage: %s elf-file\n", av[0]); + exit(1); + } + fd = open(av[1], O_RDWR); + if (fd < 0) { + perror(av[1]); + exit(1); + } + + nnote = 12 + ROUNDUP(strlen(arch) + 1) + sizeof(descr); + nnote2 = 12 + ROUNDUP(strlen(rpaname) + 1) + sizeof(rpanote); + + n = read(fd, buf, sizeof(buf)); + if (n < 0) { + perror("read"); + exit(1); + } + + if (n < E_HSIZE || memcmp(&buf[E_IDENT+EI_MAGIC], elf_magic, 4) != 0) + goto notelf; + + if (buf[E_IDENT+EI_CLASS] != ELFCLASS32 + || buf[E_IDENT+EI_DATA] != ELFDATA2MSB) { + fprintf(stderr, "%s is not a big-endian 32-bit ELF image\n", + av[1]); + exit(1); + } + + ph = GET_32BE(E_PHOFF); + ps = GET_16BE(E_PHENTSIZE); + np = GET_16BE(E_PHNUM); + if (ph < E_HSIZE || ps < PH_HSIZE || np < 1) + goto notelf; + if (ph + (np + 2) * ps + nnote + nnote2 > n) + goto nospace; + + for (i = 0; i < np; ++i) { + if (GET_32BE(ph + PH_TYPE) == PT_NOTE) { + fprintf(stderr, "%s already has a note entry\n", + av[1]); + exit(0); + } + ph += ps; + } + + /* XXX check that the area we want to use is all zeroes */ + for (i = 0; i < 2 * ps + nnote + nnote2; ++i) + if (buf[ph + i] != 0) + goto nospace; + + /* fill in the program header entry */ + ns = ph + 2 * ps; + PUT_32BE(ph + PH_TYPE, PT_NOTE); + PUT_32BE(ph + PH_OFFSET, ns); + PUT_32BE(ph + PH_FILESZ, nnote); + + /* fill in the note area we point to */ + /* XXX we should probably make this a proper section */ + PUT_32BE(ns, strlen(arch) + 1); + PUT_32BE(ns + 4, N_DESCR * 4); + PUT_32BE(ns + 8, 0x1275); + strcpy((char *) &buf[ns + 12], arch); + ns += 12 + strlen(arch) + 1; + for (i = 0; i < N_DESCR; ++i, ns += 4) + PUT_32BE(ns, descr[i]); + + /* fill in the second program header entry and the RPA note area */ + ph += ps; + PUT_32BE(ph + PH_TYPE, PT_NOTE); + PUT_32BE(ph + PH_OFFSET, ns); + PUT_32BE(ph + PH_FILESZ, nnote2); + + /* fill in the note area we point to */ + PUT_32BE(ns, strlen(rpaname) + 1); + PUT_32BE(ns + 4, sizeof(rpanote)); + PUT_32BE(ns + 8, 0x12759999); + strcpy((char *) &buf[ns + 12], rpaname); + ns += 12 + ROUNDUP(strlen(rpaname) + 1); + for (i = 0; i < N_RPA_DESCR; ++i, ns += 4) + PUT_32BE(ns, rpanote[i]); + + /* Update the number of program headers */ + PUT_16BE(E_PHNUM, np + 2); + + /* write back */ + lseek(fd, (long) 0, SEEK_SET); + i = write(fd, buf, n); + if (i < 0) { + perror("write"); + exit(1); + } + if (i < n) { + fprintf(stderr, "%s: write truncated\n", av[1]); + exit(1); + } + + exit(0); + + notelf: + fprintf(stderr, "%s does not appear to be an ELF file\n", av[1]); + exit(1); + + nospace: + fprintf(stderr, "sorry, I can't find space in %s to put the note\n", + av[1]); + exit(1); +} diff --git a/util-linux-2.14.1-hwclock_adjust_and_hctosys.patch b/util-linux-2.14.1-hwclock_adjust_and_hctosys.patch new file mode 100644 index 0000000..24dc201 --- /dev/null +++ b/util-linux-2.14.1-hwclock_adjust_and_hctosys.patch @@ -0,0 +1,170 @@ +From: Kurt Garloff +Subject: Allow to combine --adjust and --hctosys +Reference: bnc441106 + +Waiting for a clock tick twice when calling --adjust and --hctosys +is wasteful. Having to do it once is bad enough. +This patch allows combining the two options. + +[Patch 1/5] + +Index: util-linux-ng-2.14.1/hwclock/hwclock.c +=================================================================== +--- util-linux-ng-2.14.1.orig/hwclock/hwclock.c ++++ util-linux-ng-2.14.1/hwclock/hwclock.c +@@ -490,13 +490,18 @@ set_hardware_clock(const time_t newtime, + } + + + ++static int ++set_system_clock(const bool hclock_valid, const time_t newtime, ++ const bool testing, const int usec); ++ + static void + set_hardware_clock_exact(const time_t sethwtime, + const struct timeval refsystime, + const bool universal, +- const bool testing) { ++ const bool testing, ++ const bool hctosys) { + /*---------------------------------------------------------------------------- + Set the Hardware Clock to the time "sethwtime", in local time zone or UTC, + according to "universal". + +@@ -539,8 +544,10 @@ set_hardware_clock_exact(const time_t se + if (tdiff < 0) + goto time_resync; /* probably time was reset */ + } while (time_diff(nowsystime, refsystime) - 0.5 < newhwtime - sethwtime); + ++ if (hctosys) ++ set_system_clock(TRUE, newhwtime, testing, 500000); + set_hardware_clock(newhwtime, universal, testing); + } + + +@@ -671,9 +678,9 @@ interpret_date_string(const char *date_o + + + static int + set_system_clock(const bool hclock_valid, const time_t newtime, +- const bool testing) { ++ const bool testing, const int usec) { + /*---------------------------------------------------------------------------- + Set the System Clock to time 'newtime'. + + Also set the kernel time zone value to the value indicated by the +@@ -699,9 +706,9 @@ set_system_clock(const bool hclock_valid + int minuteswest; + int rc; + + tv.tv_sec = newtime; +- tv.tv_usec = 0; ++ tv.tv_usec = usec; + + broken = localtime(&newtime); + #ifdef HAVE_TM_GMTOFF + minuteswest = -broken->tm_gmtoff/60; /* GNU extension */ +@@ -935,9 +942,10 @@ save_adjtime(const struct adjtime adjtim + static void + do_adjustment(struct adjtime *adjtime_p, + const bool hclock_valid, const time_t hclocktime, + const struct timeval read_time, +- const bool universal, const bool testing) { ++ const bool universal, const bool testing, ++ const bool hctosys) { + /*--------------------------------------------------------------------------- + Do the adjustment requested, by 1) setting the Hardware Clock (if + necessary), and 2) updating the last-adjusted time in the adjtime + structure. +@@ -990,9 +998,9 @@ do_adjustment(struct adjtime *adjtime_p, + &adjustment, &retro); + if (adjustment > 0 || adjustment < -1) { + set_hardware_clock_exact(hclocktime + adjustment, + time_inc(read_time, -retro), +- universal, testing); ++ universal, testing, hctosys); + adjtime_p->last_adj_time = hclocktime + adjustment; + adjtime_p->not_adjusted = 0; + adjtime_p->dirty = TRUE; + } else +@@ -1046,8 +1054,9 @@ manipulate_clock(const bool show, const + struct adjtime adjtime; + /* Contents of the adjtime file, or what they should be. */ + int rc; /* local return code */ + bool no_auth; /* User lacks necessary authorization to access the clock */ ++ int usec = 0; + + no_auth = ur->get_permissions(); + if (no_auth) + return EX_NOPERM; +@@ -1097,15 +1106,15 @@ manipulate_clock(const bool show, const + display_time(hclock_valid, hclocktime, + time_diff(read_time, startup_time)); + } else if (set) { + set_hardware_clock_exact(set_time, startup_time, +- universal, testing); ++ universal, testing, FALSE); + if (!noadjfile) + adjust_drift_factor(&adjtime, set_time, hclock_valid, hclocktime, + time_diff(read_time, startup_time)); + } else if (adjust) { + do_adjustment(&adjtime, hclock_valid, hclocktime, +- read_time, universal, testing); ++ read_time, universal, testing, hctosys); + } else if (systohc) { + struct timeval nowtime, reftime; + /* We can only set_hardware_clock_exact to a whole seconds + time, so we set it with reference to the most recent +@@ -1115,14 +1124,14 @@ manipulate_clock(const bool show, const + reftime.tv_sec = nowtime.tv_sec; + reftime.tv_usec = 0; + + set_hardware_clock_exact((time_t) reftime.tv_sec, reftime, +- universal, testing); ++ universal, testing, FALSE); + if (!noadjfile) + adjust_drift_factor(&adjtime, (time_t) reftime.tv_sec, hclock_valid, + hclocktime, (double) read_time.tv_usec / 1E6); + } else if (hctosys) { +- rc = set_system_clock(hclock_valid, hclocktime, testing); ++ rc = set_system_clock(hclock_valid, hclocktime, testing, usec); + if (rc) { + printf(_("Unable to set system clock.\n")); + return rc; + } +@@ -1442,9 +1451,16 @@ main(int argc, char **argv) { + "You supplied %d.\n"), + MYNAME, argc); + } + +- if (show + set + systohc + hctosys + adjust + getepoch + setepoch > 1){ ++ if (show + set + systohc + hctosys + getepoch + setepoch > 1){ ++ fprintf(stderr, _("You have specified multiple functions.\n" ++ "You can only perform one function " ++ "at a time.\n")); ++ hwclock_exit(EX_USAGE); ++ } ++ ++ if (show + set + systohc + adjust + getepoch + setepoch > 1){ + fprintf(stderr, _("You have specified multiple functions.\n" + "You can only perform one function " + "at a time.\n")); + hwclock_exit(EX_USAGE); +Index: util-linux-ng-2.14.1/hwclock/hwclock.8 +=================================================================== +--- util-linux-ng-2.14.1.orig/hwclock/hwclock.8 ++++ util-linux-ng-2.14.1/hwclock/hwclock.8 +@@ -86,8 +86,12 @@ Set the Hardware Clock to the current Sy + .B \-\-adjust + Add or subtract time from the Hardware Clock to account for systematic + drift since the last time the clock was set or adjusted. See discussion + below. ++.B \-\-adjust ++can be used together with ++.B \-\-hctosys ++to speed up the boot process by 1s. + .TP + .B \-\-getepoch + Print the kernel's Hardware Clock epoch value to standard output. + This is the number of years into AD to which a zero year value in the diff --git a/util-linux-2.14.1-mount_race.patch b/util-linux-2.14.1-mount_race.patch new file mode 100644 index 0000000..23a232f --- /dev/null +++ b/util-linux-2.14.1-mount_race.patch @@ -0,0 +1,151 @@ +Index: util-linux-ng-2.14.1/mount/fstab.c +=================================================================== +--- util-linux-ng-2.14.1.orig/mount/fstab.c 2008-05-29 01:01:02.000000000 +0200 ++++ util-linux-ng-2.14.1/mount/fstab.c 2008-11-18 18:08:59.000000000 +0100 +@@ -773,8 +773,6 @@ update_mtab (const char *dir, struct my_ + if (mtab_does_not_exist() || !mtab_is_writable()) + return; + +- lock_mtab(); +- + /* having locked mtab, read it again */ + mc0 = mc = &mtabhead; + mc->nxt = mc->prev = NULL; +@@ -893,7 +891,7 @@ update_mtab (const char *dir, struct my_ + } + + leave: +- unlock_mtab(); ++ ; + } + + +Index: util-linux-ng-2.14.1/mount/umount.c +=================================================================== +--- util-linux-ng-2.14.1.orig/mount/umount.c 2008-07-02 15:08:50.000000000 +0200 ++++ util-linux-ng-2.14.1/mount/umount.c 2008-11-19 17:17:36.000000000 +0100 +@@ -102,6 +102,8 @@ check_special_umountprog(const char *spe + if (strlen(type) < 100) { + sprintf(umountprog, "/sbin/umount.%s", type); + if (stat(umountprog, &statbuf) == 0) { ++ /* unlock mtab if we need to exec */ ++ unlock_mtab(); + res = fork(); + if (res == 0) { + char *umountargs[8]; +@@ -383,6 +385,7 @@ umount_all (char *types, char *test_opts + struct mntentchn *mc, *hd; + int errors = 0; + ++ lock_mtab(); + hd = mtab_head(); + if (!hd->prev) + die (2, _("umount: cannot find list of filesystems to unmount")); +@@ -393,6 +396,7 @@ umount_all (char *types, char *test_opts + mc->m.mnt_type, mc->m.mnt_opts, mc); + } + } ++ unlock_mtab(); + + sync (); + return errors; +@@ -463,6 +467,7 @@ umount_file (char *arg) { + const char *file, *options; + int fstab_has_user, fstab_has_users, fstab_has_owner, fstab_has_group; + int ok; ++ int ret; + + if (!*arg) { /* "" would be expanded to `pwd` */ + die(2, _("Cannot umount \"\"\n")); +@@ -473,6 +478,7 @@ umount_file (char *arg) { + if (verbose > 1) + printf(_("Trying to umount %s\n"), file); + ++ lock_mtab(); + mc = getmntdirbackward(file, NULL); + if (!mc) + mc = getmntdevbackward(file, NULL); +@@ -572,9 +578,12 @@ umount_file (char *arg) { + } + + if (mc) +- return umount_one_bw (file, mc); ++ ret = umount_one_bw (file, mc); + else +- return umount_one (arg, arg, arg, arg, NULL); ++ ret = umount_one (arg, arg, arg, arg, NULL); ++ ++ unlock_mtab(); ++ return ret; + } + + int +Index: util-linux-ng-2.14.1/mount/mount.c +=================================================================== +--- util-linux-ng-2.14.1.orig/mount/mount.c 2008-11-18 18:08:59.000000000 +0100 ++++ util-linux-ng-2.14.1/mount/mount.c 2008-11-18 18:09:04.000000000 +0100 +@@ -521,8 +521,6 @@ create_mtab (void) { + int flags; + mntFILE *mfp; + +- lock_mtab(); +- + mfp = my_setmntent (_PATH_MOUNTED, "a+"); + if (mfp == NULL || mfp->mntent_fp == NULL) { + int errsv = errno; +@@ -556,8 +554,6 @@ create_mtab (void) { + } + my_endmntent (mfp); + +- unlock_mtab(); +- + reset_mtab_info(); + } + +@@ -1004,7 +1000,6 @@ update_mtab_entry(const char *spec, cons + else { + mntFILE *mfp; + +- lock_mtab(); + mfp = my_setmntent(_PATH_MOUNTED, "a+"); + if (mfp == NULL || mfp->mntent_fp == NULL) { + int errsv = errno; +@@ -1018,7 +1013,6 @@ update_mtab_entry(const char *spec, cons + } + } + my_endmntent(mfp); +- unlock_mtab(); + } + } + my_free(mnt.mnt_fsname); +@@ -1138,12 +1132,14 @@ try_mount_one (const char *spec0, const + + mount_retry: + block_signals (SIG_BLOCK); ++ lock_mtab(); + + if (!fake) { + mnt5_res = guess_fstype_and_mount (spec, node, &types, flags & ~MS_NOSYS, + mount_opts, &special, &status); + + if (special) { ++ unlock_mtab(); + block_signals (SIG_UNBLOCK); + res = status; + goto out; +@@ -1163,6 +1159,7 @@ mount_retry: + pass); + } + ++ unlock_mtab(); + block_signals (SIG_UNBLOCK); + res = 0; + goto out; +@@ -1173,6 +1170,7 @@ mount_retry: + if (loop) + del_loop(spec); + ++ unlock_mtab(); + block_signals (SIG_UNBLOCK); + + /* Mount failed, complain, but don't die. */ diff --git a/util-linux-2.14.1-mount_skip_sync.patch b/util-linux-2.14.1-mount_skip_sync.patch new file mode 100644 index 0000000..7f5a3ab --- /dev/null +++ b/util-linux-2.14.1-mount_skip_sync.patch @@ -0,0 +1,27 @@ +Index: util-linux-ng-2.14.1/mount/umount.c +=================================================================== +--- util-linux-ng-2.14.1.orig/mount/umount.c 2008-11-20 15:01:09.000000000 +0100 ++++ util-linux-ng-2.14.1/mount/umount.c 2008-11-20 15:04:39.000000000 +0100 +@@ -384,6 +384,7 @@ static int + umount_all (char *types, char *test_opts) { + struct mntentchn *mc, *hd; + int errors = 0; ++ int do_sync = 0; + + lock_mtab(); + hd = mtab_head(); +@@ -394,11 +395,13 @@ umount_all (char *types, char *test_opts + && matching_opts (mc->m.mnt_opts, test_opts)) { + errors |= umount_one (mc->m.mnt_fsname, mc->m.mnt_dir, + mc->m.mnt_type, mc->m.mnt_opts, mc); ++ do_sync = 1; + } + } + unlock_mtab(); + +- sync (); ++ if (do_sync) ++ sync (); + return errors; + } + diff --git a/util-linux.changes b/util-linux.changes index 3eb1c76..42c9a3a 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Nov 20 18:08:33 CET 2008 - mkoenig@suse.de + +- mount: enhance mount/umount mtab locking and lock the whole + read mtab/syscall/write mtab process to avoid mtab corruption + with highly concurrent mount/umount calls [bnc#444966] +- add arch/powerpc/boot/addnote.c from kernel 2.6.27 + as /usr/bin/chrp-addnote [bnc#443859] +- umount: skip sync() in umount -a if no umount happened [bnc#447036] +- hwclock: allow --adjust and --hctosys simultaneously [bnc#441106] + ------------------------------------------------------------------- Fri Nov 7 14:50:00 CET 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index bdc086c..54f6a7e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -30,7 +30,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14.1 -Release: 6 +Release: 7 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -57,6 +57,7 @@ Source26: README.raw Source28: mkzimage_cmdline.8 Source29: mkzimage_cmdline.c Source30: README.largedisk +Source31: addnote.c ## ## util-linux patches ## @@ -80,6 +81,9 @@ Patch13: util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patc Patch14: util-linux-2.14.1-fdisk_missing_include.patch Patch15: util-linux-2.14.1-fdisk_cylinder.patch Patch16: util-linux-2.14.1-mount_loop_ro_fix.patch +Patch17: util-linux-2.14.1-mount_race.patch +Patch18: util-linux-2.14.1-mount_skip_sync.patch +Patch19: util-linux-2.14.1-hwclock_adjust_and_hctosys.patch # crypto patch Patch20: util-linux-mount_losetup_crypto.patch ## @@ -132,6 +136,9 @@ Authors: %patch14 -p1 %patch15 -p1 %patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 %patch20 -p1 cp %{SOURCE7} %{SOURCE8} . # @@ -222,6 +229,7 @@ autoreconf -fi make gcc $RPM_OPT_FLAGS -o nologin nologin.c gcc $RPM_OPT_FLAGS -o mkzimage_cmdline %{S:29} +gcc $RPM_OPT_FLAGS -o chrp-addnote %{SOURCE31} %check cd ../time-%{time_ver} @@ -272,6 +280,7 @@ install -m 755 nologin $RPM_BUILD_ROOT/sbin %ifnarch ppc ppc64 install -m 755 mkzimage_cmdline $RPM_BUILD_ROOT/usr/bin install -m 644 %{S:28} $RPM_BUILD_ROOT%{_mandir}/man8 +install -m 755 chrp-addnote $RPM_BUILD_ROOT/usr/bin %endif install -m 644 nologin.8 $RPM_BUILD_ROOT%{_mandir}/man8 # setctsid install @@ -284,7 +293,7 @@ install -m 644 $RPM_SOURCE_DIR/etc.raw $RPM_BUILD_ROOT/etc/raw install -m 755 $RPM_SOURCE_DIR/raw.init $RPM_BUILD_ROOT/etc/init.d/raw ln -sf ../../etc/init.d/raw $RPM_BUILD_ROOT/usr/sbin/rcraw # Stupid hack so we don't have a tcsh dependency -#chmod 644 $RPM_BUILD_ROOT/usr/share/misc/getopt/* +chmod 644 $RPM_BUILD_ROOT/usr/share/getopt/getopt*.tcsh # Following files we don't want to package, so remove them rm -f $RPM_BUILD_ROOT/usr/bin/pg rm -f $RPM_BUILD_ROOT/usr/share/man/man1/pg.1* @@ -431,6 +440,7 @@ fi /usr/bin/mcookie /usr/bin/mesg %ifnarch ppc ppc64 +/usr/bin/chrp-addnote /usr/bin/mkzimage_cmdline %endif /usr/bin/namei @@ -599,6 +609,14 @@ fi #%endif %changelog +* Thu Nov 20 2008 mkoenig@suse.de +- mount: enhance mount/umount mtab locking and lock the whole + read mtab/syscall/write mtab process to avoid mtab corruption + with highly concurrent mount/umount calls [bnc#444966] +- add arch/powerpc/boot/addnote.c from kernel 2.6.27 + as /usr/bin/chrp-addnote [bnc#443859] +- umount: skip sync() in umount -a if no umount happened [bnc#447036] +- hwclock: allow --adjust and --hctosys simultaneously [bnc#441106] * Fri Nov 07 2008 mkoenig@suse.de - fdisk: support +cylinder notation [bnc#441871] - check for EACCES when using ro fallback when loop mounting From f743dbdadcfeaa1e66da3e1932614ec4b4fec600a1d95c001dc5d487721ef942 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 24 Nov 2008 15:20:34 +0000 Subject: [PATCH 068/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=68 --- util-linux-2.14.1-mount_race.patch | 37 ++++++++++++++++-------------- util-linux.changes | 5 ++++ util-linux.spec | 4 +++- 3 files changed, 28 insertions(+), 18 deletions(-) diff --git a/util-linux-2.14.1-mount_race.patch b/util-linux-2.14.1-mount_race.patch index 23a232f..9769d1d 100644 --- a/util-linux-2.14.1-mount_race.patch +++ b/util-linux-2.14.1-mount_race.patch @@ -1,7 +1,7 @@ Index: util-linux-ng-2.14.1/mount/fstab.c =================================================================== ---- util-linux-ng-2.14.1.orig/mount/fstab.c 2008-05-29 01:01:02.000000000 +0200 -+++ util-linux-ng-2.14.1/mount/fstab.c 2008-11-18 18:08:59.000000000 +0100 +--- util-linux-ng-2.14.1.orig/mount/fstab.c 2008-11-24 14:26:14.000000000 +0100 ++++ util-linux-ng-2.14.1/mount/fstab.c 2008-11-24 14:45:35.000000000 +0100 @@ -773,8 +773,6 @@ update_mtab (const char *dir, struct my_ if (mtab_does_not_exist() || !mtab_is_writable()) return; @@ -22,8 +22,8 @@ Index: util-linux-ng-2.14.1/mount/fstab.c Index: util-linux-ng-2.14.1/mount/umount.c =================================================================== ---- util-linux-ng-2.14.1.orig/mount/umount.c 2008-07-02 15:08:50.000000000 +0200 -+++ util-linux-ng-2.14.1/mount/umount.c 2008-11-19 17:17:36.000000000 +0100 +--- util-linux-ng-2.14.1.orig/mount/umount.c 2008-11-24 14:26:14.000000000 +0100 ++++ util-linux-ng-2.14.1/mount/umount.c 2008-11-24 14:46:50.000000000 +0100 @@ -102,6 +102,8 @@ check_special_umountprog(const char *spe if (strlen(type) < 100) { sprintf(umountprog, "/sbin/umount.%s", type); @@ -33,15 +33,16 @@ Index: util-linux-ng-2.14.1/mount/umount.c res = fork(); if (res == 0) { char *umountargs[8]; -@@ -383,6 +385,7 @@ umount_all (char *types, char *test_opts +@@ -383,6 +385,8 @@ umount_all (char *types, char *test_opts struct mntentchn *mc, *hd; int errors = 0; -+ lock_mtab(); ++ if (!nomtab && mtab_is_writable()) ++ lock_mtab(); hd = mtab_head(); if (!hd->prev) die (2, _("umount: cannot find list of filesystems to unmount")); -@@ -393,6 +396,7 @@ umount_all (char *types, char *test_opts +@@ -393,6 +397,7 @@ umount_all (char *types, char *test_opts mc->m.mnt_type, mc->m.mnt_opts, mc); } } @@ -49,7 +50,7 @@ Index: util-linux-ng-2.14.1/mount/umount.c sync (); return errors; -@@ -463,6 +467,7 @@ umount_file (char *arg) { +@@ -463,6 +468,7 @@ umount_file (char *arg) { const char *file, *options; int fstab_has_user, fstab_has_users, fstab_has_owner, fstab_has_group; int ok; @@ -57,15 +58,16 @@ Index: util-linux-ng-2.14.1/mount/umount.c if (!*arg) { /* "" would be expanded to `pwd` */ die(2, _("Cannot umount \"\"\n")); -@@ -473,6 +478,7 @@ umount_file (char *arg) { +@@ -473,6 +479,8 @@ umount_file (char *arg) { if (verbose > 1) printf(_("Trying to umount %s\n"), file); -+ lock_mtab(); ++ if (!nomtab && mtab_is_writable()) ++ lock_mtab(); mc = getmntdirbackward(file, NULL); if (!mc) mc = getmntdevbackward(file, NULL); -@@ -572,9 +578,12 @@ umount_file (char *arg) { +@@ -572,9 +580,12 @@ umount_file (char *arg) { } if (mc) @@ -82,8 +84,8 @@ Index: util-linux-ng-2.14.1/mount/umount.c int Index: util-linux-ng-2.14.1/mount/mount.c =================================================================== ---- util-linux-ng-2.14.1.orig/mount/mount.c 2008-11-18 18:08:59.000000000 +0100 -+++ util-linux-ng-2.14.1/mount/mount.c 2008-11-18 18:09:04.000000000 +0100 +--- util-linux-ng-2.14.1.orig/mount/mount.c 2008-11-24 14:26:14.000000000 +0100 ++++ util-linux-ng-2.14.1/mount/mount.c 2008-11-24 14:46:13.000000000 +0100 @@ -521,8 +521,6 @@ create_mtab (void) { int flags; mntFILE *mfp; @@ -118,11 +120,12 @@ Index: util-linux-ng-2.14.1/mount/mount.c } } my_free(mnt.mnt_fsname); -@@ -1138,12 +1132,14 @@ try_mount_one (const char *spec0, const +@@ -1138,12 +1132,15 @@ try_mount_one (const char *spec0, const mount_retry: block_signals (SIG_BLOCK); -+ lock_mtab(); ++ if (!nomtab && mtab_is_writable()) ++ lock_mtab(); if (!fake) { mnt5_res = guess_fstype_and_mount (spec, node, &types, flags & ~MS_NOSYS, @@ -133,7 +136,7 @@ Index: util-linux-ng-2.14.1/mount/mount.c block_signals (SIG_UNBLOCK); res = status; goto out; -@@ -1163,6 +1159,7 @@ mount_retry: +@@ -1163,6 +1160,7 @@ mount_retry: pass); } @@ -141,7 +144,7 @@ Index: util-linux-ng-2.14.1/mount/mount.c block_signals (SIG_UNBLOCK); res = 0; goto out; -@@ -1173,6 +1170,7 @@ mount_retry: +@@ -1173,6 +1171,7 @@ mount_retry: if (loop) del_loop(spec); diff --git a/util-linux.changes b/util-linux.changes index 42c9a3a..3f39d58 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Nov 24 15:24:11 CET 2008 - mkoenig@suse.de + +- mount: fix locking patch to not break -n [bnc#447937] + ------------------------------------------------------------------- Thu Nov 20 18:08:33 CET 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 54f6a7e..1c1f606 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -30,7 +30,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14.1 -Release: 7 +Release: 8 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -609,6 +609,8 @@ fi #%endif %changelog +* Mon Nov 24 2008 mkoenig@suse.de +- mount: fix locking patch to not break -n [bnc#447937] * Thu Nov 20 2008 mkoenig@suse.de - mount: enhance mount/umount mtab locking and lock the whole read mtab/syscall/write mtab process to avoid mtab corruption From 77f02575d0e074bc4fa2b6958849d5fa6b4cf654de7e41f0bcd885770218b81d Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 28 Nov 2008 15:08:25 +0000 Subject: [PATCH 069/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=69 --- fix-hang-on-stale-nfs.diff | 18 ++++++++++++++++++ util-linux.changes | 6 ++++++ util-linux.spec | 7 ++++++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 fix-hang-on-stale-nfs.diff diff --git a/fix-hang-on-stale-nfs.diff b/fix-hang-on-stale-nfs.diff new file mode 100644 index 0000000..64530c8 --- /dev/null +++ b/fix-hang-on-stale-nfs.diff @@ -0,0 +1,18 @@ +--- mount/lomount.c ++++ mount/lomount.c +@@ -109,7 +109,14 @@ static int + is_loop_used(int fd) + { + struct loop_info li; +- return ioctl (fd, LOOP_GET_STATUS, &li) == 0; ++ int ret; ++ ret = ioctl (fd, LOOP_GET_STATUS, &li); ++ if (ret == 0) ++ return 1; ++ if (ret < 0 && (errno == ENXIO)) ++ return 0; ++ /* all other errors, e.g. ENOENT or ESTALE are an error. */ ++ return -1; + } + + int diff --git a/util-linux.changes b/util-linux.changes index 3f39d58..752072f 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Nov 27 01:27:19 CET 2008 - dmueller@suse.de + +- mount: fix hang on trying to find a free loop device + if one of them has a stale nfs handle mounted (bnc#449646) + ------------------------------------------------------------------- Mon Nov 24 15:24:11 CET 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 1c1f606..627dd77 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -30,7 +30,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14.1 -Release: 8 +Release: 9 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -71,6 +71,7 @@ Patch3: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch4: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch # Patch5: util-linux-2.13.1-fdisk_cfdisk_yesno.patch +Patch6: fix-hang-on-stale-nfs.diff Patch7: util-linux-2.14-mount_retry_on_nomedium.patch Patch8: util-linux-2.14.1-lscpu.patch Patch9: util-linux-2.14.1-lscpu_sysroot_option.patch @@ -126,6 +127,7 @@ Authors: %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 %patch7 -p1 %patch8 -p1 %patch9 -p1 @@ -609,6 +611,9 @@ fi #%endif %changelog +* Thu Nov 27 2008 dmueller@suse.de +- mount: fix hang on trying to find a free loop device + if one of them has a stale nfs handle mounted (bnc#449646) * Mon Nov 24 2008 mkoenig@suse.de - mount: fix locking patch to not break -n [bnc#447937] * Thu Nov 20 2008 mkoenig@suse.de From 1132fc73a1851e9cd98d744697abc9c63ee0b84537e3cf0b4f15b751687c673d Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 2 Dec 2008 14:41:53 +0000 Subject: [PATCH 070/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=70 --- ...aw_should_use_ioctl_to_create_device.patch | 118 ++++++++++++++++++ util-linux.changes | 6 + util-linux.spec | 9 +- 3 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 util-linux-2.14.1-disk_utils_raw_should_use_ioctl_to_create_device.patch diff --git a/util-linux-2.14.1-disk_utils_raw_should_use_ioctl_to_create_device.patch b/util-linux-2.14.1-disk_utils_raw_should_use_ioctl_to_create_device.patch new file mode 100644 index 0000000..9dbe559 --- /dev/null +++ b/util-linux-2.14.1-disk_utils_raw_should_use_ioctl_to_create_device.patch @@ -0,0 +1,118 @@ +From: Jeff Mahoney +Subject: [PATCH] raw: Use the RAW_SETBIND ioctl without stat'ing the raw# file +References: bnc#450675 + + The in-kernel ioctl code creates a raw# device on-demand. udev will create + the /dev/raw/raw# file when the device is created automatically. + + The current raw userspace code wants to stat the file before using it, + which is unnecessary for setting up the raw device. + + This patch stats the file only when query() is called as a singleton, and + it's doubtful it's needed even there. I modified as little code as I could, + though. + + Without this patch raw devices WILL NOT WORK on SLE11. + +Signed-off-by: Jeff Mahoney +--- + disk-utils/raw.c | 54 ++++++++++++++++++++++++++++-------------------------- + 1 file changed, 28 insertions(+), 26 deletions(-) + +--- a/disk-utils/raw.c ++++ b/disk-utils/raw.c +@@ -41,7 +41,7 @@ int master_fd; + int raw_minor; + + void open_raw_ctl(void); +-int query(int minor, int quiet); ++int query(int minor, const char *raw_name, int quiet); + int bind (int minor, int block_major, int block_minor); + + +@@ -96,7 +96,7 @@ int main(int argc, char *argv[]) + if (optind < argc) + usage(1); + for (i = 1; i < RAW_NR_MINORS; i++) +- query(i, 1); ++ query(i, NULL, 1); + exit(0); + } + +@@ -122,28 +122,8 @@ int main(int argc, char *argv[]) + exit(2); + } + +- err = stat(raw_name, &statbuf); +- if (err) { +- fprintf (stderr, "Cannot locate raw device '%s' (%s)\n", +- raw_name, strerror(errno)); +- exit(2); +- } +- +- if (!S_ISCHR(statbuf.st_mode)) { +- fprintf (stderr, "Raw device '%s' is not a character dev\n", +- raw_name); +- exit(2); +- } +- if (major(statbuf.st_rdev) != RAW_MAJOR) { +- fprintf (stderr, "Device '%s' is not a raw dev\n", +- raw_name); +- exit(2); +- } +- +- raw_minor = minor(statbuf.st_rdev); +- + if (do_query) +- return query(raw_minor, 0); ++ return query(raw_minor, raw_name, 0); + + /* + * It's not a query, so we still have some parsing to do. Have +@@ -205,13 +185,35 @@ void open_raw_ctl(void) + } + } + +-int query(int minor, int quiet) ++int query(int raw_minor, const char *raw_name, int quiet) + { + struct raw_config_request rq; + static int has_worked = 0; + int err; ++ struct stat statbuf; ++ ++ if (raw_name) { ++ err = stat(raw_name, &statbuf); ++ if (err) { ++ fprintf (stderr, "Cannot locate raw device '%s' (%s)\n", ++ raw_name, strerror(errno)); ++ exit(2); ++ } ++ ++ if (!S_ISCHR(statbuf.st_mode)) { ++ fprintf (stderr, "Raw device '%s' is not a character dev\n", ++ raw_name); ++ exit(2); ++ } ++ if (major(statbuf.st_rdev) != RAW_MAJOR) { ++ fprintf (stderr, "Device '%s' is not a raw dev\n", ++ raw_name); ++ exit(2); ++ } ++ raw_minor = minor(statbuf.st_rdev); ++ } + +- rq.raw_minor = minor; ++ rq.raw_minor = raw_minor; + err = ioctl(master_fd, RAW_GETBIND, &rq); + if (err < 0) { + if (quiet && errno == ENODEV) +@@ -230,7 +232,7 @@ int query(int minor, int quiet) + if (quiet && !rq.block_major && !rq.block_minor) + return 0; + printf (RAWDEVDIR "raw%d: bound to major %d, minor %d\n", +- minor, (int) rq.block_major, (int) rq.block_minor); ++ raw_minor, (int) rq.block_major, (int) rq.block_minor); + return 0; + } + diff --git a/util-linux.changes b/util-linux.changes index 752072f..2788880 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Dec 2 12:23:37 CET 2008 - mkoenig@suse.de + +- raw: do not stat the raw devices when binding, since they + are created dynamically [bnc#450675] + ------------------------------------------------------------------- Thu Nov 27 01:27:19 CET 2008 - dmueller@suse.de diff --git a/util-linux.spec b/util-linux.spec index 627dd77..1035665 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -30,7 +30,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14.1 -Release: 9 +Release: 10 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -85,8 +85,9 @@ Patch16: util-linux-2.14.1-mount_loop_ro_fix.patch Patch17: util-linux-2.14.1-mount_race.patch Patch18: util-linux-2.14.1-mount_skip_sync.patch Patch19: util-linux-2.14.1-hwclock_adjust_and_hctosys.patch +Patch20: util-linux-2.14.1-disk_utils_raw_should_use_ioctl_to_create_device.patch # crypto patch -Patch20: util-linux-mount_losetup_crypto.patch +Patch30: util-linux-mount_losetup_crypto.patch ## ## ## adjtimex @@ -142,6 +143,7 @@ Authors: %patch18 -p1 %patch19 -p1 %patch20 -p1 +%patch30 -p1 cp %{SOURCE7} %{SOURCE8} . # cd adjtimex-* @@ -611,6 +613,9 @@ fi #%endif %changelog +* Tue Dec 02 2008 mkoenig@suse.de +- raw: do not stat the raw devices when binding, since they + are created dynamically [bnc#450675] * Thu Nov 27 2008 dmueller@suse.de - mount: fix hang on trying to find a free loop device if one of them has a stale nfs handle mounted (bnc#449646) From 02339799398789fa8216aac2de67f662d23676fd8502ecca819d592040c6c32c Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 9 Jan 2009 01:06:34 +0000 Subject: [PATCH 071/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=71 --- util-linux-2.14.1-mount_race.patch | 31 +++++++++++++++++++----------- util-linux.changes | 6 ++++++ util-linux.spec | 7 +++++-- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/util-linux-2.14.1-mount_race.patch b/util-linux-2.14.1-mount_race.patch index 9769d1d..7c9c1f0 100644 --- a/util-linux-2.14.1-mount_race.patch +++ b/util-linux-2.14.1-mount_race.patch @@ -1,7 +1,7 @@ Index: util-linux-ng-2.14.1/mount/fstab.c =================================================================== ---- util-linux-ng-2.14.1.orig/mount/fstab.c 2008-11-24 14:26:14.000000000 +0100 -+++ util-linux-ng-2.14.1/mount/fstab.c 2008-11-24 14:45:35.000000000 +0100 +--- util-linux-ng-2.14.1.orig/mount/fstab.c 2008-05-29 01:01:02.000000000 +0200 ++++ util-linux-ng-2.14.1/mount/fstab.c 2009-01-07 12:18:03.000000000 +0100 @@ -773,8 +773,6 @@ update_mtab (const char *dir, struct my_ if (mtab_does_not_exist() || !mtab_is_writable()) return; @@ -22,8 +22,8 @@ Index: util-linux-ng-2.14.1/mount/fstab.c Index: util-linux-ng-2.14.1/mount/umount.c =================================================================== ---- util-linux-ng-2.14.1.orig/mount/umount.c 2008-11-24 14:26:14.000000000 +0100 -+++ util-linux-ng-2.14.1/mount/umount.c 2008-11-24 14:46:50.000000000 +0100 +--- util-linux-ng-2.14.1.orig/mount/umount.c 2008-07-02 15:08:50.000000000 +0200 ++++ util-linux-ng-2.14.1/mount/umount.c 2009-01-07 12:50:48.000000000 +0100 @@ -102,6 +102,8 @@ check_special_umountprog(const char *spe if (strlen(type) < 100) { sprintf(umountprog, "/sbin/umount.%s", type); @@ -84,8 +84,8 @@ Index: util-linux-ng-2.14.1/mount/umount.c int Index: util-linux-ng-2.14.1/mount/mount.c =================================================================== ---- util-linux-ng-2.14.1.orig/mount/mount.c 2008-11-24 14:26:14.000000000 +0100 -+++ util-linux-ng-2.14.1/mount/mount.c 2008-11-24 14:46:13.000000000 +0100 +--- util-linux-ng-2.14.1.orig/mount/mount.c 2009-01-07 12:18:03.000000000 +0100 ++++ util-linux-ng-2.14.1/mount/mount.c 2009-01-07 14:40:16.000000000 +0100 @@ -521,8 +521,6 @@ create_mtab (void) { int flags; mntFILE *mfp; @@ -104,7 +104,16 @@ Index: util-linux-ng-2.14.1/mount/mount.c reset_mtab_info(); } -@@ -1004,7 +1000,6 @@ update_mtab_entry(const char *spec, cons +@@ -626,6 +622,8 @@ check_special_mountprog(const char *spec + if (strlen(type) < 100) { + sprintf(mountprog, "/sbin/mount.%s", type); + if (stat(mountprog, &statbuf) == 0) { ++ /* unlock mtab if we need to exec */ ++ unlock_mtab(); + if (verbose) + fflush(stdout); + res = fork(); +@@ -1004,7 +1002,6 @@ update_mtab_entry(const char *spec, cons else { mntFILE *mfp; @@ -112,7 +121,7 @@ Index: util-linux-ng-2.14.1/mount/mount.c mfp = my_setmntent(_PATH_MOUNTED, "a+"); if (mfp == NULL || mfp->mntent_fp == NULL) { int errsv = errno; -@@ -1018,7 +1013,6 @@ update_mtab_entry(const char *spec, cons +@@ -1018,7 +1015,6 @@ update_mtab_entry(const char *spec, cons } } my_endmntent(mfp); @@ -120,7 +129,7 @@ Index: util-linux-ng-2.14.1/mount/mount.c } } my_free(mnt.mnt_fsname); -@@ -1138,12 +1132,15 @@ try_mount_one (const char *spec0, const +@@ -1138,12 +1134,15 @@ try_mount_one (const char *spec0, const mount_retry: block_signals (SIG_BLOCK); @@ -136,7 +145,7 @@ Index: util-linux-ng-2.14.1/mount/mount.c block_signals (SIG_UNBLOCK); res = status; goto out; -@@ -1163,6 +1160,7 @@ mount_retry: +@@ -1163,6 +1162,7 @@ mount_retry: pass); } @@ -144,7 +153,7 @@ Index: util-linux-ng-2.14.1/mount/mount.c block_signals (SIG_UNBLOCK); res = 0; goto out; -@@ -1173,6 +1171,7 @@ mount_retry: +@@ -1173,6 +1173,7 @@ mount_retry: if (loop) del_loop(spec); diff --git a/util-linux.changes b/util-linux.changes index 2788880..16199be 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 7 15:42:38 CET 2009 - mkoenig@suse.de + +- fix locking problem for external mount helpers when type + is not given [bnc#459839] + ------------------------------------------------------------------- Tue Dec 2 12:23:37 CET 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 1035665..3dbf684 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux (Version 2.14.1) # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,7 +30,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14.1 -Release: 10 +Release: 11 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -613,6 +613,9 @@ fi #%endif %changelog +* Wed Jan 07 2009 mkoenig@suse.de +- fix locking problem for external mount helpers when type + is not given [bnc#459839] * Tue Dec 02 2008 mkoenig@suse.de - raw: do not stat the raw devices when binding, since they are created dynamically [bnc#450675] From 032af9ca3de8b3e717434994cf28ea436d5e0857025722fe29d27d112c8a6a3a Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 9 Feb 2009 00:28:08 +0000 Subject: [PATCH 072/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=72 --- util-linux.changes | 5 +++++ util-linux.spec | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index 16199be..91e5012 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Feb 7 18:28:58 CET 2009 - schwab@suse.de + +- Fix info dir entry for which. + ------------------------------------------------------------------- Wed Jan 7 15:42:38 CET 2009 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 3dbf684..2b9e1eb 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild Name: util-linux @@ -30,7 +29,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14.1 -Release: 11 +Release: 13 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -362,7 +361,7 @@ rm -rf $RPM_BUILD_ROOT %install_info --entry="* freeramdisk: (freeramdisk). tell kernel to free allocated memory for ramdisk" --info-dir=%{_infodir} %{_infodir}/freeramdisk.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %install_info --entry="* time: (time). summarizing used system resources" --info-dir=%{_infodir} %{_infodir}/time.info.gz -%install_info --entry="* which: (which). show the full path of (shell) commands" --info-dir=%{_infodir} %{_infodir}/which.info.gz +%install_info --info-dir=%{_infodir} %{_infodir}/which.info.gz %run_permissions # mount option 'code=' is now called 'codepage=' so change fstab if [ -f etc/fstab ]; then @@ -613,6 +612,8 @@ fi #%endif %changelog +* Sat Feb 07 2009 schwab@suse.de +- Fix info dir entry for which. * Wed Jan 07 2009 mkoenig@suse.de - fix locking problem for external mount helpers when type is not given [bnc#459839] From f3657194aece3d12796341c960033166ffa4f9202766564c46c80b38e9ddb553 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 16 Feb 2009 00:35:02 +0000 Subject: [PATCH 073/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=73 --- ...x-2.13-hwclock_rtc_wait_busy_tempfix.patch | 13 - util-linux-2.13.1-fdisk_cfdisk_yesno.patch | 19 - util-linux-2.14-mount_retry_on_nomedium.patch | 123 ------ ...utils_mkfs.minix_file_size_detection.patch | 21 - util-linux-2.14.1-fdisk_missing_include.patch | 14 - util-linux-2.14.1-lscpu.patch | 32 +- util-linux-2.14.1-mount_loop_ro_fix.patch | 14 - ...-2.14.2-mount_allow_loop_suid_umount.patch | 68 +++ util-linux-2.14.2-schedutils_fix_email.patch | 35 ++ ...inux-2.14.2-schedutils_ionice_enosys.patch | 19 + util-linux-mount_losetup_crypto.patch | 107 ++--- util-linux-ng-2.14.1.tar.bz2 | 3 - util-linux-ng-2.14.2.tar.bz2 | 3 + util-linux.changes | 38 ++ util-linux.spec | 96 +++- v2.14-ReleaseNotes | 418 ++++++++++++++++++ v2.14.1-ChangeLog | 95 ---- v2.14.2-ReleaseNotes | 92 ++++ 18 files changed, 818 insertions(+), 392 deletions(-) delete mode 100644 util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch delete mode 100644 util-linux-2.13.1-fdisk_cfdisk_yesno.patch delete mode 100644 util-linux-2.14-mount_retry_on_nomedium.patch delete mode 100644 util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch delete mode 100644 util-linux-2.14.1-fdisk_missing_include.patch delete mode 100644 util-linux-2.14.1-mount_loop_ro_fix.patch create mode 100644 util-linux-2.14.2-mount_allow_loop_suid_umount.patch create mode 100644 util-linux-2.14.2-schedutils_fix_email.patch create mode 100644 util-linux-2.14.2-schedutils_ionice_enosys.patch delete mode 100644 util-linux-ng-2.14.1.tar.bz2 create mode 100644 util-linux-ng-2.14.2.tar.bz2 create mode 100644 v2.14-ReleaseNotes delete mode 100644 v2.14.1-ChangeLog create mode 100644 v2.14.2-ReleaseNotes diff --git a/util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch b/util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch deleted file mode 100644 index 0dcad24..0000000 --- a/util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-ng-2.13.0.1+git20071121/hwclock/rtc.c -=================================================================== ---- util-linux-ng-2.13.0.1+git20071121.orig/hwclock/rtc.c -+++ util-linux-ng-2.13.0.1+git20071121/hwclock/rtc.c -@@ -225,7 +225,7 @@ int ret; - } else { - int rc; /* Return code from ioctl */ - /* Turn on update interrupts (one per second) */ --#if defined(__alpha__) || defined(__sparc__) || defined(__x86_64__) -+#if defined(__alpha__) || defined(__sparc__) || defined(__x86_64__) || defined(__i386__) - /* Not all alpha kernels reject RTC_UIE_ON, but probably they should. */ - rc = -1; - errno = EINVAL; diff --git a/util-linux-2.13.1-fdisk_cfdisk_yesno.patch b/util-linux-2.13.1-fdisk_cfdisk_yesno.patch deleted file mode 100644 index 1c47308..0000000 --- a/util-linux-2.13.1-fdisk_cfdisk_yesno.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: util-linux-ng-2.13.1/fdisk/cfdisk.c -=================================================================== ---- util-linux-ng-2.13.1.orig/fdisk/cfdisk.c -+++ util-linux-ng-2.13.1/fdisk/cfdisk.c -@@ -1869,10 +1869,12 @@ write_part_table(void) { - clear_warning(); - if (len == GS_ESCAPE) - return; -- else if (strcasecmp(response, _("no")) == 0) { -+ else if (strcasecmp(response, _("no")) == 0 || -+ strcasecmp(response, "no") == 0) { - print_warning(_("Did not write partition table to disk")); - return; -- } else if (strcasecmp(response, _("yes")) == 0) -+ } else if (strcasecmp(response, _("yes")) == 0 || -+ strcasecmp(response, "yes") == 0) - done = TRUE; - else - print_warning(_("Please enter `yes' or `no'")); diff --git a/util-linux-2.14-mount_retry_on_nomedium.patch b/util-linux-2.14-mount_retry_on_nomedium.patch deleted file mode 100644 index 5d50d96..0000000 --- a/util-linux-2.14-mount_retry_on_nomedium.patch +++ /dev/null @@ -1,123 +0,0 @@ -mount: retry on ENOMEDIUM - -From: Matthias Koenig - -Due to a change in kernel behaviour when opening CDROM devices, -we need to retry the open/mount call when ENOMEDIUM is returned. - -Explanation from Tejun Heo: -Okay, the difference is from the addition of cdrom_get_media_event() -call to both sr_drive_status() and ide_cdrom_drive_status(). -Previously, the cdrom driver can't differentiate between tray closed -w/ no media and tray open and always returned tray open, which -triggers close and retry in the open logic which probably have delayed -things enough to get the media recognized. - -Now the cdrom driver can discern between tray closed w/o media and -device not ready for other reasons and returns -ENOMEDIUM on the -former. This is all good and dandy but the problem seems that some -drives report no media right after the tray is closed but it hasn't -properly detected the media yet. - -It seems the only way to work around the problem is via sensible -retries (e.g. try three times 5 secs apart) and I don't think we can -add that type of retry logic into cdrom open path. Please note that -the previous logic wasn't water proof. Some drives can take longer to -recognize the media is there and could have failed the in-kernel retry -too. Also, reading the media can take quite some time and during that -period the drive reports media present but device not ready. The -driver will retry the command (e.g. READ TOC for open) five times but -all of them can fail w/ EMEDIUMTYPE. - -Signed-off-by: Matthias Koenig ---- - - mount/fsprobe_volumeid.c | 15 +++++++++++++-- - mount/mount.c | 11 +++++++++++ - 2 files changed, 24 insertions(+), 2 deletions(-) - -diff --git a/mount/fsprobe_volumeid.c b/mount/fsprobe_volumeid.c -index 7c98dc6..1ef788c 100644 ---- a/mount/fsprobe_volumeid.c -+++ b/mount/fsprobe_volumeid.c -@@ -3,6 +3,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -15,6 +16,8 @@ - #include "pathnames.h" - #include "sundries.h" - -+#define MAX_RETRIES 5 -+ - enum probe_type { - VOLUME_ID_NONE, - VOLUME_ID_LABEL, -@@ -30,10 +33,18 @@ static char - struct volume_id *id; - const char *val; - char *value = NULL; -+ int retries = 0; - -+retry: - fd = open(device, O_RDONLY); -- if (fd < 0) -- return NULL; -+ if (fd < 0) { -+ if (errno == ENOMEDIUM && retries < MAX_RETRIES) { -+ ++retries; -+ sleep(3); -+ goto retry; -+ } else -+ return NULL; -+ } - - id = volume_id_open_fd(fd); - if (!id) { -diff --git a/mount/mount.c b/mount/mount.c -index bed792d..5d50bca 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -1061,6 +1061,7 @@ cdrom_setspeed(const char *spec) { - static int - try_mount_one (const char *spec0, const char *node0, const char *types0, - const char *opts0, int freq, int pass, int ro) { -+#define MAX_RETRIES 5 - int res = 0, status = 0, special = 0; - int mnt5_res = 0; /* only for gcc */ - int mnt_err; -@@ -1072,6 +1073,7 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, - int loop = 0; - const char *loopdev = 0, *loopfile = 0; - struct stat statbuf; -+ int retries = 0; /* Nr of retries for mount in case of ENOMEDIUM */ - - /* copies for freeing on exit */ - const char *opts1, *spec1, *node1, *types1, *extra_opts1; -@@ -1134,6 +1136,7 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, - goto out; - } - -+mount_retry: - block_signals (SIG_BLOCK); - - if (!fake) { -@@ -1363,6 +1366,14 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, - } - break; - } -+ case ENOMEDIUM: -+ if (retries < MAX_RETRIES) { -+ ++retries; -+ sleep(3); -+ goto mount_retry; -+ } -+ error(_("mount: No medium found on %s"), spec); -+ break; - default: - error ("mount: %s", strerror (mnt_err)); break; - } diff --git a/util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch b/util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch deleted file mode 100644 index e86b994..0000000 --- a/util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: util-linux-ng-2.14.1/disk-utils/mkfs.minix.c -=================================================================== ---- util-linux-ng-2.14.1.orig/disk-utils/mkfs.minix.c 2008-09-10 11:02:42.000000000 +0200 -+++ util-linux-ng-2.14.1/disk-utils/mkfs.minix.c 2008-10-23 17:25:49.000000000 +0200 -@@ -653,9 +653,14 @@ main(int argc, char ** argv) { - die(_("cannot determine sector size for %s")); - if (BLOCK_SIZE < sectorsize) - die(_("block size smaller than physical sector size of %s")); -- if (!BLOCKS && blkdev_get_size(DEV, &BLOCKS) == -1) -- die(_("cannot determine size of %s")); -+ if (!BLOCKS) { -+ if (blkdev_get_size(DEV, &BLOCKS) == -1) -+ die(_("cannot determine size of %s")); -+ BLOCKS /= BLOCK_SIZE; -+ } - } else if (!S_ISBLK(statbuf.st_mode)) { -+ if (!BLOCKS) -+ BLOCKS = statbuf.st_size / BLOCK_SIZE; - check=0; - } else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) - die(_("will not try to make filesystem on '%s'")); diff --git a/util-linux-2.14.1-fdisk_missing_include.patch b/util-linux-2.14.1-fdisk_missing_include.patch deleted file mode 100644 index 2bdcbec..0000000 --- a/util-linux-2.14.1-fdisk_missing_include.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: util-linux-ng-2.14.1/fdisk/partname.c -=================================================================== ---- util-linux-ng-2.14.1.orig/fdisk/partname.c 2008-05-29 01:01:02.000000000 +0200 -+++ util-linux-ng-2.14.1/fdisk/partname.c 2008-10-27 17:01:15.000000000 +0100 -@@ -1,6 +1,9 @@ - #include - #include - #include -+#include -+#include -+#include "blkdev.h" - #include "common.h" - - /* diff --git a/util-linux-2.14.1-lscpu.patch b/util-linux-2.14.1-lscpu.patch index 77392d3..2b6c031 100644 --- a/util-linux-2.14.1-lscpu.patch +++ b/util-linux-2.14.1-lscpu.patch @@ -17,10 +17,10 @@ Date: Thu Jul 17 14:19:40 2008 +0200 Signed-off-by: Cai Qian Signed-off-by: Karel Zak -Index: util-linux-ng-2.14.1/README.licensing +Index: util-linux-ng-2.14.2-rc2/README.licensing =================================================================== ---- util-linux-ng-2.14.1.orig/README.licensing 2008-09-10 11:02:42.000000000 +0200 -+++ util-linux-ng-2.14.1/README.licensing 2008-10-01 17:18:31.000000000 +0200 +--- util-linux-ng-2.14.2-rc2.orig/README.licensing 2009-01-22 12:32:48.000000000 +0100 ++++ util-linux-ng-2.14.2-rc2/README.licensing 2009-02-05 15:27:37.000000000 +0100 @@ -2,6 +2,8 @@ The project utils-linux-ng doesn't use same license for all code. There are code with: @@ -30,10 +30,10 @@ Index: util-linux-ng-2.14.1/README.licensing * GPLv2+ (GNU General Public License version 2, or any later version) * GPLv2 (GNU General Public License version 2) -Index: util-linux-ng-2.14.1/po/POTFILES.in +Index: util-linux-ng-2.14.2-rc2/po/POTFILES.in =================================================================== ---- util-linux-ng-2.14.1.orig/po/POTFILES.in 2008-09-10 11:02:43.000000000 +0200 -+++ util-linux-ng-2.14.1/po/POTFILES.in 2008-10-01 17:18:31.000000000 +0200 +--- util-linux-ng-2.14.2-rc2.orig/po/POTFILES.in 2009-01-22 12:32:48.000000000 +0100 ++++ util-linux-ng-2.14.2-rc2/po/POTFILES.in 2009-02-05 15:27:37.000000000 +0100 @@ -98,6 +98,7 @@ sys-utils/flock.c sys-utils/ipcrm.c sys-utils/ipcs.c @@ -42,28 +42,28 @@ Index: util-linux-ng-2.14.1/po/POTFILES.in sys-utils/rdev.c sys-utils/readprofile.c sys-utils/renice.c -Index: util-linux-ng-2.14.1/sys-utils/Makefile.am +Index: util-linux-ng-2.14.2-rc2/sys-utils/Makefile.am =================================================================== ---- util-linux-ng-2.14.1.orig/sys-utils/Makefile.am 2008-09-10 11:02:43.000000000 +0200 -+++ util-linux-ng-2.14.1/sys-utils/Makefile.am 2008-10-01 17:19:50.000000000 +0200 +--- util-linux-ng-2.14.2-rc2.orig/sys-utils/Makefile.am 2009-01-22 12:32:48.000000000 +0100 ++++ util-linux-ng-2.14.2-rc2/sys-utils/Makefile.am 2009-02-05 15:28:58.000000000 +0100 @@ -11,11 +11,11 @@ dist_man_MANS = flock.1 ipcrm.1 ipcs.1 r if LINUX bin_PROGRAMS += dmesg sbin_PROGRAMS += ctrlaltdel -usrbinexec_PROGRAMS += cytune setarch +usrbinexec_PROGRAMS += cytune setarch lscpu - usrsbinexec_PROGRAMS += tunelp rtcwake + usrsbinexec_PROGRAMS += ldattach tunelp rtcwake dist_man_MANS += dmesg.1 ctrlaltdel.8 cytune.8 setarch.8 \ -- tunelp.8 rtcwake.8 -+ tunelp.8 rtcwake.8 lscpu.1 +- tunelp.8 rtcwake.8 ldattach.8 ++ tunelp.8 rtcwake.8 ldattach.8 lscpu.1 endif cytune_SOURCES = cytune.c cyclades.h -Index: util-linux-ng-2.14.1/sys-utils/lscpu.1 +Index: util-linux-ng-2.14.2-rc2/sys-utils/lscpu.1 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14.1/sys-utils/lscpu.1 2008-10-01 17:18:31.000000000 +0200 ++++ util-linux-ng-2.14.2-rc2/sys-utils/lscpu.1 2009-02-05 15:27:37.000000000 +0100 @@ -0,0 +1,29 @@ +.\" Process this file with +.\" groff -man -Tascii lscpu.1 @@ -94,10 +94,10 @@ Index: util-linux-ng-2.14.1/sys-utils/lscpu.1 +.SH AVAILABILITY +The setarch command is part of the util-linux-ng package and is available from +ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/. -Index: util-linux-ng-2.14.1/sys-utils/lscpu.c +Index: util-linux-ng-2.14.2-rc2/sys-utils/lscpu.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14.1/sys-utils/lscpu.c 2008-10-01 17:18:31.000000000 +0200 ++++ util-linux-ng-2.14.2-rc2/sys-utils/lscpu.c 2009-02-05 15:27:37.000000000 +0100 @@ -0,0 +1,529 @@ +/* + * lscpu - CPU architecture information helper diff --git a/util-linux-2.14.1-mount_loop_ro_fix.patch b/util-linux-2.14.1-mount_loop_ro_fix.patch deleted file mode 100644 index a770590..0000000 --- a/util-linux-2.14.1-mount_loop_ro_fix.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: util-linux-ng-2.14.1/mount/lomount.c -=================================================================== ---- util-linux-ng-2.14.1.orig/mount/lomount.c 2008-09-10 11:02:43.000000000 +0200 -+++ util-linux-ng-2.14.1/mount/lomount.c 2008-11-07 14:00:28.000000000 +0100 -@@ -653,7 +653,8 @@ set_loop(const char *device, const char - - mode = (*options & SETLOOP_RDONLY) ? O_RDONLY : O_RDWR; - if ((ffd = open(file, mode)) < 0) { -- if (!(*options & SETLOOP_RDONLY) && errno == EROFS) -+ if (!(*options & SETLOOP_RDONLY) && -+ (errno == EROFS || errno == EACCES)) - ffd = open(file, mode = O_RDONLY); - if (ffd < 0) { - perror(file); diff --git a/util-linux-2.14.2-mount_allow_loop_suid_umount.patch b/util-linux-2.14.2-mount_allow_loop_suid_umount.patch new file mode 100644 index 0000000..8d06387 --- /dev/null +++ b/util-linux-2.14.2-mount_allow_loop_suid_umount.patch @@ -0,0 +1,68 @@ +Index: util-linux-ng-2.14.2/mount/umount.c +=================================================================== +--- util-linux-ng-2.14.2.orig/mount/umount.c 2009-02-11 17:00:35.000000000 +0100 ++++ util-linux-ng-2.14.2/mount/umount.c 2009-02-12 13:09:44.000000000 +0100 +@@ -465,6 +465,42 @@ get_value(const char *list, const char * + return 0; + } + ++#define LOOP_DEV_PATH "/dev/loop" ++/* check if mc contains a loop device which is associated ++ * with the file in fs ++ */ ++static int ++valid_loop(struct mntentchn *mc, struct mntentchn *fs) ++{ ++ unsigned long long offset=0; ++ char *p; ++ ++ /* 1. check if it begins with /dev/loop */ ++ if (strncmp(LOOP_DEV_PATH, mc->m.mnt_fsname, sizeof(LOOP_DEV_PATH)-1) != 0) ++ return 0; ++ ++ /* 2. check for loop option in fstab */ ++ if (!contains(fs->m.mnt_opts, "loop")) ++ return 0; ++ ++ /* 3. check for offset option in fstab */ ++ if (p=get_value(fs->m.mnt_opts, "offset=")) ++ offset = strtoull(p, NULL, 10); ++ ++ /* 4. check association */ ++ if (loopfile_used_with(mc->m.mnt_fsname, fs->m.mnt_fsname, offset)) { ++ if (verbose > 1) ++ printf(_("device %s is associated with %s\n"), ++ mc->m.mnt_fsname, fs->m.mnt_fsname); ++ return 1; ++ } else { ++ if (verbose > 1) ++ printf(_("device %s is not associated with %s\n"), ++ mc->m.mnt_fsname, fs->m.mnt_fsname); ++ return 0; ++ } ++} ++ + static int + umount_file (char *arg) { + struct mntentchn *mc, *fs; +@@ -530,14 +566,18 @@ umount_file (char *arg) { + the pair (spec,file) in fstab. */ + fs = getfs_by_specdir(mc->m.mnt_fsname, mc->m.mnt_dir); + if (!fs) { +- if (!getfs_by_spec (file) && !getfs_by_dir (file)) ++ fs = getfs_by_dir(file); ++ if (!getfs_by_spec (file) && !fs) + die (2, + _("umount: %s is not in the fstab " + "(and you are not root)"), + file); +- else ++ ++ /* spec could be a file which is loop mounted */ ++ if (fs && !valid_loop(mc, fs)) + die (2, _("umount: %s mount disagrees with " + "the fstab"), file); ++ + } + + /* diff --git a/util-linux-2.14.2-schedutils_fix_email.patch b/util-linux-2.14.2-schedutils_fix_email.patch new file mode 100644 index 0000000..9021b85 --- /dev/null +++ b/util-linux-2.14.2-schedutils_fix_email.patch @@ -0,0 +1,35 @@ +Index: util-linux-ng-2.14.2-rc2/schedutils/ionice.1 +=================================================================== +--- util-linux-ng-2.14.2-rc2.orig/schedutils/ionice.1 2009-01-22 12:53:14.000000000 +0100 ++++ util-linux-ng-2.14.2-rc2/schedutils/ionice.1 2009-02-05 18:08:51.000000000 +0100 +@@ -76,7 +76,7 @@ Linux supports io scheduling priorities + io scheduler. + + .SH AUTHORS +-Jens Axboe ++Jens Axboe + + .SH AVAILABILITY + The ionice command is part of the util-linux-ng package and is available from +Index: util-linux-ng-2.14.2-rc2/schedutils/ionice.c +=================================================================== +--- util-linux-ng-2.14.2-rc2.orig/schedutils/ionice.c 2009-02-05 17:53:20.000000000 +0100 ++++ util-linux-ng-2.14.2-rc2/schedutils/ionice.c 2009-02-05 18:09:46.000000000 +0100 +@@ -1,7 +1,7 @@ + /* + * ionice: set or get process io scheduling class and priority + * +- * Copyright (C) 2005 Jens Axboe SUSE Labs ++ * Copyright (C) 2005 Jens Axboe + * + * Released under the terms of the GNU General Public License version 2 + * +@@ -51,7 +51,7 @@ static void usage(void) + printf("\t\t\t1: realtime, 2: best-effort, 3: idle\n"); + printf("\t-p\tProcess pid\n"); + printf("\t-h\tThis help page\n"); +- printf("\nJens Axboe (C) 2005\n"); ++ printf("\nJens Axboe (C) 2005\n"); + } + + int main(int argc, char *argv[]) diff --git a/util-linux-2.14.2-schedutils_ionice_enosys.patch b/util-linux-2.14.2-schedutils_ionice_enosys.patch new file mode 100644 index 0000000..f12d6e6 --- /dev/null +++ b/util-linux-2.14.2-schedutils_ionice_enosys.patch @@ -0,0 +1,19 @@ +Index: util-linux-ng-2.14.2-rc2/schedutils/ionice.c +=================================================================== +--- util-linux-ng-2.14.2-rc2.orig/schedutils/ionice.c 2009-01-22 12:32:48.000000000 +0100 ++++ util-linux-ng-2.14.2-rc2/schedutils/ionice.c 2009-02-05 17:53:20.000000000 +0100 +@@ -115,8 +115,12 @@ int main(int argc, char *argv[]) + } + } else { + if (ioprio_set(IOPRIO_WHO_PROCESS, pid, ioprio | ioprio_class << IOPRIO_CLASS_SHIFT) == -1) { +- perror("ioprio_set"); +- exit(EXIT_FAILURE); ++ if (errno == ENOSYS) ++ fprintf(stderr, "Warning: omitting unsupported ioprio_set() call\n"); ++ else { ++ perror("ioprio_set"); ++ exit(EXIT_FAILURE); ++ } + } + + if (argv[optind]) { diff --git a/util-linux-mount_losetup_crypto.patch b/util-linux-mount_losetup_crypto.patch index 29a879c..a215c8b 100644 --- a/util-linux-mount_losetup_crypto.patch +++ b/util-linux-mount_losetup_crypto.patch @@ -40,10 +40,10 @@ Signed-off-by: Ludwig Nussel create mode 100644 mount/sha512.c create mode 100644 mount/sha512.h -Index: util-linux-ng-2.14.1-rc2/mount/Makefile.am +Index: util-linux-ng-2.14.2-rc2/mount/Makefile.am =================================================================== ---- util-linux-ng-2.14.1-rc2.orig/mount/Makefile.am 2008-08-22 11:11:26.000000000 +0200 -+++ util-linux-ng-2.14.1-rc2/mount/Makefile.am 2008-09-09 17:07:40.000000000 +0200 +--- util-linux-ng-2.14.2-rc2.orig/mount/Makefile.am 2009-01-22 12:32:48.000000000 +0100 ++++ util-linux-ng-2.14.2-rc2/mount/Makefile.am 2009-02-05 16:50:57.000000000 +0100 @@ -17,6 +17,7 @@ headers_common = fstab.h mount_mntent.h getusername.h loop.h sundries.h @@ -62,10 +62,10 @@ Index: util-linux-ng-2.14.1-rc2/mount/Makefile.am losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) -Index: util-linux-ng-2.14.1-rc2/mount/lomount.c +Index: util-linux-ng-2.14.2-rc2/mount/lomount.c =================================================================== ---- util-linux-ng-2.14.1-rc2.orig/mount/lomount.c 2008-08-22 11:11:26.000000000 +0200 -+++ util-linux-ng-2.14.1-rc2/mount/lomount.c 2008-09-09 17:06:21.000000000 +0200 +--- util-linux-ng-2.14.2-rc2.orig/mount/lomount.c 2009-02-05 16:50:51.000000000 +0100 ++++ util-linux-ng-2.14.2-rc2/mount/lomount.c 2009-02-05 16:52:14.000000000 +0100 @@ -24,6 +24,12 @@ #include "sundries.h" #include "xmalloc.h" @@ -79,7 +79,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/lomount.c #ifndef HAVE_VERSIONSORT # include "strverscmp.h" -@@ -360,12 +366,22 @@ show_loop_fd(int fd, char *device) { +@@ -367,12 +373,22 @@ show_loop_fd(int fd, char *device) { if (loopinfo64.lo_encrypt_type || loopinfo64.lo_crypt_name[0]) { @@ -105,7 +105,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/lomount.c } printf("\n"); return 0; -@@ -619,7 +635,7 @@ xgetpass(int pfd, const char *prompt) { +@@ -626,7 +642,7 @@ xgetpass(int pfd, const char *prompt) { } if (pass == NULL) @@ -114,7 +114,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/lomount.c pass[i] = 0; return pass; -@@ -633,12 +649,31 @@ digits_only(const char *s) { +@@ -640,6 +656,24 @@ digits_only(const char *s) { return 1; } @@ -136,6 +136,11 @@ Index: util-linux-ng-2.14.1-rc2/mount/lomount.c + memcpy(buf, tmpbuf, MIN(buflen, sizeof(tmpbuf))); +} + + /* + * return codes: + * 0 - success +@@ -648,10 +682,11 @@ digits_only(const char *s) { + */ int set_loop(const char *device, const char *file, unsigned long long offset, - unsigned long long sizelimit, const char *encryption, int pfd, int *options) { @@ -148,7 +153,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/lomount.c char *filename; if (verbose) { -@@ -672,13 +707,37 @@ set_loop(const char *device, const char +@@ -689,13 +724,37 @@ set_loop(const char *device, const char filename = (char *) file; xstrncpy((char *)loopinfo64.lo_file_name, filename, LO_NAME_SIZE); @@ -188,7 +193,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/lomount.c } } -@@ -699,20 +758,70 @@ set_loop(const char *device, const char +@@ -716,20 +775,70 @@ set_loop(const char *device, const char } #endif @@ -271,7 +276,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/lomount.c } if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { -@@ -863,7 +972,13 @@ usage(void) { +@@ -880,7 +989,13 @@ usage(void) { fprintf(stderr, _("\nOptions:\n" " -e | --encryption enable data encryption with specified \n" @@ -285,7 +290,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/lomount.c " -o | --offset start at offset into file\n" " --sizelimit loop limited to only bytes of the file\n" " -p | --pass-fd read passphrase from file descriptor \n" -@@ -876,11 +991,14 @@ usage(void) { +@@ -893,11 +1008,14 @@ usage(void) { int main(int argc, char **argv) { char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc; @@ -300,7 +305,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/lomount.c unsigned long long off, slimit; struct option longopts[] = { { "all", 0, 0, 'a' }, -@@ -888,6 +1006,8 @@ main(int argc, char **argv) { +@@ -905,6 +1023,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -309,7 +314,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/lomount.c { "associated", 1, 0, 'j' }, { "offset", 1, 0, 'o' }, { "sizelimit", 1, 0, 128 }, -@@ -906,12 +1026,13 @@ main(int argc, char **argv) { +@@ -923,12 +1043,13 @@ main(int argc, char **argv) { off = 0; slimit = 0; assoc = offset = sizelimit = encryption = passfd = NULL; @@ -324,7 +329,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/lomount.c longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -933,6 +1054,12 @@ main(int argc, char **argv) { +@@ -950,6 +1071,12 @@ main(int argc, char **argv) { case 'j': assoc = optarg; break; @@ -337,7 +342,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/lomount.c case 'o': offset = optarg; break; -@@ -1011,8 +1138,11 @@ main(int argc, char **argv) { +@@ -1028,8 +1155,11 @@ main(int argc, char **argv) { else { if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(); @@ -349,11 +354,11 @@ Index: util-linux-ng-2.14.1-rc2/mount/lomount.c + pfd, &ro, keysz); if (res == 2 && find) { if (verbose) - printf("stolen loop=%s...trying again\n", -Index: util-linux-ng-2.14.1-rc2/mount/losetup.8 + printf(_("stolen loop=%s...trying again\n"), +Index: util-linux-ng-2.14.2-rc2/mount/losetup.8 =================================================================== ---- util-linux-ng-2.14.1-rc2.orig/mount/losetup.8 2008-05-29 01:01:02.000000000 +0200 -+++ util-linux-ng-2.14.1-rc2/mount/losetup.8 2008-09-09 17:06:21.000000000 +0200 +--- util-linux-ng-2.14.2-rc2.orig/mount/losetup.8 2008-05-29 01:01:02.000000000 +0200 ++++ util-linux-ng-2.14.2-rc2/mount/losetup.8 2009-02-05 16:50:57.000000000 +0100 @@ -80,9 +80,18 @@ find the first unused loop device. If a argument is present, use this device. Otherwise, print its name .IP "\fB\-h, \-\-help\fP" @@ -382,13 +387,13 @@ Index: util-linux-ng-2.14.1-rc2/mount/losetup.8 Cryptoloop is deprecated in favor of dm-crypt. For more details see .B cryptsetup(8). -Index: util-linux-ng-2.14.1-rc2/mount/mount.8 +Index: util-linux-ng-2.14.2-rc2/mount/mount.8 =================================================================== ---- util-linux-ng-2.14.1-rc2.orig/mount/mount.8 2008-08-22 11:11:26.000000000 +0200 -+++ util-linux-ng-2.14.1-rc2/mount/mount.8 2008-09-09 17:06:21.000000000 +0200 -@@ -618,6 +618,15 @@ This option implies the options - .B nofail - Do not report errors for this device if it does not exist. +--- util-linux-ng-2.14.2-rc2.orig/mount/mount.8 2009-01-22 12:32:48.000000000 +0100 ++++ util-linux-ng-2.14.2-rc2/mount/mount.8 2009-02-05 16:50:57.000000000 +0100 +@@ -767,6 +767,15 @@ Every time the inode is modified, the i_ + .B noiversion + Do not increment the i_version inode field. .TP +.B encryption +Specifies an encryption algorithm to use. Used in conjunction with the @@ -402,7 +407,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/mount.8 .B mand Allow mandatory locks on this filesystem. See .BR fcntl (2). -@@ -2049,6 +2058,10 @@ that are really options to +@@ -2222,6 +2231,10 @@ that are really options to .BR \%losetup (8). (These options can be used in addition to those specific to the filesystem type.) @@ -413,10 +418,10 @@ Index: util-linux-ng-2.14.1-rc2/mount/mount.8 If no explicit loop device is mentioned (but just an option `\fB\-o loop\fP' is given), then -Index: util-linux-ng-2.14.1-rc2/mount/mount.c +Index: util-linux-ng-2.14.2-rc2/mount/mount.c =================================================================== ---- util-linux-ng-2.14.1-rc2.orig/mount/mount.c 2008-09-09 16:50:12.000000000 +0200 -+++ util-linux-ng-2.14.1-rc2/mount/mount.c 2008-09-09 17:06:21.000000000 +0200 +--- util-linux-ng-2.14.2-rc2.orig/mount/mount.c 2009-02-05 16:50:51.000000000 +0100 ++++ util-linux-ng-2.14.2-rc2/mount/mount.c 2009-02-05 16:50:57.000000000 +0100 @@ -87,6 +87,9 @@ static int suid = 0; /* Contains the fd to read the passphrase from, if any. */ static int pfd = -1; @@ -427,7 +432,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/mount.c /* Map from -o and fstab option strings to the flag argument to mount(2). */ struct opt_map { const char *opt; /* option name */ -@@ -184,6 +187,7 @@ static int opt_nofail = 0; +@@ -188,6 +191,7 @@ static int opt_nofail = 0; static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_sizelimit, *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper; @@ -435,7 +440,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/mount.c static int mounted (const char *spec0, const char *node0); static int check_special_mountprog(const char *spec, const char *node, -@@ -199,6 +203,8 @@ static struct string_opt_map { +@@ -203,6 +207,8 @@ static struct string_opt_map { { "offset=", 0, &opt_offset }, { "sizelimit=", 0, &opt_sizelimit }, { "encryption=", 0, &opt_encryption }, @@ -444,7 +449,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/mount.c { "speed=", 0, &opt_speed }, { "comment=", 1, &opt_comment }, { "uhelper=", 0, &opt_uhelper }, -@@ -898,7 +904,8 @@ loop_check(const char **spec, const char +@@ -910,7 +916,8 @@ loop_check(const char **spec, const char *type = opt_vfstype; } @@ -454,7 +459,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/mount.c *loopfile = *spec; if (*loop) { -@@ -930,7 +937,7 @@ loop_check(const char **spec, const char +@@ -942,7 +949,7 @@ loop_check(const char **spec, const char printf(_("mount: going to use the loop device %s\n"), *loopdev); if ((res = set_loop(*loopdev, *loopfile, offset, sizelimit, @@ -463,7 +468,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/mount.c if (res == 2) { /* loop dev has been grabbed by some other process, try again, if not given explicitly */ -@@ -1661,6 +1668,7 @@ static struct option longopts[] = { +@@ -1699,6 +1706,7 @@ static struct option longopts[] = { { "options", 1, 0, 'o' }, { "test-opts", 1, 0, 'O' }, { "pass-fd", 1, 0, 'p' }, @@ -471,7 +476,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/mount.c { "types", 1, 0, 't' }, { "bind", 0, 0, 128 }, { "move", 0, 0, 133 }, -@@ -1822,6 +1830,7 @@ main(int argc, char *argv[]) { +@@ -1860,6 +1868,7 @@ main(int argc, char *argv[]) { char *options = NULL, *test_opts = NULL, *node; const char *spec = NULL; char *label = NULL; @@ -479,7 +484,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/mount.c char *uuid = NULL; char *types = NULL; char *p; -@@ -1852,7 +1861,7 @@ main(int argc, char *argv[]) { +@@ -1890,7 +1899,7 @@ main(int argc, char *argv[]) { initproctitle(argc, argv); #endif @@ -488,7 +493,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/mount.c longopts, NULL)) != -1) { switch (c) { case 'a': /* mount everything in fstab */ -@@ -1870,6 +1879,9 @@ main(int argc, char *argv[]) { +@@ -1908,6 +1917,9 @@ main(int argc, char *argv[]) { case 'i': external_allowed = 0; break; @@ -498,7 +503,7 @@ Index: util-linux-ng-2.14.1-rc2/mount/mount.c case 'l': list_with_volumelabel = 1; break; -@@ -2000,6 +2012,9 @@ main(int argc, char *argv[]) { +@@ -2038,6 +2050,9 @@ main(int argc, char *argv[]) { atexit(unlock_mtab); @@ -508,10 +513,10 @@ Index: util-linux-ng-2.14.1-rc2/mount/mount.c switch (argc+specseen) { case 0: /* mount -a */ -Index: util-linux-ng-2.14.1-rc2/mount/rmd160.c +Index: util-linux-ng-2.14.2-rc2/mount/rmd160.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14.1-rc2/mount/rmd160.c 2008-09-09 17:06:21.000000000 +0200 ++++ util-linux-ng-2.14.2-rc2/mount/rmd160.c 2009-02-05 16:50:57.000000000 +0100 @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -1045,10 +1050,10 @@ Index: util-linux-ng-2.14.1-rc2/mount/rmd160.c + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -Index: util-linux-ng-2.14.1-rc2/mount/rmd160.h +Index: util-linux-ng-2.14.2-rc2/mount/rmd160.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14.1-rc2/mount/rmd160.h 2008-09-09 17:06:21.000000000 +0200 ++++ util-linux-ng-2.14.2-rc2/mount/rmd160.h 2009-02-05 16:50:57.000000000 +0100 @@ -0,0 +1,11 @@ +#ifndef RMD160_H +#define RMD160_H @@ -1061,10 +1066,10 @@ Index: util-linux-ng-2.14.1-rc2/mount/rmd160.h +#endif /*RMD160_H*/ + + -Index: util-linux-ng-2.14.1-rc2/mount/sha512.c +Index: util-linux-ng-2.14.2-rc2/mount/sha512.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14.1-rc2/mount/sha512.c 2008-09-09 17:06:21.000000000 +0200 ++++ util-linux-ng-2.14.2-rc2/mount/sha512.c 2009-02-05 16:50:57.000000000 +0100 @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1498,10 +1503,10 @@ Index: util-linux-ng-2.14.1-rc2/mount/sha512.c + memset(&ctx, 0, sizeof(ctx)); +} +#endif -Index: util-linux-ng-2.14.1-rc2/mount/sha512.h +Index: util-linux-ng-2.14.2-rc2/mount/sha512.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14.1-rc2/mount/sha512.h 2008-09-09 17:06:21.000000000 +0200 ++++ util-linux-ng-2.14.2-rc2/mount/sha512.h 2009-02-05 16:50:57.000000000 +0100 @@ -0,0 +1,45 @@ +/* + * sha512.h @@ -1548,10 +1553,10 @@ Index: util-linux-ng-2.14.1-rc2/mount/sha512.h +/* no sha384_write(), use sha512_write() */ +/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ +extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); -Index: util-linux-ng-2.14.1-rc2/mount/lomount.h +Index: util-linux-ng-2.14.2-rc2/mount/lomount.h =================================================================== ---- util-linux-ng-2.14.1-rc2.orig/mount/lomount.h 2008-07-02 15:08:50.000000000 +0200 -+++ util-linux-ng-2.14.1-rc2/mount/lomount.h 2008-09-09 17:06:21.000000000 +0200 +--- util-linux-ng-2.14.2-rc2.orig/mount/lomount.h 2008-07-02 15:08:50.000000000 +0200 ++++ util-linux-ng-2.14.2-rc2/mount/lomount.h 2009-02-05 16:50:57.000000000 +0100 @@ -1,5 +1,6 @@ -extern int set_loop(const char *, const char *, unsigned long long, unsigned long long, - const char *, int, int *); diff --git a/util-linux-ng-2.14.1.tar.bz2 b/util-linux-ng-2.14.1.tar.bz2 deleted file mode 100644 index a5d1565..0000000 --- a/util-linux-ng-2.14.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bf289c5399ab78674d9662ff2906a63ab540e88bf8bb1d3c7326dc8b1bef802c -size 2929618 diff --git a/util-linux-ng-2.14.2.tar.bz2 b/util-linux-ng-2.14.2.tar.bz2 new file mode 100644 index 0000000..3b3d9c4 --- /dev/null +++ b/util-linux-ng-2.14.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:108e63e9a007f6a8c0eff841dd38e0fe3b635c98b35bfac2d89b4b1a1ce0630e +size 2956769 diff --git a/util-linux.changes b/util-linux.changes index 91e5012..f31c7d8 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,41 @@ +------------------------------------------------------------------- +Thu Feb 12 17:12:28 CET 2009 - mkoenig@suse.de + +- update to version 2.14.2 + chrt: + * support CFS SCHED_IDLE priority and document it + fdisk: + * cannot create partition with starting beyond 1 TB + * remove obsolete information from man page + hwclock: + * remove "cli" and "sti" from i386 CMOS code + * remove x86_64-specific bogon + losetup: + * add warning about read-only mode + * missing EBUSY error hint message + more: + * minor fixes to magic() + mount: + * add i_version support + * add info about /proc/mounts to mount.1 + * add info about semantics of read-only mount to mount.8 + * add rootcontext= SELinux mount option + * clean up SPEC canonicalization + * create separate section for fs-independent options in mount.8 + * finalize support of quoted LABELs/UUIDs + * mtab created multiple times with -a option + * suggest to use blockdev --setro rather than losetup +- catch ENOSYS in ionice to allow execution in virtualized + environments which don't support ioprio_{get,set} calls [bnc#444637] +- umount: fix suid check for user mounted loop devices [bnc#461732] +- fix doc [bnc#456375] +- remove patches: + util-linux-2.13.1-fdisk_cfdisk_yesno.patch + util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch + util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch + util-linux-2.14.1-fdisk_missing_include.patch + util-linux-2.14.1-mount_loop_ro_fix.patch + ------------------------------------------------------------------- Sat Feb 7 18:28:58 CET 2009 - schwab@suse.de diff --git a/util-linux.spec b/util-linux.spec index 2b9e1eb..aca1d99 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.14.1) +# spec file for package util-linux (Version 2.14.2) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -28,8 +28,8 @@ PreReq: %install_info_prereq permissions License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on -Version: 2.14.1 -Release: 13 +Version: 2.14.2 +Release: 1 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -39,8 +39,6 @@ Source3: nologin.8 Source4: raw.init Source5: etc.raw Source6: etc_filesystems -Source7: v2.14.1-ChangeLog -Source8: v2.14.1-ReleaseNotes %define time_ver 1.7 %define which_ver 2.19 %define adjtimex_ver 1.20 @@ -57,6 +55,9 @@ Source28: mkzimage_cmdline.8 Source29: mkzimage_cmdline.c Source30: README.largedisk Source31: addnote.c +Source32: v2.14-ReleaseNotes +Source33: v2.14.1-ReleaseNotes +Source34: v2.14.2-ReleaseNotes ## ## util-linux patches ## @@ -66,25 +67,30 @@ Patch1: util-linux-2.12-misc_utils_hostid.patch Patch2: util-linux-2.12r-fdisk_cyl.patch # 241372 - remove legacy warnings from fdisk Patch3: util-linux-2.12r-fdisk_remove_bogus_warnings.patch -# 338419 -Patch4: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch -# -Patch5: util-linux-2.13.1-fdisk_cfdisk_yesno.patch -Patch6: fix-hang-on-stale-nfs.diff -Patch7: util-linux-2.14-mount_retry_on_nomedium.patch +# lscpu hypervisor detection needed for FATE#303051 Patch8: util-linux-2.14.1-lscpu.patch Patch9: util-linux-2.14.1-lscpu_sysroot_option.patch Patch10: util-linux-2.14.1-lscpu_add_hypervisor_detection.patch +# bnc#433028 Patch11: util-linux-2.14.1-mount_swap_pagesize.patch Patch12: util-linux-2.14.1-sys-utils_lscpu_exit.patch -Patch13: util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch -Patch14: util-linux-2.14.1-fdisk_missing_include.patch Patch15: util-linux-2.14.1-fdisk_cylinder.patch -Patch16: util-linux-2.14.1-mount_loop_ro_fix.patch +# bnc#444966 Patch17: util-linux-2.14.1-mount_race.patch +# bnc#447036 Patch18: util-linux-2.14.1-mount_skip_sync.patch +# bnc#441106 Patch19: util-linux-2.14.1-hwclock_adjust_and_hctosys.patch +# bnc#450675 Patch20: util-linux-2.14.1-disk_utils_raw_should_use_ioctl_to_create_device.patch +# bnc#449646 +Patch21: fix-hang-on-stale-nfs.diff +# bnc#444637 +Patch22: util-linux-2.14.2-schedutils_ionice_enosys.patch +# bnc#456375 +Patch23: util-linux-2.14.2-schedutils_fix_email.patch +# bnc#461732 +Patch24: util-linux-2.14.2-mount_allow_loop_suid_umount.patch # crypto patch Patch30: util-linux-mount_losetup_crypto.patch ## @@ -125,25 +131,22 @@ Authors: %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -%patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 -%patch13 -p1 -%patch14 -p1 %patch15 -p1 -%patch16 -p1 %patch17 -p1 %patch18 -p1 %patch19 -p1 %patch20 -p1 +%patch21 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 %patch30 -p1 -cp %{SOURCE7} %{SOURCE8} . +cp %{SOURCE32} %{SOURCE33} %{SOURCE34} . # cd adjtimex-* %patch50 -p1 @@ -382,8 +385,9 @@ fi %files # Common files for all archs %defattr(-,root,root) +%doc v2.14-ReleaseNotes %doc v2.14.1-ReleaseNotes -%doc v2.14.1-ChangeLog +%doc v2.14.2-ReleaseNotes %doc login-utils/README.getty %doc login-utils/README.modems-with-agetty %doc login-utils/README.poeigl @@ -529,6 +533,8 @@ fi %{_mandir}/man8/fsck.minix.8.gz %{_mandir}/man8/isosize.8.gz %{_mandir}/man8/ldattach.8.gz +#%{_mandir}/man8/linux32.8.gz +#%{_mandir}/man8/linux64.8.gz %{_mandir}/man8/losetup.8.gz %{_mandir}/man8/mkfs.8.gz %{_mandir}/man8/mkswap.8.gz @@ -593,25 +599,69 @@ fi # setarch links #%ifarch %ix86 x86_64 #/usr/bin/i386 +#%{_mandir}/man8/i386.8.gz #%endif #%ifarch x86_64 #/usr/bin/x86_64 +#%{_mandir}/man8/x86_64.8.gz #%endif #%ifarch s390 s390x #/usr/bin/s390 #/usr/bin/s390x +#%{_mandir}/man8/s390.8.gz +#%{_mandir}/man8/s390x.8.gz #%endif #%ifarch ppc ppc64 #/usr/bin/ppc #/usr/bin/ppc32 #/usr/bin/ppc64 +#%{_mandir}/man8/ppc.8.gz +#%{_mandir}/man8/ppc32.8.gz +#%{_mandir}/man8/ppc64.8.gz #%endif #%ifarch ia64 #/usr/bin/i386 #/usr/bin/ia64 +#%{_mandir}/man8/i386.8.gz +#%{_mandir}/man8/ia64.8.gz #%endif %changelog +* Thu Feb 12 2009 mkoenig@suse.de +- update to version 2.14.2 + chrt: + * support CFS SCHED_IDLE priority and document it + fdisk: + * cannot create partition with starting beyond 1 TB + * remove obsolete information from man page + hwclock: + * remove "cli" and "sti" from i386 CMOS code + * remove x86_64-specific bogon + losetup: + * add warning about read-only mode + * missing EBUSY error hint message + more: + * minor fixes to magic() + mount: + * add i_version support + * add info about /proc/mounts to mount.1 + * add info about semantics of read-only mount to mount.8 + * add rootcontext= SELinux mount option + * clean up SPEC canonicalization + * create separate section for fs-independent options in mount.8 + * finalize support of quoted LABELs/UUIDs + * mtab created multiple times with -a option + * suggest to use blockdev --setro rather than losetup +- catch ENOSYS in ionice to allow execution in virtualized + environments which don't support ioprio_{get,set} calls [bnc#444637] +- umount: fix suid check for user mounted loop devices [bnc#461732] +- fix doc [bnc#456375] +- remove patches: + util-linux-2.13.1-fdisk_cfdisk_yesno.patch + util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch + util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch + util-linux-2.14.1-fdisk_missing_include.patch + util-linux-2.14.1-mount_loop_ro_fix.patch * Sat Feb 07 2009 schwab@suse.de - Fix info dir entry for which. * Wed Jan 07 2009 mkoenig@suse.de diff --git a/v2.14-ReleaseNotes b/v2.14-ReleaseNotes new file mode 100644 index 0000000..739bc40 --- /dev/null +++ b/v2.14-ReleaseNotes @@ -0,0 +1,418 @@ + +Util-linux-ng 2.14 Release Notes (09-Jun-2008) +============================================== + +Release highlights +------------------ + + mount(8) supports new "nofail" mount option. + + mount(8) supports auto-destruction of loop devices. + + losetup(8) supports new command line option "-j" to show status of all + loop devices associated with given file. + + losetup(8) supports unlimited number of loop devices. + + losetup(8) supports new command line option "--sizelimit" to set data end. + + ldattach(8) command has been added to util-linux-ng. The ldattach + daemon opens the specified device file and attaches the line discipline + to it for processing of the sent and/or received data. + + setterm(8) supports new command line option "-blank [force|poke]" for + TIOCL_{BLANKED,BLANK}SCREEN. + + tailf(8) has been reimplemented to use inotify. + + tailf(8) supports new command line option "-n" to specifying output lines. + + mkswap(8) supports new command line option "-U" to set UUID explicitly. + + fdisk(8) has been fixed to calculate partition size in 2^N. + + cal(8) supports highlighting an arbitrary date. + + agetty(8) makes username-in-uppercase feature optional (off by default). + Users who use uppercase-only terminals need to use the option "-U" now. + + losetup(8), mount(8), umount(8), fdisk(8) and sfdisk(8) support static + linking when compiled with --enable-static-programs. + + hwclock(8) supports new command line option "adjfile" to override + the default /etc/adjtime. + + scriptreplay(1) command has been re-written from Perl to C. + + +Deprecated +---------- + + The losetup(8) '-s' option (introduced by util-linux-ng-2.13) is deprecated + now. This short form of the option '--show' could be in collision with + Loop-AES losetup implementation where the same option is used for the loop + sizelimit. + + +Fixed security issues +--------------------- + + CVE-2008-1926 - audit log injection via login + + The problem was originally reported for OpenSSH few months + ago (CVE-2007-3102). The login(1) is affected by the same + bug when built with the option "--with-audit". + + +Stable maintenance releases between v2.13 and v2.14 +--------------------------------------------------- + +util-linux-ng 2.13.1.1 [22-Apr-2008] + + * ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1.1-ReleaseNotes + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1.1-ChangeLog + +util-linux-ng 2.13.1 [16-Jan-2008] + + * ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1-ReleaseNotes + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1-ChangeLog + + +ChangeLog between v2.13 and v2.14 +--------------------------------- + + For more details see ChangeLog files at: + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/ + +agetty: + - cleanup MAXHOSTNAMELEN [Karel Zak] + - make username-in-uppercase feature optional (off by default.) [Hamish Coleman] + - non-linux support (use pathnames.h) [Karel Zak] + - replace termio with termios interface [Samuel Thibault] + - ungettextize several debugging messages. [Benno Schulenberg] +blockdev: + - add --getsz to blockdev.8 [Karel Zak] + - add missing description about option --report in manpage [Li Zefan] + - fix opened file leaving unclosed [lizf] + - use lib/blkdev.c, fix --report [Karel Zak] +build-sys: + - add --enable-static-programs [Stepan Kasal, Karel Zak] + - add AC_CANONICAL_HOST [Miklos Szeredi] + - add VARSUFFIX to UTIL_CHECK_LIB [Karel Zak] + - add err.h check [Karel Zak] + - add support ionice for Super-H architecture [Karel Zak] + - add v2.14 to NEWS [Karel Zak] + - autogen.sh reports versions of autotools now [Karel Zak] + - build arch(1) during distcheck [Stepan Kasal] + - cleanup "x$foo" usage [Karel Zak] + - cleanup disk-utils/Makefile.am (use $utils_common) [Karel Zak] + - cleanup usage of linux/major.h [Samuel Thibault] + - disable syscall fallbacks for non-linux systems [Karel Zak] + - do not add -luuid to BLKID_LIBS [Stepan Kasal] + - fix missing deps for swapon [Matthias Koenig] + - ignore a bunch of generated files, mostly binaries [James Youngman] + - nls/locale handling in util-linux-ng general [Mike Frysinger] + - non-linux support [Samuel Thibault] + - release++ [Karel Zak] + - remove errs.h [Karel Zak] + - remove files that are no longer delivered from git [LaMont Jones] + - remove hardcoded _GNU_SOURCE [Karel Zak] + - remove unnecessary check-local target from login-utils/ [Karel Zak] + - set AC_PREREQ to 2.60, increment version to 2.14 [Karel Zak] + - simplify code around RDEV_LINKS and SETARCH_LINKS [Stepan Kasal] + - unify method for checking system calls and fallback handling [Mike Frysinger, Stepan Kasal] + - update .gitignore files [Karel Zak] + - use dist_man_MANS instead of man_MANS [Stepan Kasal] + - use ncursesw (wide version) when possibe [Karel Zak, Mike Frysinger] + - use pkg-config to find the libs for static build [Stepan Kasal] + - use portable $(VAR =) instead of gmake-specific $(addsuffix) [Stepan Kasal] +cal: + - add description about option -V to manpage [Li Zefan] + - add support for highlighting an arbitrary date [Pádraig Brady] + - avoid -Wformat warnings [Jim Meyering] + - fix weekday alignment for certain locales [Pádraig Brady] + - replace errs.h with libc err.h [Karel Zak] + - use HAVE_LIB{NCURSES,NCURSESW} instead HAVE_NCURSES [Karel Zak] +cfdisk: + - define portable {DEFAULT,ALTERNATE}_DEVICE [Samuel Thibault] + - display cylinders beyond 1024 [Peter Breitenlohner] + - slightly increase the size of menu buttons [Benno Schulenberg] + - translate partition-type names when they are printed. [Benno Schulenberg] +chfn: + - add pam_end() call and cleanup PAM code [Karel Zak] + - fix compiler warnings in selinux stuff [Karel Zak] +chfn, chsh, login: + - collapsing three similar messages into a single one [Benno Schulenberg] +chsh: + - should use pam_end function to terminate the PAM transaction [Yu Zhiguo, Karel Zak] +column: + - replace errs.h with libc err.h [Karel Zak] +ddate: + - 11th, 12th and 13th of month [Volker Schatz] +docs: + - add a note about minix v3 to TODO file [Karel Zak] + - add info about .bugfix releases and branches [Karel Zak] + - add note about incorrect tag 2.13.1 [Karel Zak] + - add note about losetup --sizelimit to ReleaseNotes [Karel Zak] + - add note about static linking [Karel Zak] + - add v2.14 ReleaseNotes [Karel Zak] + - cleanup DEPRECATED file [Karel Zak] + - cleanup README.devel, add note about coding style and Signed-off-by [Karel Zak] + - fix ChangeLog URL [Pascal Terjan] + - fix stable branche name in README.devel [Karel Zak] + - mark vipw(1) is deprecated in favor of vipw from shadow-utils [Karel Zak] + - refresh TODO list [Karel Zak] + - remove date from ReleasNotes [Karel Zak] + - tweak a few messages for clarity [Benno Schulenberg] + - update AUTHORS file [Karel Zak] + - update TODO file [Karel Zak] + - update v2.14 ReleaseNotes [Karel Zak] + - we already rewrote the scriptreplay script; remove that TODO entry [James Youngman] +elvtune: + - use get_linux_version() [Karel Zak] +fdformat: + - install to /usr/sbin instead to /usr/bin [Karel Zak] +fdisk: + - better fallback for get_random_id() [H. Peter Anvin] + - calculate +size{K,M,G} in 2^N [Karel Zak] + - cleanup BLK* ioctls usage [Karel Zak] + - doesn't recognize the VMware ESX partitions [Karel Zak] + - doing useless ioctl when editing an image [Pascal Terjan] + - fix building for AVR32 and CRIS [Imre Kaloz] + - fix typo [Karel Zak] + - message tweak [Karel Zak] + - non-linux support (MAXPATHLEN) [Karel Zak] + - non-linux support (use standard uintxy_t instead __uxy) [Samuel Thibault] + - use more readable "GPT" name rather than "EFI GPT" [Robert Millan] + - use swab macros from bitops.h [Karel Zak] +flock: + - typo in man page [A. Costa] +fsck.cramfs: + - clean up gcc warnings [Randy Dunlap] +fsck.minix: + - correct the error message given when we can't open the device [James Youngman] + - reset the terminal state if we are killed by a fatal signal [James Youngman] +getopt: + - fix path to examples in getopt.1 [Karel Zak] + - install example scripts as SCRIPTS, not DATA [Peter Breitenlohner] +hwclock: + - add --adjfile=path option [Karel Zak] + - check for ENODEV [David Woodhouse] + - do not create a zero adjfile [Alain Guibert] + - fix --rtc option [Matthias Koenig, Karel Zak] +include: + - provides everything [Samuel Thibault] + - add bitops.h with swab{16,32,64} macros [Karel Zak] + - add mount paths to pathnames.h [Karel Zak] + - cleanup pathnames.h [Karel Zak] +ionice: + - add a note about permissions to ionice.1 [Karel Zak] + - update man page to reflect IDLE class change in 2.6.25 [Karel Zak] +ipcs: + - add information about POSIX compatibility to ipcs.1 [Karel Zak] +kill: + - man page is missing a description of "kill -0" [Karel Zak] +ldattach: + - add NLS support [Karel Zak] + - new command [Tilman Schmidt] + - use glibc termios [Karel Zak] +lib: + - add blkdev.{c,h} [Stefan Krah, Karel Zak] + - add linux_version.{c,h} [Stefan Krah] +login: + - audit log injection attack via login [Steve Grubb] + - fix a small memory leak and remove unnecessary zeroing [Karel Zak] + - login segfaults on EOF (rh#298461) [Karel Zak] + - replace termio with termios interface [Samuel Thibault] + - rewrite is_local() to remove limits on line length [James Youngman] +login-utils: + - cleanup strlen() and fgets() usage [James Youngman] +losetup: + - add --associated option [Karel Zak] + - add --sizelimit option [Shachar Shemesh] + - canonicalize loopfile name [Karel Zak, Matthias Koenig] + - clean up gcc warnings [Randy Dunlap] + - fix errno usage [Karel Zak] + - fix typo in losetup.8 [Karel Zak] + - mark the option -s as deprecated [Karel Zak] + - remove duplicate xstrdup() and error() [Karel Zak] + - split help message into two smaller parts [Benno Schulenberg] + - support unlimited number of loops [Karel Zak] + - use standard uintxy_t types (struct loop_info64) [Samuel Thibault] +mesg: + - replace errs.h with libc err.h [Karel Zak] +mkfs.cramfs: + - clean up gcc warnings [Randy Dunlap, Karel Zak] + - remove unused header file [lizf] + - switch on localization. [Benno Schulenberg] +mkfs.minix: + - add sectorsize check [Matthias Koenig] + - clean up gcc warnings [Karel Zak] + - clean up gcc warnings [Randy Dunlap] + - device size cleanup [Matthias Koenig] +mkswap: + - BLKGETSIZE cleanup [Karel Zak] + - cleanup kB vs. KiB usage in error messages [Karel Zak] + - fix compiler warnings [Karel Zak] + - linux_version() code consolidation [Karel Zak] + - possible to crash with SELinux relabeling support [KaiGai Kohei] + - set UUID for swap space (add -U option) [Martin Schulze] + - set errno=0 in write_all() [Karel Zak] + - when writing the signature page, handle EINTR returns [Karel Zak] +more: + - cleanup gcc warnings [Randy Dunlap] + - non-linux support [Samuel Thibault] + - replace CBAUD with cfgetispeed() [Samuel Thibault] + - use HAVE_WIDECHAR instead ENABLE_WIDECHAR [Karel Zak] +mount: + - "can't create lock file" message sometimes means failure, sometimes not [Mark McLoughlin] + - "nofail" mount option [Matthias Koenig, Karel Zak] + - -L|-U segfault when label or uuid doesn't exist [Karel Zak] + - add more details to the --version output [Karel Zak] + - add support for sizelimit= mount option (for loop mounts) [Shachar Shemesh] + - allow auto-destruction of loop devices [Bernardo Innocenti] + - chain of symlinks to fstab causes use of pointer after free [Norbert Buchmuller] + - clean up gcc warnings (mount_mntent.c) [Randy Dunlap] + - clean up global variables [Karel Zak] + - cleanup "none" fstype usage [Karel Zak] + - cleanup KERNEL_VERSION, remove my_dev_t.h [Karel Zak] + - cleanup canonicalize() usage [Karel Zak] + - cleanup error() and die() [Karel Zak] + - cleanup usage of _PATH_* [Karel Zak] + - doesn't drop privileges properly when calling helpers [Ludwig Nussel] + - don't call canonicalize(SPEC) for cifs, smbfs and nfs [Karel Zak] + - don't canonicalize LABEL= or UUID= spec [Karel Zak] + - drop the part always true from a while condition [Pascal Terjan] + - fix a small typo in mount.8 [Christophe Blaess] + - fix fd leak [Matthias Koenig] + - fix typo in mount.8 [Karel Zak] + - hint about helper program if device doesn't exist [Karel Zak] + - improve chmod & chown usage and clean up gcc warnings (fstab.c) [Karel Zak] + - improve error message when helper program not present [LaMont Jones] + - prevent loop mounting the same file twice [Karel Zak, Matthias Koenig] + - remount doesn't care about loop= [Karel Zak] + - remove MS_{REPLACE,AFTER,BEFORE,OVER} [Karel Zak] + - remove built-in support for background mounts [Karel Zak] + - remove redundant fflush [Karel Zak] + - remove set_proc_name() [Karel Zak] + - remove useless if-before-my_free, define my_free as a macro [Karel Zak] + - use MNTTYPE_SWAP (from mntent.h) [Karel Zak] + - use atexit() rather than (*at_die)() [Karel Zak] + - use blkdev_get_size() [Karel Zak] + - use canonicalize in getfs_by_devname [Karel Zak] +namei: + - add to identify FIFO (named pipe) and update manpage [Li Zefan] + - cleanup tailing white-spaces [Karel Zak] + - non-linux support (get_current_dir_name() and PATH_MAX) [Karel Zak, Samuel Thibault] +partx: + - fix compiler warnings [Karel Zak] + - use swab macros from bitops.h [Karel Zak] +pg: + - fix segfault on search [Rajeev V. Pillai] +po: + - add eu.po (from translationproject.org) [Mikel Olasagasti] + - add pl.po (from translationproject.org) [Andrzej Krzysztofowicz] + - fix typo in de.po [Karel Zak] + - merge changes [Karel Zak] + - update POTFILES.in [Karel Zak] + - update ca.po (from translationproject.org) [Josep Puigdemont] + - update cs.po (from translationproject.org) [Petr Pisar] + - update da.po (from translationproject.org) [Claus Hindsgaul] + - update de.po (from translationproject.org) [Michael Piefel] + - update es.po (from translationproject.org) [Santiago Vila Doncel] + - update et.po (from translationproject.org) [Meelis Roos] + - update fi.po (from translationproject.org) [Lauri Nurmi] + - update fr.po (from translationproject.org) [Michel Robitaille] + - update hu.po (from translationproject.org) [Gabor Kelemen] + - update id.po (from translationproject.org) [Arif E. Nugroho] + - update it.po (from translationproject.org) [Marco Colombo] + - update ja.po (from translationproject.org) [Daisuke Yamashita] + - update nl.po (from translationproject.org) [Benno Schulenberg] + - update po files [Karel Zak] + - update pt_BR.po (from translationproject.org) [Rodrigo Stulzer Lopes] + - update ru.po (from translationproject.org) [Pavel Maryanov] + - update sl.po (from translationproject.org) [Simon Mihevc] + - update sv.po (from translationproject.org) [Daniel Nylander] + - update tr.po (from translationproject.org) [Nilgün Belma Bugüner] + - update uk.po (from translationproject.org) [Maxim V. Dziumanenko] + - update vi.po (from translationproject.org) [Clytie Siddall] +rename: + - add description about option -V to manpage [Li Zefan] + - remove useless variable [Li Zefan] +renice: + - detect errors in arguments, add -v, -h and long options [LaMont Jones, Karel Zak] +rev: + - use warn() in errs.h [Li Zefan] +rtcwake: + - fix UTC time usage [David Brownell] + - fix the default mode to "standby" [Paulius Zaleckas] + - fix typo [Karel Zak] + - fix typo SATE -> STATE [Mike Frysinger] + - fix verbose message [Karel Zak] + - include libgen.h for basename prototype [Mike Frysinger] + - misc cleanups [David Brownell] +script: + - cleanup gcc warnings [Randy Dunlap] + - cleanup includes [Samuel Thibault] + - dies on SIGWINCH [Karel Zak] + - read returns a size_t [James Youngman] +scriptreplay: + - gettextize a forgotten messages [Karel Zak] + - rewrite in C [Karel Zak, James Youngman] +setarch: + - add fallback for linux/personality [Karel Zak] + - add long options to setarch and update manpage [Karel Zak, Li Zefan] + - add missing alpha subarchs [Oliver Falk] + - adding groff symlinks to setarch manual page [Arkadiusz Miskiewicz] + - fix compiler warning [LaMont Jones] + - generate groff links in a better way [Karel Zak] + - provide backwards compatibility [Dmitry V. Levin] + - tweak the help text, and gettextize a forgotten message [Benno Schulenberg] +setterm: + - add -blan [force|poke] options for TIOCL_{BLANKED,BLANK}SCREEN [Samuel Thibault, Karel Zak] + - dump by TIOCLINUX is deprecated since linux 1.1.92. [Karel Zak] + - opened file leaving unclosed [Karel Zak, lizf] + - remove unnecessaty ifndef TCGETS [Samuel Thibault] +sfdisk: + - allow partitioning drives of over 2^31 sectors. [Kunihiko IMAI] + - cleanup 83 gcc warnings [Randy Dunlap] + - opened files leaving unclosed [Karel Zak, Li Zefan] + - remove unnecessary linux/unistd.h [Samuel Thibault] + - use get_linux_version() [Karel Zak] +shutdown: + - use _PATH_MOUNTED instead of _PATH_MTAB [Stepan Kasal] +swapon: + - Reinitialize software suspend areas to avoid future corruption. [Kees Cook, Karel Zak] + - add sundries.h [Karel Zak] + - clean up gcc warnings [Randy Dunlap] + - cleanup usage output [Karel Zak] + - cleanup usage() [Karel Zak] + - fix swsuspend detection [Karel Zak] + - fix typo in usage() [Karel Zak] + - readjust the usage summaries [Benno Schulenberg] + - remove unnecessary myrealpath() call [Karel Zak] +sys-utils: + - correct setarch.8 manpage link creation [Frédéric Bothamy] +tailf: + - add option -n to specifying output lines [Li Zefan] + - clean up gcc warnings & fix use of errno [Karel Zak] + - inotify based reimplementation [Karel Zak] + - non-linux support [Samuel Thibault] + - opened file leaving unclosed [lizf] + - replace errs.h with libc err.h [Karel Zak] +tests: + - add "sort" to cramfs test [Karel Zak] + - add test for include/pathnames.h [Karel Zak] + - add ts-mount-noncanonical [Karel Zak] + - exactly define a time format in ls -l output [Karel Zak] + - fix blkid cache usage [Karel Zak] + - move test_bkdev to lib/ [Karel Zak] + - redirect libblkid cache to BLKID_FILE [Karel Zak] + - rename test_sysinfo, remove tailing white-spaces [Karel Zak] + - use losetup -s [Karel Zak] +umount: + - add hint about lsof & fuser [Karel Zak] + - don't print duplicate error messages [Karel Zak] + - use atexit() rather than (*at_die)() [Karel Zak] +wall: + - cleanup MAXHOSTNAMELEN [Karel Zak] diff --git a/v2.14.1-ChangeLog b/v2.14.1-ChangeLog deleted file mode 100644 index 565bb64..0000000 --- a/v2.14.1-ChangeLog +++ /dev/null @@ -1,95 +0,0 @@ -Changes between 2.14.1-rc2 and 2.14.1 -------------------------------------- - -commit 0c24888de6470137673519eb5c20bef98be24e0f -Author: Karel Zak -Date: Wed Sep 10 12:17:22 2008 +0200 - - build-sys: release++ (v2.14.1) - - Signed-off-by: Karel Zak - - NEWS | 4 ++++ - configure.ac | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) - -commit 204d2a7ff7e0bd39e1769a3d8c071484061b878a -Author: Karel Zak -Date: Wed Sep 10 12:11:21 2008 +0200 - - docs: update v2.14.1 ReleaseNotes - - Signed-off-by: Karel Zak - - docs/v2.14.1-ReleaseNotes | 8 +++++++- - 1 files changed, 7 insertions(+), 1 deletions(-) - -commit 00dd2edec25e68bfe58ea538f7a220fcd4d42f83 -Author: Karel Zak -Date: Wed Sep 10 11:21:54 2008 +0200 - - po: merge changes - - Signed-off-by: Karel Zak - - po/cs.po | 536 +++++++++++++++++++++++++++------------ - po/fi.po | 620 ++++++++++++++++++++++++++++++++-------------- - po/id.po | 802 ++++++++++++++++++++++++++++++++++++++++++----------------- - po/nl.po | 591 ++++++++++++++++++++++++++++++------------- - po/vi.po | 594 +++++++++++++++++++++++++++++++------------- - po/zh_CN.po | 223 ++++++++++++----- - 6 files changed, 2375 insertions(+), 991 deletions(-) - -commit af470cdb8d8cd81cb6032d90b74cb848dd569d1b -Author: Ray Wang -Date: Wed Sep 10 11:02:59 2008 +0200 - - po: update zh_CN.po (from translationproject.org) - - po/zh_CN.po | 394 ++++++++++++++++++++++++++++------------------------------- - 1 files changed, 187 insertions(+), 207 deletions(-) - -commit c147882de248158dba60d278a8ad5447cbbdd3e8 -Author: Clytie Siddall -Date: Wed Sep 10 11:02:59 2008 +0200 - - po: update vi.po (from translationproject.org) - - po/vi.po | 628 ++++++++++++++++++-------------------------------------------- - 1 files changed, 177 insertions(+), 451 deletions(-) - -commit 59d683e572c05a4ecc36da63c6c04ec7a73b6efc -Author: Benno Schulenberg -Date: Wed Sep 10 11:02:59 2008 +0200 - - po: update nl.po (from translationproject.org) - - po/nl.po | 649 +++++++++++++++++++------------------------------------------- - 1 files changed, 193 insertions(+), 456 deletions(-) - -commit 2da935df47b5b9c7571383366da4e3b82352752d -Author: Arif E. Nugroho -Date: Wed Sep 10 11:02:59 2008 +0200 - - po: update id.po (from translationproject.org) - - po/id.po | 1598 ++++++++++++++++++++++++++------------------------------------ - 1 files changed, 665 insertions(+), 933 deletions(-) - -commit fc5ac303f066040d737e1e4b9033fb6b3036b5fc -Author: Lauri Nurmi -Date: Wed Sep 10 11:02:59 2008 +0200 - - po: update fi.po (from translationproject.org) - - po/fi.po | 873 ++++++++++++++++++++++---------------------------------------- - 1 files changed, 314 insertions(+), 559 deletions(-) - -commit 0bd69ee4a38b56e5b82b98d77b00c4b4146bf60d -Author: Petr Pisar -Date: Wed Sep 10 11:02:59 2008 +0200 - - po: update cs.po (from translationproject.org) - - po/cs.po | 544 +++++++++++++++++++------------------------------------------- - 1 files changed, 167 insertions(+), 377 deletions(-) diff --git a/v2.14.2-ReleaseNotes b/v2.14.2-ReleaseNotes new file mode 100644 index 0000000..7168bf6 --- /dev/null +++ b/v2.14.2-ReleaseNotes @@ -0,0 +1,92 @@ +Util-linux-ng 2.14.2 Release Notes (??-Jan-2009) +================================================ + +ChangeLog between v2.14.1 and v2.14.2 +------------------------------------- + + For more details see ChangeLog files at: + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/ + +build-sys: + - add -luuid to BLKID_LIBS [Karel Zak] + - release++ (v2.14.2-rc1) [Karel Zak] +cfdisk: + - accept yes/no as fallback [Matthias Koenig] +chrt: + - support CFS SCHED_IDLE priority and document it [Martin Steigerwald] +docs: + - update AUTHORS file [Karel Zak] + - update v2.14.2 ReleaseNotes [Karel Zak] +fdisk: + - add some missing includes [Matthias Koenig] + - cannot create partition with starting beyond 1 TB [Karel Zak] + - fix man page typo [Karel Zak] + - remove obsolete information from man page [Karel Zak] + - remove unnecessary gettext call [Karel Zak] + - several strings without gettext calls [Pedro Ribeiro] + - support +cylinder notation [Karel Zak] +hwclock: + - remove "cli" and "sti" from i386 CMOS code [Karel Zak] + - remove x86_64-specific bogon [David Brownell] +include: + - use __BYTE_ORDER rather than AC specific WORDS_BIGENDIAN [Karel Zak] +ionice: + - Extend the man page to explain the "none" class and cpu-nice inheritance [Jakob Unterwurzacher] + - a little cleanup of "none" description [Karel Zak] +ldattach: + - don't compile for non-linux systems [Samuel Thibault] +lib: + - add __BYTE_ORDER to md5.c [Karel Zak] +logger: + - several strings without gettext calls [Pedro Ribeiro] +login: + - fix compiler warning (int32 time() arg) [Karel Zak] + - fix warning "dereferencing type-punned pointer will break strict-aliasing rules" [Karel Zak] +losetup: + - add warning about read-only mode [Karel Zak] + - missing EBUSY error hint message [Karel Zak] + - several strings without gettext strings [Pedro Ribeiro] + - try to set up loop readonly if EACCES [Matthias Koenig] +mkfs.cramfs: + - several strings without gettext calls [Pedro Ribeiro] +mkfs.minix: + - fix size detection [Matthias Koenig] +more: + - dont use a.out.h [Mike Frysinger] + - minor fixes to magic() [James Youngman] +mount: + - add i_version support [Karel Zak] + - add info about /proc/mounts to mount.1 [Karel Zak] + - add info about semantics of read-only mount to mount.8 [Karel Zak] + - add rootcontext= SELinux mount option [Karel Zak] + - clean up SPEC canonicalization [Karel Zak] + - cleans up mount(8) troff markup [Sam Varshavchik] + - create separate section for fs-independent options in mount.8 [Karel Zak] + - finalize support of quoted LABELs/UUIDs [Karel Zak] + - fix mount_static_LDADD [Karel Zak] + - fix typo [Guan Xin] + - fix typo [Karel Zak] + - make file_t SELinux warning optional and shorter [Karel Zak] + - mtab created multiple times with -a option [Karel Zak] + - remove link to namesys.com [Karel Zak] + - remove spurious newline from mount.8 [Mike Frysinger] + - reorder list of options in mount.8 [Karel Zak] + - retry on ENOMEDIUM [Matthias Koenig] + - suggest to use blockdev --setro rather than losetup [Karel Zak] + - sundries.h add klibc support [maximilian attems] + - sync FAT info in mount.8 with Documentation/filesystems/vfat.txt [Karel Zak] + - sync tmpfs info in mount.8 with Documentation/filesystems/tmpfs.txt [Karel Zak] + - use subsections in mount.8 DESCRIPTION [Karel Zak] + - warn on "file_t" selinux context [Karel Zak] +po: + - merge changes [Karel Zak] + - update cs.po (from translationproject.org) [Petr Pisar] + - update fr.po (from translationproject.org) [Nicolas Provost] + - update pt_BR.po (from translationproject.org) [Rodrigo Stulzer Lopes] + - update sv.po (from translationproject.org) [Daniel Nylander] +readprofile: + - several strings without gettext calls [Pedro Ribeiro] +setterm: + - fix -blank man page [Karel Zak] + +- use getpagesize() [maximilian attems] From 21058c808377c307f9304a93ef350ff5eb2cf6755475743823bdfd4dc1e91fba Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 16 Feb 2009 15:06:39 +0000 Subject: [PATCH 074/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=74 --- util-linux-2.14.1-fdisk_cylinder.patch | 16 ---------------- util-linux.changes | 6 ++++++ util-linux.spec | 7 ++++--- 3 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 util-linux-2.14.1-fdisk_cylinder.patch diff --git a/util-linux-2.14.1-fdisk_cylinder.patch b/util-linux-2.14.1-fdisk_cylinder.patch deleted file mode 100644 index ba366b6..0000000 --- a/util-linux-2.14.1-fdisk_cylinder.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: util-linux-ng-2.14.1/fdisk/fdisk.c -=================================================================== ---- util-linux-ng-2.14.1.orig/fdisk/fdisk.c 2008-11-05 16:38:11.000000000 +0100 -+++ util-linux-ng-2.14.1/fdisk/fdisk.c 2008-11-05 17:23:30.000000000 +0100 -@@ -1186,8 +1186,9 @@ read_int(unsigned int low, unsigned int - while(isspace(*(line_ptr + suflen))) - *(line_ptr + suflen--) = '\0'; - -- if ((*line_ptr == 'C' || *line_ptr == 'c') && -- *(line_ptr + 1) == '\0') { -+ if (((*line_ptr == 'C' || *line_ptr == 'c') && -+ *(line_ptr + 1) == '\0') || -+ *line_ptr == '\0') { - /* - * Cylinders - */ diff --git a/util-linux.changes b/util-linux.changes index f31c7d8..e79bbcb 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 16 12:35:00 CET 2009 - mkoenig@suse.de + +- remove util-linux-2.14.1-fdisk_cylinder.patch + fixed upstream + ------------------------------------------------------------------- Thu Feb 12 17:12:28 CET 2009 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index aca1d99..1d668bd 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -29,7 +29,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14.2 -Release: 1 +Release: 2 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -74,7 +74,6 @@ Patch10: util-linux-2.14.1-lscpu_add_hypervisor_detection.patch # bnc#433028 Patch11: util-linux-2.14.1-mount_swap_pagesize.patch Patch12: util-linux-2.14.1-sys-utils_lscpu_exit.patch -Patch15: util-linux-2.14.1-fdisk_cylinder.patch # bnc#444966 Patch17: util-linux-2.14.1-mount_race.patch # bnc#447036 @@ -136,7 +135,6 @@ Authors: %patch10 -p1 %patch11 -p1 %patch12 -p1 -%patch15 -p1 %patch17 -p1 %patch18 -p1 %patch19 -p1 @@ -627,6 +625,9 @@ fi #%endif %changelog +* Mon Feb 16 2009 mkoenig@suse.de +- remove util-linux-2.14.1-fdisk_cylinder.patch + fixed upstream * Thu Feb 12 2009 mkoenig@suse.de - update to version 2.14.2 chrt: From ca4e1e1328657f870ff2a14117d171dee468cbbd677a2fdff784064bced3bdc8 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sat, 18 Apr 2009 12:05:54 +0000 Subject: [PATCH 075/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=75 --- util-linux.changes | 6 ++++++ util-linux.spec | 25 ++++++++++++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index e79bbcb..37bc572 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 16 14:55:22 CEST 2009 - werner@suse.de + +- Move /usr/sbin/adjtimex to /sbin/adjtimex to be able to check the + kernel time variables even without /usr mounted + ------------------------------------------------------------------- Mon Feb 16 12:35:00 CET 2009 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 1d668bd..492413e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -20,7 +20,7 @@ Name: util-linux BuildRequires: audit-devel gettext-devel libuuid-devel libvolume_id-devel BuildRequires: libselinux-devel ncurses-devel pam-devel readline-devel zlib-devel -Url: http://kernel.org/pub/linux/utils/util-linux +Url: http://userweb.kernel.org/~kzak/util-linux-ng/ Provides: util rawio raw base schedutils Supplements: filesystem(minix) Obsoletes: util rawio raw base schedutils @@ -29,7 +29,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14.2 -Release: 2 +Release: 3 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -242,7 +242,7 @@ make check %install mkdir -p "$RPM_BUILD_ROOT"{/etc/init.d,%{_mandir}/man{1,8},\ /bin,/sbin,/usr/bin,/usr/sbin,%{_infodir}} -cp adjtimex-*/adjtimex %{buildroot}/usr/sbin/ +cp adjtimex-*/adjtimex %{buildroot}/sbin/ cp adjtimex-*/adjtimex.8 %{buildroot}%{_mandir}/man8/ pushd .. # freeramdisk install @@ -399,11 +399,11 @@ fi %config %attr(744,root,root) /etc/init.d/raw %config(noreplace) %attr(644,root,root) /etc/raw %config(noreplace) /etc/filesystems -/usr/sbin/rcraw /bin/dmesg /bin/more /bin/mount /bin/umount +/sbin/adjtimex /sbin/agetty /sbin/blockdev /sbin/elvtune @@ -463,14 +463,14 @@ fi /usr/bin/which /usr/sbin/addpart /usr/sbin/delpart -/usr/sbin/ldattach /usr/sbin/freeramdisk +/usr/sbin/ldattach /usr/sbin/partx +/usr/sbin/rcraw /usr/sbin/rtcwake /usr/sbin/setctsid %verify(not mode) %attr(0755,root,tty) /usr/bin/wall /usr/bin/whereis -/usr/sbin/adjtimex %verify(not mode) %attr(0755,root,tty) /usr/bin/write %dir %{_defaultdocdir}/time %dir %{_defaultdocdir}/which @@ -625,6 +625,9 @@ fi #%endif %changelog +* Thu Apr 16 2009 werner@suse.de +- Move /usr/sbin/adjtimex to /sbin/adjtimex to be able to check the + kernel time variables even without /usr mounted * Mon Feb 16 2009 mkoenig@suse.de - remove util-linux-2.14.1-fdisk_cylinder.patch fixed upstream @@ -1141,7 +1144,7 @@ fi - Don't package manual executable [#114849] * Thu Sep 01 2005 mmj@suse.de - Add patch for device-mapper mount by label support [#75966] -* Wed Aug 31 2005 ro@suse.de +* Thu Sep 01 2005 ro@suse.de - provide and obsolete schedutils * Tue Aug 23 2005 hvogel@suse.de - update ionice patch by axboe so that ionice will complain about @@ -1601,7 +1604,7 @@ fi o mount updates * Tue Jul 23 2002 schwab@suse.de - Fix mkfs.cramfs for architectures with non-4k pages. -* Tue Jul 16 2002 mmj@suse.de +* Wed Jul 17 2002 mmj@suse.de - Merged base into util-linux * Mon Jul 15 2002 mmj@suse.de - Added JFSv2 patch from Christoph Hellwig for volume label. Does @@ -1674,7 +1677,7 @@ fi - Remove unneeded SPARC patch for hwclock * Sat Oct 13 2001 kukuk@suse.de - Update to util-linux 2.11l -* Tue Sep 11 2001 garloff@suse.de +* Wed Sep 12 2001 garloff@suse.de - Fixed some dutch translations. (bug #10276) * Mon Sep 10 2001 olh@suse.de - marry fdisk and AIX label again... @@ -1790,7 +1793,7 @@ fi * Fri Aug 25 2000 pthomas@suse.de - use %%{_mandir} and %%{_infodir} exclusively. This allows building from source rpm on platforms other than 7.0. -* Tue Jul 18 2000 bk@suse.de +* Wed Jul 19 2000 bk@suse.de - s390: removed dasdfmt and silo, %%ifnarch s390 for some non-s390 things. * Tue May 30 2000 bk@suse.de - added dasdfmt and silo on s390 @@ -1938,7 +1941,7 @@ fi - changed /local/bin/perl5 in chkdupexe to /usr/bin/perl * Fri Oct 31 1997 ro@suse.de - temporarily removed mount-hacker -* Wed Oct 29 1997 florian@suse.de +* Thu Oct 30 1997 florian@suse.de - add changes from ms@suse.de for hostid.c * Tue May 20 1997 florian@suse.de - only support kernel 2.0.x for nfs mounts, please use /bin/mount-hacker From 41f19d1446a324c637799094f43e7f19e99b5ac55e05e42f12bb55772e070485 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 3 Jul 2009 15:12:19 +0000 Subject: [PATCH 076/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=76 --- HEAD.patch | 471 +++++ fix-hang-on-stale-nfs.diff | 18 - util-linux-2.12r-fdisk_cyl.patch | 33 - ...aw_should_use_ioctl_to_create_device.patch | 118 -- ...ux-2.14.1-hwclock_adjust_and_hctosys.patch | 170 -- util-linux-2.14.1-lscpu.patch | 630 ------- ....14.1-lscpu_add_hypervisor_detection.patch | 284 --- util-linux-2.14.1-lscpu_sysroot_option.patch | 267 --- util-linux-2.14.1-mount_swap_pagesize.patch | 191 -- util-linux-2.14.1-sys-utils_lscpu_exit.patch | 11 - ...-2.14.2-mount_allow_loop_suid_umount.patch | 68 - util-linux-2.14.2-schedutils_fix_email.patch | 35 - ...inux-2.14.2-schedutils_ionice_enosys.patch | 19 - util-linux-mount_losetup_crypto.patch | 237 ++- util-linux-ng-2.14.2.tar.bz2 | 3 - util-linux-ng-2.16-rc1.tar.bz2 | 3 + ...nux-2.13-rpmlintrc => util-linux-rpmlintrc | 0 util-linux.changes | 33 +- util-linux.spec | 1613 ++--------------- uuidd.rc | 77 + v2.14-ReleaseNotes | 418 ----- v2.14.1-ReleaseNotes | 49 - v2.14.2-ReleaseNotes | 92 - 23 files changed, 870 insertions(+), 3970 deletions(-) create mode 100644 HEAD.patch delete mode 100644 fix-hang-on-stale-nfs.diff delete mode 100644 util-linux-2.12r-fdisk_cyl.patch delete mode 100644 util-linux-2.14.1-disk_utils_raw_should_use_ioctl_to_create_device.patch delete mode 100644 util-linux-2.14.1-hwclock_adjust_and_hctosys.patch delete mode 100644 util-linux-2.14.1-lscpu.patch delete mode 100644 util-linux-2.14.1-lscpu_add_hypervisor_detection.patch delete mode 100644 util-linux-2.14.1-lscpu_sysroot_option.patch delete mode 100644 util-linux-2.14.1-mount_swap_pagesize.patch delete mode 100644 util-linux-2.14.1-sys-utils_lscpu_exit.patch delete mode 100644 util-linux-2.14.2-mount_allow_loop_suid_umount.patch delete mode 100644 util-linux-2.14.2-schedutils_fix_email.patch delete mode 100644 util-linux-2.14.2-schedutils_ionice_enosys.patch delete mode 100644 util-linux-ng-2.14.2.tar.bz2 create mode 100644 util-linux-ng-2.16-rc1.tar.bz2 rename util-linux-2.13-rpmlintrc => util-linux-rpmlintrc (100%) create mode 100644 uuidd.rc delete mode 100644 v2.14-ReleaseNotes delete mode 100644 v2.14.1-ReleaseNotes delete mode 100644 v2.14.2-ReleaseNotes diff --git a/HEAD.patch b/HEAD.patch new file mode 100644 index 0000000..f61ceae --- /dev/null +++ b/HEAD.patch @@ -0,0 +1,471 @@ +diff --git a/disk-utils/raw.c b/disk-utils/raw.c +index bc64b34..f634b60 100644 +--- a/disk-utils/raw.c ++++ b/disk-utils/raw.c +@@ -40,11 +40,11 @@ int master_fd; + int raw_minor; + + void open_raw_ctl(void); +-int query(int minor, int quiet); ++int query(int minor, const char *raw_name, int quiet); + int bind (int minor, int block_major, int block_minor); + + +-static void usage(int err) ++static void usage(int err) + { + fprintf(stderr, + _("Usage:\n" +@@ -99,7 +99,7 @@ int main(int argc, char *argv[]) + if (optind < argc) + usage(1); + for (i = 1; i < RAW_NR_MINORS; i++) +- query(i, 1); ++ query(i, NULL, 1); + exit(0); + } + +@@ -117,7 +117,10 @@ int main(int argc, char *argv[]) + * causes udev to *remove* /dev/rawctl + */ + rc = sscanf(raw_name, RAWDEVDIR "raw%d", &raw_minor); +- if (rc == 1 && raw_minor == 0) { ++ if (rc != 1) ++ usage(1); ++ ++ if (raw_minor == 0) { + fprintf (stderr, + _("Device '%s' is control raw dev " + "(use raw where is greater than zero)\n"), +@@ -125,28 +128,8 @@ int main(int argc, char *argv[]) + exit(2); + } + +- err = stat(raw_name, &statbuf); +- if (err) { +- fprintf (stderr, _("Cannot locate raw device '%s' (%s)\n"), +- raw_name, strerror(errno)); +- exit(2); +- } +- +- if (!S_ISCHR(statbuf.st_mode)) { +- fprintf (stderr, _("Raw device '%s' is not a character dev\n"), +- raw_name); +- exit(2); +- } +- if (major(statbuf.st_rdev) != RAW_MAJOR) { +- fprintf (stderr, _("Device '%s' is not a raw dev\n"), +- raw_name); +- exit(2); +- } +- +- raw_minor = minor(statbuf.st_rdev); +- + if (do_query) +- return query(raw_minor, 0); ++ return query(raw_minor, raw_name, 0); + + /* + * It's not a query, so we still have some parsing to do. Have +@@ -208,12 +191,35 @@ void open_raw_ctl(void) + } + } + +-int query(int minor, int quiet) ++int query(int minor, const char *raw_name, int quiet) + { + struct raw_config_request rq; + static int has_worked = 0; + int err; + ++ if (raw_name) { ++ struct stat statbuf; ++ ++ err = stat(raw_name, &statbuf); ++ if (err) { ++ fprintf (stderr, _("Cannot locate raw device '%s' (%s)\n"), ++ raw_name, strerror(errno)); ++ exit(2); ++ } ++ ++ if (!S_ISCHR(statbuf.st_mode)) { ++ fprintf (stderr, _("Raw device '%s' is not a character dev\n"), ++ raw_name); ++ exit(2); ++ } ++ if (major(statbuf.st_rdev) != RAW_MAJOR) { ++ fprintf (stderr, _("Device '%s' is not a raw dev\n"), ++ raw_name); ++ exit(2); ++ } ++ minor = minor(statbuf.st_rdev); ++ } ++ + rq.raw_minor = minor; + err = ioctl(master_fd, RAW_GETBIND, &rq); + if (err < 0) { +diff --git a/include/pathnames.h b/include/pathnames.h +index 0060a75..12170f9 100644 +--- a/include/pathnames.h ++++ b/include/pathnames.h +@@ -19,7 +19,6 @@ + #undef _PATH_DEFPATH_ROOT + #define _PATH_DEFPATH_ROOT "/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" + +-#define _PATH_TTY "/dev/tty" + #define _PATH_SECURETTY "/etc/securetty" + #define _PATH_WTMPLOCK "/etc/wtmplock" + +@@ -94,6 +93,13 @@ + #define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~" + #define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp" + ++#ifndef _PATH_DEV ++# define _PATH_DEV "/dev" ++#endif ++ ++#define _PATH_DEV_LOOP "/dev/loop" ++#define _PATH_DEV_TTY "/dev/tty" ++ + /* udev paths */ + #define _PATH_DEV_BYLABEL "/dev/disk/by-label" + #define _PATH_DEV_BYUUID "/dev/disk/by-uuid" +diff --git a/login-utils/login.c b/login-utils/login.c +index f315425..7328ede 100644 +--- a/login-utils/login.c ++++ b/login-utils/login.c +@@ -378,7 +378,7 @@ main(int argc, char **argv) + int ask, fflag, hflag, pflag, cnt, errsv; + int quietlog, passwd_req; + char *domain, *ttyn; +- char tbuf[MAXPATHLEN + 2], tname[sizeof(_PATH_TTY) + 10]; ++ char tbuf[MAXPATHLEN + 2], tname[sizeof(_PATH_DEV_TTY) + 10]; + char *termenv; + char *childArgv[10]; + char *buff; +@@ -499,7 +499,7 @@ main(int argc, char **argv) + + if (ttyn == NULL || *ttyn == '\0') { + /* no snprintf required - see definition of tname */ +- sprintf(tname, "%s??", _PATH_TTY); ++ snprintf(tname, sizeof(tname), "%s??", _PATH_DEV_TTY); + ttyn = tname; + } + +diff --git a/misc-utils/script.c b/misc-utils/script.c +index 12ea43a..b877c31 100644 +--- a/misc-utils/script.c ++++ b/misc-utils/script.c +@@ -371,7 +371,7 @@ doshell() { + #if 0 + int t; + +- t = open(_PATH_TTY, O_RDWR); ++ t = open(_PATH_DEV_TTY, O_RDWR); + if (t >= 0) { + (void) ioctl(t, TIOCNOTTY, (char *)0); + (void) close(t); +diff --git a/misc-utils/uuidd.8 b/misc-utils/uuidd.8 +index ae033ea..67c6614 100644 +--- a/misc-utils/uuidd.8 ++++ b/misc-utils/uuidd.8 +@@ -64,11 +64,11 @@ UUID's. + .TP + .BI \-p " pidfile" + Specify the pathname where the pid file should be written. By default, +-the pid file is written to /var/lib/libuuid/uuidd.pid. ++the pid file is written to /var/run/uuidd/uuidd.pid. + .TP + .BI \-s " socketpath" + Specify the pathname used for the unix-domain socket used by uuidd. By +-default, the pathname used is /var/lib/libuuid/request. This is primarily ++default, the pathname used is /var/run/uuidd/request. This is primarily + for debugging purposes, since the pathname is hard-coded in the libuuid + library. + .TP +diff --git a/mount/lomount.c b/mount/lomount.c +index 1b191ab..c6e0c92 100644 +--- a/mount/lomount.c ++++ b/mount/lomount.c +@@ -60,8 +60,6 @@ loop_info64_to_old(const struct loop_info64 *info64, struct loop_info *info) + return 0; + } + +-#define DEV_LOOP_PATH "/dev/loop" +-#define DEV_PATH "/dev" + #define LOOPMAJOR 7 + #define NLOOPS_DEFAULT 8 /* /dev/loop[0-7] */ + +@@ -143,10 +141,10 @@ looplist_open(struct looplist *ll, int flag) + ll->flag = flag; + ll->ncur = -1; + +- if (stat(DEV_PATH, &st) == -1 || (!S_ISDIR(st.st_mode))) ++ if (stat(_PATH_DEV, &st) == -1 || (!S_ISDIR(st.st_mode))) + return -1; /* /dev doesn't exist */ + +- if (stat(DEV_LOOP_PATH, &st) == 0 && S_ISDIR(st.st_mode)) ++ if (stat(_PATH_DEV_LOOP, &st) == 0 && S_ISDIR(st.st_mode)) + ll->flag |= LLFLG_SUBDIR; /* /dev/loop/ exists */ + + if ((ll->flag & LLFLG_USEDONLY) && +@@ -179,8 +177,8 @@ looplist_open_dev(struct looplist *ll, int lnum) + /* create a full device path */ + snprintf(ll->name, sizeof(ll->name), + ll->flag & LLFLG_SUBDIR ? +- DEV_LOOP_PATH "/%d" : +- DEV_PATH "/loop%d", ++ _PATH_DEV_LOOP "/%d" : ++ _PATH_DEV "/loop%d", + lnum); + + fd = open(ll->name, O_RDONLY); +@@ -331,8 +329,8 @@ looplist_next(struct looplist *ll) + */ + if (!ll->minors) { + ll->nminors = (ll->flag & LLFLG_SUBDIR) ? +- loop_scandir(DEV_LOOP_PATH, &ll->minors, 0) : +- loop_scandir(DEV_PATH, &ll->minors, 1); ++ loop_scandir(_PATH_DEV_LOOP, &ll->minors, 0) : ++ loop_scandir(_PATH_DEV, &ll->minors, 1); + ll->ncur = -1; + } + for (++ll->ncur; ll->ncur < ll->nminors; ll->ncur++) { +@@ -500,8 +498,7 @@ show_associated_loop_devices(char *filename, unsigned long long offset, int isof + /* check if the loopfile is already associated with the same given + * parameters. + * +- * returns: -1 error +- * 0 unused ++ * returns: 0 unused / error + * 1 loop device already used + */ + static int +@@ -516,17 +513,15 @@ is_associated(int dev, struct stat *file, unsigned long long offset, int isoff) + file->st_ino == linfo64.lo_inode && + (isoff == 0 || offset == linfo64.lo_offset)) + ret = 1; +- return ret; +- } +- if (ioctl(dev, LOOP_GET_STATUS, &linfo) == 0) { ++ ++ } else if (ioctl(dev, LOOP_GET_STATUS, &linfo) == 0) { + if (file->st_dev == linfo.lo_device && + file->st_ino == linfo.lo_inode && + (isoff == 0 || offset == linfo.lo_offset)) + ret = 1; +- return ret; + } + +- return errno == ENXIO ? 0 : -1; ++ return ret; + } + + /* check if the loop file is already used with the same given +@@ -572,18 +567,14 @@ loopfile_used_with(char *devname, const char *filename, unsigned long long offse + if (!is_loop_device(devname)) + return 0; + +- if (stat(filename, &statbuf) == -1) { +- perror(filename); +- return -1; +- } ++ if (stat(filename, &statbuf) == -1) ++ return 0; + + fd = open(devname, O_RDONLY); +- if (fd == -1) { +- perror(devname); +- return -1; +- } +- ret = is_associated(fd, &statbuf, offset, 1); ++ if (fd == -1) ++ return 0; + ++ ret = is_associated(fd, &statbuf, offset, 1); + close(fd); + return ret; + } +diff --git a/mount/umount.c b/mount/umount.c +index 0468cb4..a695f0c 100644 +--- a/mount/umount.c ++++ b/mount/umount.c +@@ -14,6 +14,7 @@ + #include "mount_constants.h" + #include "sundries.h" + #include "getusername.h" ++#include "pathnames.h" + #include "lomount.h" + #include "loop.h" + #include "fstab.h" +@@ -406,7 +407,7 @@ static int + contains(const char *list, const char *s) { + int n = strlen(s); + +- while (*list) { ++ while (list && *list) { + if (strncmp(list, s, n) == 0 && + (list[n] == 0 || list[n] == ',')) + return 1; +@@ -423,7 +424,7 @@ get_value(const char *list, const char *s) { + const char *t; + int n = strlen(s); + +- while (*list) { ++ while (list && *list) { + if (strncmp(list, s, n) == 0) { + s = t = list+n; + while (*s && *s != ',') +@@ -432,6 +433,44 @@ get_value(const char *list, const char *s) { + } + while (*list && *list++ != ',') ; + } ++ return NULL; ++} ++ ++/* check if @mc contains a loop device which is associated ++ * with the @file in fs ++ */ ++static int ++is_valid_loop(struct mntentchn *mc, struct mntentchn *fs) ++{ ++ unsigned long long offset = 0; ++ char *p; ++ ++ /* check if it begins with /dev/loop */ ++ if (strncmp(mc->m.mnt_fsname, _PATH_DEV_LOOP, ++ sizeof(_PATH_DEV_LOOP) - 1)) ++ return 0; ++ ++ /* check for loop option in fstab */ ++ if (!contains(fs->m.mnt_opts, "loop")) ++ return 0; ++ ++ /* check for offset option in fstab */ ++ p = get_value(fs->m.mnt_opts, "offset="); ++ if (p) ++ offset = strtoull(p, NULL, 10); ++ ++ /* check association */ ++ if (loopfile_used_with((char *) mc->m.mnt_fsname, ++ fs->m.mnt_fsname, offset) == 1) { ++ if (verbose > 1) ++ printf(_("device %s is associated with %s\n"), ++ mc->m.mnt_fsname, fs->m.mnt_fsname); ++ return 1; ++ } ++ ++ if (verbose > 1) ++ printf(_("device %s is not associated with %s\n"), ++ mc->m.mnt_fsname, fs->m.mnt_fsname); + return 0; + } + +@@ -516,12 +555,15 @@ umount_file (char *arg) { + the pair (dev,file) in fstab. */ + fs = getfs_by_devdir(mc->m.mnt_fsname, mc->m.mnt_dir); + if (!fs) { +- if (!getfs_by_spec (file) && !getfs_by_dir (file)) ++ fs = getfs_by_dir(file); ++ if (!fs && !getfs_by_spec(file)) + die (2, + _("umount: %s is not in the fstab " + "(and you are not root)"), + file); +- else ++ ++ /* spec could be a file which is loop mounted */ ++ if (fs && !is_valid_loop(mc, fs)) + die (2, _("umount: %s mount disagrees with " + "the fstab"), file); + } +diff --git a/shlibs/uuid/src/uuidd.h b/shlibs/uuid/src/uuidd.h +index 528acdc..c807236 100644 +--- a/shlibs/uuid/src/uuidd.h ++++ b/shlibs/uuid/src/uuidd.h +@@ -35,8 +35,8 @@ + #ifndef _UUID_UUIDD_H + #define _UUID_UUIDD_H + +-#define UUIDD_SOCKET_PATH "/var/lib/libuuid/request" +-#define UUIDD_PIDFILE_PATH "/var/lib/libuuid/uuidd.pid" ++#define UUIDD_SOCKET_PATH "/var/run/uuidd/request" ++#define UUIDD_PIDFILE_PATH "/var/run/uuidd/uuidd.pid" + #define UUIDD_PATH "/usr/sbin/uuidd" + + #define UUIDD_OP_GETPID 0 +diff --git a/sys-utils/ldattach.8 b/sys-utils/ldattach.8 +index 4ee6229..7afe51d 100644 +--- a/sys-utils/ldattach.8 ++++ b/sys-utils/ldattach.8 +@@ -35,7 +35,7 @@ With no arguments, + .B ldattach + prints usage information. + .SH LINE DISCIPLINES +-As of kernel release 2.6.21, the following line disciplines are supported: ++Depending on the kernel release, the following line disciplines are supported: + .TP + .BR TTY ( 0 ) + The default line discipline, +@@ -80,6 +80,9 @@ Bluetooth HCI UART driver. + .TP + .BR GIGASET_M101 ( 16 ) + Driver for Siemens Gigaset M101 serial DECT adapter. ++.TP ++.BR PPS ( 18 ) ++Driver for serial line Pulse Per Second (PPS) source. + .SH OPTIONS + .TP + \fB-d\fP | \fB--debug\fP +diff --git a/sys-utils/ldattach.c b/sys-utils/ldattach.c +index 801dd1c..19f70fe 100644 +--- a/sys-utils/ldattach.c ++++ b/sys-utils/ldattach.c +@@ -34,6 +34,10 @@ + # define N_GIGASET_M101 16 + #endif + ++#ifndef N_PPS ++# define N_PPS 18 ++#endif ++ + #ifndef ARRAY_SIZE + # define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) + #endif +@@ -65,7 +69,8 @@ ld_table[] = { + { "HCI", N_HCI }, + { "GIGASET_M101", N_GIGASET_M101 }, + { "GIGASET", N_GIGASET_M101 }, +- { "M101", N_GIGASET_M101 } ++ { "M101", N_GIGASET_M101 }, ++ { "PPS", N_PPS }, + }; + + /* look up line discipline code */ +diff --git a/tests/expected/paths/built-in b/tests/expected/paths/built-in +index 318f44e..51372de 100644 +--- a/tests/expected/paths/built-in ++++ b/tests/expected/paths/built-in +@@ -1,6 +1,7 @@ + _PATH_DEFPATH /usr/local/bin:/bin:/usr/bin + _PATH_DEFPATH_ROOT /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +- _PATH_TTY /dev/tty ++ _PATH_DEV_TTY /dev/tty ++ _PATH_DEV_LOOP /dev/loop + _PATH_SECURETTY /etc/securetty + _PATH_WTMPLOCK /etc/wtmplock + _PATH_HUSHLOGIN .hushlogin +diff --git a/tests/helpers/test_pathnames.c b/tests/helpers/test_pathnames.c +index 1accede..5cc6efd 100644 +--- a/tests/helpers/test_pathnames.c ++++ b/tests/helpers/test_pathnames.c +@@ -33,7 +33,8 @@ struct hlpPath paths[] = + { + DEF_HLPPATH(_PATH_DEFPATH), + DEF_HLPPATH(_PATH_DEFPATH_ROOT), +- DEF_HLPPATH(_PATH_TTY), ++ DEF_HLPPATH(_PATH_DEV_TTY), ++ DEF_HLPPATH(_PATH_DEV_LOOP), + DEF_HLPPATH(_PATH_SECURETTY), + DEF_HLPPATH(_PATH_WTMPLOCK), + DEF_HLPPATH(_PATH_HUSHLOGIN), diff --git a/fix-hang-on-stale-nfs.diff b/fix-hang-on-stale-nfs.diff deleted file mode 100644 index 64530c8..0000000 --- a/fix-hang-on-stale-nfs.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- mount/lomount.c -+++ mount/lomount.c -@@ -109,7 +109,14 @@ static int - is_loop_used(int fd) - { - struct loop_info li; -- return ioctl (fd, LOOP_GET_STATUS, &li) == 0; -+ int ret; -+ ret = ioctl (fd, LOOP_GET_STATUS, &li); -+ if (ret == 0) -+ return 1; -+ if (ret < 0 && (errno == ENXIO)) -+ return 0; -+ /* all other errors, e.g. ENOENT or ESTALE are an error. */ -+ return -1; - } - - int diff --git a/util-linux-2.12r-fdisk_cyl.patch b/util-linux-2.12r-fdisk_cyl.patch deleted file mode 100644 index d2bbe5e..0000000 --- a/util-linux-2.12r-fdisk_cyl.patch +++ /dev/null @@ -1,33 +0,0 @@ -Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.c -=================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisk.c -+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.c -@@ -1918,6 +1918,16 @@ verify(void) { - total_number_of_sectors - total); - } - -+static unsigned long long -+roundup_to_cylinder_boundary(unsigned long long offset) { -+ if (units_per_sector) { -+ unsigned long long extra_sectors = offset % units_per_sector; -+ if (extra_sectors != 0) -+ offset += (units_per_sector - extra_sectors) - 1; -+ } -+ return offset; -+} -+ - static void - add_partition(int n, int sys) { - char mesg[256]; /* 48 does not suffice in Japanese */ -@@ -1953,8 +1963,10 @@ add_partition(int n, int sys) { - limit = get_start_sect(q) + get_nr_sects(q) - 1; - } - if (display_in_cyl_units) -- for (i = 0; i < partitions; i++) -+ for (i = 0; i < partitions; i++) { - first[i] = (cround(first[i]) - 1) * units_per_sector; -+ last[i] = roundup_to_cylinder_boundary(last[i]); -+ } - - snprintf(mesg, sizeof(mesg), _("First %s"), str_units(SINGULAR)); - do { diff --git a/util-linux-2.14.1-disk_utils_raw_should_use_ioctl_to_create_device.patch b/util-linux-2.14.1-disk_utils_raw_should_use_ioctl_to_create_device.patch deleted file mode 100644 index 9dbe559..0000000 --- a/util-linux-2.14.1-disk_utils_raw_should_use_ioctl_to_create_device.patch +++ /dev/null @@ -1,118 +0,0 @@ -From: Jeff Mahoney -Subject: [PATCH] raw: Use the RAW_SETBIND ioctl without stat'ing the raw# file -References: bnc#450675 - - The in-kernel ioctl code creates a raw# device on-demand. udev will create - the /dev/raw/raw# file when the device is created automatically. - - The current raw userspace code wants to stat the file before using it, - which is unnecessary for setting up the raw device. - - This patch stats the file only when query() is called as a singleton, and - it's doubtful it's needed even there. I modified as little code as I could, - though. - - Without this patch raw devices WILL NOT WORK on SLE11. - -Signed-off-by: Jeff Mahoney ---- - disk-utils/raw.c | 54 ++++++++++++++++++++++++++++-------------------------- - 1 file changed, 28 insertions(+), 26 deletions(-) - ---- a/disk-utils/raw.c -+++ b/disk-utils/raw.c -@@ -41,7 +41,7 @@ int master_fd; - int raw_minor; - - void open_raw_ctl(void); --int query(int minor, int quiet); -+int query(int minor, const char *raw_name, int quiet); - int bind (int minor, int block_major, int block_minor); - - -@@ -96,7 +96,7 @@ int main(int argc, char *argv[]) - if (optind < argc) - usage(1); - for (i = 1; i < RAW_NR_MINORS; i++) -- query(i, 1); -+ query(i, NULL, 1); - exit(0); - } - -@@ -122,28 +122,8 @@ int main(int argc, char *argv[]) - exit(2); - } - -- err = stat(raw_name, &statbuf); -- if (err) { -- fprintf (stderr, "Cannot locate raw device '%s' (%s)\n", -- raw_name, strerror(errno)); -- exit(2); -- } -- -- if (!S_ISCHR(statbuf.st_mode)) { -- fprintf (stderr, "Raw device '%s' is not a character dev\n", -- raw_name); -- exit(2); -- } -- if (major(statbuf.st_rdev) != RAW_MAJOR) { -- fprintf (stderr, "Device '%s' is not a raw dev\n", -- raw_name); -- exit(2); -- } -- -- raw_minor = minor(statbuf.st_rdev); -- - if (do_query) -- return query(raw_minor, 0); -+ return query(raw_minor, raw_name, 0); - - /* - * It's not a query, so we still have some parsing to do. Have -@@ -205,13 +185,35 @@ void open_raw_ctl(void) - } - } - --int query(int minor, int quiet) -+int query(int raw_minor, const char *raw_name, int quiet) - { - struct raw_config_request rq; - static int has_worked = 0; - int err; -+ struct stat statbuf; -+ -+ if (raw_name) { -+ err = stat(raw_name, &statbuf); -+ if (err) { -+ fprintf (stderr, "Cannot locate raw device '%s' (%s)\n", -+ raw_name, strerror(errno)); -+ exit(2); -+ } -+ -+ if (!S_ISCHR(statbuf.st_mode)) { -+ fprintf (stderr, "Raw device '%s' is not a character dev\n", -+ raw_name); -+ exit(2); -+ } -+ if (major(statbuf.st_rdev) != RAW_MAJOR) { -+ fprintf (stderr, "Device '%s' is not a raw dev\n", -+ raw_name); -+ exit(2); -+ } -+ raw_minor = minor(statbuf.st_rdev); -+ } - -- rq.raw_minor = minor; -+ rq.raw_minor = raw_minor; - err = ioctl(master_fd, RAW_GETBIND, &rq); - if (err < 0) { - if (quiet && errno == ENODEV) -@@ -230,7 +232,7 @@ int query(int minor, int quiet) - if (quiet && !rq.block_major && !rq.block_minor) - return 0; - printf (RAWDEVDIR "raw%d: bound to major %d, minor %d\n", -- minor, (int) rq.block_major, (int) rq.block_minor); -+ raw_minor, (int) rq.block_major, (int) rq.block_minor); - return 0; - } - diff --git a/util-linux-2.14.1-hwclock_adjust_and_hctosys.patch b/util-linux-2.14.1-hwclock_adjust_and_hctosys.patch deleted file mode 100644 index 24dc201..0000000 --- a/util-linux-2.14.1-hwclock_adjust_and_hctosys.patch +++ /dev/null @@ -1,170 +0,0 @@ -From: Kurt Garloff -Subject: Allow to combine --adjust and --hctosys -Reference: bnc441106 - -Waiting for a clock tick twice when calling --adjust and --hctosys -is wasteful. Having to do it once is bad enough. -This patch allows combining the two options. - -[Patch 1/5] - -Index: util-linux-ng-2.14.1/hwclock/hwclock.c -=================================================================== ---- util-linux-ng-2.14.1.orig/hwclock/hwclock.c -+++ util-linux-ng-2.14.1/hwclock/hwclock.c -@@ -490,13 +490,18 @@ set_hardware_clock(const time_t newtime, - } - - - -+static int -+set_system_clock(const bool hclock_valid, const time_t newtime, -+ const bool testing, const int usec); -+ - static void - set_hardware_clock_exact(const time_t sethwtime, - const struct timeval refsystime, - const bool universal, -- const bool testing) { -+ const bool testing, -+ const bool hctosys) { - /*---------------------------------------------------------------------------- - Set the Hardware Clock to the time "sethwtime", in local time zone or UTC, - according to "universal". - -@@ -539,8 +544,10 @@ set_hardware_clock_exact(const time_t se - if (tdiff < 0) - goto time_resync; /* probably time was reset */ - } while (time_diff(nowsystime, refsystime) - 0.5 < newhwtime - sethwtime); - -+ if (hctosys) -+ set_system_clock(TRUE, newhwtime, testing, 500000); - set_hardware_clock(newhwtime, universal, testing); - } - - -@@ -671,9 +678,9 @@ interpret_date_string(const char *date_o - - - static int - set_system_clock(const bool hclock_valid, const time_t newtime, -- const bool testing) { -+ const bool testing, const int usec) { - /*---------------------------------------------------------------------------- - Set the System Clock to time 'newtime'. - - Also set the kernel time zone value to the value indicated by the -@@ -699,9 +706,9 @@ set_system_clock(const bool hclock_valid - int minuteswest; - int rc; - - tv.tv_sec = newtime; -- tv.tv_usec = 0; -+ tv.tv_usec = usec; - - broken = localtime(&newtime); - #ifdef HAVE_TM_GMTOFF - minuteswest = -broken->tm_gmtoff/60; /* GNU extension */ -@@ -935,9 +942,10 @@ save_adjtime(const struct adjtime adjtim - static void - do_adjustment(struct adjtime *adjtime_p, - const bool hclock_valid, const time_t hclocktime, - const struct timeval read_time, -- const bool universal, const bool testing) { -+ const bool universal, const bool testing, -+ const bool hctosys) { - /*--------------------------------------------------------------------------- - Do the adjustment requested, by 1) setting the Hardware Clock (if - necessary), and 2) updating the last-adjusted time in the adjtime - structure. -@@ -990,9 +998,9 @@ do_adjustment(struct adjtime *adjtime_p, - &adjustment, &retro); - if (adjustment > 0 || adjustment < -1) { - set_hardware_clock_exact(hclocktime + adjustment, - time_inc(read_time, -retro), -- universal, testing); -+ universal, testing, hctosys); - adjtime_p->last_adj_time = hclocktime + adjustment; - adjtime_p->not_adjusted = 0; - adjtime_p->dirty = TRUE; - } else -@@ -1046,8 +1054,9 @@ manipulate_clock(const bool show, const - struct adjtime adjtime; - /* Contents of the adjtime file, or what they should be. */ - int rc; /* local return code */ - bool no_auth; /* User lacks necessary authorization to access the clock */ -+ int usec = 0; - - no_auth = ur->get_permissions(); - if (no_auth) - return EX_NOPERM; -@@ -1097,15 +1106,15 @@ manipulate_clock(const bool show, const - display_time(hclock_valid, hclocktime, - time_diff(read_time, startup_time)); - } else if (set) { - set_hardware_clock_exact(set_time, startup_time, -- universal, testing); -+ universal, testing, FALSE); - if (!noadjfile) - adjust_drift_factor(&adjtime, set_time, hclock_valid, hclocktime, - time_diff(read_time, startup_time)); - } else if (adjust) { - do_adjustment(&adjtime, hclock_valid, hclocktime, -- read_time, universal, testing); -+ read_time, universal, testing, hctosys); - } else if (systohc) { - struct timeval nowtime, reftime; - /* We can only set_hardware_clock_exact to a whole seconds - time, so we set it with reference to the most recent -@@ -1115,14 +1124,14 @@ manipulate_clock(const bool show, const - reftime.tv_sec = nowtime.tv_sec; - reftime.tv_usec = 0; - - set_hardware_clock_exact((time_t) reftime.tv_sec, reftime, -- universal, testing); -+ universal, testing, FALSE); - if (!noadjfile) - adjust_drift_factor(&adjtime, (time_t) reftime.tv_sec, hclock_valid, - hclocktime, (double) read_time.tv_usec / 1E6); - } else if (hctosys) { -- rc = set_system_clock(hclock_valid, hclocktime, testing); -+ rc = set_system_clock(hclock_valid, hclocktime, testing, usec); - if (rc) { - printf(_("Unable to set system clock.\n")); - return rc; - } -@@ -1442,9 +1451,16 @@ main(int argc, char **argv) { - "You supplied %d.\n"), - MYNAME, argc); - } - -- if (show + set + systohc + hctosys + adjust + getepoch + setepoch > 1){ -+ if (show + set + systohc + hctosys + getepoch + setepoch > 1){ -+ fprintf(stderr, _("You have specified multiple functions.\n" -+ "You can only perform one function " -+ "at a time.\n")); -+ hwclock_exit(EX_USAGE); -+ } -+ -+ if (show + set + systohc + adjust + getepoch + setepoch > 1){ - fprintf(stderr, _("You have specified multiple functions.\n" - "You can only perform one function " - "at a time.\n")); - hwclock_exit(EX_USAGE); -Index: util-linux-ng-2.14.1/hwclock/hwclock.8 -=================================================================== ---- util-linux-ng-2.14.1.orig/hwclock/hwclock.8 -+++ util-linux-ng-2.14.1/hwclock/hwclock.8 -@@ -86,8 +86,12 @@ Set the Hardware Clock to the current Sy - .B \-\-adjust - Add or subtract time from the Hardware Clock to account for systematic - drift since the last time the clock was set or adjusted. See discussion - below. -+.B \-\-adjust -+can be used together with -+.B \-\-hctosys -+to speed up the boot process by 1s. - .TP - .B \-\-getepoch - Print the kernel's Hardware Clock epoch value to standard output. - This is the number of years into AD to which a zero year value in the diff --git a/util-linux-2.14.1-lscpu.patch b/util-linux-2.14.1-lscpu.patch deleted file mode 100644 index 2b6c031..0000000 --- a/util-linux-2.14.1-lscpu.patch +++ /dev/null @@ -1,630 +0,0 @@ -commit 5dd7507c18fa3d739266aeda4847be41e0613fad -Author: Cai Qian -Date: Thu Jul 17 14:19:40 2008 +0200 - - lscpu: new command - - Add a lscpu(1) utility program. - - [kzak@redhat.com: - - indent by linux-2.6/scripts/Lindent - - add lscpu.{c,1} to sys-utils/Makefile.am - - add NLS suport - - complete code refactoring - ] - - Co-Author: Karel Zak - Signed-off-by: Cai Qian - Signed-off-by: Karel Zak - -Index: util-linux-ng-2.14.2-rc2/README.licensing -=================================================================== ---- util-linux-ng-2.14.2-rc2.orig/README.licensing 2009-01-22 12:32:48.000000000 +0100 -+++ util-linux-ng-2.14.2-rc2/README.licensing 2009-02-05 15:27:37.000000000 +0100 -@@ -2,6 +2,8 @@ - The project utils-linux-ng doesn't use same license for all code. There are - code with: - -+ * GPLv3+ (GNU General Public License version 3, or any later version) -+ - * GPLv2+ (GNU General Public License version 2, or any later version) - - * GPLv2 (GNU General Public License version 2) -Index: util-linux-ng-2.14.2-rc2/po/POTFILES.in -=================================================================== ---- util-linux-ng-2.14.2-rc2.orig/po/POTFILES.in 2009-01-22 12:32:48.000000000 +0100 -+++ util-linux-ng-2.14.2-rc2/po/POTFILES.in 2009-02-05 15:27:37.000000000 +0100 -@@ -98,6 +98,7 @@ sys-utils/flock.c - sys-utils/ipcrm.c - sys-utils/ipcs.c - sys-utils/ldattach.c -+sys-utils/lscpu.c - sys-utils/rdev.c - sys-utils/readprofile.c - sys-utils/renice.c -Index: util-linux-ng-2.14.2-rc2/sys-utils/Makefile.am -=================================================================== ---- util-linux-ng-2.14.2-rc2.orig/sys-utils/Makefile.am 2009-01-22 12:32:48.000000000 +0100 -+++ util-linux-ng-2.14.2-rc2/sys-utils/Makefile.am 2009-02-05 15:28:58.000000000 +0100 -@@ -11,11 +11,11 @@ dist_man_MANS = flock.1 ipcrm.1 ipcs.1 r - if LINUX - bin_PROGRAMS += dmesg - sbin_PROGRAMS += ctrlaltdel --usrbinexec_PROGRAMS += cytune setarch -+usrbinexec_PROGRAMS += cytune setarch lscpu - usrsbinexec_PROGRAMS += ldattach tunelp rtcwake - - dist_man_MANS += dmesg.1 ctrlaltdel.8 cytune.8 setarch.8 \ -- tunelp.8 rtcwake.8 ldattach.8 -+ tunelp.8 rtcwake.8 ldattach.8 lscpu.1 - endif - - cytune_SOURCES = cytune.c cyclades.h -Index: util-linux-ng-2.14.2-rc2/sys-utils/lscpu.1 -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14.2-rc2/sys-utils/lscpu.1 2009-02-05 15:27:37.000000000 +0100 -@@ -0,0 +1,29 @@ -+.\" Process this file with -+.\" groff -man -Tascii lscpu.1 -+.\" -+.TH LSCPU 1 "JULY 2008" Linux "User Manuals" -+.SH NAME -+lscpu \- CPU architecture information helper -+.SH SYNOPSIS -+.B lscpu [-hp] -+.SH DESCRIPTION -+.B lscpu -+gathers CPU architecture information like number of CPUs, threads, -+cores, sockets, NUMA nodes, information about CPU caches, CPU family, -+model and stepping from sysfs and /proc/cpuinfo, and prints it in -+human-readable format. Alternatively, it can print out in parsable -+format including how different caches are shared by different CPUs, -+which can also be fed to other programs. -+.SH OPTIONS -+.IP -h, --help -+Print a help message. -+.IP -p, --parse -+Print out in parsable instead of printable format. -+.SH BUGS -+The program at the moment does not handle the system installed with -+different types of physical processors. -+.SH AUTHOR -+Cai Qian -+.SH AVAILABILITY -+The setarch command is part of the util-linux-ng package and is available from -+ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/. -Index: util-linux-ng-2.14.2-rc2/sys-utils/lscpu.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14.2-rc2/sys-utils/lscpu.c 2009-02-05 15:27:37.000000000 +0100 -@@ -0,0 +1,529 @@ -+/* -+ * lscpu - CPU architecture information helper -+ * -+ * Copyright (C) 2008 Cai Qian -+ * Copyright (C) 2008 Karel Zak -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see . -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "nls.h" -+ -+#define CACHE_MAX 100 -+ -+/* /sys paths */ -+#define _PATH_SYS_SYSTEM "/sys/devices/system" -+#define _PATH_SYS_CPU0 _PATH_SYS_SYSTEM "/cpu/cpu0" -+#define _PATH_PROC_XENCAP "/proc/xen/capabilities" -+#define _PATH_PROC_CPUINFO "/proc/cpuinfo" -+ -+int have_topology; -+int have_cache; -+int have_node; -+ -+/* CPU(s) description */ -+struct cpu_decs { -+ /* counters */ -+ int ct_cpu; -+ int ct_thread; -+ int ct_core; -+ int ct_socket; -+ int ct_node; -+ int ct_cache; -+ -+ /* who is who */ -+ char *arch; -+ char *vendor; -+ char *family; -+ char *model; -+ -+ /* caches */ -+ char *caname[CACHE_MAX]; -+ char *casize[CACHE_MAX]; -+ int camap[CACHE_MAX]; -+ -+ /* misc */ -+ char *mhz; -+ char *stepping; -+ char *flags; -+ -+ /* NUMA */ -+ int *nodecpu; -+}; -+ -+char pathbuf[PATH_MAX]; -+ -+static void path_scanstr(char *result, const char *path, ...) -+ __attribute__ ((__format__ (__printf__, 2, 3))); -+static int path_exist(const char *path, ...) -+ __attribute__ ((__format__ (__printf__, 1, 2))); -+static int path_sibling(const char *path, ...) -+ __attribute__ ((__format__ (__printf__, 1, 2))); -+ -+static FILE * -+xfopen(const char *path, const char *mode) -+{ -+ FILE *fd = fopen(path, mode); -+ if (!fd) -+ err(EXIT_FAILURE, _("error: %s"), path); -+ return fd; -+} -+ -+static FILE * -+path_vfopen(const char *mode, const char *path, va_list ap) -+{ -+ vsnprintf(pathbuf, sizeof(pathbuf), path, ap); -+ return xfopen(pathbuf, mode); -+} -+ -+static void -+path_scanstr(char *result, const char *path, ...) -+{ -+ FILE *fd; -+ va_list ap; -+ -+ va_start(ap, path); -+ fd = path_vfopen("r", path, ap); -+ va_end(ap); -+ -+ if (fscanf(fd, "%s", result) != 1) { -+ if (ferror(fd)) -+ err(EXIT_FAILURE, _("error: %s"), pathbuf); -+ else -+ errx(EXIT_FAILURE, _("error parse: %s"), pathbuf); -+ } -+ fclose(fd); -+} -+ -+static int -+path_exist(const char *path, ...) -+{ -+ va_list ap; -+ -+ va_start(ap, path); -+ vsnprintf(pathbuf, sizeof(pathbuf), path, ap); -+ va_end(ap); -+ -+ return access(pathbuf, F_OK) == 0; -+} -+ -+char * -+xstrdup(const char *str) -+{ -+ char *s = strdup(str); -+ if (!s) -+ err(EXIT_FAILURE, _("error: strdup failed")); -+ return s; -+} -+ -+/* count the set bit in a mapping file */ -+static int -+path_sibling(const char *path, ...) -+{ -+ int c, n; -+ int result = 0; -+ char s[2]; -+ FILE *fp; -+ va_list ap; -+ -+ va_start(ap, path); -+ fp = path_vfopen("r", path, ap); -+ va_end(ap); -+ -+ while ((c = fgetc(fp)) != EOF) { -+ if (isxdigit(c)) { -+ s[0] = c; -+ s[1] = '\0'; -+ for (n = strtol(s, NULL, 16); n > 0; n /= 2) { -+ if (n % 2) -+ result++; -+ } -+ } -+ } -+ fclose(fp); -+ -+ return result; -+} -+ -+/* Lookup a pattern and get the value from cpuinfo. -+ * Format is: -+ * -+ * " : " -+ */ -+int lookup(char *line, char *pattern, char **value) -+{ -+ char *p, *v; -+ int len = strlen(pattern); -+ -+ if (!*line) -+ return 0; -+ -+ /* pattern */ -+ if (strncmp(line, pattern, len)) -+ return 0; -+ -+ /* white spaces */ -+ for (p = line + len; isspace(*p); p++); -+ -+ /* separator */ -+ if (*p != ':') -+ return 0; -+ -+ /* white spaces */ -+ for (++p; isspace(*p); p++); -+ -+ /* value */ -+ if (!*p) -+ return 0; -+ v = p; -+ -+ /* end of value */ -+ len = strlen(line) - 1; -+ for (p = line + len; isspace(*(p-1)); p--); -+ *p = '\0'; -+ -+ *value = xstrdup(v); -+ return 1; -+} -+ -+static void -+read_basicinfo(struct cpu_decs *cpu) -+{ -+ FILE *fp = xfopen(_PATH_PROC_CPUINFO, "r"); -+ char buf[BUFSIZ]; -+ struct utsname utsbuf; -+ -+ /* architecture */ -+ if (uname(&utsbuf) == -1) -+ err(EXIT_FAILURE, _("error: uname failed")); -+ cpu->arch = xstrdup(utsbuf.machine); -+ -+ /* count CPU(s) */ -+ while(path_exist(_PATH_SYS_SYSTEM "/cpu/cpu%d", cpu->ct_cpu)) -+ cpu->ct_cpu++; -+ -+ /* details */ -+ while (fgets(buf, sizeof(buf), fp) != NULL) { -+ /* IA64 */ -+ if (lookup(buf, "vendor", &cpu->vendor)) ; -+ else if (lookup(buf, "vendor_id", &cpu->vendor)) ; -+ /* IA64 */ -+ else if (lookup(buf, "family", &cpu->family)) ; -+ else if (lookup(buf, "cpu family", &cpu->family)) ; -+ else if (lookup(buf, "model", &cpu->model)) ; -+ else if (lookup(buf, "stepping", &cpu->stepping)) ; -+ else if (lookup(buf, "cpu MHz", &cpu->mhz)) ; -+ else if (lookup(buf, "flags", &cpu->flags)) ; -+ else -+ continue; -+ } -+ fclose(fp); -+} -+ -+static void -+read_topology(struct cpu_decs *cpu) -+{ -+ /* number of threads */ -+ cpu->ct_thread = path_sibling( -+ _PATH_SYS_CPU0 "/topology/thread_siblings"); -+ -+ /* number of cores */ -+ cpu->ct_core = path_sibling( -+ _PATH_SYS_CPU0 "/topology/core_siblings") -+ / cpu->ct_thread; -+ -+ /* number of sockets */ -+ cpu->ct_socket = cpu->ct_cpu / cpu->ct_core / cpu->ct_thread; -+} -+ -+static void -+read_cache(struct cpu_decs *cpu) -+{ -+ char buf[256]; -+ DIR *dp; -+ struct dirent *dir; -+ int level, type; -+ -+ dp = opendir(_PATH_SYS_CPU0 "/cache"); -+ if (dp == NULL) -+ err(EXIT_FAILURE, _("error: %s"), _PATH_SYS_CPU0 "/cache"); -+ -+ while ((dir = readdir(dp)) != NULL) { -+ if (!strcmp(dir->d_name, ".") -+ || !strcmp(dir->d_name, "..")) -+ continue; -+ -+ /* cache type */ -+ path_scanstr(buf, _PATH_SYS_CPU0 "/cache/%s/type", dir->d_name); -+ if (!strcmp(buf, "Data")) -+ type = 'd'; -+ else if (!strcmp(buf, "Instruction")) -+ type = 'i'; -+ else -+ type = 0; -+ -+ /* cache level */ -+ path_scanstr(buf, _PATH_SYS_CPU0 "/cache/%s/level", dir->d_name); -+ level = atoi(buf); -+ -+ if (type) -+ snprintf(buf, sizeof(buf), "L%d%c", level, type); -+ else -+ snprintf(buf, sizeof(buf), "L%d", level); -+ -+ cpu->caname[cpu->ct_cache] = xstrdup(buf); -+ -+ /* cache size */ -+ path_scanstr(buf, _PATH_SYS_CPU0 "/cache/%s/size", dir->d_name); -+ cpu->casize[cpu->ct_cache] = xstrdup(buf); -+ -+ /* information about how CPUs share different caches */ -+ cpu->camap[cpu->ct_cache] = path_sibling( -+ _PATH_SYS_CPU0 "/cache/%s/shared_cpu_map", -+ dir->d_name); -+ cpu->ct_cache++; -+ } -+} -+ -+static void -+read_nodes(struct cpu_decs *cpu) -+{ -+ int i; -+ -+ /* number of NUMA node */ -+ while (path_exist(_PATH_SYS_SYSTEM "/node/node%d", cpu->ct_node)) -+ cpu->ct_node++; -+ -+ cpu->nodecpu = (int *) malloc(cpu->ct_node * sizeof(int)); -+ if (!cpu->nodecpu) -+ err(EXIT_FAILURE, _("error: malloc failed")); -+ -+ /* information about how nodes share different CPUs */ -+ for (i = 0; i < cpu->ct_node; i++) -+ cpu->nodecpu[i] = path_sibling( -+ _PATH_SYS_SYSTEM "/node/node%d/cpumap", -+ i); -+} -+ -+static void -+check_system(void) -+{ -+ FILE *fd; -+ char buf[256]; -+ -+ /* Dom0 Kernel gives wrong information. */ -+ fd = fopen(_PATH_PROC_XENCAP, "r"); -+ if (fd) { -+ if (fscanf(fd, "%s", buf) == 1 && !strcmp(buf, "control_d")) -+ errx(EXIT_FAILURE, -+ _("error: Dom0 Kernel is unsupported.")); -+ fclose(fd); -+ } -+ -+ /* Read through sysfs. */ -+ if (access(_PATH_SYS_SYSTEM, F_OK)) -+ errx(1, _("error: /sys filesystem is not accessable.")); -+ -+ if (!access(_PATH_SYS_SYSTEM "/node", F_OK)) -+ have_node = 1; -+ -+ if (!access(_PATH_SYS_CPU0 "/topology/thread_siblings", F_OK)) -+ have_topology = 1; -+ -+ if (!access(_PATH_SYS_CPU0 "/cache", F_OK)) -+ have_cache = 1; -+} -+ -+static void -+print_parsable(struct cpu_decs *cpu) -+{ -+ int i, j; -+ -+ puts( -+ "# The following is the parsable format, which can be fed to other\n" -+ "# programs. Each different item in every column has a unique ID\n" -+ "# starting from zero.\n" -+ "# CPU,Core,Socket,Node"); -+ -+ if (have_cache) { -+ /* separator between CPU topology and cache information */ -+ putchar(','); -+ -+ for (i = cpu->ct_cache - 1; i >= 0; i--) -+ printf(",%s", cpu->caname[i]); -+ } -+ putchar('\n'); -+ -+ for (i = 0; i < cpu->ct_cpu; i++) { -+ printf("%d", i); -+ -+ if (have_topology) -+ printf(",%d,%d", -+ i / cpu->ct_thread, -+ i / cpu->ct_core / cpu->ct_thread); -+ else -+ printf(",,"); -+ -+ if (have_node) { -+ int c = 0; -+ -+ for (j = 0; j < cpu->ct_node; j++) { -+ c += cpu->nodecpu[j]; -+ if (i < c) { -+ printf(",%d", j); -+ break; -+ } -+ } -+ } else -+ putchar(','); -+ -+ if (have_cache) { -+ putchar(','); -+ -+ for (j = cpu->ct_cache - 1; j >= 0; j--) { -+ /* If shared_cpu_map is 0, all CPUs share the same -+ cache. */ -+ if (cpu->camap[j] == 0) -+ cpu->camap[j] = cpu->ct_core * -+ cpu->ct_thread; -+ -+ printf(",%d", i / cpu->camap[j]); -+ } -+ } -+ putchar('\n'); -+ } -+} -+ -+ -+/* output formats " "*/ -+#define print_s(_key, _val) printf("%-23s%s\n", _key, _val) -+#define print_n(_key, _val) printf("%-23s%d\n", _key, _val) -+ -+static void -+print_readable(struct cpu_decs *cpu) -+{ -+ char buf[BUFSIZ]; -+ -+ print_s("Architecture:", cpu->arch); -+ print_n("CPU(s):", cpu->ct_cpu); -+ -+ if (have_topology) { -+ print_n(_("Thread(s) per core:"), cpu->ct_thread); -+ print_n(_("Core(s) per socket:"), cpu->ct_core); -+ print_n(_("CPU socket(s):"), cpu->ct_socket); -+ } -+ -+ if (have_node) -+ print_n(_("NUMA node(s):"), cpu->ct_node); -+ if (cpu->vendor) -+ print_s(_("Vendor ID:"), cpu->vendor); -+ if (cpu->family) -+ print_s(_("CPU family:"), cpu->family); -+ if (cpu->model) -+ print_s(_("Model:"), cpu->model); -+ if (cpu->stepping) -+ print_s(_("Stepping:"), cpu->stepping); -+ if (cpu->mhz) -+ print_s(_("CPU MHz:"), cpu->mhz); -+ if (cpu->flags) { -+ snprintf(buf, sizeof(buf), " %s ", cpu->flags); -+ if (strstr(buf, " svm ")) -+ print_s(_("Virtualization:"), "AMD-V"); -+ else if (strstr(buf, " vmx ")) -+ print_s(_("Virtualization:"), "VT-x"); -+ } -+ -+ if (have_cache) { -+ int i; -+ -+ for (i = cpu->ct_cache - 1; i >= 0; i--) { -+ snprintf(buf, sizeof(buf), -+ _("%s cache:"), cpu->caname[i]); -+ print_s(buf, cpu->casize[i]); -+ } -+ } -+} -+ -+void usage(int rc) -+{ -+ printf(_("Usage: %s [option]\n"), -+ program_invocation_short_name); -+ -+ puts(_( "CPU architecture information helper\n\n" -+ " -h, --help usage information\n" -+ " -p, --parse print out in parsable instead of printable format.\n")); -+ exit(rc); -+} -+ -+int main(int argc, char *argv[]) -+{ -+ struct cpu_decs _cpu, *cpu = &_cpu; -+ int parsable = 0, c; -+ -+ struct option longopts[] = { -+ { "help", no_argument, 0, 'h' }, -+ { "parse", no_argument, 0, 'p' }, -+ { NULL, 0, 0, 0 } -+ }; -+ -+ setlocale(LC_MESSAGES, ""); -+ bindtextdomain(PACKAGE, LOCALEDIR); -+ textdomain(PACKAGE); -+ -+ while((c = getopt_long(argc, argv, "hp", longopts, NULL)) != -1) { -+ switch (c) { -+ case 'h': -+ usage(EXIT_SUCCESS); -+ case 'p': -+ parsable = 1; -+ break; -+ default: -+ usage(EXIT_FAILURE); -+ } -+ } -+ -+ memset(cpu, 0, sizeof(*cpu)); -+ -+ check_system(); -+ -+ read_basicinfo(cpu); -+ -+ if (have_topology) -+ read_topology(cpu); -+ if (have_cache) -+ read_cache(cpu); -+ if (have_node) -+ read_nodes(cpu); -+ -+ /* Show time! */ -+ if (parsable) -+ print_parsable(cpu); -+ else -+ print_readable(cpu); -+ -+ return EXIT_FAILURE; -+} diff --git a/util-linux-2.14.1-lscpu_add_hypervisor_detection.patch b/util-linux-2.14.1-lscpu_add_hypervisor_detection.patch deleted file mode 100644 index be07d92..0000000 --- a/util-linux-2.14.1-lscpu_add_hypervisor_detection.patch +++ /dev/null @@ -1,284 +0,0 @@ -commit c8b64f6d7770d62065bdc4fa5c4f80cc2326e203 -Author: Karel Zak -Date: Wed Oct 1 01:29:32 2008 +0200 - - lscpu: add Hypervisor detection - - This patch adds two new fields: - - * "Hypervisor vendor" -- based on CPUID and hypervisor specific - PCI devices. lscpu(1) supports KVM, XEN, Microsoft HV now. - - * "Virtualization type" - - "none" = Xen dom0 - - "full" = full virtualization (KVM, Xen, ...) - - "para" = Xen paravirtualization - - Co-Author: Ky Srinivasan - Signed-off-by: Karel Zak - -diff --git a/sys-utils/lscpu.1 b/sys-utils/lscpu.1 -index 78da8a1..e0e9935 100644 ---- a/sys-utils/lscpu.1 -+++ b/sys-utils/lscpu.1 -@@ -22,6 +22,8 @@ Print out in parsable instead of printable format. - .SH BUGS - The program at the moment does not handle the system installed with - different types of physical processors. -+ -+Sometimes in Xen Dom0 kernel reports wrong data. - .SH AUTHOR - Cai Qian - .SH AVAILABILITY -diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c -index d6bb8b9..82972b3 100644 ---- a/sys-utils/lscpu.c -+++ b/sys-utils/lscpu.c -@@ -38,8 +38,10 @@ - /* /sys paths */ - #define _PATH_SYS_SYSTEM "sys/devices/system" - #define _PATH_SYS_CPU0 _PATH_SYS_SYSTEM "/cpu/cpu0" --#define _PATH_PROC_XENCAP "proc/xen/capabilities" -+#define _PATH_PROC_XEN "proc/xen" -+#define _PATH_PROC_XENCAP _PATH_PROC_XEN "/capabilities" - #define _PATH_PROC_CPUINFO "proc/cpuinfo" -+#define _PATH_PROC_PCIDEVS "proc/bus/pci/devices" - - int have_topology; - int have_cache; -@@ -52,6 +54,33 @@ struct ca_desc { - int camap; - }; - -+/* virtualization types */ -+enum { -+ VIRT_NONE = 0, -+ VIRT_PARA, -+ VIRT_FULL -+}; -+const char *virt_types[] = { -+ [VIRT_NONE] = N_("none"), -+ [VIRT_PARA] = N_("para"), -+ [VIRT_FULL] = N_("full") -+}; -+ -+/* hypervisor vendors */ -+enum { -+ HYPER_NONE = 0, -+ HYPER_XEN, -+ HYPER_KVM, -+ HYPER_MSHV -+}; -+const char *hv_vendors[] = { -+ [HYPER_NONE] = NULL, -+ [HYPER_XEN] = "Xen", -+ [HYPER_KVM] = "KVM", -+ [HYPER_MSHV] = "Microsoft" -+}; -+ -+ - /* CPU(s) description */ - struct cpu_desc { - /* counters */ -@@ -67,6 +96,9 @@ struct cpu_desc { - char *vendor; - char *family; - char *model; -+ char *virtflag; /* virtualization flag (vmx, svm) */ -+ int hyper; /* hypervisor vendor ID */ -+ int virtype; /* VIRT_PARA|FULL|NONE ? */ - - /* caches */ - struct ca_desc cache[CACHE_MAX]; -@@ -246,9 +278,130 @@ read_basicinfo(struct cpu_desc *cpu) - else - continue; - } -+ -+ if (cpu->flags) { -+ snprintf(buf, sizeof(buf), " %s ", cpu->flags); -+ if (strstr(buf, " svm ")) -+ cpu->virtflag = strdup("svm"); -+ else if (strstr(buf, " vmx ")) -+ cpu->virtflag = strdup("vmx"); -+ } -+ - fclose(fp); - } - -+static int -+has_pci_device(int vendor, int device) -+{ -+ FILE *f; -+ int num, fn, ven, dev; -+ int res = 1; -+ -+ f = fopen(_PATH_PROC_PCIDEVS, "r"); -+ if (!f) -+ return 0; -+ -+ /* for more details about bus/pci/devices format see -+ * drivers/pci/proc.c in linux kernel -+ */ -+ while(fscanf(f, "%02x%02x\t%04x%04x\t%*[^\n]", -+ &num, &fn, &ven, &dev) == 4) { -+ -+ if (ven == vendor && dev == device) -+ goto found; -+ } -+ -+ res = 0; -+found: -+ fclose(f); -+ return res; -+} -+ -+#if defined(__x86_64__) || defined(__i386__) -+ -+/* -+ * This CPUID leaf returns the information about the hypervisor. -+ * EAX : maximum input value for CPUID supported by the hypervisor. -+ * EBX, ECX, EDX : Hypervisor vendor ID signature. E.g. VMwareVMware. -+ */ -+#define HYPERVISOR_INFO_LEAF 0x40000000 -+ -+static inline void -+cpuid(unsigned int op, unsigned int *eax, unsigned int *ebx, -+ unsigned int *ecx, unsigned int *edx) -+{ -+ __asm__("cpuid" -+ : "=a" (*eax), -+ "=b" (*ebx), -+ "=c" (*ecx), -+ "=d" (*edx) -+ : "0" (op), "c"(0)); -+} -+ -+static void -+read_hypervisor_cpuid(struct cpu_desc *cpu) -+{ -+ unsigned int eax = 0, ebx = 0, ecx = 0, edx = 0; -+ char hyper_vendor_id[13]; -+ -+ memset(hyper_vendor_id, 0, sizeof(hyper_vendor_id)); -+ -+ cpuid(HYPERVISOR_INFO_LEAF, &eax, &ebx, &ecx, &edx); -+ memcpy(hyper_vendor_id + 0, &ebx, 4); -+ memcpy(hyper_vendor_id + 4, &ecx, 4); -+ memcpy(hyper_vendor_id + 8, &edx, 4); -+ hyper_vendor_id[12] = '\0'; -+ -+ if (!hyper_vendor_id[0]) -+ return; -+ -+ if (!strncmp("XenVMMXenVMM", hyper_vendor_id, 12)) -+ cpu->hyper = HYPER_XEN; -+ else if (!strncmp("KVMKVMKVM", hyper_vendor_id, 9)) -+ cpu->hyper = HYPER_KVM; -+ else if (!strncmp("Microsoft Hv", hyper_vendor_id, 12)) -+ cpu->hyper = HYPER_MSHV; -+} -+ -+#else /* ! __x86_64__ */ -+static void -+read_hypervisor_cpuid(struct cpu_desc *cpu) -+{ -+} -+#endif -+ -+static void -+read_hypervisor(struct cpu_desc *cpu) -+{ -+ read_hypervisor_cpuid(cpu); -+ -+ if (cpu->hyper) -+ /* hvm */ -+ cpu->virtype = VIRT_FULL; -+ -+ else if (!access(_PATH_PROC_XEN, F_OK)) { -+ /* Xen para-virt or dom0 */ -+ FILE *fd = fopen(_PATH_PROC_XENCAP, "r"); -+ int dom0 = 0; -+ -+ if (fd) { -+ char buf[256]; -+ -+ if (fscanf(fd, "%s", buf) == 1 && -+ !strcmp(buf, "control_d")) -+ dom0 = 1; -+ fclose(fd); -+ } -+ cpu->virtype = dom0 ? VIRT_NONE : VIRT_PARA; -+ cpu->hyper = HYPER_XEN; -+ -+ } else if (has_pci_device(0x5853, 0x0001)) { -+ /* Xen full-virt on non-x86_64 */ -+ cpu->hyper = HYPER_XEN; -+ cpu->virtype = VIRT_FULL; -+ } -+} -+ - static void - read_topology(struct cpu_desc *cpu) - { -@@ -337,18 +490,6 @@ read_nodes(struct cpu_desc *cpu) - static void - check_system(void) - { -- FILE *fd; -- char buf[256]; -- -- /* Dom0 Kernel gives wrong information. */ -- fd = fopen(_PATH_PROC_XENCAP, "r"); -- if (fd) { -- if (fscanf(fd, "%s", buf) == 1 && !strcmp(buf, "control_d")) -- errx(EXIT_FAILURE, -- _("error: Dom0 Kernel is unsupported.")); -- fclose(fd); -- } -- - /* Read through sysfs. */ - if (access(_PATH_SYS_SYSTEM, F_OK)) - errx(EXIT_FAILURE, -@@ -432,8 +573,6 @@ print_parsable(struct cpu_desc *cpu) - static void - print_readable(struct cpu_desc *cpu) - { -- char buf[BUFSIZ]; -- - print_s("Architecture:", cpu->arch); - print_n("CPU(s):", cpu->ct_cpu); - -@@ -455,15 +594,18 @@ print_readable(struct cpu_desc *cpu) - print_s(_("Stepping:"), cpu->stepping); - if (cpu->mhz) - print_s(_("CPU MHz:"), cpu->mhz); -- if (cpu->flags) { -- snprintf(buf, sizeof(buf), " %s ", cpu->flags); -- if (strstr(buf, " svm ")) -+ if (cpu->virtflag) { -+ if (!strcmp(cpu->virtflag, "svm")) - print_s(_("Virtualization:"), "AMD-V"); -- else if (strstr(buf, " vmx ")) -+ else if (!strcmp(cpu->virtflag, "vmx")) - print_s(_("Virtualization:"), "VT-x"); - } -- -+ if (cpu->hyper) { -+ print_s(_("Hypervisor vendor:"), hv_vendors[cpu->hyper]); -+ print_s(_("Virtualization type:"), virt_types[cpu->virtype]); -+ } - if (have_cache) { -+ char buf[512]; - int i; - - for (i = cpu->ct_cache - 1; i >= 0; i--) { -@@ -545,6 +687,8 @@ int main(int argc, char *argv[]) - if (have_node) - read_nodes(cpu); - -+ read_hypervisor(cpu); -+ - /* Show time! */ - if (parsable) - print_parsable(cpu); diff --git a/util-linux-2.14.1-lscpu_sysroot_option.patch b/util-linux-2.14.1-lscpu_sysroot_option.patch deleted file mode 100644 index 839a67f..0000000 --- a/util-linux-2.14.1-lscpu_sysroot_option.patch +++ /dev/null @@ -1,267 +0,0 @@ -commit 47b6e8b684ad28228c9255fe4237b5a8a1c8c7d3 -Author: Cai Qian -Date: Sun Aug 10 15:33:51 2008 +0800 - - lscpu: --sysroot option and stable cache output - - This patch added a --sysroot command-line option for testing purpose. It - also sorted cache names, and displayed cache information in a sorted - manner instead of randomly before. In addition, it had some other minor - fixes. - - Signed-off-by: Cai Qian - -diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c -index 275d4c7..d6bb8b9 100644 ---- a/sys-utils/lscpu.c -+++ b/sys-utils/lscpu.c -@@ -36,17 +36,24 @@ - #define CACHE_MAX 100 - - /* /sys paths */ --#define _PATH_SYS_SYSTEM "/sys/devices/system" -+#define _PATH_SYS_SYSTEM "sys/devices/system" - #define _PATH_SYS_CPU0 _PATH_SYS_SYSTEM "/cpu/cpu0" --#define _PATH_PROC_XENCAP "/proc/xen/capabilities" --#define _PATH_PROC_CPUINFO "/proc/cpuinfo" -+#define _PATH_PROC_XENCAP "proc/xen/capabilities" -+#define _PATH_PROC_CPUINFO "proc/cpuinfo" - - int have_topology; - int have_cache; - int have_node; - -+/* cache(s) description */ -+struct ca_desc { -+ char *caname; -+ char *casize; -+ int camap; -+}; -+ - /* CPU(s) description */ --struct cpu_decs { -+struct cpu_desc { - /* counters */ - int ct_cpu; - int ct_thread; -@@ -62,9 +69,7 @@ struct cpu_decs { - char *model; - - /* caches */ -- char *caname[CACHE_MAX]; -- char *casize[CACHE_MAX]; -- int camap[CACHE_MAX]; -+ struct ca_desc cache[CACHE_MAX]; - - /* misc */ - char *mhz; -@@ -75,7 +80,7 @@ struct cpu_decs { - int *nodecpu; - }; - --char pathbuf[PATH_MAX]; -+char pathbuf[PATH_MAX] = "/"; - - static void path_scanstr(char *result, const char *path, ...) - __attribute__ ((__format__ (__printf__, 2, 3))); -@@ -211,7 +216,7 @@ int lookup(char *line, char *pattern, char **value) - } - - static void --read_basicinfo(struct cpu_decs *cpu) -+read_basicinfo(struct cpu_desc *cpu) - { - FILE *fp = xfopen(_PATH_PROC_CPUINFO, "r"); - char buf[BUFSIZ]; -@@ -245,7 +250,7 @@ read_basicinfo(struct cpu_decs *cpu) - } - - static void --read_topology(struct cpu_decs *cpu) -+read_topology(struct cpu_desc *cpu) - { - /* number of threads */ - cpu->ct_thread = path_sibling( -@@ -261,7 +266,7 @@ read_topology(struct cpu_decs *cpu) - } - - static void --read_cache(struct cpu_decs *cpu) -+read_cache(struct cpu_desc *cpu) - { - char buf[256]; - DIR *dp; -@@ -295,14 +300,14 @@ read_cache(struct cpu_decs *cpu) - else - snprintf(buf, sizeof(buf), "L%d", level); - -- cpu->caname[cpu->ct_cache] = xstrdup(buf); -+ cpu->cache[cpu->ct_cache].caname = xstrdup(buf); - - /* cache size */ - path_scanstr(buf, _PATH_SYS_CPU0 "/cache/%s/size", dir->d_name); -- cpu->casize[cpu->ct_cache] = xstrdup(buf); -+ cpu->cache[cpu->ct_cache].casize = xstrdup(buf); - - /* information about how CPUs share different caches */ -- cpu->camap[cpu->ct_cache] = path_sibling( -+ cpu->cache[cpu->ct_cache].camap = path_sibling( - _PATH_SYS_CPU0 "/cache/%s/shared_cpu_map", - dir->d_name); - cpu->ct_cache++; -@@ -310,7 +315,7 @@ read_cache(struct cpu_decs *cpu) - } - - static void --read_nodes(struct cpu_decs *cpu) -+read_nodes(struct cpu_desc *cpu) - { - int i; - -@@ -346,7 +351,8 @@ check_system(void) - - /* Read through sysfs. */ - if (access(_PATH_SYS_SYSTEM, F_OK)) -- errx(1, _("error: /sys filesystem is not accessable.")); -+ errx(EXIT_FAILURE, -+ _("error: /sys filesystem is not accessable.")); - - if (!access(_PATH_SYS_SYSTEM "/node", F_OK)) - have_node = 1; -@@ -359,22 +365,22 @@ check_system(void) - } - - static void --print_parsable(struct cpu_decs *cpu) -+print_parsable(struct cpu_desc *cpu) - { - int i, j; - -- puts( -+ printf(_( - "# The following is the parsable format, which can be fed to other\n" -- "# programs. Each different item in every column has a unique ID\n" -+ "# programs. Each different item in every column has an unique ID\n" - "# starting from zero.\n" -- "# CPU,Core,Socket,Node"); -+ "# CPU,Core,Socket,Node")); - - if (have_cache) { - /* separator between CPU topology and cache information */ - putchar(','); - - for (i = cpu->ct_cache - 1; i >= 0; i--) -- printf(",%s", cpu->caname[i]); -+ printf(",%s", cpu->cache[i].caname); - } - putchar('\n'); - -@@ -407,11 +413,11 @@ print_parsable(struct cpu_decs *cpu) - for (j = cpu->ct_cache - 1; j >= 0; j--) { - /* If shared_cpu_map is 0, all CPUs share the same - cache. */ -- if (cpu->camap[j] == 0) -- cpu->camap[j] = cpu->ct_core * -- cpu->ct_thread; -+ if (cpu->cache[j].camap == 0) -+ cpu->cache[j].camap = cpu->ct_core * -+ cpu->ct_thread; - -- printf(",%d", i / cpu->camap[j]); -+ printf(",%d", i / cpu->cache[j].camap); - } - } - putchar('\n'); -@@ -424,7 +430,7 @@ print_parsable(struct cpu_decs *cpu) - #define print_n(_key, _val) printf("%-23s%d\n", _key, _val) - - static void --print_readable(struct cpu_decs *cpu) -+print_readable(struct cpu_desc *cpu) - { - char buf[BUFSIZ]; - -@@ -462,8 +468,8 @@ print_readable(struct cpu_decs *cpu) - - for (i = cpu->ct_cache - 1; i >= 0; i--) { - snprintf(buf, sizeof(buf), -- _("%s cache:"), cpu->caname[i]); -- print_s(buf, cpu->casize[i]); -+ _("%s cache:"), cpu->cache[i].caname); -+ print_s(buf, cpu->cache[i].casize); - } - } - } -@@ -475,18 +481,29 @@ void usage(int rc) - - puts(_( "CPU architecture information helper\n\n" - " -h, --help usage information\n" -- " -p, --parse print out in parsable instead of printable format.\n")); -+ " -p, --parse print out in parsable instead of printable format.\n" -+ " -s, --sysroot use the directory as a new system root.\n")); - exit(rc); - } - -+static int -+ca_compare(const void *a, const void *b) -+{ -+ struct ca_desc *cache1 = (struct ca_desc *) a; -+ struct ca_desc *cache2 = (struct ca_desc *) b; -+ -+ return strcmp(cache2->caname, cache1->caname); -+} -+ - int main(int argc, char *argv[]) - { -- struct cpu_decs _cpu, *cpu = &_cpu; -+ struct cpu_desc _cpu, *cpu = &_cpu; - int parsable = 0, c; - - struct option longopts[] = { -- { "help", no_argument, 0, 'h' }, -- { "parse", no_argument, 0, 'p' }, -+ { "help", no_argument, 0, 'h' }, -+ { "parse", no_argument, 0, 'p' }, -+ { "sysroot", required_argument, 0, 's' }, - { NULL, 0, 0, 0 } - }; - -@@ -494,18 +511,25 @@ int main(int argc, char *argv[]) - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - -- while((c = getopt_long(argc, argv, "hp", longopts, NULL)) != -1) { -+ while((c = getopt_long(argc, argv, "hps:", longopts, NULL)) != -1) { - switch (c) { - case 'h': - usage(EXIT_SUCCESS); - case 'p': - parsable = 1; - break; -+ case 's': -+ strncpy(pathbuf, optarg, sizeof(pathbuf)); -+ break; - default: - usage(EXIT_FAILURE); - } - } - -+ if (chdir(pathbuf) == -1) -+ errx(EXIT_FAILURE, -+ _("error: change working directory to %s."), pathbuf); -+ - memset(cpu, 0, sizeof(*cpu)); - - check_system(); -@@ -514,8 +538,10 @@ int main(int argc, char *argv[]) - - if (have_topology) - read_topology(cpu); -- if (have_cache) -+ if (have_cache) { - read_cache(cpu); -+ qsort(cpu->cache, cpu->ct_cache, sizeof(struct ca_desc), ca_compare); -+ } - if (have_node) - read_nodes(cpu); - diff --git a/util-linux-2.14.1-mount_swap_pagesize.patch b/util-linux-2.14.1-mount_swap_pagesize.patch deleted file mode 100644 index 9fed44d..0000000 --- a/util-linux-2.14.1-mount_swap_pagesize.patch +++ /dev/null @@ -1,191 +0,0 @@ -Index: util-linux-ng-2.14.1/mount/swapon.c -=================================================================== ---- util-linux-ng-2.14.1.orig/mount/swapon.c 2008-09-10 11:02:43.000000000 +0200 -+++ util-linux-ng-2.14.1/mount/swapon.c 2008-11-07 14:34:30.000000000 +0100 -@@ -13,6 +13,8 @@ - #include - #include - #include -+#include -+#include - #include "xmalloc.h" - #include "swap_constants.h" - #include "nls.h" -@@ -39,6 +41,33 @@ - #define QUIET 1 - #define CANONIC 1 - -+#define MAX_PAGESIZE (64 * 1024) -+static unsigned int page_size[] = { 4 * 1024, -+ 8 * 1024, -+ 16 * 1024, -+ 64 * 1024, -+ 0 }; -+ -+ -+struct swap_info { -+ char bootbits[1024]; /* Space for disklabel etc. */ -+ uint32_t version; -+ uint32_t last_page; -+ uint32_t nr_badpages; -+ unsigned char sws_uuid[16]; -+ unsigned char sws_volume[16]; -+ uint32_t padding[117]; -+ uint32_t badpages[1]; -+}; -+ -+enum { -+ SWAP_V0 = 1, -+ SWAP_V1, -+ SWAP_SUSPEND, -+ SWAP_ULSUSPEND, -+ SWAP_OOTSUSPEND -+}; -+ - int all = 0; - int priority = -1; /* non-prioritized swap by default */ - -@@ -238,11 +267,116 @@ swap_reinitialize(const char *device) { - return -1; /* error */ - } - -+int -+swap_detect_signature(const char *buf) -+{ -+ if (memcmp(buf, "SWAP-SPACE", 10) == 0) -+ return SWAP_V0; -+ else if (memcmp(buf, "SWAPSPACE2", 10) == 0) -+ return SWAP_V1; -+ else if (memcmp(buf, "S1SUSPEND", 9) == 0) -+ return SWAP_SUSPEND; -+ else if (memcmp(buf, "ULSUSPEND", 9) == 0) -+ return SWAP_ULSUSPEND; -+ else if (memcmp(buf, "\xed\xc3\x02\xe9\x98\x56\xe5\x0c", 8) == 0) -+ return SWAP_OOTSUSPEND; -+ -+ return 0; -+} -+ -+/* return the pagesize the swap format has been built with -+ * as swap metadata depends on the pagesize, we have to -+ * reinitialize if it does not match with the current pagesize -+ * returns 0 if not a valid swap format -+ */ -+unsigned int -+swap_get_pagesize(const char *dev) -+{ -+ int fd; -+ char *buf; -+ unsigned int *page, last_page = 0; -+ unsigned int pagesize = 0; -+ off_t size, swap_size; -+ int swap_version = 0; -+ int flip = 0; -+ struct swap_info *s; -+ -+ fd = open(dev, O_RDONLY); -+ if (fd == -1) { -+ perror("open"); -+ return 0; -+ } -+ -+ /* get size */ -+ size = lseek(fd, 0, SEEK_END); -+ if (size == (off_t)-1) { -+ perror("lseek"); -+ goto err; -+ } -+ /* rewind */ -+ if (lseek(fd, 0, SEEK_SET)) { -+ perror("lseek"); -+ goto err; -+ } -+ -+ buf = malloc(MAX_PAGESIZE); -+ if (!buf) { -+ perror("malloc"); -+ goto err; -+ } -+ -+ if (read(fd, buf, MAX_PAGESIZE) == (ssize_t)-1) { -+ perror("read"); -+ goto err1; -+ } -+ -+ for (page = page_size; *page; ++page) { -+ char *off = buf + *page - 10; -+ if (swap_detect_signature(off)) { -+ pagesize = *page; -+ break; -+ } -+ } -+ if (pagesize) { -+ s = (struct swap_info *)buf; -+ if (s->version == 1) { -+ swap_version = 1; -+ last_page = s->last_page; -+ } else if (bswap_32(s->version) == 1) { -+ flip = 1; -+ swap_version = 1; -+ last_page = bswap_32(s->last_page); -+ } -+ if (verbose) -+ fprintf(stderr, _("found %sswap v%d signature string" -+ " for %d KiB PAGE_SIZE\n"), -+ flip ? "other-endian " : "", swap_version, -+ pagesize / 1024); -+ swap_size = (last_page + 1) * pagesize; -+ if (swap_size > size) { -+ if (verbose) -+ fprintf(stderr, _("last_page 0x%08llx is larger" -+ " than actual size of swapspace\n"), -+ (unsigned long long)swap_size); -+ pagesize = 0; -+ } -+ } -+ -+err1: -+ free(buf); -+err: -+ close(fd); -+ return pagesize; -+} -+ - static int - do_swapon(const char *orig_special, int prio, int canonic) { - int status; -+ int reinitialize = 0; - struct stat st; - const char *special = orig_special; -+ unsigned int pagesize = sysconf(_SC_PAGESIZE); -+ unsigned int swap_pagesize = 0; - - if (verbose) - printf(_("%s on %s\n"), progname, orig_special); -@@ -260,6 +394,15 @@ do_swapon(const char *orig_special, int - return -1; - } - -+ swap_pagesize = swap_get_pagesize(special); -+ if (swap_pagesize && (pagesize != swap_pagesize)) { -+ if (verbose) -+ fprintf(stderr, _("swap format pagesize does not match." -+ " Reinitializing the swap.\n"), -+ progname, special); -+ reinitialize = 1; -+ } -+ - /* We have to reinitialize swap with old (=useless) software suspend - * data. The problem is that if we don't do it, then we get data - * corruption the next time an attempt at unsuspending is made. -@@ -268,6 +411,10 @@ do_swapon(const char *orig_special, int - fprintf(stdout, _("%s: %s: software suspend data detected. " - "Reinitializing the swap.\n"), - progname, special); -+ reinitialize = 1; -+ } -+ -+ if (reinitialize) { - if (swap_reinitialize(special) < 0) - return -1; - } diff --git a/util-linux-2.14.1-sys-utils_lscpu_exit.patch b/util-linux-2.14.1-sys-utils_lscpu_exit.patch deleted file mode 100644 index 498e304..0000000 --- a/util-linux-2.14.1-sys-utils_lscpu_exit.patch +++ /dev/null @@ -1,11 +0,0 @@ -Index: util-linux-ng-2.14.1/sys-utils/lscpu.c -=================================================================== ---- util-linux-ng-2.14.1.orig/sys-utils/lscpu.c 2008-10-20 15:00:44.000000000 +0200 -+++ util-linux-ng-2.14.1/sys-utils/lscpu.c 2008-10-21 18:27:01.000000000 +0200 -@@ -647,5 +647,5 @@ int main(int argc, char *argv[]) - else - print_readable(cpu); - -- return EXIT_FAILURE; -+ return EXIT_SUCCESS; - } diff --git a/util-linux-2.14.2-mount_allow_loop_suid_umount.patch b/util-linux-2.14.2-mount_allow_loop_suid_umount.patch deleted file mode 100644 index 8d06387..0000000 --- a/util-linux-2.14.2-mount_allow_loop_suid_umount.patch +++ /dev/null @@ -1,68 +0,0 @@ -Index: util-linux-ng-2.14.2/mount/umount.c -=================================================================== ---- util-linux-ng-2.14.2.orig/mount/umount.c 2009-02-11 17:00:35.000000000 +0100 -+++ util-linux-ng-2.14.2/mount/umount.c 2009-02-12 13:09:44.000000000 +0100 -@@ -465,6 +465,42 @@ get_value(const char *list, const char * - return 0; - } - -+#define LOOP_DEV_PATH "/dev/loop" -+/* check if mc contains a loop device which is associated -+ * with the file in fs -+ */ -+static int -+valid_loop(struct mntentchn *mc, struct mntentchn *fs) -+{ -+ unsigned long long offset=0; -+ char *p; -+ -+ /* 1. check if it begins with /dev/loop */ -+ if (strncmp(LOOP_DEV_PATH, mc->m.mnt_fsname, sizeof(LOOP_DEV_PATH)-1) != 0) -+ return 0; -+ -+ /* 2. check for loop option in fstab */ -+ if (!contains(fs->m.mnt_opts, "loop")) -+ return 0; -+ -+ /* 3. check for offset option in fstab */ -+ if (p=get_value(fs->m.mnt_opts, "offset=")) -+ offset = strtoull(p, NULL, 10); -+ -+ /* 4. check association */ -+ if (loopfile_used_with(mc->m.mnt_fsname, fs->m.mnt_fsname, offset)) { -+ if (verbose > 1) -+ printf(_("device %s is associated with %s\n"), -+ mc->m.mnt_fsname, fs->m.mnt_fsname); -+ return 1; -+ } else { -+ if (verbose > 1) -+ printf(_("device %s is not associated with %s\n"), -+ mc->m.mnt_fsname, fs->m.mnt_fsname); -+ return 0; -+ } -+} -+ - static int - umount_file (char *arg) { - struct mntentchn *mc, *fs; -@@ -530,14 +566,18 @@ umount_file (char *arg) { - the pair (spec,file) in fstab. */ - fs = getfs_by_specdir(mc->m.mnt_fsname, mc->m.mnt_dir); - if (!fs) { -- if (!getfs_by_spec (file) && !getfs_by_dir (file)) -+ fs = getfs_by_dir(file); -+ if (!getfs_by_spec (file) && !fs) - die (2, - _("umount: %s is not in the fstab " - "(and you are not root)"), - file); -- else -+ -+ /* spec could be a file which is loop mounted */ -+ if (fs && !valid_loop(mc, fs)) - die (2, _("umount: %s mount disagrees with " - "the fstab"), file); -+ - } - - /* diff --git a/util-linux-2.14.2-schedutils_fix_email.patch b/util-linux-2.14.2-schedutils_fix_email.patch deleted file mode 100644 index 9021b85..0000000 --- a/util-linux-2.14.2-schedutils_fix_email.patch +++ /dev/null @@ -1,35 +0,0 @@ -Index: util-linux-ng-2.14.2-rc2/schedutils/ionice.1 -=================================================================== ---- util-linux-ng-2.14.2-rc2.orig/schedutils/ionice.1 2009-01-22 12:53:14.000000000 +0100 -+++ util-linux-ng-2.14.2-rc2/schedutils/ionice.1 2009-02-05 18:08:51.000000000 +0100 -@@ -76,7 +76,7 @@ Linux supports io scheduling priorities - io scheduler. - - .SH AUTHORS --Jens Axboe -+Jens Axboe - - .SH AVAILABILITY - The ionice command is part of the util-linux-ng package and is available from -Index: util-linux-ng-2.14.2-rc2/schedutils/ionice.c -=================================================================== ---- util-linux-ng-2.14.2-rc2.orig/schedutils/ionice.c 2009-02-05 17:53:20.000000000 +0100 -+++ util-linux-ng-2.14.2-rc2/schedutils/ionice.c 2009-02-05 18:09:46.000000000 +0100 -@@ -1,7 +1,7 @@ - /* - * ionice: set or get process io scheduling class and priority - * -- * Copyright (C) 2005 Jens Axboe SUSE Labs -+ * Copyright (C) 2005 Jens Axboe - * - * Released under the terms of the GNU General Public License version 2 - * -@@ -51,7 +51,7 @@ static void usage(void) - printf("\t\t\t1: realtime, 2: best-effort, 3: idle\n"); - printf("\t-p\tProcess pid\n"); - printf("\t-h\tThis help page\n"); -- printf("\nJens Axboe (C) 2005\n"); -+ printf("\nJens Axboe (C) 2005\n"); - } - - int main(int argc, char *argv[]) diff --git a/util-linux-2.14.2-schedutils_ionice_enosys.patch b/util-linux-2.14.2-schedutils_ionice_enosys.patch deleted file mode 100644 index f12d6e6..0000000 --- a/util-linux-2.14.2-schedutils_ionice_enosys.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: util-linux-ng-2.14.2-rc2/schedutils/ionice.c -=================================================================== ---- util-linux-ng-2.14.2-rc2.orig/schedutils/ionice.c 2009-01-22 12:32:48.000000000 +0100 -+++ util-linux-ng-2.14.2-rc2/schedutils/ionice.c 2009-02-05 17:53:20.000000000 +0100 -@@ -115,8 +115,12 @@ int main(int argc, char *argv[]) - } - } else { - if (ioprio_set(IOPRIO_WHO_PROCESS, pid, ioprio | ioprio_class << IOPRIO_CLASS_SHIFT) == -1) { -- perror("ioprio_set"); -- exit(EXIT_FAILURE); -+ if (errno == ENOSYS) -+ fprintf(stderr, "Warning: omitting unsupported ioprio_set() call\n"); -+ else { -+ perror("ioprio_set"); -+ exit(EXIT_FAILURE); -+ } - } - - if (argv[optind]) { diff --git a/util-linux-mount_losetup_crypto.patch b/util-linux-mount_losetup_crypto.patch index a215c8b..99aca2d 100644 --- a/util-linux-mount_losetup_crypto.patch +++ b/util-linux-mount_losetup_crypto.patch @@ -22,54 +22,41 @@ sha512.c is from loop-AES. Signed-off-by: Ludwig Nussel --- - mount/Makefile.am | 2 + - mount/lomount.c | 178 +++++++++++++++--- - mount/lomount.h | 4 +- - mount/losetup.8 | 11 + - mount/mount.8 | 13 ++ - mount/mount.c | 23 ++- - mount/my_dev_t.h | 5 + - mount/rmd160.c | 532 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - mount/rmd160.h | 11 + - mount/sha512.c | 432 +++++++++++++++++++++++++++++++++++++++++++ - mount/sha512.h | 45 +++++ - 11 files changed, 1225 insertions(+), 31 deletions(-) - create mode 100644 mount/my_dev_t.h - create mode 100644 mount/rmd160.c - create mode 100644 mount/rmd160.h - create mode 100644 mount/sha512.c - create mode 100644 mount/sha512.h -Index: util-linux-ng-2.14.2-rc2/mount/Makefile.am -=================================================================== ---- util-linux-ng-2.14.2-rc2.orig/mount/Makefile.am 2009-01-22 12:32:48.000000000 +0100 -+++ util-linux-ng-2.14.2-rc2/mount/Makefile.am 2009-02-05 16:50:57.000000000 +0100 -@@ -17,6 +17,7 @@ headers_common = fstab.h mount_mntent.h - getusername.h loop.h sundries.h + Makefile.am | 3 + lomount.c | 174 +++++++++++++++++-- + lomount.h | 5 + losetup.8 | 11 + + mount.8 | 13 + + mount.c | 21 ++ + rmd160.c | 532 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + rmd160.h | 11 + + sha512.c | 432 ++++++++++++++++++++++++++++++++++++++++++++++++ + sha512.h | 45 +++++ + 10 files changed, 1219 insertions(+), 28 deletions(-) + +diff --git a/mount/Makefile.am b/mount/Makefile.am +index b0e6374..5d5a682 100644 +--- a/mount/Makefile.am ++++ b/mount/Makefile.am +@@ -7,7 +7,8 @@ sbin_PROGRAMS = losetup swapon + dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 - mount_common = fstab.c mount_mntent.c getusername.c lomount.c \ -+ rmd160.c sha512.c \ - $(utils_common) $(headers_common) ../lib/env.c ../lib/linux_version.c \ - ../lib/blkdev.c $(fallback) + # generic sources for all programs (mount, umount, losetup) +-srcs_common = sundries.c xmalloc.c ../lib/canonicalize.c sundries.h xmalloc.h ++srcs_common = sundries.c xmalloc.c ../lib/canonicalize.c sundries.h xmalloc.h \ ++ rmd160.c sha512.c -@@ -32,7 +33,8 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD - swapon_SOURCES = swapon.c swap_constants.h $(utils_common) - - losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c \ -- loop.h lomount.h xmalloc.h sundries.h realpath.h $(fallback) -+ loop.h lomount.h xmalloc.h sundries.h realpath.h $(fallback) \ -+ rmd160.c sha512.c - losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) - - -Index: util-linux-ng-2.14.2-rc2/mount/lomount.c -=================================================================== ---- util-linux-ng-2.14.2-rc2.orig/mount/lomount.c 2009-02-05 16:50:51.000000000 +0100 -+++ util-linux-ng-2.14.2-rc2/mount/lomount.c 2009-02-05 16:52:14.000000000 +0100 -@@ -24,6 +24,12 @@ + # generic header for mount and umount + hdrs_mount = fstab.h mount_mntent.h mount_constants.h \ +diff --git a/mount/lomount.c b/mount/lomount.c +index 1b191ab..5c659cd 100644 +--- a/mount/lomount.c ++++ b/mount/lomount.c +@@ -23,6 +23,12 @@ #include "sundries.h" #include "xmalloc.h" - #include "realpath.h" + #include "pathnames.h" +#include "rmd160.h" +#include "sha512.h" + @@ -77,9 +64,9 @@ Index: util-linux-ng-2.14.2-rc2/mount/lomount.c +#define MIN(a,b) ((a enable data encryption with specified \n" @@ -290,22 +277,22 @@ Index: util-linux-ng-2.14.2-rc2/mount/lomount.c " -o | --offset start at offset into file\n" " --sizelimit loop limited to only bytes of the file\n" " -p | --pass-fd read passphrase from file descriptor \n" -@@ -893,11 +1008,14 @@ usage(void) { +@@ -919,11 +1034,14 @@ usage(void) { int main(int argc, char **argv) { char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc; -+ char *keysize; -+ char *phash = NULL; - int delete, find, c, all; ++ char *keysize; ++ char *phash = NULL; + int delete, find, c, all, capacity; int res = 0; int showdev = 0; int ro = 0; int pfd = -1; -+ int keysz = 0; ++ int keysz = 0; unsigned long long off, slimit; struct option longopts[] = { { "all", 0, 0, 'a' }, -@@ -905,6 +1023,8 @@ main(int argc, char **argv) { +@@ -932,6 +1050,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -314,7 +301,7 @@ Index: util-linux-ng-2.14.2-rc2/mount/lomount.c { "associated", 1, 0, 'j' }, { "offset", 1, 0, 'o' }, { "sizelimit", 1, 0, 128 }, -@@ -923,12 +1043,13 @@ main(int argc, char **argv) { +@@ -950,12 +1070,13 @@ main(int argc, char **argv) { off = 0; slimit = 0; assoc = offset = sizelimit = encryption = passfd = NULL; @@ -324,12 +311,12 @@ Index: util-linux-ng-2.14.2-rc2/mount/lomount.c if ((p = strrchr(progname, '/')) != NULL) progname = p+1; -- while ((c = getopt_long(argc, argv, "ade:E:fhj:o:p:rsv", +- while ((c = getopt_long(argc, argv, "acde:E:fhj:o:p:rsv", + while ((c = getopt_long(argc, argv, "ade:E:fhj:k:o:p:rsvH:", longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -950,6 +1071,12 @@ main(int argc, char **argv) { +@@ -980,6 +1101,12 @@ main(int argc, char **argv) { case 'j': assoc = optarg; break; @@ -342,7 +329,7 @@ Index: util-linux-ng-2.14.2-rc2/mount/lomount.c case 'o': offset = optarg; break; -@@ -1028,8 +1155,11 @@ main(int argc, char **argv) { +@@ -1065,8 +1192,11 @@ main(int argc, char **argv) { else { if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(); @@ -355,11 +342,24 @@ Index: util-linux-ng-2.14.2-rc2/mount/lomount.c if (res == 2 && find) { if (verbose) printf(_("stolen loop=%s...trying again\n"), -Index: util-linux-ng-2.14.2-rc2/mount/losetup.8 -=================================================================== ---- util-linux-ng-2.14.2-rc2.orig/mount/losetup.8 2008-05-29 01:01:02.000000000 +0200 -+++ util-linux-ng-2.14.2-rc2/mount/losetup.8 2009-02-05 16:50:57.000000000 +0100 -@@ -80,9 +80,18 @@ find the first unused loop device. If a +diff --git a/mount/lomount.h b/mount/lomount.h +index 59108d4..07ab875 100644 +--- a/mount/lomount.h ++++ b/mount/lomount.h +@@ -1,5 +1,6 @@ +-extern int set_loop(const char *, const char *, unsigned long long, unsigned long long, +- const char *, int, int *); ++extern int set_loop(const char * device, const char * file, unsigned long long offset, ++ unsigned long long, const char *encryption, const char *phash, ++ int pfd, int *options, int keysz); + extern int del_loop(const char *); + extern int is_loop_device(const char *); + extern int is_loop_autoclear(const char *device); +diff --git a/mount/losetup.8 b/mount/losetup.8 +index f5d3e17..226f4f3 100644 +--- a/mount/losetup.8 ++++ b/mount/losetup.8 +@@ -94,9 +94,18 @@ find the first unused loop device. If a argument is present, use this device. Otherwise, print its name .IP "\fB\-h, \-\-help\fP" print help @@ -378,7 +378,7 @@ Index: util-linux-ng-2.14.2-rc2/mount/losetup.8 .IP "\fB\-o, \-\-offset \fIoffset\fP" the data start is moved \fIoffset\fP bytes into the specified file or device -@@ -153,6 +162,8 @@ the command +@@ -167,6 +176,8 @@ the command .fi .SH RESTRICTION DES encryption is painfully slow. On the other hand, XOR is terribly weak. @@ -387,11 +387,11 @@ Index: util-linux-ng-2.14.2-rc2/mount/losetup.8 Cryptoloop is deprecated in favor of dm-crypt. For more details see .B cryptsetup(8). -Index: util-linux-ng-2.14.2-rc2/mount/mount.8 -=================================================================== ---- util-linux-ng-2.14.2-rc2.orig/mount/mount.8 2009-01-22 12:32:48.000000000 +0100 -+++ util-linux-ng-2.14.2-rc2/mount/mount.8 2009-02-05 16:50:57.000000000 +0100 -@@ -767,6 +767,15 @@ Every time the inode is modified, the i_ +diff --git a/mount/mount.8 b/mount/mount.8 +index 8e17549..ffe3cc5 100644 +--- a/mount/mount.8 ++++ b/mount/mount.8 +@@ -782,6 +782,15 @@ Every time the inode is modified, the i_version field will be incremented. .B noiversion Do not increment the i_version inode field. .TP @@ -407,7 +407,7 @@ Index: util-linux-ng-2.14.2-rc2/mount/mount.8 .B mand Allow mandatory locks on this filesystem. See .BR fcntl (2). -@@ -2222,6 +2231,10 @@ that are really options to +@@ -2390,6 +2399,10 @@ that are really options to .BR \%losetup (8). (These options can be used in addition to those specific to the filesystem type.) @@ -418,13 +418,13 @@ Index: util-linux-ng-2.14.2-rc2/mount/mount.8 If no explicit loop device is mentioned (but just an option `\fB\-o loop\fP' is given), then -Index: util-linux-ng-2.14.2-rc2/mount/mount.c -=================================================================== ---- util-linux-ng-2.14.2-rc2.orig/mount/mount.c 2009-02-05 16:50:51.000000000 +0100 -+++ util-linux-ng-2.14.2-rc2/mount/mount.c 2009-02-05 16:50:57.000000000 +0100 -@@ -87,6 +87,9 @@ static int suid = 0; - /* Contains the fd to read the passphrase from, if any. */ - static int pfd = -1; +diff --git a/mount/mount.c b/mount/mount.c +index c636e9d..2a69c38 100644 +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -95,6 +95,9 @@ struct mountargs { + void *data; + }; +/* Contains the preferred keysize in bits we want to use */ +static int keysz = 0; @@ -432,7 +432,7 @@ Index: util-linux-ng-2.14.2-rc2/mount/mount.c /* Map from -o and fstab option strings to the flag argument to mount(2). */ struct opt_map { const char *opt; /* option name */ -@@ -188,6 +191,7 @@ static int opt_nofail = 0; +@@ -200,6 +203,7 @@ static int opt_nofail = 0; static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_sizelimit, *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper; @@ -440,7 +440,7 @@ Index: util-linux-ng-2.14.2-rc2/mount/mount.c static int mounted (const char *spec0, const char *node0); static int check_special_mountprog(const char *spec, const char *node, -@@ -203,6 +207,8 @@ static struct string_opt_map { +@@ -215,6 +219,8 @@ static struct string_opt_map { { "offset=", 0, &opt_offset }, { "sizelimit=", 0, &opt_sizelimit }, { "encryption=", 0, &opt_encryption }, @@ -449,7 +449,7 @@ Index: util-linux-ng-2.14.2-rc2/mount/mount.c { "speed=", 0, &opt_speed }, { "comment=", 1, &opt_comment }, { "uhelper=", 0, &opt_uhelper }, -@@ -910,7 +916,8 @@ loop_check(const char **spec, const char +@@ -1072,7 +1078,8 @@ loop_check(const char **spec, const char **type, int *flags, *type = opt_vfstype; } @@ -459,7 +459,7 @@ Index: util-linux-ng-2.14.2-rc2/mount/mount.c *loopfile = *spec; if (*loop) { -@@ -942,7 +949,7 @@ loop_check(const char **spec, const char +@@ -1104,7 +1111,7 @@ loop_check(const char **spec, const char **type, int *flags, printf(_("mount: going to use the loop device %s\n"), *loopdev); if ((res = set_loop(*loopdev, *loopfile, offset, sizelimit, @@ -468,15 +468,15 @@ Index: util-linux-ng-2.14.2-rc2/mount/mount.c if (res == 2) { /* loop dev has been grabbed by some other process, try again, if not given explicitly */ -@@ -1699,6 +1706,7 @@ static struct option longopts[] = { +@@ -1861,6 +1868,7 @@ static struct option longopts[] = { { "options", 1, 0, 'o' }, { "test-opts", 1, 0, 'O' }, { "pass-fd", 1, 0, 'p' }, + { "keybits", 1, 0, 'k' }, { "types", 1, 0, 't' }, - { "bind", 0, 0, 128 }, - { "move", 0, 0, 133 }, -@@ -1860,6 +1868,7 @@ main(int argc, char *argv[]) { + { "bind", 0, 0, 'B' }, + { "move", 0, 0, 'M' }, +@@ -2022,6 +2030,7 @@ main(int argc, char *argv[]) { char *options = NULL, *test_opts = NULL, *node; const char *spec = NULL; char *label = NULL; @@ -484,16 +484,16 @@ Index: util-linux-ng-2.14.2-rc2/mount/mount.c char *uuid = NULL; char *types = NULL; char *p; -@@ -1890,7 +1899,7 @@ main(int argc, char *argv[]) { +@@ -2052,7 +2061,7 @@ main(int argc, char *argv[]) { initproctitle(argc, argv); #endif -- while ((c = getopt_long (argc, argv, "afFhilL:no:O:p:rsU:vVwt:", -+ while ((c = getopt_long (argc, argv, "afFhik:lL:no:O:p:rsU:vVwt:", +- while ((c = getopt_long (argc, argv, "aBfFhilL:Mno:O:p:rRsU:vVwt:", ++ while ((c = getopt_long (argc, argv, "aBfFhik:lL:Mno:O:p:rRsU:vVwt:", longopts, NULL)) != -1) { switch (c) { case 'a': /* mount everything in fstab */ -@@ -1908,6 +1917,9 @@ main(int argc, char *argv[]) { +@@ -2073,6 +2082,9 @@ main(int argc, char *argv[]) { case 'i': external_allowed = 0; break; @@ -503,7 +503,7 @@ Index: util-linux-ng-2.14.2-rc2/mount/mount.c case 'l': list_with_volumelabel = 1; break; -@@ -2038,6 +2050,9 @@ main(int argc, char *argv[]) { +@@ -2211,6 +2223,9 @@ main(int argc, char *argv[]) { atexit(unlock_mtab); @@ -513,10 +513,11 @@ Index: util-linux-ng-2.14.2-rc2/mount/mount.c switch (argc+specseen) { case 0: /* mount -a */ -Index: util-linux-ng-2.14.2-rc2/mount/rmd160.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14.2-rc2/mount/rmd160.c 2009-02-05 16:50:57.000000000 +0100 +diff --git a/mount/rmd160.c b/mount/rmd160.c +new file mode 100644 +index 0000000..3430954 +--- /dev/null ++++ b/mount/rmd160.c @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -1050,10 +1051,11 @@ Index: util-linux-ng-2.14.2-rc2/mount/rmd160.c + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -Index: util-linux-ng-2.14.2-rc2/mount/rmd160.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14.2-rc2/mount/rmd160.h 2009-02-05 16:50:57.000000000 +0100 +diff --git a/mount/rmd160.h b/mount/rmd160.h +new file mode 100644 +index 0000000..4b2c61d +--- /dev/null ++++ b/mount/rmd160.h @@ -0,0 +1,11 @@ +#ifndef RMD160_H +#define RMD160_H @@ -1066,10 +1068,11 @@ Index: util-linux-ng-2.14.2-rc2/mount/rmd160.h +#endif /*RMD160_H*/ + + -Index: util-linux-ng-2.14.2-rc2/mount/sha512.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14.2-rc2/mount/sha512.c 2009-02-05 16:50:57.000000000 +0100 +diff --git a/mount/sha512.c b/mount/sha512.c +new file mode 100644 +index 0000000..f717c8b +--- /dev/null ++++ b/mount/sha512.c @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1503,10 +1506,11 @@ Index: util-linux-ng-2.14.2-rc2/mount/sha512.c + memset(&ctx, 0, sizeof(ctx)); +} +#endif -Index: util-linux-ng-2.14.2-rc2/mount/sha512.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14.2-rc2/mount/sha512.h 2009-02-05 16:50:57.000000000 +0100 +diff --git a/mount/sha512.h b/mount/sha512.h +new file mode 100644 +index 0000000..4b57c01 +--- /dev/null ++++ b/mount/sha512.h @@ -0,0 +1,45 @@ +/* + * sha512.h @@ -1553,16 +1557,3 @@ Index: util-linux-ng-2.14.2-rc2/mount/sha512.h +/* no sha384_write(), use sha512_write() */ +/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ +extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); -Index: util-linux-ng-2.14.2-rc2/mount/lomount.h -=================================================================== ---- util-linux-ng-2.14.2-rc2.orig/mount/lomount.h 2008-07-02 15:08:50.000000000 +0200 -+++ util-linux-ng-2.14.2-rc2/mount/lomount.h 2009-02-05 16:50:57.000000000 +0100 -@@ -1,5 +1,6 @@ --extern int set_loop(const char *, const char *, unsigned long long, unsigned long long, -- const char *, int, int *); -+extern int set_loop(const char * device, const char * file, unsigned long long offset, -+ unsigned long long, const char *encryption, const char *phash, -+ int pfd, int *options, int keysz); - extern int del_loop(const char *); - extern int is_loop_device(const char *); - extern int is_loop_autoclear(const char *device); diff --git a/util-linux-ng-2.14.2.tar.bz2 b/util-linux-ng-2.14.2.tar.bz2 deleted file mode 100644 index 3b3d9c4..0000000 --- a/util-linux-ng-2.14.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:108e63e9a007f6a8c0eff841dd38e0fe3b635c98b35bfac2d89b4b1a1ce0630e -size 2956769 diff --git a/util-linux-ng-2.16-rc1.tar.bz2 b/util-linux-ng-2.16-rc1.tar.bz2 new file mode 100644 index 0000000..1f1c06d --- /dev/null +++ b/util-linux-ng-2.16-rc1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fd2c539888aeab25c22e99d784e9d537ba35fd3087c926efc40af4047dc418d +size 3455981 diff --git a/util-linux-2.13-rpmlintrc b/util-linux-rpmlintrc similarity index 100% rename from util-linux-2.13-rpmlintrc rename to util-linux-rpmlintrc diff --git a/util-linux.changes b/util-linux.changes index 37bc572..9da1def 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Sun Jun 28 21:36:57 CEST 2009 - kay.sievers@novell.com + +- update to version 2.16 +- switch from libvolume_id to new libblkid +- provide fsck +- provide libblkid +- provide libuuid +- provide setarch +- provide separate uuidd package +- remove patches: + util-linux-2.14.1-lscpu.patch (upstream) + util-linux-2.14.1-lscpu_add_hypervisor_detection.patch (upstream) + util-linux-2.14.1-lscpu_sysroot_option.patch (upstream) + util-linux-2.14.1-sys-utils_lscpu_exit.patch (upstream) + util-linux-2.14.2-schedutils_fix_email.patch (upstream) + util-linux-2.12r-fdisk_cyl.patch (upstream) + util-linux-2.14.1-mount_swap_pagesize.patch (--fixpg option) + util-linux-2.14.2-schedutils_ionice_enosys.patch (-t option) + util-linux-2.14.1-hwclock_adjust_and_hctosys.patch (--systz) + ------------------------------------------------------------------- Thu Apr 16 14:55:22 CEST 2009 - werner@suse.de @@ -1506,12 +1527,12 @@ Tue Feb 4 12:40:00 CET 2003 - meissner@suse.de Wed Jan 29 11:52:19 CET 2003 - mmj@suse.de - Update to util-linux-2.11z including: - · Translation updates - · mount: fix LABEL= handling for user umount, don't abort on read + Translation updates + mount: fix LABEL= handling for user umount, don't abort on read error with photocds and add dmask and fmask vfat mount options - · setterm: accept devfs name - · simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails - · umount: allow user umount after mount by label or uuid + setterm: accept devfs name + simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails + umount: allow user umount after mount by label or uuid ------------------------------------------------------------------- Wed Jan 22 15:10:24 CET 2003 - sf@suse.de @@ -2339,7 +2360,7 @@ Thu Aug 26 15:05:03 CEST 1999 - uli@suse.de ------------------------------------------------------------------- Wed Aug 25 18:04:35 MEST 1999 - kukuk@suse.de -- Don´t install tsort, its now in textutils 2.0 +- Don?t install tsort, its now in textutils 2.0 ------------------------------------------------------------------- Tue Aug 24 10:11:06 MEST 1999 - kukuk@suse.de diff --git a/util-linux.spec b/util-linux.spec index 492413e..d23d5cd 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.14.2) +# spec file for package util-linux (Version 2.16) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -18,22 +18,22 @@ Name: util-linux -BuildRequires: audit-devel gettext-devel libuuid-devel libvolume_id-devel -BuildRequires: libselinux-devel ncurses-devel pam-devel readline-devel zlib-devel +BuildRequires: audit-devel gettext-devel pkg-config +BuildRequires: libselinux-devel libsepol-devel ncurses-devel pam-devel readline-devel zlib-devel Url: http://userweb.kernel.org/~kzak/util-linux-ng/ -Provides: util rawio raw base schedutils +Provides: util rawio raw base schedutils uuid-runtime +Obsoletes: util rawio raw base schedutils uuid-runtime Supplements: filesystem(minix) -Obsoletes: util rawio raw base schedutils PreReq: %install_info_prereq permissions -License: BSD 3-Clause; GPL v2 or later +License: BSD 3-clause (or similar) ; GPL v2 or later Group: System/Base AutoReqProv: on -Version: 2.14.2 -Release: 3 +Version: 2.16 +Release: 1 Requires: %name-lang = %{version} Summary: A collection of basic system utilities -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 -Source1: util-linux-2.13-rpmlintrc +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version-rc1.tar.bz2 +Source1: util-linux-rpmlintrc Source2: nologin.c Source3: nologin.8 Source4: raw.init @@ -55,45 +55,22 @@ Source28: mkzimage_cmdline.8 Source29: mkzimage_cmdline.c Source30: README.largedisk Source31: addnote.c -Source32: v2.14-ReleaseNotes -Source33: v2.14.1-ReleaseNotes -Source34: v2.14.2-ReleaseNotes +Source50: uuidd.rc ## ## util-linux patches ## +Patch1: HEAD.patch # add hostid -Patch1: util-linux-2.12-misc_utils_hostid.patch -# 160822 - fix for 153657 -Patch2: util-linux-2.12r-fdisk_cyl.patch +Patch2: util-linux-2.12-misc_utils_hostid.patch # 241372 - remove legacy warnings from fdisk Patch3: util-linux-2.12r-fdisk_remove_bogus_warnings.patch -# lscpu hypervisor detection needed for FATE#303051 -Patch8: util-linux-2.14.1-lscpu.patch -Patch9: util-linux-2.14.1-lscpu_sysroot_option.patch -Patch10: util-linux-2.14.1-lscpu_add_hypervisor_detection.patch -# bnc#433028 -Patch11: util-linux-2.14.1-mount_swap_pagesize.patch -Patch12: util-linux-2.14.1-sys-utils_lscpu_exit.patch # bnc#444966 Patch17: util-linux-2.14.1-mount_race.patch # bnc#447036 Patch18: util-linux-2.14.1-mount_skip_sync.patch -# bnc#441106 -Patch19: util-linux-2.14.1-hwclock_adjust_and_hctosys.patch -# bnc#450675 -Patch20: util-linux-2.14.1-disk_utils_raw_should_use_ioctl_to_create_device.patch -# bnc#449646 -Patch21: fix-hang-on-stale-nfs.diff -# bnc#444637 -Patch22: util-linux-2.14.2-schedutils_ionice_enosys.patch -# bnc#456375 -Patch23: util-linux-2.14.2-schedutils_fix_email.patch -# bnc#461732 -Patch24: util-linux-2.14.2-mount_allow_loop_suid_umount.patch # crypto patch Patch30: util-linux-mount_losetup_crypto.patch ## -## ## adjtimex ## Patch50: adjtimex-1.20-nosyscall.diff @@ -118,33 +95,67 @@ This package contains a large variety of low-level system utilities that are necessary for a Linux system to function. It contains the mount program, the fdisk configuration tool, and more. +%package -n libblkid1 +License: GPL v2 or later +Summary: Filesystem detection library +Group: System/Filesystems +AutoReqProv: on +%description -n libblkid1 +Library for filesystem detection. -Authors: --------- - Karel Zak +%package -n libblkid-devel +License: GPL v2 or later +Summary: Development files for the filesystem detection library +Group: Development/Libraries/C and C++ +AutoReqProv: on +Requires: libblkid1 = %version libuuid-devel + +%description -n libblkid-devel +Files needed to develop applications using the library for filesystem +detection. + +%package -n uuidd +License: GPL v2 or later +Summary: Utilities for the Second Extended File System +Group: System/Filesystems +AutoReqProv: on +PreReq: %fillup_prereq %insserv_prereq permissions pwdutils + +%description -n uuidd +Utilities needed to create and maintain ext2 and ext3 file systems +under Linux. Included in this package are: chattr, lsattr, mke2fs, +mklost+found, tune2fs, e2fsck, resize2fs, and badblocks. + +%package -n libuuid1 +License: GPL v2 or later +Summary: Library to generate UUIDs +Group: System/Filesystems +AutoReqProv: on + +%description -n libuuid1 +A library to generate universally unique IDs (UUIDs). + +%package -n libuuid-devel +License: GPL v2 or later +Summary: Development files for libuuid1 +Group: Development/Libraries/C and C++ +AutoReqProv: on +Requires: libuuid1 = %version + +%description -n libuuid-devel +Files to develop applications using the library to generate universally +unique IDs (UUIDs). %lang_package %prep -%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%version +%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%version-rc1 %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 %patch17 -p1 %patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -%patch22 -p1 -%patch23 -p1 -%patch24 -p1 %patch30 -p1 -cp %{SOURCE32} %{SOURCE33} %{SOURCE34} . # cd adjtimex-* %patch50 -p1 @@ -214,22 +225,24 @@ BUILD_ENABLE= %ifarch %ix86 x86_64 BUILD_ENABLE="--enable-rdev" %endif -# Use autogen, when building from git tree autoreconf -fi -#./autogen.sh -./configure --mandir=%{_mandir} \ - --datadir=%{_datadir} \ - --with-fsprobe=volume_id \ - --with-audit \ - --with-selinux \ - --enable-elvtune \ - --enable-mesg \ - --enable-partx \ - --enable-raw \ - --enable-write \ - --disable-use-tty-group \ - $BUILD_ENABLE \ - CFLAGS="$CFLAGS $RPM_OPT_FLAGS" +./configure \ + --mandir=%{_mandir} \ + --datadir=%{_datadir} \ + --bindir=/bin \ + --sbindir=/sbin \ + --libdir=/%{_lib} \ + --with-audit \ + --with-selinux \ + --enable-elvtune \ + --enable-mesg \ + --enable-partx \ + --enable-raw \ + --enable-write \ + --disable-use-tty-group \ + --disable-static \ + $BUILD_ENABLE \ + CFLAGS="$CFLAGS $RPM_OPT_FLAGS" make gcc $RPM_OPT_FLAGS -o nologin nologin.c gcc $RPM_OPT_FLAGS -o mkzimage_cmdline %{S:29} @@ -240,8 +253,11 @@ cd ../time-%{time_ver} make check %install -mkdir -p "$RPM_BUILD_ROOT"{/etc/init.d,%{_mandir}/man{1,8},\ -/bin,/sbin,/usr/bin,/usr/sbin,%{_infodir}} +mkdir -p "$RPM_BUILD_ROOT"{/etc/init.d,%{_mandir}/man{1,8},/bin,/sbin,/usr/bin,/usr/sbin,%{_infodir}} +mkdir -p $RPM_BUILD_ROOT/var/lib/libuuid/ +mkdir -p $RPM_BUILD_ROOT/var/run/uuidd/ +install -m 744 %{SOURCE50} $RPM_BUILD_ROOT/etc/init.d/uuidd +mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates cp adjtimex-*/adjtimex %{buildroot}/sbin/ cp adjtimex-*/adjtimex.8 %{buildroot}%{_mandir}/man8/ pushd .. @@ -281,6 +297,12 @@ make DESTDIR=$RPM_BUILD_ROOT install mv $RPM_BUILD_ROOT/usr/bin/logger $RPM_BUILD_ROOT/bin/logger install -m 644 %{SOURCE6} $RPM_BUILD_ROOT/etc/filesystems install -m 755 nologin $RPM_BUILD_ROOT/sbin +rm -f $RPM_BUILD_ROOT/%{_lib}/libblkid.la +rm -f $RPM_BUILD_ROOT/%{_lib}/libblkid.so +ln -sf /%{_lib}/libblkid.so.1 $RPM_BUILD_ROOT%{_libdir}/libblkid.so +rm -f $RPM_BUILD_ROOT/%{_lib}/libuuid.la +rm -f $RPM_BUILD_ROOT/%{_lib}/libuuid.so +ln -sf /%{_lib}/libuuid.so.1 $RPM_BUILD_ROOT%{_libdir}/libuuid.so %ifnarch ppc ppc64 install -m 755 mkzimage_cmdline $RPM_BUILD_ROOT/usr/bin install -m 644 %{S:28} $RPM_BUILD_ROOT%{_mandir}/man8 @@ -304,29 +326,6 @@ rm -f $RPM_BUILD_ROOT/usr/share/man/man1/pg.1* # Do not package these files to get rid of the perl dependency rm -f $RPM_BUILD_ROOT/usr/bin/chkdupexe rm -f $RPM_BUILD_ROOT/usr/share/man/man1/chkdupexe.1 -# For now, do not package setarch and related symlinks -rm -f $RPM_BUILD_ROOT/usr/bin/setarch -rm -f $RPM_BUILD_ROOT/usr/bin/linux32 -rm -f $RPM_BUILD_ROOT/usr/bin/linux64 -rm -f $RPM_BUILD_ROOT/usr/bin/i386 -rm -f $RPM_BUILD_ROOT/usr/bin/x86_64 -rm -f $RPM_BUILD_ROOT/usr/bin/s390 -rm -f $RPM_BUILD_ROOT/usr/bin/s390x -rm -f $RPM_BUILD_ROOT/usr/bin/ppc -rm -f $RPM_BUILD_ROOT/usr/bin/ppc32 -rm -f $RPM_BUILD_ROOT/usr/bin/ppc64 -rm -f $RPM_BUILD_ROOT/usr/bin/ia64 -rm -f $RPM_BUILD_ROOT/usr/bin/parisc -rm -f $RPM_BUILD_ROOT/usr/bin/parisc32 -rm -f $RPM_BUILD_ROOT/usr/bin/parisc64 -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/setarch.8 -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/i386.8 -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/x86_64.8 -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/linux{32,64}.8 -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/ia64.8 -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/s390{,x}.8 -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/ppc{,32,64}.8 -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/parisc{,32,64}.8 # arch dependent %ifarch s390 s390x rm -f $RPM_BUILD_ROOT/etc/fdprm @@ -353,6 +352,13 @@ rm -f $RPM_BUILD_ROOT/sbin/fdisk rm -f $RPM_BUILD_ROOT%{_mandir}/man8/fdisk.8* %endif %find_lang %{name}-ng %{name}.lang +# create list of setarch(8) symlinks +find $RPM_BUILD_ROOT%{_bindir}/ -regextype posix-egrep -type l \ + -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64)$" \ + -printf "%{_bindir}/%f\n" >> %{name}.files +find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \ + -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64)\.8.*" \ + -printf "%{_mandir}/man8/%f*\n" >> %{name}.files %clean rm -rf $RPM_BUILD_ROOT @@ -378,14 +384,41 @@ fi %verifyscript %verify_permissions -e /usr/bin/wall -e /usr/bin/write +%post -n libblkid1 +/sbin/ldconfig + +%postun -n libblkid1 +/sbin/ldconfig + +%pre -n uuidd +/usr/sbin/groupadd -r uuidd 2>/dev/null || : +/usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ + -d /var/run/uuidd uuidd 2>/dev/null || : + +%preun -n uuidd +%{stop_on_removal uuidd} + +%post -n uuidd +%{fillup_and_insserv -n uuidd} +%run_permissions + +%postun -n uuidd +%{restart_on_update uuidd} +%{insserv_cleanup} + +%post -n libuuid1 +/sbin/ldconfig + +%postun -n libuuid1 +/sbin/ldconfig +%verifyscript -n uuidd +%verify_permissions -e /usr/sbin/uuidd + %files lang -f %{name}.lang -%files +%files -f %{name}.files # Common files for all archs %defattr(-,root,root) -%doc v2.14-ReleaseNotes -%doc v2.14.1-ReleaseNotes -%doc v2.14.2-ReleaseNotes %doc login-utils/README.getty %doc login-utils/README.modems-with-agetty %doc login-utils/README.poeigl @@ -421,6 +454,11 @@ fi /sbin/raw /sbin/swapoff /sbin/swapon +/sbin/blkid +/sbin/findfs +/sbin/fsck +/sbin/switch_root +/usr/bin/ipcmk /bin/logger /usr/bin/cal /usr/bin/chrt @@ -444,6 +482,7 @@ fi /usr/bin/lscpu /usr/bin/mcookie /usr/bin/mesg +/usr/bin/uuidgen %ifnarch ppc ppc64 /usr/bin/chrp-addnote /usr/bin/mkzimage_cmdline @@ -453,7 +492,7 @@ fi /usr/bin/renice /usr/bin/rev /usr/bin/script -#/usr/bin/setarch +/usr/bin/setarch /usr/bin/scriptreplay /usr/bin/setsid /usr/bin/ul @@ -518,6 +557,8 @@ fi %{_mandir}/man1/whereis.1.gz %{_mandir}/man1/write.1.gz %{_mandir}/man1/which.1.gz +%{_mandir}/man1/ipcmk.1.gz +%{_mandir}/man1/uuidgen.1.gz %{_mandir}/man5/fstab.5.gz %{_mandir}/man8/addpart.8.gz %{_mandir}/man8/agetty.8.gz @@ -526,8 +567,12 @@ fi %{_mandir}/man8/elvtune.8* %{_mandir}/man8/ctrlaltdel.8.gz %{_mandir}/man8/adjtimex.8.gz +%{_mandir}/man8/blkid.8.gz +%{_mandir}/man8/switch_root.8.gz %{_mandir}/man8/mkfs.bfs.8.gz %{_mandir}/man8/mkfs.minix.8.gz +%{_mandir}/man8/findfs.8.gz +%{_mandir}/man8/fsck.8.gz %{_mandir}/man8/fsck.minix.8.gz %{_mandir}/man8/isosize.8.gz %{_mandir}/man8/ldattach.8.gz @@ -545,11 +590,12 @@ fi %{_mandir}/man8/pivot_root.8.gz %{_mandir}/man8/raw.8.gz %{_mandir}/man8/rtcwake.8.gz -#%{_mandir}/man8/setarch.8.gz +%{_mandir}/man8/setarch.8.gz %{_mandir}/man8/swapoff.8.gz %{_mandir}/man8/swapon.8.gz %{_mandir}/man8/umount.8.gz %{_mandir}/man8/setctsid.8.gz +%{_mandir}/man8/setarch.8.gz /usr/sbin/flushb /usr/sbin/readprofile %dir /usr/share/getopt @@ -624,1341 +670,38 @@ fi #%{_mandir}/man8/ia64.8.gz #%endif +%files -n libblkid1 +%defattr(-, root, root) +/%{_lib}/libblkid.so.1 +/%{_lib}/libblkid.so.1.* + +%files -n libblkid-devel +%defattr(-, root, root) +%{_libdir}/libblkid.so +%dir %{_includedir}/blkid +%{_includedir}/blkid/blkid.h +%_libdir/pkgconfig/blkid.pc +%{_mandir}/man3/libblkid.3.gz + +%files -n uuidd +%defattr(-, root, root) +%verify(not mode) %attr(0755,root,root) /usr/sbin/uuidd +%attr(-,uuidd,uuidd) %dir /var/lib/libuuid +%attr(-,uuidd,uuidd) %dir /var/run/uuidd +/etc/init.d/uuidd +%{_mandir}/man8/uuidd.8.gz + +%files -n libuuid1 +%defattr(-, root, root) +/%{_lib}/libuuid.so.1 +/%{_lib}/libuuid.so.1.* + +%files -n libuuid-devel +%defattr(-, root, root) +%{_libdir}/libuuid.so +%dir %{_includedir}/uuid +%{_includedir}/uuid/uuid.h +%_libdir/pkgconfig/uuid.pc +%{_mandir}/man3/uuid* + %changelog -* Thu Apr 16 2009 werner@suse.de -- Move /usr/sbin/adjtimex to /sbin/adjtimex to be able to check the - kernel time variables even without /usr mounted -* Mon Feb 16 2009 mkoenig@suse.de -- remove util-linux-2.14.1-fdisk_cylinder.patch - fixed upstream -* Thu Feb 12 2009 mkoenig@suse.de -- update to version 2.14.2 - chrt: - * support CFS SCHED_IDLE priority and document it - fdisk: - * cannot create partition with starting beyond 1 TB - * remove obsolete information from man page - hwclock: - * remove "cli" and "sti" from i386 CMOS code - * remove x86_64-specific bogon - losetup: - * add warning about read-only mode - * missing EBUSY error hint message - more: - * minor fixes to magic() - mount: - * add i_version support - * add info about /proc/mounts to mount.1 - * add info about semantics of read-only mount to mount.8 - * add rootcontext= SELinux mount option - * clean up SPEC canonicalization - * create separate section for fs-independent options in mount.8 - * finalize support of quoted LABELs/UUIDs - * mtab created multiple times with -a option - * suggest to use blockdev --setro rather than losetup -- catch ENOSYS in ionice to allow execution in virtualized - environments which don't support ioprio_{get,set} calls [bnc#444637] -- umount: fix suid check for user mounted loop devices [bnc#461732] -- fix doc [bnc#456375] -- remove patches: - util-linux-2.13.1-fdisk_cfdisk_yesno.patch - util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch - util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch - util-linux-2.14.1-fdisk_missing_include.patch - util-linux-2.14.1-mount_loop_ro_fix.patch -* Sat Feb 07 2009 schwab@suse.de -- Fix info dir entry for which. -* Wed Jan 07 2009 mkoenig@suse.de -- fix locking problem for external mount helpers when type - is not given [bnc#459839] -* Tue Dec 02 2008 mkoenig@suse.de -- raw: do not stat the raw devices when binding, since they - are created dynamically [bnc#450675] -* Thu Nov 27 2008 dmueller@suse.de -- mount: fix hang on trying to find a free loop device - if one of them has a stale nfs handle mounted (bnc#449646) -* Mon Nov 24 2008 mkoenig@suse.de -- mount: fix locking patch to not break -n [bnc#447937] -* Thu Nov 20 2008 mkoenig@suse.de -- mount: enhance mount/umount mtab locking and lock the whole - read mtab/syscall/write mtab process to avoid mtab corruption - with highly concurrent mount/umount calls [bnc#444966] -- add arch/powerpc/boot/addnote.c from kernel 2.6.27 - as /usr/bin/chrp-addnote [bnc#443859] -- umount: skip sync() in umount -a if no umount happened [bnc#447036] -- hwclock: allow --adjust and --hctosys simultaneously [bnc#441106] -* Fri Nov 07 2008 mkoenig@suse.de -- fdisk: support +cylinder notation [bnc#441871] -- check for EACCES when using ro fallback when loop mounting - a readonly image -- fix uninitialized variable in swapon pagesize detection -* Mon Oct 27 2008 mkoenig@suse.de -- fdisk: add missing includes [bnc#438670] -* Thu Oct 23 2008 mkoenig@suse.de -- swapon: add swap pagesize detection [bnc#433028] -- lscpu: fix return code [bnc#437367] -- mkfs.minix: fix device size detection [bnc#437980] -- lscpu: update to most recent version for hypervisor detection -* Thu Oct 02 2008 mkoenig@suse.de -- add lscpu tool from current util-linux-ng git, - needed for fate#303051 -- replace hypervisor detection tool with the solution blessed by - upstream, which adds hv detection as lscpu feature [fate#303051] -* Wed Sep 24 2008 mkoenig@suse.de -- add new tool /bin/hypervisor for x86, x86_64 - from Ky Srinivasan - to detect the presence of a hypervisor [fate#303051] -* Wed Sep 10 2008 mkoenig@suse.de -- update to version 2.14.1 - * fdisk: don't check for GPT when asked for disk size only - * losetup: remove unnecessary minor number check - * rtcwake: prefer RTC_WKALM_SET over RTC_ALM_SET - * scriptreplay: new implementation is out-of-sync - * selinux: is_selinux_enabled() returns 0, 1 and -1 - * umount: improve "-d" option for autoclear loops -- remove patch - util-linux-2.14-loop_autoclear.patch -* Wed Aug 20 2008 mkoenig@suse.de -- enable SELinux support [fate#303662] -* Mon Aug 18 2008 mrueckert@suse.de -- remove outdated options in the fillup_and_insserv call -* Mon Aug 18 2008 mkoenig@suse.de -- raw: fix init script tags -* Mon Jul 07 2008 mkoenig@suse.de -- update which to version 2.19 - * Upgraded code from bash to version 3.2. This DOES has influence - on how Which behaves under certain circumstances. - * When the environment variable HOME is not set, the home directory - is now read from /etc/passwd or set to '/' if no home directory - could be found (this now matches the tilde lib used in bash) - * Changed the license to GPLv3 - * Add support for shells that output '{' on the same line as the - function name in the output of 'declare -f' (ie zsh). -- fix build -* Wed Jul 02 2008 mkoenig@suse.de -- replace util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch - with upstream version - util-linux-2.14-loop_autoclear.patch -* Fri Jun 27 2008 schwab@suse.de -- Fix lib64 check. -* Wed Jun 25 2008 mkoenig@suse.de -- update to version 2.14 - most important changes: - * new command ldattach - mount: - * support auto-destruction of loop devices - losetup: - * new option -j - * supports unlimited number of loop devices - * new option --sizelimit to set data end - * option -s (short form of --show) now deprecated - mkswap: - * new option -U to set UUID explicitly - fdisk: - * calculate partition size in 2^N [bnc#381270] - hwclock: - * new option --adjfile to override default /etc/adjtime -- readd scriptreplay, implemented now in C -- add retry for mount if ENOMEDIUM is returned [bnc#390204] -- ignore ENXIO in del_loop, because they might have been - auto-destructed -- removed patches: - util-linux-2.13.1-canonicalize_loopfile_name.patch - util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch - util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch - util-linux-2.13.1-mount_getfs_fix.patch - util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch - util-linux-2.13-fdisk_cfdisk_ncursesw.patch - util-linux-mount_opt_nofail.patch - util-linux-ng-2.13-swapon-swsuspend.patch -* Thu Apr 03 2008 mkoenig@suse.de -- cfdisk: accept english answer [bnc#369043] -- use upstream getfs fix -* Wed Mar 26 2008 coolo@suse.de -- actually require the split out package -* Sun Mar 23 2008 coolo@suse.de -- splitting out 60%% of the size of the package: - creating lang subpackage -* Wed Feb 13 2008 bg@suse.de -- don't try to package parisc*.8 manual pages -* Mon Feb 11 2008 mkoenig@suse.de -- update to version 2.13.1 again -- fix broken util-linux-2.13.1-getfs_fix.patch -* Sun Feb 10 2008 lrupp@suse.de -- revert to 2.13.0.1+git20071121 - breaks current 'mount' call in Buildservice -* Thu Feb 07 2008 mkoenig@suse.de -- update to version 2.13.1: - mount: - * -L|-U segfault when label or uuid doesn't exist - * chain of symlinks to fstab causes use of pointer after free - * don't call canonicalize(SPEC) for cifs, smbfs and nfs - * improve error message when helper program not present - losetup: - * fix errno usage - mkswap: - * possible to crash with SELinux relabeling support - sfdisk: - * allow partitioning drives of over 2^31 sectors - hwclock: - * check for ENODEV -- mount: fix problem with device canonicalization when using - persistent name in fstab but call mount with real bd name -- patches merged: - util-linux-2.13-mount_fd_leak.patch -* Tue Dec 18 2007 mkoenig@suse.de -- add temporary workaround for broken RTC update interrupts - [#338419] -* Mon Dec 03 2007 ro@suse.de -- remove "arch", in coreutils now -* Thu Nov 29 2007 lnussel@suse.de -- update crypto patch - * fix mount buffer overflow when reading the passphrase (#332148) - * add loop_fish2 compatability code to losetup/mount again (#332095) - * change default hash size for 128bit keys to sha256 again -* Wed Nov 21 2007 mkoenig@suse.de -- update to git20071121: - add sector size check for mkfs.minix [#308256] - fix canonicalization for cifs [#338375] -- provide Short-Description for raw init script -- add rpmlintrc -* Tue Nov 20 2007 mkoenig@suse.de -- fix raw path in init script -* Tue Nov 06 2007 mkoenig@suse.de -- update to 2.13.0.1+git20071106 -- prevent loop mounting the same file twice [#240653] -- merged upstream: - util-linux-2.13-mount_helper_fix.patch - util-linux-2.13-hwclock_rtc_option.patch -* Thu Oct 04 2007 bg@suse.de -- don't use parisc, parisc32 and parisc64. -* Mon Oct 01 2007 mkoenig@suse.de -- update to version 2.13 - merged upstream: - util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch - util-linux-2.13-loop.patch - util-linux-2.13-mount_create_mtab.patch - util-linux-2.13-schedutils_error_handling.patch - util-linux-2.13-sys_utils_build_rdev_x86_64.patch -- fix hwclock --rtc option [#326106] -- fix setuid/setgid mixup and error checking [#327022] -* Fri Sep 14 2007 mkoenig@suse.de -- link cfdisk against libncursesw instead libncurses to fix - broken utf-8 characters [#307353] -* Wed Aug 29 2007 mkoenig@suse.de -- fix fd leaks in previous patch -* Tue Aug 28 2007 lnussel@suse.de -- add support for specifying the key length and password hash - algorithm [#304861] -* Fri Aug 24 2007 mkoenig@suse.de -- avoid duplicates of root fs if defined with LABEL in fstab - [#297959] -- fix ionice error handling [#301675] -* Thu Aug 16 2007 ssommer@suse.de -- free loop devices when mount fails [#297172] -* Wed Jul 25 2007 mkoenig@suse.de -- update to git20070725 -- removed patches (merged upstream): - util-linux-2.12r-mount_mount.8_xfs_update.patch - util-linux-2.12r-sys_utils_readprofile_mapfile.patch - util-linux-2.12r-disk_utils_mkswap_fix.patch - util-linux-2.13-schedutils_ionice_idle.patch -* Tue Jul 17 2007 mkoenig@suse.de -- updated to version 2.13-rc2: - * add wakertc -- cleanup ionice usage [#270251] -- enable hwclock audit support [#280113] -- removed patches (merged/fixed upstream) - util-linux-login_utils_wall.patch - util-linux-mount_mount.8-acl.patch - util-linux-2.12r-mount_mtab_update.patch - util-linux-2.13-schedutils_chrt.patch - util-linux-2.13-sys_utils_arch.patch - util-linux-2.12a-mount_mountpointwithcolon.patch - util-linux-2.12a-mount_procswapcheck.patch - util-linux-2.12q-mount_umount2_not_static.patch -* Fri Jul 13 2007 mkoenig@suse.de -- replace hotplug with nofail option and fix it to not use - syscall reserved values. -- removed patch - util-linux-2.11z-hwclock_geteuid.patch - it is intentional that suid hwclock capabilities are limited -- removed patch (fixed upstream) - util-linux-2.12q-mount_--move.patch -* Mon Jul 09 2007 mkoenig@suse.de -- add libuuid-devel to BuildRequires to let mkswap use UUIDs -* Thu Jul 05 2007 mkoenig@suse.de -- use %%config(noreplace) for /etc/filesystems -- Keep rdev stuff for x86_64 - util-linux-2.13-sys_utils_build_rdev_x86_64.patch -- removed patches (merged upstream) - util-linux-2.12r-misc_utils_cal_formatting.patch - util-linux-2.12q-sys_utils_ionice.patch -* Thu Jul 05 2007 mkoenig@suse.de -- update to 2.13-rc1: - * mount fixes - * agetty: add 'O' escape code to display domain name - * blockdev: add BLKFRAGET/BLKFRASET ioctls - * fdisk: many significant improvements and fixes to Sun label handling - * update po files -- removed patches (merged upstream): - util-linux-2.11q-fdisk_fs_mac.patch - util-linux-2.12r-fdisk_fdiskwrap.patch - util-linux-2.12r-mount_racy_loop.patch - util-linux-2.13-misc_utils_cal_ncurses.patch - util-linux-2.13-mount_volumeid_label.patch -- use %%find_lang -* Thu Jun 21 2007 mkoenig@suse.de -- use encoded label names with volume_id [#232929] - util-linux-2.13-mount_volumeid_label.patch -* Thu Jun 14 2007 mkoenig@suse.de -- mkzimage_cmdline: activate commandline if used with -s [#279935] -* Wed Jun 13 2007 mkoenig@suse.de -- schedutils: let chrt accept pid 0 for current process and - fix some documentation bugs [#266879] - util-linux-2.13-schedutils_chrt.patch -* Wed Jun 06 2007 mkoenig@suse.de -- update to git20070530 -- removed patches - util-linux-2.13-mount_volume_id.patch - util-linux-2.12r-mount_by_uuid.patch - util-linux-2.13-build_gnu_source.patch -- fix build with ncurses -* Tue Jun 05 2007 mkoenig@suse.de -- update to git20070509 - mount: NFS code removed (use mount.nfs{,4} from nfs-utils) -- remove sm-notify (nfs-utils) -- removed patches - util-linux-2.11u-mount_nfs_mount_acl.patch - util-linux-2.12-mount_base_nfsv4.patch - util-linux-2.12-mount_mountfallback.patch - util-linux-2.12-mount_nfs_tcp.patch - util-linux-2.12q-mount_strict_aliasing.patch - util-linux-2.12r-mount_nfs_remount_options.patch - util-linux-2.12r-mount_rpcsec_gss.patch - util-linux-2.12r-mount_sec_manpage.patch - util-linux-2.12r-mount_umount_nosysfs.patch - util-linux-2.13-mount_nfs_timeo.patch - util-linux-mount_nfs.8.patch - util-linux-mount_warn_nfsudp.patch -* Tue Jun 05 2007 pth@suse.de -- Update to which-2.16, mainly because regenerating configure - with newer autotools works. -- Fix the patch for AC_CHECK_STATICLIB -- Our distribution doesn't install libiberty.a, so pass - --disable-iberty to configure of which to not use a libiberty from - somewhere else. -* Mon Jun 04 2007 pth@suse.de -- Make configure of which search for static libs in lib64 subdirs. -* Mon Apr 23 2007 mkoenig@suse.de -- update to git20070412 -- remove chkdupexe and scriptreplay to get rid of the - perl dependency [#265757] - util-linux-2.13-build_no_perl_dependency.patch -- upstream integration of umount helper support [#252089] -- merged patches: - util-linux-2.13-misc_utils_add_man_scriptreplay.patch - util-linux-2.13-tests_missing_include.patch -* Mon Apr 16 2007 mkoenig@suse.de -- fix initialization of offset in - util-linux-2.12r-mount_racy_loop.patch [#264225] -* Tue Apr 10 2007 mkoenig@suse.de -- update to version git20070330 of new forked development tree -- removed Suse crypto patches for losetup [FATE#302001] -- removed binaries: - /bin/guessfstype - /sbin/sln - /usr/bin/setfdprm -- removed obsolete patches: - * guessfstype2.patch - * loop-AES-v3.0a-util-linux-2.12p.diff - * mount-nfs-nonreserved - * stupid-programmer.diff - * util-linux-nodiratime.diff - * util-linux-2.12-multipleraw.diff - * util-linux-2.12-enablereplaybuild.diff - * util-linux-2.12-mount_guessfstype.diff - * util-linux-2.12h-mtablock.diff - * util-linux-2.12i-x86_64intel.diff - * util-linux-2.12q-null.diff - * util-linux-2.12r.diff - * util-linux-2.12r-fdisk_llseek.patch - * util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff - * util-linux-2.12r-mount_external_prog_on_guess.patch - * util-linux-2.12r-nonfsmountfallback.diff - * util-linux-2.12r-pagesize.patch - * util-linux-2.12r-partx_enable.patch - * util-linux-2.12r-partx_gpt_warning.patch -- add patches: - * util-linux-2.13-misc_utils_add_man_scriptreplay.patch - install man page for scriptreplay - * util-linux-2.13-tests_missing_include.patch - fix missing header in tests/mnt_test_sysinfo.c - * util-linux-2.13-sys_utils_arch.patch - keep /bin/arch - * util-linux-2.13-build_gnu_source.patch - build with _GNU_SOURCE - * util-linux-2.13-build_fix_intel_check.patch - detect also x86_64 as INTEL architecture -- rename patches to identify them clearly by subsystem -- schedutils now part of util-linux itself -* Wed Apr 04 2007 mkoenig@suse.de -- add Supplements line [FATE#301966] -* Mon Mar 26 2007 rguenther@suse.de -- add ncurses-devel and zlib-devel BuildRequires -* Thu Mar 15 2007 mkoenig@suse.de -- mount: Let swapon automatically reinitialize a suspended - swap partition [#254437] -* Fri Mar 09 2007 mkoenig@suse.de -- mount: fix mtablock patch to avoid mtab corruption [#226783] -* Thu Mar 08 2007 mkoenig@suse.de -- partx: fix warning for too long literal -* Wed Mar 07 2007 rguenther@suse.de -- fix changelog entry order -* Tue Feb 27 2007 mkoenig@suse.de -- fix missing return code in - util-linux-2.12r-losetup_password.patch -- mount: fix race condition in mount -o loop [#242750] -* Mon Feb 12 2007 mkoenig@suse.de -- remove legacy warnings from fdisk [#241372] -* Fri Feb 02 2007 mkoenig@suse.de -- do not use O_EXCL for mkfs.cramfs [#241466] -* Wed Jan 31 2007 mkoenig@suse.de -- let mkfs tools open with O_EXCL [#238687] -* Tue Dec 12 2006 mkoenig@suse.de -- provide different return codes for losetup with encryption - for empty and too short passwords. [#197493] -* Tue Dec 05 2006 mkoenig@suse.de -- default swap to V1 in any case [#205956] - patch: util-linux-2.12r-mkswap_fix.patch -- do not append addr option with each nfs remount [#130625] - patch: util-linux-2.12r-nfs_remount_options.patch -- add README.largedisk about fdisk partition size constraints - [#153657] -* Tue Nov 07 2006 mkoenig@suse.de -- enable partx [#214992] -* Tue Oct 10 2006 mkoenig@suse.de -- Round up partition end LBA to a cylinder boundary during - add_partition() [#174892] -- Fix readprofile on ppc64 [#179122] -- Fix cal formatting bug [#203469] -* Mon Oct 09 2006 mkoenig@suse.de -- Fix llseek issues. -- swapon.c: Do not use PAGE_SIZE macro. -* Mon Aug 21 2006 mkoenig@suse.de -- Added sysfs to list of filesystems not to unmount with - umount -a, resolves #190385 -* Mon Jun 12 2006 kay.sievers@suse.de -- use libvolume_id from provided as a rpm by udev 094 -* Wed May 17 2006 jeffm@suse.com -- Fixed support for calling external programs w/o -t , - it would add mtab twice [#176582] -* Mon Apr 24 2006 hvogel@suse.de -- document xfs dmapi mount options better [#158955] -* Fri Apr 21 2006 olh@suse.de -- add mkzimage_cmdline to edit CHRP zImage kernel cmdline (168313) -* Tue Apr 18 2006 hvogel@suse.de -- fix number of supported raw devices [#165570] -* Wed Mar 29 2006 olh@suse.de -- clearify comments about mac disk label handling in fdisk -* Tue Mar 28 2006 hvogel@suse.de -- more fixes for the fdiskwrap patch [#160822] -* Tue Mar 21 2006 okir@suse.de -- Update nfs(5) manpage to document security flavors [#159368] -* Mon Mar 20 2006 hvogel@suse.de -- fix numbers of supported raw devices to match the kernel - [#158203] -- make NFSv3 client support RPCSEC_GSS [#158401] -- fix that if the user doesn't specify -t - mount.fstype will never be called. [#155147] -* Fri Mar 10 2006 hvogel@suse.de -- Fix init.d/raw script to parse device names with , in them - correctly [#155653] -* Thu Mar 09 2006 hare@suse.de -- Fix potential security hole in libvolume_id (#133256) -* Mon Mar 06 2006 hvogel@suse.de -- patch fdiskmaclabel.h too -* Thu Mar 02 2006 hvogel@suse.de -- axboe made fdisk not wrap at 2TB [#153657] -* Fri Feb 17 2006 lmuelle@suse.de -- Use cifs instead of smbfs if the source starts with // and we do not set a - different fs type. -* Sun Feb 12 2006 olh@suse.de -- cosmetic fix for option_hotplug declaration - fix unininitalized string for unknown filesystems (#148855) -* Fri Feb 10 2006 hvogel@suse.de -- mount should not put / in the mtab twice if mount -f / is called - [#148409] -- fix hostid printf [#149163] -* Wed Feb 01 2006 olh@suse.de -- dont invent our own MS_FLAGS (#147132) -* Wed Feb 01 2006 ro@suse.de -- fix typo in previous change, binary negation is "~" -* Fri Jan 27 2006 sscheler@suse.de -- fixed mount hotplug option (#143352). now we don't send the - MS_HOTPLUG flag to the kernel any longer, because the kernel - doesn't know this option (EINVAL) and actually doesn't need to - know about it. -* Fri Jan 27 2006 olh@suse.de -- remove clock symlink, hwclock exists since 7 years -* Fri Jan 27 2006 olh@suse.de -- lsprop and nvsetenv moved to powerpc-utils [#144758] -* Thu Jan 26 2006 hvogel@suse.de -- Make nfsboot world readable [#145418] -* Wed Jan 25 2006 mls@suse.de -- converted neededforbuild to BuildRequires -* Tue Jan 24 2006 mmj@suse.de -- Remove faulty nfs fallback code [#139019] -* Mon Jan 16 2006 mmj@suse.de -- Add patch for nsetenv to fix short reads/short writes [#142546] -* Wed Jan 11 2006 mmj@suse.de -- Update sm-notify [#141542] -* Wed Jan 04 2006 mmj@suse.de -- Update to 2.12r including since 2.12q: - o cfdisk: fix a segfault with ReiserFS partitions - o umount: disallow -r option for non-root users -* Tue Nov 22 2005 mmj@suse.de -- install proper renice manpage [#132470] -* Tue Nov 15 2005 uli@suse.de -- umount2 is not static (only fails on ARM, surprisingly) -- added ARM ionice syscalls -* Fri Nov 11 2005 hare@suse.de -- Fix reverse-mapping of by-UUID and by-LABEL mounts. -* Thu Nov 10 2005 hare@suse.de -- Fix a mishandling of by-UUID mounts. -- Use libvolume_id from udev. -* Sat Oct 22 2005 mmj@suse.de -- Increase lsprop.c max property size to 4k [#128155] -* Mon Oct 10 2005 mmj@suse.de -- Add -fno-strict-aliasing to nfsmount_xdr.c -* Mon Oct 03 2005 mmj@suse.de -- Teach the mount manual page about nodiratime [#118987] -* Thu Sep 29 2005 mmj@suse.de -- Patch from jakub007@go2.pl to make mount --move update - /etc/mtab correctly [#115129] -* Tue Sep 13 2005 mmj@suse.de -- Only allow root to pass -r to umount [#116741] -* Mon Sep 05 2005 mmj@suse.de -- MAC -> Mac [#104081] -* Fri Sep 02 2005 mmj@suse.de -- Don't package manual executable [#114849] -* Thu Sep 01 2005 mmj@suse.de -- Add patch for device-mapper mount by label support [#75966] -* Thu Sep 01 2005 ro@suse.de -- provide and obsolete schedutils -* Tue Aug 23 2005 hvogel@suse.de -- update ionice patch by axboe so that ionice will complain about - missing sys_ioprio_set support, but it will still - execute the process. -* Mon Aug 22 2005 hvogel@suse.de -- Fix rpm verify output [#105807] - (ghost entry for /var/lib/nfs/state) -* Mon Aug 22 2005 schwab@suse.de -- Fix stupid buffer overflow bug in cfdisk [#66020]. -* Wed Aug 17 2005 hare@suse.de -- Add option 'hotplug' to mount (#104405) -* Mon Aug 15 2005 schwab@suse.de -- Always build with RPM_OPT_FLAGS. -* Thu Aug 11 2005 mmj@suse.de -- Patch from Patrick Kirsch to make fdisk detect MAC-fs [#104081] -* Wed Aug 03 2005 mmj@suse.de -- Merge schedutils to here (it's happened upstream already) -* Tue Aug 02 2005 mmj@suse.de -- Support for s390 and s390x -* Mon Aug 01 2005 mmj@suse.de -- It's not __ppc_ and __ppc64__ but __powerpc__ and __powerpc64__ -* Mon Aug 01 2005 mmj@suse.de -- Add ionice binary from Jens Axboe -* Wed Jun 29 2005 mmj@suse.de -- Document load and clearly issues about NFS over UDP [#80263] -- Don't compile with -fsigned-char [#93886] -* Tue May 31 2005 okir@suse.de -- Added NFSv4 support -* Mon May 09 2005 hvogel@suse.de -- move hashalot and cryptsetup tools to util-linux-crypto -* Tue Apr 12 2005 mmj@suse.de -- bump TCP timeo to 600 [#76198] -* Tue Mar 29 2005 mmj@suse.de -- Add awareness of twofishSL92 [#74359] -- Update hashalot to version 0.3 -* Mon Mar 14 2005 okir@suse.de -- Changed sm-notify to recognize host names as well as addresses. -* Thu Mar 10 2005 mmj@suse.de -- Don't strip anything explicitly -- Don't compile with -fno-strict-aliasing [#66020] -* Fri Feb 04 2005 schwab@suse.de -- Fix stupid programmer. -* Mon Jan 24 2005 meissner@suse.de -- implicit strcmp / strerror in setctsid fixed. -- 0 -> NULL in an execl -* Fri Jan 21 2005 mmj@suse.de -- Sleep after inserting the raw module to make sure it's ready [#49807] -- Update to 2.12q including since 2.12p: - o New upstream maintainer - Adrian Bunk - o sfdisk: add -G option - o Updated translations -* Tue Jan 18 2005 okir@suse.de -- Updated sm-notify; try not to stall bootup my moving the NSM - state update after we've backgrounded (#49072). -* Mon Jan 10 2005 mmj@suse.de -- Update adjtimex to 1.20 -- Update to util-linux-2.12p including since 2.12i: - o cfdisk: fix number of new partition when partitions not in disk order - o fdisk: fix Sun label handling in sector mode - o mkfs: never truncate filename (not that that ever happened) - o more: fix redraw flaw - o lomount: revert patch from 2.12j - o lptune.8: -T option is obsolete - o mkswap, mkswap.8, swapon: support labels - o umount: allow user unmounting repeatedly mounted nfs mounts - o cfdisk: recognize JFS, support reiserfs labels - o mount: fix option parsing bug - o mount.8: several updates - o swapon.8: document -v option - o Makefile: remove cat-id-tbl.c upon make clean - o fdisk: fixed a bug that would cause a non-update of a sun disklabel - o fdisk: use sectorsize instead of 512 for SGI - o hwclock: actually use HAVE_tm_gmtoff - o swapon: fix priority handling - o umount: refuse to unmount an empty string - o configure, MCONFIG: detect gcc 3.4.0 and use -mtune option - o configure: do not run ./conftest (for cross compilation) - o fsck.cramfs: try to get correct PAGE_CACHE_SIZE - o losetup: try to give better error messages - o readprofile: default map file is /boot/System.map - o rdev.8: added historical info on ramdisk - o cal: highlight today - o lomount: stop reading passwd at NUL, fix lo_encrypt key_size - o losetup: add -f option to find an unused loop device - o more: code cleanup - o mount: add "group" mount option - o sfdisk: fix 2.6.8 BLKRRPART ioctl damage - o swapon: let swapon -a skip the swapfiles marked "noauto" - o umount: fix problem with empty mtab - o umount: use special umount program if it exists - o new flock binary - o New messages -* Tue Nov 30 2004 mmj@suse.de -- Install ramsize, rdev, rootflags and vidmode on x86-64 [#48633] -* Fri Nov 12 2004 schwab@suse.de -- Don't install *fdisk on ia64. -* Fri Nov 12 2004 ro@suse.de -- correct permissions handling for wall and write -* Tue Nov 09 2004 mmj@suse.de -- Fix segfault with mount -l [#48029] -* Fri Nov 05 2004 mmj@suse.de -- Update to util-linux-2.12i including: - o MCONFIG: fix build conditions - o chfn, chsh: add error checking - o cytune: use local header cyclades.h - o fdisk: fix default SGI volume header size - o fstab.c: use strsignal() instead of sys_siglist[] - o hwclock: use when available on i386 - o hwclock: dont try KDGHWCLK on archs other than __m68k__ - o sfdisk: correct typo in __attribute__used nonsense - o sfdisk: use PACKED on __arm__ - o sfdisk: fix warning printout -* Thu Nov 04 2004 mmj@suse.de -- Update to util-linux-2.12h including: - o cfdisk: avoid crash if no partition table - o elvtune: tell user that this only works on 2.4 kernels - o lomount: clear passwords after use - o mount: accept comments (specified by comment=) in fstab - o mount: support ocfs, ocfs2 - o [u]mount: be more careful with malloc, try to avoid OOM with - many mounts - o sfdisk: __attribute__used nonsense to support gcc 3.4 - o shutdown: do not unmount various virtual filesystems - o mount.8: added recent ext2 mount options - o mount: support jfs mount-by-label, improve reiserfs support - o sfdisk: remove strange "ends in a digit" heuristic - o *fdisk: use common disksize() routine -* Tue Oct 19 2004 mmj@suse.de -- Add patch from SGI for fdisk label [#47368] -* Tue Sep 28 2004 mmj@suse.de -- And another one [#46201] -* Wed Sep 15 2004 mmj@suse.de -- Add patch from Andries to fix cfdisk [#44996] -* Tue Sep 07 2004 mmj@suse.de -- Update to util-linux-2.12c including: - o mount.8: added recent ext2 mount options - o mount: support jfs mount-by-label, improve reiserfs support - o sfdisk: remove strange "ends in a digit" heuristic - o *fdisk: use common disksize() routine [#44678] -* Wed Aug 25 2004 mmj@suse.de -- Update to util-linux-2.12b including: - o chsh: improved error message - o dmesg: ask kernel proper buffer size - o losetup: handle 64-bit offsets - o blockdev: also report BLKGETSIZE64 result [#43464] - o blockdev, elvtune, fdisk: handle new kernel _IOR,_IOW defines - o fdisk: remove strange "ends in a digit" heuristic - o fdisk: also list Solaris as possible type for 0x82 - o mount: added --rbind option - o mount: use blkid library - o mount: support reiserfs mount by label - o mount: attempt to use the right definition of dev_t in struct - loopinfo - o mount.8: jfs mount options added - o readprofile: new -s option - o rename.1: added ref to mmv.1 - o replay: renamed to scriptreplay; correct typos - o script: do not use locale for time delay floating point number - format - o sfdisk: error messages to stderr - o New Catalan, Dutch, Finnish, French, German, Spanish, Swedish, - Turkish, Ukrainian messages -- Update the loop-AES patch, thanks to Sumit Bose -- Change the minimum password length to 8 chars -* Tue Aug 24 2004 mmj@suse.de -- Fix signed/unsigned bug in lsprop [#44048] -* Wed Aug 18 2004 mmj@suse.de -- Readd patch that got lost to make fdisk -l work better with - RAID controllers [#43485] -* Mon Aug 09 2004 mmj@suse.de -- Add an improved version of the dmesg bufsize patch. -* Tue Jun 22 2004 mmj@suse.de -- Add patch to try and guess a filesystem type before blindly - assuming it's nfs because of the colon [#42097] -* Mon Jun 14 2004 agruen@suse.de -- Formatting error in mount.8 manual page. -* Wed Jun 09 2004 mmj@suse.de -- Add patch from Olaf Kirch to make protocol selection for mount - independent of protocol selection for NFS, and picks what is - available (preferring TCP over UDP) [#41735] -* Wed Jun 09 2004 mls@suse.de -- add '-f' option to setctsid -* Thu May 27 2004 okir@suse.de -- sm-notify now binds to a reserved port -* Sat May 15 2004 mmj@suse.de -- Add documentation about raw device handling [#39037] -* Mon May 10 2004 mmj@suse.de -- Make dmesg dump entire buffer. Patch from Andries/odabrunz [#39761] -* Thu May 06 2004 mmj@suse.de -- Also check if the device is the same when doing swapon. Could be - the same block device with 2 different names [#39436] -* Wed May 05 2004 mmj@suse.de -- Do a /sbin/modprobe raw when invoking raw devices [#39037] -* Tue Apr 20 2004 mmj@suse.de -- Update to 2.12a including: - o fdisk: fix for kernels 2.4.15-2.4.17 - o fdisk: fix when all partitions are in use - o hwclock: add a timeout when waiting for a clock update - o ipcs: compilation fix - o ipcs: shminfo.shmall gives pages - o mount: efs support - o partx: bigendian fix - o readprofile: support for 64-bit addresses - o setterm: fix klogctl error message - o setterm.1: clarification - o sfdisk: fix check for is_ide_cdrom_or_tape - o umount: skip proc, devfs, devpts on umount -a -* Mon Apr 19 2004 mmj@suse.de -- Add patch for unlimited raw devices [#39037] -* Thu Apr 15 2004 mmj@suse.de -- Make sm-notify be more quiet when nothing wrong, and log to sys- - log when something is. -* Tue Apr 06 2004 mmj@suse.de -- Don't use startproc for sm-notify [#38481] -* Mon Apr 05 2004 mmj@suse.de -- Removing elvtune alltogether was a bit drastic, since it of - course works fine with 2.4 kernels. So print a warning in case - the BLKELVGET ioctl returns something indicating 2.6 kernels. -* Thu Apr 01 2004 mmj@suse.de -- Don't package elvtune anymore since it's obsolete now that io - scheduler can be tuned in /sys/block/hdX/queue/iosched/* [#37869] -* Wed Mar 31 2004 mmj@suse.de -- Apply util-linux-2.12a fixes for hwclock and readprofile. The - hwclock bit is a timout fix which hopefully fixes [#35877] -- Move sm-notify to here from nfs-utils [#36737] -* Mon Mar 29 2004 mmj@suse.de -- Adjust warnings about Crypto-API -* Sun Mar 28 2004 mmj@suse.de -- Add patch to make script allways use the same LC_NUMERIC [#35476] -* Fri Mar 26 2004 od@suse.de -- Add setctsid by Werner Fink [#37177] -* Fri Mar 26 2004 mmj@suse.de -- Mount option "code" is now "codepage" so update /etc/fstab in - postinstall [#36950] -* Fri Mar 26 2004 mmj@suse.de -- Remove false statement in nfs.5 about the linux kernel not - supporting nfs over tcp [#37060] -* Wed Mar 17 2004 mmj@suse.de -- Use correct permissions for README.hashalot [#36303] -* Mon Mar 08 2004 mmj@suse.de -- Enable build of replay [#35434] -* Wed Feb 25 2004 mmj@suse.de -- Use loop-AES-v2.0f-util-linux-2.12.diff instead of losetup patch - added earlier. Thanks Sumit Bose! -* Thu Feb 19 2004 mmj@suse.de -- Add cryptsetup script from Christophe Saout, for usage with the - new dm-crypt. -* Mon Feb 16 2004 mmj@suse.de -- Add losetup patch and hashalot program from Ben Slusky -* Sun Feb 01 2004 kukuk@suse.de -- Remove newgrp again (will use POSIX conform version) -* Fri Jan 16 2004 kukuk@suse.de -- Add pam-devel to neededforbuild -* Mon Jan 12 2004 mmj@suse.de -- Adjust the nfs.5 manual page to reflect we're mounting nfs over - tcp pr. default. -- Collapse two similar patches 2 one. -* Fri Dec 19 2003 garloff@suse.de -- Fix by okir for previous patch. -* Fri Dec 19 2003 garloff@suse.de -- Add patch to fallback to UDP if TCP NFS mount fails. -* Tue Dec 02 2003 mmj@suse.de -- Make patch to guess if a CD is a CD-Extra [#30316] -- Adjust patch that moves ext2/3 in front of vfat -- Regenerate patches (filename still tells when they were added) -* Tue Nov 18 2003 mmj@suse.de -- Mount NFS over TCP pr. default [#33018] -* Thu Nov 13 2003 mmj@suse.de -- Update to util-linux-2.12 including: - o losetup: -p option specifies fd for passphrase - o fdisk: sgi layout fix - o mount: -p option specifies fd for passphrase - o mount: recognize some PCDOS floppies - o umount: in "umount name", first try to interpret "name" as a mount point - o translations updates for several languages - o cfdisk: localize the Y/N answer, improve printing localized messages - o cfdisk: make various variables long long - some disks are close to 2 TB - o cfdisk: use BLKGETSIZE64 - o fdisk: make various variables unsigned to lengthen the life of 32-bit vars - o fdisk: some sgi fixes - o fdisk: k=1000, K=1024 - o fdisk: removed last occurrences of HDIO_REQ - o fdisk: use BLKGETSIZE64 - o hwclock: fix rtc test - o login: set a timeout on printing the timeout message - o md5: x86_64 fix - o more: POSIX fixes - o mount: do not supply MS_MGC_VAL when there are conflicting flags - o mount: ncp and smb are called smbfs and ncpfs - global change - o mount: add support for xvm mount by label - o mount: correct hfs magic recognition - o mount: keep original umask - it influences the mount call - o raw.8: documented unbinding of raw devices - o readprofile: fixed off-by eight error - o script: add -c option - o sfdisk.8: added an example of partitioning with logical partitions - o sfdisk: only add a AA55 signature for DOS-type partition tables - o tailf: new -* Tue Oct 21 2003 mmj@suse.de -- Correct permissions -* Tue Oct 21 2003 ja@suse.cz -- added support for cryptoloop in 2.6.x kernels. -* Wed Oct 15 2003 mmj@suse.de -- Don't build as root -* Mon Oct 13 2003 kukuk@suse.de -- Enable newgrp -* Thu Oct 02 2003 kukuk@suse.de -- Fix compiling with kernel 2.6.0-test6 header files -* Tue Aug 12 2003 mmj@suse.de -- Update to pmac-utils-2.1 sources and only include nvsetenv -* Tue Aug 12 2003 mmj@suse.de -- Add mount_guessfstype support for PCDOS [#27814] -* Wed Jun 18 2003 ak@suse.de -- support noreserved option for NFS (#27428) -* Thu Jun 05 2003 mmj@suse.de -- Rearrange the specfile wrt. archs -* Tue May 13 2003 mmj@suse.de -- Use %%defattr -- Remove files we don't package -* Wed May 07 2003 mmj@suse.de -- Rearrange the do_guess_fstype() code to look for ext2/3 before - vfat [#26581] -* Thu Apr 24 2003 ro@suse.de -- fix install_info --delete call and move from preun to postun -* Mon Apr 14 2003 pthomas@suse.de -- Get rid of the syscall for adjtimex in selective cases and - just call the glibc wrapper. Fixes build on s390. -* Mon Apr 14 2003 pthomas@suse.de -- Use geteuid instead of getuid in hwclock to enable making - hwclock suid root. -* Mon Apr 07 2003 mmj@suse.de -- Only delete info entries when removing last version. -* Thu Mar 13 2003 mmj@suse.de -- Apply patch to make sfdisk not destroy BSD slices [#25093] -* Mon Mar 03 2003 mmj@suse.de -- Remove superflous umask(033); calls [#23292] -* Mon Mar 03 2003 ro@suse.de -- add missing info dir entries -* Tue Feb 18 2003 agruen@suse.de -- Add description of the effect of `mount -t nfs -o noacl' on - the use of the GETACL and SETACL remote procedure calls to - the nfs(5) manual page. -* Mon Feb 17 2003 mmj@suse.de -- It's called smbfs not smb [#23697] -* Thu Feb 13 2003 mmj@suse.de -- Readd patch for passphrase timeout that got lost [#23527] -* Fri Feb 07 2003 mmj@suse.de -- The install_info macros need PreReq: %%install_info_prereq -* Fri Feb 07 2003 ro@suse.de -- added install_info macros -* Tue Feb 04 2003 ro@suse.de -- don't package /bin/kill (part of coreutils now) -* Tue Feb 04 2003 meissner@suse.de -- Include tarball with pmac-utils manpages, so we do not need - sgmltool and all its dependents. -* Wed Jan 29 2003 mmj@suse.de -- Update to util-linux-2.11z including: - · Translation updates - · mount: fix LABEL= handling for user umount, don't abort on read - error with photocds and add dmask and fmask vfat mount options - · setterm: accept devfs name - · simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails - · umount: allow user umount after mount by label or uuid -* Wed Jan 22 2003 sf@suse.de -- removed last patch, added new (correct) patch -* Wed Jan 22 2003 sf@suse.de -- removed eliminate_doubles() from mkfs.cramfs.c - for x86_64, as it segfaults. - (makes the images slightly larger, about 10%%) -* Tue Jan 21 2003 mmj@suse.de -- Added description of ISO mount options to mount.8 [#22915] -* Mon Dec 02 2002 mmj@suse.de -- Update the ReiserFS patch from Chris Mason -* Fri Nov 29 2002 mmj@suse.de -- Fix missing #include -* Thu Nov 28 2002 mmj@suse.de -- Make readprofile also try to locate the System.map in - /boot/System.map-`uname -r` [#22168] -* Wed Nov 27 2002 mmj@suse.de -- Update to util-linux-2.11y including: - o Translation updates - o fdisk,cfdisk: cosmetic fixes - o mount,umount: fix LABEL= handling for non-root [#17322] - o more: kill external help file - o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC - fails (patch we had, now folded upstream) -* Wed Nov 20 2002 mmj@suse.de -- Update to util-linux-2.11x including: - o Translation updates for several languages - o cfdisk: correct error printout - o fdisk: allow addition of a new partition when logicals all used - but primary free - o hwclock: detect systime jumps backward during setting hwclock - o Merge of the cramfs bloksize patch - o mount: new --rbind flag, for recursive loopback mounts - o mount, umount: new -O option - o setpwnam.c: open temp pw file with O_EXCL - o simpleinit: fix for "spawn too fast" - o swapon: new -e option -* Tue Nov 19 2002 mmj@suse.de -- Fix multistring assignment in adjtimex -* Mon Nov 11 2002 ro@suse.de -- changed neededforbuild to -- changed neededforbuild to <> -* Thu Oct 31 2002 mmj@suse.de -- Add -b option to mkfs.cramfs (needed for biarch architectures) -* Thu Oct 31 2002 ro@suse.de -- hack time to build on alpha -* Tue Oct 22 2002 mmj@suse.de -- Add correction to the ReiserFS patch that fixes the case where it - was possible but unlikely to detect a logged copy of a super on a - dedicated logging device as the real thing. From Chris Mason. -* Tue Oct 22 2002 mmj@suse.de -- Update to util-linux-2.11w including: - o fdisk and cfdisk fixes - o more bigendian fix - o translation updates - o > 2GB swapspace - o mount umask, cramfs and ocfs stuff -* Tue Oct 08 2002 mmj@suse.de -- Only enable below patch on ix86 and x86_64 -* Mon Oct 07 2002 mmj@suse.de -- Make small bugfix to below patch -* Sat Oct 05 2002 mmj@suse.de -- Apply patch to enable > 2GB swap (redhat) [#20533] -* Wed Oct 02 2002 mmj@suse.de -- Add one-liner security fix to mount and umount. -* Mon Sep 23 2002 mmj@suse.de -- Readd fix for klogconsole that got lost [#19834] -* Fri Sep 13 2002 mmj@suse.de -- Added patch from Oracle to mount ocfs by label [#19262] -* Thu Sep 12 2002 mmj@suse.de -- more: Do not cast char * to int and back [#18896] -* Sat Aug 31 2002 olh@suse.de -- add mount_cramfs_be.diff to allow mount -oloop cramfsfile loopdir -* Mon Aug 26 2002 mmj@suse.de -- Make mode not 666 when writing /etc/mtab [#18342] -* Mon Aug 26 2002 meissner@suse.de -- quieten klogconsole if the console does not support TIOCLINUX [#12516] -* Thu Aug 22 2002 mmj@suse.de -- Added patch from Andreas Gruenbacher for nfs-access-acl [#18183] -* Wed Aug 21 2002 mmj@suse.de -- Fixed an mtab locking bug with patch from Olaf Kirch [#17637] -* Mon Aug 19 2002 mmj@suse.de -- Updated reiserfs patch from Chris Mason -- Added patch for mount.8, thanks Andreas Gruenbacher -* Thu Aug 15 2002 mmj@suse.de -- Correct PreReq: -* Mon Aug 05 2002 mmj@suse.de -- Update to 2.11u which includes: - o Danish, German, Spanish, Swedish and Turkish updates. - o configure: for fsck.cramfs, mkfs.cramfs: add test for libz - o text-utils/Makefile: pg fix - o agetty: use same test as login does to find utmp entry - o fdisk: fix for fdisk on empty disk - o mount updates -* Tue Jul 23 2002 schwab@suse.de -- Fix mkfs.cramfs for architectures with non-4k pages. -* Wed Jul 17 2002 mmj@suse.de -- Merged base into util-linux -* Mon Jul 15 2002 mmj@suse.de -- Added JFSv2 patch from Christoph Hellwig for volume label. Does - for JFS, what below patch does for ReiserFS. -* Sun Jul 14 2002 adrian@suse.de -- fix ul-2.10m-sgi-fdisk.diff patch to apply again -* Thu Jul 11 2002 mmj@suse.de -- Added patch from Chris Mason for volume label on reiserfs -* Wed Jul 10 2002 olh@suse.de -- add mkfs.cramfs and fsck.cramfs to file list -* Wed Jul 10 2002 mmj@suse.de -- Fixed nfs.5 to tell nfsver defaults to 3 [#16815] -* Mon Jul 08 2002 mmj@suse.de -- Update to 2.11t which includes - * fdformat: remove test on major - * fdisk, hwclock and swap polishing - * Lots of translations - * cramfs tools includes from the kernel - * swap{on,off} honours /proc/swaps - * mount small fixups -* Fri Jul 05 2002 kukuk@suse.de -- Use %%ix86 macro -* Mon Jul 01 2002 bk@suse.de -- get raw built on s390 and s390x -- remove %%ifarchs s390 s390x for fdisk(needed for SCSI disks) -* Mon Jun 17 2002 mmj@suse.de -- Added a fix for simpleinit exploit. -* Thu Jun 13 2002 olh@suse.de -- disable hwclock ppc patch, maybe obsolete with recent kernels -* Thu May 16 2002 mmj@suse.de -- Added manpage guessfstype(8) -* Thu May 09 2002 mmj@suse.de -- Updated to util-linux-2.11r, including translations, x86-64 sup- - port and small bugfixes. -* Sat Apr 13 2002 mmj@suse.de -- Updated to util-linux-2.11q, includes bugfixes. -- util-linux-mkswap.patch for ia64 was folded into mainline -* Fri Apr 12 2002 stepan@suse.de -- added x86-64 support. -* Thu Apr 04 2002 ihno@suse.de -- corrected printf to report shared memories sizes bigger than - 2 GByte correct (Bug #15585). It was reportet on s390x, but - should effect other 64-Bit systems as well. -* Tue Mar 19 2002 mmj@suse.de -- Updated to 2.11o. The hexdump patch have been dropped since it - was folded to mainline util-linux. -* Fri Mar 15 2002 schwab@suse.de -- Fix mkswap for ia64. -* Mon Mar 04 2002 draht@suse.de -- permissions fixes for write(1) and wall(1) -* Fri Feb 01 2002 mmj@suse.de -- Moved /usr/bin/logger to /bin/logger (needed by sysconfig) -* Mon Jan 28 2002 mmj@suse.de -- Added the guessfstype binary from msvec/fehr -* Thu Jan 24 2002 ro@suse.de -- modified fillup_and_insserv call (perl-hack not needed here) -* Mon Jan 21 2002 mmj@suse.de -- Merge NetBSD hexdump changes, fixes bugzilla #12801 -* Thu Jan 10 2002 ro@suse.de -- removed ACTIVATE_RAW_DEV -* Mon Dec 31 2001 adrian@suse.de -- add patch for mips to create SGI partition tables with fdisk -* Tue Dec 18 2001 bjacke@suse.de -- add adjtimex -* Mon Dec 10 2001 mmj@suse.de -- Update to util-linux-2.11n -* Tue Nov 20 2001 mmj@suse.de -- Added a patch to 'wall' to remove unwanted newline (#12181) -* Wed Nov 07 2001 kukuk@suse.de -- Remove unneeded SPARC patch for hwclock -* Sat Oct 13 2001 kukuk@suse.de -- Update to util-linux 2.11l -* Wed Sep 12 2001 garloff@suse.de -- Fixed some dutch translations. (bug #10276) -* Mon Sep 10 2001 olh@suse.de -- marry fdisk and AIX label again... - add lsprop for ppc - dumps the device tree in a human readable format -* Mon Sep 03 2001 kukuk@suse.de -- Update to version 2.11i: - - blockdev: corrected ioctl numbers - - cal: fixed for multibyte locales - - line: new - - mount: added vxfs magic -* Sat Sep 01 2001 kukuk@suse.de -- Let mount follow symlinks again -* Wed Aug 29 2001 kukuk@suse.de -- Add new option to losetup manual page -* Tue Aug 28 2001 draht@suse.de -- added timeout support for losetup (-t ) -* Mon Aug 27 2001 kukuk@suse.de -- Add raw rc scripts, too -* Sun Aug 26 2001 bjacke@suse.de -- added raw binary and put rawio into obsoletes and provides -* Sat Aug 25 2001 kukuk@suse.de -- Fix path in getopt.1 manual page to example directory [Bug #9831] -* Fri Aug 24 2001 kukuk@suse.de -- Small fix for hwclock on newer SPARCs -* Mon Aug 13 2001 ro@suse.de -- changed neededforbuild to -* Mon Jul 30 2001 kukuk@suse.de -- Update to util-linux-2.11h -- Add nologin program -* Tue Jul 10 2001 kukuk@suse.de -- Remove swapdev from filelist -* Tue Jul 10 2001 kukuk@suse.de -- Update to util-linux-2.11g -* Wed Jun 06 2001 bk@suse.de -- added s390x to all ifnarch s390 -* Fri Apr 20 2001 kukuk@suse.de -- Fix wall bug (character 80, 160, 240, are missing) [Bug #6962] -* Mon Mar 26 2001 kukuk@suse.de -- Add exception for broken i2o disk device numbering scheme, kernel - hacker are not able to fix this and make it right [Bug #5881]. -* Sat Mar 24 2001 kukuk@suse.de -- Update to util-linux 2.11b -* Thu Mar 15 2001 kukuk@suse.de -- Fix changing of partitions with ID 0 on SPARC -- Remove duplicate mount patch -* Wed Mar 14 2001 schwab@suse.de -- Don't use _syscallX on ia64. -- Fix missing includes. -* Wed Mar 14 2001 kukuk@suse.de -- Update to version 2.11a -* Fri Mar 02 2001 kukuk@suse.de -- enable write again -* Mon Feb 12 2001 kukuk@suse.de -- cmos.c: Use sys/io.h, fix PowerPC hack -* Tue Feb 06 2001 ro@suse.de -- wall.c: include time.h -* Mon Feb 05 2001 kukuk@suse.de -- Split hex to extra package -- Update to util-linux-2.10s -* Fri Feb 02 2001 werner@suse.de -- Make swapon/swapoff more handy: - * Ignore swap files on ro mounted file systems - * If -a is given ignore already active devices at swapon - * If -a is given ignore not active devices at swapoff -* Thu Jan 25 2001 ro@suse.de -- added Provides: util -* Fri Jan 12 2001 garloff@suse.de -- Apply patch to lomount to allow all kerneli crypt algos to be - passed and allow to pass passwd with -k. -- losetup seems to support >2GB files just fine (#5433) -* Tue Jan 02 2001 kukuk@suse.de -- Save permissions of /etc/mtab [Bug #5027] -* Tue Dec 05 2000 kukuk@suse.de -- Search first in /etc/filesystems, then in /proc/filesystems -* Tue Dec 05 2000 kukuk@suse.de -- Use AIX/fdisk patch from util-linux-2.10r -- Backport "guess filesystems" from util-linux-2.10r -* Tue Dec 05 2000 schwab@suse.de -- Don't use _syscallX on ia64. -* Mon Dec 04 2000 olh@suse.de -- fix diff again -* Sun Dec 03 2000 olh@suse.de -- no segfaults with AIX disklabels -* Wed Nov 29 2000 uli@suse.de -- fixed to build on PPC -* Mon Nov 27 2000 schwab@suse.de -- Fix broken casts in hwclock. -* Thu Nov 23 2000 bk@suse.de -- temporary disable pivot_root on s390(2.4 kernel is not yet built) -* Wed Nov 22 2000 schwab@suse.de -- Add pivot_root to file list. -* Mon Nov 20 2000 kukuk@suse.de -- Fix pmac-utils to compile with new kernel -* Fri Nov 17 2000 kukuk@suse.de -- Fix hwclock to compile on PPC -* Wed Nov 15 2000 kukuk@suse.de -- Update util-linux to 2.10q, merge flushb.diff -* Thu Nov 02 2000 kukuk@suse.de -- Remove some of the last specfile changes -* Wed Nov 01 2000 olh@suse.de -- update pmac-utils for new powermacs, cleanup specfile -* Fri Oct 20 2000 kukuk@suse.de -- Update util-linux to 2.10p -- Rename package from util to util-linux -* Wed Sep 27 2000 kukuk@suse.de -- Allow NFS v3 with 2.2.17.SuSE -* Tue Sep 26 2000 kukuk@suse.de -- Fix mount for new NFS kernel patch -* Sat Sep 09 2000 kukuk@suse.de -- Remove tcsh dependency -- Update to util-linux 2.10o, use of /etc/filesystems is still broken -* Fri Aug 25 2000 pthomas@suse.de -- use %%{_mandir} and %%{_infodir} exclusively. This allows building - from source rpm on platforms other than 7.0. -* Wed Jul 19 2000 bk@suse.de -- s390: removed dasdfmt and silo, %%ifnarch s390 for some non-s390 things. -* Tue May 30 2000 bk@suse.de -- added dasdfmt and silo on s390 -* Mon May 15 2000 kukuk@suse.de -- util-linux: Update to 2.10m -* Wed Apr 26 2000 kukuk@suse.de -- flusb: Don't use kernel headers, even if we don't need them! -* Wed Apr 19 2000 kukuk@suse.de -- util-linux: Update to 2.10l -* Mon Apr 17 2000 kukuk@suse.de -- util-linux: Update to 2.10k -* Thu Apr 13 2000 kukuk@suse.de -- Move /sbin/setserial to /bin/setserial, add compat link to - /sbin. This fixes [Bug 1084] and is necessary for FHS 2.1 -* Wed Apr 12 2000 kukuk@suse.de -- Fix util-linux for Alpha -* Wed Apr 12 2000 kukuk@suse.de -- util-linux: Update to 2.10j -* Sun Apr 02 2000 bk@suse.de -- suse s390 team added support for s390 -* Thu Mar 30 2000 uli@suse.de -- hwclock/PPC: added support for MK48T559 RTC chip used in MTX+ boards -* Fri Mar 24 2000 kukuk@suse.de -- Add Linux LVM partition tag to fdisk -- Fix a lot of more possible buffer overruns -- Fix some fdisk sunlabel bugs -- added BuildRoot fixes from nadvorni@suse.cz -* Wed Mar 22 2000 kukuk@suse.de -- Update util-linux to 2.10h -- Add clock again for non PPC platforms -* Fri Mar 17 2000 uli@suse.de -- now contains both hwclock and clock on PPC (/sbin/init.d/boot - chooses what to run at runtime) -* Tue Mar 14 2000 schwab@suse.de -- Add support for ia64. -* Thu Mar 09 2000 kukuk@suse.de -- fdisk: Fix -l for Mylex RAID controller -* Tue Mar 07 2000 kukuk@suse.de -- etc/filesystems: Add minix and reiserfs -* Tue Mar 07 2000 kukuk@suse.de -- mount: fix endian problem with minix fs -* Tue Feb 15 2000 kukuk@suse.de -- mount: Add hack for PPC/syscall mount problem -* Sun Feb 13 2000 bk@suse.de -- let rdev continue in case it stubles over a bad file in /dev (/dev/snd fix) -* Fri Feb 04 2000 kukuk@suse.de -- Make PPC clock parameter compatible to hwclock -* Thu Feb 03 2000 kukuk@suse.de -- Fix filelist for SPARC -* Thu Feb 03 2000 kukuk@suse.de -- util-linux: Update to 2.10f (mount security fix) -* Sun Jan 23 2000 kukuk@suse.de -- util-linux: Update to 2.10e -* Tue Jan 18 2000 kukuk@suse.de -- mount now looks at first in /etc/filesystems and then in - /proc/filesystems -* Tue Jan 18 2000 ro@suse.de -- fixed pmac-utils to build with 2.3 as well -* Tue Jan 18 2000 kukuk@suse.de -- Fix a lot of fdisk buffer overruns [Bug 1642] -* Mon Jan 17 2000 kukuk@suse.de -- Fix setserial for Linux 2.3.40 -- Remove write, is now in nkitb -- Build minix and bfs tools for SPARC -- Fix some buffer overflows in fdisk -* Fri Dec 17 1999 kukuk@suse.de -- util-linux: Update to 2.10d -- hex: Update to 1.2 -- Move manual pages to /usr/share/man -* Tue Nov 30 1999 uli@suse.de -- re-added hwclock link for PPC (2nd try) -* Tue Nov 30 1999 uli@suse.de -- re-added hwclock link for PPC -* Mon Nov 15 1999 kukuk@suse.de -- util-linux: Update to 2.10b -* Sat Nov 13 1999 kukuk@suse.de -- setserial: Add Patch for Sparc -- Fix filelist for Sparc -* Wed Oct 27 1999 garloff@suse.de -- added flushb (moved here from ddrescue). -- fix bug in logger (remove trailing newlines). -* Fri Oct 22 1999 kukuk@suse.de -- util-linux: Remove old patches for mk_loop_h -* Sat Oct 16 1999 kukuk@suse.de -- util-linux: Update to 2.9z -* Fri Oct 08 1999 kukuk@suse.de -- Update to util-linux-2.9y (execpt fdisk) -* Tue Sep 14 1999 uli@suse.de -- added PMac-specific utils for PPC -* Mon Sep 13 1999 bs@suse.de -- ran old prepare_spec on spec file to switch to new prepare_spec. -* Thu Aug 26 1999 uli@suse.de -- disabled hayesesp for PPC -* Wed Aug 25 1999 kukuk@suse.de -- Don´t install tsort, its now in textutils 2.0 -* Tue Aug 24 1999 kukuk@suse.de -- Update to util-linux-2.9w (execpt fdisk) -* Mon Aug 09 1999 kukuk@suse.de -- Update to util-linux-2.9v (execpt fdisk) -* Tue Jul 20 1999 garloff@suse.de -- Added hex from Erich S. Raymond -* Mon Jul 12 1999 kukuk@suse.de -- Add fdisk patch from Klaus G. Wagner -- Add mount patch from util-linux 2.9u -* Tue Jul 06 1999 kukuk@suse.de -- update to util-linux-2.9t -* Fri Jun 25 1999 kukuk@suse.de -- update to util-linux-2.9s -* Wed Mar 03 1999 ro@suse.de -- hwclock.c: always use busywait to get rtctime - (it's hard to find out at runtime if we will get an irq) -* Tue Mar 02 1999 ro@suse.de -- update to util-linux-2.9i -- update to setserial-2.15 -- using diffs from jurix and add-ons from kgw for compaq smart raid -* Mon Feb 01 1999 ro@suse.de -- rdev is not built on alpha -* Mon Jan 18 1999 florian@suse.de -- fixed one broken case to delete a partition in fdisk -* Sun Dec 13 1998 bs@suse.de -- fixed file list -* Thu Dec 10 1998 fehr@suse.de -- fix bug in fdisk -* Tue Dec 08 1998 ro@suse.de -- removed last from filelist -- added link /sbin/clock -> hwclock -* Wed Nov 04 1998 ro@suse.de -- fdisksunlabel: don't include scsi/scsi.h for glibc-2.0 -* Fri Oct 30 1998 ro@suse.de -- update to 2.9 / added hostid from previous diff -- copied some glibc changes from previous diff (strcpy..) -* Thu Sep 17 1998 ro@suse.de -- define _GNU_SOURCE when using getopt -* Mon Aug 31 1998 ro@suse.de -- full switch to util-linux 2.8 --- sync has moved to pkg fileutils --- chroot has moved to pkg sh_utils (has been there for a while) --- adopted hostid from previous suse-pkg -* Mon Aug 24 1998 ro@suse.de -- switched to use mount from util-linux-2.8 -* Tue Jun 23 1998 ro@suse.de -- added fdisk, sfdisk, cfdisk from util-linux-2.8 - (including man-pages,readmes) -* Mon Nov 17 1997 ro@suse.de -- changed /local/bin/perl5 in chkdupexe to /usr/bin/perl -* Fri Oct 31 1997 ro@suse.de -- temporarily removed mount-hacker -* Thu Oct 30 1997 florian@suse.de -- add changes from ms@suse.de for hostid.c -* Tue May 20 1997 florian@suse.de -- only support kernel 2.0.x for nfs mounts, please use /bin/mount-hacker - for kernel 2.1.x -* Wed Apr 30 1997 florian@suse.de -- update to mount 2.6g -* Sun Apr 13 1997 florian@suse.de -- update to new version util-linux 2.6 -- update to new version mount 2.6e -* Thu Jan 02 1997 florian@suse.de -- update to mount 2.5p -* Thu Jan 02 1997 florian@suse.de -- Update auf neue Version von mount 2.5o. -* Thu Jan 02 1997 florian@suse.de -- updated to new version mount 2.5m -- (u)mount now gives much better error messages -* Thu Jan 02 1997 bs@suse.de - compile setterm with libtermcap and not libncurses - use newer mount instead of the old version in util-linux - (security fix) diff --git a/uuidd.rc b/uuidd.rc new file mode 100644 index 0000000..794295d --- /dev/null +++ b/uuidd.rc @@ -0,0 +1,77 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: uuidd +# Required-Start: $time $local_fs $remote_fs +# Should-Start: +# Required-Stop: $time $local_fs $remote_fs +# Should-Stop: +# Default-Start: 2 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: UUID generating daemon +# Description: UUID generating daemon +### END INIT INFO +# + + +UUIDD_BIN=/usr/sbin/uuidd +UUIDD_PID_PATH=/var/run/uuidd +UUIDD_OPTIONS="-q -T 0" + +test -x $UUIDD_BIN || { echo "$UUIDD_BIN not installed"; + if [ "$1" = "stop" ]; then exit 0; + else exit 5; fi; } + +. /etc/rc.status + +# Reset status of this service +rc_reset + +case "$1" in + start) + echo -n "Starting uuidd " + mkdir -p $UUIDD_PID_PATH + chown uuidd:uuidd $UUIDD_PID_PATH + /sbin/startproc $UUIDD_BIN $UUIDD_OPTIONS + rc_status -v + ;; + stop) + echo -n "Shutting down uuidd " + /sbin/killproc -TERM $UUIDD_BIN + rc_status -v + ;; + try-restart|condrestart|force-reload) + ## Do a restart only if the service was active before. + ## Note: try-restart is now part of LSB (as of 1.9). + ## RH has a similar command named condrestart. + if test "$1" = "condrestart"; then + echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}" + fi + $0 status + if test $? = 0; then + $0 restart + else + rc_reset # Not running is not a failure. + fi + # Remember status and be quiet + rc_status + ;; + restart) + $0 stop + $0 start + rc_status + ;; + reload) + rc_failed 3 + rc_status -v + ;; + status) + echo -n "Checking for service uuidd " + /sbin/checkproc $UUIDD_BIN + rc_status -v + ;; + *) + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" + exit 1 + ;; +esac +rc_exit diff --git a/v2.14-ReleaseNotes b/v2.14-ReleaseNotes deleted file mode 100644 index 739bc40..0000000 --- a/v2.14-ReleaseNotes +++ /dev/null @@ -1,418 +0,0 @@ - -Util-linux-ng 2.14 Release Notes (09-Jun-2008) -============================================== - -Release highlights ------------------- - - mount(8) supports new "nofail" mount option. - - mount(8) supports auto-destruction of loop devices. - - losetup(8) supports new command line option "-j" to show status of all - loop devices associated with given file. - - losetup(8) supports unlimited number of loop devices. - - losetup(8) supports new command line option "--sizelimit" to set data end. - - ldattach(8) command has been added to util-linux-ng. The ldattach - daemon opens the specified device file and attaches the line discipline - to it for processing of the sent and/or received data. - - setterm(8) supports new command line option "-blank [force|poke]" for - TIOCL_{BLANKED,BLANK}SCREEN. - - tailf(8) has been reimplemented to use inotify. - - tailf(8) supports new command line option "-n" to specifying output lines. - - mkswap(8) supports new command line option "-U" to set UUID explicitly. - - fdisk(8) has been fixed to calculate partition size in 2^N. - - cal(8) supports highlighting an arbitrary date. - - agetty(8) makes username-in-uppercase feature optional (off by default). - Users who use uppercase-only terminals need to use the option "-U" now. - - losetup(8), mount(8), umount(8), fdisk(8) and sfdisk(8) support static - linking when compiled with --enable-static-programs. - - hwclock(8) supports new command line option "adjfile" to override - the default /etc/adjtime. - - scriptreplay(1) command has been re-written from Perl to C. - - -Deprecated ----------- - - The losetup(8) '-s' option (introduced by util-linux-ng-2.13) is deprecated - now. This short form of the option '--show' could be in collision with - Loop-AES losetup implementation where the same option is used for the loop - sizelimit. - - -Fixed security issues ---------------------- - - CVE-2008-1926 - audit log injection via login - - The problem was originally reported for OpenSSH few months - ago (CVE-2007-3102). The login(1) is affected by the same - bug when built with the option "--with-audit". - - -Stable maintenance releases between v2.13 and v2.14 ---------------------------------------------------- - -util-linux-ng 2.13.1.1 [22-Apr-2008] - - * ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1.1-ReleaseNotes - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1.1-ChangeLog - -util-linux-ng 2.13.1 [16-Jan-2008] - - * ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1-ReleaseNotes - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1-ChangeLog - - -ChangeLog between v2.13 and v2.14 ---------------------------------- - - For more details see ChangeLog files at: - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/ - -agetty: - - cleanup MAXHOSTNAMELEN [Karel Zak] - - make username-in-uppercase feature optional (off by default.) [Hamish Coleman] - - non-linux support (use pathnames.h) [Karel Zak] - - replace termio with termios interface [Samuel Thibault] - - ungettextize several debugging messages. [Benno Schulenberg] -blockdev: - - add --getsz to blockdev.8 [Karel Zak] - - add missing description about option --report in manpage [Li Zefan] - - fix opened file leaving unclosed [lizf] - - use lib/blkdev.c, fix --report [Karel Zak] -build-sys: - - add --enable-static-programs [Stepan Kasal, Karel Zak] - - add AC_CANONICAL_HOST [Miklos Szeredi] - - add VARSUFFIX to UTIL_CHECK_LIB [Karel Zak] - - add err.h check [Karel Zak] - - add support ionice for Super-H architecture [Karel Zak] - - add v2.14 to NEWS [Karel Zak] - - autogen.sh reports versions of autotools now [Karel Zak] - - build arch(1) during distcheck [Stepan Kasal] - - cleanup "x$foo" usage [Karel Zak] - - cleanup disk-utils/Makefile.am (use $utils_common) [Karel Zak] - - cleanup usage of linux/major.h [Samuel Thibault] - - disable syscall fallbacks for non-linux systems [Karel Zak] - - do not add -luuid to BLKID_LIBS [Stepan Kasal] - - fix missing deps for swapon [Matthias Koenig] - - ignore a bunch of generated files, mostly binaries [James Youngman] - - nls/locale handling in util-linux-ng general [Mike Frysinger] - - non-linux support [Samuel Thibault] - - release++ [Karel Zak] - - remove errs.h [Karel Zak] - - remove files that are no longer delivered from git [LaMont Jones] - - remove hardcoded _GNU_SOURCE [Karel Zak] - - remove unnecessary check-local target from login-utils/ [Karel Zak] - - set AC_PREREQ to 2.60, increment version to 2.14 [Karel Zak] - - simplify code around RDEV_LINKS and SETARCH_LINKS [Stepan Kasal] - - unify method for checking system calls and fallback handling [Mike Frysinger, Stepan Kasal] - - update .gitignore files [Karel Zak] - - use dist_man_MANS instead of man_MANS [Stepan Kasal] - - use ncursesw (wide version) when possibe [Karel Zak, Mike Frysinger] - - use pkg-config to find the libs for static build [Stepan Kasal] - - use portable $(VAR =) instead of gmake-specific $(addsuffix) [Stepan Kasal] -cal: - - add description about option -V to manpage [Li Zefan] - - add support for highlighting an arbitrary date [Pádraig Brady] - - avoid -Wformat warnings [Jim Meyering] - - fix weekday alignment for certain locales [Pádraig Brady] - - replace errs.h with libc err.h [Karel Zak] - - use HAVE_LIB{NCURSES,NCURSESW} instead HAVE_NCURSES [Karel Zak] -cfdisk: - - define portable {DEFAULT,ALTERNATE}_DEVICE [Samuel Thibault] - - display cylinders beyond 1024 [Peter Breitenlohner] - - slightly increase the size of menu buttons [Benno Schulenberg] - - translate partition-type names when they are printed. [Benno Schulenberg] -chfn: - - add pam_end() call and cleanup PAM code [Karel Zak] - - fix compiler warnings in selinux stuff [Karel Zak] -chfn, chsh, login: - - collapsing three similar messages into a single one [Benno Schulenberg] -chsh: - - should use pam_end function to terminate the PAM transaction [Yu Zhiguo, Karel Zak] -column: - - replace errs.h with libc err.h [Karel Zak] -ddate: - - 11th, 12th and 13th of month [Volker Schatz] -docs: - - add a note about minix v3 to TODO file [Karel Zak] - - add info about .bugfix releases and branches [Karel Zak] - - add note about incorrect tag 2.13.1 [Karel Zak] - - add note about losetup --sizelimit to ReleaseNotes [Karel Zak] - - add note about static linking [Karel Zak] - - add v2.14 ReleaseNotes [Karel Zak] - - cleanup DEPRECATED file [Karel Zak] - - cleanup README.devel, add note about coding style and Signed-off-by [Karel Zak] - - fix ChangeLog URL [Pascal Terjan] - - fix stable branche name in README.devel [Karel Zak] - - mark vipw(1) is deprecated in favor of vipw from shadow-utils [Karel Zak] - - refresh TODO list [Karel Zak] - - remove date from ReleasNotes [Karel Zak] - - tweak a few messages for clarity [Benno Schulenberg] - - update AUTHORS file [Karel Zak] - - update TODO file [Karel Zak] - - update v2.14 ReleaseNotes [Karel Zak] - - we already rewrote the scriptreplay script; remove that TODO entry [James Youngman] -elvtune: - - use get_linux_version() [Karel Zak] -fdformat: - - install to /usr/sbin instead to /usr/bin [Karel Zak] -fdisk: - - better fallback for get_random_id() [H. Peter Anvin] - - calculate +size{K,M,G} in 2^N [Karel Zak] - - cleanup BLK* ioctls usage [Karel Zak] - - doesn't recognize the VMware ESX partitions [Karel Zak] - - doing useless ioctl when editing an image [Pascal Terjan] - - fix building for AVR32 and CRIS [Imre Kaloz] - - fix typo [Karel Zak] - - message tweak [Karel Zak] - - non-linux support (MAXPATHLEN) [Karel Zak] - - non-linux support (use standard uintxy_t instead __uxy) [Samuel Thibault] - - use more readable "GPT" name rather than "EFI GPT" [Robert Millan] - - use swab macros from bitops.h [Karel Zak] -flock: - - typo in man page [A. Costa] -fsck.cramfs: - - clean up gcc warnings [Randy Dunlap] -fsck.minix: - - correct the error message given when we can't open the device [James Youngman] - - reset the terminal state if we are killed by a fatal signal [James Youngman] -getopt: - - fix path to examples in getopt.1 [Karel Zak] - - install example scripts as SCRIPTS, not DATA [Peter Breitenlohner] -hwclock: - - add --adjfile=path option [Karel Zak] - - check for ENODEV [David Woodhouse] - - do not create a zero adjfile [Alain Guibert] - - fix --rtc option [Matthias Koenig, Karel Zak] -include: - - provides everything [Samuel Thibault] - - add bitops.h with swab{16,32,64} macros [Karel Zak] - - add mount paths to pathnames.h [Karel Zak] - - cleanup pathnames.h [Karel Zak] -ionice: - - add a note about permissions to ionice.1 [Karel Zak] - - update man page to reflect IDLE class change in 2.6.25 [Karel Zak] -ipcs: - - add information about POSIX compatibility to ipcs.1 [Karel Zak] -kill: - - man page is missing a description of "kill -0" [Karel Zak] -ldattach: - - add NLS support [Karel Zak] - - new command [Tilman Schmidt] - - use glibc termios [Karel Zak] -lib: - - add blkdev.{c,h} [Stefan Krah, Karel Zak] - - add linux_version.{c,h} [Stefan Krah] -login: - - audit log injection attack via login [Steve Grubb] - - fix a small memory leak and remove unnecessary zeroing [Karel Zak] - - login segfaults on EOF (rh#298461) [Karel Zak] - - replace termio with termios interface [Samuel Thibault] - - rewrite is_local() to remove limits on line length [James Youngman] -login-utils: - - cleanup strlen() and fgets() usage [James Youngman] -losetup: - - add --associated option [Karel Zak] - - add --sizelimit option [Shachar Shemesh] - - canonicalize loopfile name [Karel Zak, Matthias Koenig] - - clean up gcc warnings [Randy Dunlap] - - fix errno usage [Karel Zak] - - fix typo in losetup.8 [Karel Zak] - - mark the option -s as deprecated [Karel Zak] - - remove duplicate xstrdup() and error() [Karel Zak] - - split help message into two smaller parts [Benno Schulenberg] - - support unlimited number of loops [Karel Zak] - - use standard uintxy_t types (struct loop_info64) [Samuel Thibault] -mesg: - - replace errs.h with libc err.h [Karel Zak] -mkfs.cramfs: - - clean up gcc warnings [Randy Dunlap, Karel Zak] - - remove unused header file [lizf] - - switch on localization. [Benno Schulenberg] -mkfs.minix: - - add sectorsize check [Matthias Koenig] - - clean up gcc warnings [Karel Zak] - - clean up gcc warnings [Randy Dunlap] - - device size cleanup [Matthias Koenig] -mkswap: - - BLKGETSIZE cleanup [Karel Zak] - - cleanup kB vs. KiB usage in error messages [Karel Zak] - - fix compiler warnings [Karel Zak] - - linux_version() code consolidation [Karel Zak] - - possible to crash with SELinux relabeling support [KaiGai Kohei] - - set UUID for swap space (add -U option) [Martin Schulze] - - set errno=0 in write_all() [Karel Zak] - - when writing the signature page, handle EINTR returns [Karel Zak] -more: - - cleanup gcc warnings [Randy Dunlap] - - non-linux support [Samuel Thibault] - - replace CBAUD with cfgetispeed() [Samuel Thibault] - - use HAVE_WIDECHAR instead ENABLE_WIDECHAR [Karel Zak] -mount: - - "can't create lock file" message sometimes means failure, sometimes not [Mark McLoughlin] - - "nofail" mount option [Matthias Koenig, Karel Zak] - - -L|-U segfault when label or uuid doesn't exist [Karel Zak] - - add more details to the --version output [Karel Zak] - - add support for sizelimit= mount option (for loop mounts) [Shachar Shemesh] - - allow auto-destruction of loop devices [Bernardo Innocenti] - - chain of symlinks to fstab causes use of pointer after free [Norbert Buchmuller] - - clean up gcc warnings (mount_mntent.c) [Randy Dunlap] - - clean up global variables [Karel Zak] - - cleanup "none" fstype usage [Karel Zak] - - cleanup KERNEL_VERSION, remove my_dev_t.h [Karel Zak] - - cleanup canonicalize() usage [Karel Zak] - - cleanup error() and die() [Karel Zak] - - cleanup usage of _PATH_* [Karel Zak] - - doesn't drop privileges properly when calling helpers [Ludwig Nussel] - - don't call canonicalize(SPEC) for cifs, smbfs and nfs [Karel Zak] - - don't canonicalize LABEL= or UUID= spec [Karel Zak] - - drop the part always true from a while condition [Pascal Terjan] - - fix a small typo in mount.8 [Christophe Blaess] - - fix fd leak [Matthias Koenig] - - fix typo in mount.8 [Karel Zak] - - hint about helper program if device doesn't exist [Karel Zak] - - improve chmod & chown usage and clean up gcc warnings (fstab.c) [Karel Zak] - - improve error message when helper program not present [LaMont Jones] - - prevent loop mounting the same file twice [Karel Zak, Matthias Koenig] - - remount doesn't care about loop= [Karel Zak] - - remove MS_{REPLACE,AFTER,BEFORE,OVER} [Karel Zak] - - remove built-in support for background mounts [Karel Zak] - - remove redundant fflush [Karel Zak] - - remove set_proc_name() [Karel Zak] - - remove useless if-before-my_free, define my_free as a macro [Karel Zak] - - use MNTTYPE_SWAP (from mntent.h) [Karel Zak] - - use atexit() rather than (*at_die)() [Karel Zak] - - use blkdev_get_size() [Karel Zak] - - use canonicalize in getfs_by_devname [Karel Zak] -namei: - - add to identify FIFO (named pipe) and update manpage [Li Zefan] - - cleanup tailing white-spaces [Karel Zak] - - non-linux support (get_current_dir_name() and PATH_MAX) [Karel Zak, Samuel Thibault] -partx: - - fix compiler warnings [Karel Zak] - - use swab macros from bitops.h [Karel Zak] -pg: - - fix segfault on search [Rajeev V. Pillai] -po: - - add eu.po (from translationproject.org) [Mikel Olasagasti] - - add pl.po (from translationproject.org) [Andrzej Krzysztofowicz] - - fix typo in de.po [Karel Zak] - - merge changes [Karel Zak] - - update POTFILES.in [Karel Zak] - - update ca.po (from translationproject.org) [Josep Puigdemont] - - update cs.po (from translationproject.org) [Petr Pisar] - - update da.po (from translationproject.org) [Claus Hindsgaul] - - update de.po (from translationproject.org) [Michael Piefel] - - update es.po (from translationproject.org) [Santiago Vila Doncel] - - update et.po (from translationproject.org) [Meelis Roos] - - update fi.po (from translationproject.org) [Lauri Nurmi] - - update fr.po (from translationproject.org) [Michel Robitaille] - - update hu.po (from translationproject.org) [Gabor Kelemen] - - update id.po (from translationproject.org) [Arif E. Nugroho] - - update it.po (from translationproject.org) [Marco Colombo] - - update ja.po (from translationproject.org) [Daisuke Yamashita] - - update nl.po (from translationproject.org) [Benno Schulenberg] - - update po files [Karel Zak] - - update pt_BR.po (from translationproject.org) [Rodrigo Stulzer Lopes] - - update ru.po (from translationproject.org) [Pavel Maryanov] - - update sl.po (from translationproject.org) [Simon Mihevc] - - update sv.po (from translationproject.org) [Daniel Nylander] - - update tr.po (from translationproject.org) [Nilgün Belma Bugüner] - - update uk.po (from translationproject.org) [Maxim V. Dziumanenko] - - update vi.po (from translationproject.org) [Clytie Siddall] -rename: - - add description about option -V to manpage [Li Zefan] - - remove useless variable [Li Zefan] -renice: - - detect errors in arguments, add -v, -h and long options [LaMont Jones, Karel Zak] -rev: - - use warn() in errs.h [Li Zefan] -rtcwake: - - fix UTC time usage [David Brownell] - - fix the default mode to "standby" [Paulius Zaleckas] - - fix typo [Karel Zak] - - fix typo SATE -> STATE [Mike Frysinger] - - fix verbose message [Karel Zak] - - include libgen.h for basename prototype [Mike Frysinger] - - misc cleanups [David Brownell] -script: - - cleanup gcc warnings [Randy Dunlap] - - cleanup includes [Samuel Thibault] - - dies on SIGWINCH [Karel Zak] - - read returns a size_t [James Youngman] -scriptreplay: - - gettextize a forgotten messages [Karel Zak] - - rewrite in C [Karel Zak, James Youngman] -setarch: - - add fallback for linux/personality [Karel Zak] - - add long options to setarch and update manpage [Karel Zak, Li Zefan] - - add missing alpha subarchs [Oliver Falk] - - adding groff symlinks to setarch manual page [Arkadiusz Miskiewicz] - - fix compiler warning [LaMont Jones] - - generate groff links in a better way [Karel Zak] - - provide backwards compatibility [Dmitry V. Levin] - - tweak the help text, and gettextize a forgotten message [Benno Schulenberg] -setterm: - - add -blan [force|poke] options for TIOCL_{BLANKED,BLANK}SCREEN [Samuel Thibault, Karel Zak] - - dump by TIOCLINUX is deprecated since linux 1.1.92. [Karel Zak] - - opened file leaving unclosed [Karel Zak, lizf] - - remove unnecessaty ifndef TCGETS [Samuel Thibault] -sfdisk: - - allow partitioning drives of over 2^31 sectors. [Kunihiko IMAI] - - cleanup 83 gcc warnings [Randy Dunlap] - - opened files leaving unclosed [Karel Zak, Li Zefan] - - remove unnecessary linux/unistd.h [Samuel Thibault] - - use get_linux_version() [Karel Zak] -shutdown: - - use _PATH_MOUNTED instead of _PATH_MTAB [Stepan Kasal] -swapon: - - Reinitialize software suspend areas to avoid future corruption. [Kees Cook, Karel Zak] - - add sundries.h [Karel Zak] - - clean up gcc warnings [Randy Dunlap] - - cleanup usage output [Karel Zak] - - cleanup usage() [Karel Zak] - - fix swsuspend detection [Karel Zak] - - fix typo in usage() [Karel Zak] - - readjust the usage summaries [Benno Schulenberg] - - remove unnecessary myrealpath() call [Karel Zak] -sys-utils: - - correct setarch.8 manpage link creation [Frédéric Bothamy] -tailf: - - add option -n to specifying output lines [Li Zefan] - - clean up gcc warnings & fix use of errno [Karel Zak] - - inotify based reimplementation [Karel Zak] - - non-linux support [Samuel Thibault] - - opened file leaving unclosed [lizf] - - replace errs.h with libc err.h [Karel Zak] -tests: - - add "sort" to cramfs test [Karel Zak] - - add test for include/pathnames.h [Karel Zak] - - add ts-mount-noncanonical [Karel Zak] - - exactly define a time format in ls -l output [Karel Zak] - - fix blkid cache usage [Karel Zak] - - move test_bkdev to lib/ [Karel Zak] - - redirect libblkid cache to BLKID_FILE [Karel Zak] - - rename test_sysinfo, remove tailing white-spaces [Karel Zak] - - use losetup -s [Karel Zak] -umount: - - add hint about lsof & fuser [Karel Zak] - - don't print duplicate error messages [Karel Zak] - - use atexit() rather than (*at_die)() [Karel Zak] -wall: - - cleanup MAXHOSTNAMELEN [Karel Zak] diff --git a/v2.14.1-ReleaseNotes b/v2.14.1-ReleaseNotes deleted file mode 100644 index ad0ea6f..0000000 --- a/v2.14.1-ReleaseNotes +++ /dev/null @@ -1,49 +0,0 @@ -Util-linux-ng 2.14.1 Release Notes (??-Aug-2008) -================================================ - -ChangeLog between v2.14 and v2.14.1 ------------------------------------ - - For more details see ChangeLog files at: - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/ - -build-sys: - - cleanup sys-utils/Makefile.am [Karel Zak] - - fix dmesg.1 installation [Karel Zak] - - release++ (v2.14.1-rc1) [Karel Zak] - - tgets is not in ncurses but in tinfo [Arkadiusz Miskiewicz] -docs: - - update AUTHORS file [Karel Zak] - - update v2.14.1 ReleaseNotes [Karel Zak] -fdisk: - - don't check for GPT when asked for disk size only [Karel Zak] -hwclock: - - omit warning about drift if --noadjfile given [Matthias Koenig] - - unshadow a diagnostic printf [Kalev Soikonen] -ipcs: - - ungettextize the spacing of the table headers [Benno Schulenberg] -losetup: - - remove unnecessary minor number check [Karel Zak] -mount: - - add docs about utf8=0 for vfat [Karel Zak] - - add fallback for versionsort() [Karel Zak] - - add info about tz=UTC option for FAT to mount.8 [Karel Zak] - - add norealtime to mount.8 [Karel Zak] -po: - - add zh_CN.po (from translationproject.org) [Ray Wang] - - merge changes [Karel Zak] - - update cs.po (from translationproject.org) [Petr Pisar] - - update nl.po (from translationproject.org) [Benno Schulenberg] -rtcwake: - - cleanup return codes [Karel Zak] - - prefer RTC_WKALM_SET over RTC_ALM_SET [Gabriel Burt] -scriptreplay: - - new implementation is out-of-sync [Karel Zak] -selinux: - - is_selinux_enabled() returns 0, 1 and -1 [Karel Zak] -sfdisk: - - print version should end with a newline [Denis ChengRq] -umount: - - improve "-d" option for autoclear loops [Karel Zak] -write: - - doesn't check for tty group [Karel Zak] diff --git a/v2.14.2-ReleaseNotes b/v2.14.2-ReleaseNotes deleted file mode 100644 index 7168bf6..0000000 --- a/v2.14.2-ReleaseNotes +++ /dev/null @@ -1,92 +0,0 @@ -Util-linux-ng 2.14.2 Release Notes (??-Jan-2009) -================================================ - -ChangeLog between v2.14.1 and v2.14.2 -------------------------------------- - - For more details see ChangeLog files at: - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/ - -build-sys: - - add -luuid to BLKID_LIBS [Karel Zak] - - release++ (v2.14.2-rc1) [Karel Zak] -cfdisk: - - accept yes/no as fallback [Matthias Koenig] -chrt: - - support CFS SCHED_IDLE priority and document it [Martin Steigerwald] -docs: - - update AUTHORS file [Karel Zak] - - update v2.14.2 ReleaseNotes [Karel Zak] -fdisk: - - add some missing includes [Matthias Koenig] - - cannot create partition with starting beyond 1 TB [Karel Zak] - - fix man page typo [Karel Zak] - - remove obsolete information from man page [Karel Zak] - - remove unnecessary gettext call [Karel Zak] - - several strings without gettext calls [Pedro Ribeiro] - - support +cylinder notation [Karel Zak] -hwclock: - - remove "cli" and "sti" from i386 CMOS code [Karel Zak] - - remove x86_64-specific bogon [David Brownell] -include: - - use __BYTE_ORDER rather than AC specific WORDS_BIGENDIAN [Karel Zak] -ionice: - - Extend the man page to explain the "none" class and cpu-nice inheritance [Jakob Unterwurzacher] - - a little cleanup of "none" description [Karel Zak] -ldattach: - - don't compile for non-linux systems [Samuel Thibault] -lib: - - add __BYTE_ORDER to md5.c [Karel Zak] -logger: - - several strings without gettext calls [Pedro Ribeiro] -login: - - fix compiler warning (int32 time() arg) [Karel Zak] - - fix warning "dereferencing type-punned pointer will break strict-aliasing rules" [Karel Zak] -losetup: - - add warning about read-only mode [Karel Zak] - - missing EBUSY error hint message [Karel Zak] - - several strings without gettext strings [Pedro Ribeiro] - - try to set up loop readonly if EACCES [Matthias Koenig] -mkfs.cramfs: - - several strings without gettext calls [Pedro Ribeiro] -mkfs.minix: - - fix size detection [Matthias Koenig] -more: - - dont use a.out.h [Mike Frysinger] - - minor fixes to magic() [James Youngman] -mount: - - add i_version support [Karel Zak] - - add info about /proc/mounts to mount.1 [Karel Zak] - - add info about semantics of read-only mount to mount.8 [Karel Zak] - - add rootcontext= SELinux mount option [Karel Zak] - - clean up SPEC canonicalization [Karel Zak] - - cleans up mount(8) troff markup [Sam Varshavchik] - - create separate section for fs-independent options in mount.8 [Karel Zak] - - finalize support of quoted LABELs/UUIDs [Karel Zak] - - fix mount_static_LDADD [Karel Zak] - - fix typo [Guan Xin] - - fix typo [Karel Zak] - - make file_t SELinux warning optional and shorter [Karel Zak] - - mtab created multiple times with -a option [Karel Zak] - - remove link to namesys.com [Karel Zak] - - remove spurious newline from mount.8 [Mike Frysinger] - - reorder list of options in mount.8 [Karel Zak] - - retry on ENOMEDIUM [Matthias Koenig] - - suggest to use blockdev --setro rather than losetup [Karel Zak] - - sundries.h add klibc support [maximilian attems] - - sync FAT info in mount.8 with Documentation/filesystems/vfat.txt [Karel Zak] - - sync tmpfs info in mount.8 with Documentation/filesystems/tmpfs.txt [Karel Zak] - - use subsections in mount.8 DESCRIPTION [Karel Zak] - - warn on "file_t" selinux context [Karel Zak] -po: - - merge changes [Karel Zak] - - update cs.po (from translationproject.org) [Petr Pisar] - - update fr.po (from translationproject.org) [Nicolas Provost] - - update pt_BR.po (from translationproject.org) [Rodrigo Stulzer Lopes] - - update sv.po (from translationproject.org) [Daniel Nylander] -readprofile: - - several strings without gettext calls [Pedro Ribeiro] -setterm: - - fix -blank man page [Karel Zak] - -- use getpagesize() [maximilian attems] From a4e7d68c8fb675ba0bef7d4a195aff71caedc9a2de1a47d6af16673c5c17748d Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 17 Jul 2009 13:52:45 +0000 Subject: [PATCH 077/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=77 --- HEAD.patch | 471 ------------------------ baselibs.conf | 9 + blkid.conf | 5 + util-linux-2.12-misc_utils_hostid.patch | 4 +- util-linux-ng-2.16-rc1.tar.bz2 | 3 - util-linux-ng-2.16.tar.bz2 | 3 + util-linux.changes | 16 + util-linux.spec | 20 +- 8 files changed, 43 insertions(+), 488 deletions(-) delete mode 100644 HEAD.patch create mode 100644 baselibs.conf create mode 100644 blkid.conf delete mode 100644 util-linux-ng-2.16-rc1.tar.bz2 create mode 100644 util-linux-ng-2.16.tar.bz2 diff --git a/HEAD.patch b/HEAD.patch deleted file mode 100644 index f61ceae..0000000 --- a/HEAD.patch +++ /dev/null @@ -1,471 +0,0 @@ -diff --git a/disk-utils/raw.c b/disk-utils/raw.c -index bc64b34..f634b60 100644 ---- a/disk-utils/raw.c -+++ b/disk-utils/raw.c -@@ -40,11 +40,11 @@ int master_fd; - int raw_minor; - - void open_raw_ctl(void); --int query(int minor, int quiet); -+int query(int minor, const char *raw_name, int quiet); - int bind (int minor, int block_major, int block_minor); - - --static void usage(int err) -+static void usage(int err) - { - fprintf(stderr, - _("Usage:\n" -@@ -99,7 +99,7 @@ int main(int argc, char *argv[]) - if (optind < argc) - usage(1); - for (i = 1; i < RAW_NR_MINORS; i++) -- query(i, 1); -+ query(i, NULL, 1); - exit(0); - } - -@@ -117,7 +117,10 @@ int main(int argc, char *argv[]) - * causes udev to *remove* /dev/rawctl - */ - rc = sscanf(raw_name, RAWDEVDIR "raw%d", &raw_minor); -- if (rc == 1 && raw_minor == 0) { -+ if (rc != 1) -+ usage(1); -+ -+ if (raw_minor == 0) { - fprintf (stderr, - _("Device '%s' is control raw dev " - "(use raw where is greater than zero)\n"), -@@ -125,28 +128,8 @@ int main(int argc, char *argv[]) - exit(2); - } - -- err = stat(raw_name, &statbuf); -- if (err) { -- fprintf (stderr, _("Cannot locate raw device '%s' (%s)\n"), -- raw_name, strerror(errno)); -- exit(2); -- } -- -- if (!S_ISCHR(statbuf.st_mode)) { -- fprintf (stderr, _("Raw device '%s' is not a character dev\n"), -- raw_name); -- exit(2); -- } -- if (major(statbuf.st_rdev) != RAW_MAJOR) { -- fprintf (stderr, _("Device '%s' is not a raw dev\n"), -- raw_name); -- exit(2); -- } -- -- raw_minor = minor(statbuf.st_rdev); -- - if (do_query) -- return query(raw_minor, 0); -+ return query(raw_minor, raw_name, 0); - - /* - * It's not a query, so we still have some parsing to do. Have -@@ -208,12 +191,35 @@ void open_raw_ctl(void) - } - } - --int query(int minor, int quiet) -+int query(int minor, const char *raw_name, int quiet) - { - struct raw_config_request rq; - static int has_worked = 0; - int err; - -+ if (raw_name) { -+ struct stat statbuf; -+ -+ err = stat(raw_name, &statbuf); -+ if (err) { -+ fprintf (stderr, _("Cannot locate raw device '%s' (%s)\n"), -+ raw_name, strerror(errno)); -+ exit(2); -+ } -+ -+ if (!S_ISCHR(statbuf.st_mode)) { -+ fprintf (stderr, _("Raw device '%s' is not a character dev\n"), -+ raw_name); -+ exit(2); -+ } -+ if (major(statbuf.st_rdev) != RAW_MAJOR) { -+ fprintf (stderr, _("Device '%s' is not a raw dev\n"), -+ raw_name); -+ exit(2); -+ } -+ minor = minor(statbuf.st_rdev); -+ } -+ - rq.raw_minor = minor; - err = ioctl(master_fd, RAW_GETBIND, &rq); - if (err < 0) { -diff --git a/include/pathnames.h b/include/pathnames.h -index 0060a75..12170f9 100644 ---- a/include/pathnames.h -+++ b/include/pathnames.h -@@ -19,7 +19,6 @@ - #undef _PATH_DEFPATH_ROOT - #define _PATH_DEFPATH_ROOT "/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" - --#define _PATH_TTY "/dev/tty" - #define _PATH_SECURETTY "/etc/securetty" - #define _PATH_WTMPLOCK "/etc/wtmplock" - -@@ -94,6 +93,13 @@ - #define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~" - #define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp" - -+#ifndef _PATH_DEV -+# define _PATH_DEV "/dev" -+#endif -+ -+#define _PATH_DEV_LOOP "/dev/loop" -+#define _PATH_DEV_TTY "/dev/tty" -+ - /* udev paths */ - #define _PATH_DEV_BYLABEL "/dev/disk/by-label" - #define _PATH_DEV_BYUUID "/dev/disk/by-uuid" -diff --git a/login-utils/login.c b/login-utils/login.c -index f315425..7328ede 100644 ---- a/login-utils/login.c -+++ b/login-utils/login.c -@@ -378,7 +378,7 @@ main(int argc, char **argv) - int ask, fflag, hflag, pflag, cnt, errsv; - int quietlog, passwd_req; - char *domain, *ttyn; -- char tbuf[MAXPATHLEN + 2], tname[sizeof(_PATH_TTY) + 10]; -+ char tbuf[MAXPATHLEN + 2], tname[sizeof(_PATH_DEV_TTY) + 10]; - char *termenv; - char *childArgv[10]; - char *buff; -@@ -499,7 +499,7 @@ main(int argc, char **argv) - - if (ttyn == NULL || *ttyn == '\0') { - /* no snprintf required - see definition of tname */ -- sprintf(tname, "%s??", _PATH_TTY); -+ snprintf(tname, sizeof(tname), "%s??", _PATH_DEV_TTY); - ttyn = tname; - } - -diff --git a/misc-utils/script.c b/misc-utils/script.c -index 12ea43a..b877c31 100644 ---- a/misc-utils/script.c -+++ b/misc-utils/script.c -@@ -371,7 +371,7 @@ doshell() { - #if 0 - int t; - -- t = open(_PATH_TTY, O_RDWR); -+ t = open(_PATH_DEV_TTY, O_RDWR); - if (t >= 0) { - (void) ioctl(t, TIOCNOTTY, (char *)0); - (void) close(t); -diff --git a/misc-utils/uuidd.8 b/misc-utils/uuidd.8 -index ae033ea..67c6614 100644 ---- a/misc-utils/uuidd.8 -+++ b/misc-utils/uuidd.8 -@@ -64,11 +64,11 @@ UUID's. - .TP - .BI \-p " pidfile" - Specify the pathname where the pid file should be written. By default, --the pid file is written to /var/lib/libuuid/uuidd.pid. -+the pid file is written to /var/run/uuidd/uuidd.pid. - .TP - .BI \-s " socketpath" - Specify the pathname used for the unix-domain socket used by uuidd. By --default, the pathname used is /var/lib/libuuid/request. This is primarily -+default, the pathname used is /var/run/uuidd/request. This is primarily - for debugging purposes, since the pathname is hard-coded in the libuuid - library. - .TP -diff --git a/mount/lomount.c b/mount/lomount.c -index 1b191ab..c6e0c92 100644 ---- a/mount/lomount.c -+++ b/mount/lomount.c -@@ -60,8 +60,6 @@ loop_info64_to_old(const struct loop_info64 *info64, struct loop_info *info) - return 0; - } - --#define DEV_LOOP_PATH "/dev/loop" --#define DEV_PATH "/dev" - #define LOOPMAJOR 7 - #define NLOOPS_DEFAULT 8 /* /dev/loop[0-7] */ - -@@ -143,10 +141,10 @@ looplist_open(struct looplist *ll, int flag) - ll->flag = flag; - ll->ncur = -1; - -- if (stat(DEV_PATH, &st) == -1 || (!S_ISDIR(st.st_mode))) -+ if (stat(_PATH_DEV, &st) == -1 || (!S_ISDIR(st.st_mode))) - return -1; /* /dev doesn't exist */ - -- if (stat(DEV_LOOP_PATH, &st) == 0 && S_ISDIR(st.st_mode)) -+ if (stat(_PATH_DEV_LOOP, &st) == 0 && S_ISDIR(st.st_mode)) - ll->flag |= LLFLG_SUBDIR; /* /dev/loop/ exists */ - - if ((ll->flag & LLFLG_USEDONLY) && -@@ -179,8 +177,8 @@ looplist_open_dev(struct looplist *ll, int lnum) - /* create a full device path */ - snprintf(ll->name, sizeof(ll->name), - ll->flag & LLFLG_SUBDIR ? -- DEV_LOOP_PATH "/%d" : -- DEV_PATH "/loop%d", -+ _PATH_DEV_LOOP "/%d" : -+ _PATH_DEV "/loop%d", - lnum); - - fd = open(ll->name, O_RDONLY); -@@ -331,8 +329,8 @@ looplist_next(struct looplist *ll) - */ - if (!ll->minors) { - ll->nminors = (ll->flag & LLFLG_SUBDIR) ? -- loop_scandir(DEV_LOOP_PATH, &ll->minors, 0) : -- loop_scandir(DEV_PATH, &ll->minors, 1); -+ loop_scandir(_PATH_DEV_LOOP, &ll->minors, 0) : -+ loop_scandir(_PATH_DEV, &ll->minors, 1); - ll->ncur = -1; - } - for (++ll->ncur; ll->ncur < ll->nminors; ll->ncur++) { -@@ -500,8 +498,7 @@ show_associated_loop_devices(char *filename, unsigned long long offset, int isof - /* check if the loopfile is already associated with the same given - * parameters. - * -- * returns: -1 error -- * 0 unused -+ * returns: 0 unused / error - * 1 loop device already used - */ - static int -@@ -516,17 +513,15 @@ is_associated(int dev, struct stat *file, unsigned long long offset, int isoff) - file->st_ino == linfo64.lo_inode && - (isoff == 0 || offset == linfo64.lo_offset)) - ret = 1; -- return ret; -- } -- if (ioctl(dev, LOOP_GET_STATUS, &linfo) == 0) { -+ -+ } else if (ioctl(dev, LOOP_GET_STATUS, &linfo) == 0) { - if (file->st_dev == linfo.lo_device && - file->st_ino == linfo.lo_inode && - (isoff == 0 || offset == linfo.lo_offset)) - ret = 1; -- return ret; - } - -- return errno == ENXIO ? 0 : -1; -+ return ret; - } - - /* check if the loop file is already used with the same given -@@ -572,18 +567,14 @@ loopfile_used_with(char *devname, const char *filename, unsigned long long offse - if (!is_loop_device(devname)) - return 0; - -- if (stat(filename, &statbuf) == -1) { -- perror(filename); -- return -1; -- } -+ if (stat(filename, &statbuf) == -1) -+ return 0; - - fd = open(devname, O_RDONLY); -- if (fd == -1) { -- perror(devname); -- return -1; -- } -- ret = is_associated(fd, &statbuf, offset, 1); -+ if (fd == -1) -+ return 0; - -+ ret = is_associated(fd, &statbuf, offset, 1); - close(fd); - return ret; - } -diff --git a/mount/umount.c b/mount/umount.c -index 0468cb4..a695f0c 100644 ---- a/mount/umount.c -+++ b/mount/umount.c -@@ -14,6 +14,7 @@ - #include "mount_constants.h" - #include "sundries.h" - #include "getusername.h" -+#include "pathnames.h" - #include "lomount.h" - #include "loop.h" - #include "fstab.h" -@@ -406,7 +407,7 @@ static int - contains(const char *list, const char *s) { - int n = strlen(s); - -- while (*list) { -+ while (list && *list) { - if (strncmp(list, s, n) == 0 && - (list[n] == 0 || list[n] == ',')) - return 1; -@@ -423,7 +424,7 @@ get_value(const char *list, const char *s) { - const char *t; - int n = strlen(s); - -- while (*list) { -+ while (list && *list) { - if (strncmp(list, s, n) == 0) { - s = t = list+n; - while (*s && *s != ',') -@@ -432,6 +433,44 @@ get_value(const char *list, const char *s) { - } - while (*list && *list++ != ',') ; - } -+ return NULL; -+} -+ -+/* check if @mc contains a loop device which is associated -+ * with the @file in fs -+ */ -+static int -+is_valid_loop(struct mntentchn *mc, struct mntentchn *fs) -+{ -+ unsigned long long offset = 0; -+ char *p; -+ -+ /* check if it begins with /dev/loop */ -+ if (strncmp(mc->m.mnt_fsname, _PATH_DEV_LOOP, -+ sizeof(_PATH_DEV_LOOP) - 1)) -+ return 0; -+ -+ /* check for loop option in fstab */ -+ if (!contains(fs->m.mnt_opts, "loop")) -+ return 0; -+ -+ /* check for offset option in fstab */ -+ p = get_value(fs->m.mnt_opts, "offset="); -+ if (p) -+ offset = strtoull(p, NULL, 10); -+ -+ /* check association */ -+ if (loopfile_used_with((char *) mc->m.mnt_fsname, -+ fs->m.mnt_fsname, offset) == 1) { -+ if (verbose > 1) -+ printf(_("device %s is associated with %s\n"), -+ mc->m.mnt_fsname, fs->m.mnt_fsname); -+ return 1; -+ } -+ -+ if (verbose > 1) -+ printf(_("device %s is not associated with %s\n"), -+ mc->m.mnt_fsname, fs->m.mnt_fsname); - return 0; - } - -@@ -516,12 +555,15 @@ umount_file (char *arg) { - the pair (dev,file) in fstab. */ - fs = getfs_by_devdir(mc->m.mnt_fsname, mc->m.mnt_dir); - if (!fs) { -- if (!getfs_by_spec (file) && !getfs_by_dir (file)) -+ fs = getfs_by_dir(file); -+ if (!fs && !getfs_by_spec(file)) - die (2, - _("umount: %s is not in the fstab " - "(and you are not root)"), - file); -- else -+ -+ /* spec could be a file which is loop mounted */ -+ if (fs && !is_valid_loop(mc, fs)) - die (2, _("umount: %s mount disagrees with " - "the fstab"), file); - } -diff --git a/shlibs/uuid/src/uuidd.h b/shlibs/uuid/src/uuidd.h -index 528acdc..c807236 100644 ---- a/shlibs/uuid/src/uuidd.h -+++ b/shlibs/uuid/src/uuidd.h -@@ -35,8 +35,8 @@ - #ifndef _UUID_UUIDD_H - #define _UUID_UUIDD_H - --#define UUIDD_SOCKET_PATH "/var/lib/libuuid/request" --#define UUIDD_PIDFILE_PATH "/var/lib/libuuid/uuidd.pid" -+#define UUIDD_SOCKET_PATH "/var/run/uuidd/request" -+#define UUIDD_PIDFILE_PATH "/var/run/uuidd/uuidd.pid" - #define UUIDD_PATH "/usr/sbin/uuidd" - - #define UUIDD_OP_GETPID 0 -diff --git a/sys-utils/ldattach.8 b/sys-utils/ldattach.8 -index 4ee6229..7afe51d 100644 ---- a/sys-utils/ldattach.8 -+++ b/sys-utils/ldattach.8 -@@ -35,7 +35,7 @@ With no arguments, - .B ldattach - prints usage information. - .SH LINE DISCIPLINES --As of kernel release 2.6.21, the following line disciplines are supported: -+Depending on the kernel release, the following line disciplines are supported: - .TP - .BR TTY ( 0 ) - The default line discipline, -@@ -80,6 +80,9 @@ Bluetooth HCI UART driver. - .TP - .BR GIGASET_M101 ( 16 ) - Driver for Siemens Gigaset M101 serial DECT adapter. -+.TP -+.BR PPS ( 18 ) -+Driver for serial line Pulse Per Second (PPS) source. - .SH OPTIONS - .TP - \fB-d\fP | \fB--debug\fP -diff --git a/sys-utils/ldattach.c b/sys-utils/ldattach.c -index 801dd1c..19f70fe 100644 ---- a/sys-utils/ldattach.c -+++ b/sys-utils/ldattach.c -@@ -34,6 +34,10 @@ - # define N_GIGASET_M101 16 - #endif - -+#ifndef N_PPS -+# define N_PPS 18 -+#endif -+ - #ifndef ARRAY_SIZE - # define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) - #endif -@@ -65,7 +69,8 @@ ld_table[] = { - { "HCI", N_HCI }, - { "GIGASET_M101", N_GIGASET_M101 }, - { "GIGASET", N_GIGASET_M101 }, -- { "M101", N_GIGASET_M101 } -+ { "M101", N_GIGASET_M101 }, -+ { "PPS", N_PPS }, - }; - - /* look up line discipline code */ -diff --git a/tests/expected/paths/built-in b/tests/expected/paths/built-in -index 318f44e..51372de 100644 ---- a/tests/expected/paths/built-in -+++ b/tests/expected/paths/built-in -@@ -1,6 +1,7 @@ - _PATH_DEFPATH /usr/local/bin:/bin:/usr/bin - _PATH_DEFPATH_ROOT /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -- _PATH_TTY /dev/tty -+ _PATH_DEV_TTY /dev/tty -+ _PATH_DEV_LOOP /dev/loop - _PATH_SECURETTY /etc/securetty - _PATH_WTMPLOCK /etc/wtmplock - _PATH_HUSHLOGIN .hushlogin -diff --git a/tests/helpers/test_pathnames.c b/tests/helpers/test_pathnames.c -index 1accede..5cc6efd 100644 ---- a/tests/helpers/test_pathnames.c -+++ b/tests/helpers/test_pathnames.c -@@ -33,7 +33,8 @@ struct hlpPath paths[] = - { - DEF_HLPPATH(_PATH_DEFPATH), - DEF_HLPPATH(_PATH_DEFPATH_ROOT), -- DEF_HLPPATH(_PATH_TTY), -+ DEF_HLPPATH(_PATH_DEV_TTY), -+ DEF_HLPPATH(_PATH_DEV_LOOP), - DEF_HLPPATH(_PATH_SECURETTY), - DEF_HLPPATH(_PATH_WTMPLOCK), - DEF_HLPPATH(_PATH_HUSHLOGIN), diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..4ce6559 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,9 @@ +libuuid1 +libuuid-devel + requires -libblkid- + requires "libblkid1- = " +libblkid1 + obsoletes "e2fsprogs- <= " +libblkid-devel + requires -libuuid- + requires "libuuid1- = " diff --git a/blkid.conf b/blkid.conf new file mode 100644 index 0000000..fab9dd2 --- /dev/null +++ b/blkid.conf @@ -0,0 +1,5 @@ +# do not keep cache file across reboots +CACHE_FILE=/dev/.blkid.tab + +# never try to sequentially scan all devices in /dev +EVALUATE=udev diff --git a/util-linux-2.12-misc_utils_hostid.patch b/util-linux-2.12-misc_utils_hostid.patch index 18e5d32..5f3dffb 100644 --- a/util-linux-2.12-misc_utils_hostid.patch +++ b/util-linux-2.12-misc_utils_hostid.patch @@ -128,8 +128,8 @@ Index: util-linux-ng-2.14/misc-utils/Makefile.am bin_PROGRAMS = --usrbinexec_PROGRAMS = cal ddate logger look mcookie \ -+usrbinexec_PROGRAMS = cal ddate hostid logger look mcookie \ +-usrbin_exec_PROGRAMS = cal ddate logger look mcookie \ ++usrbin_exec_PROGRAMS = cal ddate hostid logger look mcookie \ namei script whereis scriptreplay EXTRA_DIST += README.cal README.ddate README.namei README.namei2 diff --git a/util-linux-ng-2.16-rc1.tar.bz2 b/util-linux-ng-2.16-rc1.tar.bz2 deleted file mode 100644 index 1f1c06d..0000000 --- a/util-linux-ng-2.16-rc1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7fd2c539888aeab25c22e99d784e9d537ba35fd3087c926efc40af4047dc418d -size 3455981 diff --git a/util-linux-ng-2.16.tar.bz2 b/util-linux-ng-2.16.tar.bz2 new file mode 100644 index 0000000..93b374e --- /dev/null +++ b/util-linux-ng-2.16.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6365fcb2b34439faa52164e1a018086c2b6818f8a189c487c79e09dc3c62722 +size 3470040 diff --git a/util-linux.changes b/util-linux.changes index 9da1def..6e4743b 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,19 @@ +Mon Jul 13 14:21:07 CEST 2009 - kay.sievers@novell.com + +- update to final 2.16 release + - fix libdir issues in pkgconfig files + - fix location of uuidd run directory + - improve libuuid handling if uuidd is installed but not setuid +- add blkid.conf file to: + - disable the sequential /dev scanner + - move cache to /dev/.blkid.tab to get file out of /etc + and prevent the cache file to survive a reboot + +------------------------------------------------------------------- +Wed Jul 8 13:14:42 CEST 2009 - meissner@novell.com + +- added baselibs.conf for libblkid* and libuuid* + ------------------------------------------------------------------- Sun Jun 28 21:36:57 CEST 2009 - kay.sievers@novell.com diff --git a/util-linux.spec b/util-linux.spec index d23d5cd..31b6e20 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -29,10 +29,10 @@ License: BSD 3-clause (or similar) ; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.16 -Release: 1 +Release: 2 Requires: %name-lang = %{version} Summary: A collection of basic system utilities -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version-rc1.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source1: util-linux-rpmlintrc Source2: nologin.c Source3: nologin.8 @@ -56,10 +56,10 @@ Source29: mkzimage_cmdline.c Source30: README.largedisk Source31: addnote.c Source50: uuidd.rc +Source51: blkid.conf ## ## util-linux patches ## -Patch1: HEAD.patch # add hostid Patch2: util-linux-2.12-misc_utils_hostid.patch # 241372 - remove legacy warnings from fdisk @@ -149,8 +149,7 @@ unique IDs (UUIDs). %lang_package %prep -%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%version-rc1 -%patch1 -p1 +%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%version %patch2 -p1 %patch3 -p1 %patch17 -p1 @@ -257,6 +256,7 @@ mkdir -p "$RPM_BUILD_ROOT"{/etc/init.d,%{_mandir}/man{1,8},/bin,/sbin,/usr/bin,/ mkdir -p $RPM_BUILD_ROOT/var/lib/libuuid/ mkdir -p $RPM_BUILD_ROOT/var/run/uuidd/ install -m 744 %{SOURCE50} $RPM_BUILD_ROOT/etc/init.d/uuidd +install -m 644 %{SOURCE51} $RPM_BUILD_ROOT/etc/blkid.conf mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates cp adjtimex-*/adjtimex %{buildroot}/sbin/ cp adjtimex-*/adjtimex.8 %{buildroot}%{_mandir}/man8/ @@ -297,12 +297,8 @@ make DESTDIR=$RPM_BUILD_ROOT install mv $RPM_BUILD_ROOT/usr/bin/logger $RPM_BUILD_ROOT/bin/logger install -m 644 %{SOURCE6} $RPM_BUILD_ROOT/etc/filesystems install -m 755 nologin $RPM_BUILD_ROOT/sbin -rm -f $RPM_BUILD_ROOT/%{_lib}/libblkid.la -rm -f $RPM_BUILD_ROOT/%{_lib}/libblkid.so -ln -sf /%{_lib}/libblkid.so.1 $RPM_BUILD_ROOT%{_libdir}/libblkid.so -rm -f $RPM_BUILD_ROOT/%{_lib}/libuuid.la -rm -f $RPM_BUILD_ROOT/%{_lib}/libuuid.so -ln -sf /%{_lib}/libuuid.so.1 $RPM_BUILD_ROOT%{_libdir}/libuuid.so +rm -f $RPM_BUILD_ROOT/%{_libdir}/libblkid.la +rm -f $RPM_BUILD_ROOT/%{_libdir}/libuuid.la %ifnarch ppc ppc64 install -m 755 mkzimage_cmdline $RPM_BUILD_ROOT/usr/bin install -m 644 %{S:28} $RPM_BUILD_ROOT%{_mandir}/man8 @@ -432,6 +428,7 @@ fi %config %attr(744,root,root) /etc/init.d/raw %config(noreplace) %attr(644,root,root) /etc/raw %config(noreplace) /etc/filesystems +%config(noreplace) /etc/blkid.conf /bin/dmesg /bin/more /bin/mount @@ -595,7 +592,6 @@ fi %{_mandir}/man8/swapon.8.gz %{_mandir}/man8/umount.8.gz %{_mandir}/man8/setctsid.8.gz -%{_mandir}/man8/setarch.8.gz /usr/sbin/flushb /usr/sbin/readprofile %dir /usr/share/getopt From d1422021c27d97716b4e31cb9df3b1fbf19f3880f5bc8fc0a6fd4442af4e023e Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 2 Oct 2009 21:21:11 +0000 Subject: [PATCH 078/211] Accepting request 21341 from Base:System Copy from Base:System/util-linux based on submit request 21341 from user hennevogel OBS-URL: https://build.opensuse.org/request/show/21341 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=78 --- util-linux-2.14.1-mount_race.patch | 163 ------------------------ util-linux-2.14.1-mount_skip_sync.patch | 20 ++- util-linux.changes | 8 ++ util-linux.spec | 17 +-- 4 files changed, 23 insertions(+), 185 deletions(-) delete mode 100644 util-linux-2.14.1-mount_race.patch diff --git a/util-linux-2.14.1-mount_race.patch b/util-linux-2.14.1-mount_race.patch deleted file mode 100644 index 7c9c1f0..0000000 --- a/util-linux-2.14.1-mount_race.patch +++ /dev/null @@ -1,163 +0,0 @@ -Index: util-linux-ng-2.14.1/mount/fstab.c -=================================================================== ---- util-linux-ng-2.14.1.orig/mount/fstab.c 2008-05-29 01:01:02.000000000 +0200 -+++ util-linux-ng-2.14.1/mount/fstab.c 2009-01-07 12:18:03.000000000 +0100 -@@ -773,8 +773,6 @@ update_mtab (const char *dir, struct my_ - if (mtab_does_not_exist() || !mtab_is_writable()) - return; - -- lock_mtab(); -- - /* having locked mtab, read it again */ - mc0 = mc = &mtabhead; - mc->nxt = mc->prev = NULL; -@@ -893,7 +891,7 @@ update_mtab (const char *dir, struct my_ - } - - leave: -- unlock_mtab(); -+ ; - } - - -Index: util-linux-ng-2.14.1/mount/umount.c -=================================================================== ---- util-linux-ng-2.14.1.orig/mount/umount.c 2008-07-02 15:08:50.000000000 +0200 -+++ util-linux-ng-2.14.1/mount/umount.c 2009-01-07 12:50:48.000000000 +0100 -@@ -102,6 +102,8 @@ check_special_umountprog(const char *spe - if (strlen(type) < 100) { - sprintf(umountprog, "/sbin/umount.%s", type); - if (stat(umountprog, &statbuf) == 0) { -+ /* unlock mtab if we need to exec */ -+ unlock_mtab(); - res = fork(); - if (res == 0) { - char *umountargs[8]; -@@ -383,6 +385,8 @@ umount_all (char *types, char *test_opts - struct mntentchn *mc, *hd; - int errors = 0; - -+ if (!nomtab && mtab_is_writable()) -+ lock_mtab(); - hd = mtab_head(); - if (!hd->prev) - die (2, _("umount: cannot find list of filesystems to unmount")); -@@ -393,6 +397,7 @@ umount_all (char *types, char *test_opts - mc->m.mnt_type, mc->m.mnt_opts, mc); - } - } -+ unlock_mtab(); - - sync (); - return errors; -@@ -463,6 +468,7 @@ umount_file (char *arg) { - const char *file, *options; - int fstab_has_user, fstab_has_users, fstab_has_owner, fstab_has_group; - int ok; -+ int ret; - - if (!*arg) { /* "" would be expanded to `pwd` */ - die(2, _("Cannot umount \"\"\n")); -@@ -473,6 +479,8 @@ umount_file (char *arg) { - if (verbose > 1) - printf(_("Trying to umount %s\n"), file); - -+ if (!nomtab && mtab_is_writable()) -+ lock_mtab(); - mc = getmntdirbackward(file, NULL); - if (!mc) - mc = getmntdevbackward(file, NULL); -@@ -572,9 +580,12 @@ umount_file (char *arg) { - } - - if (mc) -- return umount_one_bw (file, mc); -+ ret = umount_one_bw (file, mc); - else -- return umount_one (arg, arg, arg, arg, NULL); -+ ret = umount_one (arg, arg, arg, arg, NULL); -+ -+ unlock_mtab(); -+ return ret; - } - - int -Index: util-linux-ng-2.14.1/mount/mount.c -=================================================================== ---- util-linux-ng-2.14.1.orig/mount/mount.c 2009-01-07 12:18:03.000000000 +0100 -+++ util-linux-ng-2.14.1/mount/mount.c 2009-01-07 14:40:16.000000000 +0100 -@@ -521,8 +521,6 @@ create_mtab (void) { - int flags; - mntFILE *mfp; - -- lock_mtab(); -- - mfp = my_setmntent (_PATH_MOUNTED, "a+"); - if (mfp == NULL || mfp->mntent_fp == NULL) { - int errsv = errno; -@@ -556,8 +554,6 @@ create_mtab (void) { - } - my_endmntent (mfp); - -- unlock_mtab(); -- - reset_mtab_info(); - } - -@@ -626,6 +622,8 @@ check_special_mountprog(const char *spec - if (strlen(type) < 100) { - sprintf(mountprog, "/sbin/mount.%s", type); - if (stat(mountprog, &statbuf) == 0) { -+ /* unlock mtab if we need to exec */ -+ unlock_mtab(); - if (verbose) - fflush(stdout); - res = fork(); -@@ -1004,7 +1002,6 @@ update_mtab_entry(const char *spec, cons - else { - mntFILE *mfp; - -- lock_mtab(); - mfp = my_setmntent(_PATH_MOUNTED, "a+"); - if (mfp == NULL || mfp->mntent_fp == NULL) { - int errsv = errno; -@@ -1018,7 +1015,6 @@ update_mtab_entry(const char *spec, cons - } - } - my_endmntent(mfp); -- unlock_mtab(); - } - } - my_free(mnt.mnt_fsname); -@@ -1138,12 +1134,15 @@ try_mount_one (const char *spec0, const - - mount_retry: - block_signals (SIG_BLOCK); -+ if (!nomtab && mtab_is_writable()) -+ lock_mtab(); - - if (!fake) { - mnt5_res = guess_fstype_and_mount (spec, node, &types, flags & ~MS_NOSYS, - mount_opts, &special, &status); - - if (special) { -+ unlock_mtab(); - block_signals (SIG_UNBLOCK); - res = status; - goto out; -@@ -1163,6 +1162,7 @@ mount_retry: - pass); - } - -+ unlock_mtab(); - block_signals (SIG_UNBLOCK); - res = 0; - goto out; -@@ -1173,6 +1173,7 @@ mount_retry: - if (loop) - del_loop(spec); - -+ unlock_mtab(); - block_signals (SIG_UNBLOCK); - - /* Mount failed, complain, but don't die. */ diff --git a/util-linux-2.14.1-mount_skip_sync.patch b/util-linux-2.14.1-mount_skip_sync.patch index 7f5a3ab..bc5bdf1 100644 --- a/util-linux-2.14.1-mount_skip_sync.patch +++ b/util-linux-2.14.1-mount_skip_sync.patch @@ -1,27 +1,23 @@ -Index: util-linux-ng-2.14.1/mount/umount.c -=================================================================== ---- util-linux-ng-2.14.1.orig/mount/umount.c 2008-11-20 15:01:09.000000000 +0100 -+++ util-linux-ng-2.14.1/mount/umount.c 2008-11-20 15:04:39.000000000 +0100 -@@ -384,6 +384,7 @@ static int +diff -Nurw util-linux-ng-2.16.orig/mount/umount.c util-linux-ng-2.16/mount/umount.c +--- util-linux-ng-2.16.orig/mount/umount.c 2009-07-04 01:20:06.000000000 +0200 ++++ util-linux-ng-2.16/mount/umount.c 2009-09-29 14:50:44.000000000 +0200 +@@ -361,6 +361,7 @@ umount_all (char *types, char *test_opts) { struct mntentchn *mc, *hd; int errors = 0; + int do_sync = 0; - lock_mtab(); hd = mtab_head(); -@@ -394,11 +395,13 @@ umount_all (char *types, char *test_opts + if (!hd->prev) +@@ -370,9 +371,11 @@ && matching_opts (mc->m.mnt_opts, test_opts)) { errors |= umount_one (mc->m.mnt_fsname, mc->m.mnt_dir, mc->m.mnt_type, mc->m.mnt_opts, mc); -+ do_sync = 1; ++ do_sync = 1; } } - unlock_mtab(); -- sync (); + if (do_sync) -+ sync (); + sync (); return errors; } - diff --git a/util-linux.changes b/util-linux.changes index 6e4743b..42af8cc 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Sep 29 12:58:37 UTC 2009 - hvogel@novell.com + +- finaly remove the mount mtab locking patch: + * util-linux-2.14.1-mount_race.patch + It causes too much regressions. + +------------------------------------------------------------------- Mon Jul 13 14:21:07 CEST 2009 - kay.sievers@novell.com - update to final 2.16 release diff --git a/util-linux.spec b/util-linux.spec index 31b6e20..31177ab 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -29,7 +29,7 @@ License: BSD 3-clause (or similar) ; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.16 -Release: 2 +Release: 3 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -61,15 +61,13 @@ Source51: blkid.conf ## util-linux patches ## # add hostid -Patch2: util-linux-2.12-misc_utils_hostid.patch +Patch0: util-linux-2.12-misc_utils_hostid.patch # 241372 - remove legacy warnings from fdisk -Patch3: util-linux-2.12r-fdisk_remove_bogus_warnings.patch -# bnc#444966 -Patch17: util-linux-2.14.1-mount_race.patch +Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # bnc#447036 -Patch18: util-linux-2.14.1-mount_skip_sync.patch +Patch2: util-linux-2.14.1-mount_skip_sync.patch # crypto patch -Patch30: util-linux-mount_losetup_crypto.patch +Patch3: util-linux-mount_losetup_crypto.patch ## ## adjtimex ## @@ -150,11 +148,10 @@ unique IDs (UUIDs). %lang_package %prep %setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%version +%patch0 -p1 +%patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch17 -p1 -%patch18 -p1 -%patch30 -p1 # cd adjtimex-* %patch50 -p1 From 880e5dc348ae8413894fe604089674df6f49808b0e2f879c7ebc8b0ebf84f500 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Wed, 21 Oct 2009 00:02:09 +0000 Subject: [PATCH 079/211] Accepting request 22629 from Base:System Copy from Base:System/util-linux based on submit request 22629 from user dirkmueller OBS-URL: https://build.opensuse.org/request/show/22629 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=80 --- baselibs.conf | 4 ++++ util-linux.changes | 10 ++++++++++ util-linux.spec | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/baselibs.conf b/baselibs.conf index 4ce6559..5d89a17 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,9 +1,13 @@ libuuid1 libuuid-devel + requires -libuuid- + requires "libuuid1- = " requires -libblkid- requires "libblkid1- = " libblkid1 obsoletes "e2fsprogs- <= " libblkid-devel + requires -libblkid- + requires "libblkid1- = " requires -libuuid- requires "libuuid1- = " diff --git a/util-linux.changes b/util-linux.changes index 42af8cc..820f4e0 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Oct 20 12:14:24 CEST 2009 - dmueller@suse.de + +- fix typo in baselibs.conf change + +------------------------------------------------------------------- +Tue Oct 13 11:23:07 UTC 2009 - aj@suse.de + +- Fix requires of 32-bit devel packages. + ------------------------------------------------------------------- Tue Sep 29 12:58:37 UTC 2009 - hvogel@novell.com diff --git a/util-linux.spec b/util-linux.spec index 31177ab..7f0c6f7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -29,7 +29,7 @@ License: BSD 3-clause (or similar) ; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.16 -Release: 3 +Release: 4 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 From 7f31f0d86d846b8da529bd2234af0736d1d1b66f97669b913d01593af5d9c838 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Tue, 27 Oct 2009 15:47:32 +0000 Subject: [PATCH 080/211] Accepting request 23219 from Base:System Copy from Base:System/util-linux based on submit request 23219 from user dirkmueller OBS-URL: https://build.opensuse.org/request/show/23219 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=81 --- util-linux-ng-bnc503008.patch | 24 ++++++++++++++++++++++++ util-linux.changes | 5 +++++ util-linux.spec | 4 +++- 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-bnc503008.patch diff --git a/util-linux-ng-bnc503008.patch b/util-linux-ng-bnc503008.patch new file mode 100644 index 0000000..1482097 --- /dev/null +++ b/util-linux-ng-bnc503008.patch @@ -0,0 +1,24 @@ +commit fdf08588af55d07a99b411708a08f4ebe6819706 +Author: Theodore Ts'o +Date: Sat Oct 3 12:50:06 2009 -0400 + + lib: fix file descriptor leak in is_mounted() + + Remove an extraneous fopen() that leaks memory and a file descriptor. + + Signed-off-by: "Theodore Ts'o" + +diff --git a/lib/ismounted.c b/lib/ismounted.c +index 28ae325..fbe91f9 100644 +--- a/lib/ismounted.c ++++ b/lib/ismounted.c +@@ -70,9 +70,6 @@ static int check_mntent_file(const char *mtab_file, const char *file, + char buf[1024], *device = 0, *mnt_dir = 0, *cp; + + *mount_flags = 0; +- if ((f = fopen(mtab_file, "r")) == NULL) +- return errno; +- + if ((f = setmntent (mtab_file, "r")) == NULL) + return errno; + if (stat(file, &st_buf) == 0) { diff --git a/util-linux.changes b/util-linux.changes index 820f4e0..cb4f923 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Oct 26 17:45:53 UTC 2009 - crrodriguez@opensuse.org + +- fsck during boot up fails with Too many open files [bnc#503008] + ------------------------------------------------------------------- Tue Oct 20 12:14:24 CEST 2009 - dmueller@suse.de diff --git a/util-linux.spec b/util-linux.spec index 7f0c6f7..8324545 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -29,7 +29,7 @@ License: BSD 3-clause (or similar) ; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.16 -Release: 4 +Release: 5 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -68,6 +68,7 @@ Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch2: util-linux-2.14.1-mount_skip_sync.patch # crypto patch Patch3: util-linux-mount_losetup_crypto.patch +Patch4: util-linux-ng-bnc503008.patch ## ## adjtimex ## @@ -152,6 +153,7 @@ unique IDs (UUIDs). %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # cd adjtimex-* %patch50 -p1 From 32a3f13ab35d67bff051109564f6c0ef770d2000d5c05b37e22f2cdebc00356d Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Mon, 16 Nov 2009 09:02:04 +0000 Subject: [PATCH 081/211] Accepting request 24460 from Base:System Copy from Base:System/util-linux based on submit request 24460 from user msmeissn OBS-URL: https://build.opensuse.org/request/show/24460 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=82 --- util-linux-2.12-misc_utils_hostid.patch | 28 ++--- ...ux-2.12r-fdisk_remove_bogus_warnings.patch | 10 +- util-linux-mount_losetup_crypto.patch | 116 +++++++++--------- util-linux.changes | 5 + util-linux.spec | 2 +- 5 files changed, 81 insertions(+), 80 deletions(-) diff --git a/util-linux-2.12-misc_utils_hostid.patch b/util-linux-2.12-misc_utils_hostid.patch index 5f3dffb..9396acb 100644 --- a/util-linux-2.12-misc_utils_hostid.patch +++ b/util-linux-2.12-misc_utils_hostid.patch @@ -1,7 +1,7 @@ -Index: util-linux-ng-2.14/misc-utils/hostid.1 +Index: util-linux-ng-2.16/misc-utils/hostid.1 =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14/misc-utils/hostid.1 2008-06-24 12:12:17.000000000 +0200 +--- /dev/null ++++ util-linux-ng-2.16/misc-utils/hostid.1 @@ -0,0 +1,24 @@ +.TH hostid 1 +.SH NAME @@ -27,10 +27,10 @@ Index: util-linux-ng-2.14/misc-utils/hostid.1 +.SH SEE ALSO +gethostid(2), sethostid(2) + -Index: util-linux-ng-2.14/misc-utils/hostid.c +Index: util-linux-ng-2.16/misc-utils/hostid.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.14/misc-utils/hostid.c 2008-06-24 12:12:17.000000000 +0200 +--- /dev/null ++++ util-linux-ng-2.16/misc-utils/hostid.c @@ -0,0 +1,88 @@ +/* Program hostid. Changed on 7.10.1997 + New: - Hostid 0 is not permitted. @@ -120,20 +120,20 @@ Index: util-linux-ng-2.14/misc-utils/hostid.c + + return 0; +} -Index: util-linux-ng-2.14/misc-utils/Makefile.am +Index: util-linux-ng-2.16/misc-utils/Makefile.am =================================================================== ---- util-linux-ng-2.14.orig/misc-utils/Makefile.am 2008-05-29 01:01:02.000000000 +0200 -+++ util-linux-ng-2.14/misc-utils/Makefile.am 2008-06-24 12:13:45.000000000 +0200 -@@ -4,7 +4,7 @@ EXTRA_DIST = README.flushb - - bin_PROGRAMS = +--- util-linux-ng-2.16.orig/misc-utils/Makefile.am ++++ util-linux-ng-2.16/misc-utils/Makefile.am +@@ -6,7 +6,7 @@ bin_PROGRAMS = + sbin_PROGRAMS = + usrsbin_exec_PROGRAMS = -usrbin_exec_PROGRAMS = cal ddate logger look mcookie \ +usrbin_exec_PROGRAMS = cal ddate hostid logger look mcookie \ namei script whereis scriptreplay EXTRA_DIST += README.cal README.ddate README.namei README.namei2 -@@ -14,7 +14,7 @@ usrbinexec_SCRIPTS = chkdupexe +@@ -16,7 +16,7 @@ usrbin_exec_SCRIPTS = chkdupexe CLEANFILES = chkdupexe @@ -141,4 +141,4 @@ Index: util-linux-ng-2.14/misc-utils/Makefile.am +dist_man_MANS = cal.1 chkdupexe.1 ddate.1 hostid.1 logger.1 look.1 mcookie.1 \ namei.1 script.1 whereis.1 scriptreplay.1 - if HAVE_TINFO + if BUILD_LIBUUID diff --git a/util-linux-2.12r-fdisk_remove_bogus_warnings.patch b/util-linux-2.12r-fdisk_remove_bogus_warnings.patch index 634cad7..6d8694d 100644 --- a/util-linux-2.12r-fdisk_remove_bogus_warnings.patch +++ b/util-linux-2.12r-fdisk_remove_bogus_warnings.patch @@ -1,8 +1,8 @@ -Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.c +Index: util-linux-ng-2.16/fdisk/fdisk.c =================================================================== ---- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisk.c -+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.c -@@ -1498,6 +1498,7 @@ static void check_consistency(struct par +--- util-linux-ng-2.16.orig/fdisk/fdisk.c ++++ util-linux-ng-2.16/fdisk/fdisk.c +@@ -1586,6 +1586,7 @@ static void check_consistency(struct par /* compute logical ending (c, h, s) */ long2chs(get_start_sect(p) + get_nr_sects(p) - 1, &lec, &leh, &les); @@ -10,7 +10,7 @@ Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.c /* Same physical / logical beginning? */ if (cylinders <= 1024 && (pbc != lbc || pbh != lbh || pbs != lbs)) { printf(_("Partition %d has different physical/logical " -@@ -1514,7 +1515,6 @@ static void check_consistency(struct par +@@ -1602,7 +1603,6 @@ static void check_consistency(struct par printf(_("logical=(%d, %d, %d)\n"),lec, leh, les); } diff --git a/util-linux-mount_losetup_crypto.patch b/util-linux-mount_losetup_crypto.patch index 99aca2d..102a692 100644 --- a/util-linux-mount_losetup_crypto.patch +++ b/util-linux-mount_losetup_crypto.patch @@ -35,10 +35,10 @@ Signed-off-by: Ludwig Nussel sha512.h | 45 +++++ 10 files changed, 1219 insertions(+), 28 deletions(-) -diff --git a/mount/Makefile.am b/mount/Makefile.am -index b0e6374..5d5a682 100644 ---- a/mount/Makefile.am -+++ b/mount/Makefile.am +Index: util-linux-ng-2.16/mount/Makefile.am +=================================================================== +--- util-linux-ng-2.16.orig/mount/Makefile.am ++++ util-linux-ng-2.16/mount/Makefile.am @@ -7,7 +7,8 @@ sbin_PROGRAMS = losetup swapon dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 @@ -49,10 +49,10 @@ index b0e6374..5d5a682 100644 # generic header for mount and umount hdrs_mount = fstab.h mount_mntent.h mount_constants.h \ -diff --git a/mount/lomount.c b/mount/lomount.c -index 1b191ab..5c659cd 100644 ---- a/mount/lomount.c -+++ b/mount/lomount.c +Index: util-linux-ng-2.16/mount/lomount.c +=================================================================== +--- util-linux-ng-2.16.orig/mount/lomount.c ++++ util-linux-ng-2.16/mount/lomount.c @@ -23,6 +23,12 @@ #include "sundries.h" #include "xmalloc.h" @@ -66,7 +66,7 @@ index 1b191ab..5c659cd 100644 #define SIZE(a) (sizeof(a)/sizeof(a[0])) -@@ -394,12 +400,22 @@ show_loop_fd(int fd, char *device) { +@@ -392,12 +398,22 @@ show_loop_fd(int fd, char *device) { if (loopinfo64.lo_encrypt_type || loopinfo64.lo_crypt_name[0]) { @@ -92,7 +92,7 @@ index 1b191ab..5c659cd 100644 } printf("\n"); return 0; -@@ -655,7 +671,7 @@ xgetpass(int pfd, const char *prompt) { +@@ -646,7 +662,7 @@ xgetpass(int pfd, const char *prompt) { } if (pass == NULL) @@ -101,7 +101,7 @@ index 1b191ab..5c659cd 100644 pass[i] = 0; return pass; -@@ -669,6 +685,24 @@ digits_only(const char *s) { +@@ -660,6 +676,24 @@ digits_only(const char *s) { return 1; } @@ -126,7 +126,7 @@ index 1b191ab..5c659cd 100644 /* * return codes: * 0 - success -@@ -677,10 +711,11 @@ digits_only(const char *s) { +@@ -668,10 +702,11 @@ digits_only(const char *s) { */ int set_loop(const char *device, const char *file, unsigned long long offset, @@ -140,7 +140,7 @@ index 1b191ab..5c659cd 100644 char *filename; if (verbose) { -@@ -718,13 +753,37 @@ set_loop(const char *device, const char *file, unsigned long long offset, +@@ -709,13 +744,37 @@ set_loop(const char *device, const char filename = (char *) file; xstrncpy((char *)loopinfo64.lo_file_name, filename, LO_NAME_SIZE); @@ -180,7 +180,7 @@ index 1b191ab..5c659cd 100644 } } -@@ -745,20 +804,70 @@ set_loop(const char *device, const char *file, unsigned long long offset, +@@ -736,20 +795,70 @@ set_loop(const char *device, const char } #endif @@ -263,7 +263,7 @@ index 1b191ab..5c659cd 100644 } if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { -@@ -906,7 +1015,13 @@ usage(void) { +@@ -897,7 +1006,13 @@ usage(void) { fprintf(stderr, _("\nOptions:\n" " -e | --encryption enable data encryption with specified \n" @@ -277,7 +277,7 @@ index 1b191ab..5c659cd 100644 " -o | --offset start at offset into file\n" " --sizelimit loop limited to only bytes of the file\n" " -p | --pass-fd read passphrase from file descriptor \n" -@@ -919,11 +1034,14 @@ usage(void) { +@@ -910,11 +1025,14 @@ usage(void) { int main(int argc, char **argv) { char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc; @@ -292,7 +292,7 @@ index 1b191ab..5c659cd 100644 unsigned long long off, slimit; struct option longopts[] = { { "all", 0, 0, 'a' }, -@@ -932,6 +1050,8 @@ main(int argc, char **argv) { +@@ -923,6 +1041,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -301,7 +301,7 @@ index 1b191ab..5c659cd 100644 { "associated", 1, 0, 'j' }, { "offset", 1, 0, 'o' }, { "sizelimit", 1, 0, 128 }, -@@ -950,12 +1070,13 @@ main(int argc, char **argv) { +@@ -941,12 +1061,13 @@ main(int argc, char **argv) { off = 0; slimit = 0; assoc = offset = sizelimit = encryption = passfd = NULL; @@ -316,7 +316,7 @@ index 1b191ab..5c659cd 100644 longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -980,6 +1101,12 @@ main(int argc, char **argv) { +@@ -971,6 +1092,12 @@ main(int argc, char **argv) { case 'j': assoc = optarg; break; @@ -329,7 +329,7 @@ index 1b191ab..5c659cd 100644 case 'o': offset = optarg; break; -@@ -1065,8 +1192,11 @@ main(int argc, char **argv) { +@@ -1056,8 +1183,11 @@ main(int argc, char **argv) { else { if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(); @@ -342,10 +342,10 @@ index 1b191ab..5c659cd 100644 if (res == 2 && find) { if (verbose) printf(_("stolen loop=%s...trying again\n"), -diff --git a/mount/lomount.h b/mount/lomount.h -index 59108d4..07ab875 100644 ---- a/mount/lomount.h -+++ b/mount/lomount.h +Index: util-linux-ng-2.16/mount/lomount.h +=================================================================== +--- util-linux-ng-2.16.orig/mount/lomount.h ++++ util-linux-ng-2.16/mount/lomount.h @@ -1,5 +1,6 @@ -extern int set_loop(const char *, const char *, unsigned long long, unsigned long long, - const char *, int, int *); @@ -355,10 +355,10 @@ index 59108d4..07ab875 100644 extern int del_loop(const char *); extern int is_loop_device(const char *); extern int is_loop_autoclear(const char *device); -diff --git a/mount/losetup.8 b/mount/losetup.8 -index f5d3e17..226f4f3 100644 ---- a/mount/losetup.8 -+++ b/mount/losetup.8 +Index: util-linux-ng-2.16/mount/losetup.8 +=================================================================== +--- util-linux-ng-2.16.orig/mount/losetup.8 ++++ util-linux-ng-2.16/mount/losetup.8 @@ -94,9 +94,18 @@ find the first unused loop device. If a argument is present, use this device. Otherwise, print its name .IP "\fB\-h, \-\-help\fP" @@ -387,11 +387,11 @@ index f5d3e17..226f4f3 100644 Cryptoloop is deprecated in favor of dm-crypt. For more details see .B cryptsetup(8). -diff --git a/mount/mount.8 b/mount/mount.8 -index 8e17549..ffe3cc5 100644 ---- a/mount/mount.8 -+++ b/mount/mount.8 -@@ -782,6 +782,15 @@ Every time the inode is modified, the i_version field will be incremented. +Index: util-linux-ng-2.16/mount/mount.8 +=================================================================== +--- util-linux-ng-2.16.orig/mount/mount.8 ++++ util-linux-ng-2.16/mount/mount.8 +@@ -782,6 +782,15 @@ Every time the inode is modified, the i_ .B noiversion Do not increment the i_version inode field. .TP @@ -418,10 +418,10 @@ index 8e17549..ffe3cc5 100644 If no explicit loop device is mentioned (but just an option `\fB\-o loop\fP' is given), then -diff --git a/mount/mount.c b/mount/mount.c -index c636e9d..2a69c38 100644 ---- a/mount/mount.c -+++ b/mount/mount.c +Index: util-linux-ng-2.16/mount/mount.c +=================================================================== +--- util-linux-ng-2.16.orig/mount/mount.c ++++ util-linux-ng-2.16/mount/mount.c @@ -95,6 +95,9 @@ struct mountargs { void *data; }; @@ -449,7 +449,7 @@ index c636e9d..2a69c38 100644 { "speed=", 0, &opt_speed }, { "comment=", 1, &opt_comment }, { "uhelper=", 0, &opt_uhelper }, -@@ -1072,7 +1078,8 @@ loop_check(const char **spec, const char **type, int *flags, +@@ -1072,7 +1078,8 @@ loop_check(const char **spec, const char *type = opt_vfstype; } @@ -459,7 +459,7 @@ index c636e9d..2a69c38 100644 *loopfile = *spec; if (*loop) { -@@ -1104,7 +1111,7 @@ loop_check(const char **spec, const char **type, int *flags, +@@ -1104,7 +1111,7 @@ loop_check(const char **spec, const char printf(_("mount: going to use the loop device %s\n"), *loopdev); if ((res = set_loop(*loopdev, *loopfile, offset, sizelimit, @@ -468,7 +468,7 @@ index c636e9d..2a69c38 100644 if (res == 2) { /* loop dev has been grabbed by some other process, try again, if not given explicitly */ -@@ -1861,6 +1868,7 @@ static struct option longopts[] = { +@@ -1865,6 +1872,7 @@ static struct option longopts[] = { { "options", 1, 0, 'o' }, { "test-opts", 1, 0, 'O' }, { "pass-fd", 1, 0, 'p' }, @@ -476,7 +476,7 @@ index c636e9d..2a69c38 100644 { "types", 1, 0, 't' }, { "bind", 0, 0, 'B' }, { "move", 0, 0, 'M' }, -@@ -2022,6 +2030,7 @@ main(int argc, char *argv[]) { +@@ -2026,6 +2034,7 @@ main(int argc, char *argv[]) { char *options = NULL, *test_opts = NULL, *node; const char *spec = NULL; char *label = NULL; @@ -484,7 +484,7 @@ index c636e9d..2a69c38 100644 char *uuid = NULL; char *types = NULL; char *p; -@@ -2052,7 +2061,7 @@ main(int argc, char *argv[]) { +@@ -2056,7 +2065,7 @@ main(int argc, char *argv[]) { initproctitle(argc, argv); #endif @@ -493,7 +493,7 @@ index c636e9d..2a69c38 100644 longopts, NULL)) != -1) { switch (c) { case 'a': /* mount everything in fstab */ -@@ -2073,6 +2082,9 @@ main(int argc, char *argv[]) { +@@ -2077,6 +2086,9 @@ main(int argc, char *argv[]) { case 'i': external_allowed = 0; break; @@ -503,7 +503,7 @@ index c636e9d..2a69c38 100644 case 'l': list_with_volumelabel = 1; break; -@@ -2211,6 +2223,9 @@ main(int argc, char *argv[]) { +@@ -2215,6 +2227,9 @@ main(int argc, char *argv[]) { atexit(unlock_mtab); @@ -513,11 +513,10 @@ index c636e9d..2a69c38 100644 switch (argc+specseen) { case 0: /* mount -a */ -diff --git a/mount/rmd160.c b/mount/rmd160.c -new file mode 100644 -index 0000000..3430954 +Index: util-linux-ng-2.16/mount/rmd160.c +=================================================================== --- /dev/null -+++ b/mount/rmd160.c ++++ util-linux-ng-2.16/mount/rmd160.c @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -1051,11 +1050,10 @@ index 0000000..3430954 + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -diff --git a/mount/rmd160.h b/mount/rmd160.h -new file mode 100644 -index 0000000..4b2c61d +Index: util-linux-ng-2.16/mount/rmd160.h +=================================================================== --- /dev/null -+++ b/mount/rmd160.h ++++ util-linux-ng-2.16/mount/rmd160.h @@ -0,0 +1,11 @@ +#ifndef RMD160_H +#define RMD160_H @@ -1068,11 +1066,10 @@ index 0000000..4b2c61d +#endif /*RMD160_H*/ + + -diff --git a/mount/sha512.c b/mount/sha512.c -new file mode 100644 -index 0000000..f717c8b +Index: util-linux-ng-2.16/mount/sha512.c +=================================================================== --- /dev/null -+++ b/mount/sha512.c ++++ util-linux-ng-2.16/mount/sha512.c @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1506,11 +1503,10 @@ index 0000000..f717c8b + memset(&ctx, 0, sizeof(ctx)); +} +#endif -diff --git a/mount/sha512.h b/mount/sha512.h -new file mode 100644 -index 0000000..4b57c01 +Index: util-linux-ng-2.16/mount/sha512.h +=================================================================== --- /dev/null -+++ b/mount/sha512.h ++++ util-linux-ng-2.16/mount/sha512.h @@ -0,0 +1,45 @@ +/* + * sha512.h diff --git a/util-linux.changes b/util-linux.changes index cb4f923..e0cabea 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Nov 15 14:04:48 CET 2009 - meissner@suse.de + +- refreshed patches with fuzz=0 + ------------------------------------------------------------------- Mon Oct 26 17:45:53 UTC 2009 - crrodriguez@opensuse.org diff --git a/util-linux.spec b/util-linux.spec index 8324545..d908025 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -29,7 +29,7 @@ License: BSD 3-clause (or similar) ; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.16 -Release: 5 +Release: 6 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 From e56d1ef18a4e3db4aab77687a94fa0577c954c91394621a27816d3645f54755f Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 4 Dec 2009 08:56:26 +0000 Subject: [PATCH 082/211] Accepting request 25299 from Base:System Copy from Base:System/util-linux based on submit request 25299 from user msmeissn OBS-URL: https://build.opensuse.org/request/show/25299 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=83 --- util-linux.changes | 5 +++++ util-linux.spec | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index e0cabea..9373009 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Nov 30 17:05:38 CET 2009 - meissner@suse.de + +- exclude sparc correctly -> %sparc bnc#559180 + ------------------------------------------------------------------- Sun Nov 15 14:04:48 CET 2009 - meissner@suse.de diff --git a/util-linux.spec b/util-linux.spec index d908025..caa5b31 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,11 +25,11 @@ Provides: util rawio raw base schedutils uuid-runtime Obsoletes: util rawio raw base schedutils uuid-runtime Supplements: filesystem(minix) PreReq: %install_info_prereq permissions -License: BSD 3-clause (or similar) ; GPL v2 or later +License: BSD3c(or similar) ; GPLv2+ Group: System/Base AutoReqProv: on Version: 2.16 -Release: 6 +Release: 7 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -95,7 +95,7 @@ that are necessary for a Linux system to function. It contains the mount program, the fdisk configuration tool, and more. %package -n libblkid1 -License: GPL v2 or later +License: GPLv2+ Summary: Filesystem detection library Group: System/Filesystems AutoReqProv: on @@ -104,7 +104,7 @@ AutoReqProv: on Library for filesystem detection. %package -n libblkid-devel -License: GPL v2 or later +License: GPLv2+ Summary: Development files for the filesystem detection library Group: Development/Libraries/C and C++ AutoReqProv: on @@ -115,7 +115,7 @@ Files needed to develop applications using the library for filesystem detection. %package -n uuidd -License: GPL v2 or later +License: GPLv2+ Summary: Utilities for the Second Extended File System Group: System/Filesystems AutoReqProv: on @@ -127,7 +127,7 @@ under Linux. Included in this package are: chattr, lsattr, mke2fs, mklost+found, tune2fs, e2fsck, resize2fs, and badblocks. %package -n libuuid1 -License: GPL v2 or later +License: GPLv2+ Summary: Library to generate UUIDs Group: System/Filesystems AutoReqProv: on @@ -136,7 +136,7 @@ AutoReqProv: on A library to generate universally unique IDs (UUIDs). %package -n libuuid-devel -License: GPL v2 or later +License: GPLv2+ Summary: Development files for libuuid1 Group: Development/Libraries/C and C++ AutoReqProv: on @@ -336,7 +336,7 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/hwclock.8* rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/klogconsole.8* rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/tunelp.8* %endif -%ifarch ia64 sparc +%ifarch ia64 %sparc rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/cfdisk.8* rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/sfdisk.8* rm -f $RPM_BUILD_ROOT/sbin/cfdisk @@ -604,7 +604,7 @@ fi /sbin/fdisk %{_mandir}/man8/fdisk.8.gz %endif -%ifnarch sparc ia64 +%ifnarch %sparc ia64 %doc fdisk/README.cfdisk %{_mandir}/man8/cfdisk.8.gz %{_mandir}/man8/sfdisk.8.gz From 5d43b3755bd3299a8fa3a3117965a8595d040a99345ed5b54033aac087f34797 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Tue, 8 Dec 2009 11:52:51 +0000 Subject: [PATCH 083/211] Accepting request 25715 from Base:System Copy from Base:System/util-linux based on submit request 25715 from user msmeissn OBS-URL: https://build.opensuse.org/request/show/25715 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=84 --- util-linux.changes | 5 +++++ util-linux.spec | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index 9373009..4e52c46 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Dec 6 15:07:33 CET 2009 - jengelh@medozas.de + +- enabled parallel build + ------------------------------------------------------------------- Mon Nov 30 17:05:38 CET 2009 - meissner@suse.de diff --git a/util-linux.spec b/util-linux.spec index caa5b31..659a943 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -29,7 +29,7 @@ License: BSD3c(or similar) ; GPLv2+ Group: System/Base AutoReqProv: on Version: 2.16 -Release: 7 +Release: 8 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -174,12 +174,12 @@ cd ../which-* # adjtimex build cd adjtimex-%{adjtimex_ver} CFLAGS="$RPM_OPT_FLAGS" ./configure -make +make %{?jobs:-j%jobs} cd .. pushd ../ # freeramdisk build cd freeramdisk -make CFLAGS="$RPM_OPT_FLAGS" freeramdisk +make %{?jobs:-j%jobs} CFLAGS="$RPM_OPT_FLAGS" freeramdisk cd .. # which build cd which-%{which_ver} @@ -192,7 +192,7 @@ CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ %{_target_cpu}-suse-linux -make +make %{?jobs:-j%jobs} cd .. # time build cd time-%{time_ver} @@ -202,16 +202,16 @@ CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE " INSTALL_PROGRAM='$(INSTALL)' \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ %{_target_cpu}-suse-linux -make +make %{?jobs:-j%jobs} cd .. # klogconsole build cd klogconsole -make CFLAGS="$RPM_OPT_FLAGS" +make %{?jobs:-j%jobs} CFLAGS="$RPM_OPT_FLAGS" cd .. popd # setctsid build rm -f setctsid -make setctsid CFLAGS="$RPM_OPT_FLAGS" +make %{?jobs:-j%jobs} setctsid CFLAGS="$RPM_OPT_FLAGS" # # util-linux itself # @@ -241,7 +241,7 @@ autoreconf -fi --disable-static \ $BUILD_ENABLE \ CFLAGS="$CFLAGS $RPM_OPT_FLAGS" -make +make %{?jobs:-j%jobs} gcc $RPM_OPT_FLAGS -o nologin nologin.c gcc $RPM_OPT_FLAGS -o mkzimage_cmdline %{S:29} gcc $RPM_OPT_FLAGS -o chrp-addnote %{SOURCE31} From d23a9286bf69029d0ac8471204255d593e1d58240aa9e66596598a9a198e8b31 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Wed, 16 Dec 2009 07:59:34 +0000 Subject: [PATCH 084/211] Accepting request 26627 from Base:System Copy from Base:System/util-linux based on submit request 26627 from user msmeissn OBS-URL: https://build.opensuse.org/request/show/26627 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=85 --- util-linux.changes | 5 +++++ util-linux.spec | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/util-linux.changes b/util-linux.changes index 4e52c46..92935a0 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Dec 13 15:19:16 CET 2009 - jengelh@medozas.de + +- add baselibs.conf as a source + ------------------------------------------------------------------- Sun Dec 6 15:07:33 CET 2009 - jengelh@medozas.de diff --git a/util-linux.spec b/util-linux.spec index 659a943..1a0cb28 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -29,7 +29,7 @@ License: BSD3c(or similar) ; GPLv2+ Group: System/Base AutoReqProv: on Version: 2.16 -Release: 8 +Release: 9 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -39,6 +39,7 @@ Source3: nologin.8 Source4: raw.init Source5: etc.raw Source6: etc_filesystems +Source7: baselibs.conf %define time_ver 1.7 %define which_ver 2.19 %define adjtimex_ver 1.20 From 856b22da49d9944202278cca5299e8016303a17b68c15de43eb7158afbc70377 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 25 Feb 2010 10:23:43 +0000 Subject: [PATCH 085/211] Accepting request 33360 from Base:System Copy from Base:System/util-linux based on submit request 33360 from user msmeissn OBS-URL: https://build.opensuse.org/request/show/33360 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=86 --- ...il-linux-2.17.1-mount_losetup_crypto.patch | 160 ++++++++++-------- util-linux-ng-2.16.tar.bz2 | 3 - util-linux-ng-2.17.1.tar.bz2 | 3 + util-linux-ng-bnc503008.patch | 24 --- util-linux.changes | 13 ++ util-linux.spec | 65 ++++--- 6 files changed, 139 insertions(+), 129 deletions(-) rename util-linux-mount_losetup_crypto.patch => util-linux-2.17.1-mount_losetup_crypto.patch (93%) delete mode 100644 util-linux-ng-2.16.tar.bz2 create mode 100644 util-linux-ng-2.17.1.tar.bz2 delete mode 100644 util-linux-ng-bnc503008.patch diff --git a/util-linux-mount_losetup_crypto.patch b/util-linux-2.17.1-mount_losetup_crypto.patch similarity index 93% rename from util-linux-mount_losetup_crypto.patch rename to util-linux-2.17.1-mount_losetup_crypto.patch index 102a692..24cd77c 100644 --- a/util-linux-mount_losetup_crypto.patch +++ b/util-linux-2.17.1-mount_losetup_crypto.patch @@ -1,4 +1,4 @@ -From a062df268df66641ed94d5c0e968e92c67b585e4 Mon Sep 17 00:00:00 2001 +From 2d5b9e07d5b8dd698d83a6702906eefc834a9af5 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Thu, 29 Nov 2007 17:46:36 +0100 Subject: [PATCH] losetup: support password hashing and specifying the key length @@ -22,23 +22,26 @@ sha512.c is from loop-AES. Signed-off-by: Ludwig Nussel --- - - Makefile.am | 3 - lomount.c | 174 +++++++++++++++++-- - lomount.h | 5 - losetup.8 | 11 + - mount.8 | 13 + - mount.c | 21 ++ - rmd160.c | 532 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - rmd160.h | 11 + - sha512.c | 432 ++++++++++++++++++++++++++++++++++++++++++++++++ - sha512.h | 45 +++++ + mount/Makefile.am | 3 +- + mount/lomount.c | 174 +++++++++++++++--- + mount/lomount.h | 5 +- + mount/losetup.8 | 11 + + mount/mount.8 | 13 ++ + mount/mount.c | 21 ++- + mount/rmd160.c | 532 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + mount/rmd160.h | 11 + + mount/sha512.c | 432 +++++++++++++++++++++++++++++++++++++++++++ + mount/sha512.h | 45 +++++ 10 files changed, 1219 insertions(+), 28 deletions(-) + create mode 100644 mount/rmd160.c + create mode 100644 mount/rmd160.h + create mode 100644 mount/sha512.c + create mode 100644 mount/sha512.h -Index: util-linux-ng-2.16/mount/Makefile.am -=================================================================== ---- util-linux-ng-2.16.orig/mount/Makefile.am -+++ util-linux-ng-2.16/mount/Makefile.am +diff --git a/mount/Makefile.am b/mount/Makefile.am +index c5f58aa..43ff01a 100644 +--- a/mount/Makefile.am ++++ b/mount/Makefile.am @@ -7,7 +7,8 @@ sbin_PROGRAMS = losetup swapon dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 @@ -49,10 +52,10 @@ Index: util-linux-ng-2.16/mount/Makefile.am # generic header for mount and umount hdrs_mount = fstab.h mount_mntent.h mount_constants.h \ -Index: util-linux-ng-2.16/mount/lomount.c -=================================================================== ---- util-linux-ng-2.16.orig/mount/lomount.c -+++ util-linux-ng-2.16/mount/lomount.c +diff --git a/mount/lomount.c b/mount/lomount.c +index 67712c6..a0b951c 100644 +--- a/mount/lomount.c ++++ b/mount/lomount.c @@ -23,6 +23,12 @@ #include "sundries.h" #include "xmalloc.h" @@ -64,9 +67,9 @@ Index: util-linux-ng-2.16/mount/lomount.c +#define MIN(a,b) ((a enable data encryption with specified \n" @@ -277,7 +280,7 @@ Index: util-linux-ng-2.16/mount/lomount.c " -o | --offset start at offset into file\n" " --sizelimit loop limited to only bytes of the file\n" " -p | --pass-fd read passphrase from file descriptor \n" -@@ -910,11 +1025,14 @@ usage(void) { +@@ -908,11 +1023,14 @@ usage(void) { int main(int argc, char **argv) { char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc; @@ -292,7 +295,7 @@ Index: util-linux-ng-2.16/mount/lomount.c unsigned long long off, slimit; struct option longopts[] = { { "all", 0, 0, 'a' }, -@@ -923,6 +1041,8 @@ main(int argc, char **argv) { +@@ -921,6 +1039,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -301,7 +304,7 @@ Index: util-linux-ng-2.16/mount/lomount.c { "associated", 1, 0, 'j' }, { "offset", 1, 0, 'o' }, { "sizelimit", 1, 0, 128 }, -@@ -941,12 +1061,13 @@ main(int argc, char **argv) { +@@ -939,12 +1059,13 @@ main(int argc, char **argv) { off = 0; slimit = 0; assoc = offset = sizelimit = encryption = passfd = NULL; @@ -316,7 +319,7 @@ Index: util-linux-ng-2.16/mount/lomount.c longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -971,6 +1092,12 @@ main(int argc, char **argv) { +@@ -969,6 +1090,12 @@ main(int argc, char **argv) { case 'j': assoc = optarg; break; @@ -329,7 +332,7 @@ Index: util-linux-ng-2.16/mount/lomount.c case 'o': offset = optarg; break; -@@ -1056,8 +1183,11 @@ main(int argc, char **argv) { +@@ -1054,8 +1181,11 @@ main(int argc, char **argv) { else { if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(); @@ -342,10 +345,10 @@ Index: util-linux-ng-2.16/mount/lomount.c if (res == 2 && find) { if (verbose) printf(_("stolen loop=%s...trying again\n"), -Index: util-linux-ng-2.16/mount/lomount.h -=================================================================== ---- util-linux-ng-2.16.orig/mount/lomount.h -+++ util-linux-ng-2.16/mount/lomount.h +diff --git a/mount/lomount.h b/mount/lomount.h +index 59108d4..07ab875 100644 +--- a/mount/lomount.h ++++ b/mount/lomount.h @@ -1,5 +1,6 @@ -extern int set_loop(const char *, const char *, unsigned long long, unsigned long long, - const char *, int, int *); @@ -355,11 +358,11 @@ Index: util-linux-ng-2.16/mount/lomount.h extern int del_loop(const char *); extern int is_loop_device(const char *); extern int is_loop_autoclear(const char *device); -Index: util-linux-ng-2.16/mount/losetup.8 -=================================================================== ---- util-linux-ng-2.16.orig/mount/losetup.8 -+++ util-linux-ng-2.16/mount/losetup.8 -@@ -94,9 +94,18 @@ find the first unused loop device. If a +diff --git a/mount/losetup.8 b/mount/losetup.8 +index 8ccab6c..8566898 100644 +--- a/mount/losetup.8 ++++ b/mount/losetup.8 +@@ -92,9 +92,18 @@ find the first unused loop device. If a argument is present, use this device. Otherwise, print its name .IP "\fB\-h, \-\-help\fP" print help @@ -378,7 +381,7 @@ Index: util-linux-ng-2.16/mount/losetup.8 .IP "\fB\-o, \-\-offset \fIoffset\fP" the data start is moved \fIoffset\fP bytes into the specified file or device -@@ -167,6 +176,8 @@ the command +@@ -165,6 +174,8 @@ the command .fi .SH RESTRICTION DES encryption is painfully slow. On the other hand, XOR is terribly weak. @@ -386,12 +389,12 @@ Index: util-linux-ng-2.16/mount/losetup.8 +allowed to use them. Cryptoloop is deprecated in favor of dm-crypt. For more details see - .B cryptsetup(8). -Index: util-linux-ng-2.16/mount/mount.8 -=================================================================== ---- util-linux-ng-2.16.orig/mount/mount.8 -+++ util-linux-ng-2.16/mount/mount.8 -@@ -782,6 +782,15 @@ Every time the inode is modified, the i_ + .BR cryptsetup (8). +diff --git a/mount/mount.8 b/mount/mount.8 +index 2888b46..582898a 100644 +--- a/mount/mount.8 ++++ b/mount/mount.8 +@@ -826,6 +826,15 @@ Every time the inode is modified, the i_version field will be incremented. .B noiversion Do not increment the i_version inode field. .TP @@ -407,7 +410,7 @@ Index: util-linux-ng-2.16/mount/mount.8 .B mand Allow mandatory locks on this filesystem. See .BR fcntl (2). -@@ -2390,6 +2399,10 @@ that are really options to +@@ -2525,6 +2534,10 @@ that are really options to .BR \%losetup (8). (These options can be used in addition to those specific to the filesystem type.) @@ -418,10 +421,10 @@ Index: util-linux-ng-2.16/mount/mount.8 If no explicit loop device is mentioned (but just an option `\fB\-o loop\fP' is given), then -Index: util-linux-ng-2.16/mount/mount.c -=================================================================== ---- util-linux-ng-2.16.orig/mount/mount.c -+++ util-linux-ng-2.16/mount/mount.c +diff --git a/mount/mount.c b/mount/mount.c +index efe1165..09006f7 100644 +--- a/mount/mount.c ++++ b/mount/mount.c @@ -95,6 +95,9 @@ struct mountargs { void *data; }; @@ -438,9 +441,9 @@ Index: util-linux-ng-2.16/mount/mount.c *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper; +static const char *opt_keybits, *opt_phash; + static int is_readonly(const char *node); static int mounted (const char *spec0, const char *node0); - static int check_special_mountprog(const char *spec, const char *node, -@@ -215,6 +219,8 @@ static struct string_opt_map { +@@ -216,6 +220,8 @@ static struct string_opt_map { { "offset=", 0, &opt_offset }, { "sizelimit=", 0, &opt_sizelimit }, { "encryption=", 0, &opt_encryption }, @@ -449,7 +452,7 @@ Index: util-linux-ng-2.16/mount/mount.c { "speed=", 0, &opt_speed }, { "comment=", 1, &opt_comment }, { "uhelper=", 0, &opt_uhelper }, -@@ -1072,7 +1078,8 @@ loop_check(const char **spec, const char +@@ -1081,7 +1087,8 @@ loop_check(const char **spec, const char **type, int *flags, *type = opt_vfstype; } @@ -459,7 +462,7 @@ Index: util-linux-ng-2.16/mount/mount.c *loopfile = *spec; if (*loop) { -@@ -1104,7 +1111,7 @@ loop_check(const char **spec, const char +@@ -1113,7 +1120,7 @@ loop_check(const char **spec, const char **type, int *flags, printf(_("mount: going to use the loop device %s\n"), *loopdev); if ((res = set_loop(*loopdev, *loopfile, offset, sizelimit, @@ -468,7 +471,7 @@ Index: util-linux-ng-2.16/mount/mount.c if (res == 2) { /* loop dev has been grabbed by some other process, try again, if not given explicitly */ -@@ -1865,6 +1872,7 @@ static struct option longopts[] = { +@@ -1920,6 +1927,7 @@ static struct option longopts[] = { { "options", 1, 0, 'o' }, { "test-opts", 1, 0, 'O' }, { "pass-fd", 1, 0, 'p' }, @@ -476,7 +479,7 @@ Index: util-linux-ng-2.16/mount/mount.c { "types", 1, 0, 't' }, { "bind", 0, 0, 'B' }, { "move", 0, 0, 'M' }, -@@ -2026,6 +2034,7 @@ main(int argc, char *argv[]) { +@@ -2082,6 +2090,7 @@ main(int argc, char *argv[]) { char *options = NULL, *test_opts = NULL, *node; const char *spec = NULL; char *label = NULL; @@ -484,7 +487,7 @@ Index: util-linux-ng-2.16/mount/mount.c char *uuid = NULL; char *types = NULL; char *p; -@@ -2056,7 +2065,7 @@ main(int argc, char *argv[]) { +@@ -2112,7 +2121,7 @@ main(int argc, char *argv[]) { initproctitle(argc, argv); #endif @@ -493,7 +496,7 @@ Index: util-linux-ng-2.16/mount/mount.c longopts, NULL)) != -1) { switch (c) { case 'a': /* mount everything in fstab */ -@@ -2077,6 +2086,9 @@ main(int argc, char *argv[]) { +@@ -2133,6 +2142,9 @@ main(int argc, char *argv[]) { case 'i': external_allowed = 0; break; @@ -503,7 +506,7 @@ Index: util-linux-ng-2.16/mount/mount.c case 'l': list_with_volumelabel = 1; break; -@@ -2215,6 +2227,9 @@ main(int argc, char *argv[]) { +@@ -2280,6 +2292,9 @@ main(int argc, char *argv[]) { atexit(unlock_mtab); @@ -513,10 +516,11 @@ Index: util-linux-ng-2.16/mount/mount.c switch (argc+specseen) { case 0: /* mount -a */ -Index: util-linux-ng-2.16/mount/rmd160.c -=================================================================== +diff --git a/mount/rmd160.c b/mount/rmd160.c +new file mode 100644 +index 0000000..3430954 --- /dev/null -+++ util-linux-ng-2.16/mount/rmd160.c ++++ b/mount/rmd160.c @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -1050,10 +1054,11 @@ Index: util-linux-ng-2.16/mount/rmd160.c + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -Index: util-linux-ng-2.16/mount/rmd160.h -=================================================================== +diff --git a/mount/rmd160.h b/mount/rmd160.h +new file mode 100644 +index 0000000..4b2c61d --- /dev/null -+++ util-linux-ng-2.16/mount/rmd160.h ++++ b/mount/rmd160.h @@ -0,0 +1,11 @@ +#ifndef RMD160_H +#define RMD160_H @@ -1066,10 +1071,11 @@ Index: util-linux-ng-2.16/mount/rmd160.h +#endif /*RMD160_H*/ + + -Index: util-linux-ng-2.16/mount/sha512.c -=================================================================== +diff --git a/mount/sha512.c b/mount/sha512.c +new file mode 100644 +index 0000000..f717c8b --- /dev/null -+++ util-linux-ng-2.16/mount/sha512.c ++++ b/mount/sha512.c @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1503,10 +1509,11 @@ Index: util-linux-ng-2.16/mount/sha512.c + memset(&ctx, 0, sizeof(ctx)); +} +#endif -Index: util-linux-ng-2.16/mount/sha512.h -=================================================================== +diff --git a/mount/sha512.h b/mount/sha512.h +new file mode 100644 +index 0000000..4b57c01 --- /dev/null -+++ util-linux-ng-2.16/mount/sha512.h ++++ b/mount/sha512.h @@ -0,0 +1,45 @@ +/* + * sha512.h @@ -1553,3 +1560,6 @@ Index: util-linux-ng-2.16/mount/sha512.h +/* no sha384_write(), use sha512_write() */ +/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ +extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); +-- +1.6.4.2 + diff --git a/util-linux-ng-2.16.tar.bz2 b/util-linux-ng-2.16.tar.bz2 deleted file mode 100644 index 93b374e..0000000 --- a/util-linux-ng-2.16.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a6365fcb2b34439faa52164e1a018086c2b6818f8a189c487c79e09dc3c62722 -size 3470040 diff --git a/util-linux-ng-2.17.1.tar.bz2 b/util-linux-ng-2.17.1.tar.bz2 new file mode 100644 index 0000000..d859108 --- /dev/null +++ b/util-linux-ng-2.17.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9c019ea3782dc20b82d27c1240009f9e194304a77ac36f51629a487a5181390 +size 3801027 diff --git a/util-linux-ng-bnc503008.patch b/util-linux-ng-bnc503008.patch deleted file mode 100644 index 1482097..0000000 --- a/util-linux-ng-bnc503008.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit fdf08588af55d07a99b411708a08f4ebe6819706 -Author: Theodore Ts'o -Date: Sat Oct 3 12:50:06 2009 -0400 - - lib: fix file descriptor leak in is_mounted() - - Remove an extraneous fopen() that leaks memory and a file descriptor. - - Signed-off-by: "Theodore Ts'o" - -diff --git a/lib/ismounted.c b/lib/ismounted.c -index 28ae325..fbe91f9 100644 ---- a/lib/ismounted.c -+++ b/lib/ismounted.c -@@ -70,9 +70,6 @@ static int check_mntent_file(const char *mtab_file, const char *file, - char buf[1024], *device = 0, *mnt_dir = 0, *cp; - - *mount_flags = 0; -- if ((f = fopen(mtab_file, "r")) == NULL) -- return errno; -- - if ((f = setmntent (mtab_file, "r")) == NULL) - return errno; - if (stat(file, &st_buf) == 0) { diff --git a/util-linux.changes b/util-linux.changes index 92935a0..b2dd388 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Tue Feb 23 12:46:07 UTC 2010 - lnussel@suse.de + +- new version 2.17.1 + - new commands: wipefs, unshare, fallocate + - fdisk: DOS-compatible mode marked deprecated + - honor nofail option in fsck + - libblkid overhaul + - lots of bug fixes +- fix self-obsoletes +- compile suid programs using -fpie +- drop -DCONFIG_SMP for s390 as it doesn't seem to be used anyways + ------------------------------------------------------------------- Sun Dec 13 15:19:16 CET 2009 - jengelh@medozas.de diff --git a/util-linux.spec b/util-linux.spec index 1a0cb28..8b7123f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # -# spec file for package util-linux (Version 2.16) +# spec file for package util-linux (Version 2.17.1) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,18 +21,16 @@ Name: util-linux BuildRequires: audit-devel gettext-devel pkg-config BuildRequires: libselinux-devel libsepol-devel ncurses-devel pam-devel readline-devel zlib-devel Url: http://userweb.kernel.org/~kzak/util-linux-ng/ -Provides: util rawio raw base schedutils uuid-runtime -Obsoletes: util rawio raw base schedutils uuid-runtime Supplements: filesystem(minix) PreReq: %install_info_prereq permissions License: BSD3c(or similar) ; GPLv2+ Group: System/Base AutoReqProv: on -Version: 2.16 -Release: 9 -Requires: %name-lang = %{version} +Version: 2.17.1 +Release: 1 +Recommends: %name-lang = %{version} Summary: A collection of basic system utilities -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2 Source1: util-linux-rpmlintrc Source2: nologin.c Source3: nologin.8 @@ -43,33 +41,39 @@ Source7: baselibs.conf %define time_ver 1.7 %define which_ver 2.19 %define adjtimex_ver 1.20 +# XXX: post upstream? Source9: adjtimex-%{adjtimex_ver}.tar.bz2 +# XXX: DROP? Source10: freeramdisk.tar.bz2 +# XXX: post upstream? Source11: klogconsole.tar.bz2 +# TODO: split to separate package Source12: which-%{which_ver}.tar.bz2 +# TODO: split to separate package Source13: time-%{time_ver}.tar.bz2 -Source15: cryptoloop.txt +# XXX: needed? Source22: setctsid.c Source23: setctsid.8 -Source26: README.raw +# XXX: ppc specific, still needed? Source28: mkzimage_cmdline.8 Source29: mkzimage_cmdline.c -Source30: README.largedisk Source31: addnote.c +# +Source26: README.raw +Source30: README.largedisk Source50: uuidd.rc Source51: blkid.conf ## ## util-linux patches ## -# add hostid +# add hostid. FIXME: use the one from coreutils Patch0: util-linux-2.12-misc_utils_hostid.patch # 241372 - remove legacy warnings from fdisk Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # bnc#447036 Patch2: util-linux-2.14.1-mount_skip_sync.patch # crypto patch -Patch3: util-linux-mount_losetup_crypto.patch -Patch4: util-linux-ng-bnc503008.patch +Patch3: util-linux-2.17.1-mount_losetup_crypto.patch ## ## adjtimex ## @@ -89,6 +93,9 @@ Patch60: time-1.7.dif Patch70: which-lib64.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed +# +Provides: util = %{version}-%{release} rawio = %{version}-%{release} raw = %{version}-%{release} base = %{version}-%{release} schedutils = %{version}-%{release} uuid-runtime = %{version}-%{release} +Obsoletes: util < %{version}-%{release} rawio < %{version}-%{release} raw < %{version}-%{release} base < %{version}-%{release} schedutils < %{version}-%{release} uuid-runtime < %{version}-%{release} %description This package contains a large variety of low-level system utilities @@ -154,7 +161,6 @@ unique IDs (UUIDs). %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 # cd adjtimex-* %patch50 -p1 @@ -162,7 +168,7 @@ cd - # setctsid cp %{S:22} %{S:23} . # nologin -cp %{S:2} %{S:3} %{S:15} %{S:26} %{S:30} . +cp %{S:2} %{S:3} %{S:26} %{S:30} . cd ../klogconsole %patch55 -p1 -b .quiet %patch56 -p1 @@ -216,15 +222,10 @@ make %{?jobs:-j%jobs} setctsid CFLAGS="$RPM_OPT_FLAGS" # # util-linux itself # -%ifarch s390 s390x -CFLAGS=-DCONFIG_SMP -%endif -# architecture dependent builds -BUILD_ENABLE= -%ifarch %ix86 x86_64 -BUILD_ENABLE="--enable-rdev" -%endif autoreconf -fi +export SUID_CFLAGS="-fpie" +export SUID_LDFLAGS="-pie" +CFLAGS="$RPM_OPT_FLAGS" \ ./configure \ --mandir=%{_mandir} \ --datadir=%{_datadir} \ @@ -240,9 +241,12 @@ autoreconf -fi --enable-write \ --disable-use-tty-group \ --disable-static \ - $BUILD_ENABLE \ - CFLAGS="$CFLAGS $RPM_OPT_FLAGS" +%ifarch %ix86 x86_64 + --enable-rdev \ +%endif +# make %{?jobs:-j%jobs} +# gcc $RPM_OPT_FLAGS -o nologin nologin.c gcc $RPM_OPT_FLAGS -o mkzimage_cmdline %{S:29} gcc $RPM_OPT_FLAGS -o chrp-addnote %{SOURCE31} @@ -361,7 +365,8 @@ rm -rf $RPM_BUILD_ROOT %post %{fillup_and_insserv raw} -%install_info --entry="* freeramdisk: (freeramdisk). tell kernel to free allocated memory for ramdisk" --info-dir=%{_infodir} %{_infodir}/freeramdisk.info.gz +txt='* freeramdisk: (freeramdisk). tell kernel to free allocated memory for ramdisk' +%install_info --entry="$txt" --info-dir=%{_infodir} %{_infodir}/freeramdisk.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %install_info --entry="* time: (time). summarizing used system resources" --info-dir=%{_infodir} %{_infodir}/time.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/which.info.gz @@ -455,6 +460,7 @@ fi /sbin/findfs /sbin/fsck /sbin/switch_root +/sbin/wipefs /usr/bin/ipcmk /bin/logger /usr/bin/cal @@ -464,6 +470,7 @@ fi /usr/bin/colrm /usr/bin/column /usr/bin/ddate +/usr/bin/fallocate /usr/bin/flock /usr/bin/getopt /usr/bin/hexdump @@ -496,6 +503,7 @@ fi /usr/bin/tailf /usr/bin/taskset /usr/bin/time +/usr/bin/unshare /usr/bin/which /usr/sbin/addpart /usr/sbin/delpart @@ -524,6 +532,7 @@ fi %{_mandir}/man1/column.1.gz %{_mandir}/man1/ddate.1.gz %{_mandir}/man1/dmesg.1.gz +%{_mandir}/man1/fallocate.1.gz %{_mandir}/man1/flock.1.gz %{_mandir}/man1/getopt.1.gz %{_mandir}/man1/hexdump.1.gz @@ -550,6 +559,7 @@ fi %{_mandir}/man1/tailf.1.gz %{_mandir}/man1/taskset.1.gz %{_mandir}/man1/ul.1.gz +%{_mandir}/man1/unshare.1.gz %{_mandir}/man1/wall.1.gz %{_mandir}/man1/whereis.1.gz %{_mandir}/man1/write.1.gz @@ -592,6 +602,7 @@ fi %{_mandir}/man8/swapon.8.gz %{_mandir}/man8/umount.8.gz %{_mandir}/man8/setctsid.8.gz +%{_mandir}/man8/wipefs.8.gz /usr/sbin/flushb /usr/sbin/readprofile %dir /usr/share/getopt From 4e5375e517a032b2626cedfc0223e595869c64d206d8e7f30b3efe91bb5d54d5 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 12 Mar 2010 15:45:47 +0000 Subject: [PATCH 086/211] Accepting request 34654 from Base:System Copy from Base:System/util-linux based on submit request 34654 from user coolo OBS-URL: https://build.opensuse.org/request/show/34654 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=87 --- cryptoloop.txt | 169 ------------------ freeramdisk.tar.bz2 | 3 - util-linux-2.12-misc_utils_hostid.patch | 144 --------------- ...x-2.17.1-losetup-honor-documented-c-option | 26 +++ util-linux.changes | 11 ++ util-linux.spec | 28 +-- 6 files changed, 42 insertions(+), 339 deletions(-) delete mode 100644 cryptoloop.txt delete mode 100644 freeramdisk.tar.bz2 delete mode 100644 util-linux-2.12-misc_utils_hostid.patch create mode 100644 util-linux-2.17.1-losetup-honor-documented-c-option diff --git a/cryptoloop.txt b/cryptoloop.txt deleted file mode 100644 index b20a53e..0000000 --- a/cryptoloop.txt +++ /dev/null @@ -1,169 +0,0 @@ -cryptoloop - a generic cryptographic loop device filter -======================================================= - -To enable cryptoloop, you must fetch the cryptoloop-version.tar.gz source from -your kernel.org mirror or directly from the non-US . - -Quickstart -~~~~~~~~~~ - -(if you have old encrypted volumes, please read the section about -conversion below) - -you need a kernel compiled with - *) loop device driver - *) cryptographic support - *) generic crypto loop filter - *) one or more ciphers you want to use for encryption either as module or - statically (if you build them as module, don't forget to insmod them!) - -Download the cryptoloop latest version tarball from the Internet and enter -the untarred directory. The following commands will patch your kernel and -copy the cryptoloop source in. - - $ make patch-kernel KDIR=/your/kernel/source LOOP=[iv or jari] - -Which will patch your kernel, and enable you to select cryptoloop in the -Cryptography section of the kernel configuration. Note, you have to manually -enable both CryptoAPI and cryptoloop in your kernel configuration. - -If you would rather build modules you can use the following commands. - - $ make modules KDIR=/your/kernel/source CDIR=/cryptoapi/source \ - LOOP=[iv or jari] - $ make modules_install KDIR=/your/kernel/source - -You also need a util-linux patched package (see - for some recent -patches) - -Read on at - - -How Loopback Encryption Works -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Here is a small overview of how the loopback filesystem encryption works. -For all the of the data to be encrypted on a drive we need to interrupt the -disk write/read *after* the filesystem meta data is attached. Instead of hi- -jacking the system call we pipe the the filesystem commands through a loopback -device. - One advantage of this is that you can either encrypt a device(hard drive) or -a file already on a drive and mount it as a file system. This allows you to -have encrypted folders on an unencrypted drive, useful if you don't want to -encrypt everything. - - The loopback device fits in like this: - - device-->loop-->mountpoint - - The loop stage is actually divided into a couple stages, which is why the -cryptoloop module is included. It splits the input and output from the -loopback into pieces for the ciphers. Since they operate on a specific -blocksize(i.e. 64-bits, 128-bits) the data must be chopped up for them. - - device-->cryptoloop-->loop-->mountpoint - - The cryptoloop module is also where the actual encryption and decryption of -the data takes place. - -Some words about IV Calculation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -There are some problems with the IV calculation up to recent 2.4.x -linux kernels. It's been calculated more or less by - -IV = rel_sector / (blocksize >> 9) + (lo_offset / blocksize) - -The first problem which arises, is that data transfers are not always -guaranteed to have a size of an integral multiple of the blocksize; -This is a problem, because of CBC mode's property of needing the -complete ciphertext block, i.e. you can't cipher or decipher only the -2nd half of a block if you don't know the first half of it! - -Another problem which may be experienced is, when the soft blocksize -changes, i.e. due to different medias, as CDROM block devices and -alike, or when the filesystem layer sets the blocksize to some other -size. - -But there's hope, as all transfer sizes are usually (except for the -last block on file backed loop devices sometimes...) an integral -multiple of 512 byte units (which is linux' atomic sector size); - -So the solution is to stick to a portable, uniform 512 byte based IV -metric! Alas this can't be accomplished without modifying the loop -driver, as the more granular IV metric can't be calculated from the -current dynamic IV metric. - -This change also renders most previously used encrypted volumes -unreadable, which need to be converted to the new IV metric. - -Converting from Older IV Metrics -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The recommended procedure is as follow, in case you don't want to -backup your old data in a conventional manner, and then restore it to -a freshly created encrypted volume with the new IV-metric. - -The more valuable your data is, the more important it is, that you try -the following procedure with some dummy data, before risking your real -data! Cause if something goes wrong you'll have to keep both pieces... - -1) decrypt from within your old kernel version - - 1.1) setup your encrypted loop device, and mount it (this is also - important for making sure, the filesystem layer sets the soft block - size accordingly!) - - 1.2) unmount the filesystem (but leave the loop device setted up) - - 1.3) dd if=/dev/loop0 of=/dev/ make sure - the process does not get interrupted, otherwise you will have a hard - time, reconstructing your data, since you are decrypting the data - back to the same area where the ciphertext was. - -3) make sure the block/file contains the properly deciphered content!! - -2) boot the new kernel featuring the 512byte based IV - follow the instructions for 'encrypting unencrypted volumes' below - - -Encrypting Unencrypted Volumes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -just as simple as that (please test this before trying on important data) - - 1) set up a new encrypted loop device over the still unencrypted data - 2) dd if=/dev/ of=/dev/loop0 - - -Migrating from loop-AES to CryptoAPI -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - If you want to move from using the loop-AES filesystem encryption to -CryptoAPI it only requires a small tweak. After loading cryptoapi and loading -the cipher-aes module use the following line when setting up your loopback -device: - - $ losetup -e aes -k 256 -P sha512 /dev/loop0 /dev/ - -Then proceed to mount your loop device as you normall would. Here is the -table for mapping loop-AES to cryptoapi losetup flags: - -loop-AES cryptoapi -============================================================ --e aes128 -H rmd160 -e aes -k 128 --e aes128 -H sha256 -e aes -k 128 -P sha256 --e aes128 -H sha384 -e aes -k 128 -P sha384 --e aes128 -H sha512 -e aes -k 128 -P sha512 - --e aes256 -H rmd160 -e aes -k 256 --e aes256 -H sha256 -e aes -k 256 -P sha256 --e aes256 -H sha384 -e aes -k 256 -P sha384 --e aes256 -H sha512 -e aes -k 256 -P sha512 - --e aes128 -e aes -k 128 -P sha256 --e aes192 -e aes -k 192 -P sha384 --e aes256 -e aes -k 256 -P sha512 - --- -$Id: cryptoloop.txt,v 1.3 2002/08/03 19:29:58 kyle Exp $ diff --git a/freeramdisk.tar.bz2 b/freeramdisk.tar.bz2 deleted file mode 100644 index 9d2d4b7..0000000 --- a/freeramdisk.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:de3d43efba1e5968f4ef748b7a02674929404a80c24bae287ed3490f8c1acf2e -size 2453 diff --git a/util-linux-2.12-misc_utils_hostid.patch b/util-linux-2.12-misc_utils_hostid.patch deleted file mode 100644 index 9396acb..0000000 --- a/util-linux-2.12-misc_utils_hostid.patch +++ /dev/null @@ -1,144 +0,0 @@ -Index: util-linux-ng-2.16/misc-utils/hostid.1 -=================================================================== ---- /dev/null -+++ util-linux-ng-2.16/misc-utils/hostid.1 -@@ -0,0 +1,24 @@ -+.TH hostid 1 -+.SH NAME -+hostid \- set or print system's host id. -+.SH SYNTAX -+.B hostid -+[\-v] [\|\fIdecimal-id\fR\|] -+.SH DESCRIPTION -+.\".NXR "hostid command" -+The -+.B hostid -+command prints the current host id number in hexadecimal and both -+decimal and hexadecimal in parenthesis if the \-v option is given. -+This numeric value is expected to be unique across all hosts -+and is normally set to resemble the host's Internet address. -+ -+Only the super-user can set the hostid by giving an argument. This value is -+stored in the file /etc/hostid and need only be performed once. -+ -+.SH AUTHOR -+Hostid is written by Mitch DSouza \- (m.dsouza@mrc-apu.cam.ac.uk) -+ -+.SH SEE ALSO -+gethostid(2), sethostid(2) -+ -Index: util-linux-ng-2.16/misc-utils/hostid.c -=================================================================== ---- /dev/null -+++ util-linux-ng-2.16/misc-utils/hostid.c -@@ -0,0 +1,88 @@ -+/* Program hostid. Changed on 7.10.1997 -+ New: - Hostid 0 is not permitted. -+ - Set hostid dezimal or hexadezimal, both possible. -+ - Maximum Value for id is tested -+ - Wrong Parameters are caught -+ Nov 13 2003 - cleanup, mmj@suse.de -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+void usage(void); -+ -+void usage() -+{ -+ printf ("usage : hostid [-h] [-v] []\n\n" -+ "no options: print hostid as hexadecimal number\n" -+ "-h print this helptext\n" -+ "-v print hostid decimal and hexadecimal\n" -+ " set the hostid to \n\n" -+ "The id String can be specified as\n" -+ " - decimal number\n" -+ " - hexadecimal number preceded by 0x\n" -+ " - octal number preceded by 0 \n\n" -+ "Remarks:\n" -+ " - only root can set the hostid\n" -+ " - it's not possible to set the hostid to 0\n\n"); -+} -+ -+int main (int argc, char *argv[]) -+{ -+ long id; -+ int verbose = 0; -+ -+ if (argc > 2) { -+ printf ("wrong arguments\n"); -+ usage(); -+ exit(1); -+ } -+ -+ if (argc == 2 && strcmp(argv[1], "-h") == 0) { -+ usage(); -+ exit(0); -+ } -+ -+ if (argc == 2 && strcmp(argv[1], "-v") == 0) { -+ verbose = 1; -+ argc--; -+ argv++; -+ } -+ -+ switch (argc) { -+ case 2: -+ id = strtol(argv[1], NULL, 0); -+ if (errno == ERANGE) { -+ printf ("Overflow: given string was out of range\n"); -+ exit(1); -+ } -+ -+ if (id == 0) { -+ printf ("value not possible: Abort\n"); -+ usage(); -+ exit(1); -+ } -+ if (sethostid(id) != 0) { -+ perror("sethostid"); -+ exit(1); -+ } -+ break; -+ -+ case 1: -+ id = gethostid(); -+ if(id && verbose) { -+ printf("Hostid is %ld (0x%lx)\n", id, id); -+ } else if(id) { -+ printf("0x%lx\n", id); -+ } else { -+ printf ("Error while trying: gethostid\n"); -+ exit(1); -+ } -+ break; -+ } -+ -+ return 0; -+} -Index: util-linux-ng-2.16/misc-utils/Makefile.am -=================================================================== ---- util-linux-ng-2.16.orig/misc-utils/Makefile.am -+++ util-linux-ng-2.16/misc-utils/Makefile.am -@@ -6,7 +6,7 @@ bin_PROGRAMS = - sbin_PROGRAMS = - usrsbin_exec_PROGRAMS = - --usrbin_exec_PROGRAMS = cal ddate logger look mcookie \ -+usrbin_exec_PROGRAMS = cal ddate hostid logger look mcookie \ - namei script whereis scriptreplay - EXTRA_DIST += README.cal README.ddate README.namei README.namei2 - -@@ -16,7 +16,7 @@ usrbin_exec_SCRIPTS = chkdupexe - - CLEANFILES = chkdupexe - --dist_man_MANS = cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \ -+dist_man_MANS = cal.1 chkdupexe.1 ddate.1 hostid.1 logger.1 look.1 mcookie.1 \ - namei.1 script.1 whereis.1 scriptreplay.1 - - if BUILD_LIBUUID diff --git a/util-linux-2.17.1-losetup-honor-documented-c-option b/util-linux-2.17.1-losetup-honor-documented-c-option new file mode 100644 index 0000000..6a3bb68 --- /dev/null +++ b/util-linux-2.17.1-losetup-honor-documented-c-option @@ -0,0 +1,26 @@ +From: Jeff Mahoney +Subject: losetup: Honor documented -c option +References: bnc#583677 + + losetup -h lists -c | --set-capacity as valid options, but doesn't + actually accept -c. + + This patch fixes support for -c. + +Signed-off-by: Jeff Mahoney +Acked-by: Jeff Mahoney +--- + mount/lomount.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mount/lomount.c ++++ b/mount/lomount.c +@@ -1065,7 +1065,7 @@ main(int argc, char **argv) { + if ((p = strrchr(progname, '/')) != NULL) + progname = p+1; + +- while ((c = getopt_long(argc, argv, "ade:E:fhj:k:o:p:rsvH:", ++ while ((c = getopt_long(argc, argv, "ade:E:fhj:k:o:p:rsvH:c", + longopts, NULL)) != -1) { + switch (c) { + case 'a': diff --git a/util-linux.changes b/util-linux.changes index b2dd388..accba55 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Mar 10 23:11:42 CET 2010 - jeffm@suse.de + +- Properly honor documented -c option (bnc#583677) + +------------------------------------------------------------------- +Tue Mar 2 09:53:04 UTC 2010 - lnussel@suse.de + +- drop freeramdisk (bnc#584565) +- drop hostid (bnc#584562) + ------------------------------------------------------------------- Tue Feb 23 12:46:07 UTC 2010 - lnussel@suse.de diff --git a/util-linux.spec b/util-linux.spec index 8b7123f..33dfa1a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -27,7 +27,7 @@ License: BSD3c(or similar) ; GPLv2+ Group: System/Base AutoReqProv: on Version: 2.17.1 -Release: 1 +Release: 2 Recommends: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2 @@ -43,8 +43,6 @@ Source7: baselibs.conf %define adjtimex_ver 1.20 # XXX: post upstream? Source9: adjtimex-%{adjtimex_ver}.tar.bz2 -# XXX: DROP? -Source10: freeramdisk.tar.bz2 # XXX: post upstream? Source11: klogconsole.tar.bz2 # TODO: split to separate package @@ -66,14 +64,13 @@ Source51: blkid.conf ## ## util-linux patches ## -# add hostid. FIXME: use the one from coreutils -Patch0: util-linux-2.12-misc_utils_hostid.patch # 241372 - remove legacy warnings from fdisk Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # bnc#447036 Patch2: util-linux-2.14.1-mount_skip_sync.patch # crypto patch Patch3: util-linux-2.17.1-mount_losetup_crypto.patch +Patch4: util-linux-2.17.1-losetup-honor-documented-c-option ## ## adjtimex ## @@ -156,11 +153,12 @@ unique IDs (UUIDs). %lang_package %prep -%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%version -%patch0 -p1 +%setup -q -a 9 -b 11 -b 12 -b 13 -n %name-ng-%version +#patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # cd adjtimex-* %patch50 -p1 @@ -184,10 +182,6 @@ CFLAGS="$RPM_OPT_FLAGS" ./configure make %{?jobs:-j%jobs} cd .. pushd ../ -# freeramdisk build -cd freeramdisk -make %{?jobs:-j%jobs} CFLAGS="$RPM_OPT_FLAGS" freeramdisk -cd .. # which build cd which-%{which_ver} #autoreconf -fi @@ -265,11 +259,6 @@ mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates cp adjtimex-*/adjtimex %{buildroot}/sbin/ cp adjtimex-*/adjtimex.8 %{buildroot}%{_mandir}/man8/ pushd .. -# freeramdisk install -cd freeramdisk -install freeramdisk $RPM_BUILD_ROOT/usr/sbin -install -m644 freeramdisk.info.gz $RPM_BUILD_ROOT%{_infodir} -cd .. # which install cd which-%{which_ver} make install DESTDIR=$RPM_BUILD_ROOT @@ -365,8 +354,6 @@ rm -rf $RPM_BUILD_ROOT %post %{fillup_and_insserv raw} -txt='* freeramdisk: (freeramdisk). tell kernel to free allocated memory for ramdisk' -%install_info --entry="$txt" --info-dir=%{_infodir} %{_infodir}/freeramdisk.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %install_info --entry="* time: (time). summarizing used system resources" --info-dir=%{_infodir} %{_infodir}/time.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/which.info.gz @@ -377,7 +364,6 @@ if [ -f etc/fstab ]; then fi %postun -%install_info_delete --info-dir=%{_infodir} %{_infodir}/freeramdisk.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/time.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/which.info.gz @@ -474,7 +460,6 @@ fi /usr/bin/flock /usr/bin/getopt /usr/bin/hexdump -/usr/bin/hostid /usr/bin/ionice /usr/bin/ipcrm /usr/bin/ipcs @@ -507,7 +492,6 @@ fi /usr/bin/which /usr/sbin/addpart /usr/sbin/delpart -/usr/sbin/freeramdisk /usr/sbin/ldattach /usr/sbin/partx /usr/sbin/rcraw @@ -521,7 +505,6 @@ fi %{_defaultdocdir}/time/* %{_defaultdocdir}/which/* %{_infodir}/ipc.info.gz -%{_infodir}/freeramdisk.info*.gz %{_infodir}/time.info*.gz %{_infodir}/which.info*.gz %{_mandir}/man1/cal.1.gz @@ -538,7 +521,6 @@ fi %{_mandir}/man1/hexdump.1.gz %{_mandir}/man1/ipcrm.1.gz %{_mandir}/man1/ipcs.1.gz -%{_mandir}/man1/hostid.1.gz %{_mandir}/man1/line.1.gz %{_mandir}/man1/logger.1.gz %{_mandir}/man1/look.1.gz From 3f4b71364046c295a246306c37631fe0243f7fc800ec89d1f50140b2ddb5f5f7 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 18 Mar 2010 15:34:00 +0000 Subject: [PATCH 087/211] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=88 --- ready | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ready diff --git a/ready b/ready deleted file mode 100644 index 473a0f4..0000000 From 2381711ade3eac55ce65e38b62e9de7bc3a01112ff19626770a65190573c0fda Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Wed, 7 Apr 2010 11:15:12 +0000 Subject: [PATCH 088/211] Accepting request 37093 from Base:System Copy from Base:System/util-linux based on submit request 37093 from user hennevogel OBS-URL: https://build.opensuse.org/request/show/37093 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=89 --- util-linux-ng-2.17.1.tar.bz2 | 3 --- util-linux-ng-2.17.2.tar.bz2 | 3 +++ util-linux.changes | 19 +++++++++++++++++++ util-linux.spec | 8 ++++---- 4 files changed, 26 insertions(+), 7 deletions(-) delete mode 100644 util-linux-ng-2.17.1.tar.bz2 create mode 100644 util-linux-ng-2.17.2.tar.bz2 diff --git a/util-linux-ng-2.17.1.tar.bz2 b/util-linux-ng-2.17.1.tar.bz2 deleted file mode 100644 index d859108..0000000 --- a/util-linux-ng-2.17.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e9c019ea3782dc20b82d27c1240009f9e194304a77ac36f51629a487a5181390 -size 3801027 diff --git a/util-linux-ng-2.17.2.tar.bz2 b/util-linux-ng-2.17.2.tar.bz2 new file mode 100644 index 0000000..9eb499a --- /dev/null +++ b/util-linux-ng-2.17.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9ae801b6a5ab20b7749a278a8bf6830ef53adc5e8b7eb0ac1a9f410c774118f +size 3815657 diff --git a/util-linux.changes b/util-linux.changes index accba55..bae4c63 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Tue Apr 6 13:22:37 UTC 2010 - hvogel@novell.com + +- update to version 2.17.2 + - fix small typo in v2.17.1-ReleaseNotes + - fix -b fdisk + - fix typo in ionice + - fix display of device size, fix infinite loop when probe chain + bails out early, more robust minix probing, remove "0x" prefix + from DRBD UUID, reset BLKID_TINY_DEV flag in + blkid_probe_set_device, support alignment_offset=-1 in libblkid + - fix cpuid opcode detection in lscpu + - more explicitly explain fstab usage in mount.8, posix option + of vfat is obsolete, properly ignore comments in + /etc/filesystems in mount + - update ja.po, pl.po, update vi.po + - remove " (deleted)" from filenames from /proc/swaps + - cleanup usage() and man page of wipefs + ------------------------------------------------------------------- Wed Mar 10 23:11:42 CET 2010 - jeffm@suse.de diff --git a/util-linux.spec b/util-linux.spec index 33dfa1a..370a784 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.17.1) +# spec file for package util-linux (Version 2.17.2) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -23,11 +23,11 @@ BuildRequires: libselinux-devel libsepol-devel ncurses-devel pam-devel readline Url: http://userweb.kernel.org/~kzak/util-linux-ng/ Supplements: filesystem(minix) PreReq: %install_info_prereq permissions -License: BSD3c(or similar) ; GPLv2+ +License: GPLv2+ Group: System/Base AutoReqProv: on -Version: 2.17.1 -Release: 2 +Version: 2.17.2 +Release: 1 Recommends: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2 From 0f39ada30be5ea9bfee3af50050b04307bbcb2945ed3962f4de6a5e6726de38c Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 13 May 2010 22:14:03 +0000 Subject: [PATCH 089/211] Accepting request 39808 from Base:System Copy from Base:System/util-linux based on submit request 39808 from user puzel OBS-URL: https://build.opensuse.org/request/show/39808 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=90 --- util-linux-addpart-use-atoll.patch | 15 +++++++++++++++ util-linux.changes | 5 +++++ util-linux.spec | 5 ++++- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 util-linux-addpart-use-atoll.patch diff --git a/util-linux-addpart-use-atoll.patch b/util-linux-addpart-use-atoll.patch new file mode 100644 index 0000000..35310a9 --- /dev/null +++ b/util-linux-addpart-use-atoll.patch @@ -0,0 +1,15 @@ +Index: util-linux-ng-2.17.2/partx/addpart.c +=================================================================== +--- util-linux-ng-2.17.2.orig/partx/addpart.c 2010-01-28 15:57:59.000000000 +0100 ++++ util-linux-ng-2.17.2/partx/addpart.c 2010-05-11 15:51:26.000000000 +0200 +@@ -25,8 +25,8 @@ main(int argc, char **argv){ + exit(1); + } + p.pno = atoi(argv[2]); +- p.start = 512 * ((long long) atol(argv[3])); +- p.length = 512 * ((long long) atol(argv[4])); ++ p.start = 512 * atoll(argv[3]); ++ p.length = 512 * atoll(argv[4]); + p.devname[0] = 0; + p.volname[0] = 0; + a.op = BLKPG_ADD_PARTITION; diff --git a/util-linux.changes b/util-linux.changes index bae4c63..fb9e43f 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 11 13:58:49 UTC 2010 - puzel@novell.com + +- add util-linux-addpart-use-atoll.patch (bnc#603328) + ------------------------------------------------------------------- Tue Apr 6 13:22:37 UTC 2010 - hvogel@novell.com diff --git a/util-linux.spec b/util-linux.spec index 370a784..32676c3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -27,7 +27,7 @@ License: GPLv2+ Group: System/Base AutoReqProv: on Version: 2.17.2 -Release: 1 +Release: 2 Recommends: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2 @@ -71,6 +71,8 @@ Patch2: util-linux-2.14.1-mount_skip_sync.patch # crypto patch Patch3: util-linux-2.17.1-mount_losetup_crypto.patch Patch4: util-linux-2.17.1-losetup-honor-documented-c-option +# 603328 +Patch5: util-linux-addpart-use-atoll.patch ## ## adjtimex ## @@ -159,6 +161,7 @@ unique IDs (UUIDs). %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # cd adjtimex-* %patch50 -p1 From 9a79cf74790e30b8eba81697953c7aacbc8ce5646d0e9cd2180c3d72199f03d7 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 28 May 2010 14:54:13 +0000 Subject: [PATCH 090/211] Accepting request 40798 from Base:System Copy from Base:System/util-linux based on submit request 40798 from user puzel OBS-URL: https://build.opensuse.org/request/show/40798 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=91 --- util-linux-mount-detect-ro-mount.patch | 41 ++++++++++++++++++++++++++ util-linux.changes | 5 ++++ util-linux.spec | 5 +++- 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 util-linux-mount-detect-ro-mount.patch diff --git a/util-linux-mount-detect-ro-mount.patch b/util-linux-mount-detect-ro-mount.patch new file mode 100644 index 0000000..313b2b3 --- /dev/null +++ b/util-linux-mount-detect-ro-mount.patch @@ -0,0 +1,41 @@ +From 81694f8c60dffb7851f941e69a1b79bc573ace53 Mon Sep 17 00:00:00 2001 +From: Petr Uzel +Date: Fri, 21 May 2010 15:19:31 +0200 +Subject: [PATCH] mount: detect when kernel silently adds MS_RDONLY flag + +Linux kernel can silently add MS_RDONLY flag when mounting file system that +does not have write support. Check this to avoid 'ro' in /proc/mounts and 'rw' +in mtab. + +[kzak@redhat.com: - don't check for 'ro' for MS_MOVE and MS_PROPAGATION] + +Reported-by: James Foris +Signed-off-by: Petr Uzel +Signed-off-by: Karel Zak +--- + mount/mount.c | 12 ++++++++++++ + 1 files changed, 12 insertions(+), 0 deletions(-) + +Index: util-linux-ng-2.17.2/mount/mount.c +=================================================================== +--- util-linux-ng-2.17.2.orig/mount/mount.c 2010-05-28 15:22:47.000000000 +0200 ++++ util-linux-ng-2.17.2/mount/mount.c 2010-05-28 15:23:03.000000000 +0200 +@@ -1388,6 +1388,18 @@ mount_retry: + flags &= ~MS_RDONLY; + } + ++ /* Kernel can silently add MS_RDONLY flag when mounting file system that ++ * does not have write support. Check this to avoid 'ro' in /proc/mounts ++ * and 'rw' in mtab. ++ */ ++ if (!fake && mnt5_res == 0 && ++ !(flags & MS_RDONLY) && !(flags & MS_PROPAGATION) && !(flags & MS_MOVE) && ++ is_readonly(node)) { ++ ++ printf(_("mount: warning: %s seems to be mounted read-only.\n"), node); ++ flags |= MS_RDONLY; ++ } ++ + if (fake || mnt5_res == 0) { + /* Mount succeeded, report this (if verbose) and write mtab entry. */ + diff --git a/util-linux.changes b/util-linux.changes index fb9e43f..6112efe 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 28 13:24:43 UTC 2010 - puzel@novell.com + +- add util-linux-mount-detect-ro-mount.patch (bnc#481123) + ------------------------------------------------------------------- Tue May 11 13:58:49 UTC 2010 - puzel@novell.com diff --git a/util-linux.spec b/util-linux.spec index 32676c3..e5ba049 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -27,7 +27,7 @@ License: GPLv2+ Group: System/Base AutoReqProv: on Version: 2.17.2 -Release: 2 +Release: 3 Recommends: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2 @@ -73,6 +73,8 @@ Patch3: util-linux-2.17.1-mount_losetup_crypto.patch Patch4: util-linux-2.17.1-losetup-honor-documented-c-option # 603328 Patch5: util-linux-addpart-use-atoll.patch +# bnc#481123 +Patch6: util-linux-mount-detect-ro-mount.patch ## ## adjtimex ## @@ -162,6 +164,7 @@ unique IDs (UUIDs). %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 # cd adjtimex-* %patch50 -p1 From ed0ee30d632c2edbccea36b20c2ea070cacba9ce8c234d18b0efcc277d06e2e7 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 18 Jun 2010 03:15:08 +0000 Subject: [PATCH 091/211] Accepting request 41635 from Base:System Copy from Base:System/util-linux based on submit request 41635 from user coolo OBS-URL: https://build.opensuse.org/request/show/41635 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=92 --- util-linux.changes | 5 +++++ util-linux.spec | 2 +- uuidd.rc | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index 6112efe..9732cbd 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 1 14:23:23 UTC 2010 - puzel@novell.com + +- do not run uuidd as root, but uuidd:uuidd (bnc#604168) + ------------------------------------------------------------------- Fri May 28 13:24:43 UTC 2010 - puzel@novell.com diff --git a/util-linux.spec b/util-linux.spec index e5ba049..1de8871 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -27,7 +27,7 @@ License: GPLv2+ Group: System/Base AutoReqProv: on Version: 2.17.2 -Release: 3 +Release: 4 Recommends: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2 diff --git a/uuidd.rc b/uuidd.rc index 794295d..271a0d2 100644 --- a/uuidd.rc +++ b/uuidd.rc @@ -31,7 +31,7 @@ case "$1" in echo -n "Starting uuidd " mkdir -p $UUIDD_PID_PATH chown uuidd:uuidd $UUIDD_PID_PATH - /sbin/startproc $UUIDD_BIN $UUIDD_OPTIONS + /sbin/startproc -u uuidd -g uuidd $UUIDD_BIN $UUIDD_OPTIONS rc_status -v ;; stop) From 6b383129aa9ce9b050eb6e8b420dfeba94045df820113d24ee9b4b8480f00935 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 25 Jun 2010 18:44:47 +0000 Subject: [PATCH 092/211] Accepting request 42035 from Base:System Copy from Base:System/util-linux based on submit request 42035 from user puzel OBS-URL: https://build.opensuse.org/request/show/42035 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=93 --- util-linux-swapon-btrfs-limitations | 42 +++++++++++++++++++++++++++++ util-linux.changes | 10 +++++++ util-linux.spec | 8 +++--- 3 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 util-linux-swapon-btrfs-limitations diff --git a/util-linux-swapon-btrfs-limitations b/util-linux-swapon-btrfs-limitations new file mode 100644 index 0000000..59722da --- /dev/null +++ b/util-linux-swapon-btrfs-limitations @@ -0,0 +1,42 @@ +From: Jeff Mahoney +Subject: swapon: Document btrfs limitation with swapfiles +References: bnc#616617 + + Btrfs, as of 2.6.35, is unable to allow swapfiles to be used on its + filesystems. This is due to the swapfile implementation wanting to build + an extent map of each block in the file and expecting it to be static + for the life of the swapfile. + + Btrfs can't guarantee this and refuses to return the mapping. The swapfile + implementation just makes a comment about there being holes in the file - + but that's how btrfs denies the mapping. + + This patch adds a section to the swapon manpage to document it. + +Signed-off-by: Jeff Mahoney + +--- + mount/swapon.8 | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/mount/swapon.8 ++++ b/mount/swapon.8 +@@ -167,6 +167,18 @@ automatically detects and rewrites swap + suspend data (e.g S1SUSPEND, S2SUSPEND, ...). The problem is that if we don't + do it, then we get data corruption the next time an attempt at unsuspending is + made. ++.PP ++.B swapon ++may not work correctly when using a swap file with some versions of btrfs. ++This is due to the swap file implementation in the kernel expecting to be able ++to write to the file directly, without the assistance of the file system. ++Since btrfs is a copy-on-write file system, the file location may not be ++static and corruption can result. Btrfs actively disallows the use of files ++on its file systems by refusing to map the file. This can be seen in the system ++log as "swapon: swapfile has holes." One possible workaround is to map the ++file to a loopback device. This will allow the file system to determine the ++mapping properly but may come with a performance impact. ++ + .SH SEE ALSO + .BR swapon (2), + .BR swapoff (2), diff --git a/util-linux.changes b/util-linux.changes index 9732cbd..d84ec7b 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Jun 24 23:24:41 CEST 2010 - jeffm@suse.de + +- document btrfs limitation with swapfiles (bnc#616617) + +------------------------------------------------------------------- +Tue Jun 22 16:48:29 UTC 2010 - bg@novell.com + +- hppa specific binaries are parisc{,32,64} + ------------------------------------------------------------------- Tue Jun 1 14:23:23 UTC 2010 - puzel@novell.com diff --git a/util-linux.spec b/util-linux.spec index 1de8871..a18e67c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -27,7 +27,7 @@ License: GPLv2+ Group: System/Base AutoReqProv: on Version: 2.17.2 -Release: 4 +Release: 5 Recommends: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2 @@ -75,6 +75,7 @@ Patch4: util-linux-2.17.1-losetup-honor-documented-c-option Patch5: util-linux-addpart-use-atoll.patch # bnc#481123 Patch6: util-linux-mount-detect-ro-mount.patch +Patch7: util-linux-swapon-btrfs-limitations ## ## adjtimex ## @@ -165,6 +166,7 @@ unique IDs (UUIDs). %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 # cd adjtimex-* %patch50 -p1 @@ -349,10 +351,10 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man8/fdisk.8* %find_lang %{name}-ng %{name}.lang # create list of setarch(8) symlinks find $RPM_BUILD_ROOT%{_bindir}/ -regextype posix-egrep -type l \ - -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64)$" \ + -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)$" \ -printf "%{_bindir}/%f\n" >> %{name}.files find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \ - -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64)\.8.*" \ + -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)\.8.*" \ -printf "%{_mandir}/man8/%f*\n" >> %{name}.files %clean From 24ac79c7a3d171bfcd31445c0601c84c8e0c1f68e7fd64fc0c6a3638c9a03088 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 30 Jul 2010 10:35:45 +0000 Subject: [PATCH 093/211] Accepting request 43994 from Base:System Copy from Base:System/util-linux based on submit request 43994 from user puzel OBS-URL: https://build.opensuse.org/request/show/43994 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=96 --- adjtimex-1.20-nosyscall.diff | 18 --- adjtimex-1.20.tar.bz2 | 3 - adjtimex-1.28.tar.bz2 | 3 + baselibs.conf | 9 +- ...ux-2.12r-fdisk_remove_bogus_warnings.patch | 10 +- util-linux-2.14.1-mount_skip_sync.patch | 23 --- util-linux-2.17.1-mount_losetup_crypto.patch | 146 ++++++++--------- util-linux-addpart-use-atoll.patch | 15 -- util-linux-mount-detect-ro-mount.patch | 41 ----- util-linux-ng-2.17.2.tar.bz2 | 3 - util-linux-ng-2.18.tar.bz2 | 3 + util-linux-rpmlintrc | 1 - util-linux.changes | 25 +++ util-linux.spec | 153 +++++++++--------- which-2.19.tar.bz2 | 3 - which-2.20.tar.bz2 | 3 + 16 files changed, 186 insertions(+), 273 deletions(-) delete mode 100644 adjtimex-1.20-nosyscall.diff delete mode 100644 adjtimex-1.20.tar.bz2 create mode 100644 adjtimex-1.28.tar.bz2 delete mode 100644 util-linux-2.14.1-mount_skip_sync.patch delete mode 100644 util-linux-addpart-use-atoll.patch delete mode 100644 util-linux-mount-detect-ro-mount.patch delete mode 100644 util-linux-ng-2.17.2.tar.bz2 create mode 100644 util-linux-ng-2.18.tar.bz2 delete mode 100644 which-2.19.tar.bz2 create mode 100644 which-2.20.tar.bz2 diff --git a/adjtimex-1.20-nosyscall.diff b/adjtimex-1.20-nosyscall.diff deleted file mode 100644 index 3a288c9..0000000 --- a/adjtimex-1.20-nosyscall.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- adjtimex-1.20/adjtimex.c -+++ adjtimex-1.20/adjtimex.c -@@ -35,15 +35,6 @@ - #include - #include - --#ifdef __alpha__ --extern int adjtimex(struct timex *); --#else --#ifdef __ia64__ --extern int adjtimex(struct timex *); --#else --_syscall1(int, adjtimex, struct timex *, txcp) --#endif --#endif - int F_print = 0; - - #ifndef LOG_PATH diff --git a/adjtimex-1.20.tar.bz2 b/adjtimex-1.20.tar.bz2 deleted file mode 100644 index 72479ce..0000000 --- a/adjtimex-1.20.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ad3619a6f4f04d278ac3d3e0261649465a9748dc84220aa5f4060aadaea839ba -size 50096 diff --git a/adjtimex-1.28.tar.bz2 b/adjtimex-1.28.tar.bz2 new file mode 100644 index 0000000..6347052 --- /dev/null +++ b/adjtimex-1.28.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:527a20975cbcffb39ab122867c4a9438cf09e7d1e01a06eaa2f340de282a4c95 +size 75184 diff --git a/baselibs.conf b/baselibs.conf index 5d89a17..46b935b 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -2,12 +2,11 @@ libuuid1 libuuid-devel requires -libuuid- requires "libuuid1- = " - requires -libblkid- - requires "libblkid1- = " libblkid1 - obsoletes "e2fsprogs- <= " libblkid-devel requires -libblkid- requires "libblkid1- = " - requires -libuuid- - requires "libuuid1- = " +libmount1 +libmount-devel + requires -libmount- + requires "libmount1- = " diff --git a/util-linux-2.12r-fdisk_remove_bogus_warnings.patch b/util-linux-2.12r-fdisk_remove_bogus_warnings.patch index 6d8694d..ca5a94c 100644 --- a/util-linux-2.12r-fdisk_remove_bogus_warnings.patch +++ b/util-linux-2.12r-fdisk_remove_bogus_warnings.patch @@ -1,8 +1,8 @@ -Index: util-linux-ng-2.16/fdisk/fdisk.c +Index: util-linux-ng-2.18/fdisk/fdisk.c =================================================================== ---- util-linux-ng-2.16.orig/fdisk/fdisk.c -+++ util-linux-ng-2.16/fdisk/fdisk.c -@@ -1586,6 +1586,7 @@ static void check_consistency(struct par +--- util-linux-ng-2.18.orig/fdisk/fdisk.c 2010-06-30 14:44:25.000000000 +0200 ++++ util-linux-ng-2.18/fdisk/fdisk.c 2010-07-08 14:35:07.000000000 +0200 +@@ -1838,6 +1838,7 @@ static void check_consistency(struct par /* compute logical ending (c, h, s) */ long2chs(get_start_sect(p) + get_nr_sects(p) - 1, &lec, &leh, &les); @@ -10,7 +10,7 @@ Index: util-linux-ng-2.16/fdisk/fdisk.c /* Same physical / logical beginning? */ if (cylinders <= 1024 && (pbc != lbc || pbh != lbh || pbs != lbs)) { printf(_("Partition %d has different physical/logical " -@@ -1602,7 +1603,6 @@ static void check_consistency(struct par +@@ -1854,7 +1855,6 @@ static void check_consistency(struct par printf(_("logical=(%d, %d, %d)\n"),lec, leh, les); } diff --git a/util-linux-2.14.1-mount_skip_sync.patch b/util-linux-2.14.1-mount_skip_sync.patch deleted file mode 100644 index bc5bdf1..0000000 --- a/util-linux-2.14.1-mount_skip_sync.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -Nurw util-linux-ng-2.16.orig/mount/umount.c util-linux-ng-2.16/mount/umount.c ---- util-linux-ng-2.16.orig/mount/umount.c 2009-07-04 01:20:06.000000000 +0200 -+++ util-linux-ng-2.16/mount/umount.c 2009-09-29 14:50:44.000000000 +0200 -@@ -361,6 +361,7 @@ - umount_all (char *types, char *test_opts) { - struct mntentchn *mc, *hd; - int errors = 0; -+ int do_sync = 0; - - hd = mtab_head(); - if (!hd->prev) -@@ -370,9 +371,11 @@ - && matching_opts (mc->m.mnt_opts, test_opts)) { - errors |= umount_one (mc->m.mnt_fsname, mc->m.mnt_dir, - mc->m.mnt_type, mc->m.mnt_opts, mc); -+ do_sync = 1; - } - } - -+ if (do_sync) - sync (); - return errors; - } diff --git a/util-linux-2.17.1-mount_losetup_crypto.patch b/util-linux-2.17.1-mount_losetup_crypto.patch index 24cd77c..93475eb 100644 --- a/util-linux-2.17.1-mount_losetup_crypto.patch +++ b/util-linux-2.17.1-mount_losetup_crypto.patch @@ -38,24 +38,23 @@ Signed-off-by: Ludwig Nussel create mode 100644 mount/sha512.c create mode 100644 mount/sha512.h -diff --git a/mount/Makefile.am b/mount/Makefile.am -index c5f58aa..43ff01a 100644 ---- a/mount/Makefile.am -+++ b/mount/Makefile.am -@@ -7,7 +7,8 @@ sbin_PROGRAMS = losetup swapon +Index: util-linux-ng-2.18/mount/Makefile.am +=================================================================== +--- util-linux-ng-2.18.orig/mount/Makefile.am 2010-05-24 12:35:47.000000000 +0200 ++++ util-linux-ng-2.18/mount/Makefile.am 2010-07-08 14:39:01.000000000 +0200 +@@ -7,7 +7,7 @@ sbin_PROGRAMS = losetup swapon dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 # generic sources for all programs (mount, umount, losetup) --srcs_common = sundries.c xmalloc.c ../lib/canonicalize.c sundries.h xmalloc.h -+srcs_common = sundries.c xmalloc.c ../lib/canonicalize.c sundries.h xmalloc.h \ -+ rmd160.c sha512.c +-srcs_common = sundries.c xmalloc.c $(top_srcdir)/lib/canonicalize.c sundries.h xmalloc.h ++srcs_common = sundries.c xmalloc.c $(top_srcdir)/lib/canonicalize.c sundries.h xmalloc.h rmd160.c sha512.c # generic header for mount and umount hdrs_mount = fstab.h mount_mntent.h mount_constants.h \ -diff --git a/mount/lomount.c b/mount/lomount.c -index 67712c6..a0b951c 100644 ---- a/mount/lomount.c -+++ b/mount/lomount.c +Index: util-linux-ng-2.18/mount/lomount.c +=================================================================== +--- util-linux-ng-2.18.orig/mount/lomount.c 2010-05-19 23:36:23.000000000 +0200 ++++ util-linux-ng-2.18/mount/lomount.c 2010-07-08 14:39:29.000000000 +0200 @@ -23,6 +23,12 @@ #include "sundries.h" #include "xmalloc.h" @@ -143,7 +142,7 @@ index 67712c6..a0b951c 100644 char *filename; if (verbose) { -@@ -707,13 +742,37 @@ set_loop(const char *device, const char *file, unsigned long long offset, +@@ -707,13 +742,37 @@ set_loop(const char *device, const char filename = (char *) file; xstrncpy((char *)loopinfo64.lo_file_name, filename, LO_NAME_SIZE); @@ -183,7 +182,7 @@ index 67712c6..a0b951c 100644 } } -@@ -734,20 +793,70 @@ set_loop(const char *device, const char *file, unsigned long long offset, +@@ -734,20 +793,70 @@ set_loop(const char *device, const char } #endif @@ -266,7 +265,7 @@ index 67712c6..a0b951c 100644 } if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { -@@ -895,7 +1004,13 @@ usage(void) { +@@ -897,7 +1006,13 @@ usage(void) { fprintf(stderr, _("\nOptions:\n" " -e | --encryption enable data encryption with specified \n" @@ -280,7 +279,7 @@ index 67712c6..a0b951c 100644 " -o | --offset start at offset into file\n" " --sizelimit loop limited to only bytes of the file\n" " -p | --pass-fd read passphrase from file descriptor \n" -@@ -908,11 +1023,14 @@ usage(void) { +@@ -910,11 +1025,14 @@ usage(void) { int main(int argc, char **argv) { char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc; @@ -292,10 +291,10 @@ index 67712c6..a0b951c 100644 int ro = 0; int pfd = -1; + int keysz = 0; - unsigned long long off, slimit; + uintmax_t off = 0, slimit = 0; struct option longopts[] = { { "all", 0, 0, 'a' }, -@@ -921,6 +1039,8 @@ main(int argc, char **argv) { +@@ -923,6 +1041,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -305,8 +304,8 @@ index 67712c6..a0b951c 100644 { "offset", 1, 0, 'o' }, { "sizelimit", 1, 0, 128 }, @@ -939,12 +1059,13 @@ main(int argc, char **argv) { - off = 0; - slimit = 0; + + capacity = delete = find = all = 0; assoc = offset = sizelimit = encryption = passfd = NULL; + keysize = NULL; @@ -332,7 +331,7 @@ index 67712c6..a0b951c 100644 case 'o': offset = optarg; break; -@@ -1054,8 +1181,11 @@ main(int argc, char **argv) { +@@ -1058,8 +1185,11 @@ main(int argc, char **argv) { else { if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(); @@ -345,10 +344,10 @@ index 67712c6..a0b951c 100644 if (res == 2 && find) { if (verbose) printf(_("stolen loop=%s...trying again\n"), -diff --git a/mount/lomount.h b/mount/lomount.h -index 59108d4..07ab875 100644 ---- a/mount/lomount.h -+++ b/mount/lomount.h +Index: util-linux-ng-2.18/mount/lomount.h +=================================================================== +--- util-linux-ng-2.18.orig/mount/lomount.h 2010-02-04 12:53:56.000000000 +0100 ++++ util-linux-ng-2.18/mount/lomount.h 2010-07-08 14:38:38.000000000 +0200 @@ -1,5 +1,6 @@ -extern int set_loop(const char *, const char *, unsigned long long, unsigned long long, - const char *, int, int *); @@ -358,11 +357,11 @@ index 59108d4..07ab875 100644 extern int del_loop(const char *); extern int is_loop_device(const char *); extern int is_loop_autoclear(const char *device); -diff --git a/mount/losetup.8 b/mount/losetup.8 -index 8ccab6c..8566898 100644 ---- a/mount/losetup.8 -+++ b/mount/losetup.8 -@@ -92,9 +92,18 @@ find the first unused loop device. If a +Index: util-linux-ng-2.18/mount/losetup.8 +=================================================================== +--- util-linux-ng-2.18.orig/mount/losetup.8 2010-05-19 23:36:23.000000000 +0200 ++++ util-linux-ng-2.18/mount/losetup.8 2010-07-08 14:38:38.000000000 +0200 +@@ -96,9 +96,18 @@ find the first unused loop device. If a argument is present, use this device. Otherwise, print its name .IP "\fB\-h, \-\-help\fP" print help @@ -381,7 +380,7 @@ index 8ccab6c..8566898 100644 .IP "\fB\-o, \-\-offset \fIoffset\fP" the data start is moved \fIoffset\fP bytes into the specified file or device -@@ -165,6 +174,8 @@ the command +@@ -169,6 +178,8 @@ the command .fi .SH RESTRICTION DES encryption is painfully slow. On the other hand, XOR is terribly weak. @@ -390,11 +389,11 @@ index 8ccab6c..8566898 100644 Cryptoloop is deprecated in favor of dm-crypt. For more details see .BR cryptsetup (8). -diff --git a/mount/mount.8 b/mount/mount.8 -index 2888b46..582898a 100644 ---- a/mount/mount.8 -+++ b/mount/mount.8 -@@ -826,6 +826,15 @@ Every time the inode is modified, the i_version field will be incremented. +Index: util-linux-ng-2.18/mount/mount.8 +=================================================================== +--- util-linux-ng-2.18.orig/mount/mount.8 2010-06-30 10:41:35.000000000 +0200 ++++ util-linux-ng-2.18/mount/mount.8 2010-07-08 14:38:38.000000000 +0200 +@@ -869,6 +869,15 @@ Every time the inode is modified, the i_ .B noiversion Do not increment the i_version inode field. .TP @@ -410,7 +409,7 @@ index 2888b46..582898a 100644 .B mand Allow mandatory locks on this filesystem. See .BR fcntl (2). -@@ -2525,6 +2534,10 @@ that are really options to +@@ -2582,6 +2591,10 @@ that are really options to .BR \%losetup (8). (These options can be used in addition to those specific to the filesystem type.) @@ -419,13 +418,13 @@ index 2888b46..582898a 100644 +.BR \-\-pass-fd +option. - If no explicit loop device is mentioned - (but just an option `\fB\-o loop\fP' is given), then -diff --git a/mount/mount.c b/mount/mount.c -index efe1165..09006f7 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -95,6 +95,9 @@ struct mountargs { + Since Linux 2.6.25 is supported auto-destruction of loop devices and + then any loop device allocated by +Index: util-linux-ng-2.18/mount/mount.c +=================================================================== +--- util-linux-ng-2.18.orig/mount/mount.c 2010-06-30 12:51:09.000000000 +0200 ++++ util-linux-ng-2.18/mount/mount.c 2010-07-08 14:38:38.000000000 +0200 +@@ -96,6 +96,9 @@ struct mountargs { void *data; }; @@ -435,7 +434,7 @@ index efe1165..09006f7 100644 /* Map from -o and fstab option strings to the flag argument to mount(2). */ struct opt_map { const char *opt; /* option name */ -@@ -200,6 +203,7 @@ static int opt_nofail = 0; +@@ -201,6 +204,7 @@ static int opt_nofail = 0; static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_sizelimit, *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper; @@ -443,7 +442,7 @@ index efe1165..09006f7 100644 static int is_readonly(const char *node); static int mounted (const char *spec0, const char *node0); -@@ -216,6 +220,8 @@ static struct string_opt_map { +@@ -217,6 +221,8 @@ static struct string_opt_map { { "offset=", 0, &opt_offset }, { "sizelimit=", 0, &opt_sizelimit }, { "encryption=", 0, &opt_encryption }, @@ -452,7 +451,7 @@ index efe1165..09006f7 100644 { "speed=", 0, &opt_speed }, { "comment=", 1, &opt_comment }, { "uhelper=", 0, &opt_uhelper }, -@@ -1081,7 +1087,8 @@ loop_check(const char **spec, const char **type, int *flags, +@@ -1116,7 +1122,8 @@ loop_check(const char **spec, const char *type = opt_vfstype; } @@ -461,8 +460,8 @@ index efe1165..09006f7 100644 + opt_encryption || opt_phash || opt_keybits); *loopfile = *spec; - if (*loop) { -@@ -1113,7 +1120,7 @@ loop_check(const char **spec, const char **type, int *flags, + /* Automatically create a loop device from a regular file if a filesystem +@@ -1170,7 +1177,7 @@ loop_check(const char **spec, const char printf(_("mount: going to use the loop device %s\n"), *loopdev); if ((res = set_loop(*loopdev, *loopfile, offset, sizelimit, @@ -471,7 +470,7 @@ index efe1165..09006f7 100644 if (res == 2) { /* loop dev has been grabbed by some other process, try again, if not given explicitly */ -@@ -1920,6 +1927,7 @@ static struct option longopts[] = { +@@ -1981,6 +1988,7 @@ static struct option longopts[] = { { "options", 1, 0, 'o' }, { "test-opts", 1, 0, 'O' }, { "pass-fd", 1, 0, 'p' }, @@ -479,7 +478,7 @@ index efe1165..09006f7 100644 { "types", 1, 0, 't' }, { "bind", 0, 0, 'B' }, { "move", 0, 0, 'M' }, -@@ -2082,6 +2090,7 @@ main(int argc, char *argv[]) { +@@ -2143,6 +2151,7 @@ main(int argc, char *argv[]) { char *options = NULL, *test_opts = NULL, *node; const char *spec = NULL; char *label = NULL; @@ -487,7 +486,7 @@ index efe1165..09006f7 100644 char *uuid = NULL; char *types = NULL; char *p; -@@ -2112,7 +2121,7 @@ main(int argc, char *argv[]) { +@@ -2173,7 +2182,7 @@ main(int argc, char *argv[]) { initproctitle(argc, argv); #endif @@ -496,7 +495,7 @@ index efe1165..09006f7 100644 longopts, NULL)) != -1) { switch (c) { case 'a': /* mount everything in fstab */ -@@ -2133,6 +2142,9 @@ main(int argc, char *argv[]) { +@@ -2194,6 +2203,9 @@ main(int argc, char *argv[]) { case 'i': external_allowed = 0; break; @@ -506,7 +505,7 @@ index efe1165..09006f7 100644 case 'l': list_with_volumelabel = 1; break; -@@ -2280,6 +2292,9 @@ main(int argc, char *argv[]) { +@@ -2341,6 +2353,9 @@ main(int argc, char *argv[]) { atexit(unlock_mtab); @@ -516,11 +515,10 @@ index efe1165..09006f7 100644 switch (argc+specseen) { case 0: /* mount -a */ -diff --git a/mount/rmd160.c b/mount/rmd160.c -new file mode 100644 -index 0000000..3430954 ---- /dev/null -+++ b/mount/rmd160.c +Index: util-linux-ng-2.18/mount/rmd160.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ util-linux-ng-2.18/mount/rmd160.c 2010-07-08 14:38:38.000000000 +0200 @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -1054,11 +1052,10 @@ index 0000000..3430954 + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -diff --git a/mount/rmd160.h b/mount/rmd160.h -new file mode 100644 -index 0000000..4b2c61d ---- /dev/null -+++ b/mount/rmd160.h +Index: util-linux-ng-2.18/mount/rmd160.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ util-linux-ng-2.18/mount/rmd160.h 2010-07-08 14:38:38.000000000 +0200 @@ -0,0 +1,11 @@ +#ifndef RMD160_H +#define RMD160_H @@ -1071,11 +1068,10 @@ index 0000000..4b2c61d +#endif /*RMD160_H*/ + + -diff --git a/mount/sha512.c b/mount/sha512.c -new file mode 100644 -index 0000000..f717c8b ---- /dev/null -+++ b/mount/sha512.c +Index: util-linux-ng-2.18/mount/sha512.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ util-linux-ng-2.18/mount/sha512.c 2010-07-08 14:38:38.000000000 +0200 @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1509,11 +1505,10 @@ index 0000000..f717c8b + memset(&ctx, 0, sizeof(ctx)); +} +#endif -diff --git a/mount/sha512.h b/mount/sha512.h -new file mode 100644 -index 0000000..4b57c01 ---- /dev/null -+++ b/mount/sha512.h +Index: util-linux-ng-2.18/mount/sha512.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ util-linux-ng-2.18/mount/sha512.h 2010-07-08 14:38:38.000000000 +0200 @@ -0,0 +1,45 @@ +/* + * sha512.h @@ -1560,6 +1555,3 @@ index 0000000..4b57c01 +/* no sha384_write(), use sha512_write() */ +/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ +extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); --- -1.6.4.2 - diff --git a/util-linux-addpart-use-atoll.patch b/util-linux-addpart-use-atoll.patch deleted file mode 100644 index 35310a9..0000000 --- a/util-linux-addpart-use-atoll.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: util-linux-ng-2.17.2/partx/addpart.c -=================================================================== ---- util-linux-ng-2.17.2.orig/partx/addpart.c 2010-01-28 15:57:59.000000000 +0100 -+++ util-linux-ng-2.17.2/partx/addpart.c 2010-05-11 15:51:26.000000000 +0200 -@@ -25,8 +25,8 @@ main(int argc, char **argv){ - exit(1); - } - p.pno = atoi(argv[2]); -- p.start = 512 * ((long long) atol(argv[3])); -- p.length = 512 * ((long long) atol(argv[4])); -+ p.start = 512 * atoll(argv[3]); -+ p.length = 512 * atoll(argv[4]); - p.devname[0] = 0; - p.volname[0] = 0; - a.op = BLKPG_ADD_PARTITION; diff --git a/util-linux-mount-detect-ro-mount.patch b/util-linux-mount-detect-ro-mount.patch deleted file mode 100644 index 313b2b3..0000000 --- a/util-linux-mount-detect-ro-mount.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 81694f8c60dffb7851f941e69a1b79bc573ace53 Mon Sep 17 00:00:00 2001 -From: Petr Uzel -Date: Fri, 21 May 2010 15:19:31 +0200 -Subject: [PATCH] mount: detect when kernel silently adds MS_RDONLY flag - -Linux kernel can silently add MS_RDONLY flag when mounting file system that -does not have write support. Check this to avoid 'ro' in /proc/mounts and 'rw' -in mtab. - -[kzak@redhat.com: - don't check for 'ro' for MS_MOVE and MS_PROPAGATION] - -Reported-by: James Foris -Signed-off-by: Petr Uzel -Signed-off-by: Karel Zak ---- - mount/mount.c | 12 ++++++++++++ - 1 files changed, 12 insertions(+), 0 deletions(-) - -Index: util-linux-ng-2.17.2/mount/mount.c -=================================================================== ---- util-linux-ng-2.17.2.orig/mount/mount.c 2010-05-28 15:22:47.000000000 +0200 -+++ util-linux-ng-2.17.2/mount/mount.c 2010-05-28 15:23:03.000000000 +0200 -@@ -1388,6 +1388,18 @@ mount_retry: - flags &= ~MS_RDONLY; - } - -+ /* Kernel can silently add MS_RDONLY flag when mounting file system that -+ * does not have write support. Check this to avoid 'ro' in /proc/mounts -+ * and 'rw' in mtab. -+ */ -+ if (!fake && mnt5_res == 0 && -+ !(flags & MS_RDONLY) && !(flags & MS_PROPAGATION) && !(flags & MS_MOVE) && -+ is_readonly(node)) { -+ -+ printf(_("mount: warning: %s seems to be mounted read-only.\n"), node); -+ flags |= MS_RDONLY; -+ } -+ - if (fake || mnt5_res == 0) { - /* Mount succeeded, report this (if verbose) and write mtab entry. */ - diff --git a/util-linux-ng-2.17.2.tar.bz2 b/util-linux-ng-2.17.2.tar.bz2 deleted file mode 100644 index 9eb499a..0000000 --- a/util-linux-ng-2.17.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c9ae801b6a5ab20b7749a278a8bf6830ef53adc5e8b7eb0ac1a9f410c774118f -size 3815657 diff --git a/util-linux-ng-2.18.tar.bz2 b/util-linux-ng-2.18.tar.bz2 new file mode 100644 index 0000000..4afa426 --- /dev/null +++ b/util-linux-ng-2.18.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8c5c07c763888aa712b4585393346667a00793127c54cef0470cfa456b031cc +size 7669676 diff --git a/util-linux-rpmlintrc b/util-linux-rpmlintrc index 1741f88..52ce686 100644 --- a/util-linux-rpmlintrc +++ b/util-linux-rpmlintrc @@ -1,5 +1,4 @@ addFilter("init-script-without-%stop_on_removal-preun /etc/init.d/raw") addFilter("incoherent-init-script-name raw") addFilter("no-reload-entry /etc/init.d/raw") -addFilter("files-duplicate .*(rootflags|ramsize|vidmode)") diff --git a/util-linux.changes b/util-linux.changes index d84ec7b..6901a66 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Fri Jul 9 06:23:27 UTC 2010 - puzel@novell.com + +- update to util-linux-ng-2.18 + - do not provide rdev, ramsize, vidmode and rootflags commands + anymore + - fdisk does not use cylinders as display units by default + - libmount: new library; its API is still officially unstable + - new commands: findmnt, fsfreeze, swaplabel + - blkid: new option "-i" to print I/O limits + - full release notes: + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes +- update to adjtimex-1.28 +- update to which-2.20 +- drop util-linux-2.14.1-mount_skip_sync.patch (fixed upstream) +- drop util-linux-addpart-use-atoll.patch (fixed upstream) +- drop util-linux-mount-detect-ro-mount.patch (fixed upstream) +- drop adjtimex-1.20-nosyscall.diff (fixed upstream) +- cleanup specfile a bit + +------------------------------------------------------------------- +Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de + +- use %_smp_mflags + ------------------------------------------------------------------- Thu Jun 24 23:24:41 CEST 2010 - jeffm@suse.de diff --git a/util-linux.spec b/util-linux.spec index a18e67c..b19db8a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.17.2) +# spec file for package util-linux (Version 2.18) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -16,31 +16,40 @@ # +%define time_ver 1.7 +%define which_ver 2.20 +%define adjtimex_ver 1.28 Name: util-linux -BuildRequires: audit-devel gettext-devel pkg-config -BuildRequires: libselinux-devel libsepol-devel ncurses-devel pam-devel readline-devel zlib-devel +BuildRequires: audit-devel +BuildRequires: gettext-devel +BuildRequires: libselinux-devel +BuildRequires: libsepol-devel +BuildRequires: ncurses-devel +BuildRequires: pam-devel +BuildRequires: pkg-config +BuildRequires: readline-devel +BuildRequires: zlib-devel Url: http://userweb.kernel.org/~kzak/util-linux-ng/ Supplements: filesystem(minix) PreReq: %install_info_prereq permissions License: GPLv2+ Group: System/Base AutoReqProv: on -Version: 2.17.2 -Release: 5 +Version: 2.18 +Release: 1 Recommends: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2 Source1: util-linux-rpmlintrc +# XXX: make nologin part of login package Source2: nologin.c Source3: nologin.8 Source4: raw.init Source5: etc.raw Source6: etc_filesystems +# XXX: add libmnt Source7: baselibs.conf -%define time_ver 1.7 -%define which_ver 2.19 -%define adjtimex_ver 1.20 # XXX: post upstream? Source9: adjtimex-%{adjtimex_ver}.tar.bz2 # XXX: post upstream? @@ -66,20 +75,13 @@ Source51: blkid.conf ## # 241372 - remove legacy warnings from fdisk Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch -# bnc#447036 -Patch2: util-linux-2.14.1-mount_skip_sync.patch # crypto patch Patch3: util-linux-2.17.1-mount_losetup_crypto.patch Patch4: util-linux-2.17.1-losetup-honor-documented-c-option -# 603328 -Patch5: util-linux-addpart-use-atoll.patch -# bnc#481123 -Patch6: util-linux-mount-detect-ro-mount.patch Patch7: util-linux-swapon-btrfs-limitations ## ## adjtimex ## -Patch50: adjtimex-1.20-nosyscall.diff ## ## klogconsole ## @@ -96,8 +98,8 @@ Patch70: which-lib64.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed # -Provides: util = %{version}-%{release} rawio = %{version}-%{release} raw = %{version}-%{release} base = %{version}-%{release} schedutils = %{version}-%{release} uuid-runtime = %{version}-%{release} -Obsoletes: util < %{version}-%{release} rawio < %{version}-%{release} raw < %{version}-%{release} base < %{version}-%{release} schedutils < %{version}-%{release} uuid-runtime < %{version}-%{release} +Provides: util = %{version}-%{release} rawio = %{version}-%{release} raw = %{version}-%{release} base = %{version}-%{release} uuid-runtime = %{version}-%{release} +Obsoletes: util < %{version}-%{release} rawio < %{version}-%{release} raw < %{version}-%{release} base < %{version}-%{release} uuid-runtime < %{version}-%{release} %description This package contains a large variety of low-level system utilities @@ -118,7 +120,7 @@ License: GPLv2+ Summary: Development files for the filesystem detection library Group: Development/Libraries/C and C++ AutoReqProv: on -Requires: libblkid1 = %version libuuid-devel +Requires: libblkid1 = %version %description -n libblkid-devel Files needed to develop applications using the library for filesystem @@ -156,27 +158,44 @@ Requires: libuuid1 = %version Files to develop applications using the library to generate universally unique IDs (UUIDs). +%package -n libmount1 +License: GPLv2+ +Summary: Mount library +Group: System/Filesystems +AutoReqProv: on + +%description -n libmount1 +Library designed to be used in low-level utils like +mount(8) and /sbin/mount. helpers. + +%package -n libmount-devel +License: GPLv2+ +Summary: Development files for libmount1 +Group: Development/Libraries/C and C++ +AutoReqProv: on +Requires: libmount1 = %version + +%description -n libmount-devel +Files to develop applications using the libmount library. + %lang_package %prep %setup -q -a 9 -b 11 -b 12 -b 13 -n %name-ng-%version -#patch0 -p1 %patch1 -p1 -%patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 -%patch6 -p1 %patch7 -p1 # cd adjtimex-* -%patch50 -p1 +# adjtimex patches belongs here cd - # setctsid cp %{S:22} %{S:23} . # nologin cp %{S:2} %{S:3} %{S:26} %{S:30} . cd ../klogconsole -%patch55 -p1 -b .quiet +#%#patch55 -p1 -b .quiet +%patch55 -p1 %patch56 -p1 cd ../time-* %patch60 @@ -187,12 +206,11 @@ cd ../which-* # adjtimex build cd adjtimex-%{adjtimex_ver} CFLAGS="$RPM_OPT_FLAGS" ./configure -make %{?jobs:-j%jobs} +make %{?_smp_mflags} cd .. pushd ../ # which build cd which-%{which_ver} -#autoreconf -fi aclocal --force autoconf --force automake --force-missing --add-missing --foreign @@ -201,7 +219,7 @@ CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ %{_target_cpu}-suse-linux -make %{?jobs:-j%jobs} +make %{?_smp_mflags} cd .. # time build cd time-%{time_ver} @@ -211,16 +229,16 @@ CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE " INSTALL_PROGRAM='$(INSTALL)' \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ %{_target_cpu}-suse-linux -make %{?jobs:-j%jobs} +make %{?_smp_mflags} cd .. # klogconsole build cd klogconsole -make %{?jobs:-j%jobs} CFLAGS="$RPM_OPT_FLAGS" +make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" cd .. popd # setctsid build rm -f setctsid -make %{?jobs:-j%jobs} setctsid CFLAGS="$RPM_OPT_FLAGS" +make %{?_smp_mflags} setctsid CFLAGS="$RPM_OPT_FLAGS" # # util-linux itself # @@ -243,11 +261,8 @@ CFLAGS="$RPM_OPT_FLAGS" \ --enable-write \ --disable-use-tty-group \ --disable-static \ -%ifarch %ix86 x86_64 - --enable-rdev \ -%endif # -make %{?jobs:-j%jobs} +make %{?_smp_mflags} # gcc $RPM_OPT_FLAGS -o nologin nologin.c gcc $RPM_OPT_FLAGS -o mkzimage_cmdline %{S:29} @@ -300,6 +315,7 @@ install -m 644 %{SOURCE6} $RPM_BUILD_ROOT/etc/filesystems install -m 755 nologin $RPM_BUILD_ROOT/sbin rm -f $RPM_BUILD_ROOT/%{_libdir}/libblkid.la rm -f $RPM_BUILD_ROOT/%{_libdir}/libuuid.la +rm -f $RPM_BUILD_ROOT/%{_libdir}/libmount.la %ifnarch ppc ppc64 install -m 755 mkzimage_cmdline $RPM_BUILD_ROOT/usr/bin install -m 644 %{S:28} $RPM_BUILD_ROOT%{_mandir}/man8 @@ -385,6 +401,12 @@ fi %postun -n libblkid1 /sbin/ldconfig +%post -n libmount1 +/sbin/ldconfig + +%postun -n libmount1 +/sbin/ldconfig + %pre -n uuidd /usr/sbin/groupadd -r uuidd 2>/dev/null || : /usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ @@ -432,6 +454,7 @@ fi /bin/more /bin/mount /bin/umount +/bin/findmnt /sbin/adjtimex /sbin/agetty /sbin/blockdev @@ -455,6 +478,8 @@ fi /sbin/fsck /sbin/switch_root /sbin/wipefs +/sbin/fsfreeze +/sbin/swaplabel /usr/bin/ipcmk /bin/logger /usr/bin/cal @@ -473,8 +498,6 @@ fi /usr/bin/ipcs /usr/bin/isosize /usr/bin/line -#/usr/bin/linux32 -#/usr/bin/linux64 /usr/bin/look /usr/bin/lscpu /usr/bin/mcookie @@ -573,13 +596,14 @@ fi %{_mandir}/man8/fsck.minix.8.gz %{_mandir}/man8/isosize.8.gz %{_mandir}/man8/ldattach.8.gz -#%{_mandir}/man8/linux32.8.gz -#%{_mandir}/man8/linux64.8.gz %{_mandir}/man8/losetup.8.gz %{_mandir}/man8/mkfs.8.gz %{_mandir}/man8/mkswap.8.gz %{_mandir}/man8/mount.8.gz %{_mandir}/man8/nologin.8.gz +%{_mandir}/man8/findmnt.8.gz +%{_mandir}/man8/fsfreeze.8.gz +%{_mandir}/man8/swaplabel.8.gz %ifnarch ppc ppc64 %{_mandir}/man8/mkzimage_cmdline.8.gz %endif @@ -600,7 +624,6 @@ fi %attr (755,root,root) /usr/share/getopt/getopt-parse.tcsh %attr (755,root,root) /usr/share/getopt/getopt-test.bash %attr (755,root,root) /usr/share/getopt/getopt-test.tcsh -#/usr/share/locale/*/LC_MESSAGES/util-linux-ng.mo %ifnarch ia64 %doc fdisk/README.fdisk /sbin/fdisk @@ -613,18 +636,7 @@ fi /sbin/cfdisk /sbin/sfdisk %endif -%ifarch %ix86 x86_64 -/usr/sbin/ramsize -/usr/sbin/rdev -/usr/sbin/rootflags -/usr/sbin/vidmode -%{_mandir}/man8/ramsize.8.gz -%{_mandir}/man8/rdev.8.gz -%{_mandir}/man8/rootflags.8.gz -%{_mandir}/man8/vidmode.8.gz -%endif %ifnarch s390 s390x -#%config(noreplace) /etc/fdprm /usr/bin/cytune /usr/sbin/fdformat /sbin/hwclock @@ -637,35 +649,6 @@ fi %{_mandir}/man8/klogconsole.8.gz %{_mandir}/man8/tunelp.8.gz %endif -# setarch links -#%ifarch %ix86 x86_64 -#/usr/bin/i386 -#%{_mandir}/man8/i386.8.gz -#%endif -#%ifarch x86_64 -#/usr/bin/x86_64 -#%{_mandir}/man8/x86_64.8.gz -#%endif -#%ifarch s390 s390x -#/usr/bin/s390 -#/usr/bin/s390x -#%{_mandir}/man8/s390.8.gz -#%{_mandir}/man8/s390x.8.gz -#%endif -#%ifarch ppc ppc64 -#/usr/bin/ppc -#/usr/bin/ppc32 -#/usr/bin/ppc64 -#%{_mandir}/man8/ppc.8.gz -#%{_mandir}/man8/ppc32.8.gz -#%{_mandir}/man8/ppc64.8.gz -#%endif -#%ifarch ia64 -#/usr/bin/i386 -#/usr/bin/ia64 -#%{_mandir}/man8/i386.8.gz -#%{_mandir}/man8/ia64.8.gz -#%endif %files -n libblkid1 %defattr(-, root, root) @@ -680,6 +663,18 @@ fi %_libdir/pkgconfig/blkid.pc %{_mandir}/man3/libblkid.3.gz +%files -n libmount1 +%defattr(-, root, root) +/%{_lib}/libmount.so.1 +/%{_lib}/libmount.so.1.* + +%files -n libmount-devel +%defattr(-, root, root) +%{_libdir}/libmount.so +%dir %{_includedir}/mount +%{_includedir}/mount/mount.h +%_libdir/pkgconfig/mount.pc + %files -n uuidd %defattr(-, root, root) %verify(not mode) %attr(0755,root,root) /usr/sbin/uuidd diff --git a/which-2.19.tar.bz2 b/which-2.19.tar.bz2 deleted file mode 100644 index 3de4dde..0000000 --- a/which-2.19.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0fb382412c553f05f1336a43591e7de106e9ca3c675113973160e72196001df6 -size 105483 diff --git a/which-2.20.tar.bz2 b/which-2.20.tar.bz2 new file mode 100644 index 0000000..f10b8ce --- /dev/null +++ b/which-2.20.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33ca01bb3d801338e4a464367d74eaab24f87041c44c9b5e1150393f1744a3a0 +size 107758 From 5bdcd208ef6c6db008cd93695862afa49cea1b810b34242bdb397f2194b7270b Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 7 Oct 2010 23:10:52 +0000 Subject: [PATCH 094/211] Accepting request 49395 from Base:System Copy from Base:System/util-linux based on submit request 49395 from user elvigia OBS-URL: https://build.opensuse.org/request/show/49395 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=97 --- util-linux.changes | 6 ++++++ util-linux.spec | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index 6901a66..ad48b20 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Sep 28 11:42:46 UTC 2010 - aj@suse.de + +- uuidd rc file already creates /var/run/uuidd, mark it as %ghost + in spec file. + ------------------------------------------------------------------- Fri Jul 9 06:23:27 UTC 2010 - puzel@novell.com diff --git a/util-linux.spec b/util-linux.spec index b19db8a..c013c02 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -37,7 +37,7 @@ License: GPLv2+ Group: System/Base AutoReqProv: on Version: 2.18 -Release: 1 +Release: 2 Recommends: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2 @@ -679,7 +679,7 @@ fi %defattr(-, root, root) %verify(not mode) %attr(0755,root,root) /usr/sbin/uuidd %attr(-,uuidd,uuidd) %dir /var/lib/libuuid -%attr(-,uuidd,uuidd) %dir /var/run/uuidd +%attr(-,uuidd,uuidd) %ghost %dir /var/run/uuidd /etc/init.d/uuidd %{_mandir}/man8/uuidd.8.gz From 4ddb57574c00c839c1d3970177d0184a655574a16bace45465631c955984712f Mon Sep 17 00:00:00 2001 From: Ruediger Oertel Date: Fri, 12 Nov 2010 13:26:39 +0000 Subject: [PATCH 095/211] Accepting request 52790 from Base:System Accepted submit request 52790 from user kay_sievers OBS-URL: https://build.opensuse.org/request/show/52790 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=98 --- util-linux-agetty-s-option.patch | 188 +++++++++++++++++++++++++++++++ util-linux.changes | 5 + util-linux.spec | 2 + 3 files changed, 195 insertions(+) create mode 100644 util-linux-agetty-s-option.patch diff --git a/util-linux-agetty-s-option.patch b/util-linux-agetty-s-option.patch new file mode 100644 index 0000000..f036a27 --- /dev/null +++ b/util-linux-agetty-s-option.patch @@ -0,0 +1,188 @@ +git diff v2.18..HEAD login-utils/agetty.c login-utils/agetty.8 + +agetty: fix -s option (baud rate setup) +agetty: add -c to reuse cflags +agetty: add -s to reuse existing baud rate + +diff --git a/login-utils/agetty.8 b/login-utils/agetty.8 +index 8761374..084086f 100644 +--- a/login-utils/agetty.8 ++++ b/login-utils/agetty.8 +@@ -3,7 +3,7 @@ + agetty \- alternative Linux getty + + .SH SYNOPSIS +-.BR "agetty " [\-8ihLmnUw] ++.BR "agetty " [\-c8ihLmnsUw] + .RI "[-f " issue_file ] + .RI "[-l " login_program ] + .RI "[-I " init ] +@@ -12,16 +12,6 @@ agetty \- alternative Linux getty + .I port + .I baud_rate,... + .RI [ term ] +-.br +-.BR "agetty " [\-8ihLmnw] +-.RI "[-f " issue_file ] +-.RI "[-l " login_program ] +-.RI "[-I " init ] +-.RI "[-t " timeout ] +-.RI "[-H " login_host ] +-.I baud_rate,... +-.I port +-.RI [ term ] + + .SH DESCRIPTION + .ad +@@ -92,6 +82,10 @@ whatever init(8) may have set, and is inherited by login and the shell. + .fi + .ad + .TP ++\-c ++Don't reset terminal cflags (control modes). See \fItermios(3)\fP for more ++details. ++.TP + \-8 + Assume that the tty is 8-bit clean, hence disable parity detection. + .TP +@@ -163,6 +157,10 @@ Force the line to be a local line with no need for carrier detect. This can + be useful when you have a locally attached terminal where the serial line + does not set the carrier detect signal. + .TP ++\-s ++Try to keep the existing baud rate. The baud rates from ++the command line are used when agetty receives a BREAK character. ++.TP + \-U + Turn on support for detecting an uppercase only terminal. This setting will + detect a login name containing only capitals as indicating an uppercase +diff --git a/login-utils/agetty.c b/login-utils/agetty.c +index 39a1fd3..9d463ce 100644 +--- a/login-utils/agetty.c ++++ b/login-utils/agetty.c +@@ -133,6 +133,8 @@ struct options { + #define F_CUSTISSUE (1<<6) /* give alternative issue file */ + #define F_NOPROMPT (1<<7) /* don't ask for login name! */ + #define F_LCUC (1<<8) /* Support for *LCUC stty modes */ ++#define F_KEEPSPEED (1<<9) /* Follow baud rate from kernel */ ++#define F_KEEPCFLAGS (1<<10) /* Reuse c_cflags setup from kernel */ + + /* Storage for things detected while the login name was read. */ + +@@ -203,7 +205,7 @@ void parse_args P_((int argc, char **argv, struct options *op)); + void parse_speeds P_((struct options *op, char *arg)); + void update_utmp P_((char *line)); + void open_tty P_((char *tty, struct termios *tp, int local)); +-void termio_init P_((struct termios *tp, int speed, struct options *op)); ++void termio_init P_((struct termios *tp, struct options *op)); + void auto_baud P_((struct termios *tp)); + void do_prompt P_((struct options *op, struct termios *tp)); + void next_speed P_((struct termios *tp, struct options *op)); +@@ -297,7 +299,7 @@ main(argc, argv) + tcsetpgrp(0, getpid()); + /* Initialize the termios settings (raw mode, eight-bit, blocking i/o). */ + debug("calling termio_init\n"); +- termio_init(&termios, options.speeds[FIRST_SPEED], &options); ++ termio_init(&termios, &options); + + /* write the modem init string and DON'T flush the buffers */ + if (options.flags & F_INITSTRING) { +@@ -373,8 +375,11 @@ parse_args(argc, argv, op) + extern int optind; /* getopt */ + int c; + +- while (isascii(c = getopt(argc, argv, "8I:LH:f:hil:mt:wUn"))) { ++ while (isascii(c = getopt(argc, argv, "8cI:LH:f:hil:mst:wUn"))) { + switch (c) { ++ case 'c': ++ op->flags |= F_KEEPCFLAGS; ++ break; + case '8': + op->eightbits = 1; + break; +@@ -443,6 +448,9 @@ parse_args(argc, argv, op) + case 'n': + op->flags |= F_NOPROMPT; + break; ++ case 's': ++ op->flags |= F_KEEPSPEED; /* keep kernel defined speed */ ++ break; + case 't': /* time out */ + if ((op->timeout = atoi(optarg)) <= 0) + error(_("bad timeout value: %s"), optarg); +@@ -691,11 +699,17 @@ char gbuf[1024]; + char area[1024]; + + void +-termio_init(tp, speed, op) ++termio_init(tp, op) + struct termios *tp; +- int speed; + struct options *op; + { ++ speed_t ispeed, ospeed; ++ ++ if (op->flags & F_KEEPSPEED) { ++ ispeed = cfgetispeed(tp); /* save the original setting */ ++ ospeed = cfgetospeed(tp); ++ } else ++ ospeed = ispeed = op->speeds[FIRST_SPEED]; + + /* + * Initial termios settings: 8-bit characters, raw-mode, blocking i/o. +@@ -706,14 +720,21 @@ termio_init(tp, speed, op) + /* flush input and output queues, important for modems! */ + (void) tcflush(0, TCIOFLUSH); + +- tp->c_cflag = CS8 | HUPCL | CREAD; +- cfsetispeed(tp, speed); +- cfsetospeed(tp, speed); ++ tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; ++ ++ if (!(op->flags & F_KEEPCFLAGS)) ++ tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL); ++ ++ /* Note that the speed is stored in the c_cflag termios field, so we have ++ * set the speed always when the cflag se reseted. ++ */ ++ cfsetispeed(tp, ispeed); ++ cfsetospeed(tp, ospeed); ++ + if (op->flags & F_LOCAL) { + tp->c_cflag |= CLOCAL; + } + +- tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; + #ifdef HAVE_STRUCT_TERMIOS_C_LINE + tp->c_line = 0; + #endif +@@ -973,9 +994,18 @@ next_speed(tp, op) + struct termios *tp; + struct options *op; + { +- static int baud_index = FIRST_SPEED;/* current speed index */ ++ static int baud_index = -1; ++ ++ if (baud_index == -1) ++ /* ++ * if the F_KEEPSPEED flags is set then the FIRST_SPEED is not ++ * tested yet (see termio_init()). ++ */ ++ baud_index = (op->flags & F_KEEPSPEED) ? FIRST_SPEED : ++ 1 % op->numspeed; ++ else ++ baud_index = (baud_index + 1) % op->numspeed; + +- baud_index = (baud_index + 1) % op->numspeed; + cfsetispeed(tp, op->speeds[baud_index]); + cfsetospeed(tp, op->speeds[baud_index]); + (void) tcsetattr(0, TCSANOW, tp); +@@ -1203,7 +1233,7 @@ bcode(s) + void + usage() + { +- fprintf(stderr, _("Usage: %s [-8hiLmUw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] baud_rate,... line [termtype]\nor\t[-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] line baud_rate,... [termtype]\n"), progname); ++ fprintf(stderr, _("Usage: %s [-8hiLmsUw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] baud_rate,... line [termtype]\nor\t[-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] line baud_rate,... [termtype]\n"), progname); + exit(1); + } + diff --git a/util-linux.changes b/util-linux.changes index ad48b20..9ae7449 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Nov 11 10:36:35 CET 2010 - kay.sievers@novell.com + +- add 'agetty' -s option needed for systemd's serial console setup + ------------------------------------------------------------------- Tue Sep 28 11:42:46 UTC 2010 - aj@suse.de diff --git a/util-linux.spec b/util-linux.spec index c013c02..f986ef6 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -79,6 +79,7 @@ Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch3: util-linux-2.17.1-mount_losetup_crypto.patch Patch4: util-linux-2.17.1-losetup-honor-documented-c-option Patch7: util-linux-swapon-btrfs-limitations +Patch8: util-linux-agetty-s-option.patch ## ## adjtimex ## @@ -185,6 +186,7 @@ Files to develop applications using the libmount library. %patch3 -p1 %patch4 -p1 %patch7 -p1 +%patch8 -p1 # cd adjtimex-* # adjtimex patches belongs here From 8a584cf405355cb6f87ad20811d018da93ed7818fafb6995fa0835978290ad40 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 12 Nov 2010 13:26:45 +0000 Subject: [PATCH 096/211] Autobuild autoformatter for 52790 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=99 --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index f986ef6..0ef0a17 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -37,7 +37,7 @@ License: GPLv2+ Group: System/Base AutoReqProv: on Version: 2.18 -Release: 2 +Release: 3 Recommends: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2 From 216ffefca1164c00e8b2ddce3684d41e957bf9b3ad69336029de89072e3131a8 Mon Sep 17 00:00:00 2001 From: Ruediger Oertel Date: Sat, 20 Nov 2010 10:14:38 +0000 Subject: [PATCH 097/211] Accepting request 53370 from Base:System Accepted submit request 53370 from user coolo OBS-URL: https://build.opensuse.org/request/show/53370 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=100 --- util-linux.changes | 5 +++++ util-linux.spec | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index 9ae7449..db146c7 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 16 16:08:48 UTC 2010 - cristian.rodriguez@opensuse.org + +- disable silent rules + ------------------------------------------------------------------- Thu Nov 11 10:36:35 CET 2010 - kay.sievers@novell.com diff --git a/util-linux.spec b/util-linux.spec index 0ef0a17..17c3dca 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -248,9 +248,7 @@ autoreconf -fi export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" CFLAGS="$RPM_OPT_FLAGS" \ -./configure \ - --mandir=%{_mandir} \ - --datadir=%{_datadir} \ +%configure \ --bindir=/bin \ --sbindir=/sbin \ --libdir=/%{_lib} \ @@ -263,6 +261,7 @@ CFLAGS="$RPM_OPT_FLAGS" \ --enable-write \ --disable-use-tty-group \ --disable-static \ + --disable-silent-rules # make %{?_smp_mflags} # From bfa24caae7fb882a594006b8aa0f2e487b5337f9227fa54803756762259dd761 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Sat, 20 Nov 2010 10:14:44 +0000 Subject: [PATCH 098/211] Autobuild autoformatter for 53370 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=101 --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 17c3dca..24e11a5 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -37,7 +37,7 @@ License: GPLv2+ Group: System/Base AutoReqProv: on Version: 2.18 -Release: 3 +Release: 4 Recommends: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2 From 09e175b77d3a8eaa259f914e8b2a410a8379a3ec9f64df0689db5db9d1c4bfe9 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Tue, 30 Nov 2010 14:42:11 +0000 Subject: [PATCH 099/211] Accepting request 54162 from Base:System Accepted submit request 54162 from user puzel OBS-URL: https://build.opensuse.org/request/show/54162 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=102 --- util-linux-2.17.1-mount_losetup_crypto.patch | 57 +- util-linux-fsck-l-option.patch | 526 +++++++++++++++++++ util-linux.changes | 15 + util-linux.spec | 3 + 4 files changed, 572 insertions(+), 29 deletions(-) create mode 100644 util-linux-fsck-l-option.patch diff --git a/util-linux-2.17.1-mount_losetup_crypto.patch b/util-linux-2.17.1-mount_losetup_crypto.patch index 93475eb..a5790ad 100644 --- a/util-linux-2.17.1-mount_losetup_crypto.patch +++ b/util-linux-2.17.1-mount_losetup_crypto.patch @@ -40,8 +40,8 @@ Signed-off-by: Ludwig Nussel Index: util-linux-ng-2.18/mount/Makefile.am =================================================================== ---- util-linux-ng-2.18.orig/mount/Makefile.am 2010-05-24 12:35:47.000000000 +0200 -+++ util-linux-ng-2.18/mount/Makefile.am 2010-07-08 14:39:01.000000000 +0200 +--- util-linux-ng-2.18.orig/mount/Makefile.am ++++ util-linux-ng-2.18/mount/Makefile.am @@ -7,7 +7,7 @@ sbin_PROGRAMS = losetup swapon dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 @@ -53,8 +53,8 @@ Index: util-linux-ng-2.18/mount/Makefile.am hdrs_mount = fstab.h mount_mntent.h mount_constants.h \ Index: util-linux-ng-2.18/mount/lomount.c =================================================================== ---- util-linux-ng-2.18.orig/mount/lomount.c 2010-05-19 23:36:23.000000000 +0200 -+++ util-linux-ng-2.18/mount/lomount.c 2010-07-08 14:39:29.000000000 +0200 +--- util-linux-ng-2.18.orig/mount/lomount.c ++++ util-linux-ng-2.18/mount/lomount.c @@ -23,6 +23,12 @@ #include "sundries.h" #include "xmalloc.h" @@ -182,7 +182,7 @@ Index: util-linux-ng-2.18/mount/lomount.c } } -@@ -734,20 +793,70 @@ set_loop(const char *device, const char +@@ -734,20 +793,69 @@ set_loop(const char *device, const char } #endif @@ -226,8 +226,7 @@ Index: util-linux-ng-2.18/mount/lomount.c + + if(!loopinfo64.lo_encrypt_key_size) { + if(!keysz) { -+ if(verbose) -+ fprintf(stderr, _("please specify a key length\n")); ++ fprintf(stderr, _("please specify a key length\n")); + return 1; + } + loopinfo64.lo_encrypt_key_size = keysz>>3; @@ -265,7 +264,7 @@ Index: util-linux-ng-2.18/mount/lomount.c } if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { -@@ -897,7 +1006,13 @@ usage(void) { +@@ -897,7 +1005,13 @@ usage(void) { fprintf(stderr, _("\nOptions:\n" " -e | --encryption enable data encryption with specified \n" @@ -279,7 +278,7 @@ Index: util-linux-ng-2.18/mount/lomount.c " -o | --offset start at offset into file\n" " --sizelimit loop limited to only bytes of the file\n" " -p | --pass-fd read passphrase from file descriptor \n" -@@ -910,11 +1025,14 @@ usage(void) { +@@ -910,11 +1024,14 @@ usage(void) { int main(int argc, char **argv) { char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc; @@ -294,7 +293,7 @@ Index: util-linux-ng-2.18/mount/lomount.c uintmax_t off = 0, slimit = 0; struct option longopts[] = { { "all", 0, 0, 'a' }, -@@ -923,6 +1041,8 @@ main(int argc, char **argv) { +@@ -923,6 +1040,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -303,7 +302,7 @@ Index: util-linux-ng-2.18/mount/lomount.c { "associated", 1, 0, 'j' }, { "offset", 1, 0, 'o' }, { "sizelimit", 1, 0, 128 }, -@@ -939,12 +1059,13 @@ main(int argc, char **argv) { +@@ -939,12 +1058,13 @@ main(int argc, char **argv) { capacity = delete = find = all = 0; assoc = offset = sizelimit = encryption = passfd = NULL; @@ -318,7 +317,7 @@ Index: util-linux-ng-2.18/mount/lomount.c longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -969,6 +1090,12 @@ main(int argc, char **argv) { +@@ -969,6 +1089,12 @@ main(int argc, char **argv) { case 'j': assoc = optarg; break; @@ -331,7 +330,7 @@ Index: util-linux-ng-2.18/mount/lomount.c case 'o': offset = optarg; break; -@@ -1058,8 +1185,11 @@ main(int argc, char **argv) { +@@ -1058,8 +1184,11 @@ main(int argc, char **argv) { else { if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(); @@ -346,8 +345,8 @@ Index: util-linux-ng-2.18/mount/lomount.c printf(_("stolen loop=%s...trying again\n"), Index: util-linux-ng-2.18/mount/lomount.h =================================================================== ---- util-linux-ng-2.18.orig/mount/lomount.h 2010-02-04 12:53:56.000000000 +0100 -+++ util-linux-ng-2.18/mount/lomount.h 2010-07-08 14:38:38.000000000 +0200 +--- util-linux-ng-2.18.orig/mount/lomount.h ++++ util-linux-ng-2.18/mount/lomount.h @@ -1,5 +1,6 @@ -extern int set_loop(const char *, const char *, unsigned long long, unsigned long long, - const char *, int, int *); @@ -359,8 +358,8 @@ Index: util-linux-ng-2.18/mount/lomount.h extern int is_loop_autoclear(const char *device); Index: util-linux-ng-2.18/mount/losetup.8 =================================================================== ---- util-linux-ng-2.18.orig/mount/losetup.8 2010-05-19 23:36:23.000000000 +0200 -+++ util-linux-ng-2.18/mount/losetup.8 2010-07-08 14:38:38.000000000 +0200 +--- util-linux-ng-2.18.orig/mount/losetup.8 ++++ util-linux-ng-2.18/mount/losetup.8 @@ -96,9 +96,18 @@ find the first unused loop device. If a argument is present, use this device. Otherwise, print its name .IP "\fB\-h, \-\-help\fP" @@ -391,8 +390,8 @@ Index: util-linux-ng-2.18/mount/losetup.8 .BR cryptsetup (8). Index: util-linux-ng-2.18/mount/mount.8 =================================================================== ---- util-linux-ng-2.18.orig/mount/mount.8 2010-06-30 10:41:35.000000000 +0200 -+++ util-linux-ng-2.18/mount/mount.8 2010-07-08 14:38:38.000000000 +0200 +--- util-linux-ng-2.18.orig/mount/mount.8 ++++ util-linux-ng-2.18/mount/mount.8 @@ -869,6 +869,15 @@ Every time the inode is modified, the i_ .B noiversion Do not increment the i_version inode field. @@ -422,8 +421,8 @@ Index: util-linux-ng-2.18/mount/mount.8 then any loop device allocated by Index: util-linux-ng-2.18/mount/mount.c =================================================================== ---- util-linux-ng-2.18.orig/mount/mount.c 2010-06-30 12:51:09.000000000 +0200 -+++ util-linux-ng-2.18/mount/mount.c 2010-07-08 14:38:38.000000000 +0200 +--- util-linux-ng-2.18.orig/mount/mount.c ++++ util-linux-ng-2.18/mount/mount.c @@ -96,6 +96,9 @@ struct mountargs { void *data; }; @@ -517,8 +516,8 @@ Index: util-linux-ng-2.18/mount/mount.c /* mount -a */ Index: util-linux-ng-2.18/mount/rmd160.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.18/mount/rmd160.c 2010-07-08 14:38:38.000000000 +0200 +--- /dev/null ++++ util-linux-ng-2.18/mount/rmd160.c @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -1054,8 +1053,8 @@ Index: util-linux-ng-2.18/mount/rmd160.c +} Index: util-linux-ng-2.18/mount/rmd160.h =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.18/mount/rmd160.h 2010-07-08 14:38:38.000000000 +0200 +--- /dev/null ++++ util-linux-ng-2.18/mount/rmd160.h @@ -0,0 +1,11 @@ +#ifndef RMD160_H +#define RMD160_H @@ -1070,8 +1069,8 @@ Index: util-linux-ng-2.18/mount/rmd160.h + Index: util-linux-ng-2.18/mount/sha512.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.18/mount/sha512.c 2010-07-08 14:38:38.000000000 +0200 +--- /dev/null ++++ util-linux-ng-2.18/mount/sha512.c @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1507,8 +1506,8 @@ Index: util-linux-ng-2.18/mount/sha512.c +#endif Index: util-linux-ng-2.18/mount/sha512.h =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ util-linux-ng-2.18/mount/sha512.h 2010-07-08 14:38:38.000000000 +0200 +--- /dev/null ++++ util-linux-ng-2.18/mount/sha512.h @@ -0,0 +1,45 @@ +/* + * sha512.h diff --git a/util-linux-fsck-l-option.patch b/util-linux-fsck-l-option.patch new file mode 100644 index 0000000..d89982a --- /dev/null +++ b/util-linux-fsck-l-option.patch @@ -0,0 +1,526 @@ +fsck: add support for whole-disk locking (-l option) + +This feature allows to call multiple independent fsck instances rather +than use only one "fsck -A" process. + +The lock uses LOCK_EX flock(2). The lock request is ignored if the +whole-disk is non-rotating disk. The verbose mode (-V) provides +information about disk locking. + +Note that "fsck -l" does not care if the device is stacked, for +example if you want to call "fsck -l /dev/md0" and "fsck -l /dev/md1" +then the underlying devices will not be locked. The traditional "fsck +-A" does not run in parallel for stacked devices. + +http://pkgs.fedoraproject.org/gitweb/?p=util-linux-ng.git;a=commitdiff;h=6c69926dbfca8b07bd2f93b56bc8e7c54c7b227d#patch1 + +diff -up util-linux-ng-2.18/fsck/fsck.8.kzak util-linux-ng-2.18/fsck/fsck.8 +--- util-linux-ng-2.18/fsck/fsck.8.kzak 2010-06-30 12:51:35.000000000 +0200 ++++ util-linux-ng-2.18/fsck/fsck.8 2010-10-26 23:55:30.000000000 +0200 +@@ -7,7 +7,7 @@ + fsck \- check and repair a Linux file system + .SH SYNOPSIS + .B fsck +-.RB [ \-sAVRTMNP ] ++.RB [ \-lsAVRTMNP ] + .RB [ \-C + .RI [ fd ]] + .RB [ \-t +@@ -80,6 +80,17 @@ variable. Please see the file system-sp + further details. + .SH OPTIONS + .TP ++.B \-l ++Lock whole-disk device by exclusive ++.BR flock (2). ++This option can be used with one device only (e.g. -A and -l are mutually ++exclusive). This option is recommended when more ++.B fsck (8) ++instances are executed in the same time. The option is ignored when used for ++multiple devices or for non-rotating disk. The fsck does not lock underlying ++devices if executed to check stacked devices (e.g. MD or DM) -- this feature is ++not implemented yet. ++.TP + .B \-s + Serialize + .B fsck +@@ -200,6 +211,11 @@ If there are multiple filesystems with t + fsck will attempt to check them in parallel, although it will avoid running + multiple filesystem checks on the same physical disk. + .sp ++.B fsck ++does not check stacked devices (RAIDs, dm-crypt, ...) in parallel with any other ++device. See below for FSCK_FORCE_ALL_PARALLEL setting. The /sys filesystem is ++used to detemine dependencies between devices. ++.sp + Hence, a very common configuration in + .I /etc/fstab + files is to set the root filesystem to have a +@@ -366,10 +382,10 @@ program's behavior is affected by the fo + .B FSCK_FORCE_ALL_PARALLEL + If this environment variable is set, + .B fsck +-will attempt to run all of the specified filesystems in parallel, +-regardless of whether the filesystems appear to be on the same +-device. (This is useful for RAID systems or high-end storage systems +-such as those sold by companies such as IBM or EMC.) ++will attempt to run all of the specified filesystems in parallel, regardless of ++whether the filesystems appear to be on the same device. (This is useful for ++RAID systems or high-end storage systems such as those sold by companies such ++as IBM or EMC.) Note that the fs_passno value is still used. + .TP + .B FSCK_MAX_INST + This environment variable will limit the maximum number of file system +diff -up util-linux-ng-2.18/fsck/fsck.c.kzak util-linux-ng-2.18/fsck/fsck.c +--- util-linux-ng-2.18/fsck/fsck.c.kzak 2010-05-19 23:36:23.000000000 +0200 ++++ util-linux-ng-2.18/fsck/fsck.c 2010-10-26 23:55:30.000000000 +0200 +@@ -31,6 +31,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -42,6 +44,8 @@ + #include + #include + #include ++#include ++#include + + #include "fsprobe.h" + +@@ -85,6 +89,7 @@ char *devices[MAX_DEVICES]; + char *args[MAX_ARGS]; + int num_devices, num_args; + ++int lockdisk = 0; + int verbose = 0; + int doall = 0; + int noexecute = 0; +@@ -214,11 +219,97 @@ static void parse_escape(char *word) + *q = 0; + } + ++static dev_t get_disk(const char *device) ++{ ++ struct stat st; ++ dev_t disk; ++ ++ if (!stat(device, &st) && ++ !blkid_devno_to_wholedisk(st.st_rdev, NULL, 0, &disk)) ++ return disk; ++ ++ return 0; ++} ++ ++static int is_irrotational_disk(dev_t disk) ++{ ++ char path[PATH_MAX]; ++ FILE *f; ++ int rc, x; ++ ++ rc = snprintf(path, sizeof(path), ++ "/sys/dev/block/%d:%d/queue/rotational", ++ major(disk), minor(disk)); ++ ++ if (rc < 0 || rc + 1 > sizeof(path)) ++ return 0; ++ ++ f = fopen(path, "r"); ++ if (!f) ++ return 0; ++ ++ rc = fscanf(f, "%u", &x); ++ fclose(f); ++ ++ return rc == 1 ? !x : 0; ++} ++ ++static void lock_disk(struct fsck_instance *inst) ++{ ++ dev_t disk = inst->fs->disk ? : get_disk(inst->fs->device); ++ char *diskname; ++ ++ if (!disk || is_irrotational_disk(disk)) ++ return; ++ ++ diskname = blkid_devno_to_devname(disk); ++ if (!diskname) ++ return; ++ ++ if (verbose) ++ printf(_("Locking disk %s ... "), diskname); ++ ++ inst->lock = open(diskname, O_CLOEXEC | O_RDONLY); ++ if (inst->lock >= 0) { ++ int rc = -1; ++ ++ /* inform users that we're waiting on the lock */ ++ if (verbose && ++ (rc = flock(inst->lock, LOCK_EX | LOCK_NB)) != 0 && ++ errno == EWOULDBLOCK) ++ printf(_("(waiting) ")); ++ ++ if (rc != 0 && flock(inst->lock, LOCK_EX) != 0) { ++ close(inst->lock); /* failed */ ++ inst->lock = -1; ++ } ++ } ++ ++ if (verbose) ++ printf("%s.\n", inst->lock >= 0 ? _("success") : _("failed")); ++ ++ free(diskname); ++ return; ++} ++ ++static void unlock_disk(struct fsck_instance *inst) ++{ ++ if (inst->lock >= 0) { ++ /* explicitly unlock, don't rely on close(), maybe some library ++ * (e.g. liblkid) has still open the device. ++ */ ++ flock(inst->lock, LOCK_UN); ++ close(inst->lock); ++ } ++} ++ ++ ++ + static void free_instance(struct fsck_instance *i) + { ++ if (lockdisk) ++ unlock_disk(i); + free(i->prog); +- free(i->device); +- free(i->base_device); + free(i); + return; + } +@@ -240,6 +331,8 @@ static struct fs_info *create_fs_device( + fs->passno = passno; + fs->flags = 0; + fs->next = NULL; ++ fs->disk = 0; ++ fs->stacked = 0; + + if (!filesys_info) + filesys_info = fs; +@@ -414,8 +507,7 @@ static int progress_active(NOARGS) + * Execute a particular fsck program, and link it into the list of + * child processes we are waiting for. + */ +-static int execute(const char *type, const char *device, const char *mntpt, +- int interactive) ++static int execute(const char *type, struct fs_info *fs, int interactive) + { + char *s, *argv[80], prog[80]; + int argc, i; +@@ -452,7 +544,7 @@ static int execute(const char *type, con + } + } + +- argv[argc++] = string_copy(device); ++ argv[argc++] = string_copy(fs->device); + argv[argc] = 0; + + s = find_fsck(prog); +@@ -464,12 +556,19 @@ static int execute(const char *type, con + + if (verbose || noexecute) { + printf("[%s (%d) -- %s] ", s, num_running, +- mntpt ? mntpt : device); ++ fs->mountpt ? fs->mountpt : fs->device); + for (i=0; i < argc; i++) + printf("%s ", argv[i]); + printf("\n"); + } + ++ ++ inst->fs = fs; ++ inst->lock = -1; ++ ++ if (lockdisk) ++ lock_disk(inst); ++ + /* Fork and execute the correct program. */ + if (noexecute) + pid = -1; +@@ -492,8 +591,6 @@ static int execute(const char *type, con + inst->pid = pid; + inst->prog = string_copy(prog); + inst->type = string_copy(type); +- inst->device = string_copy(device); +- inst->base_device = base_device(device); + inst->start_time = time(0); + inst->next = NULL; + +@@ -597,12 +694,12 @@ static struct fsck_instance *wait_one(in + } else { + printf(_("Warning... %s for device %s exited " + "with signal %d.\n"), +- inst->prog, inst->device, sig); ++ inst->prog, inst->fs->device, sig); + status = EXIT_ERROR; + } + } else { + printf(_("%s %s: status is %x, should never happen.\n"), +- inst->prog, inst->device, status); ++ inst->prog, inst->fs->device, status); + status = EXIT_ERROR; + } + inst->exit_status = status; +@@ -641,7 +738,7 @@ ret_inst: + instance_list = inst->next; + if (verbose > 1) + printf(_("Finished with %s (exit status %d)\n"), +- inst->device, inst->exit_status); ++ inst->fs->device, inst->exit_status); + num_running--; + return inst; + } +@@ -698,7 +795,7 @@ static void fsck_device(struct fs_info * + type = DEFAULT_FSTYPE; + + num_running++; +- retval = execute(type, fs->device, fs->mountpt, interactive); ++ retval = execute(type, fs, interactive); + if (retval) { + fprintf(stderr, _("%s: Error %d while executing fsck.%s " + "for %s\n"), progname, retval, type, fs->device); +@@ -924,40 +1021,70 @@ static int ignore(struct fs_info *fs) + return 0; + } + ++static int count_slaves(dev_t disk) ++{ ++ DIR *dir; ++ struct dirent *dp; ++ char dirname[PATH_MAX]; ++ int count = 0; ++ ++ snprintf(dirname, sizeof(dirname), ++ "/sys/dev/block/%u:%u/slaves/", ++ major(disk), minor(disk)); ++ ++ if (!(dir = opendir(dirname))) ++ return -1; ++ ++ while ((dp = readdir(dir)) != 0) { ++#ifdef _DIRENT_HAVE_D_TYPE ++ if (dp->d_type != DT_UNKNOWN && dp->d_type != DT_LNK) ++ continue; ++#endif ++ if (dp->d_name[0] == '.' && ++ ((dp->d_name[1] == 0) || ++ ((dp->d_name[1] == '.') && (dp->d_name[2] == 0)))) ++ continue; ++ ++ count++; ++ } ++ closedir(dir); ++ return count; ++} ++ + /* + * Returns TRUE if a partition on the same disk is already being + * checked. + */ +-static int device_already_active(char *device) ++static int disk_already_active(struct fs_info *fs) + { + struct fsck_instance *inst; +- char *base; + + if (force_all_parallel) + return 0; + +-#ifdef BASE_MD +- /* Don't check a soft raid disk with any other disk */ +- if (instance_list && +- (!strncmp(instance_list->device, BASE_MD, sizeof(BASE_MD)-1) || +- !strncmp(device, BASE_MD, sizeof(BASE_MD)-1))) ++ if (instance_list && instance_list->fs->stacked) ++ /* any instance for a stacked device is already running */ + return 1; +-#endif + +- base = base_device(device); ++ if (!fs->disk) { ++ fs->disk = get_disk(fs->device); ++ if (fs->disk) ++ fs->stacked = count_slaves(fs->disk); ++ } ++ + /* + * If we don't know the base device, assume that the device is + * already active if there are any fsck instances running. ++ * ++ * Don't check a stacked device with any other disk too. + */ +- if (!base) ++ if (!fs->disk || fs->stacked) + return (instance_list != 0); ++ + for (inst = instance_list; inst; inst = inst->next) { +- if (!inst->base_device || !strcmp(base, inst->base_device)) { +- free(base); ++ if (!inst->fs->disk || fs->disk == inst->fs->disk) + return 1; +- } + } +- free(base); + return 0; + } + +@@ -1038,7 +1165,7 @@ static int check_all(NOARGS) + * already been spawned, then we need to defer + * this to another pass. + */ +- if (device_already_active(fs->device)) { ++ if (disk_already_active(fs)) { + pass_done = 0; + continue; + } +@@ -1188,6 +1315,9 @@ static void PRS(int argc, char *argv[]) + } + } + break; ++ case 'l': ++ lockdisk++; ++ break; + case 'V': + verbose++; + break; +@@ -1298,6 +1428,12 @@ int main(int argc, char *argv[]) + if ((num_devices == 1) || (serialize)) + interactive = 1; + ++ if (lockdisk && (doall || num_devices > 1)) { ++ fprintf(stderr, _("%s: the -l option can be used with one " ++ "device only -- ignore\n"), progname); ++ lockdisk = 0; ++ } ++ + /* If -A was specified ("check all"), do that! */ + if (doall) + return check_all(); +diff -up util-linux-ng-2.18/fsck/fsck.h.kzak util-linux-ng-2.18/fsck/fsck.h +--- util-linux-ng-2.18/fsck/fsck.h.kzak 2010-03-18 23:11:23.000000000 +0100 ++++ util-linux-ng-2.18/fsck/fsck.h 2010-10-26 23:55:30.000000000 +0200 +@@ -44,6 +44,8 @@ struct fs_info { + int freq; + int passno; + int flags; ++ dev_t disk; ++ int stacked; + struct fs_info *next; + }; + +@@ -56,12 +58,12 @@ struct fs_info { + struct fsck_instance { + int pid; + int flags; ++ int lock; /* flock()ed whole disk file descriptor or -1 */ + int exit_status; + time_t start_time; + char * prog; + char * type; +- char * device; +- char * base_device; ++ struct fs_info *fs; + struct fsck_instance *next; + }; + +diff -up util-linux-ng-2.18/fsck/Makefile.am.kzak util-linux-ng-2.18/fsck/Makefile.am +--- util-linux-ng-2.18/fsck/Makefile.am.kzak 2010-05-24 12:33:46.000000000 +0200 ++++ util-linux-ng-2.18/fsck/Makefile.am 2010-10-26 23:55:30.000000000 +0200 +@@ -3,7 +3,7 @@ include $(top_srcdir)/config/include-Mak + sbin_PROGRAMS = fsck + dist_man_MANS = fsck.8 + +-fsck_SOURCES = base_device.c fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ ++fsck_SOURCES = fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ + $(top_srcdir)/lib/fsprobe.c $(top_srcdir)/lib/canonicalize.c + fsck_LDADD = + fsck_CFLAGS = $(AM_CFLAGS) +diff -up util-linux-ng-2.18/fsck/Makefile.in.kzak util-linux-ng-2.18/fsck/Makefile.in +--- util-linux-ng-2.18/fsck/Makefile.in.kzak 2010-10-26 23:56:04.000000000 +0200 ++++ util-linux-ng-2.18/fsck/Makefile.in 2010-10-26 23:56:15.000000000 +0200 +@@ -62,9 +62,8 @@ CONFIG_CLEAN_FILES = + CONFIG_CLEAN_VPATH_FILES = + am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" + PROGRAMS = $(sbin_PROGRAMS) +-am_fsck_OBJECTS = fsck-base_device.$(OBJEXT) fsck-fsck.$(OBJEXT) \ +- fsck-ismounted.$(OBJEXT) fsck-fsprobe.$(OBJEXT) \ +- fsck-canonicalize.$(OBJEXT) ++am_fsck_OBJECTS = fsck-fsck.$(OBJEXT) fsck-ismounted.$(OBJEXT) \ ++ fsck-fsprobe.$(OBJEXT) fsck-canonicalize.$(OBJEXT) + fsck_OBJECTS = $(am_fsck_OBJECTS) + am__DEPENDENCIES_1 = + @BUILD_LIBBLKID_FALSE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) +@@ -204,6 +203,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PERL = @PERL@ +@@ -315,7 +315,7 @@ ul_libmount_la = $(top_builddir)/shlibs/ + # mount.h is generated by ./configure script and stored in build directory + ul_libmount_incdir = $(ul_libmount_builddir) + dist_man_MANS = fsck.8 +-fsck_SOURCES = base_device.c fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ ++fsck_SOURCES = fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ + $(top_srcdir)/lib/fsprobe.c $(top_srcdir)/lib/canonicalize.c + + fsck_LDADD = $(am__append_1) $(am__append_3) +@@ -407,7 +407,6 @@ mostlyclean-compile: + distclean-compile: + -rm -f *.tab.c + +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-base_device.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-canonicalize.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-fsck.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-fsprobe.Po@am__quote@ +@@ -437,22 +436,6 @@ distclean-compile: + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +-fsck-base_device.o: base_device.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-base_device.o -MD -MP -MF $(DEPDIR)/fsck-base_device.Tpo -c -o fsck-base_device.o `test -f 'base_device.c' || echo '$(srcdir)/'`base_device.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-base_device.Tpo $(DEPDIR)/fsck-base_device.Po +-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='base_device.c' object='fsck-base_device.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -c -o fsck-base_device.o `test -f 'base_device.c' || echo '$(srcdir)/'`base_device.c +- +-fsck-base_device.obj: base_device.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-base_device.obj -MD -MP -MF $(DEPDIR)/fsck-base_device.Tpo -c -o fsck-base_device.obj `if test -f 'base_device.c'; then $(CYGPATH_W) 'base_device.c'; else $(CYGPATH_W) '$(srcdir)/base_device.c'; fi` +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-base_device.Tpo $(DEPDIR)/fsck-base_device.Po +-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='base_device.c' object='fsck-base_device.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -c -o fsck-base_device.obj `if test -f 'base_device.c'; then $(CYGPATH_W) 'base_device.c'; else $(CYGPATH_W) '$(srcdir)/base_device.c'; fi` +- + fsck-fsck.o: fsck.c + @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-fsck.o -MD -MP -MF $(DEPDIR)/fsck-fsck.Tpo -c -o fsck-fsck.o `test -f 'fsck.c' || echo '$(srcdir)/'`fsck.c + @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-fsck.Tpo $(DEPDIR)/fsck-fsck.Po +diff -up util-linux-ng-2.18/Makefile.am.kzak util-linux-ng-2.18/Makefile.am +--- util-linux-ng-2.18/Makefile.am.kzak 2010-03-18 23:11:23.000000000 +0100 ++++ util-linux-ng-2.18/Makefile.am 2010-10-26 23:55:30.000000000 +0200 +@@ -30,8 +30,10 @@ SUBDIRS += mount + endif + + if BUILD_FSCK ++if BUILD_LIBBLKID + SUBDIRS += fsck + endif ++endif + + ACLOCAL_AMFLAGS = -I m4 + diff --git a/util-linux.changes b/util-linux.changes index db146c7..a5ef0a3 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Tue Nov 30 12:19:53 UTC 2010 - puzel@novell.com + +- update util-linux-2.17.1-mount_losetup_crypto.patch (bnc#655804) + +------------------------------------------------------------------- +Fri Nov 26 19:10:27 CET 2010 - kay.sievers@novell.com + +- add Provides: fsck-with-dev-lock + +------------------------------------------------------------------- +Thu Nov 25 13:37:43 CET 2010 - kay.sievers@novell.com + +- add 'fsck -l' option needed for systemd + ------------------------------------------------------------------- Tue Nov 16 16:08:48 UTC 2010 - cristian.rodriguez@opensuse.org diff --git a/util-linux.spec b/util-linux.spec index 24e11a5..165cd27 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -32,6 +32,7 @@ BuildRequires: readline-devel BuildRequires: zlib-devel Url: http://userweb.kernel.org/~kzak/util-linux-ng/ Supplements: filesystem(minix) +Provides: fsck-with-dev-lock = %{version} PreReq: %install_info_prereq permissions License: GPLv2+ Group: System/Base @@ -80,6 +81,7 @@ Patch3: util-linux-2.17.1-mount_losetup_crypto.patch Patch4: util-linux-2.17.1-losetup-honor-documented-c-option Patch7: util-linux-swapon-btrfs-limitations Patch8: util-linux-agetty-s-option.patch +Patch9: util-linux-fsck-l-option.patch ## ## adjtimex ## @@ -187,6 +189,7 @@ Files to develop applications using the libmount library. %patch4 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 # cd adjtimex-* # adjtimex patches belongs here From 48ae891e725545f47609e1ff5c8566a623fc7022c02d06cd16e74c01e1fc2071 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Tue, 30 Nov 2010 14:42:20 +0000 Subject: [PATCH 100/211] Autobuild autoformatter for 54162 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=103 --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 165cd27..cfe4502 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -38,7 +38,7 @@ License: GPLv2+ Group: System/Base AutoReqProv: on Version: 2.18 -Release: 4 +Release: 5 Recommends: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2 From dbc9b8a0bd50614f831f03575d4efb3d3f3c27181001d215d3cb262489d48eb2 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Sun, 5 Dec 2010 22:09:36 +0000 Subject: [PATCH 101/211] Accepting request 9386 from home:vuntz:branches:GNOME:Factory Copy from IBS home:mszeredi:branches:SUSE:Factory:Head/util-linux based on submit request 9386 from user mszeredi OBS-URL: https://build.opensuse.org/request/show/9386 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=104 --- util-linux-2.18-no-canonicalize-fix.patch | 24 +++++++++++++++++++++++ util-linux.changes | 11 +++++++++++ util-linux.spec | 6 +++++- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.18-no-canonicalize-fix.patch diff --git a/util-linux-2.18-no-canonicalize-fix.patch b/util-linux-2.18-no-canonicalize-fix.patch new file mode 100644 index 0000000..774025f --- /dev/null +++ b/util-linux-2.18-no-canonicalize-fix.patch @@ -0,0 +1,24 @@ +commit 1cf4c20b198c0c6566198fd00b983d9aaf8321bc +Author: Miklos Szeredi +Date: Thu Oct 7 16:05:12 2010 +0200 + + mount: don't canonicalize "spec" with --no-canonicalize option + + "Spec" was still canonicalized despite --no-canonicalize. This + resulted in a hang during login with pam_encfs (Debian Bug#593336). + + Signed-off-by: Miklos Szeredi + +diff --git a/mount/devname.c b/mount/devname.c +index 585d259..05da092 100644 +--- a/mount/devname.c ++++ b/mount/devname.c +@@ -8,7 +8,7 @@ spec_to_devname(const char *spec) + { + if (!spec) + return NULL; +- if (is_pseudo_fs(spec)) ++ if (nocanonicalize || is_pseudo_fs(spec)) + return xstrdup(spec); + return fsprobe_get_devname_by_spec(spec); + } diff --git a/util-linux.changes b/util-linux.changes index a5ef0a3..bf031ad 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Dec 2 17:09:08 CET 2010 - mszeredi@suse.cz + +- mount: don't canonicalize "spec" with --no-canonicalize option + [bnc#651598] + +------------------------------------------------------------------- +Thu Dec 2 15:23:36 CET 2010 - mszeredi@suse.cz + +- add Provides: util-linux(fake+no-canonicalize) [bnc#651598] + ------------------------------------------------------------------- Tue Nov 30 12:19:53 UTC 2010 - puzel@novell.com diff --git a/util-linux.spec b/util-linux.spec index cfe4502..1ec25de 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -33,12 +33,14 @@ BuildRequires: zlib-devel Url: http://userweb.kernel.org/~kzak/util-linux-ng/ Supplements: filesystem(minix) Provides: fsck-with-dev-lock = %{version} +# bnc#651598: +Provides: util-linux(fake+no-canonicalize) PreReq: %install_info_prereq permissions License: GPLv2+ Group: System/Base AutoReqProv: on Version: 2.18 -Release: 5 +Release: 6 Recommends: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2 @@ -82,6 +84,7 @@ Patch4: util-linux-2.17.1-losetup-honor-documented-c-option Patch7: util-linux-swapon-btrfs-limitations Patch8: util-linux-agetty-s-option.patch Patch9: util-linux-fsck-l-option.patch +Patch10: util-linux-2.18-no-canonicalize-fix.patch ## ## adjtimex ## @@ -190,6 +193,7 @@ Files to develop applications using the libmount library. %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 # cd adjtimex-* # adjtimex patches belongs here From c3d67ddd14adf6e1d9ece857dab24187dad8970c2dab8a77100712be62a54ae6 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Sun, 19 Dec 2010 11:40:27 +0000 Subject: [PATCH 102/211] Accepting request 55969 from Base:System Accepted submit request 55969 from user puzel OBS-URL: https://build.opensuse.org/request/show/55969 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=105 --- ...inux-swapon-canonicalize-swap-device.patch | 41 +++++++++++++++++++ util-linux.changes | 6 +++ util-linux.spec | 5 ++- 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 util-linux-swapon-canonicalize-swap-device.patch diff --git a/util-linux-swapon-canonicalize-swap-device.patch b/util-linux-swapon-canonicalize-swap-device.patch new file mode 100644 index 0000000..435a540 --- /dev/null +++ b/util-linux-swapon-canonicalize-swap-device.patch @@ -0,0 +1,41 @@ +Index: util-linux-ng-2.18/mount/swapon.c +=================================================================== +--- util-linux-ng-2.18.orig/mount/swapon.c ++++ util-linux-ng-2.18/mount/swapon.c +@@ -23,6 +23,7 @@ + #include "pathnames.h" + #include "swapheader.h" + #include "mangle.h" ++#include "canonicalize.h" + + #define PATH_MKSWAP "/sbin/mkswap" + +@@ -171,7 +172,11 @@ read_proc_swaps(void) { + break; + swapFiles = q; + +- swapFiles[numSwaps++] = unmangle(line); ++ if ((p = unmangle(line)) == NULL) ++ break; ++ ++ swapFiles[numSwaps++] = canonicalize_path(p); ++ free(p); + } + fclose(swaps); + } +@@ -179,10 +184,14 @@ read_proc_swaps(void) { + static int + is_in_proc_swaps(const char *fname) { + int i; ++ char *p = canonicalize_path(fname); + + for (i = 0; i < numSwaps; i++) +- if (swapFiles[i] && !strcmp(fname, swapFiles[i])) ++ if (swapFiles[i] && !strcmp(p, swapFiles[i])) { ++ free(p); + return 1; ++ } ++ free(p); + return 0; + } + diff --git a/util-linux.changes b/util-linux.changes index bf031ad..150828d 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Dec 14 16:11:34 UTC 2010 - puzel@novell.com + +- add util-linux-swapon-canonicalize-swap-device.patch + (bnc#641142) + ------------------------------------------------------------------- Thu Dec 2 17:09:08 CET 2010 - mszeredi@suse.cz diff --git a/util-linux.spec b/util-linux.spec index 1ec25de..cebcbfc 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -30,7 +30,7 @@ BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel -Url: http://userweb.kernel.org/~kzak/util-linux-ng/ +Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) Provides: fsck-with-dev-lock = %{version} # bnc#651598: @@ -85,6 +85,7 @@ Patch7: util-linux-swapon-btrfs-limitations Patch8: util-linux-agetty-s-option.patch Patch9: util-linux-fsck-l-option.patch Patch10: util-linux-2.18-no-canonicalize-fix.patch +Patch11: util-linux-swapon-canonicalize-swap-device.patch ## ## adjtimex ## @@ -194,6 +195,8 @@ Files to develop applications using the libmount library. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 + # cd adjtimex-* # adjtimex patches belongs here From 169936d2c505894d5c80462a1b9cd38a01616fb30cbe997f51dbda94f3e16eb1 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Sun, 19 Dec 2010 11:40:49 +0000 Subject: [PATCH 103/211] Autobuild autoformatter for 55969 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=106 --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index cebcbfc..c25297f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -40,7 +40,7 @@ License: GPLv2+ Group: System/Base AutoReqProv: on Version: 2.18 -Release: 6 +Release: 7 Recommends: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2 From ef9ea17de6db251dc672e9aef0fc8f19bfd6cfacb728dcb0c07602bf9f38393e Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Fri, 14 Jan 2011 00:23:23 +0000 Subject: [PATCH 104/211] Accepting request 57964 from Base:System Accepted submit request 57964 from user puzel OBS-URL: https://build.opensuse.org/request/show/57964 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=107 --- util-linux-2.17.1-mount_losetup_crypto.patch | 119 ++-- util-linux-2.18-no-canonicalize-fix.patch | 24 - util-linux-2.19-rc1.tar.bz2 | 3 + util-linux-agetty-s-option.patch | 188 ------- util-linux-fsck-l-option.patch | 526 ------------------ util-linux-ng-2.18.tar.bz2 | 3 - util-linux-swapon-btrfs-limitations | 42 -- ...inux-swapon-canonicalize-swap-device.patch | 41 -- util-linux.changes | 53 ++ util-linux.spec | 385 ++++++------- 10 files changed, 311 insertions(+), 1073 deletions(-) delete mode 100644 util-linux-2.18-no-canonicalize-fix.patch create mode 100644 util-linux-2.19-rc1.tar.bz2 delete mode 100644 util-linux-agetty-s-option.patch delete mode 100644 util-linux-fsck-l-option.patch delete mode 100644 util-linux-ng-2.18.tar.bz2 delete mode 100644 util-linux-swapon-btrfs-limitations delete mode 100644 util-linux-swapon-canonicalize-swap-device.patch diff --git a/util-linux-2.17.1-mount_losetup_crypto.patch b/util-linux-2.17.1-mount_losetup_crypto.patch index a5790ad..c12e577 100644 --- a/util-linux-2.17.1-mount_losetup_crypto.patch +++ b/util-linux-2.17.1-mount_losetup_crypto.patch @@ -38,10 +38,10 @@ Signed-off-by: Ludwig Nussel create mode 100644 mount/sha512.c create mode 100644 mount/sha512.h -Index: util-linux-ng-2.18/mount/Makefile.am +Index: util-linux-2.19-rc1/mount/Makefile.am =================================================================== ---- util-linux-ng-2.18.orig/mount/Makefile.am -+++ util-linux-ng-2.18/mount/Makefile.am +--- util-linux-2.19-rc1.orig/mount/Makefile.am ++++ util-linux-2.19-rc1/mount/Makefile.am @@ -7,7 +7,7 @@ sbin_PROGRAMS = losetup swapon dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 @@ -51,10 +51,10 @@ Index: util-linux-ng-2.18/mount/Makefile.am # generic header for mount and umount hdrs_mount = fstab.h mount_mntent.h mount_constants.h \ -Index: util-linux-ng-2.18/mount/lomount.c +Index: util-linux-2.19-rc1/mount/lomount.c =================================================================== ---- util-linux-ng-2.18.orig/mount/lomount.c -+++ util-linux-ng-2.18/mount/lomount.c +--- util-linux-2.19-rc1.orig/mount/lomount.c ++++ util-linux-2.19-rc1/mount/lomount.c @@ -23,6 +23,12 @@ #include "sundries.h" #include "xmalloc.h" @@ -68,7 +68,7 @@ Index: util-linux-ng-2.18/mount/lomount.c #ifdef LOOP_SET_FD -@@ -390,12 +396,22 @@ show_loop_fd(int fd, char *device) { +@@ -464,12 +470,22 @@ show_loop_fd(int fd, char *device) { if (loopinfo64.lo_encrypt_type || loopinfo64.lo_crypt_name[0]) { @@ -94,7 +94,7 @@ Index: util-linux-ng-2.18/mount/lomount.c } printf("\n"); return 0; -@@ -644,7 +660,7 @@ xgetpass(int pfd, const char *prompt) { +@@ -718,7 +734,7 @@ xgetpass(int pfd, const char *prompt) { } if (pass == NULL) @@ -103,7 +103,7 @@ Index: util-linux-ng-2.18/mount/lomount.c pass[i] = 0; return pass; -@@ -658,6 +674,24 @@ digits_only(const char *s) { +@@ -732,6 +748,24 @@ digits_only(const char *s) { return 1; } @@ -128,7 +128,7 @@ Index: util-linux-ng-2.18/mount/lomount.c /* * return codes: * 0 - success -@@ -666,10 +700,11 @@ digits_only(const char *s) { +@@ -740,10 +774,11 @@ digits_only(const char *s) { */ int set_loop(const char *device, const char *file, unsigned long long offset, @@ -142,7 +142,7 @@ Index: util-linux-ng-2.18/mount/lomount.c char *filename; if (verbose) { -@@ -707,13 +742,37 @@ set_loop(const char *device, const char +@@ -781,13 +816,37 @@ set_loop(const char *device, const char filename = (char *) file; xstrncpy((char *)loopinfo64.lo_file_name, filename, LO_NAME_SIZE); @@ -182,7 +182,7 @@ Index: util-linux-ng-2.18/mount/lomount.c } } -@@ -734,20 +793,69 @@ set_loop(const char *device, const char +@@ -808,20 +867,69 @@ set_loop(const char *device, const char } #endif @@ -264,9 +264,9 @@ Index: util-linux-ng-2.18/mount/lomount.c } if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { -@@ -897,7 +1005,13 @@ usage(void) { +@@ -969,7 +1077,13 @@ usage(FILE *f) { - fprintf(stderr, _("\nOptions:\n" + fprintf(f, _("\nOptions:\n" " -e | --encryption enable data encryption with specified \n" + " -H | --phash hash password using specified algorithm (sha512/sha256/sha384/rmd160/none)\n" " -h | --help this help\n" @@ -278,7 +278,7 @@ Index: util-linux-ng-2.18/mount/lomount.c " -o | --offset start at offset into file\n" " --sizelimit loop limited to only bytes of the file\n" " -p | --pass-fd read passphrase from file descriptor \n" -@@ -910,11 +1024,14 @@ usage(void) { +@@ -983,11 +1097,14 @@ usage(FILE *f) { int main(int argc, char **argv) { char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc; @@ -293,7 +293,7 @@ Index: util-linux-ng-2.18/mount/lomount.c uintmax_t off = 0, slimit = 0; struct option longopts[] = { { "all", 0, 0, 'a' }, -@@ -923,6 +1040,8 @@ main(int argc, char **argv) { +@@ -996,6 +1113,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -302,7 +302,7 @@ Index: util-linux-ng-2.18/mount/lomount.c { "associated", 1, 0, 'j' }, { "offset", 1, 0, 'o' }, { "sizelimit", 1, 0, 128 }, -@@ -939,12 +1058,13 @@ main(int argc, char **argv) { +@@ -1012,12 +1131,13 @@ main(int argc, char **argv) { capacity = delete = find = all = 0; assoc = offset = sizelimit = encryption = passfd = NULL; @@ -317,7 +317,7 @@ Index: util-linux-ng-2.18/mount/lomount.c longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -969,6 +1089,12 @@ main(int argc, char **argv) { +@@ -1045,6 +1165,12 @@ main(int argc, char **argv) { case 'j': assoc = optarg; break; @@ -330,36 +330,37 @@ Index: util-linux-ng-2.18/mount/lomount.c case 'o': offset = optarg; break; -@@ -1058,8 +1184,11 @@ main(int argc, char **argv) { +@@ -1134,8 +1260,10 @@ main(int argc, char **argv) { else { if (passfd && sscanf(passfd, "%d", &pfd) != 1) - usage(); + usage(stderr); + if (keysize && sscanf(keysize,"%d",&keysz) != 1) -+ usage(); ++ usage(stderr); do { - res = set_loop(device, file, off, slimit, encryption, pfd, &ro); -+ res = set_loop(device, file, off, slimit, encryption, phash, -+ pfd, &ro, keysz); ++ res = set_loop(device, file, off, slimit, encryption, phash, pfd, &ro, keysz); if (res == 2 && find) { if (verbose) printf(_("stolen loop=%s...trying again\n"), -Index: util-linux-ng-2.18/mount/lomount.h +Index: util-linux-2.19-rc1/mount/lomount.h =================================================================== ---- util-linux-ng-2.18.orig/mount/lomount.h -+++ util-linux-ng-2.18/mount/lomount.h -@@ -1,5 +1,6 @@ +--- util-linux-2.19-rc1.orig/mount/lomount.h ++++ util-linux-2.19-rc1/mount/lomount.h +@@ -1,8 +1,8 @@ + #ifndef UTIL_LINUX_LOMOUNT_H + #define UTIL_LINUX_LOMOUNT_H + -extern int set_loop(const char *, const char *, unsigned long long, unsigned long long, - const char *, int, int *); -+extern int set_loop(const char * device, const char * file, unsigned long long offset, -+ unsigned long long, const char *encryption, const char *phash, -+ int pfd, int *options, int keysz); ++extern int set_loop(const char * device, const char * file, unsigned long long offset, unsigned long long, ++ const char * encryption, const char *phash, int pfd, int *options, int keysz); extern int del_loop(const char *); extern int is_loop_device(const char *); extern int is_loop_autoclear(const char *device); -Index: util-linux-ng-2.18/mount/losetup.8 +Index: util-linux-2.19-rc1/mount/losetup.8 =================================================================== ---- util-linux-ng-2.18.orig/mount/losetup.8 -+++ util-linux-ng-2.18/mount/losetup.8 +--- util-linux-2.19-rc1.orig/mount/losetup.8 ++++ util-linux-2.19-rc1/mount/losetup.8 @@ -96,9 +96,18 @@ find the first unused loop device. If a argument is present, use this device. Otherwise, print its name .IP "\fB\-h, \-\-help\fP" @@ -388,11 +389,11 @@ Index: util-linux-ng-2.18/mount/losetup.8 Cryptoloop is deprecated in favor of dm-crypt. For more details see .BR cryptsetup (8). -Index: util-linux-ng-2.18/mount/mount.8 +Index: util-linux-2.19-rc1/mount/mount.8 =================================================================== ---- util-linux-ng-2.18.orig/mount/mount.8 -+++ util-linux-ng-2.18/mount/mount.8 -@@ -869,6 +869,15 @@ Every time the inode is modified, the i_ +--- util-linux-2.19-rc1.orig/mount/mount.8 ++++ util-linux-2.19-rc1/mount/mount.8 +@@ -901,6 +901,15 @@ Every time the inode is modified, the i_ .B noiversion Do not increment the i_version inode field. .TP @@ -408,7 +409,7 @@ Index: util-linux-ng-2.18/mount/mount.8 .B mand Allow mandatory locks on this filesystem. See .BR fcntl (2). -@@ -2582,6 +2591,10 @@ that are really options to +@@ -2623,6 +2632,10 @@ that are really options to .BR \%losetup (8). (These options can be used in addition to those specific to the filesystem type.) @@ -419,11 +420,11 @@ Index: util-linux-ng-2.18/mount/mount.8 Since Linux 2.6.25 is supported auto-destruction of loop devices and then any loop device allocated by -Index: util-linux-ng-2.18/mount/mount.c +Index: util-linux-2.19-rc1/mount/mount.c =================================================================== ---- util-linux-ng-2.18.orig/mount/mount.c -+++ util-linux-ng-2.18/mount/mount.c -@@ -96,6 +96,9 @@ struct mountargs { +--- util-linux-2.19-rc1.orig/mount/mount.c ++++ util-linux-2.19-rc1/mount/mount.c +@@ -105,6 +105,9 @@ struct mountargs { void *data; }; @@ -433,7 +434,7 @@ Index: util-linux-ng-2.18/mount/mount.c /* Map from -o and fstab option strings to the flag argument to mount(2). */ struct opt_map { const char *opt; /* option name */ -@@ -201,6 +204,7 @@ static int opt_nofail = 0; +@@ -210,6 +213,7 @@ static int opt_nofail = 0; static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_sizelimit, *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper; @@ -441,7 +442,7 @@ Index: util-linux-ng-2.18/mount/mount.c static int is_readonly(const char *node); static int mounted (const char *spec0, const char *node0); -@@ -217,6 +221,8 @@ static struct string_opt_map { +@@ -226,6 +230,8 @@ static struct string_opt_map { { "offset=", 0, &opt_offset }, { "sizelimit=", 0, &opt_sizelimit }, { "encryption=", 0, &opt_encryption }, @@ -450,7 +451,7 @@ Index: util-linux-ng-2.18/mount/mount.c { "speed=", 0, &opt_speed }, { "comment=", 1, &opt_comment }, { "uhelper=", 0, &opt_uhelper }, -@@ -1116,7 +1122,8 @@ loop_check(const char **spec, const char +@@ -1208,7 +1214,8 @@ loop_check(const char **spec, const char *type = opt_vfstype; } @@ -460,7 +461,7 @@ Index: util-linux-ng-2.18/mount/mount.c *loopfile = *spec; /* Automatically create a loop device from a regular file if a filesystem -@@ -1170,7 +1177,7 @@ loop_check(const char **spec, const char +@@ -1273,7 +1280,7 @@ loop_check(const char **spec, const char printf(_("mount: going to use the loop device %s\n"), *loopdev); if ((res = set_loop(*loopdev, *loopfile, offset, sizelimit, @@ -469,7 +470,7 @@ Index: util-linux-ng-2.18/mount/mount.c if (res == 2) { /* loop dev has been grabbed by some other process, try again, if not given explicitly */ -@@ -1981,6 +1988,7 @@ static struct option longopts[] = { +@@ -2209,6 +2216,7 @@ static struct option longopts[] = { { "options", 1, 0, 'o' }, { "test-opts", 1, 0, 'O' }, { "pass-fd", 1, 0, 'p' }, @@ -477,7 +478,7 @@ Index: util-linux-ng-2.18/mount/mount.c { "types", 1, 0, 't' }, { "bind", 0, 0, 'B' }, { "move", 0, 0, 'M' }, -@@ -2143,6 +2151,7 @@ main(int argc, char *argv[]) { +@@ -2372,6 +2380,7 @@ main(int argc, char *argv[]) { char *options = NULL, *test_opts = NULL, *node; const char *spec = NULL; char *label = NULL; @@ -485,7 +486,7 @@ Index: util-linux-ng-2.18/mount/mount.c char *uuid = NULL; char *types = NULL; char *p; -@@ -2173,7 +2182,7 @@ main(int argc, char *argv[]) { +@@ -2402,7 +2411,7 @@ main(int argc, char *argv[]) { initproctitle(argc, argv); #endif @@ -494,7 +495,7 @@ Index: util-linux-ng-2.18/mount/mount.c longopts, NULL)) != -1) { switch (c) { case 'a': /* mount everything in fstab */ -@@ -2194,6 +2203,9 @@ main(int argc, char *argv[]) { +@@ -2423,6 +2432,9 @@ main(int argc, char *argv[]) { case 'i': external_allowed = 0; break; @@ -504,7 +505,7 @@ Index: util-linux-ng-2.18/mount/mount.c case 'l': list_with_volumelabel = 1; break; -@@ -2341,6 +2353,9 @@ main(int argc, char *argv[]) { +@@ -2573,6 +2585,9 @@ main(int argc, char *argv[]) { atexit(unlock_mtab); @@ -514,10 +515,10 @@ Index: util-linux-ng-2.18/mount/mount.c switch (argc+specseen) { case 0: /* mount -a */ -Index: util-linux-ng-2.18/mount/rmd160.c +Index: util-linux-2.19-rc1/mount/rmd160.c =================================================================== --- /dev/null -+++ util-linux-ng-2.18/mount/rmd160.c ++++ util-linux-2.19-rc1/mount/rmd160.c @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -1051,10 +1052,10 @@ Index: util-linux-ng-2.18/mount/rmd160.c + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -Index: util-linux-ng-2.18/mount/rmd160.h +Index: util-linux-2.19-rc1/mount/rmd160.h =================================================================== --- /dev/null -+++ util-linux-ng-2.18/mount/rmd160.h ++++ util-linux-2.19-rc1/mount/rmd160.h @@ -0,0 +1,11 @@ +#ifndef RMD160_H +#define RMD160_H @@ -1067,10 +1068,10 @@ Index: util-linux-ng-2.18/mount/rmd160.h +#endif /*RMD160_H*/ + + -Index: util-linux-ng-2.18/mount/sha512.c +Index: util-linux-2.19-rc1/mount/sha512.c =================================================================== --- /dev/null -+++ util-linux-ng-2.18/mount/sha512.c ++++ util-linux-2.19-rc1/mount/sha512.c @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1504,10 +1505,10 @@ Index: util-linux-ng-2.18/mount/sha512.c + memset(&ctx, 0, sizeof(ctx)); +} +#endif -Index: util-linux-ng-2.18/mount/sha512.h +Index: util-linux-2.19-rc1/mount/sha512.h =================================================================== --- /dev/null -+++ util-linux-ng-2.18/mount/sha512.h ++++ util-linux-2.19-rc1/mount/sha512.h @@ -0,0 +1,45 @@ +/* + * sha512.h diff --git a/util-linux-2.18-no-canonicalize-fix.patch b/util-linux-2.18-no-canonicalize-fix.patch deleted file mode 100644 index 774025f..0000000 --- a/util-linux-2.18-no-canonicalize-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 1cf4c20b198c0c6566198fd00b983d9aaf8321bc -Author: Miklos Szeredi -Date: Thu Oct 7 16:05:12 2010 +0200 - - mount: don't canonicalize "spec" with --no-canonicalize option - - "Spec" was still canonicalized despite --no-canonicalize. This - resulted in a hang during login with pam_encfs (Debian Bug#593336). - - Signed-off-by: Miklos Szeredi - -diff --git a/mount/devname.c b/mount/devname.c -index 585d259..05da092 100644 ---- a/mount/devname.c -+++ b/mount/devname.c -@@ -8,7 +8,7 @@ spec_to_devname(const char *spec) - { - if (!spec) - return NULL; -- if (is_pseudo_fs(spec)) -+ if (nocanonicalize || is_pseudo_fs(spec)) - return xstrdup(spec); - return fsprobe_get_devname_by_spec(spec); - } diff --git a/util-linux-2.19-rc1.tar.bz2 b/util-linux-2.19-rc1.tar.bz2 new file mode 100644 index 0000000..332396c --- /dev/null +++ b/util-linux-2.19-rc1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:583c122245f301b8cdd27e37a7a1fc774fcf1a73c3d633d9eac0c165e9b573d6 +size 4266321 diff --git a/util-linux-agetty-s-option.patch b/util-linux-agetty-s-option.patch deleted file mode 100644 index f036a27..0000000 --- a/util-linux-agetty-s-option.patch +++ /dev/null @@ -1,188 +0,0 @@ -git diff v2.18..HEAD login-utils/agetty.c login-utils/agetty.8 - -agetty: fix -s option (baud rate setup) -agetty: add -c to reuse cflags -agetty: add -s to reuse existing baud rate - -diff --git a/login-utils/agetty.8 b/login-utils/agetty.8 -index 8761374..084086f 100644 ---- a/login-utils/agetty.8 -+++ b/login-utils/agetty.8 -@@ -3,7 +3,7 @@ - agetty \- alternative Linux getty - - .SH SYNOPSIS --.BR "agetty " [\-8ihLmnUw] -+.BR "agetty " [\-c8ihLmnsUw] - .RI "[-f " issue_file ] - .RI "[-l " login_program ] - .RI "[-I " init ] -@@ -12,16 +12,6 @@ agetty \- alternative Linux getty - .I port - .I baud_rate,... - .RI [ term ] --.br --.BR "agetty " [\-8ihLmnw] --.RI "[-f " issue_file ] --.RI "[-l " login_program ] --.RI "[-I " init ] --.RI "[-t " timeout ] --.RI "[-H " login_host ] --.I baud_rate,... --.I port --.RI [ term ] - - .SH DESCRIPTION - .ad -@@ -92,6 +82,10 @@ whatever init(8) may have set, and is inherited by login and the shell. - .fi - .ad - .TP -+\-c -+Don't reset terminal cflags (control modes). See \fItermios(3)\fP for more -+details. -+.TP - \-8 - Assume that the tty is 8-bit clean, hence disable parity detection. - .TP -@@ -163,6 +157,10 @@ Force the line to be a local line with no need for carrier detect. This can - be useful when you have a locally attached terminal where the serial line - does not set the carrier detect signal. - .TP -+\-s -+Try to keep the existing baud rate. The baud rates from -+the command line are used when agetty receives a BREAK character. -+.TP - \-U - Turn on support for detecting an uppercase only terminal. This setting will - detect a login name containing only capitals as indicating an uppercase -diff --git a/login-utils/agetty.c b/login-utils/agetty.c -index 39a1fd3..9d463ce 100644 ---- a/login-utils/agetty.c -+++ b/login-utils/agetty.c -@@ -133,6 +133,8 @@ struct options { - #define F_CUSTISSUE (1<<6) /* give alternative issue file */ - #define F_NOPROMPT (1<<7) /* don't ask for login name! */ - #define F_LCUC (1<<8) /* Support for *LCUC stty modes */ -+#define F_KEEPSPEED (1<<9) /* Follow baud rate from kernel */ -+#define F_KEEPCFLAGS (1<<10) /* Reuse c_cflags setup from kernel */ - - /* Storage for things detected while the login name was read. */ - -@@ -203,7 +205,7 @@ void parse_args P_((int argc, char **argv, struct options *op)); - void parse_speeds P_((struct options *op, char *arg)); - void update_utmp P_((char *line)); - void open_tty P_((char *tty, struct termios *tp, int local)); --void termio_init P_((struct termios *tp, int speed, struct options *op)); -+void termio_init P_((struct termios *tp, struct options *op)); - void auto_baud P_((struct termios *tp)); - void do_prompt P_((struct options *op, struct termios *tp)); - void next_speed P_((struct termios *tp, struct options *op)); -@@ -297,7 +299,7 @@ main(argc, argv) - tcsetpgrp(0, getpid()); - /* Initialize the termios settings (raw mode, eight-bit, blocking i/o). */ - debug("calling termio_init\n"); -- termio_init(&termios, options.speeds[FIRST_SPEED], &options); -+ termio_init(&termios, &options); - - /* write the modem init string and DON'T flush the buffers */ - if (options.flags & F_INITSTRING) { -@@ -373,8 +375,11 @@ parse_args(argc, argv, op) - extern int optind; /* getopt */ - int c; - -- while (isascii(c = getopt(argc, argv, "8I:LH:f:hil:mt:wUn"))) { -+ while (isascii(c = getopt(argc, argv, "8cI:LH:f:hil:mst:wUn"))) { - switch (c) { -+ case 'c': -+ op->flags |= F_KEEPCFLAGS; -+ break; - case '8': - op->eightbits = 1; - break; -@@ -443,6 +448,9 @@ parse_args(argc, argv, op) - case 'n': - op->flags |= F_NOPROMPT; - break; -+ case 's': -+ op->flags |= F_KEEPSPEED; /* keep kernel defined speed */ -+ break; - case 't': /* time out */ - if ((op->timeout = atoi(optarg)) <= 0) - error(_("bad timeout value: %s"), optarg); -@@ -691,11 +699,17 @@ char gbuf[1024]; - char area[1024]; - - void --termio_init(tp, speed, op) -+termio_init(tp, op) - struct termios *tp; -- int speed; - struct options *op; - { -+ speed_t ispeed, ospeed; -+ -+ if (op->flags & F_KEEPSPEED) { -+ ispeed = cfgetispeed(tp); /* save the original setting */ -+ ospeed = cfgetospeed(tp); -+ } else -+ ospeed = ispeed = op->speeds[FIRST_SPEED]; - - /* - * Initial termios settings: 8-bit characters, raw-mode, blocking i/o. -@@ -706,14 +720,21 @@ termio_init(tp, speed, op) - /* flush input and output queues, important for modems! */ - (void) tcflush(0, TCIOFLUSH); - -- tp->c_cflag = CS8 | HUPCL | CREAD; -- cfsetispeed(tp, speed); -- cfsetospeed(tp, speed); -+ tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; -+ -+ if (!(op->flags & F_KEEPCFLAGS)) -+ tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL); -+ -+ /* Note that the speed is stored in the c_cflag termios field, so we have -+ * set the speed always when the cflag se reseted. -+ */ -+ cfsetispeed(tp, ispeed); -+ cfsetospeed(tp, ospeed); -+ - if (op->flags & F_LOCAL) { - tp->c_cflag |= CLOCAL; - } - -- tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; - #ifdef HAVE_STRUCT_TERMIOS_C_LINE - tp->c_line = 0; - #endif -@@ -973,9 +994,18 @@ next_speed(tp, op) - struct termios *tp; - struct options *op; - { -- static int baud_index = FIRST_SPEED;/* current speed index */ -+ static int baud_index = -1; -+ -+ if (baud_index == -1) -+ /* -+ * if the F_KEEPSPEED flags is set then the FIRST_SPEED is not -+ * tested yet (see termio_init()). -+ */ -+ baud_index = (op->flags & F_KEEPSPEED) ? FIRST_SPEED : -+ 1 % op->numspeed; -+ else -+ baud_index = (baud_index + 1) % op->numspeed; - -- baud_index = (baud_index + 1) % op->numspeed; - cfsetispeed(tp, op->speeds[baud_index]); - cfsetospeed(tp, op->speeds[baud_index]); - (void) tcsetattr(0, TCSANOW, tp); -@@ -1203,7 +1233,7 @@ bcode(s) - void - usage() - { -- fprintf(stderr, _("Usage: %s [-8hiLmUw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] baud_rate,... line [termtype]\nor\t[-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] line baud_rate,... [termtype]\n"), progname); -+ fprintf(stderr, _("Usage: %s [-8hiLmsUw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] baud_rate,... line [termtype]\nor\t[-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] line baud_rate,... [termtype]\n"), progname); - exit(1); - } - diff --git a/util-linux-fsck-l-option.patch b/util-linux-fsck-l-option.patch deleted file mode 100644 index d89982a..0000000 --- a/util-linux-fsck-l-option.patch +++ /dev/null @@ -1,526 +0,0 @@ -fsck: add support for whole-disk locking (-l option) - -This feature allows to call multiple independent fsck instances rather -than use only one "fsck -A" process. - -The lock uses LOCK_EX flock(2). The lock request is ignored if the -whole-disk is non-rotating disk. The verbose mode (-V) provides -information about disk locking. - -Note that "fsck -l" does not care if the device is stacked, for -example if you want to call "fsck -l /dev/md0" and "fsck -l /dev/md1" -then the underlying devices will not be locked. The traditional "fsck --A" does not run in parallel for stacked devices. - -http://pkgs.fedoraproject.org/gitweb/?p=util-linux-ng.git;a=commitdiff;h=6c69926dbfca8b07bd2f93b56bc8e7c54c7b227d#patch1 - -diff -up util-linux-ng-2.18/fsck/fsck.8.kzak util-linux-ng-2.18/fsck/fsck.8 ---- util-linux-ng-2.18/fsck/fsck.8.kzak 2010-06-30 12:51:35.000000000 +0200 -+++ util-linux-ng-2.18/fsck/fsck.8 2010-10-26 23:55:30.000000000 +0200 -@@ -7,7 +7,7 @@ - fsck \- check and repair a Linux file system - .SH SYNOPSIS - .B fsck --.RB [ \-sAVRTMNP ] -+.RB [ \-lsAVRTMNP ] - .RB [ \-C - .RI [ fd ]] - .RB [ \-t -@@ -80,6 +80,17 @@ variable. Please see the file system-sp - further details. - .SH OPTIONS - .TP -+.B \-l -+Lock whole-disk device by exclusive -+.BR flock (2). -+This option can be used with one device only (e.g. -A and -l are mutually -+exclusive). This option is recommended when more -+.B fsck (8) -+instances are executed in the same time. The option is ignored when used for -+multiple devices or for non-rotating disk. The fsck does not lock underlying -+devices if executed to check stacked devices (e.g. MD or DM) -- this feature is -+not implemented yet. -+.TP - .B \-s - Serialize - .B fsck -@@ -200,6 +211,11 @@ If there are multiple filesystems with t - fsck will attempt to check them in parallel, although it will avoid running - multiple filesystem checks on the same physical disk. - .sp -+.B fsck -+does not check stacked devices (RAIDs, dm-crypt, ...) in parallel with any other -+device. See below for FSCK_FORCE_ALL_PARALLEL setting. The /sys filesystem is -+used to detemine dependencies between devices. -+.sp - Hence, a very common configuration in - .I /etc/fstab - files is to set the root filesystem to have a -@@ -366,10 +382,10 @@ program's behavior is affected by the fo - .B FSCK_FORCE_ALL_PARALLEL - If this environment variable is set, - .B fsck --will attempt to run all of the specified filesystems in parallel, --regardless of whether the filesystems appear to be on the same --device. (This is useful for RAID systems or high-end storage systems --such as those sold by companies such as IBM or EMC.) -+will attempt to run all of the specified filesystems in parallel, regardless of -+whether the filesystems appear to be on the same device. (This is useful for -+RAID systems or high-end storage systems such as those sold by companies such -+as IBM or EMC.) Note that the fs_passno value is still used. - .TP - .B FSCK_MAX_INST - This environment variable will limit the maximum number of file system -diff -up util-linux-ng-2.18/fsck/fsck.c.kzak util-linux-ng-2.18/fsck/fsck.c ---- util-linux-ng-2.18/fsck/fsck.c.kzak 2010-05-19 23:36:23.000000000 +0200 -+++ util-linux-ng-2.18/fsck/fsck.c 2010-10-26 23:55:30.000000000 +0200 -@@ -31,6 +31,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include -@@ -42,6 +44,8 @@ - #include - #include - #include -+#include -+#include - - #include "fsprobe.h" - -@@ -85,6 +89,7 @@ char *devices[MAX_DEVICES]; - char *args[MAX_ARGS]; - int num_devices, num_args; - -+int lockdisk = 0; - int verbose = 0; - int doall = 0; - int noexecute = 0; -@@ -214,11 +219,97 @@ static void parse_escape(char *word) - *q = 0; - } - -+static dev_t get_disk(const char *device) -+{ -+ struct stat st; -+ dev_t disk; -+ -+ if (!stat(device, &st) && -+ !blkid_devno_to_wholedisk(st.st_rdev, NULL, 0, &disk)) -+ return disk; -+ -+ return 0; -+} -+ -+static int is_irrotational_disk(dev_t disk) -+{ -+ char path[PATH_MAX]; -+ FILE *f; -+ int rc, x; -+ -+ rc = snprintf(path, sizeof(path), -+ "/sys/dev/block/%d:%d/queue/rotational", -+ major(disk), minor(disk)); -+ -+ if (rc < 0 || rc + 1 > sizeof(path)) -+ return 0; -+ -+ f = fopen(path, "r"); -+ if (!f) -+ return 0; -+ -+ rc = fscanf(f, "%u", &x); -+ fclose(f); -+ -+ return rc == 1 ? !x : 0; -+} -+ -+static void lock_disk(struct fsck_instance *inst) -+{ -+ dev_t disk = inst->fs->disk ? : get_disk(inst->fs->device); -+ char *diskname; -+ -+ if (!disk || is_irrotational_disk(disk)) -+ return; -+ -+ diskname = blkid_devno_to_devname(disk); -+ if (!diskname) -+ return; -+ -+ if (verbose) -+ printf(_("Locking disk %s ... "), diskname); -+ -+ inst->lock = open(diskname, O_CLOEXEC | O_RDONLY); -+ if (inst->lock >= 0) { -+ int rc = -1; -+ -+ /* inform users that we're waiting on the lock */ -+ if (verbose && -+ (rc = flock(inst->lock, LOCK_EX | LOCK_NB)) != 0 && -+ errno == EWOULDBLOCK) -+ printf(_("(waiting) ")); -+ -+ if (rc != 0 && flock(inst->lock, LOCK_EX) != 0) { -+ close(inst->lock); /* failed */ -+ inst->lock = -1; -+ } -+ } -+ -+ if (verbose) -+ printf("%s.\n", inst->lock >= 0 ? _("success") : _("failed")); -+ -+ free(diskname); -+ return; -+} -+ -+static void unlock_disk(struct fsck_instance *inst) -+{ -+ if (inst->lock >= 0) { -+ /* explicitly unlock, don't rely on close(), maybe some library -+ * (e.g. liblkid) has still open the device. -+ */ -+ flock(inst->lock, LOCK_UN); -+ close(inst->lock); -+ } -+} -+ -+ -+ - static void free_instance(struct fsck_instance *i) - { -+ if (lockdisk) -+ unlock_disk(i); - free(i->prog); -- free(i->device); -- free(i->base_device); - free(i); - return; - } -@@ -240,6 +331,8 @@ static struct fs_info *create_fs_device( - fs->passno = passno; - fs->flags = 0; - fs->next = NULL; -+ fs->disk = 0; -+ fs->stacked = 0; - - if (!filesys_info) - filesys_info = fs; -@@ -414,8 +507,7 @@ static int progress_active(NOARGS) - * Execute a particular fsck program, and link it into the list of - * child processes we are waiting for. - */ --static int execute(const char *type, const char *device, const char *mntpt, -- int interactive) -+static int execute(const char *type, struct fs_info *fs, int interactive) - { - char *s, *argv[80], prog[80]; - int argc, i; -@@ -452,7 +544,7 @@ static int execute(const char *type, con - } - } - -- argv[argc++] = string_copy(device); -+ argv[argc++] = string_copy(fs->device); - argv[argc] = 0; - - s = find_fsck(prog); -@@ -464,12 +556,19 @@ static int execute(const char *type, con - - if (verbose || noexecute) { - printf("[%s (%d) -- %s] ", s, num_running, -- mntpt ? mntpt : device); -+ fs->mountpt ? fs->mountpt : fs->device); - for (i=0; i < argc; i++) - printf("%s ", argv[i]); - printf("\n"); - } - -+ -+ inst->fs = fs; -+ inst->lock = -1; -+ -+ if (lockdisk) -+ lock_disk(inst); -+ - /* Fork and execute the correct program. */ - if (noexecute) - pid = -1; -@@ -492,8 +591,6 @@ static int execute(const char *type, con - inst->pid = pid; - inst->prog = string_copy(prog); - inst->type = string_copy(type); -- inst->device = string_copy(device); -- inst->base_device = base_device(device); - inst->start_time = time(0); - inst->next = NULL; - -@@ -597,12 +694,12 @@ static struct fsck_instance *wait_one(in - } else { - printf(_("Warning... %s for device %s exited " - "with signal %d.\n"), -- inst->prog, inst->device, sig); -+ inst->prog, inst->fs->device, sig); - status = EXIT_ERROR; - } - } else { - printf(_("%s %s: status is %x, should never happen.\n"), -- inst->prog, inst->device, status); -+ inst->prog, inst->fs->device, status); - status = EXIT_ERROR; - } - inst->exit_status = status; -@@ -641,7 +738,7 @@ ret_inst: - instance_list = inst->next; - if (verbose > 1) - printf(_("Finished with %s (exit status %d)\n"), -- inst->device, inst->exit_status); -+ inst->fs->device, inst->exit_status); - num_running--; - return inst; - } -@@ -698,7 +795,7 @@ static void fsck_device(struct fs_info * - type = DEFAULT_FSTYPE; - - num_running++; -- retval = execute(type, fs->device, fs->mountpt, interactive); -+ retval = execute(type, fs, interactive); - if (retval) { - fprintf(stderr, _("%s: Error %d while executing fsck.%s " - "for %s\n"), progname, retval, type, fs->device); -@@ -924,40 +1021,70 @@ static int ignore(struct fs_info *fs) - return 0; - } - -+static int count_slaves(dev_t disk) -+{ -+ DIR *dir; -+ struct dirent *dp; -+ char dirname[PATH_MAX]; -+ int count = 0; -+ -+ snprintf(dirname, sizeof(dirname), -+ "/sys/dev/block/%u:%u/slaves/", -+ major(disk), minor(disk)); -+ -+ if (!(dir = opendir(dirname))) -+ return -1; -+ -+ while ((dp = readdir(dir)) != 0) { -+#ifdef _DIRENT_HAVE_D_TYPE -+ if (dp->d_type != DT_UNKNOWN && dp->d_type != DT_LNK) -+ continue; -+#endif -+ if (dp->d_name[0] == '.' && -+ ((dp->d_name[1] == 0) || -+ ((dp->d_name[1] == '.') && (dp->d_name[2] == 0)))) -+ continue; -+ -+ count++; -+ } -+ closedir(dir); -+ return count; -+} -+ - /* - * Returns TRUE if a partition on the same disk is already being - * checked. - */ --static int device_already_active(char *device) -+static int disk_already_active(struct fs_info *fs) - { - struct fsck_instance *inst; -- char *base; - - if (force_all_parallel) - return 0; - --#ifdef BASE_MD -- /* Don't check a soft raid disk with any other disk */ -- if (instance_list && -- (!strncmp(instance_list->device, BASE_MD, sizeof(BASE_MD)-1) || -- !strncmp(device, BASE_MD, sizeof(BASE_MD)-1))) -+ if (instance_list && instance_list->fs->stacked) -+ /* any instance for a stacked device is already running */ - return 1; --#endif - -- base = base_device(device); -+ if (!fs->disk) { -+ fs->disk = get_disk(fs->device); -+ if (fs->disk) -+ fs->stacked = count_slaves(fs->disk); -+ } -+ - /* - * If we don't know the base device, assume that the device is - * already active if there are any fsck instances running. -+ * -+ * Don't check a stacked device with any other disk too. - */ -- if (!base) -+ if (!fs->disk || fs->stacked) - return (instance_list != 0); -+ - for (inst = instance_list; inst; inst = inst->next) { -- if (!inst->base_device || !strcmp(base, inst->base_device)) { -- free(base); -+ if (!inst->fs->disk || fs->disk == inst->fs->disk) - return 1; -- } - } -- free(base); - return 0; - } - -@@ -1038,7 +1165,7 @@ static int check_all(NOARGS) - * already been spawned, then we need to defer - * this to another pass. - */ -- if (device_already_active(fs->device)) { -+ if (disk_already_active(fs)) { - pass_done = 0; - continue; - } -@@ -1188,6 +1315,9 @@ static void PRS(int argc, char *argv[]) - } - } - break; -+ case 'l': -+ lockdisk++; -+ break; - case 'V': - verbose++; - break; -@@ -1298,6 +1428,12 @@ int main(int argc, char *argv[]) - if ((num_devices == 1) || (serialize)) - interactive = 1; - -+ if (lockdisk && (doall || num_devices > 1)) { -+ fprintf(stderr, _("%s: the -l option can be used with one " -+ "device only -- ignore\n"), progname); -+ lockdisk = 0; -+ } -+ - /* If -A was specified ("check all"), do that! */ - if (doall) - return check_all(); -diff -up util-linux-ng-2.18/fsck/fsck.h.kzak util-linux-ng-2.18/fsck/fsck.h ---- util-linux-ng-2.18/fsck/fsck.h.kzak 2010-03-18 23:11:23.000000000 +0100 -+++ util-linux-ng-2.18/fsck/fsck.h 2010-10-26 23:55:30.000000000 +0200 -@@ -44,6 +44,8 @@ struct fs_info { - int freq; - int passno; - int flags; -+ dev_t disk; -+ int stacked; - struct fs_info *next; - }; - -@@ -56,12 +58,12 @@ struct fs_info { - struct fsck_instance { - int pid; - int flags; -+ int lock; /* flock()ed whole disk file descriptor or -1 */ - int exit_status; - time_t start_time; - char * prog; - char * type; -- char * device; -- char * base_device; -+ struct fs_info *fs; - struct fsck_instance *next; - }; - -diff -up util-linux-ng-2.18/fsck/Makefile.am.kzak util-linux-ng-2.18/fsck/Makefile.am ---- util-linux-ng-2.18/fsck/Makefile.am.kzak 2010-05-24 12:33:46.000000000 +0200 -+++ util-linux-ng-2.18/fsck/Makefile.am 2010-10-26 23:55:30.000000000 +0200 -@@ -3,7 +3,7 @@ include $(top_srcdir)/config/include-Mak - sbin_PROGRAMS = fsck - dist_man_MANS = fsck.8 - --fsck_SOURCES = base_device.c fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ -+fsck_SOURCES = fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ - $(top_srcdir)/lib/fsprobe.c $(top_srcdir)/lib/canonicalize.c - fsck_LDADD = - fsck_CFLAGS = $(AM_CFLAGS) -diff -up util-linux-ng-2.18/fsck/Makefile.in.kzak util-linux-ng-2.18/fsck/Makefile.in ---- util-linux-ng-2.18/fsck/Makefile.in.kzak 2010-10-26 23:56:04.000000000 +0200 -+++ util-linux-ng-2.18/fsck/Makefile.in 2010-10-26 23:56:15.000000000 +0200 -@@ -62,9 +62,8 @@ CONFIG_CLEAN_FILES = - CONFIG_CLEAN_VPATH_FILES = - am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" - PROGRAMS = $(sbin_PROGRAMS) --am_fsck_OBJECTS = fsck-base_device.$(OBJEXT) fsck-fsck.$(OBJEXT) \ -- fsck-ismounted.$(OBJEXT) fsck-fsprobe.$(OBJEXT) \ -- fsck-canonicalize.$(OBJEXT) -+am_fsck_OBJECTS = fsck-fsck.$(OBJEXT) fsck-ismounted.$(OBJEXT) \ -+ fsck-fsprobe.$(OBJEXT) fsck-canonicalize.$(OBJEXT) - fsck_OBJECTS = $(am_fsck_OBJECTS) - am__DEPENDENCIES_1 = - @BUILD_LIBBLKID_FALSE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) -@@ -204,6 +203,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ - PACKAGE_NAME = @PACKAGE_NAME@ - PACKAGE_STRING = @PACKAGE_STRING@ - PACKAGE_TARNAME = @PACKAGE_TARNAME@ -+PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PATH_SEPARATOR = @PATH_SEPARATOR@ - PERL = @PERL@ -@@ -315,7 +315,7 @@ ul_libmount_la = $(top_builddir)/shlibs/ - # mount.h is generated by ./configure script and stored in build directory - ul_libmount_incdir = $(ul_libmount_builddir) - dist_man_MANS = fsck.8 --fsck_SOURCES = base_device.c fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ -+fsck_SOURCES = fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ - $(top_srcdir)/lib/fsprobe.c $(top_srcdir)/lib/canonicalize.c - - fsck_LDADD = $(am__append_1) $(am__append_3) -@@ -407,7 +407,6 @@ mostlyclean-compile: - distclean-compile: - -rm -f *.tab.c - --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-base_device.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-canonicalize.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-fsck.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-fsprobe.Po@am__quote@ -@@ -437,22 +436,6 @@ distclean-compile: - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - --fsck-base_device.o: base_device.c --@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-base_device.o -MD -MP -MF $(DEPDIR)/fsck-base_device.Tpo -c -o fsck-base_device.o `test -f 'base_device.c' || echo '$(srcdir)/'`base_device.c --@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-base_device.Tpo $(DEPDIR)/fsck-base_device.Po --@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='base_device.c' object='fsck-base_device.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -c -o fsck-base_device.o `test -f 'base_device.c' || echo '$(srcdir)/'`base_device.c -- --fsck-base_device.obj: base_device.c --@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-base_device.obj -MD -MP -MF $(DEPDIR)/fsck-base_device.Tpo -c -o fsck-base_device.obj `if test -f 'base_device.c'; then $(CYGPATH_W) 'base_device.c'; else $(CYGPATH_W) '$(srcdir)/base_device.c'; fi` --@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-base_device.Tpo $(DEPDIR)/fsck-base_device.Po --@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='base_device.c' object='fsck-base_device.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -c -o fsck-base_device.obj `if test -f 'base_device.c'; then $(CYGPATH_W) 'base_device.c'; else $(CYGPATH_W) '$(srcdir)/base_device.c'; fi` -- - fsck-fsck.o: fsck.c - @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-fsck.o -MD -MP -MF $(DEPDIR)/fsck-fsck.Tpo -c -o fsck-fsck.o `test -f 'fsck.c' || echo '$(srcdir)/'`fsck.c - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-fsck.Tpo $(DEPDIR)/fsck-fsck.Po -diff -up util-linux-ng-2.18/Makefile.am.kzak util-linux-ng-2.18/Makefile.am ---- util-linux-ng-2.18/Makefile.am.kzak 2010-03-18 23:11:23.000000000 +0100 -+++ util-linux-ng-2.18/Makefile.am 2010-10-26 23:55:30.000000000 +0200 -@@ -30,8 +30,10 @@ SUBDIRS += mount - endif - - if BUILD_FSCK -+if BUILD_LIBBLKID - SUBDIRS += fsck - endif -+endif - - ACLOCAL_AMFLAGS = -I m4 - diff --git a/util-linux-ng-2.18.tar.bz2 b/util-linux-ng-2.18.tar.bz2 deleted file mode 100644 index 4afa426..0000000 --- a/util-linux-ng-2.18.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b8c5c07c763888aa712b4585393346667a00793127c54cef0470cfa456b031cc -size 7669676 diff --git a/util-linux-swapon-btrfs-limitations b/util-linux-swapon-btrfs-limitations deleted file mode 100644 index 59722da..0000000 --- a/util-linux-swapon-btrfs-limitations +++ /dev/null @@ -1,42 +0,0 @@ -From: Jeff Mahoney -Subject: swapon: Document btrfs limitation with swapfiles -References: bnc#616617 - - Btrfs, as of 2.6.35, is unable to allow swapfiles to be used on its - filesystems. This is due to the swapfile implementation wanting to build - an extent map of each block in the file and expecting it to be static - for the life of the swapfile. - - Btrfs can't guarantee this and refuses to return the mapping. The swapfile - implementation just makes a comment about there being holes in the file - - but that's how btrfs denies the mapping. - - This patch adds a section to the swapon manpage to document it. - -Signed-off-by: Jeff Mahoney - ---- - mount/swapon.8 | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - ---- a/mount/swapon.8 -+++ b/mount/swapon.8 -@@ -167,6 +167,18 @@ automatically detects and rewrites swap - suspend data (e.g S1SUSPEND, S2SUSPEND, ...). The problem is that if we don't - do it, then we get data corruption the next time an attempt at unsuspending is - made. -+.PP -+.B swapon -+may not work correctly when using a swap file with some versions of btrfs. -+This is due to the swap file implementation in the kernel expecting to be able -+to write to the file directly, without the assistance of the file system. -+Since btrfs is a copy-on-write file system, the file location may not be -+static and corruption can result. Btrfs actively disallows the use of files -+on its file systems by refusing to map the file. This can be seen in the system -+log as "swapon: swapfile has holes." One possible workaround is to map the -+file to a loopback device. This will allow the file system to determine the -+mapping properly but may come with a performance impact. -+ - .SH SEE ALSO - .BR swapon (2), - .BR swapoff (2), diff --git a/util-linux-swapon-canonicalize-swap-device.patch b/util-linux-swapon-canonicalize-swap-device.patch deleted file mode 100644 index 435a540..0000000 --- a/util-linux-swapon-canonicalize-swap-device.patch +++ /dev/null @@ -1,41 +0,0 @@ -Index: util-linux-ng-2.18/mount/swapon.c -=================================================================== ---- util-linux-ng-2.18.orig/mount/swapon.c -+++ util-linux-ng-2.18/mount/swapon.c -@@ -23,6 +23,7 @@ - #include "pathnames.h" - #include "swapheader.h" - #include "mangle.h" -+#include "canonicalize.h" - - #define PATH_MKSWAP "/sbin/mkswap" - -@@ -171,7 +172,11 @@ read_proc_swaps(void) { - break; - swapFiles = q; - -- swapFiles[numSwaps++] = unmangle(line); -+ if ((p = unmangle(line)) == NULL) -+ break; -+ -+ swapFiles[numSwaps++] = canonicalize_path(p); -+ free(p); - } - fclose(swaps); - } -@@ -179,10 +184,14 @@ read_proc_swaps(void) { - static int - is_in_proc_swaps(const char *fname) { - int i; -+ char *p = canonicalize_path(fname); - - for (i = 0; i < numSwaps; i++) -- if (swapFiles[i] && !strcmp(fname, swapFiles[i])) -+ if (swapFiles[i] && !strcmp(p, swapFiles[i])) { -+ free(p); - return 1; -+ } -+ free(p); - return 0; - } - diff --git a/util-linux.changes b/util-linux.changes index 150828d..e4a4bc5 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,56 @@ +------------------------------------------------------------------- +Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com + +- update to util-linux-2.19-rc1 +- important changes: + * lsblk(8): + - this NEW COMMAND lists information about all or selected block + devices in tree-like format. + * partx(8): + - this command has been rewritten to use libblkid for partition + tables parsing. It supports aix, bsd, dos, gpt, mac, minix, + sgi, solaris_x86, sun, ultrix and unixware now. + - supports new command line option "--show" to list partitions in + new format + - prints UUID and name for GPT and mac partitions + * findmnt(8): + - supports new command line option "--submounts" to list all + submounts for selected mountpoint(s) + * agetty(8): + - supports new command line options "-c" and "-s" to reuse + already initialized tty cflags and existing baud rate + * mount(8), umount(8): + - could be linked with libmount (--enable-libmount-mount) to + manage userspace mount options outside /etc/mtab on systems + where the file is a symlink to /proc/mounts. (EXPERIMENTAL, + enabled in openSUSE package) + * losetup(8), mount(8): + - uses /sys/dev/block//loop/backing_file rather than + loopdev ioctls (requires kernel >= 2.6.37) + * fsck(8): + - supports new command line option "-l" to lock whole-disk device + by exclusive flock(2). This option is recommended when more + fsck(8) instances are executed in the same time. + * rtcwake(8): + - supports new mode "show" to print the current RTC alarm time + * fstrim(8): + - this NEW COMMAND allows to discard unused blocks on a mounted + filesystem (wrapper for FITRIM ioctl) + * swapon(8): + - supports new options "discard" and "nofail" + +- in post, replace /etc/mtab with a symlink to /proc/mounts/self +- drop following patches (in upstream) + - util-linux-swapon-btrfs-limitations + - util-linux-agetty-s-option.patch + - util-linux-fsck-l-option.patch + - util-linux-2.18-no-canonicalize-fix.patch + - util-linux-swapon-canonicalize-swap-device.patch +- fix uuidd Summary and Description +- build with --enable-libmount-mount (new option) +- use set_permissions macros +- run spec-cleaner + ------------------------------------------------------------------- Tue Dec 14 16:11:34 UTC 2010 - puzel@novell.com diff --git a/util-linux.spec b/util-linux.spec index c25297f..51468b6 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.18) +# spec file for package util-linux (Version 2.19-rc1) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -20,6 +20,8 @@ %define which_ver 2.20 %define adjtimex_ver 1.28 +%define ul_tar_version 2.19-rc1 + Name: util-linux BuildRequires: audit-devel BuildRequires: gettext-devel @@ -30,6 +32,7 @@ BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel +Version: 2.18.91 Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) Provides: fsck-with-dev-lock = %{version} @@ -39,11 +42,10 @@ PreReq: %install_info_prereq permissions License: GPLv2+ Group: System/Base AutoReqProv: on -Version: 2.18 Release: 7 -Recommends: %name-lang = %{version} +Recommends: %{name}-lang = %{version} Summary: A collection of basic system utilities -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v19/%{name}-%{ul_tar_version}.tar.bz2 Source1: util-linux-rpmlintrc # XXX: make nologin part of login package Source2: nologin.c @@ -81,11 +83,6 @@ Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # crypto patch Patch3: util-linux-2.17.1-mount_losetup_crypto.patch Patch4: util-linux-2.17.1-losetup-honor-documented-c-option -Patch7: util-linux-swapon-btrfs-limitations -Patch8: util-linux-agetty-s-option.patch -Patch9: util-linux-fsck-l-option.patch -Patch10: util-linux-2.18-no-canonicalize-fix.patch -Patch11: util-linux-swapon-canonicalize-swap-device.patch ## ## adjtimex ## @@ -117,7 +114,6 @@ mount program, the fdisk configuration tool, and more. License: GPLv2+ Summary: Filesystem detection library Group: System/Filesystems -AutoReqProv: on %description -n libblkid1 Library for filesystem detection. @@ -126,8 +122,7 @@ Library for filesystem detection. License: GPLv2+ Summary: Development files for the filesystem detection library Group: Development/Libraries/C and C++ -AutoReqProv: on -Requires: libblkid1 = %version +Requires: libblkid1 = %{version} %description -n libblkid-devel Files needed to develop applications using the library for filesystem @@ -135,21 +130,22 @@ detection. %package -n uuidd License: GPLv2+ -Summary: Utilities for the Second Extended File System +Summary: Helper daemon to guarantee uniqueness of time-based UUIDs Group: System/Filesystems -AutoReqProv: on -PreReq: %fillup_prereq %insserv_prereq permissions pwdutils +PreReq: %fillup_prereq +PreReq: %insserv_prereq +PreReq: permissions +PreReq: pwdutils %description -n uuidd -Utilities needed to create and maintain ext2 and ext3 file systems -under Linux. Included in this package are: chattr, lsattr, mke2fs, -mklost+found, tune2fs, e2fsck, resize2fs, and badblocks. +The uuidd package contains a userspace daemon (uuidd) which guarantees +uniqueness of time-based UUID generation even at very high rates on +SMP systems. %package -n libuuid1 License: GPLv2+ Summary: Library to generate UUIDs Group: System/Filesystems -AutoReqProv: on %description -n libuuid1 A library to generate universally unique IDs (UUIDs). @@ -158,8 +154,7 @@ A library to generate universally unique IDs (UUIDs). License: GPLv2+ Summary: Development files for libuuid1 Group: Development/Libraries/C and C++ -AutoReqProv: on -Requires: libuuid1 = %version +Requires: libuuid1 = %{version} %description -n libuuid-devel Files to develop applications using the library to generate universally @@ -167,9 +162,8 @@ unique IDs (UUIDs). %package -n libmount1 License: GPLv2+ -Summary: Mount library +Summary: Device mount library Group: System/Filesystems -AutoReqProv: on %description -n libmount1 Library designed to be used in low-level utils like @@ -179,23 +173,17 @@ mount(8) and /sbin/mount. helpers. License: GPLv2+ Summary: Development files for libmount1 Group: Development/Libraries/C and C++ -AutoReqProv: on -Requires: libmount1 = %version +Requires: libmount1 = %{version} %description -n libmount-devel Files to develop applications using the libmount library. %lang_package %prep -%setup -q -a 9 -b 11 -b 12 -b 13 -n %name-ng-%version +%setup -q -a 9 -b 11 -b 12 -b 13 -n %{name}-%ul_tar_version %patch1 -p1 %patch3 -p1 %patch4 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 # cd adjtimex-* @@ -208,7 +196,7 @@ cp %{S:2} %{S:3} %{S:26} %{S:30} . cd ../klogconsole #%#patch55 -p1 -b .quiet %patch55 -p1 -%patch56 -p1 +%patch56 -p1 cd ../time-* %patch60 cd ../which-* @@ -217,7 +205,7 @@ cd ../which-* %build # adjtimex build cd adjtimex-%{adjtimex_ver} -CFLAGS="$RPM_OPT_FLAGS" ./configure +CFLAGS="%{optflags}" ./configure make %{?_smp_mflags} cd .. pushd ../ @@ -227,7 +215,7 @@ aclocal --force autoconf --force automake --force-missing --add-missing --foreign %{?suse_update_config:%{suse_update_config}} -CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr \ +CFLAGS="%{optflags}" ./configure --prefix=/usr \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ %{_target_cpu}-suse-linux @@ -236,7 +224,7 @@ cd .. # time build cd time-%{time_ver} %{?suse_update_config:%{suse_update_config}} -CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE " INSTALL_PROGRAM='$(INSTALL)' \ +CFLAGS="%{optflags} -D_GNU_SOURCE " INSTALL_PROGRAM='$(INSTALL)' \ ./configure --prefix=/usr \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ @@ -245,19 +233,19 @@ make %{?_smp_mflags} cd .. # klogconsole build cd klogconsole -make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" +make %{?_smp_mflags} CFLAGS="%{optflags}" cd .. popd # setctsid build rm -f setctsid -make %{?_smp_mflags} setctsid CFLAGS="$RPM_OPT_FLAGS" +make %{?_smp_mflags} setctsid CFLAGS="%{optflags}" # # util-linux itself # autoreconf -fi export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" -CFLAGS="$RPM_OPT_FLAGS" \ +CFLAGS="%{optflags}" \ %configure \ --bindir=/bin \ --sbindir=/sbin \ @@ -269,154 +257,163 @@ CFLAGS="$RPM_OPT_FLAGS" \ --enable-partx \ --enable-raw \ --enable-write \ + --enable-libmount-mount \ --disable-use-tty-group \ --disable-static \ --disable-silent-rules # make %{?_smp_mflags} # -gcc $RPM_OPT_FLAGS -o nologin nologin.c -gcc $RPM_OPT_FLAGS -o mkzimage_cmdline %{S:29} -gcc $RPM_OPT_FLAGS -o chrp-addnote %{SOURCE31} +gcc %{optflags} -o nologin nologin.c +gcc %{optflags} -o mkzimage_cmdline %{S:29} +gcc %{optflags} -o chrp-addnote %{SOURCE31} %check cd ../time-%{time_ver} make check %install -mkdir -p "$RPM_BUILD_ROOT"{/etc/init.d,%{_mandir}/man{1,8},/bin,/sbin,/usr/bin,/usr/sbin,%{_infodir}} -mkdir -p $RPM_BUILD_ROOT/var/lib/libuuid/ -mkdir -p $RPM_BUILD_ROOT/var/run/uuidd/ -install -m 744 %{SOURCE50} $RPM_BUILD_ROOT/etc/init.d/uuidd -install -m 644 %{SOURCE51} $RPM_BUILD_ROOT/etc/blkid.conf -mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates +mkdir -p %{buildroot}{/etc/init.d,%{_mandir}/man{1,8},/bin,/sbin,/usr/bin,/usr/sbin,%{_infodir}} +mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid/ +mkdir -p %{buildroot}%{_localstatedir}/run/uuidd/ +install -m 744 %{SOURCE50} %{buildroot}%{_initddir}/uuidd +install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf +mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates cp adjtimex-*/adjtimex %{buildroot}/sbin/ cp adjtimex-*/adjtimex.8 %{buildroot}%{_mandir}/man8/ pushd .. # which install cd which-%{which_ver} -make install DESTDIR=$RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/which -install -m 0644 README $RPM_BUILD_ROOT%{_defaultdocdir}/which/ -install -m 0644 EXAMPLES $RPM_BUILD_ROOT%{_defaultdocdir}/which/ -install -m 0644 README.alias $RPM_BUILD_ROOT%{_defaultdocdir}/which/ +%make_install +mkdir -p %{buildroot}%{_defaultdocdir}/which +install -m 0644 README %{buildroot}%{_defaultdocdir}/which/ +install -m 0644 EXAMPLES %{buildroot}%{_defaultdocdir}/which/ +install -m 0644 README.alias %{buildroot}%{_defaultdocdir}/which/ cd .. # time install cd time-%{time_ver} -mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/time -make install DESTDIR=$RPM_BUILD_ROOT \ - prefix=$RPM_BUILD_ROOT/usr \ - infodir=$RPM_BUILD_ROOT%{_infodir} \ - mandir=$RPM_BUILD_ROOT%{_mandir} -install -m 0644 README $RPM_BUILD_ROOT%{_defaultdocdir}/time/ -install -m 0644 AUTHORS $RPM_BUILD_ROOT%{_defaultdocdir}/time/ -install -m 0644 COPYING $RPM_BUILD_ROOT%{_defaultdocdir}/time/ -install -m 0644 NEWS $RPM_BUILD_ROOT%{_defaultdocdir}/time/ +mkdir -p %{buildroot}%{_defaultdocdir}/time +make install DESTDIR=%{buildroot} \ + prefix=%{buildroot}/usr \ + infodir=%{buildroot}%{_infodir} \ + mandir=%{buildroot}%{_mandir} +install -m 0644 README %{buildroot}%{_defaultdocdir}/time/ +install -m 0644 AUTHORS %{buildroot}%{_defaultdocdir}/time/ +install -m 0644 COPYING %{buildroot}%{_defaultdocdir}/time/ +install -m 0644 NEWS %{buildroot}%{_defaultdocdir}/time/ cd .. # klogconsole install cd klogconsole -make install DEST=$RPM_BUILD_ROOT +make install DEST=%{buildroot} popd # # util-linux install # -make DESTDIR=$RPM_BUILD_ROOT install -mv $RPM_BUILD_ROOT/usr/bin/logger $RPM_BUILD_ROOT/bin/logger -install -m 644 %{SOURCE6} $RPM_BUILD_ROOT/etc/filesystems -install -m 755 nologin $RPM_BUILD_ROOT/sbin -rm -f $RPM_BUILD_ROOT/%{_libdir}/libblkid.la -rm -f $RPM_BUILD_ROOT/%{_libdir}/libuuid.la -rm -f $RPM_BUILD_ROOT/%{_libdir}/libmount.la +%make_install +mv %{buildroot}%{_bindir}/logger %{buildroot}/bin/logger +install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/filesystems +install -m 755 nologin %{buildroot}/sbin +rm -f %{buildroot}/%{_libdir}/libblkid.la +rm -f %{buildroot}/%{_libdir}/libuuid.la +rm -f %{buildroot}/%{_libdir}/libmount.la %ifnarch ppc ppc64 -install -m 755 mkzimage_cmdline $RPM_BUILD_ROOT/usr/bin -install -m 644 %{S:28} $RPM_BUILD_ROOT%{_mandir}/man8 -install -m 755 chrp-addnote $RPM_BUILD_ROOT/usr/bin +install -m 755 mkzimage_cmdline %{buildroot}%{_prefix}/bin +install -m 644 %{S:28} %{buildroot}%{_mandir}/man8 +install -m 755 chrp-addnote %{buildroot}%{_prefix}/bin %endif -install -m 644 nologin.8 $RPM_BUILD_ROOT%{_mandir}/man8 +install -m 644 nologin.8 %{buildroot}%{_mandir}/man8 # setctsid install -install -m 755 setctsid $RPM_BUILD_ROOT/usr/sbin -install -m 444 setctsid.8 $RPM_BUILD_ROOT%{_mandir}/man8/ -echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > $RPM_BUILD_ROOT/usr/sbin/flushb -chmod 755 $RPM_BUILD_ROOT/usr/sbin/flushb +install -m 755 setctsid %{buildroot}%{_prefix}/sbin +install -m 444 setctsid.8 %{buildroot}%{_mandir}/man8/ +echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir}/flushb +chmod 755 %{buildroot}%{_sbindir}/flushb # Install scripts to configure raw devices at boot time -install -m 644 $RPM_SOURCE_DIR/etc.raw $RPM_BUILD_ROOT/etc/raw -install -m 755 $RPM_SOURCE_DIR/raw.init $RPM_BUILD_ROOT/etc/init.d/raw -ln -sf ../../etc/init.d/raw $RPM_BUILD_ROOT/usr/sbin/rcraw +install -m 644 $RPM_SOURCE_DIR/etc.raw %{buildroot}%{_sysconfdir}/raw +install -m 755 $RPM_SOURCE_DIR/raw.init %{buildroot}%{_initddir}/raw +ln -sf ../../etc/init.d/raw %{buildroot}%{_sbindir}/rcraw # Stupid hack so we don't have a tcsh dependency -chmod 644 $RPM_BUILD_ROOT/usr/share/getopt/getopt*.tcsh +chmod 644 %{buildroot}%{_datadir}/getopt/getopt*.tcsh # Following files we don't want to package, so remove them -rm -f $RPM_BUILD_ROOT/usr/bin/pg -rm -f $RPM_BUILD_ROOT/usr/share/man/man1/pg.1* +rm -f %{buildroot}%{_bindir}/pg +rm -f %{buildroot}%{_mandir}/man1/pg.1* # Do not package these files to get rid of the perl dependency -rm -f $RPM_BUILD_ROOT/usr/bin/chkdupexe -rm -f $RPM_BUILD_ROOT/usr/share/man/man1/chkdupexe.1 +rm -f %{buildroot}%{_bindir}/chkdupexe +rm -f %{buildroot}%{_mandir}/man1/chkdupexe.1 # arch dependent %ifarch s390 s390x -rm -f $RPM_BUILD_ROOT/etc/fdprm -rm -f $RPM_BUILD_ROOT/usr/bin/cytune -rm -f $RPM_BUILD_ROOT/usr/sbin/fdformat -rm -f $RPM_BUILD_ROOT/sbin/hwclock -rm -f $RPM_BUILD_ROOT/usr/sbin/klogconsole -rm -f $RPM_BUILD_ROOT/usr/bin/setterm -rm -f $RPM_BUILD_ROOT/usr/sbin/tunelp -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/cytune.8* -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/fdformat.8* -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/hwclock.8* -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/klogconsole.8* -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/tunelp.8* +rm -f %{buildroot}%{_sysconfdir}/fdprm +rm -f %{buildroot}%{_bindir}/cytune +rm -f %{buildroot}%{_sbindir}/fdformat +rm -f %{buildroot}/sbin/hwclock +rm -f %{buildroot}%{_sbindir}/klogconsole +rm -f %{buildroot}%{_bindir}/setterm +rm -f %{buildroot}%{_sbindir}/tunelp +rm -f %{buildroot}/%{_mandir}/man8/cytune.8* +rm -f %{buildroot}/%{_mandir}/man8/fdformat.8* +rm -f %{buildroot}/%{_mandir}/man8/hwclock.8* +rm -f %{buildroot}/%{_mandir}/man8/klogconsole.8* +rm -f %{buildroot}/%{_mandir}/man8/tunelp.8* %endif %ifarch ia64 %sparc -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/cfdisk.8* -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/sfdisk.8* -rm -f $RPM_BUILD_ROOT/sbin/cfdisk -rm -f $RPM_BUILD_ROOT/sbin/sfdisk +rm -f %{buildroot}/%{_mandir}/man8/cfdisk.8* +rm -f %{buildroot}/%{_mandir}/man8/sfdisk.8* +rm -f %{buildroot}/sbin/cfdisk +rm -f %{buildroot}/sbin/sfdisk %endif %ifarch ia64 -rm -f $RPM_BUILD_ROOT/sbin/fdisk -rm -f $RPM_BUILD_ROOT%{_mandir}/man8/fdisk.8* +rm -f %{buildroot}/sbin/fdisk +rm -f %{buildroot}%{_mandir}/man8/fdisk.8* %endif -%find_lang %{name}-ng %{name}.lang +%find_lang %{name} %{name}.lang # create list of setarch(8) symlinks -find $RPM_BUILD_ROOT%{_bindir}/ -regextype posix-egrep -type l \ +find %{buildroot}%{_bindir}/ -regextype posix-egrep -type l \ -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)$" \ -printf "%{_bindir}/%f\n" >> %{name}.files -find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \ +find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)\.8.*" \ -printf "%{_mandir}/man8/%f*\n" >> %{name}.files %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %post %{fillup_and_insserv raw} %install_info --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %install_info --entry="* time: (time). summarizing used system resources" --info-dir=%{_infodir} %{_infodir}/time.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/which.info.gz +%if 0%{?suse_version} <= 1130 %run_permissions +%else +%set_permissions /usr/bin/wall /usr/bin/write /bin/mount /bin/umount +%endif + # mount option 'code=' is now called 'codepage=' so change fstab if [ -f etc/fstab ]; then sed -i 's:code=:codepage=:' etc/fstab fi +# if /etc/mtab is a regular file, replace it with a symlink to /proc/self/mounts +# (regular mtab is not written/cleaned-up/supported by systemd) +if [ -f /etc/mtab ]; then + ln -sf /proc/self/mounts /etc/mtab || : +fi + %postun %install_info_delete --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/time.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/which.info.gz %{insserv_cleanup} + %verifyscript -%verify_permissions -e /usr/bin/wall -e /usr/bin/write +%verify_permissions -e /usr/bin/wall -e /usr/bin/write -e /bin/mount -e /bin/umount -%post -n libblkid1 -/sbin/ldconfig +%post -n libblkid1 -p /sbin/ldconfig -%postun -n libblkid1 -/sbin/ldconfig +%postun -n libblkid1 -p /sbin/ldconfig -%post -n libmount1 -/sbin/ldconfig +%post -n libmount1 -p /sbin/ldconfig -%postun -n libmount1 -/sbin/ldconfig +%postun -n libmount1 -p /sbin/ldconfig %pre -n uuidd /usr/sbin/groupadd -r uuidd 2>/dev/null || : @@ -428,17 +425,21 @@ fi %post -n uuidd %{fillup_and_insserv -n uuidd} +%if 0%{?suse_version} <= 1130 %run_permissions +%else +%set_permissions /usr/sbin/uuidd +%endif %postun -n uuidd %{restart_on_update uuidd} %{insserv_cleanup} -%post -n libuuid1 -/sbin/ldconfig +%post -n libuuid1 -p /sbin/ldconfig %postun -n libuuid1 /sbin/ldconfig + %verifyscript -n uuidd %verify_permissions -e /usr/sbin/uuidd @@ -457,15 +458,16 @@ fi %doc hwclock/README.hwclock %doc text-utils/README.col %doc README.largedisk -%config %attr(744,root,root) /etc/init.d/raw -%config(noreplace) %attr(644,root,root) /etc/raw -%config(noreplace) /etc/filesystems -%config(noreplace) /etc/blkid.conf +%config %attr(744,root,root) %{_sysconfdir}/init.d/raw +%config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw +%config(noreplace) %{_sysconfdir}/filesystems +%config(noreplace) %{_sysconfdir}/blkid.conf /bin/dmesg /bin/more /bin/mount /bin/umount /bin/findmnt +/bin/lsblk /sbin/adjtimex /sbin/agetty /sbin/blockdev @@ -491,62 +493,62 @@ fi /sbin/wipefs /sbin/fsfreeze /sbin/swaplabel -/usr/bin/ipcmk +/sbin/fstrim +%{_bindir}/ipcmk /bin/logger -/usr/bin/cal -/usr/bin/chrt -/usr/bin/col -/usr/bin/colcrt -/usr/bin/colrm -/usr/bin/column -/usr/bin/ddate -/usr/bin/fallocate -/usr/bin/flock -/usr/bin/getopt -/usr/bin/hexdump -/usr/bin/ionice -/usr/bin/ipcrm -/usr/bin/ipcs -/usr/bin/isosize -/usr/bin/line -/usr/bin/look -/usr/bin/lscpu -/usr/bin/mcookie -/usr/bin/mesg -/usr/bin/uuidgen +%{_bindir}/cal +%{_bindir}/chrt +%{_bindir}/col +%{_bindir}/colcrt +%{_bindir}/colrm +%{_bindir}/column +%{_bindir}/ddate +%{_bindir}/fallocate +%{_bindir}/flock +%{_bindir}/getopt +%{_bindir}/hexdump +%{_bindir}/ionice +%{_bindir}/ipcrm +%{_bindir}/ipcs +%{_bindir}/isosize +%{_bindir}/line +%{_bindir}/look +%{_bindir}/lscpu +%{_bindir}/mcookie +%{_bindir}/mesg +%{_bindir}/uuidgen %ifnarch ppc ppc64 -/usr/bin/chrp-addnote -/usr/bin/mkzimage_cmdline +%{_bindir}/chrp-addnote +%{_bindir}/mkzimage_cmdline %endif -/usr/bin/namei -/usr/bin/rename -/usr/bin/renice -/usr/bin/rev -/usr/bin/script -/usr/bin/setarch -/usr/bin/scriptreplay -/usr/bin/setsid -/usr/bin/ul -/usr/bin/tailf -/usr/bin/taskset -/usr/bin/time -/usr/bin/unshare -/usr/bin/which -/usr/sbin/addpart -/usr/sbin/delpart -/usr/sbin/ldattach -/usr/sbin/partx -/usr/sbin/rcraw -/usr/sbin/rtcwake -/usr/sbin/setctsid -%verify(not mode) %attr(0755,root,tty) /usr/bin/wall -/usr/bin/whereis -%verify(not mode) %attr(0755,root,tty) /usr/bin/write +%{_bindir}/namei +%{_bindir}/rename +%{_bindir}/renice +%{_bindir}/rev +%{_bindir}/script +%{_bindir}/setarch +%{_bindir}/scriptreplay +%{_bindir}/setsid +%{_bindir}/ul +%{_bindir}/tailf +%{_bindir}/taskset +%{_bindir}/time +%{_bindir}/unshare +%{_bindir}/which +%{_sbindir}/addpart +%{_sbindir}/delpart +%{_sbindir}/ldattach +%{_sbindir}/partx +%{_sbindir}/rcraw +%{_sbindir}/rtcwake +%{_sbindir}/setctsid +%verify(not mode) %attr(0755,root,tty) %{_bindir}/wall +%{_bindir}/whereis +%verify(not mode) %attr(0755,root,tty) %{_bindir}/write %dir %{_defaultdocdir}/time %dir %{_defaultdocdir}/which %{_defaultdocdir}/time/* %{_defaultdocdir}/which/* -%{_infodir}/ipc.info.gz %{_infodir}/time.info*.gz %{_infodir}/which.info*.gz %{_mandir}/man1/cal.1.gz @@ -628,13 +630,16 @@ fi %{_mandir}/man8/umount.8.gz %{_mandir}/man8/setctsid.8.gz %{_mandir}/man8/wipefs.8.gz -/usr/sbin/flushb -/usr/sbin/readprofile -%dir /usr/share/getopt -%attr (755,root,root) /usr/share/getopt/getopt-parse.bash -%attr (755,root,root) /usr/share/getopt/getopt-parse.tcsh -%attr (755,root,root) /usr/share/getopt/getopt-test.bash -%attr (755,root,root) /usr/share/getopt/getopt-test.tcsh +%{_mandir}/man8/fstrim.8.gz +%{_mandir}/man8/lsblk.8.gz +%{_mandir}/ru +%{_sbindir}/flushb +%{_sbindir}/readprofile +%dir %{_datadir}/getopt +%attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash +%attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh +%attr (755,root,root) %{_datadir}/getopt/getopt-test.bash +%attr (755,root,root) %{_datadir}/getopt/getopt-test.tcsh %ifnarch ia64 %doc fdisk/README.fdisk /sbin/fdisk @@ -648,12 +653,12 @@ fi /sbin/sfdisk %endif %ifnarch s390 s390x -/usr/bin/cytune -/usr/sbin/fdformat +%{_bindir}/cytune +%{_sbindir}/fdformat /sbin/hwclock -/usr/sbin/klogconsole -/usr/bin/setterm -/usr/sbin/tunelp +%{_sbindir}/klogconsole +%{_bindir}/setterm +%{_sbindir}/tunelp %{_mandir}/man8/cytune.8.gz %{_mandir}/man8/fdformat.8.gz %{_mandir}/man8/hwclock.8.gz @@ -671,7 +676,7 @@ fi %{_libdir}/libblkid.so %dir %{_includedir}/blkid %{_includedir}/blkid/blkid.h -%_libdir/pkgconfig/blkid.pc +%{_libdir}/pkgconfig/blkid.pc %{_mandir}/man3/libblkid.3.gz %files -n libmount1 @@ -684,14 +689,14 @@ fi %{_libdir}/libmount.so %dir %{_includedir}/mount %{_includedir}/mount/mount.h -%_libdir/pkgconfig/mount.pc +%{_libdir}/pkgconfig/mount.pc %files -n uuidd %defattr(-, root, root) -%verify(not mode) %attr(0755,root,root) /usr/sbin/uuidd -%attr(-,uuidd,uuidd) %dir /var/lib/libuuid -%attr(-,uuidd,uuidd) %ghost %dir /var/run/uuidd -/etc/init.d/uuidd +%verify(not mode) %attr(0755,root,root) %{_sbindir}/uuidd +%attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid +%attr(-,uuidd,uuidd) %ghost %dir %{_localstatedir}/run/uuidd +%{_sysconfdir}/init.d/uuidd %{_mandir}/man8/uuidd.8.gz %files -n libuuid1 @@ -704,7 +709,7 @@ fi %{_libdir}/libuuid.so %dir %{_includedir}/uuid %{_includedir}/uuid/uuid.h -%_libdir/pkgconfig/uuid.pc +%{_libdir}/pkgconfig/uuid.pc %{_mandir}/man3/uuid* %changelog From 13a64b99cd6dc96c73d270a52251b57333eb3d86d8be64ea2f92c37791d5b48a Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Fri, 14 Jan 2011 00:23:30 +0000 Subject: [PATCH 105/211] Autobuild autoformatter for 57964 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=108 --- util-linux.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 51468b6..272082a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # -# spec file for package util-linux (Version 2.19-rc1) +# spec file for package util-linux (Version 2.18.91) # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,6 +33,7 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel Version: 2.18.91 +Release: 1 Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) Provides: fsck-with-dev-lock = %{version} @@ -42,7 +43,6 @@ PreReq: %install_info_prereq permissions License: GPLv2+ Group: System/Base AutoReqProv: on -Release: 7 Recommends: %{name}-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v19/%{name}-%{ul_tar_version}.tar.bz2 From 00799cc056a9f155daf046f6f2f7f8e50fad38e4c4ca4ca93ea3ca5961fd0b2d Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Tue, 18 Jan 2011 10:38:29 +0000 Subject: [PATCH 106/211] Accepting request 58667 from Base:System Accepted submit request 58667 from user kay_sievers OBS-URL: https://build.opensuse.org/request/show/58667 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=109 --- util-linux.changes | 5 +++++ util-linux.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/util-linux.changes b/util-linux.changes index e4a4bc5..a754555 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 18 09:47:11 UTC 2011 - bwiedemann@novell.com + +- fix bnc#664873 + ------------------------------------------------------------------- Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com diff --git a/util-linux.spec b/util-linux.spec index 272082a..2c0cd60 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -394,7 +394,7 @@ fi # if /etc/mtab is a regular file, replace it with a symlink to /proc/self/mounts # (regular mtab is not written/cleaned-up/supported by systemd) -if [ -f /etc/mtab ]; then +if [ -f /etc/mtab -o ! -e /etc/mtab ]; then ln -sf /proc/self/mounts /etc/mtab || : fi From c08b718b693b8a068b12f2e1d224d9206aa29a925c3db284af3327f12c409c9f Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Tue, 18 Jan 2011 10:38:37 +0000 Subject: [PATCH 107/211] Autobuild autoformatter for 58667 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=110 --- util-linux.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 2c0cd60..3bbf709 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,5 +1,5 @@ # -# spec file for package util-linux (Version 2.18.91) +# spec file for package util-linux # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -33,7 +33,7 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel Version: 2.18.91 -Release: 1 +Release: 2 Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) Provides: fsck-with-dev-lock = %{version} From 09b2fd48fde1a10601a85e8da88d211f715d047ebc94fbb023ddc081be464879 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Tue, 25 Jan 2011 14:30:40 +0000 Subject: [PATCH 108/211] Accepting request 59108 from Base:System Accepted submit request 59108 from user elvigia OBS-URL: https://build.opensuse.org/request/show/59108 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=111 --- util-linux-2.19-rc1-loop-offset.diff | 42 ++++++++++++++++++++++++++++ util-linux.changes | 11 ++++++++ util-linux.spec | 9 ++---- 3 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 util-linux-2.19-rc1-loop-offset.diff diff --git a/util-linux-2.19-rc1-loop-offset.diff b/util-linux-2.19-rc1-loop-offset.diff new file mode 100644 index 0000000..389f5fa --- /dev/null +++ b/util-linux-2.19-rc1-loop-offset.diff @@ -0,0 +1,42 @@ +From e31694761ca0165bda8a4b8f4b3bdbac548ba464 Mon Sep 17 00:00:00 2001 +From: Ludwig Nussel +Date: Fri, 21 Jan 2011 11:56:52 +0100 +Subject: [PATCH] fix parsing offset= followed by more options + +Signed-off-by: Ludwig Nussel +--- + mount/mount.c | 21 +++++++++++++++------ + 1 files changed, 15 insertions(+), 6 deletions(-) + +Index: util-linux-2.19-rc1/mount/mount.c +=================================================================== +--- util-linux-2.19-rc1.orig/mount/mount.c ++++ util-linux-2.19-rc1/mount/mount.c +@@ -2044,12 +2044,21 @@ is_fstab_entry_mounted(struct mntentchn + char *p = strstr(mc->m.mnt_opts, "offset="); + uintmax_t offset = 0; + +- if (p && strtosize(p + 7, &offset) != 0) { +- if (verbose) +- printf(_("mount: ignore %s " +- "(unparsable offset= option)\n"), +- mc->m.mnt_fsname); +- return -1; ++ if (p) { ++ char buf[128]; ++ buf[0] = 0; ++ strncat(buf, p+7, sizeof(buf)-1); ++ ++ if (p = strchr(buf, ',')) ++ *p = '\0'; ++ ++ if (strtosize(buf, &offset) != 0) { ++ if (verbose) ++ printf(_("mount: ignore %s " ++ "(unparsable offset= option)\n"), ++ mc->m.mnt_fsname); ++ return -1; ++ } + } + if (is_mounted_same_loopfile(mc->m.mnt_dir, mc->m.mnt_fsname, offset)) + goto yes; diff --git a/util-linux.changes b/util-linux.changes index a754555..3388335 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Jan 25 09:29:15 UTC 2011 - lnussel@suse.de + +- don't mess with /etc/mtab in %post. aaa_base does that for us + already. + +------------------------------------------------------------------- +Fri Jan 21 12:34:35 UTC 2011 - lnussel@suse.de + +- fix parsing offset= followed by more options (bnc#666150) + ------------------------------------------------------------------- Tue Jan 18 09:47:11 UTC 2011 - bwiedemann@novell.com diff --git a/util-linux.spec b/util-linux.spec index 3bbf709..7a9b0a1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -83,6 +83,8 @@ Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # crypto patch Patch3: util-linux-2.17.1-mount_losetup_crypto.patch Patch4: util-linux-2.17.1-losetup-honor-documented-c-option +# +Patch5: util-linux-2.19-rc1-loop-offset.diff ## ## adjtimex ## @@ -184,6 +186,7 @@ Files to develop applications using the libmount library. %patch1 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # cd adjtimex-* @@ -392,12 +395,6 @@ if [ -f etc/fstab ]; then sed -i 's:code=:codepage=:' etc/fstab fi -# if /etc/mtab is a regular file, replace it with a symlink to /proc/self/mounts -# (regular mtab is not written/cleaned-up/supported by systemd) -if [ -f /etc/mtab -o ! -e /etc/mtab ]; then - ln -sf /proc/self/mounts /etc/mtab || : -fi - %postun %install_info_delete --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/time.info.gz From 0a16645746fdf38c56d0bf1e8bc9f5d34f76c9ec54c1c5b34bd159ac7177e6ba Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Tue, 25 Jan 2011 14:30:45 +0000 Subject: [PATCH 109/211] Autobuild autoformatter for 59108 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=112 --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 7a9b0a1..6b44816 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -33,7 +33,7 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel Version: 2.18.91 -Release: 2 +Release: 3 Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) Provides: fsck-with-dev-lock = %{version} From 29731a7ff4bb5165918b3603241c9c18dbd8c76fe51d8b2e128d9fe861cc06f3 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Fri, 28 Jan 2011 15:55:02 +0000 Subject: [PATCH 110/211] Accepting request 59150 from Base:System Accepted submit request 59150 from user puzel OBS-URL: https://build.opensuse.org/request/show/59150 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=113 --- util-linux-2.19-rc1.tar.bz2 | 3 --- util-linux-2.19-rc3.tar.bz2 | 3 +++ util-linux.changes | 6 ++++++ util-linux.spec | 8 ++++---- 4 files changed, 13 insertions(+), 7 deletions(-) delete mode 100644 util-linux-2.19-rc1.tar.bz2 create mode 100644 util-linux-2.19-rc3.tar.bz2 diff --git a/util-linux-2.19-rc1.tar.bz2 b/util-linux-2.19-rc1.tar.bz2 deleted file mode 100644 index 332396c..0000000 --- a/util-linux-2.19-rc1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:583c122245f301b8cdd27e37a7a1fc774fcf1a73c3d633d9eac0c165e9b573d6 -size 4266321 diff --git a/util-linux-2.19-rc3.tar.bz2 b/util-linux-2.19-rc3.tar.bz2 new file mode 100644 index 0000000..8c4dd90 --- /dev/null +++ b/util-linux-2.19-rc3.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c1977f63cd06e7fba741f55ef8e95d366ed6fde83c50ca00171694bd3d3833b +size 4298703 diff --git a/util-linux.changes b/util-linux.changes index 3388335..4cc39f8 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 26 11:47:55 UTC 2011 - puzel@novell.com + +- update to util-linux-2.19-rc3 + - bugfixes + ------------------------------------------------------------------- Tue Jan 25 09:29:15 UTC 2011 - lnussel@suse.de diff --git a/util-linux.spec b/util-linux.spec index 6b44816..8be5227 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -20,7 +20,7 @@ %define which_ver 2.20 %define adjtimex_ver 1.28 -%define ul_tar_version 2.19-rc1 +%define ul_tar_version 2.19-rc3 Name: util-linux BuildRequires: audit-devel @@ -32,7 +32,7 @@ BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel -Version: 2.18.91 +Version: 2.18.93 Release: 3 Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) @@ -684,8 +684,8 @@ fi %files -n libmount-devel %defattr(-, root, root) %{_libdir}/libmount.so -%dir %{_includedir}/mount -%{_includedir}/mount/mount.h +%dir %{_includedir}/libmount +%{_includedir}/libmount/libmount.h %{_libdir}/pkgconfig/mount.pc %files -n uuidd From 61a4c422e6da54e860581808e0709fb1f47ad190d5591ec1196328d56c190ad9 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Fri, 28 Jan 2011 15:55:11 +0000 Subject: [PATCH 111/211] Autobuild autoformatter for 59150 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=114 --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 8be5227..f8c7f06 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -33,7 +33,7 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel Version: 2.18.93 -Release: 3 +Release: 1 Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) Provides: fsck-with-dev-lock = %{version} From 320a701ac6a335e96cc2c59304ba409927dab267f5d116df8cecc450931bca61 Mon Sep 17 00:00:00 2001 From: Ruediger Oertel Date: Fri, 11 Feb 2011 01:01:03 +0000 Subject: [PATCH 112/211] Accepting request 60484 from Base:System Accepted submit request 60484 from user puzel OBS-URL: https://build.opensuse.org/request/show/60484 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=115 --- util-linux-2.19-rc1-loop-offset.diff | 42 ---------------------------- util-linux-2.19-rc3.tar.bz2 | 3 -- util-linux-2.19.tar.bz2 | 3 ++ util-linux.changes | 9 ++++++ util-linux.spec | 11 ++------ 5 files changed, 15 insertions(+), 53 deletions(-) delete mode 100644 util-linux-2.19-rc1-loop-offset.diff delete mode 100644 util-linux-2.19-rc3.tar.bz2 create mode 100644 util-linux-2.19.tar.bz2 diff --git a/util-linux-2.19-rc1-loop-offset.diff b/util-linux-2.19-rc1-loop-offset.diff deleted file mode 100644 index 389f5fa..0000000 --- a/util-linux-2.19-rc1-loop-offset.diff +++ /dev/null @@ -1,42 +0,0 @@ -From e31694761ca0165bda8a4b8f4b3bdbac548ba464 Mon Sep 17 00:00:00 2001 -From: Ludwig Nussel -Date: Fri, 21 Jan 2011 11:56:52 +0100 -Subject: [PATCH] fix parsing offset= followed by more options - -Signed-off-by: Ludwig Nussel ---- - mount/mount.c | 21 +++++++++++++++------ - 1 files changed, 15 insertions(+), 6 deletions(-) - -Index: util-linux-2.19-rc1/mount/mount.c -=================================================================== ---- util-linux-2.19-rc1.orig/mount/mount.c -+++ util-linux-2.19-rc1/mount/mount.c -@@ -2044,12 +2044,21 @@ is_fstab_entry_mounted(struct mntentchn - char *p = strstr(mc->m.mnt_opts, "offset="); - uintmax_t offset = 0; - -- if (p && strtosize(p + 7, &offset) != 0) { -- if (verbose) -- printf(_("mount: ignore %s " -- "(unparsable offset= option)\n"), -- mc->m.mnt_fsname); -- return -1; -+ if (p) { -+ char buf[128]; -+ buf[0] = 0; -+ strncat(buf, p+7, sizeof(buf)-1); -+ -+ if (p = strchr(buf, ',')) -+ *p = '\0'; -+ -+ if (strtosize(buf, &offset) != 0) { -+ if (verbose) -+ printf(_("mount: ignore %s " -+ "(unparsable offset= option)\n"), -+ mc->m.mnt_fsname); -+ return -1; -+ } - } - if (is_mounted_same_loopfile(mc->m.mnt_dir, mc->m.mnt_fsname, offset)) - goto yes; diff --git a/util-linux-2.19-rc3.tar.bz2 b/util-linux-2.19-rc3.tar.bz2 deleted file mode 100644 index 8c4dd90..0000000 --- a/util-linux-2.19-rc3.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4c1977f63cd06e7fba741f55ef8e95d366ed6fde83c50ca00171694bd3d3833b -size 4298703 diff --git a/util-linux-2.19.tar.bz2 b/util-linux-2.19.tar.bz2 new file mode 100644 index 0000000..32dd940 --- /dev/null +++ b/util-linux-2.19.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8189ba6dfb508d5c36f50103a7b84943d893e51e6d7a314155a82f68efb33b6 +size 4376791 diff --git a/util-linux.changes b/util-linux.changes index 4cc39f8..70582b6 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Feb 10 11:01:40 UTC 2011 - puzel@novell.com + +- update to util-linux-2.19 + - uuid fixes + - cleanups, documentation and translation updates +- drop util-linux-2.19-rc1-loop-offset.diff (fixed in upstream, by + different patch) + ------------------------------------------------------------------- Wed Jan 26 11:47:55 UTC 2011 - puzel@novell.com diff --git a/util-linux.spec b/util-linux.spec index f8c7f06..3b356f9 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -20,8 +20,6 @@ %define which_ver 2.20 %define adjtimex_ver 1.28 -%define ul_tar_version 2.19-rc3 - Name: util-linux BuildRequires: audit-devel BuildRequires: gettext-devel @@ -32,7 +30,7 @@ BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel -Version: 2.18.93 +Version: 2.19 Release: 1 Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) @@ -45,7 +43,7 @@ Group: System/Base AutoReqProv: on Recommends: %{name}-lang = %{version} Summary: A collection of basic system utilities -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v19/%{name}-%{ul_tar_version}.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v19/%{name}-%{version}.tar.bz2 Source1: util-linux-rpmlintrc # XXX: make nologin part of login package Source2: nologin.c @@ -83,8 +81,6 @@ Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # crypto patch Patch3: util-linux-2.17.1-mount_losetup_crypto.patch Patch4: util-linux-2.17.1-losetup-honor-documented-c-option -# -Patch5: util-linux-2.19-rc1-loop-offset.diff ## ## adjtimex ## @@ -182,11 +178,10 @@ Files to develop applications using the libmount library. %lang_package %prep -%setup -q -a 9 -b 11 -b 12 -b 13 -n %{name}-%ul_tar_version +%setup -q -a 9 -b 11 -b 12 -b 13 -n %{name}-%{version} %patch1 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 # cd adjtimex-* From 8745dc4b4dbb8245741b31299605e3682dd8105b1e96ee8ee71c37a7a9f0b961 Mon Sep 17 00:00:00 2001 From: Ruediger Oertel Date: Tue, 22 Feb 2011 12:16:18 +0000 Subject: [PATCH 113/211] Accepting request 62438 from Base:System Accepted submit request 62438 from user puzel OBS-URL: https://build.opensuse.org/request/show/62438 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=117 --- umount-by-imgname.patch | 166 ++++++++++++++++++++++++++++++++++++++++ util-linux.changes | 5 ++ util-linux.spec | 2 + 3 files changed, 173 insertions(+) create mode 100644 umount-by-imgname.patch diff --git a/umount-by-imgname.patch b/umount-by-imgname.patch new file mode 100644 index 0000000..c19c014 --- /dev/null +++ b/umount-by-imgname.patch @@ -0,0 +1,166 @@ +From f4612577c942a3683b97632ad0b49671897c2070 Mon Sep 17 00:00:00 2001 +From: Petr Uzel +Date: Thu, 17 Feb 2011 12:52:43 +0100 +Subject: [PATCH] umount: allow unmounting loopdev specified by associated file + +Make it possible to unmount a filesystem on a loop device if it is +specified by associated backing file. It does not attempt to unmount +anything if there are more than one loop device associated with the +given file. + +Umount looks for associated loopdevice(s) only if umount is called +with the regular file as an argument. + +Before: + mount -o loop -t ext2 img mnt + umount -v img + > Could not find /home/puzel/upstream/util-linux/img in mtab + > umount: img: not mounted + +After: + mount -o loop -t ext2 img mnt + umount -v img + > img is associated with /dev/loop0, trying to unmount it + > /dev/loop0 has been unmounted + +[kzak@redhat.com: - fix memory leak in lomount.c] + +Addresses: https://bugzilla.novell.com/show_bug.cgi?id=666161 +Signed-off-by: Petr Uzel +Signed-off-by: Karel Zak +--- + mount/lomount.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + mount/lomount.h | 1 + + mount/umount.c | 22 ++++++++++++++++++++++ + 3 files changed, 76 insertions(+), 0 deletions(-) + +Index: util-linux-2.19/mount/lomount.c +=================================================================== +--- util-linux-2.19.orig/mount/lomount.c ++++ util-linux-2.19/mount/lomount.c +@@ -409,6 +409,51 @@ done: + return -1; + } + ++/* Find loop device associated with given @filename. Used for unmounting loop ++ * device specified by associated backing file. ++ * ++ * returns: 1 no such device/error ++ * 2 more than one loop device associated with @filename ++ * 0 exactly one loop device associated with @filename ++ * (@loopdev points to string containing full device name) ++ */ ++int ++find_loopdev_by_backing_file(const char *filename, char **loopdev) ++{ ++ struct looplist ll; ++ struct stat filestat; ++ int fd; ++ int devs_n = 0; /* number of loop devices found */ ++ char* devname = NULL; ++ ++ if (stat(filename, &filestat) == -1) { ++ perror(filename); ++ return 1; ++ } ++ ++ if (looplist_open(&ll, LLFLG_USEDONLY) == -1) { ++ error(_("%s: /dev directory does not exist."), progname); ++ return 1; ++ } ++ ++ while((devs_n < 2) && (fd = looplist_next(&ll)) != -1) { ++ if (is_associated(fd, &filestat, 0, 0) == 1) { ++ if (!devname) ++ devname = xstrdup(ll.name); ++ devs_n++; ++ } ++ close(fd); ++ } ++ looplist_close(&ll); ++ ++ if (devs_n == 1) { ++ *loopdev = devname; ++ return 0; /* exactly one loopdev */ ++ } ++ free(devname); ++ return devs_n ? 2 : 1; /* more loopdevs or error */ ++} ++ + #ifdef MAIN + + static int +@@ -581,6 +626,7 @@ show_associated_loop_devices(char *filen + return 0; + } + ++ + #endif /* MAIN */ + + /* check if the loopfile is already associated with the same given +@@ -1054,6 +1100,13 @@ find_unused_loop_device (void) { + return 0; + } + ++int ++find_loopdev_by_backing_file(const char *filename, char **loopdev) ++{ ++ mutter(); ++ return 1; ++} ++ + #endif /* !LOOP_SET_FD */ + + #ifdef MAIN +Index: util-linux-2.19/mount/lomount.h +=================================================================== +--- util-linux-2.19.orig/mount/lomount.h ++++ util-linux-2.19/mount/lomount.h +@@ -11,6 +11,7 @@ extern char * find_unused_loop_device(vo + extern int loopfile_used_with(char *devname, const char *filename, unsigned long long offset); + extern char *loopfile_used (const char *filename, unsigned long long offset); + extern char *loopdev_get_loopfile(const char *device); ++extern int find_loopdev_by_backing_file(const char *filename, char **loopdev); + + + #define SETLOOP_RDONLY (1<<0) /* Open loop read-only */ +Index: util-linux-2.19/mount/umount.c +=================================================================== +--- util-linux-2.19.orig/mount/umount.c ++++ util-linux-2.19/mount/umount.c +@@ -502,6 +502,7 @@ umount_file (char *arg) { + const char *file, *options; + int fstab_has_user, fstab_has_users, fstab_has_owner, fstab_has_group; + int ok; ++ struct stat statbuf; + + if (!*arg) { /* "" would be expanded to `pwd` */ + die(2, _("Cannot unmount \"\"\n")); +@@ -509,6 +510,27 @@ umount_file (char *arg) { + } + + file = canonicalize(arg); /* mtab paths are canonicalized */ ++ ++ /* if file is a regular file, check if it is associated ++ * with some loop device ++ */ ++ if (!stat(file, &statbuf) && S_ISREG(statbuf.st_mode)) { ++ char *loopdev = NULL; ++ switch (find_loopdev_by_backing_file(file, &loopdev)) { ++ case 0: ++ if (verbose) ++ printf(_("%s is associated with %s, trying to unmount it\n"), ++ arg, loopdev); ++ file = loopdev; ++ break; ++ case 2: ++ if (verbose) ++ printf(_("%s is associated with more than one loop device: not unmounting\n"), ++ arg); ++ break; ++ } ++ } ++ + if (verbose > 1) + printf(_("Trying to unmount %s\n"), file); + diff --git a/util-linux.changes b/util-linux.changes index 70582b6..88e4ac1 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 21 16:28:38 UTC 2011 - puzel@novell.com + +- add umount-by-imgname.patch (bnc#666161) + ------------------------------------------------------------------- Thu Feb 10 11:01:40 UTC 2011 - puzel@novell.com diff --git a/util-linux.spec b/util-linux.spec index 3b356f9..e3bc88c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -81,6 +81,7 @@ Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # crypto patch Patch3: util-linux-2.17.1-mount_losetup_crypto.patch Patch4: util-linux-2.17.1-losetup-honor-documented-c-option +Patch5: umount-by-imgname.patch ## ## adjtimex ## @@ -182,6 +183,7 @@ Files to develop applications using the libmount library. %patch1 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # cd adjtimex-* From 015f193b654381ca4de507cf00e06f28eab2406add57be39022f862c820b5cca Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Tue, 22 Feb 2011 12:16:29 +0000 Subject: [PATCH 114/211] Autobuild autoformatter for 62438 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=118 --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index e3bc88c..7a77494 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -31,7 +31,7 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel Version: 2.19 -Release: 1 +Release: 5 Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) Provides: fsck-with-dev-lock = %{version} From 37edc9efd6073f9c241fa29a6d80ec37657549cfdcdde9e156f96353407b5faf Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Wed, 4 May 2011 07:04:49 +0000 Subject: [PATCH 115/211] Accepting request 69386 from Base:System update to 2.19.1 OBS-URL: https://build.opensuse.org/request/show/69386 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=119 --- umount-by-imgname.patch | 166 ------------------ ...x-2.17.1-losetup-honor-documented-c-option | 26 --- util-linux-2.17.1-mount_losetup_crypto.patch | 2 +- util-linux-2.19.1.tar.bz2 | 3 + util-linux-2.19.tar.bz2 | 3 - util-linux.changes | 15 ++ util-linux.spec | 8 +- 7 files changed, 20 insertions(+), 203 deletions(-) delete mode 100644 umount-by-imgname.patch delete mode 100644 util-linux-2.17.1-losetup-honor-documented-c-option create mode 100644 util-linux-2.19.1.tar.bz2 delete mode 100644 util-linux-2.19.tar.bz2 diff --git a/umount-by-imgname.patch b/umount-by-imgname.patch deleted file mode 100644 index c19c014..0000000 --- a/umount-by-imgname.patch +++ /dev/null @@ -1,166 +0,0 @@ -From f4612577c942a3683b97632ad0b49671897c2070 Mon Sep 17 00:00:00 2001 -From: Petr Uzel -Date: Thu, 17 Feb 2011 12:52:43 +0100 -Subject: [PATCH] umount: allow unmounting loopdev specified by associated file - -Make it possible to unmount a filesystem on a loop device if it is -specified by associated backing file. It does not attempt to unmount -anything if there are more than one loop device associated with the -given file. - -Umount looks for associated loopdevice(s) only if umount is called -with the regular file as an argument. - -Before: - mount -o loop -t ext2 img mnt - umount -v img - > Could not find /home/puzel/upstream/util-linux/img in mtab - > umount: img: not mounted - -After: - mount -o loop -t ext2 img mnt - umount -v img - > img is associated with /dev/loop0, trying to unmount it - > /dev/loop0 has been unmounted - -[kzak@redhat.com: - fix memory leak in lomount.c] - -Addresses: https://bugzilla.novell.com/show_bug.cgi?id=666161 -Signed-off-by: Petr Uzel -Signed-off-by: Karel Zak ---- - mount/lomount.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - mount/lomount.h | 1 + - mount/umount.c | 22 ++++++++++++++++++++++ - 3 files changed, 76 insertions(+), 0 deletions(-) - -Index: util-linux-2.19/mount/lomount.c -=================================================================== ---- util-linux-2.19.orig/mount/lomount.c -+++ util-linux-2.19/mount/lomount.c -@@ -409,6 +409,51 @@ done: - return -1; - } - -+/* Find loop device associated with given @filename. Used for unmounting loop -+ * device specified by associated backing file. -+ * -+ * returns: 1 no such device/error -+ * 2 more than one loop device associated with @filename -+ * 0 exactly one loop device associated with @filename -+ * (@loopdev points to string containing full device name) -+ */ -+int -+find_loopdev_by_backing_file(const char *filename, char **loopdev) -+{ -+ struct looplist ll; -+ struct stat filestat; -+ int fd; -+ int devs_n = 0; /* number of loop devices found */ -+ char* devname = NULL; -+ -+ if (stat(filename, &filestat) == -1) { -+ perror(filename); -+ return 1; -+ } -+ -+ if (looplist_open(&ll, LLFLG_USEDONLY) == -1) { -+ error(_("%s: /dev directory does not exist."), progname); -+ return 1; -+ } -+ -+ while((devs_n < 2) && (fd = looplist_next(&ll)) != -1) { -+ if (is_associated(fd, &filestat, 0, 0) == 1) { -+ if (!devname) -+ devname = xstrdup(ll.name); -+ devs_n++; -+ } -+ close(fd); -+ } -+ looplist_close(&ll); -+ -+ if (devs_n == 1) { -+ *loopdev = devname; -+ return 0; /* exactly one loopdev */ -+ } -+ free(devname); -+ return devs_n ? 2 : 1; /* more loopdevs or error */ -+} -+ - #ifdef MAIN - - static int -@@ -581,6 +626,7 @@ show_associated_loop_devices(char *filen - return 0; - } - -+ - #endif /* MAIN */ - - /* check if the loopfile is already associated with the same given -@@ -1054,6 +1100,13 @@ find_unused_loop_device (void) { - return 0; - } - -+int -+find_loopdev_by_backing_file(const char *filename, char **loopdev) -+{ -+ mutter(); -+ return 1; -+} -+ - #endif /* !LOOP_SET_FD */ - - #ifdef MAIN -Index: util-linux-2.19/mount/lomount.h -=================================================================== ---- util-linux-2.19.orig/mount/lomount.h -+++ util-linux-2.19/mount/lomount.h -@@ -11,6 +11,7 @@ extern char * find_unused_loop_device(vo - extern int loopfile_used_with(char *devname, const char *filename, unsigned long long offset); - extern char *loopfile_used (const char *filename, unsigned long long offset); - extern char *loopdev_get_loopfile(const char *device); -+extern int find_loopdev_by_backing_file(const char *filename, char **loopdev); - - - #define SETLOOP_RDONLY (1<<0) /* Open loop read-only */ -Index: util-linux-2.19/mount/umount.c -=================================================================== ---- util-linux-2.19.orig/mount/umount.c -+++ util-linux-2.19/mount/umount.c -@@ -502,6 +502,7 @@ umount_file (char *arg) { - const char *file, *options; - int fstab_has_user, fstab_has_users, fstab_has_owner, fstab_has_group; - int ok; -+ struct stat statbuf; - - if (!*arg) { /* "" would be expanded to `pwd` */ - die(2, _("Cannot unmount \"\"\n")); -@@ -509,6 +510,27 @@ umount_file (char *arg) { - } - - file = canonicalize(arg); /* mtab paths are canonicalized */ -+ -+ /* if file is a regular file, check if it is associated -+ * with some loop device -+ */ -+ if (!stat(file, &statbuf) && S_ISREG(statbuf.st_mode)) { -+ char *loopdev = NULL; -+ switch (find_loopdev_by_backing_file(file, &loopdev)) { -+ case 0: -+ if (verbose) -+ printf(_("%s is associated with %s, trying to unmount it\n"), -+ arg, loopdev); -+ file = loopdev; -+ break; -+ case 2: -+ if (verbose) -+ printf(_("%s is associated with more than one loop device: not unmounting\n"), -+ arg); -+ break; -+ } -+ } -+ - if (verbose > 1) - printf(_("Trying to unmount %s\n"), file); - diff --git a/util-linux-2.17.1-losetup-honor-documented-c-option b/util-linux-2.17.1-losetup-honor-documented-c-option deleted file mode 100644 index 6a3bb68..0000000 --- a/util-linux-2.17.1-losetup-honor-documented-c-option +++ /dev/null @@ -1,26 +0,0 @@ -From: Jeff Mahoney -Subject: losetup: Honor documented -c option -References: bnc#583677 - - losetup -h lists -c | --set-capacity as valid options, but doesn't - actually accept -c. - - This patch fixes support for -c. - -Signed-off-by: Jeff Mahoney -Acked-by: Jeff Mahoney ---- - mount/lomount.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/mount/lomount.c -+++ b/mount/lomount.c -@@ -1065,7 +1065,7 @@ main(int argc, char **argv) { - if ((p = strrchr(progname, '/')) != NULL) - progname = p+1; - -- while ((c = getopt_long(argc, argv, "ade:E:fhj:k:o:p:rsvH:", -+ while ((c = getopt_long(argc, argv, "ade:E:fhj:k:o:p:rsvH:c", - longopts, NULL)) != -1) { - switch (c) { - case 'a': diff --git a/util-linux-2.17.1-mount_losetup_crypto.patch b/util-linux-2.17.1-mount_losetup_crypto.patch index c12e577..cd37eac 100644 --- a/util-linux-2.17.1-mount_losetup_crypto.patch +++ b/util-linux-2.17.1-mount_losetup_crypto.patch @@ -313,7 +313,7 @@ Index: util-linux-2.19-rc1/mount/lomount.c progname = p+1; - while ((c = getopt_long(argc, argv, "acde:E:fhj:o:p:rsv", -+ while ((c = getopt_long(argc, argv, "ade:E:fhj:k:o:p:rsvH:", ++ while ((c = getopt_long(argc, argv, "acde:E:fhj:k:o:p:rsvH:", longopts, NULL)) != -1) { switch (c) { case 'a': diff --git a/util-linux-2.19.1.tar.bz2 b/util-linux-2.19.1.tar.bz2 new file mode 100644 index 0000000..7b6e0c4 --- /dev/null +++ b/util-linux-2.19.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3eac4afcc687b3ae1ffedcab2dc12df84c7ba7045cce31386d2b7040a011c7d +size 4396543 diff --git a/util-linux-2.19.tar.bz2 b/util-linux-2.19.tar.bz2 deleted file mode 100644 index 32dd940..0000000 --- a/util-linux-2.19.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d8189ba6dfb508d5c36f50103a7b84943d893e51e6d7a314155a82f68efb33b6 -size 4376791 diff --git a/util-linux.changes b/util-linux.changes index 88e4ac1..4fa8499 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Tue May 3 09:39:37 UTC 2011 - puzel@novell.com + +- update to util-linux-2.19.1 + - numerous bugfixes, including (bnc#690486 and bnc#690488) +- drop umount-by-imgname.patch (merged upstream) +- cleanup: do not register ipc.info.gz (not provided by + this package) + +------------------------------------------------------------------- +Thu Apr 14 16:27:27 UTC 2011 - puzel@novell.com + +- merge util-linux-2.17.1-losetup-honor-documented-c-option and + util-linux-2.17.1-mount_losetup_crypto.patch) + ------------------------------------------------------------------- Mon Feb 21 16:28:38 UTC 2011 - puzel@novell.com diff --git a/util-linux.spec b/util-linux.spec index 7a77494..5e057ef 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -30,7 +30,7 @@ BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel -Version: 2.19 +Version: 2.19.1 Release: 5 Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) @@ -80,8 +80,6 @@ Source51: blkid.conf Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # crypto patch Patch3: util-linux-2.17.1-mount_losetup_crypto.patch -Patch4: util-linux-2.17.1-losetup-honor-documented-c-option -Patch5: umount-by-imgname.patch ## ## adjtimex ## @@ -182,8 +180,6 @@ Files to develop applications using the libmount library. %setup -q -a 9 -b 11 -b 12 -b 13 -n %{name}-%{version} %patch1 -p1 %patch3 -p1 -%patch4 -p1 -%patch5 -p1 # cd adjtimex-* @@ -194,7 +190,6 @@ cp %{S:22} %{S:23} . # nologin cp %{S:2} %{S:3} %{S:26} %{S:30} . cd ../klogconsole -#%#patch55 -p1 -b .quiet %patch55 -p1 %patch56 -p1 cd ../time-* @@ -378,7 +373,6 @@ rm -rf %{buildroot} %post %{fillup_and_insserv raw} -%install_info --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %install_info --entry="* time: (time). summarizing used system resources" --info-dir=%{_infodir} %{_infodir}/time.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/which.info.gz %if 0%{?suse_version} <= 1130 From a407b541171fa309497cc2516426369ed4f3777cdbd56ae562f6fe3415003e05 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Wed, 4 May 2011 07:05:07 +0000 Subject: [PATCH 116/211] Autobuild autoformatter for 69386 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=120 --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 5e057ef..8fa1bbc 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -31,7 +31,7 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel Version: 2.19.1 -Release: 5 +Release: 1 Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) Provides: fsck-with-dev-lock = %{version} From 982e74dac59b485da821db355494c361f0bfdb80cc74c2eb504cb2c0d0460958 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 2 Aug 2011 15:06:54 +0000 Subject: [PATCH 117/211] Accepting request 77687 from Base:System update to 2.20-rc1 OBS-URL: https://build.opensuse.org/request/show/77687 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=121 --- util-linux-2.17.1-mount_losetup_crypto.patch | 102 +++++++++---------- util-linux-2.19.1.tar.bz2 | 3 - util-linux-2.20-rc1.tar.bz2 | 3 + util-linux-fix-manpages.patch | 43 ++++++++ util-linux-wall-build-with-pie.patch | 27 +++++ util-linux.changes | 49 +++++++++ util-linux.spec | 26 +++-- 7 files changed, 190 insertions(+), 63 deletions(-) delete mode 100644 util-linux-2.19.1.tar.bz2 create mode 100644 util-linux-2.20-rc1.tar.bz2 create mode 100644 util-linux-fix-manpages.patch create mode 100644 util-linux-wall-build-with-pie.patch diff --git a/util-linux-2.17.1-mount_losetup_crypto.patch b/util-linux-2.17.1-mount_losetup_crypto.patch index cd37eac..db0915f 100644 --- a/util-linux-2.17.1-mount_losetup_crypto.patch +++ b/util-linux-2.17.1-mount_losetup_crypto.patch @@ -38,10 +38,10 @@ Signed-off-by: Ludwig Nussel create mode 100644 mount/sha512.c create mode 100644 mount/sha512.h -Index: util-linux-2.19-rc1/mount/Makefile.am +Index: util-linux-2.20-rc1/mount/Makefile.am =================================================================== ---- util-linux-2.19-rc1.orig/mount/Makefile.am -+++ util-linux-2.19-rc1/mount/Makefile.am +--- util-linux-2.20-rc1.orig/mount/Makefile.am ++++ util-linux-2.20-rc1/mount/Makefile.am @@ -7,7 +7,7 @@ sbin_PROGRAMS = losetup swapon dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 @@ -51,10 +51,10 @@ Index: util-linux-2.19-rc1/mount/Makefile.am # generic header for mount and umount hdrs_mount = fstab.h mount_mntent.h mount_constants.h \ -Index: util-linux-2.19-rc1/mount/lomount.c +Index: util-linux-2.20-rc1/mount/lomount.c =================================================================== ---- util-linux-2.19-rc1.orig/mount/lomount.c -+++ util-linux-2.19-rc1/mount/lomount.c +--- util-linux-2.20-rc1.orig/mount/lomount.c ++++ util-linux-2.20-rc1/mount/lomount.c @@ -23,6 +23,12 @@ #include "sundries.h" #include "xmalloc.h" @@ -68,7 +68,7 @@ Index: util-linux-2.19-rc1/mount/lomount.c #ifdef LOOP_SET_FD -@@ -464,12 +470,22 @@ show_loop_fd(int fd, char *device) { +@@ -509,12 +515,22 @@ show_loop_fd(int fd, char *device) { if (loopinfo64.lo_encrypt_type || loopinfo64.lo_crypt_name[0]) { @@ -94,7 +94,7 @@ Index: util-linux-2.19-rc1/mount/lomount.c } printf("\n"); return 0; -@@ -718,7 +734,7 @@ xgetpass(int pfd, const char *prompt) { +@@ -764,7 +780,7 @@ xgetpass(int pfd, const char *prompt) { } if (pass == NULL) @@ -103,7 +103,7 @@ Index: util-linux-2.19-rc1/mount/lomount.c pass[i] = 0; return pass; -@@ -732,6 +748,24 @@ digits_only(const char *s) { +@@ -778,6 +794,24 @@ digits_only(const char *s) { return 1; } @@ -128,7 +128,7 @@ Index: util-linux-2.19-rc1/mount/lomount.c /* * return codes: * 0 - success -@@ -740,10 +774,11 @@ digits_only(const char *s) { +@@ -786,10 +820,11 @@ digits_only(const char *s) { */ int set_loop(const char *device, const char *file, unsigned long long offset, @@ -142,7 +142,7 @@ Index: util-linux-2.19-rc1/mount/lomount.c char *filename; if (verbose) { -@@ -781,13 +816,37 @@ set_loop(const char *device, const char +@@ -827,13 +862,37 @@ set_loop(const char *device, const char filename = (char *) file; xstrncpy((char *)loopinfo64.lo_file_name, filename, LO_NAME_SIZE); @@ -182,7 +182,7 @@ Index: util-linux-2.19-rc1/mount/lomount.c } } -@@ -808,20 +867,69 @@ set_loop(const char *device, const char +@@ -854,20 +913,69 @@ set_loop(const char *device, const char } #endif @@ -264,7 +264,7 @@ Index: util-linux-2.19-rc1/mount/lomount.c } if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { -@@ -969,7 +1077,13 @@ usage(FILE *f) { +@@ -1022,7 +1130,13 @@ usage(FILE *f) { fprintf(f, _("\nOptions:\n" " -e | --encryption enable data encryption with specified \n" @@ -278,7 +278,7 @@ Index: util-linux-2.19-rc1/mount/lomount.c " -o | --offset start at offset into file\n" " --sizelimit loop limited to only bytes of the file\n" " -p | --pass-fd read passphrase from file descriptor \n" -@@ -983,11 +1097,14 @@ usage(FILE *f) { +@@ -1036,11 +1150,14 @@ usage(FILE *f) { int main(int argc, char **argv) { char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc; @@ -291,9 +291,9 @@ Index: util-linux-2.19-rc1/mount/lomount.c int pfd = -1; + int keysz = 0; uintmax_t off = 0, slimit = 0; - struct option longopts[] = { - { "all", 0, 0, 'a' }, -@@ -996,6 +1113,8 @@ main(int argc, char **argv) { + + static const struct option longopts[] = { +@@ -1050,6 +1167,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -302,7 +302,7 @@ Index: util-linux-2.19-rc1/mount/lomount.c { "associated", 1, 0, 'j' }, { "offset", 1, 0, 'o' }, { "sizelimit", 1, 0, 128 }, -@@ -1012,12 +1131,13 @@ main(int argc, char **argv) { +@@ -1066,12 +1185,13 @@ main(int argc, char **argv) { capacity = delete = find = all = 0; assoc = offset = sizelimit = encryption = passfd = NULL; @@ -317,7 +317,7 @@ Index: util-linux-2.19-rc1/mount/lomount.c longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -1045,6 +1165,12 @@ main(int argc, char **argv) { +@@ -1099,6 +1219,12 @@ main(int argc, char **argv) { case 'j': assoc = optarg; break; @@ -330,7 +330,7 @@ Index: util-linux-2.19-rc1/mount/lomount.c case 'o': offset = optarg; break; -@@ -1134,8 +1260,10 @@ main(int argc, char **argv) { +@@ -1188,8 +1314,10 @@ main(int argc, char **argv) { else { if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(stderr); @@ -342,10 +342,10 @@ Index: util-linux-2.19-rc1/mount/lomount.c if (res == 2 && find) { if (verbose) printf(_("stolen loop=%s...trying again\n"), -Index: util-linux-2.19-rc1/mount/lomount.h +Index: util-linux-2.20-rc1/mount/lomount.h =================================================================== ---- util-linux-2.19-rc1.orig/mount/lomount.h -+++ util-linux-2.19-rc1/mount/lomount.h +--- util-linux-2.20-rc1.orig/mount/lomount.h ++++ util-linux-2.20-rc1/mount/lomount.h @@ -1,8 +1,8 @@ #ifndef UTIL_LINUX_LOMOUNT_H #define UTIL_LINUX_LOMOUNT_H @@ -357,10 +357,10 @@ Index: util-linux-2.19-rc1/mount/lomount.h extern int del_loop(const char *); extern int is_loop_device(const char *); extern int is_loop_autoclear(const char *device); -Index: util-linux-2.19-rc1/mount/losetup.8 +Index: util-linux-2.20-rc1/mount/losetup.8 =================================================================== ---- util-linux-2.19-rc1.orig/mount/losetup.8 -+++ util-linux-2.19-rc1/mount/losetup.8 +--- util-linux-2.20-rc1.orig/mount/losetup.8 ++++ util-linux-2.20-rc1/mount/losetup.8 @@ -96,9 +96,18 @@ find the first unused loop device. If a argument is present, use this device. Otherwise, print its name .IP "\fB\-h, \-\-help\fP" @@ -389,11 +389,11 @@ Index: util-linux-2.19-rc1/mount/losetup.8 Cryptoloop is deprecated in favor of dm-crypt. For more details see .BR cryptsetup (8). -Index: util-linux-2.19-rc1/mount/mount.8 +Index: util-linux-2.20-rc1/mount/mount.8 =================================================================== ---- util-linux-2.19-rc1.orig/mount/mount.8 -+++ util-linux-2.19-rc1/mount/mount.8 -@@ -901,6 +901,15 @@ Every time the inode is modified, the i_ +--- util-linux-2.20-rc1.orig/mount/mount.8 ++++ util-linux-2.20-rc1/mount/mount.8 +@@ -915,6 +915,15 @@ Every time the inode is modified, the i_ .B noiversion Do not increment the i_version inode field. .TP @@ -409,7 +409,7 @@ Index: util-linux-2.19-rc1/mount/mount.8 .B mand Allow mandatory locks on this filesystem. See .BR fcntl (2). -@@ -2623,6 +2632,10 @@ that are really options to +@@ -2697,6 +2706,10 @@ that are really options to .BR \%losetup (8). (These options can be used in addition to those specific to the filesystem type.) @@ -420,10 +420,10 @@ Index: util-linux-2.19-rc1/mount/mount.8 Since Linux 2.6.25 is supported auto-destruction of loop devices and then any loop device allocated by -Index: util-linux-2.19-rc1/mount/mount.c +Index: util-linux-2.20-rc1/mount/mount.c =================================================================== ---- util-linux-2.19-rc1.orig/mount/mount.c -+++ util-linux-2.19-rc1/mount/mount.c +--- util-linux-2.20-rc1.orig/mount/mount.c ++++ util-linux-2.20-rc1/mount/mount.c @@ -105,6 +105,9 @@ struct mountargs { void *data; }; @@ -437,11 +437,11 @@ Index: util-linux-2.19-rc1/mount/mount.c @@ -210,6 +213,7 @@ static int opt_nofail = 0; static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_sizelimit, - *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper; + *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper, *opt_helper; +static const char *opt_keybits, *opt_phash; static int is_readonly(const char *node); - static int mounted (const char *spec0, const char *node0); + static int mounted (const char *spec0, const char *node0, struct mntentchn *fstab_mc); @@ -226,6 +230,8 @@ static struct string_opt_map { { "offset=", 0, &opt_offset }, { "sizelimit=", 0, &opt_sizelimit }, @@ -451,7 +451,7 @@ Index: util-linux-2.19-rc1/mount/mount.c { "speed=", 0, &opt_speed }, { "comment=", 1, &opt_comment }, { "uhelper=", 0, &opt_uhelper }, -@@ -1208,7 +1214,8 @@ loop_check(const char **spec, const char +@@ -1224,7 +1230,8 @@ loop_check(const char **spec, const char *type = opt_vfstype; } @@ -461,7 +461,7 @@ Index: util-linux-2.19-rc1/mount/mount.c *loopfile = *spec; /* Automatically create a loop device from a regular file if a filesystem -@@ -1273,7 +1280,7 @@ loop_check(const char **spec, const char +@@ -1289,7 +1296,7 @@ loop_check(const char **spec, const char printf(_("mount: going to use the loop device %s\n"), *loopdev); if ((res = set_loop(*loopdev, *loopfile, offset, sizelimit, @@ -470,7 +470,7 @@ Index: util-linux-2.19-rc1/mount/mount.c if (res == 2) { /* loop dev has been grabbed by some other process, try again, if not given explicitly */ -@@ -2209,6 +2216,7 @@ static struct option longopts[] = { +@@ -2269,6 +2276,7 @@ static struct option longopts[] = { { "options", 1, 0, 'o' }, { "test-opts", 1, 0, 'O' }, { "pass-fd", 1, 0, 'p' }, @@ -478,7 +478,7 @@ Index: util-linux-2.19-rc1/mount/mount.c { "types", 1, 0, 't' }, { "bind", 0, 0, 'B' }, { "move", 0, 0, 'M' }, -@@ -2372,6 +2380,7 @@ main(int argc, char *argv[]) { +@@ -2432,6 +2440,7 @@ main(int argc, char *argv[]) { char *options = NULL, *test_opts = NULL, *node; const char *spec = NULL; char *label = NULL; @@ -486,7 +486,7 @@ Index: util-linux-2.19-rc1/mount/mount.c char *uuid = NULL; char *types = NULL; char *p; -@@ -2402,7 +2411,7 @@ main(int argc, char *argv[]) { +@@ -2462,7 +2471,7 @@ main(int argc, char *argv[]) { initproctitle(argc, argv); #endif @@ -495,7 +495,7 @@ Index: util-linux-2.19-rc1/mount/mount.c longopts, NULL)) != -1) { switch (c) { case 'a': /* mount everything in fstab */ -@@ -2423,6 +2432,9 @@ main(int argc, char *argv[]) { +@@ -2483,6 +2492,9 @@ main(int argc, char *argv[]) { case 'i': external_allowed = 0; break; @@ -505,7 +505,7 @@ Index: util-linux-2.19-rc1/mount/mount.c case 'l': list_with_volumelabel = 1; break; -@@ -2573,6 +2585,9 @@ main(int argc, char *argv[]) { +@@ -2633,6 +2645,9 @@ main(int argc, char *argv[]) { atexit(unlock_mtab); @@ -515,10 +515,10 @@ Index: util-linux-2.19-rc1/mount/mount.c switch (argc+specseen) { case 0: /* mount -a */ -Index: util-linux-2.19-rc1/mount/rmd160.c +Index: util-linux-2.20-rc1/mount/rmd160.c =================================================================== --- /dev/null -+++ util-linux-2.19-rc1/mount/rmd160.c ++++ util-linux-2.20-rc1/mount/rmd160.c @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -1052,10 +1052,10 @@ Index: util-linux-2.19-rc1/mount/rmd160.c + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -Index: util-linux-2.19-rc1/mount/rmd160.h +Index: util-linux-2.20-rc1/mount/rmd160.h =================================================================== --- /dev/null -+++ util-linux-2.19-rc1/mount/rmd160.h ++++ util-linux-2.20-rc1/mount/rmd160.h @@ -0,0 +1,11 @@ +#ifndef RMD160_H +#define RMD160_H @@ -1068,10 +1068,10 @@ Index: util-linux-2.19-rc1/mount/rmd160.h +#endif /*RMD160_H*/ + + -Index: util-linux-2.19-rc1/mount/sha512.c +Index: util-linux-2.20-rc1/mount/sha512.c =================================================================== --- /dev/null -+++ util-linux-2.19-rc1/mount/sha512.c ++++ util-linux-2.20-rc1/mount/sha512.c @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1505,10 +1505,10 @@ Index: util-linux-2.19-rc1/mount/sha512.c + memset(&ctx, 0, sizeof(ctx)); +} +#endif -Index: util-linux-2.19-rc1/mount/sha512.h +Index: util-linux-2.20-rc1/mount/sha512.h =================================================================== --- /dev/null -+++ util-linux-2.19-rc1/mount/sha512.h ++++ util-linux-2.20-rc1/mount/sha512.h @@ -0,0 +1,45 @@ +/* + * sha512.h diff --git a/util-linux-2.19.1.tar.bz2 b/util-linux-2.19.1.tar.bz2 deleted file mode 100644 index 7b6e0c4..0000000 --- a/util-linux-2.19.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d3eac4afcc687b3ae1ffedcab2dc12df84c7ba7045cce31386d2b7040a011c7d -size 4396543 diff --git a/util-linux-2.20-rc1.tar.bz2 b/util-linux-2.20-rc1.tar.bz2 new file mode 100644 index 0000000..4725f3d --- /dev/null +++ b/util-linux-2.20-rc1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34edb87c1ae46a54921ea73dc9b07d010d0611cf79ff982f20bfc6841bae2fcc +size 4513042 diff --git a/util-linux-fix-manpages.patch b/util-linux-fix-manpages.patch new file mode 100644 index 0000000..ed80344 --- /dev/null +++ b/util-linux-fix-manpages.patch @@ -0,0 +1,43 @@ +From e20e7ff216288102ae012f6a0e80948e41f59452 Mon Sep 17 00:00:00 2001 +From: Petr Uzel +Date: Mon, 1 Aug 2011 17:42:41 +0200 +Subject: [PATCH] look: fix manpage formatting + + +Signed-off-by: Petr Uzel +--- + misc-utils/look.1 | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +Index: util-linux-2.20-rc1/misc-utils/look.1 +=================================================================== +--- util-linux-2.20-rc1.orig/misc-utils/look.1 ++++ util-linux-2.20-rc1/misc-utils/look.1 +@@ -54,9 +54,9 @@ that + is invoked with). + .PP + If +-.Ar file ++.I file + is not specified, the file +-.Pa /usr/share/dict/words ++.I /usr/share/dict/words + is used, only alphanumeric characters are compared and the case of + alphabetic characters is ignored. + .SH OPTIONS +Index: util-linux-2.20-rc1/misc-utils/cal.1 +=================================================================== +--- util-linux-2.20-rc1.orig/misc-utils/cal.1 ++++ util-linux-2.20-rc1/misc-utils/cal.1 +@@ -35,9 +35,8 @@ + .\" @(#)cal.1 8.1 (Berkeley) 6/6/93 + .\" + .TH CAL "1" "June 2011" "util-linux" "User Commands" +-.Sh NAME +-.Nm cal +-.Nd displays a calendar ++.SH NAME ++cal \- displays a calendar + .SH SYNOPSIS + .B cal + [\fIoptions\fR] [[[\fIday\fR] \fImonth\fR] \fIyear\fR] diff --git a/util-linux-wall-build-with-pie.patch b/util-linux-wall-build-with-pie.patch new file mode 100644 index 0000000..bbd60bf --- /dev/null +++ b/util-linux-wall-build-with-pie.patch @@ -0,0 +1,27 @@ +From 0b8743b58e9755079bc5ffa51e9f66c088322596 Mon Sep 17 00:00:00 2001 +From: Petr Uzel +Date: Tue, 2 Aug 2011 15:18:11 +0200 +Subject: [PATCH] wall: build with SUID_{C,LD}FLAGS + + +Signed-off-by: Petr Uzel +--- + term-utils/Makefile.am | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/term-utils/Makefile.am b/term-utils/Makefile.am +index 7b545c3..b423bbd 100644 +--- a/term-utils/Makefile.am ++++ b/term-utils/Makefile.am +@@ -55,6 +55,8 @@ if BUILD_WALL + usrbin_exec_PROGRAMS += wall + wall_SOURCES = wall.c ttymsg.c ttymsg.h $(top_srcdir)/lib/strutils.c + dist_man_MANS += wall.1 ++wall_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) ++wall_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) + endif + + if BUILD_WRITE +-- +1.7.3.4 + diff --git a/util-linux.changes b/util-linux.changes index 4fa8499..822c7ab 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,52 @@ +------------------------------------------------------------------- +Mon Aug 1 13:44:21 UTC 2011 - puzel@novell.com + +- update to util-linux-2.20-rc1 + - Release highlights + agetty(8): + - mingetty features have been merged to agetty + chrt(1), taskset(1): + - supports new command line option "--all-tasks" to set or + retrieve the scheduling attributes of all the tasks (threads) + for a given PID + dmesg(1): + - supports new command line options: --clear, --console-on, + --console-off, --ctime, --decode, --facility=, + --level=, --show-delta, --notime, --kernel and + --userspace + fdisk(8): + - improved dialogs to be more user-friendly + findmnt(8), partx(8), lsblk(8) + - support new command line option "--pairs" to enable + key="value" output format + findmnt(8): + - supports new command line options "--poll" and "--timeout" to + monitor /proc/self/mountinfo changes + ionice(1): + - supports human-readable scheduling class names, for example: + ionice -c best-effort $PID + kill(1): + - supports new command line option "-q " to use + sigqueue(2) + - supports real-time signals in formats RT, RTMIN+ and + RTMAX- + lsblk(8): + - supports new columns + - supports new command line option "-D" to print device discard + topology + lscpu(8): + - improved support for s390 boxes + mkfs.minix: + - supports minix version 3 + simpleinit: + - this set of deprecated utils has been REMOVED + wall(1): + - support new command line option "--timeout" to specify write + timeout to terminals in seconds. +- add util-linux-fix-manpages.patch +- add util-linux-wall-build-with-pie.patch +- package /sbin/rcuuidd + ------------------------------------------------------------------- Tue May 3 09:39:37 UTC 2011 - puzel@novell.com diff --git a/util-linux.spec b/util-linux.spec index 8fa1bbc..208bed8 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -19,6 +19,7 @@ %define time_ver 1.7 %define which_ver 2.20 %define adjtimex_ver 1.28 +%define util_linux_tar_ver 2.20-rc1 Name: util-linux BuildRequires: audit-devel @@ -30,7 +31,7 @@ BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel -Version: 2.19.1 +Version: 2.19.91 Release: 1 Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) @@ -43,7 +44,7 @@ Group: System/Base AutoReqProv: on Recommends: %{name}-lang = %{version} Summary: A collection of basic system utilities -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v19/%{name}-%{version}.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v20/%{name}-%{util_linux_tar_ver}.tar.bz2 Source1: util-linux-rpmlintrc # XXX: make nologin part of login package Source2: nologin.c @@ -79,7 +80,9 @@ Source51: blkid.conf # 241372 - remove legacy warnings from fdisk Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # crypto patch -Patch3: util-linux-2.17.1-mount_losetup_crypto.patch +Patch2: util-linux-2.17.1-mount_losetup_crypto.patch +Patch3: util-linux-fix-manpages.patch +Patch4: util-linux-wall-build-with-pie.patch ## ## adjtimex ## @@ -177,9 +180,11 @@ Files to develop applications using the libmount library. %lang_package %prep -%setup -q -a 9 -b 11 -b 12 -b 13 -n %{name}-%{version} +%setup -q -a 9 -b 11 -b 12 -b 13 -n %{name}-%{util_linux_tar_ver} %patch1 -p1 +%patch2 -p1 %patch3 -p1 +%patch4 -p1 # cd adjtimex-* @@ -252,7 +257,9 @@ CFLAGS="%{optflags}" \ --enable-partx \ --enable-raw \ --enable-write \ + --enable-line \ --enable-libmount-mount \ + --disable-mountpoint \ --disable-use-tty-group \ --disable-static \ --disable-silent-rules @@ -367,6 +374,10 @@ find %{buildroot}%{_bindir}/ -regextype posix-egrep -type l \ find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)\.8.*" \ -printf "%{_mandir}/man8/%f*\n" >> %{name}.files +# clock.txt from uuidd is a ghost file +touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt +# rcuuidd helper +ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd %clean rm -rf %{buildroot} @@ -436,12 +447,9 @@ fi %files -f %{name}.files # Common files for all archs %defattr(-,root,root) -%doc login-utils/README.getty -%doc login-utils/README.modems-with-agetty %doc login-utils/README.poeigl %doc misc-utils/README.cal %doc misc-utils/README.namei -%doc misc-utils/README.namei2 %doc mount/README.mount %doc hwclock/README.hwclock %doc text-utils/README.col @@ -626,8 +634,6 @@ fi %dir %{_datadir}/getopt %attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh -%attr (755,root,root) %{_datadir}/getopt/getopt-test.bash -%attr (755,root,root) %{_datadir}/getopt/getopt-test.tcsh %ifnarch ia64 %doc fdisk/README.fdisk /sbin/fdisk @@ -683,9 +689,11 @@ fi %defattr(-, root, root) %verify(not mode) %attr(0755,root,root) %{_sbindir}/uuidd %attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid +%ghost %{_localstatedir}/lib/libuuid/clock.txt %attr(-,uuidd,uuidd) %ghost %dir %{_localstatedir}/run/uuidd %{_sysconfdir}/init.d/uuidd %{_mandir}/man8/uuidd.8.gz +%{_sbindir}/rcuuidd %files -n libuuid1 %defattr(-, root, root) From 84c19c86973817375a1b06aec3d6954a26a37ecdde22eeff76a81b1069322784 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 11 Aug 2011 07:41:14 +0000 Subject: [PATCH 118/211] Accepting request 78456 from Base:System util-linux-2.20-rc1-hexdump-segfault.patch (bnc#710877) util-linux-2.20-rc-fix-dmesg.patch (bnc#710417) util-linux-2.20-rc1-agetty-fixes.patch (bnc#711240) OBS-URL: https://build.opensuse.org/request/show/78456 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=122 --- util-linux-2.20-rc-fix-dmesg.patch | 36 +++ util-linux-2.20-rc1-agetty-fixes.patch | 322 +++++++++++++++++++++ util-linux-2.20-rc1-hexdump-segfault.patch | 65 +++++ util-linux.changes | 15 + util-linux.spec | 9 + 5 files changed, 447 insertions(+) create mode 100644 util-linux-2.20-rc-fix-dmesg.patch create mode 100644 util-linux-2.20-rc1-agetty-fixes.patch create mode 100644 util-linux-2.20-rc1-hexdump-segfault.patch diff --git a/util-linux-2.20-rc-fix-dmesg.patch b/util-linux-2.20-rc-fix-dmesg.patch new file mode 100644 index 0000000..902b59a --- /dev/null +++ b/util-linux-2.20-rc-fix-dmesg.patch @@ -0,0 +1,36 @@ +From dd8f12f4bc28eaf8e746ae2e4489a4445793d4e3 Mon Sep 17 00:00:00 2001 +From: Petr Uzel +Date: Wed, 10 Aug 2011 14:08:55 +0200 +Subject: [PATCH] dmesg: avoid mess at the end of dmesg output + +Since util-linux commit a7ee94f2204011f26232ed3133514bf6e0d4a62c, +dmesg incorrectly calculates number of bytes that are remaining in the +buffer in get_next_record(). This could, under specific circumstances, +cause printing mess at the end of dmesg output: + +> dmesg | tail +[ 1191.478725] Adding 285488k swap on /root/swapfile. Priority:-2 extents:15 across:1186612k +[ 1205.588331] Adding 285488k swap on /root/swapfile. Priority:-2 extents:15 across:1186612k +\xffffffba\xffffffba + +Reported-by: Glenn Doig +Addresses: https://bugzilla.novell.com/show_bug.cgi?id=710417 + +Signed-off-by: Petr Uzel +--- + sys-utils/dmesg.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +Index: util-linux-2.20-rc1/sys-utils/dmesg.c +=================================================================== +--- util-linux-2.20-rc1.orig/sys-utils/dmesg.c ++++ util-linux-2.20-rc1/sys-utils/dmesg.c +@@ -492,6 +492,8 @@ static int get_next_record(struct dmesg_ + + rec->next_size -= end - rec->next; + rec->next = rec->next_size > 0 ? end + 1 : NULL; ++ if (rec->next_size > 0) ++ rec->next_size--; + + return 0; + } diff --git a/util-linux-2.20-rc1-agetty-fixes.patch b/util-linux-2.20-rc1-agetty-fixes.patch new file mode 100644 index 0000000..6fdfe86 --- /dev/null +++ b/util-linux-2.20-rc1-agetty-fixes.patch @@ -0,0 +1,322 @@ +Index: util-linux-2.20-rc1/term-utils/agetty.8 +=================================================================== +--- util-linux-2.20-rc1.orig/term-utils/agetty.8 ++++ util-linux-2.20-rc1/term-utils/agetty.8 +@@ -87,9 +87,11 @@ whatever init(8) may have set, and is in + Assume that the tty is 8-bit clean, hence disable parity detection. + .TP + \-a, \-\-autologin \fIusername\fP +-Log the specified user automatically in without asking for a login +-name and password. Check the \-f option from +-\fB/bin/login\fP for this. ++Log the specified user automatically in without asking for a login name and ++password. The \-f \fIusername\fP option is added to the \fB/bin/login\fP ++command line by default. The \-\-login-options option changes this default ++behaviour and then only \\u is replaced by the \fIusername\fP and no other ++option is added to the login command line. + .TP + \-c, \-\-noreset + Don't reset terminal cflags (control modes). See \fItermios(3)\fP for more +@@ -160,9 +162,10 @@ is run as root. + .TP + \-o, \-\-login\-options \fI"login_options"\fP + Options that are passed to the login program. \\u is replaced +-by the login name. Defaults to "-- \\u", which is suitable for +-\fB/bin/login\fP. Please read the SECURITY NOTICE below if +-you want to use this. ++by the login name. The default \fB/bin/login\fP command line ++is "/bin/login -- ". ++ ++Please read the SECURITY NOTICE below if you want to use this. + .TP + \-p, \-\-login\-pause + Wait for any key before dropping to the login prompt. Can be combined +Index: util-linux-2.20-rc1/term-utils/agetty.c +=================================================================== +--- util-linux-2.20-rc1.orig/term-utils/agetty.c ++++ util-linux-2.20-rc1/term-utils/agetty.c +@@ -100,7 +100,7 @@ + + /* Login prompt. */ + #define LOGIN "login: " +-#define ARRAY_SIZE_MAX 16 /* Numbers of args for login beside "-- \\u" */ ++#define LOGIN_ARGV_MAX 16 /* Numbers of args for login */ + + /* Some shorthands for control characters. */ + #define CTL(x) (x ^ 0100) /* Assumes ASCII dialect */ +@@ -262,9 +262,8 @@ static void log_err(const char *, ...) _ + static void log_warn (const char *, ...) + __attribute__((__format__(printf, 1, 2))); + static ssize_t append(char *dest, size_t len, const char *sep, const char *src); +-static void checkname (const char* nm); +-static void replacename (char** arr, const char* nm); +-static void mkarray (char** arr, char* str); ++static void check_username (const char* nm); ++static void login_options_to_argv(char *argv[], int *argc, char *str, char *username); + + /* Fake hostname for ut_host specified on command line. */ + static char *fakehost; +@@ -278,19 +277,18 @@ FILE *dbf; + + int main(int argc, char **argv) + { +- char *logname = NULL; /* login name, given to /bin/login */ +- char logcmd[NAME_MAX+1]; +- char *logarr[ARRAY_SIZE_MAX + 2]; /* arguments plus "-- \\u" */ ++ char *username = NULL; /* login name, given to /bin/login */ + struct chardata chardata; /* will be set by get_logname() */ + struct termios termios; /* terminal mode bits */ + static struct options options = { + .flags = F_ISSUE, /* show /etc/issue (SYSV_STYLE) */ + .login = _PATH_LOGIN, /* default login program */ +- .logopt = "-- \\u", /* escape for user name */ + .tty = "tty1", /* default tty line */ + .term = DEFAULT_VCTERM, /* terminal type */ + .issue = ISSUE /* default issue file */ + }; ++ char *login_argv[LOGIN_ARGV_MAX + 1]; ++ int login_argc = 0; + struct sigaction sa, sa_hup, sa_quit, sa_int; + sigset_t set; + +@@ -315,6 +313,8 @@ int main(int argc, char **argv) + /* Parse command-line arguments. */ + parse_args(argc, argv, &options); + ++ login_argv[login_argc++] = options.login; /* set login program name */ ++ + /* Update the utmp file. */ + #ifdef SYSV_STYLE + update_utmp(&options); +@@ -379,16 +379,15 @@ int main(int argc, char **argv) + chardata = init_chardata; + if ((options.flags & F_NOPROMPT) == 0) { + if (options.autolog) { +- /* Do the auto login */ ++ /* Do the auto login. */ + debug("doing auto login\n"); + do_prompt(&options, &termios); + printf("%s%s (automatic login)\n", LOGIN, options.autolog); +- logname = options.autolog; +- options.logopt = "-f \\u"; ++ username = options.autolog; + } else { + /* Read the login name. */ + debug("reading login name\n"); +- while ((logname = ++ while ((username = + get_logname(&options, &termios, &chardata)) == 0) + if ((options.flags & F_VCONSOLE) == 0) + next_speed(&options, &termios); +@@ -410,13 +409,25 @@ int main(int argc, char **argv) + sigaction(SIGQUIT, &sa_quit, NULL); + sigaction(SIGINT, &sa_int, NULL); + +- *logcmd = '\0'; +- append(logcmd, sizeof(logcmd), NULL, options.login); +- append(logcmd, sizeof(logcmd), " ", options.logopt); +- +- checkname(logname); +- mkarray(logarr, logcmd); +- replacename(logarr, logname); ++ if (username) ++ check_username(username); ++ ++ if (options.logopt) { ++ /* ++ * The --login-options completely overwrites the default ++ * way how agetty composes login(1) command line. ++ */ ++ login_options_to_argv(login_argv, &login_argc, ++ options.logopt, username); ++ } else if (username) { ++ if (options.autolog) ++ login_argv[login_argc++] = "-f"; ++ else ++ login_argv[login_argc++] = "--"; ++ login_argv[login_argc++] = username; ++ } ++ ++ login_argv[login_argc] = NULL; /* last login argv */ + + if (options.chroot) { + if (chroot(options.chroot) < 0) +@@ -435,8 +446,87 @@ int main(int argc, char **argv) + } + + /* Let the login program take care of password validation. */ +- execv(options.login, logarr); +- log_err(_("%s: can't exec %s: %m"), options.tty, options.login); ++ execv(options.login, login_argv); ++ log_err(_("%s: can't exec %s: %m"), options.tty, login_argv[0]); ++} ++ ++/* ++ * Returns : @str if \u not found ++ * : @username if @str equal to "\u" ++ * : newly allocated string if \u mixed with something other ++ */ ++static char *replace_u(char *str, char *username) ++{ ++ char *entry = NULL, *p = str; ++ size_t usz = username ? strlen(username) : 0; ++ ++ while (*p) { ++ size_t sz; ++ char *tp, *old = entry; ++ ++ if (memcmp(p, "\\u", 2)) { ++ p++; ++ continue; /* no \u */ ++ } ++ sz = strlen(str); ++ ++ if (p == str && sz == 2) ++ /* 'str' contains only '\u' */ ++ return username; ++ ++ tp = entry = malloc(sz + usz); ++ if (!tp) ++ log_err(_("failed to allocate memory: %m")); ++ ++ if (p != str) { ++ /* copy chars befor \u */ ++ memcpy(tp, str, p - str); ++ tp += p - str; ++ } ++ if (usz) { ++ /* copy username */ ++ memcpy(tp, username, usz); ++ tp += usz; ++ } ++ if (*(p + 2)) ++ /* copy chars after \u + \0 */ ++ memcpy(tp, p + 2, sz - (p - str) - 1); ++ else ++ *tp = '\0'; ++ ++ p = tp; ++ str = entry; ++ free(old); ++ } ++ ++ return entry ? entry : str; ++} ++ ++static void login_options_to_argv(char *argv[], int *argc, ++ char *str, char *username) ++{ ++ char *p; ++ int i = *argc; ++ ++ while (str && isspace(*str)) ++ str++; ++ p = str; ++ ++ while (p && *p && i < LOGIN_ARGV_MAX) { ++ if (isspace(*p)) { ++ *p = '\0'; ++ while (isspace(*++p)) ++ ; ++ if (*p) { ++ argv[i++] = replace_u(str, username); ++ str = p; ++ } ++ } else ++ p++; ++ } ++ if (str && *str && i < LOGIN_ARGV_MAX) ++ argv[i++] = replace_u(str, username); ++ *argc = i; + } + + /* Parse command-line arguments. */ +@@ -920,7 +1010,7 @@ static void termio_init(struct options * + mode = K_RAW; + switch(mode) { + case K_UNICODE: +- setlocale(LC_CTYPE, "en_US.UTF-8"); ++ setlocale(LC_CTYPE, "C.UTF-8"); + op->flags |= F_UTF8; + break; + case K_RAW: +@@ -977,7 +1067,14 @@ static void termio_init(struct options * + /* Flush input and output queues, important for modems! */ + tcflush(STDIN_FILENO, TCIOFLUSH); + +- tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; ++#ifdef IUTF8 ++ tp->c_iflag = tp->c_iflag & IUTF8; ++ if (tp->c_iflag & IUTF8) ++ op->flags |= F_UTF8; ++#else ++ tp->c_iflag = 0; ++#endif ++ tp->c_lflag = tp->c_oflag = 0; + + if ((op->flags & F_KEEPCFLAGS) == 0) + tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL); +@@ -1826,12 +1923,13 @@ static ssize_t append(char *dest, size_t + + return dsz + ssz + sz; + } ++ + /* + * Do not allow the user to pass an option as a user name + * To be more safe: Use `--' to make sure the rest is + * interpreted as non-options by the program, if it supports it. + */ +-static void checkname(const char* nm) ++static void check_username(const char* nm) + { + const char *p = nm; + if (!nm) +@@ -1848,48 +1946,3 @@ err: + log_err("checkname: %m"); + } + +-static void replacename(char** arr, const char* nm) +-{ +- const char *p; +- char *tmp; +- while ((p = *arr)) { +- const char *p1 = p; +- while (*p1) { +- if (memcmp(p1, "\\u", 2) == 0) { +- tmp = malloc(strlen(p) + strlen(nm)); +- if (!tmp) +- log_err(_("failed to allocate memory: %m")); +- if (p1 != p) +- memcpy(tmp, p, (p1 - p)); +- *(tmp + (p1 - p)) = 0; +- strcat(tmp, nm); +- strcat(tmp, p1+2); +- *arr = tmp; +- } +- p1++; +- } +- arr++; +- } +-} +- +-static void mkarray(char** arr, char* str) +-{ +- char* p = str; +- char* start = p; +- int i = 0; +- +- while (*p && i < ARRAY_SIZE_MAX) { +- if (isspace(*p)) { +- *p = 0; +- while (isspace(*++p)) +- ; +- if (*p) { +- arr[i++] = start; +- start = p; +- } +- } else +- p++; +- } +- arr[i++] = start; +- arr[i++] = (char*) 0; +-} diff --git a/util-linux-2.20-rc1-hexdump-segfault.patch b/util-linux-2.20-rc1-hexdump-segfault.patch new file mode 100644 index 0000000..837ad9f --- /dev/null +++ b/util-linux-2.20-rc1-hexdump-segfault.patch @@ -0,0 +1,65 @@ +From 474b1ae3ca463acec0c625fb7076bcc746671479 Mon Sep 17 00:00:00 2001 +From: Petr Uzel +Date: Wed, 10 Aug 2011 15:23:53 +0200 +Subject: [PATCH] hexdump: fix segfault due to uninitialized memory + +util-linux commit 85bf44b714ab184907eb448eba389218956d6a51 +replaced all calls to emalloc() with xmalloc(), whose semantics +is however different - it does not zero allocated memory. This +made hexdump segfault if MALLOC_PERTURB_ was set. + +Reported-by: Kyrill Detinov +Addresses: https://bugzilla.novell.com/show_bug.cgi?id=710877 + +Signed-off-by: Petr Uzel +--- + text-utils/display.c | 4 ++-- + text-utils/parse.c | 6 +++--- + 2 files changed, 5 insertions(+), 5 deletions(-) + +Index: util-linux-2.20-rc1/text-utils/display.c +=================================================================== +--- util-linux-2.20-rc1.orig/text-utils/display.c ++++ util-linux-2.20-rc1/text-utils/display.c +@@ -233,8 +233,8 @@ get(void) + u_char *tmpp; + + if (!curp) { +- curp = xmalloc(blocksize); +- savp = xmalloc(blocksize); ++ curp = xcalloc(1, blocksize); ++ savp = xcalloc(1, blocksize); + } else { + tmpp = curp; + curp = savp; +Index: util-linux-2.20-rc1/text-utils/parse.c +=================================================================== +--- util-linux-2.20-rc1.orig/text-utils/parse.c ++++ util-linux-2.20-rc1/text-utils/parse.c +@@ -86,7 +86,7 @@ void add(const char *fmt) + const char *savep; + + /* Start new linked list of format units. */ +- tfs = xmalloc(sizeof(FS)); ++ tfs = xcalloc(1, sizeof(FS)); + if (!fshead) + fshead = tfs; + else +@@ -102,7 +102,7 @@ void add(const char *fmt) + break; + + /* Allocate a new format unit and link it in. */ +- tfu = xmalloc(sizeof(FU)); ++ tfu = xcalloc(1, sizeof(FU)); + *nextfu = tfu; + nextfu = &tfu->nextfu; + tfu->reps = 1; +@@ -219,7 +219,7 @@ void rewrite(FS *fs) + * conversion character gets its own. + */ + for (nconv = 0, fmtp = fu->fmt; *fmtp; nextpr = &pr->nextpr) { +- pr = xmalloc(sizeof(PR)); ++ pr = xcalloc(1, sizeof(PR)); + if (!fu->nextpr) + fu->nextpr = pr; + else diff --git a/util-linux.changes b/util-linux.changes index 822c7ab..2250ada 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Wed Aug 10 13:42:33 UTC 2011 - puzel@novell.com + +- add util-linux-2.20-rc1-hexdump-segfault.patch (bnc#710877) + +------------------------------------------------------------------- +Wed Aug 10 12:20:41 UTC 2011 - puzel@novell.com + +- add util-linux-2.20-rc-fix-dmesg.patch (bnc#710417) + +------------------------------------------------------------------- +Wed Aug 10 11:06:15 UTC 2011 - puzel@novell.com + +- add util-linux-2.20-rc1-agetty-fixes.patch (bnc#711240) + ------------------------------------------------------------------- Mon Aug 1 13:44:21 UTC 2011 - puzel@novell.com diff --git a/util-linux.spec b/util-linux.spec index 208bed8..0c74fcd 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -83,6 +83,12 @@ Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch2: util-linux-2.17.1-mount_losetup_crypto.patch Patch3: util-linux-fix-manpages.patch Patch4: util-linux-wall-build-with-pie.patch +# bnc#711240 - squashed 4 upstream patches +Patch5: util-linux-2.20-rc1-agetty-fixes.patch +# bnc#710471 +Patch6: util-linux-2.20-rc-fix-dmesg.patch +# bnc#710877 +Patch7: util-linux-2.20-rc1-hexdump-segfault.patch ## ## adjtimex ## @@ -185,6 +191,9 @@ Files to develop applications using the libmount library. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 # cd adjtimex-* From e119174bcefd0654efb96222c787ca30d25ad1e27f5d846e81e87c25e5ccc968 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 11 Aug 2011 07:41:24 +0000 Subject: [PATCH 119/211] Autobuild autoformatter for 78456 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=123 --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 0c74fcd..581ac09 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -32,7 +32,7 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel Version: 2.19.91 -Release: 1 +Release: 2 Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) Provides: fsck-with-dev-lock = %{version} From d72b578ea169dea94a6bfaf5c8b0606cdf6142289c516f459f501e7e54b4f615 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Wed, 17 Aug 2011 12:01:28 +0000 Subject: [PATCH 120/211] Accepting request 79116 from Base:System update to 2.20-rc2 OBS-URL: https://build.opensuse.org/request/show/79116 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=124 --- util-linux-2.17.1-mount_losetup_crypto.patch | 113 ++++--- util-linux-2.20-rc-fix-dmesg.patch | 36 --- util-linux-2.20-rc1-agetty-fixes.patch | 322 ------------------- util-linux-2.20-rc1-hexdump-segfault.patch | 65 ---- util-linux-2.20-rc1.tar.bz2 | 3 - util-linux-2.20-rc2.tar.bz2 | 3 + util-linux-fix-manpages.patch | 43 --- util-linux-wall-build-with-pie.patch | 27 -- util-linux.changes | 12 + util-linux.spec | 17 +- 10 files changed, 80 insertions(+), 561 deletions(-) delete mode 100644 util-linux-2.20-rc-fix-dmesg.patch delete mode 100644 util-linux-2.20-rc1-agetty-fixes.patch delete mode 100644 util-linux-2.20-rc1-hexdump-segfault.patch delete mode 100644 util-linux-2.20-rc1.tar.bz2 create mode 100644 util-linux-2.20-rc2.tar.bz2 delete mode 100644 util-linux-fix-manpages.patch delete mode 100644 util-linux-wall-build-with-pie.patch diff --git a/util-linux-2.17.1-mount_losetup_crypto.patch b/util-linux-2.17.1-mount_losetup_crypto.patch index db0915f..8f9a34c 100644 --- a/util-linux-2.17.1-mount_losetup_crypto.patch +++ b/util-linux-2.17.1-mount_losetup_crypto.patch @@ -38,10 +38,10 @@ Signed-off-by: Ludwig Nussel create mode 100644 mount/sha512.c create mode 100644 mount/sha512.h -Index: util-linux-2.20-rc1/mount/Makefile.am +Index: util-linux-2.20-rc2/mount/Makefile.am =================================================================== ---- util-linux-2.20-rc1.orig/mount/Makefile.am -+++ util-linux-2.20-rc1/mount/Makefile.am +--- util-linux-2.20-rc2.orig/mount/Makefile.am ++++ util-linux-2.20-rc2/mount/Makefile.am @@ -7,7 +7,7 @@ sbin_PROGRAMS = losetup swapon dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 @@ -51,10 +51,10 @@ Index: util-linux-2.20-rc1/mount/Makefile.am # generic header for mount and umount hdrs_mount = fstab.h mount_mntent.h mount_constants.h \ -Index: util-linux-2.20-rc1/mount/lomount.c +Index: util-linux-2.20-rc2/mount/lomount.c =================================================================== ---- util-linux-2.20-rc1.orig/mount/lomount.c -+++ util-linux-2.20-rc1/mount/lomount.c +--- util-linux-2.20-rc2.orig/mount/lomount.c ++++ util-linux-2.20-rc2/mount/lomount.c @@ -23,6 +23,12 @@ #include "sundries.h" #include "xmalloc.h" @@ -68,7 +68,7 @@ Index: util-linux-2.20-rc1/mount/lomount.c #ifdef LOOP_SET_FD -@@ -509,12 +515,22 @@ show_loop_fd(int fd, char *device) { +@@ -510,12 +516,22 @@ show_loop_fd(int fd, char *device) { if (loopinfo64.lo_encrypt_type || loopinfo64.lo_crypt_name[0]) { @@ -94,7 +94,7 @@ Index: util-linux-2.20-rc1/mount/lomount.c } printf("\n"); return 0; -@@ -764,7 +780,7 @@ xgetpass(int pfd, const char *prompt) { +@@ -765,7 +781,7 @@ xgetpass(int pfd, const char *prompt) { } if (pass == NULL) @@ -103,7 +103,7 @@ Index: util-linux-2.20-rc1/mount/lomount.c pass[i] = 0; return pass; -@@ -778,6 +794,24 @@ digits_only(const char *s) { +@@ -779,6 +795,24 @@ digits_only(const char *s) { return 1; } @@ -128,7 +128,7 @@ Index: util-linux-2.20-rc1/mount/lomount.c /* * return codes: * 0 - success -@@ -786,10 +820,11 @@ digits_only(const char *s) { +@@ -787,10 +821,11 @@ digits_only(const char *s) { */ int set_loop(const char *device, const char *file, unsigned long long offset, @@ -142,7 +142,7 @@ Index: util-linux-2.20-rc1/mount/lomount.c char *filename; if (verbose) { -@@ -827,13 +862,37 @@ set_loop(const char *device, const char +@@ -828,13 +863,37 @@ set_loop(const char *device, const char filename = (char *) file; xstrncpy((char *)loopinfo64.lo_file_name, filename, LO_NAME_SIZE); @@ -182,7 +182,7 @@ Index: util-linux-2.20-rc1/mount/lomount.c } } -@@ -854,20 +913,69 @@ set_loop(const char *device, const char +@@ -855,20 +914,69 @@ set_loop(const char *device, const char } #endif @@ -264,21 +264,34 @@ Index: util-linux-2.20-rc1/mount/lomount.c } if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { -@@ -1022,7 +1130,13 @@ usage(FILE *f) { +@@ -1024,14 +1132,20 @@ usage(FILE *out) { + progname); - fprintf(f, _("\nOptions:\n" - " -e | --encryption enable data encryption with specified \n" -+ " -H | --phash hash password using specified algorithm (sha512/sha256/sha384/rmd160/none)\n" - " -h | --help this help\n" -+ " -k | --keybits specify number of bits in the hashed key given\n" -+ " to the cipher. Some ciphers support several key\n" -+ " sizes and might be more efficient with a smaller\n" -+ " key size. Key sizes < 128 are generally not\n" -+ " recommended\n" - " -o | --offset start at offset into file\n" - " --sizelimit loop limited to only bytes of the file\n" - " -p | --pass-fd read passphrase from file descriptor \n" -@@ -1036,11 +1150,14 @@ usage(FILE *f) { + fputs(_("\nOptions:\n"), out); +- fputs(_(" -e, --encryption enable data encryption with specified \n" +- " -h, --help this help\n" +- " -o, --offset start at offset into file\n" ++ fputs(_(" -e | --encryption enable data encryption with specified \n" ++ " -H | --phash hash password using specified algorithm (sha512/sha256/sha384/rmd160/none)\n" ++ " -h | --help this help\n" ++ " -k | --keybits specify number of bits in the hashed key given\n" ++ " to the cipher. Some ciphers support several key\n" ++ " sizes and might be more efficient with a smaller\n" ++ " key size. Key sizes < 128 are generally not\n" ++ " recommended\n" ++ " -o | --offset start at offset into file\n" + " --sizelimit loop limited to only bytes of the file\n" +- " -p, --pass-fd read passphrase from file descriptor \n" +- " -r, --read-only setup read-only loop device\n" ++ " -p | --pass-fd read passphrase from file descriptor \n" ++ " -r | --read-only setup read-only loop device\n" + " --show print device name (with -f )\n" +- " -v, --verbose verbose mode\n\n"), out); ++ " -v | --verbose verbose mode\n\n"), out); + + exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); + } +@@ -1039,11 +1153,14 @@ usage(FILE *out) { int main(int argc, char **argv) { char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc; @@ -293,7 +306,7 @@ Index: util-linux-2.20-rc1/mount/lomount.c uintmax_t off = 0, slimit = 0; static const struct option longopts[] = { -@@ -1050,6 +1167,8 @@ main(int argc, char **argv) { +@@ -1053,6 +1170,8 @@ main(int argc, char **argv) { { "encryption", 1, 0, 'e' }, { "find", 0, 0, 'f' }, { "help", 0, 0, 'h' }, @@ -302,7 +315,7 @@ Index: util-linux-2.20-rc1/mount/lomount.c { "associated", 1, 0, 'j' }, { "offset", 1, 0, 'o' }, { "sizelimit", 1, 0, 128 }, -@@ -1066,12 +1185,13 @@ main(int argc, char **argv) { +@@ -1069,12 +1188,13 @@ main(int argc, char **argv) { capacity = delete = find = all = 0; assoc = offset = sizelimit = encryption = passfd = NULL; @@ -317,7 +330,7 @@ Index: util-linux-2.20-rc1/mount/lomount.c longopts, NULL)) != -1) { switch (c) { case 'a': -@@ -1099,6 +1219,12 @@ main(int argc, char **argv) { +@@ -1102,6 +1222,12 @@ main(int argc, char **argv) { case 'j': assoc = optarg; break; @@ -330,7 +343,7 @@ Index: util-linux-2.20-rc1/mount/lomount.c case 'o': offset = optarg; break; -@@ -1188,8 +1314,10 @@ main(int argc, char **argv) { +@@ -1191,8 +1317,10 @@ main(int argc, char **argv) { else { if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(stderr); @@ -342,10 +355,10 @@ Index: util-linux-2.20-rc1/mount/lomount.c if (res == 2 && find) { if (verbose) printf(_("stolen loop=%s...trying again\n"), -Index: util-linux-2.20-rc1/mount/lomount.h +Index: util-linux-2.20-rc2/mount/lomount.h =================================================================== ---- util-linux-2.20-rc1.orig/mount/lomount.h -+++ util-linux-2.20-rc1/mount/lomount.h +--- util-linux-2.20-rc2.orig/mount/lomount.h ++++ util-linux-2.20-rc2/mount/lomount.h @@ -1,8 +1,8 @@ #ifndef UTIL_LINUX_LOMOUNT_H #define UTIL_LINUX_LOMOUNT_H @@ -357,10 +370,10 @@ Index: util-linux-2.20-rc1/mount/lomount.h extern int del_loop(const char *); extern int is_loop_device(const char *); extern int is_loop_autoclear(const char *device); -Index: util-linux-2.20-rc1/mount/losetup.8 +Index: util-linux-2.20-rc2/mount/losetup.8 =================================================================== ---- util-linux-2.20-rc1.orig/mount/losetup.8 -+++ util-linux-2.20-rc1/mount/losetup.8 +--- util-linux-2.20-rc2.orig/mount/losetup.8 ++++ util-linux-2.20-rc2/mount/losetup.8 @@ -96,9 +96,18 @@ find the first unused loop device. If a argument is present, use this device. Otherwise, print its name .IP "\fB\-h, \-\-help\fP" @@ -389,10 +402,10 @@ Index: util-linux-2.20-rc1/mount/losetup.8 Cryptoloop is deprecated in favor of dm-crypt. For more details see .BR cryptsetup (8). -Index: util-linux-2.20-rc1/mount/mount.8 +Index: util-linux-2.20-rc2/mount/mount.8 =================================================================== ---- util-linux-2.20-rc1.orig/mount/mount.8 -+++ util-linux-2.20-rc1/mount/mount.8 +--- util-linux-2.20-rc2.orig/mount/mount.8 ++++ util-linux-2.20-rc2/mount/mount.8 @@ -915,6 +915,15 @@ Every time the inode is modified, the i_ .B noiversion Do not increment the i_version inode field. @@ -420,10 +433,10 @@ Index: util-linux-2.20-rc1/mount/mount.8 Since Linux 2.6.25 is supported auto-destruction of loop devices and then any loop device allocated by -Index: util-linux-2.20-rc1/mount/mount.c +Index: util-linux-2.20-rc2/mount/mount.c =================================================================== ---- util-linux-2.20-rc1.orig/mount/mount.c -+++ util-linux-2.20-rc1/mount/mount.c +--- util-linux-2.20-rc2.orig/mount/mount.c ++++ util-linux-2.20-rc2/mount/mount.c @@ -105,6 +105,9 @@ struct mountargs { void *data; }; @@ -515,10 +528,10 @@ Index: util-linux-2.20-rc1/mount/mount.c switch (argc+specseen) { case 0: /* mount -a */ -Index: util-linux-2.20-rc1/mount/rmd160.c +Index: util-linux-2.20-rc2/mount/rmd160.c =================================================================== --- /dev/null -+++ util-linux-2.20-rc1/mount/rmd160.c ++++ util-linux-2.20-rc2/mount/rmd160.c @@ -0,0 +1,532 @@ +/* rmd160.c - RIPE-MD160 + * Copyright (C) 1998 Free Software Foundation, Inc. @@ -1052,10 +1065,10 @@ Index: util-linux-2.20-rc1/mount/rmd160.c + rmd160_final( &hd ); + memcpy( outbuf, hd.buf, 20 ); +} -Index: util-linux-2.20-rc1/mount/rmd160.h +Index: util-linux-2.20-rc2/mount/rmd160.h =================================================================== --- /dev/null -+++ util-linux-2.20-rc1/mount/rmd160.h ++++ util-linux-2.20-rc2/mount/rmd160.h @@ -0,0 +1,11 @@ +#ifndef RMD160_H +#define RMD160_H @@ -1068,10 +1081,10 @@ Index: util-linux-2.20-rc1/mount/rmd160.h +#endif /*RMD160_H*/ + + -Index: util-linux-2.20-rc1/mount/sha512.c +Index: util-linux-2.20-rc2/mount/sha512.c =================================================================== --- /dev/null -+++ util-linux-2.20-rc1/mount/sha512.c ++++ util-linux-2.20-rc2/mount/sha512.c @@ -0,0 +1,432 @@ +/* + * sha512.c @@ -1505,10 +1518,10 @@ Index: util-linux-2.20-rc1/mount/sha512.c + memset(&ctx, 0, sizeof(ctx)); +} +#endif -Index: util-linux-2.20-rc1/mount/sha512.h +Index: util-linux-2.20-rc2/mount/sha512.h =================================================================== --- /dev/null -+++ util-linux-2.20-rc1/mount/sha512.h ++++ util-linux-2.20-rc2/mount/sha512.h @@ -0,0 +1,45 @@ +/* + * sha512.h diff --git a/util-linux-2.20-rc-fix-dmesg.patch b/util-linux-2.20-rc-fix-dmesg.patch deleted file mode 100644 index 902b59a..0000000 --- a/util-linux-2.20-rc-fix-dmesg.patch +++ /dev/null @@ -1,36 +0,0 @@ -From dd8f12f4bc28eaf8e746ae2e4489a4445793d4e3 Mon Sep 17 00:00:00 2001 -From: Petr Uzel -Date: Wed, 10 Aug 2011 14:08:55 +0200 -Subject: [PATCH] dmesg: avoid mess at the end of dmesg output - -Since util-linux commit a7ee94f2204011f26232ed3133514bf6e0d4a62c, -dmesg incorrectly calculates number of bytes that are remaining in the -buffer in get_next_record(). This could, under specific circumstances, -cause printing mess at the end of dmesg output: - -> dmesg | tail -[ 1191.478725] Adding 285488k swap on /root/swapfile. Priority:-2 extents:15 across:1186612k -[ 1205.588331] Adding 285488k swap on /root/swapfile. Priority:-2 extents:15 across:1186612k -\xffffffba\xffffffba - -Reported-by: Glenn Doig -Addresses: https://bugzilla.novell.com/show_bug.cgi?id=710417 - -Signed-off-by: Petr Uzel ---- - sys-utils/dmesg.c | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -Index: util-linux-2.20-rc1/sys-utils/dmesg.c -=================================================================== ---- util-linux-2.20-rc1.orig/sys-utils/dmesg.c -+++ util-linux-2.20-rc1/sys-utils/dmesg.c -@@ -492,6 +492,8 @@ static int get_next_record(struct dmesg_ - - rec->next_size -= end - rec->next; - rec->next = rec->next_size > 0 ? end + 1 : NULL; -+ if (rec->next_size > 0) -+ rec->next_size--; - - return 0; - } diff --git a/util-linux-2.20-rc1-agetty-fixes.patch b/util-linux-2.20-rc1-agetty-fixes.patch deleted file mode 100644 index 6fdfe86..0000000 --- a/util-linux-2.20-rc1-agetty-fixes.patch +++ /dev/null @@ -1,322 +0,0 @@ -Index: util-linux-2.20-rc1/term-utils/agetty.8 -=================================================================== ---- util-linux-2.20-rc1.orig/term-utils/agetty.8 -+++ util-linux-2.20-rc1/term-utils/agetty.8 -@@ -87,9 +87,11 @@ whatever init(8) may have set, and is in - Assume that the tty is 8-bit clean, hence disable parity detection. - .TP - \-a, \-\-autologin \fIusername\fP --Log the specified user automatically in without asking for a login --name and password. Check the \-f option from --\fB/bin/login\fP for this. -+Log the specified user automatically in without asking for a login name and -+password. The \-f \fIusername\fP option is added to the \fB/bin/login\fP -+command line by default. The \-\-login-options option changes this default -+behaviour and then only \\u is replaced by the \fIusername\fP and no other -+option is added to the login command line. - .TP - \-c, \-\-noreset - Don't reset terminal cflags (control modes). See \fItermios(3)\fP for more -@@ -160,9 +162,10 @@ is run as root. - .TP - \-o, \-\-login\-options \fI"login_options"\fP - Options that are passed to the login program. \\u is replaced --by the login name. Defaults to "-- \\u", which is suitable for --\fB/bin/login\fP. Please read the SECURITY NOTICE below if --you want to use this. -+by the login name. The default \fB/bin/login\fP command line -+is "/bin/login -- ". -+ -+Please read the SECURITY NOTICE below if you want to use this. - .TP - \-p, \-\-login\-pause - Wait for any key before dropping to the login prompt. Can be combined -Index: util-linux-2.20-rc1/term-utils/agetty.c -=================================================================== ---- util-linux-2.20-rc1.orig/term-utils/agetty.c -+++ util-linux-2.20-rc1/term-utils/agetty.c -@@ -100,7 +100,7 @@ - - /* Login prompt. */ - #define LOGIN "login: " --#define ARRAY_SIZE_MAX 16 /* Numbers of args for login beside "-- \\u" */ -+#define LOGIN_ARGV_MAX 16 /* Numbers of args for login */ - - /* Some shorthands for control characters. */ - #define CTL(x) (x ^ 0100) /* Assumes ASCII dialect */ -@@ -262,9 +262,8 @@ static void log_err(const char *, ...) _ - static void log_warn (const char *, ...) - __attribute__((__format__(printf, 1, 2))); - static ssize_t append(char *dest, size_t len, const char *sep, const char *src); --static void checkname (const char* nm); --static void replacename (char** arr, const char* nm); --static void mkarray (char** arr, char* str); -+static void check_username (const char* nm); -+static void login_options_to_argv(char *argv[], int *argc, char *str, char *username); - - /* Fake hostname for ut_host specified on command line. */ - static char *fakehost; -@@ -278,19 +277,18 @@ FILE *dbf; - - int main(int argc, char **argv) - { -- char *logname = NULL; /* login name, given to /bin/login */ -- char logcmd[NAME_MAX+1]; -- char *logarr[ARRAY_SIZE_MAX + 2]; /* arguments plus "-- \\u" */ -+ char *username = NULL; /* login name, given to /bin/login */ - struct chardata chardata; /* will be set by get_logname() */ - struct termios termios; /* terminal mode bits */ - static struct options options = { - .flags = F_ISSUE, /* show /etc/issue (SYSV_STYLE) */ - .login = _PATH_LOGIN, /* default login program */ -- .logopt = "-- \\u", /* escape for user name */ - .tty = "tty1", /* default tty line */ - .term = DEFAULT_VCTERM, /* terminal type */ - .issue = ISSUE /* default issue file */ - }; -+ char *login_argv[LOGIN_ARGV_MAX + 1]; -+ int login_argc = 0; - struct sigaction sa, sa_hup, sa_quit, sa_int; - sigset_t set; - -@@ -315,6 +313,8 @@ int main(int argc, char **argv) - /* Parse command-line arguments. */ - parse_args(argc, argv, &options); - -+ login_argv[login_argc++] = options.login; /* set login program name */ -+ - /* Update the utmp file. */ - #ifdef SYSV_STYLE - update_utmp(&options); -@@ -379,16 +379,15 @@ int main(int argc, char **argv) - chardata = init_chardata; - if ((options.flags & F_NOPROMPT) == 0) { - if (options.autolog) { -- /* Do the auto login */ -+ /* Do the auto login. */ - debug("doing auto login\n"); - do_prompt(&options, &termios); - printf("%s%s (automatic login)\n", LOGIN, options.autolog); -- logname = options.autolog; -- options.logopt = "-f \\u"; -+ username = options.autolog; - } else { - /* Read the login name. */ - debug("reading login name\n"); -- while ((logname = -+ while ((username = - get_logname(&options, &termios, &chardata)) == 0) - if ((options.flags & F_VCONSOLE) == 0) - next_speed(&options, &termios); -@@ -410,13 +409,25 @@ int main(int argc, char **argv) - sigaction(SIGQUIT, &sa_quit, NULL); - sigaction(SIGINT, &sa_int, NULL); - -- *logcmd = '\0'; -- append(logcmd, sizeof(logcmd), NULL, options.login); -- append(logcmd, sizeof(logcmd), " ", options.logopt); -- -- checkname(logname); -- mkarray(logarr, logcmd); -- replacename(logarr, logname); -+ if (username) -+ check_username(username); -+ -+ if (options.logopt) { -+ /* -+ * The --login-options completely overwrites the default -+ * way how agetty composes login(1) command line. -+ */ -+ login_options_to_argv(login_argv, &login_argc, -+ options.logopt, username); -+ } else if (username) { -+ if (options.autolog) -+ login_argv[login_argc++] = "-f"; -+ else -+ login_argv[login_argc++] = "--"; -+ login_argv[login_argc++] = username; -+ } -+ -+ login_argv[login_argc] = NULL; /* last login argv */ - - if (options.chroot) { - if (chroot(options.chroot) < 0) -@@ -435,8 +446,87 @@ int main(int argc, char **argv) - } - - /* Let the login program take care of password validation. */ -- execv(options.login, logarr); -- log_err(_("%s: can't exec %s: %m"), options.tty, options.login); -+ execv(options.login, login_argv); -+ log_err(_("%s: can't exec %s: %m"), options.tty, login_argv[0]); -+} -+ -+/* -+ * Returns : @str if \u not found -+ * : @username if @str equal to "\u" -+ * : newly allocated string if \u mixed with something other -+ */ -+static char *replace_u(char *str, char *username) -+{ -+ char *entry = NULL, *p = str; -+ size_t usz = username ? strlen(username) : 0; -+ -+ while (*p) { -+ size_t sz; -+ char *tp, *old = entry; -+ -+ if (memcmp(p, "\\u", 2)) { -+ p++; -+ continue; /* no \u */ -+ } -+ sz = strlen(str); -+ -+ if (p == str && sz == 2) -+ /* 'str' contains only '\u' */ -+ return username; -+ -+ tp = entry = malloc(sz + usz); -+ if (!tp) -+ log_err(_("failed to allocate memory: %m")); -+ -+ if (p != str) { -+ /* copy chars befor \u */ -+ memcpy(tp, str, p - str); -+ tp += p - str; -+ } -+ if (usz) { -+ /* copy username */ -+ memcpy(tp, username, usz); -+ tp += usz; -+ } -+ if (*(p + 2)) -+ /* copy chars after \u + \0 */ -+ memcpy(tp, p + 2, sz - (p - str) - 1); -+ else -+ *tp = '\0'; -+ -+ p = tp; -+ str = entry; -+ free(old); -+ } -+ -+ return entry ? entry : str; -+} -+ -+static void login_options_to_argv(char *argv[], int *argc, -+ char *str, char *username) -+{ -+ char *p; -+ int i = *argc; -+ -+ while (str && isspace(*str)) -+ str++; -+ p = str; -+ -+ while (p && *p && i < LOGIN_ARGV_MAX) { -+ if (isspace(*p)) { -+ *p = '\0'; -+ while (isspace(*++p)) -+ ; -+ if (*p) { -+ argv[i++] = replace_u(str, username); -+ str = p; -+ } -+ } else -+ p++; -+ } -+ if (str && *str && i < LOGIN_ARGV_MAX) -+ argv[i++] = replace_u(str, username); -+ *argc = i; - } - - /* Parse command-line arguments. */ -@@ -920,7 +1010,7 @@ static void termio_init(struct options * - mode = K_RAW; - switch(mode) { - case K_UNICODE: -- setlocale(LC_CTYPE, "en_US.UTF-8"); -+ setlocale(LC_CTYPE, "C.UTF-8"); - op->flags |= F_UTF8; - break; - case K_RAW: -@@ -977,7 +1067,14 @@ static void termio_init(struct options * - /* Flush input and output queues, important for modems! */ - tcflush(STDIN_FILENO, TCIOFLUSH); - -- tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; -+#ifdef IUTF8 -+ tp->c_iflag = tp->c_iflag & IUTF8; -+ if (tp->c_iflag & IUTF8) -+ op->flags |= F_UTF8; -+#else -+ tp->c_iflag = 0; -+#endif -+ tp->c_lflag = tp->c_oflag = 0; - - if ((op->flags & F_KEEPCFLAGS) == 0) - tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL); -@@ -1826,12 +1923,13 @@ static ssize_t append(char *dest, size_t - - return dsz + ssz + sz; - } -+ - /* - * Do not allow the user to pass an option as a user name - * To be more safe: Use `--' to make sure the rest is - * interpreted as non-options by the program, if it supports it. - */ --static void checkname(const char* nm) -+static void check_username(const char* nm) - { - const char *p = nm; - if (!nm) -@@ -1848,48 +1946,3 @@ err: - log_err("checkname: %m"); - } - --static void replacename(char** arr, const char* nm) --{ -- const char *p; -- char *tmp; -- while ((p = *arr)) { -- const char *p1 = p; -- while (*p1) { -- if (memcmp(p1, "\\u", 2) == 0) { -- tmp = malloc(strlen(p) + strlen(nm)); -- if (!tmp) -- log_err(_("failed to allocate memory: %m")); -- if (p1 != p) -- memcpy(tmp, p, (p1 - p)); -- *(tmp + (p1 - p)) = 0; -- strcat(tmp, nm); -- strcat(tmp, p1+2); -- *arr = tmp; -- } -- p1++; -- } -- arr++; -- } --} -- --static void mkarray(char** arr, char* str) --{ -- char* p = str; -- char* start = p; -- int i = 0; -- -- while (*p && i < ARRAY_SIZE_MAX) { -- if (isspace(*p)) { -- *p = 0; -- while (isspace(*++p)) -- ; -- if (*p) { -- arr[i++] = start; -- start = p; -- } -- } else -- p++; -- } -- arr[i++] = start; -- arr[i++] = (char*) 0; --} diff --git a/util-linux-2.20-rc1-hexdump-segfault.patch b/util-linux-2.20-rc1-hexdump-segfault.patch deleted file mode 100644 index 837ad9f..0000000 --- a/util-linux-2.20-rc1-hexdump-segfault.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 474b1ae3ca463acec0c625fb7076bcc746671479 Mon Sep 17 00:00:00 2001 -From: Petr Uzel -Date: Wed, 10 Aug 2011 15:23:53 +0200 -Subject: [PATCH] hexdump: fix segfault due to uninitialized memory - -util-linux commit 85bf44b714ab184907eb448eba389218956d6a51 -replaced all calls to emalloc() with xmalloc(), whose semantics -is however different - it does not zero allocated memory. This -made hexdump segfault if MALLOC_PERTURB_ was set. - -Reported-by: Kyrill Detinov -Addresses: https://bugzilla.novell.com/show_bug.cgi?id=710877 - -Signed-off-by: Petr Uzel ---- - text-utils/display.c | 4 ++-- - text-utils/parse.c | 6 +++--- - 2 files changed, 5 insertions(+), 5 deletions(-) - -Index: util-linux-2.20-rc1/text-utils/display.c -=================================================================== ---- util-linux-2.20-rc1.orig/text-utils/display.c -+++ util-linux-2.20-rc1/text-utils/display.c -@@ -233,8 +233,8 @@ get(void) - u_char *tmpp; - - if (!curp) { -- curp = xmalloc(blocksize); -- savp = xmalloc(blocksize); -+ curp = xcalloc(1, blocksize); -+ savp = xcalloc(1, blocksize); - } else { - tmpp = curp; - curp = savp; -Index: util-linux-2.20-rc1/text-utils/parse.c -=================================================================== ---- util-linux-2.20-rc1.orig/text-utils/parse.c -+++ util-linux-2.20-rc1/text-utils/parse.c -@@ -86,7 +86,7 @@ void add(const char *fmt) - const char *savep; - - /* Start new linked list of format units. */ -- tfs = xmalloc(sizeof(FS)); -+ tfs = xcalloc(1, sizeof(FS)); - if (!fshead) - fshead = tfs; - else -@@ -102,7 +102,7 @@ void add(const char *fmt) - break; - - /* Allocate a new format unit and link it in. */ -- tfu = xmalloc(sizeof(FU)); -+ tfu = xcalloc(1, sizeof(FU)); - *nextfu = tfu; - nextfu = &tfu->nextfu; - tfu->reps = 1; -@@ -219,7 +219,7 @@ void rewrite(FS *fs) - * conversion character gets its own. - */ - for (nconv = 0, fmtp = fu->fmt; *fmtp; nextpr = &pr->nextpr) { -- pr = xmalloc(sizeof(PR)); -+ pr = xcalloc(1, sizeof(PR)); - if (!fu->nextpr) - fu->nextpr = pr; - else diff --git a/util-linux-2.20-rc1.tar.bz2 b/util-linux-2.20-rc1.tar.bz2 deleted file mode 100644 index 4725f3d..0000000 --- a/util-linux-2.20-rc1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:34edb87c1ae46a54921ea73dc9b07d010d0611cf79ff982f20bfc6841bae2fcc -size 4513042 diff --git a/util-linux-2.20-rc2.tar.bz2 b/util-linux-2.20-rc2.tar.bz2 new file mode 100644 index 0000000..2016dbf --- /dev/null +++ b/util-linux-2.20-rc2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bcdbb6413ef6a83c44e7e79db41cbd8ea7f0990781c12591e4e2339582c4397c +size 4510886 diff --git a/util-linux-fix-manpages.patch b/util-linux-fix-manpages.patch deleted file mode 100644 index ed80344..0000000 --- a/util-linux-fix-manpages.patch +++ /dev/null @@ -1,43 +0,0 @@ -From e20e7ff216288102ae012f6a0e80948e41f59452 Mon Sep 17 00:00:00 2001 -From: Petr Uzel -Date: Mon, 1 Aug 2011 17:42:41 +0200 -Subject: [PATCH] look: fix manpage formatting - - -Signed-off-by: Petr Uzel ---- - misc-utils/look.1 | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -Index: util-linux-2.20-rc1/misc-utils/look.1 -=================================================================== ---- util-linux-2.20-rc1.orig/misc-utils/look.1 -+++ util-linux-2.20-rc1/misc-utils/look.1 -@@ -54,9 +54,9 @@ that - is invoked with). - .PP - If --.Ar file -+.I file - is not specified, the file --.Pa /usr/share/dict/words -+.I /usr/share/dict/words - is used, only alphanumeric characters are compared and the case of - alphabetic characters is ignored. - .SH OPTIONS -Index: util-linux-2.20-rc1/misc-utils/cal.1 -=================================================================== ---- util-linux-2.20-rc1.orig/misc-utils/cal.1 -+++ util-linux-2.20-rc1/misc-utils/cal.1 -@@ -35,9 +35,8 @@ - .\" @(#)cal.1 8.1 (Berkeley) 6/6/93 - .\" - .TH CAL "1" "June 2011" "util-linux" "User Commands" --.Sh NAME --.Nm cal --.Nd displays a calendar -+.SH NAME -+cal \- displays a calendar - .SH SYNOPSIS - .B cal - [\fIoptions\fR] [[[\fIday\fR] \fImonth\fR] \fIyear\fR] diff --git a/util-linux-wall-build-with-pie.patch b/util-linux-wall-build-with-pie.patch deleted file mode 100644 index bbd60bf..0000000 --- a/util-linux-wall-build-with-pie.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 0b8743b58e9755079bc5ffa51e9f66c088322596 Mon Sep 17 00:00:00 2001 -From: Petr Uzel -Date: Tue, 2 Aug 2011 15:18:11 +0200 -Subject: [PATCH] wall: build with SUID_{C,LD}FLAGS - - -Signed-off-by: Petr Uzel ---- - term-utils/Makefile.am | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/term-utils/Makefile.am b/term-utils/Makefile.am -index 7b545c3..b423bbd 100644 ---- a/term-utils/Makefile.am -+++ b/term-utils/Makefile.am -@@ -55,6 +55,8 @@ if BUILD_WALL - usrbin_exec_PROGRAMS += wall - wall_SOURCES = wall.c ttymsg.c ttymsg.h $(top_srcdir)/lib/strutils.c - dist_man_MANS += wall.1 -+wall_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -+wall_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) - endif - - if BUILD_WRITE --- -1.7.3.4 - diff --git a/util-linux.changes b/util-linux.changes index 2250ada..da14590 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Aug 17 10:37:20 UTC 2011 - puzel@novell.com + +- update to util-linux-2.20-rc2 + - bugfixes +- drop patches: + - util-linux-fix-manpages.patch + - util-linux-wall-build-with-pie.patch + - util-linux-2.20-rc1-agetty-fixes.patch + - util-linux-2.20-rc1-hexdump-segfault.patch + - util-linux-2.20-rc-fix-dmesg.patch + ------------------------------------------------------------------- Wed Aug 10 13:42:33 UTC 2011 - puzel@novell.com diff --git a/util-linux.spec b/util-linux.spec index 581ac09..bedbe29 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -19,7 +19,7 @@ %define time_ver 1.7 %define which_ver 2.20 %define adjtimex_ver 1.28 -%define util_linux_tar_ver 2.20-rc1 +%define util_linux_tar_ver 2.20-rc2 Name: util-linux BuildRequires: audit-devel @@ -81,14 +81,7 @@ Source51: blkid.conf Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # crypto patch Patch2: util-linux-2.17.1-mount_losetup_crypto.patch -Patch3: util-linux-fix-manpages.patch -Patch4: util-linux-wall-build-with-pie.patch -# bnc#711240 - squashed 4 upstream patches -Patch5: util-linux-2.20-rc1-agetty-fixes.patch -# bnc#710471 -Patch6: util-linux-2.20-rc-fix-dmesg.patch -# bnc#710877 -Patch7: util-linux-2.20-rc1-hexdump-segfault.patch + ## ## adjtimex ## @@ -189,11 +182,6 @@ Files to develop applications using the libmount library. %setup -q -a 9 -b 11 -b 12 -b 13 -n %{name}-%{util_linux_tar_ver} %patch1 -p1 %patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 # cd adjtimex-* @@ -458,7 +446,6 @@ fi %defattr(-,root,root) %doc login-utils/README.poeigl %doc misc-utils/README.cal -%doc misc-utils/README.namei %doc mount/README.mount %doc hwclock/README.hwclock %doc text-utils/README.col From db735038437901de6cc38d9c41c5a44dc3d7fc00260d09fccbc8dc09e131acf4 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Wed, 17 Aug 2011 12:01:38 +0000 Subject: [PATCH 121/211] Autobuild autoformatter for 79116 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=125 --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index bedbe29..1b16e95 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -32,7 +32,7 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel Version: 2.19.91 -Release: 2 +Release: 4 Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) Provides: fsck-with-dev-lock = %{version} From 0f28f6e813bbe9cbfb6ca709220d3dfbe2eea21c22f4880a1db0bf4eac4e7749 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Fri, 26 Aug 2011 08:33:22 +0000 Subject: [PATCH 122/211] Accepting request 79845 from Base:System - BuildIgnore pwdutils. (forwarded request 79843 from rguenther) OBS-URL: https://build.opensuse.org/request/show/79845 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=126 --- util-linux.changes | 5 +++++ util-linux.spec | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/util-linux.changes b/util-linux.changes index da14590..07d907b 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 25 14:12:15 UTC 2011 - rguenther@novell.com + +- BuildIgnore pwdutils. + ------------------------------------------------------------------- Wed Aug 17 10:37:20 UTC 2011 - puzel@novell.com diff --git a/util-linux.spec b/util-linux.spec index 1b16e95..c2c3f51 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -31,6 +31,12 @@ BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel +# util-linux is a base package and uuidd pre-requiring pwdutils pulls +# that into the core build cycle. pwdutils also pulls in the whole +# ldap stack into it. Avoid this whole mess which is done only to +# make the rpm install check of uuidd happy which has support to work without +# these tools as well +#!BuildIgnore: pwdutils Version: 2.19.91 Release: 4 Url: http://kernel.org/~kzak/util-linux/ From 164325bae6aeea5d82c6d7eb29ea3e409d6bd52b63c8f78bb287028f948f7418 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Fri, 26 Aug 2011 08:33:36 +0000 Subject: [PATCH 123/211] Autobuild autoformatter for 79845 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=127 --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index c2c3f51..42a3317 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -38,7 +38,7 @@ BuildRequires: zlib-devel # these tools as well #!BuildIgnore: pwdutils Version: 2.19.91 -Release: 4 +Release: 6 Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) Provides: fsck-with-dev-lock = %{version} From 91e68c5ae149b1afd6d8102f918ab503ec8729dabac36610311dce6e7ff47ec5 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Tue, 30 Aug 2011 14:05:19 +0000 Subject: [PATCH 124/211] Accepting request 80182 from Base:System - update to util-linux-2.20 - build with --enable-ddate - add util-linux-sfdisk-manpage-fix.patch OBS-URL: https://build.opensuse.org/request/show/80182 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=128 --- util-linux-2.20-rc2.tar.bz2 | 3 --- util-linux-2.20.tar.bz2 | 3 +++ util-linux-sfdisk-manpage-fix.patch | 24 ++++++++++++++++++++++++ util-linux.changes | 8 ++++++++ util-linux.spec | 12 +++++++----- 5 files changed, 42 insertions(+), 8 deletions(-) delete mode 100644 util-linux-2.20-rc2.tar.bz2 create mode 100644 util-linux-2.20.tar.bz2 create mode 100644 util-linux-sfdisk-manpage-fix.patch diff --git a/util-linux-2.20-rc2.tar.bz2 b/util-linux-2.20-rc2.tar.bz2 deleted file mode 100644 index 2016dbf..0000000 --- a/util-linux-2.20-rc2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bcdbb6413ef6a83c44e7e79db41cbd8ea7f0990781c12591e4e2339582c4397c -size 4510886 diff --git a/util-linux-2.20.tar.bz2 b/util-linux-2.20.tar.bz2 new file mode 100644 index 0000000..7d38178 --- /dev/null +++ b/util-linux-2.20.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1cffbf5a1a7a32965f2e8e9ce76336310031e10b87c418d0679075724271d4c +size 4615091 diff --git a/util-linux-sfdisk-manpage-fix.patch b/util-linux-sfdisk-manpage-fix.patch new file mode 100644 index 0000000..63753d4 --- /dev/null +++ b/util-linux-sfdisk-manpage-fix.patch @@ -0,0 +1,24 @@ +From 398e8b40dbca3a5f172485d4701554c2a08e04d6 Mon Sep 17 00:00:00 2001 +From: Petr Uzel +Date: Tue, 30 Aug 2011 10:16:19 +0200 +Subject: [PATCH] sfdisk.8: fix formatting + + +Signed-off-by: Petr Uzel +--- + fdisk/sfdisk.8 | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +Index: util-linux-2.20/fdisk/sfdisk.8 +=================================================================== +--- util-linux-2.20.orig/fdisk/sfdisk.8 ++++ util-linux-2.20/fdisk/sfdisk.8 +@@ -237,7 +237,7 @@ For example: + .fi + first reports that /dev/hdb5 has Id 6, and then changes that into 83. + .TP +-.BR \-u ", " \-\-unit " \fI\letter\fR" ++.BR \-u ", " \-\-unit " \fIletter\fR" + Interpret the input and show the output in the units specified by + .IR letter . + This \fIletter\fR can be one of S, C, B or M, meaning Sectors, Cylinders, diff --git a/util-linux.changes b/util-linux.changes index 07d907b..405f49c 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Aug 29 14:57:57 UTC 2011 - puzel@suse.com + +- update to util-linux-2.20 + - cleanups, bugfixes +- build with --enable-ddate +- add util-linux-sfdisk-manpage-fix.patch + ------------------------------------------------------------------- Thu Aug 25 14:12:15 UTC 2011 - rguenther@novell.com diff --git a/util-linux.spec b/util-linux.spec index 42a3317..ef09f66 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -19,7 +19,6 @@ %define time_ver 1.7 %define which_ver 2.20 %define adjtimex_ver 1.28 -%define util_linux_tar_ver 2.20-rc2 Name: util-linux BuildRequires: audit-devel @@ -31,14 +30,14 @@ BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel +Version: 2.20 +Release: 2 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole # ldap stack into it. Avoid this whole mess which is done only to # make the rpm install check of uuidd happy which has support to work without # these tools as well #!BuildIgnore: pwdutils -Version: 2.19.91 -Release: 6 Url: http://kernel.org/~kzak/util-linux/ Supplements: filesystem(minix) Provides: fsck-with-dev-lock = %{version} @@ -50,7 +49,7 @@ Group: System/Base AutoReqProv: on Recommends: %{name}-lang = %{version} Summary: A collection of basic system utilities -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v20/%{name}-%{util_linux_tar_ver}.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v20/%{name}-%{version}.tar.bz2 Source1: util-linux-rpmlintrc # XXX: make nologin part of login package Source2: nologin.c @@ -87,6 +86,7 @@ Source51: blkid.conf Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # crypto patch Patch2: util-linux-2.17.1-mount_losetup_crypto.patch +Patch3: util-linux-sfdisk-manpage-fix.patch ## ## adjtimex @@ -185,9 +185,10 @@ Files to develop applications using the libmount library. %lang_package %prep -%setup -q -a 9 -b 11 -b 12 -b 13 -n %{name}-%{util_linux_tar_ver} +%setup -q -a 9 -b 11 -b 12 -b 13 %patch1 -p1 %patch2 -p1 +%patch3 -p1 # cd adjtimex-* @@ -262,6 +263,7 @@ CFLAGS="%{optflags}" \ --enable-write \ --enable-line \ --enable-libmount-mount \ + --enable-ddate \ --disable-mountpoint \ --disable-use-tty-group \ --disable-static \ From ba52681a7f165c1583503ec35d515c0bc5554b485e44da4651741b6f8270aa8e Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Tue, 30 Aug 2011 14:05:30 +0000 Subject: [PATCH 125/211] Autobuild autoformatter for 80182 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=129 --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index ef09f66..4bf00df 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -31,7 +31,7 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel Version: 2.20 -Release: 2 +Release: 1 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole # ldap stack into it. Avoid this whole mess which is done only to From 14d3702d44c3371f9f5de8022c7fbe099013533f2f693184bc0e72c4564df08a Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 13 Sep 2011 10:39:05 +0000 Subject: [PATCH 126/211] Accepting request 81983 from Base:System add util-linux-lib-sysfs-deinit.patch (bnc#714151) OBS-URL: https://build.opensuse.org/request/show/81983 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=130 --- util-linux-lib-sysfs-deinit.patch | 29 +++++++++++++++++++++++++++++ util-linux.changes | 5 +++++ util-linux.spec | 2 ++ 3 files changed, 36 insertions(+) create mode 100644 util-linux-lib-sysfs-deinit.patch diff --git a/util-linux-lib-sysfs-deinit.patch b/util-linux-lib-sysfs-deinit.patch new file mode 100644 index 0000000..4fb0b83 --- /dev/null +++ b/util-linux-lib-sysfs-deinit.patch @@ -0,0 +1,29 @@ +From cf06399d6aeb1e558baf2b46b617496ed7aac81c Mon Sep 17 00:00:00 2001 +From: Petr Uzel +Date: Mon, 12 Sep 2011 16:11:41 +0200 +Subject: [PATCH] lib: do not attempt to close(0) in sysfs_deinit() + +If the 'open' fails we 'goto err' which runs 'sysfs_deinit()' on a 'cxt' +which hasn't been fully initialised. The 'dir_fd' is still 0, so +sysfs_deinit calls "close(0)". + +Addresses: https://bugzilla.novell.com/show_bug.cgi?id=714151 +Reported-by: Diego Ercolani +Analysed-by: Neil Brown +Signed-off-by: Petr Uzel +--- + lib/sysfs.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +Index: util-linux-2.20/lib/sysfs.c +=================================================================== +--- util-linux-2.20.orig/lib/sysfs.c ++++ util-linux-2.20/lib/sysfs.c +@@ -140,6 +140,7 @@ int sysfs_init(struct sysfs_cxt *cxt, de + int fd, rc = 0; + + memset(cxt, 0, sizeof(*cxt)); ++ cxt->dir_fd = -1; + + if (!sysfs_devno_path(devno, path, sizeof(path))) + goto err; diff --git a/util-linux.changes b/util-linux.changes index 405f49c..df93052 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 13 09:10:43 UTC 2011 - puzel@suse.com + +- add util-linux-lib-sysfs-deinit.patch (bnc#714151) + ------------------------------------------------------------------- Mon Aug 29 14:57:57 UTC 2011 - puzel@suse.com diff --git a/util-linux.spec b/util-linux.spec index 4bf00df..37b7867 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -87,6 +87,7 @@ Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # crypto patch Patch2: util-linux-2.17.1-mount_losetup_crypto.patch Patch3: util-linux-sfdisk-manpage-fix.patch +Patch4: util-linux-lib-sysfs-deinit.patch ## ## adjtimex @@ -189,6 +190,7 @@ Files to develop applications using the libmount library. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # cd adjtimex-* From b89a351786f8b5d09a9e5d42a4eac55a01f5a9ebd9b9dcb3cf4f1f255df34cc0 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 13 Sep 2011 10:39:13 +0000 Subject: [PATCH 127/211] Autobuild autoformatter for 81983 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=131 --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 37b7867..6691846 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -31,7 +31,7 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel Version: 2.20 -Release: 1 +Release: 4 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole # ldap stack into it. Avoid this whole mess which is done only to From 89bf2acf443b996d2fe32bc16c465f3b937ec80cccf7f87bb2aceeca38e25175 Mon Sep 17 00:00:00 2001 From: Ruediger Oertel Date: Thu, 6 Oct 2011 14:46:34 +0000 Subject: [PATCH 128/211] Accepting request 86716 from Base:System - cross-build fix: use %__cc, %configure macros - set bindir explicitly when installing - (cross-?)build fix: disable build dependency on SELINUX_LIBS in libmount (forwarded request 86523 from uli_suse) OBS-URL: https://build.opensuse.org/request/show/86716 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=132 --- util-linux-2.20-libmount-deps.patch | 13 +++++++++++++ util-linux.changes | 8 ++++++++ util-linux.spec | 27 +++++++++++++++------------ 3 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 util-linux-2.20-libmount-deps.patch diff --git a/util-linux-2.20-libmount-deps.patch b/util-linux-2.20-libmount-deps.patch new file mode 100644 index 0000000..55a2ad2 --- /dev/null +++ b/util-linux-2.20-libmount-deps.patch @@ -0,0 +1,13 @@ +Index: util-linux-2.20/libmount/src/Makefile.am +=================================================================== +--- util-linux-2.20.orig/libmount/src/Makefile.am ++++ util-linux-2.20/libmount/src/Makefile.am +@@ -29,7 +29,7 @@ nodist_libmount_la_SOURCES = mountP.h + + libmount_la_LIBADD = $(ul_libblkid_la) $(SELINUX_LIBS) + +-libmount_la_DEPENDENCIES = $(libmount_la_LIBADD) libmount.sym libmount.h.in ++libmount_la_DEPENDENCIES = $(ul_libblkid_la) libmount.sym libmount.h.in + + libmount_la_LDFLAGS = -Wl,--version-script=$(ul_libmount_srcdir)/libmount.sym \ + -version-info $(LIBMOUNT_VERSION_INFO) diff --git a/util-linux.changes b/util-linux.changes index df93052..e8953e1 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Oct 4 11:32:11 UTC 2011 - uli@suse.com + +- cross-build fix: use %__cc, %configure macros +- set bindir explicitly when installing +- (cross-?)build fix: disable build dependency on SELINUX_LIBS + in libmount + ------------------------------------------------------------------- Tue Sep 13 09:10:43 UTC 2011 - puzel@suse.com diff --git a/util-linux.spec b/util-linux.spec index 6691846..4309d4c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -88,6 +88,7 @@ Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch2: util-linux-2.17.1-mount_losetup_crypto.patch Patch3: util-linux-sfdisk-manpage-fix.patch Patch4: util-linux-lib-sysfs-deinit.patch +Patch5: util-linux-2.20-libmount-deps.patch ## ## adjtimex @@ -191,6 +192,7 @@ Files to develop applications using the libmount library. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # cd adjtimex-* @@ -211,7 +213,7 @@ cd ../which-* %build # adjtimex build cd adjtimex-%{adjtimex_ver} -CFLAGS="%{optflags}" ./configure +%configure make %{?_smp_mflags} cd .. pushd ../ @@ -221,7 +223,7 @@ aclocal --force autoconf --force automake --force-missing --add-missing --foreign %{?suse_update_config:%{suse_update_config}} -CFLAGS="%{optflags}" ./configure --prefix=/usr \ +%configure --prefix=/usr \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ %{_target_cpu}-suse-linux @@ -230,8 +232,9 @@ cd .. # time build cd time-%{time_ver} %{?suse_update_config:%{suse_update_config}} -CFLAGS="%{optflags} -D_GNU_SOURCE " INSTALL_PROGRAM='$(INSTALL)' \ - ./configure --prefix=/usr \ +export CFLAGS="%{optflags} -D_GNU_SOURCE " +export INSTALL_PROGRAM='$(INSTALL)' +%configure --prefix=/usr \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ %{_target_cpu}-suse-linux @@ -239,19 +242,18 @@ make %{?_smp_mflags} cd .. # klogconsole build cd klogconsole -make %{?_smp_mflags} CFLAGS="%{optflags}" +make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" cd .. popd # setctsid build rm -f setctsid -make %{?_smp_mflags} setctsid CFLAGS="%{optflags}" +make %{?_smp_mflags} setctsid CFLAGS="%{optflags}" CC="%{__cc}" # # util-linux itself # autoreconf -fi export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" -CFLAGS="%{optflags}" \ %configure \ --bindir=/bin \ --sbindir=/sbin \ @@ -269,13 +271,13 @@ CFLAGS="%{optflags}" \ --disable-mountpoint \ --disable-use-tty-group \ --disable-static \ - --disable-silent-rules + --disable-silent-rules --disable-rpath # make %{?_smp_mflags} # -gcc %{optflags} -o nologin nologin.c -gcc %{optflags} -o mkzimage_cmdline %{S:29} -gcc %{optflags} -o chrp-addnote %{SOURCE31} +%{__cc} %{optflags} -o nologin nologin.c +%{__cc} %{optflags} -o mkzimage_cmdline %{S:29} +%{__cc} %{optflags} -o chrp-addnote %{SOURCE31} %check cd ../time-%{time_ver} @@ -305,7 +307,8 @@ mkdir -p %{buildroot}%{_defaultdocdir}/time make install DESTDIR=%{buildroot} \ prefix=%{buildroot}/usr \ infodir=%{buildroot}%{_infodir} \ - mandir=%{buildroot}%{_mandir} + mandir=%{buildroot}%{_mandir} \ + bindir=%{buildroot}%{_bindir} install -m 0644 README %{buildroot}%{_defaultdocdir}/time/ install -m 0644 AUTHORS %{buildroot}%{_defaultdocdir}/time/ install -m 0644 COPYING %{buildroot}%{_defaultdocdir}/time/ From 883bd682514e0fc602c1a1467a9304e4f007bb838b68081ad47e5aa6604b1a39 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Wed, 12 Oct 2011 14:16:50 +0000 Subject: [PATCH 129/211] Accepting request 87483 from Base:System - add fdisk-dont-shorten-long-path-to-disk.patch (bnc#722959) OBS-URL: https://build.opensuse.org/request/show/87483 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=133 --- fdisk-dont-shorten-long-path-to-disk.patch | 32 ++++++++++++++++++++++ util-linux.changes | 5 ++++ util-linux.spec | 2 ++ 3 files changed, 39 insertions(+) create mode 100644 fdisk-dont-shorten-long-path-to-disk.patch diff --git a/fdisk-dont-shorten-long-path-to-disk.patch b/fdisk-dont-shorten-long-path-to-disk.patch new file mode 100644 index 0000000..d31015c --- /dev/null +++ b/fdisk-dont-shorten-long-path-to-disk.patch @@ -0,0 +1,32 @@ +From 8176a344041c7a2b7bf6f05353bf9414c9d3b254 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 12 Oct 2011 10:15:58 +0200 +Subject: [PATCH] fdisk: don't shorten long path to disk device + +Reported-by: Petr Uzel +Signed-off-by: Karel Zak +Signed-off-by: Petr Uzel +--- + fdisk/partname.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +Index: util-linux-2.20/fdisk/partname.c +=================================================================== +--- util-linux-2.20.orig/fdisk/partname.c ++++ util-linux-2.20/fdisk/partname.c +@@ -5,13 +5,14 @@ + #include "blkdev.h" + #include "pathnames.h" + #include "common.h" ++#include "c.h" + + /* + * return partition name - uses static storage unless buf is supplied + */ + char * + partname(char *dev, int pno, int lth) { +- static char bufp[80]; ++ static char bufp[PATH_MAX]; + char *p; + int w, wp; + diff --git a/util-linux.changes b/util-linux.changes index e8953e1..fa8b20a 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 12 09:26:40 UTC 2011 - puzel@suse.com + +- add fdisk-dont-shorten-long-path-to-disk.patch (bnc#722959) + ------------------------------------------------------------------- Tue Oct 4 11:32:11 UTC 2011 - uli@suse.com diff --git a/util-linux.spec b/util-linux.spec index 4309d4c..162c228 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -89,6 +89,7 @@ Patch2: util-linux-2.17.1-mount_losetup_crypto.patch Patch3: util-linux-sfdisk-manpage-fix.patch Patch4: util-linux-lib-sysfs-deinit.patch Patch5: util-linux-2.20-libmount-deps.patch +Patch6: fdisk-dont-shorten-long-path-to-disk.patch ## ## adjtimex @@ -193,6 +194,7 @@ Files to develop applications using the libmount library. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 # cd adjtimex-* From 41eb09745d54cb14b2f67cde51633d14328e50fc77db52b0bf20c112024f9d8e Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 21 Oct 2011 14:44:31 +0000 Subject: [PATCH 130/211] Accepting request 88850 from Base:System update to 2.20.1 OBS-URL: https://build.opensuse.org/request/show/88850 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=135 --- fdisk-dont-shorten-long-path-to-disk.patch | 32 ---------------------- util-linux-2.20.1.tar.bz2 | 3 ++ util-linux-2.20.tar.bz2 | 3 -- util-linux-lib-sysfs-deinit.patch | 29 -------------------- util-linux-sfdisk-manpage-fix.patch | 24 ---------------- util-linux.changes | 10 +++++++ util-linux.spec | 8 +----- 7 files changed, 14 insertions(+), 95 deletions(-) delete mode 100644 fdisk-dont-shorten-long-path-to-disk.patch create mode 100644 util-linux-2.20.1.tar.bz2 delete mode 100644 util-linux-2.20.tar.bz2 delete mode 100644 util-linux-lib-sysfs-deinit.patch delete mode 100644 util-linux-sfdisk-manpage-fix.patch diff --git a/fdisk-dont-shorten-long-path-to-disk.patch b/fdisk-dont-shorten-long-path-to-disk.patch deleted file mode 100644 index d31015c..0000000 --- a/fdisk-dont-shorten-long-path-to-disk.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 8176a344041c7a2b7bf6f05353bf9414c9d3b254 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 12 Oct 2011 10:15:58 +0200 -Subject: [PATCH] fdisk: don't shorten long path to disk device - -Reported-by: Petr Uzel -Signed-off-by: Karel Zak -Signed-off-by: Petr Uzel ---- - fdisk/partname.c | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) - -Index: util-linux-2.20/fdisk/partname.c -=================================================================== ---- util-linux-2.20.orig/fdisk/partname.c -+++ util-linux-2.20/fdisk/partname.c -@@ -5,13 +5,14 @@ - #include "blkdev.h" - #include "pathnames.h" - #include "common.h" -+#include "c.h" - - /* - * return partition name - uses static storage unless buf is supplied - */ - char * - partname(char *dev, int pno, int lth) { -- static char bufp[80]; -+ static char bufp[PATH_MAX]; - char *p; - int w, wp; - diff --git a/util-linux-2.20.1.tar.bz2 b/util-linux-2.20.1.tar.bz2 new file mode 100644 index 0000000..0da3679 --- /dev/null +++ b/util-linux-2.20.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d16ebcda3e64ab88ed363d9c1242cdb7ccfd5e1f56c83d0c3b0638c23793bbe0 +size 4614302 diff --git a/util-linux-2.20.tar.bz2 b/util-linux-2.20.tar.bz2 deleted file mode 100644 index 7d38178..0000000 --- a/util-linux-2.20.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c1cffbf5a1a7a32965f2e8e9ce76336310031e10b87c418d0679075724271d4c -size 4615091 diff --git a/util-linux-lib-sysfs-deinit.patch b/util-linux-lib-sysfs-deinit.patch deleted file mode 100644 index 4fb0b83..0000000 --- a/util-linux-lib-sysfs-deinit.patch +++ /dev/null @@ -1,29 +0,0 @@ -From cf06399d6aeb1e558baf2b46b617496ed7aac81c Mon Sep 17 00:00:00 2001 -From: Petr Uzel -Date: Mon, 12 Sep 2011 16:11:41 +0200 -Subject: [PATCH] lib: do not attempt to close(0) in sysfs_deinit() - -If the 'open' fails we 'goto err' which runs 'sysfs_deinit()' on a 'cxt' -which hasn't been fully initialised. The 'dir_fd' is still 0, so -sysfs_deinit calls "close(0)". - -Addresses: https://bugzilla.novell.com/show_bug.cgi?id=714151 -Reported-by: Diego Ercolani -Analysed-by: Neil Brown -Signed-off-by: Petr Uzel ---- - lib/sysfs.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -Index: util-linux-2.20/lib/sysfs.c -=================================================================== ---- util-linux-2.20.orig/lib/sysfs.c -+++ util-linux-2.20/lib/sysfs.c -@@ -140,6 +140,7 @@ int sysfs_init(struct sysfs_cxt *cxt, de - int fd, rc = 0; - - memset(cxt, 0, sizeof(*cxt)); -+ cxt->dir_fd = -1; - - if (!sysfs_devno_path(devno, path, sizeof(path))) - goto err; diff --git a/util-linux-sfdisk-manpage-fix.patch b/util-linux-sfdisk-manpage-fix.patch deleted file mode 100644 index 63753d4..0000000 --- a/util-linux-sfdisk-manpage-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 398e8b40dbca3a5f172485d4701554c2a08e04d6 Mon Sep 17 00:00:00 2001 -From: Petr Uzel -Date: Tue, 30 Aug 2011 10:16:19 +0200 -Subject: [PATCH] sfdisk.8: fix formatting - - -Signed-off-by: Petr Uzel ---- - fdisk/sfdisk.8 | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -Index: util-linux-2.20/fdisk/sfdisk.8 -=================================================================== ---- util-linux-2.20.orig/fdisk/sfdisk.8 -+++ util-linux-2.20/fdisk/sfdisk.8 -@@ -237,7 +237,7 @@ For example: - .fi - first reports that /dev/hdb5 has Id 6, and then changes that into 83. - .TP --.BR \-u ", " \-\-unit " \fI\letter\fR" -+.BR \-u ", " \-\-unit " \fIletter\fR" - Interpret the input and show the output in the units specified by - .IR letter . - This \fIletter\fR can be one of S, C, B or M, meaning Sectors, Cylinders, diff --git a/util-linux.changes b/util-linux.changes index fa8b20a..f1e31e0 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Oct 20 13:01:22 UTC 2011 - puzel@suse.com + +- update to util-linux-2.20.1 + - bugfix release +- drop patches (in upstream): + - util-linux-sfdisk-manpage-fix.patch + - util-linux-lib-sysfs-deinit.patch + - fdisk-dont-shorten-long-path-to-disk.patch + ------------------------------------------------------------------- Wed Oct 12 09:26:40 UTC 2011 - puzel@suse.com diff --git a/util-linux.spec b/util-linux.spec index 162c228..2672a60 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -30,7 +30,7 @@ BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel -Version: 2.20 +Version: 2.20.1 Release: 4 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -86,10 +86,7 @@ Source51: blkid.conf Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # crypto patch Patch2: util-linux-2.17.1-mount_losetup_crypto.patch -Patch3: util-linux-sfdisk-manpage-fix.patch -Patch4: util-linux-lib-sysfs-deinit.patch Patch5: util-linux-2.20-libmount-deps.patch -Patch6: fdisk-dont-shorten-long-path-to-disk.patch ## ## adjtimex @@ -191,10 +188,7 @@ Files to develop applications using the libmount library. %setup -q -a 9 -b 11 -b 12 -b 13 %patch1 -p1 %patch2 -p1 -%patch3 -p1 -%patch4 -p1 %patch5 -p1 -%patch6 -p1 # cd adjtimex-* From cac3f92aa1b23766b68899bdaf87bb2a4ee47af6d522236d89f2b5c0f9b2af6d Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 2 Nov 2011 11:19:58 +0000 Subject: [PATCH 131/211] Accepting request 89918 from Base:System Please take this to 12.1. Thanks. add util-linux-dmesg-fix-printing-of-multibyte-characters.patch (bnc#725993) OBS-URL: https://build.opensuse.org/request/show/89918 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=136 --- ...fix-printing-of-multibyte-characters.patch | 52 +++++++++++++++++++ util-linux.changes | 6 +++ util-linux.spec | 2 + 3 files changed, 60 insertions(+) create mode 100644 util-linux-dmesg-fix-printing-of-multibyte-characters.patch diff --git a/util-linux-dmesg-fix-printing-of-multibyte-characters.patch b/util-linux-dmesg-fix-printing-of-multibyte-characters.patch new file mode 100644 index 0000000..00913de --- /dev/null +++ b/util-linux-dmesg-fix-printing-of-multibyte-characters.patch @@ -0,0 +1,52 @@ +From 131b477b61c7eb82aef913bae5aec63f019b7076 Mon Sep 17 00:00:00 2001 +From: Petr Uzel +Date: Tue, 1 Nov 2011 16:17:57 +0100 +Subject: [PATCH] dmesg: fix printing of multibyte characters + +Also make it compile if HAVE_WIDECHAR is not defined. + +Addresses: https://bugzilla.novell.com/show_bug.cgi?id=725993 +Reported-by: Harald Koenig +Signed-off-by: Petr Uzel +--- + sys-utils/dmesg.c | 16 ++++++++-------- + 1 files changed, 8 insertions(+), 8 deletions(-) + +Index: util-linux-2.20.1/sys-utils/dmesg.c +=================================================================== +--- util-linux-2.20.1.orig/sys-utils/dmesg.c ++++ util-linux-2.20.1/sys-utils/dmesg.c +@@ -391,10 +391,11 @@ static void safe_fwrite(const char *buf, + for (i = 0; i < size; i++) { + const char *p = buf + i; + int rc, hex = 0; ++ size_t len = 1; + + #ifdef HAVE_WIDECHAR + wchar_t wc; +- size_t len = mbrtowc(&wc, p, size - i, &s); ++ len = mbrtowc(&wc, p, size - i, &s); + + if (len == 0) /* L'\0' */ + return; +@@ -402,16 +403,15 @@ static void safe_fwrite(const char *buf, + if (len == (size_t)-1 || len == (size_t)-2) { /* invalid sequence */ + memset(&s, 0, sizeof (s)); + len = hex = 1; +- + } else if (len > 1 && !iswprint(wc)) { /* non-printable multibyte */ + hex = 1; +- } else +-#endif +- { ++ } ++ i += len - 1; ++#else + if (!isprint((unsigned int) *p) && + !isspace((unsigned int) *p)) /* non-printable */ + hex = 1; +- } ++#endif + if (hex) + rc = fwrite_hex(p, len, out); + else diff --git a/util-linux.changes b/util-linux.changes index f1e31e0..13e6a46 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 2 09:37:12 UTC 2011 - puzel@suse.com + +- add util-linux-dmesg-fix-printing-of-multibyte-characters.patch + (bnc#725993) + ------------------------------------------------------------------- Thu Oct 20 13:01:22 UTC 2011 - puzel@suse.com diff --git a/util-linux.spec b/util-linux.spec index 2672a60..9900642 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -87,6 +87,7 @@ Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # crypto patch Patch2: util-linux-2.17.1-mount_losetup_crypto.patch Patch5: util-linux-2.20-libmount-deps.patch +Patch6: util-linux-dmesg-fix-printing-of-multibyte-characters.patch ## ## adjtimex @@ -189,6 +190,7 @@ Files to develop applications using the libmount library. %patch1 -p1 %patch2 -p1 %patch5 -p1 +%patch6 -p1 # cd adjtimex-* From 0c88c0aee9bbffaca4f12838187a761e70ced897384337c1020b26e2eb763570 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 8 Nov 2011 16:54:49 +0000 Subject: [PATCH 132/211] Accepting request 90521 from Base:System Please, take this also to 12.1. Thanks. add fsck-use-FS-blacklist-for-non-all-mode-too.patch (bnc#728645) OBS-URL: https://build.opensuse.org/request/show/90521 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=137 --- ...se-FS-blacklist-for-non-all-mode-too.patch | 94 +++++++++++++++++++ util-linux.changes | 5 + util-linux.spec | 2 + 3 files changed, 101 insertions(+) create mode 100644 fsck-use-FS-blacklist-for-non-all-mode-too.patch diff --git a/fsck-use-FS-blacklist-for-non-all-mode-too.patch b/fsck-use-FS-blacklist-for-non-all-mode-too.patch new file mode 100644 index 0000000..398e091 --- /dev/null +++ b/fsck-use-FS-blacklist-for-non-all-mode-too.patch @@ -0,0 +1,94 @@ +From e31741980762744352890d37522cbf4dd0ced9c4 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 2 Nov 2011 15:51:45 +0100 +Subject: [PATCH] fsck: use FS blacklist for non-all mode too + +Reported-by: Lennart Poettering +Signed-off-by: Karel Zak +Signed-off-by: Petr Uzel +--- + fsck/fsck.c | 43 +++++++++++++++++++++++++++++++++++++++---- + 1 files changed, 39 insertions(+), 4 deletions(-) + +Index: util-linux-2.20.1/fsck/fsck.c +=================================================================== +--- util-linux-2.20.1.orig/fsck/fsck.c ++++ util-linux-2.20.1/fsck/fsck.c +@@ -57,14 +57,35 @@ + #include "xalloc.h" + + static const char *ignored_types[] = { ++ "9p", ++ "afs", ++ "autofs", ++ "binfmt_misc", ++ "cgroup", ++ "cifs", ++ "cpuset", ++ "debugfs", ++ "devfs", ++ "devpts", ++ "devtmpfs", ++ "dlmfs", ++ "fusectl", ++ "fuse.gvfs-fuse-daemon", ++ "hugetlbfs", + "ignore", + "iso9660", ++ "mqueue" ++ "ncpfs", + "nfs", + "proc", ++ "rpc_pipefs", ++ "securityfs", ++ "smbfs", ++ "spufs", + "sw", + "swap", ++ "sysfs", + "tmpfs", +- "devpts", + NULL + }; + +@@ -953,6 +974,18 @@ static int device_exists(const char *dev + return 1; + } + ++static int ignored_type(const char *fstype) ++{ ++ const char **ip; ++ ++ for(ip = ignored_types; *ip; ip++) { ++ if (strcmp(fstype, *ip) == 0) ++ return 1; ++ } ++ ++ return 0; ++} ++ + /* Check if we should ignore this filesystem. */ + static int ignore(struct fs_info *fs) + { +@@ -1000,8 +1033,8 @@ static int ignore(struct fs_info *fs) + if (!fs_match(fs, &fs_type_compiled)) return 1; + + /* Are we ignoring this type? */ +- for(ip = ignored_types; *ip; ip++) +- if (strcmp(fs->type, *ip) == 0) return 1; ++ if (fs->type && ignored_type(fs->type)) ++ return 1; + + /* Do we really really want to check this fs? */ + for(ip = really_wanted; *ip; ip++) +@@ -1461,7 +1494,9 @@ int main(int argc, char *argv[]) + 0, -1, -1); + if (!fs) + continue; +- } ++ } else if (fs->type && ignored_type(fs->type)) ++ continue; ++ + if (ignore_mounted && is_mounted(fs->device)) + continue; + status |= fsck_device(fs, interactive); diff --git a/util-linux.changes b/util-linux.changes index 13e6a46..bbe4cdd 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 8 09:36:41 UTC 2011 - puzel@suse.com + +- add fsck-use-FS-blacklist-for-non-all-mode-too.patch (bnc#728645) + ------------------------------------------------------------------- Wed Nov 2 09:37:12 UTC 2011 - puzel@suse.com diff --git a/util-linux.spec b/util-linux.spec index 9900642..b025301 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -88,6 +88,7 @@ Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch2: util-linux-2.17.1-mount_losetup_crypto.patch Patch5: util-linux-2.20-libmount-deps.patch Patch6: util-linux-dmesg-fix-printing-of-multibyte-characters.patch +Patch7: fsck-use-FS-blacklist-for-non-all-mode-too.patch ## ## adjtimex @@ -191,6 +192,7 @@ Files to develop applications using the libmount library. %patch2 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 # cd adjtimex-* From c11d7f182f8082058da191a54379cedab64cb72a332a57154987a418fcc9c864 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 10 Nov 2011 15:06:45 +0000 Subject: [PATCH 133/211] Accepting request 90738 from Base:System Worth adding to 12.1 IMHO. Thanks. - add libmount-ignore-tailing-slash-in-netfs-source-paths.patch and libmount-fix-chdir-to-parent-for-restricted-user-umo.patch: fix umounting network filesystems as plain user (bnc#728480) OBS-URL: https://build.opensuse.org/request/show/90738 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=138 --- ...ir-to-parent-for-restricted-user-umo.patch | 99 ++++++++ ...-tailing-slash-in-netfs-source-paths.patch | 218 ++++++++++++++++++ util-linux.changes | 7 + util-linux.spec | 4 + 4 files changed, 328 insertions(+) create mode 100644 libmount-fix-chdir-to-parent-for-restricted-user-umo.patch create mode 100644 libmount-ignore-tailing-slash-in-netfs-source-paths.patch diff --git a/libmount-fix-chdir-to-parent-for-restricted-user-umo.patch b/libmount-fix-chdir-to-parent-for-restricted-user-umo.patch new file mode 100644 index 0000000..994ac0d --- /dev/null +++ b/libmount-fix-chdir-to-parent-for-restricted-user-umo.patch @@ -0,0 +1,99 @@ +From 6107377322d5d6866c3aa363def656fdf68311e6 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 8 Nov 2011 21:47:23 +0100 +Subject: [PATCH] libmount: fix chdir to parent for restricted (user) umounts + +Reported-by: Petr Uzel +Signed-off-by: Karel Zak +Signed-off-by: Petr Uzel +--- + libmount/src/utils.c | 41 +++++++++++++++++++++++++---------------- + 1 files changed, 25 insertions(+), 16 deletions(-) + +Index: util-linux-2.20.1/libmount/src/utils.c +=================================================================== +--- util-linux-2.20.1.orig/libmount/src/utils.c ++++ util-linux-2.20.1/libmount/src/utils.c +@@ -62,34 +62,40 @@ static char *stripoff_last_component(cha + if (!p) + return NULL; + *p = '\0'; +- return ++p; ++ return p + 1; + } + +-/* Note that the @target has to be absolute path (so at least "/") ++/* ++ * Note that the @target has to be absolute path (so at least "/"). The ++ * @filename returns allocated buffer with last path component, for example: ++ * ++ * mnt_chdir_to_parent("/mnt/test", &buf) ==> chdir("/mnt"), buf="test" + */ + int mnt_chdir_to_parent(const char *target, char **filename) + { +- char *path, *last = NULL; ++ char *buf, *parent, *last = NULL; + char cwd[PATH_MAX]; + int rc = -EINVAL; + + if (!target || *target != '/') + return -EINVAL; + +- path = strdup(target); +- if (!path) ++ DBG(UTILS, mnt_debug("moving to %s parent", target)); ++ ++ buf = strdup(target); ++ if (!buf) + return -ENOMEM; + +- if (*(path + 1) != '\0') { +- last = stripoff_last_component(path); ++ if (*(buf + 1) != '\0') { ++ last = stripoff_last_component(buf); + if (!last) + goto err; + } +- if (!*path) +- *path = '/'; /* root */ + +- if (chdir(path) == -1) { +- DBG(UTILS, mnt_debug("failed to chdir to %s: %m", path)); ++ parent = buf && *buf ? buf : "/"; ++ ++ if (chdir(parent) == -1) { ++ DBG(UTILS, mnt_debug("failed to chdir to %s: %m", parent)); + rc = -errno; + goto err; + } +@@ -98,14 +104,17 @@ int mnt_chdir_to_parent(const char *targ + rc = -errno; + goto err; + } +- if (strcmp(cwd, path) != 0) { +- DBG(UTILS, mnt_debug("path moved (%s -> %s)", path, cwd)); ++ if (strcmp(cwd, parent) != 0) { ++ DBG(UTILS, mnt_debug( ++ "unexpected chdir (expected=%s, cwd=%s)", parent, cwd)); + goto err; + } + +- DBG(CXT, mnt_debug("current directory moved to %s", path)); ++ DBG(CXT, mnt_debug( ++ "current directory moved to %s [last_component='%s']", ++ parent, last)); + +- *filename = path; ++ *filename = buf; + + if (!last || !*last) + memcpy(*filename, ".", 2); +@@ -113,7 +122,7 @@ int mnt_chdir_to_parent(const char *targ + memcpy(*filename, last, strlen(last) + 1); + return 0; + err: +- free(path); ++ free(buf); + return rc; + } + diff --git a/libmount-ignore-tailing-slash-in-netfs-source-paths.patch b/libmount-ignore-tailing-slash-in-netfs-source-paths.patch new file mode 100644 index 0000000..d39b533 --- /dev/null +++ b/libmount-ignore-tailing-slash-in-netfs-source-paths.patch @@ -0,0 +1,218 @@ +From b106d052383083b80c0dc41f1555d2661db00374 Mon Sep 17 00:00:00 2001 +From: Petr Uzel +Date: Tue, 8 Nov 2011 16:25:01 +0100 +Subject: [PATCH] libmount: ignore tailing slash in netfs source paths + +Addresses: https://bugzilla.novell.com/show_bug.cgi?id=728480 +Signed-off-by: Petr Uzel +Signed-off-by: Karel Zak +--- + include/strutils.h | 2 ++ + lib/strutils.c | 32 ++++++++++++++++++++++++++++++++ + libmount/src/fs.c | 5 +++-- + libmount/src/tab.c | 17 ++++++++++++----- + libmount/src/tab_parse.c | 11 +++++++++-- + mount/fstab.c | 3 ++- + 6 files changed, 60 insertions(+), 10 deletions(-) + +Index: util-linux-2.20.1/include/strutils.h +=================================================================== +--- util-linux-2.20.1.orig/include/strutils.h ++++ util-linux-2.20.1/include/strutils.h +@@ -44,4 +44,6 @@ extern int string_to_idarray(const char + extern int string_to_bitarray(const char *list, char *ary, + int (*name2bit)(const char *, size_t)); + ++extern int streq_except_trailing_slash(const char *s1, const char *s2); ++ + #endif +Index: util-linux-2.20.1/lib/strutils.c +=================================================================== +--- util-linux-2.20.1.orig/lib/strutils.c ++++ util-linux-2.20.1/lib/strutils.c +@@ -437,6 +437,40 @@ int string_to_bitarray(const char *list, + return 0; + } + ++ ++/* ++ * Compare two strings for equality, ignoring at most one trailing ++ * slash. ++ */ ++int streq_except_trailing_slash(const char *s1, const char *s2) ++{ ++ int equal; ++ ++ if (!s1 && !s2) ++ return 1; ++ if (!s1 || !s2) ++ return 0; ++ ++ equal = !strcmp(s1, s2); ++ ++ if (!equal) { ++ size_t len1 = strlen(s1); ++ size_t len2 = strlen(s2); ++ ++ if (len1 && *(s1 + len1 - 1) == '/') ++ len1--; ++ if (len2 && *(s2 + len2 - 1) == '/') ++ len2--; ++ if (len1 != len2) ++ return 0; ++ ++ equal = !strncmp(s1, s2, len1); ++ } ++ ++ return equal; ++} ++ ++ + #ifdef TEST_PROGRAM + + int main(int argc, char *argv[]) +Index: util-linux-2.20.1/libmount/src/fs.c +=================================================================== +--- util-linux-2.20.1.orig/libmount/src/fs.c ++++ util-linux-2.20.1/libmount/src/fs.c +@@ -16,6 +16,7 @@ + #include + + #include "mountP.h" ++#include "strutils.h" + + /** + * mnt_new_fs: +@@ -1142,7 +1143,7 @@ int mnt_fs_match_source(struct libmnt_fs + return 0; + + /* 1) native paths/tags */ +- if (!strcmp(source, fs->source)) ++ if (streq_except_trailing_slash(source, fs->source)) + return 1; + + if (!cache) +@@ -1156,7 +1157,7 @@ int mnt_fs_match_source(struct libmnt_fs + + /* 2) canonicalized and native */ + src = mnt_fs_get_srcpath(fs); +- if (src && !strcmp(cn, src)) ++ if (src && streq_except_trailing_slash(cn, src)) + return 1; + + /* 3) canonicalized and canonicalized */ +Index: util-linux-2.20.1/libmount/src/tab.c +=================================================================== +--- util-linux-2.20.1.orig/libmount/src/tab.c ++++ util-linux-2.20.1/libmount/src/tab.c +@@ -44,6 +44,7 @@ + #include + + #include "mountP.h" ++#include "strutils.h" + + /** + * mnt_new_table: +@@ -506,7 +507,7 @@ struct libmnt_fs *mnt_table_find_srcpath + + if (path == NULL && src == NULL) + return fs; /* source is "none" */ +- if (p && strcmp(p, path) == 0) ++ if (path && p && streq_except_trailing_slash(p, path)) + return fs; + if (!p && src) + ntags++; /* mnt_fs_get_srcpath() returs nothing, it's TAG */ +@@ -520,7 +521,7 @@ struct libmnt_fs *mnt_table_find_srcpath + mnt_reset_iter(&itr, direction); + while(mnt_table_next_fs(tb, &itr, &fs) == 0) { + p = mnt_fs_get_srcpath(fs); +- if (p && strcmp(p, cn) == 0) ++ if (p && streq_except_trailing_slash(p, cn)) + return fs; + } + } +@@ -551,7 +552,7 @@ struct libmnt_fs *mnt_table_find_srcpath + if (mnt_fs_get_tag(fs, &t, &v)) + continue; + x = mnt_resolve_tag(t, v, tb->cache); +- if (x && !strcmp(x, cn)) ++ if (x && streq_except_trailing_slash(x, cn)) + return fs; + } + } +@@ -566,7 +567,7 @@ struct libmnt_fs *mnt_table_find_srcpath + p = mnt_fs_get_srcpath(fs); + if (p) + p = mnt_resolve_path(p, tb->cache); +- if (p && strcmp(cn, p) == 0) ++ if (p && streq_except_trailing_slash(cn, p)) + return fs; + } + } +@@ -856,8 +857,14 @@ int mnt_table_is_fs_mounted(struct libmn + *t = mnt_fs_get_target(fs), + *r = mnt_fs_get_root(fs); + +- if (s && t && r && !strcmp(t, tgt) && +- !strcmp(s, src) && !strcmp(r, root)) ++ /* ++ * Note that kernel can add tailing slash to the ++ * network filesystem source paths. ++ */ ++ if (t && s && r && ++ strcmp(t, tgt) == 0 && ++ streq_except_trailing_slash(s, src) && ++ strcmp(r, root) == 0) + break; + } + if (fs) +Index: util-linux-2.20.1/libmount/src/tab_parse.c +=================================================================== +--- util-linux-2.20.1.orig/libmount/src/tab_parse.c ++++ util-linux-2.20.1/libmount/src/tab_parse.c +@@ -14,6 +14,7 @@ + #include "mangle.h" + #include "mountP.h" + #include "pathnames.h" ++#include "strutils.h" + + static inline char *skip_spaces(char *s) + { +@@ -654,8 +655,14 @@ static struct libmnt_fs *mnt_table_merge + if (fs->flags & MNT_FS_MERGED) + continue; + +- if (s && t && r && !strcmp(t, target) && +- !strcmp(s, src) && !strcmp(r, root)) ++ /* ++ * Note that kernel can add tailing slash to the network ++ * filesystem source path ++ */ ++ if (s && t && r && ++ strcmp(t, target) == 0 && ++ streq_except_trailing_slash(s, src) && ++ strcmp(r, root) == 0) + break; + } + +Index: util-linux-2.20.1/mount/fstab.c +=================================================================== +--- util-linux-2.20.1.orig/mount/fstab.c ++++ util-linux-2.20.1/mount/fstab.c +@@ -20,6 +20,7 @@ + #include "pathnames.h" + #include "nls.h" + #include "usleep.h" ++#include "strutils.h" + + #define streq(s, t) (strcmp ((s), (t)) == 0) + +@@ -436,7 +437,7 @@ getfs_by_devdir (const char *dev, const + ok = has_uuid(dev, fs + 5); + } else { + fs = canonicalize_spec(mc->m.mnt_fsname); +- ok = streq(fs, dev); ++ ok = streq_except_trailing_slash(fs, dev); + my_free(fs); + } + } diff --git a/util-linux.changes b/util-linux.changes index bbe4cdd..bfdbb53 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Nov 9 08:27:17 UTC 2011 - puzel@suse.com + +- add libmount-ignore-tailing-slash-in-netfs-source-paths.patch and + libmount-fix-chdir-to-parent-for-restricted-user-umo.patch: + fix umounting network filesystems as plain user (bnc#728480) + ------------------------------------------------------------------- Tue Nov 8 09:36:41 UTC 2011 - puzel@suse.com diff --git a/util-linux.spec b/util-linux.spec index b025301..40d06ed 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -89,6 +89,8 @@ Patch2: util-linux-2.17.1-mount_losetup_crypto.patch Patch5: util-linux-2.20-libmount-deps.patch Patch6: util-linux-dmesg-fix-printing-of-multibyte-characters.patch Patch7: fsck-use-FS-blacklist-for-non-all-mode-too.patch +Patch8: libmount-ignore-tailing-slash-in-netfs-source-paths.patch +Patch9: libmount-fix-chdir-to-parent-for-restricted-user-umo.patch ## ## adjtimex @@ -193,6 +195,8 @@ Files to develop applications using the libmount library. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 +%patch9 -p1 # cd adjtimex-* From e3279935dece76b7ab7160a963f3c210c125cc1a700a40a7f7484eddb5e52a62 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 16 Nov 2011 16:21:59 +0000 Subject: [PATCH 134/211] Accepting request 91540 from Base:System - add libtool as buildrequire to avoid implicit dependency (forwarded request 91532 from coolo) OBS-URL: https://build.opensuse.org/request/show/91540 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=139 --- util-linux.changes | 5 +++++ util-linux.spec | 1 + 2 files changed, 6 insertions(+) diff --git a/util-linux.changes b/util-linux.changes index bfdbb53..27f5163 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 15 13:15:19 UTC 2011 - coolo@suse.com + +- add libtool as buildrequire to avoid implicit dependency + ------------------------------------------------------------------- Wed Nov 9 08:27:17 UTC 2011 - puzel@suse.com diff --git a/util-linux.spec b/util-linux.spec index 40d06ed..6b3370f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -30,6 +30,7 @@ BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel +BuildRequires: libtool Version: 2.20.1 Release: 4 # util-linux is a base package and uuidd pre-requiring pwdutils pulls From 701e537f3bb8f634fe2ae5ccb14d66889b7d99f6f7f8a821b4fdacdc56c0ad32 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 22 Nov 2011 16:49:53 +0000 Subject: [PATCH 135/211] Accepting request 92907 from Base:System - add fdisk-tinfo.patch to fix build with newer curses. (forwarded request 92886 from a_jaeger) OBS-URL: https://build.opensuse.org/request/show/92907 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=140 --- fdisk-tinfo.patch | 18 ++++++++++++++++++ util-linux.changes | 5 +++++ util-linux.spec | 3 +++ 3 files changed, 26 insertions(+) create mode 100644 fdisk-tinfo.patch diff --git a/fdisk-tinfo.patch b/fdisk-tinfo.patch new file mode 100644 index 0000000..4735d18 --- /dev/null +++ b/fdisk-tinfo.patch @@ -0,0 +1,18 @@ +Index: util-linux-2.20.1/fdisk/Makefile.am +=================================================================== +--- util-linux-2.20.1.orig/fdisk/Makefile.am ++++ util-linux-2.20.1/fdisk/Makefile.am +@@ -64,9 +64,13 @@ sbin_PROGRAMS += cfdisk + dist_man_MANS += cfdisk.8 + cfdisk_SOURCES = cfdisk.c $(fdisk_common) + cfdisk_CFLAGS = $(cflags_blkid) ++if HAVE_TINFO ++cfdisk_LDADD = -ltinfo @NCURSES_LIBS@ $(ldadd_blkid) ++else + cfdisk_LDADD = @NCURSES_LIBS@ $(ldadd_blkid) + endif + endif ++endif + + endif # !ARCH_SPARC + endif # !ARCH_M68K diff --git a/util-linux.changes b/util-linux.changes index 27f5163..51a0664 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Nov 21 15:13:56 UTC 2011 - aj@suse.de + +- add fdisk-tinfo.patch to fix build with newer curses. + ------------------------------------------------------------------- Tue Nov 15 13:15:19 UTC 2011 - coolo@suse.com diff --git a/util-linux.spec b/util-linux.spec index 6b3370f..4407d7a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -92,6 +92,7 @@ Patch6: util-linux-dmesg-fix-printing-of-multibyte-characters.patch Patch7: fsck-use-FS-blacklist-for-non-all-mode-too.patch Patch8: libmount-ignore-tailing-slash-in-netfs-source-paths.patch Patch9: libmount-fix-chdir-to-parent-for-restricted-user-umo.patch +Patch10: fdisk-tinfo.patch ## ## adjtimex @@ -109,6 +110,7 @@ Patch60: time-1.7.dif ## which ## Patch70: which-lib64.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed # @@ -198,6 +200,7 @@ Files to develop applications using the libmount library. %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 # cd adjtimex-* From 5553bd56a068b036d384be47d2e694b83a991ca654ef1a43b5b19320633a1ecb Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 6 Dec 2011 18:11:00 +0000 Subject: [PATCH 136/211] replace license with spdx.org variant OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=141 --- util-linux.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 4407d7a..2b64f93 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -45,7 +45,7 @@ Provides: fsck-with-dev-lock = %{version} # bnc#651598: Provides: util-linux(fake+no-canonicalize) PreReq: %install_info_prereq permissions -License: GPLv2+ +License: GPL-2.0+ Group: System/Base AutoReqProv: on Recommends: %{name}-lang = %{version} @@ -123,7 +123,7 @@ that are necessary for a Linux system to function. It contains the mount program, the fdisk configuration tool, and more. %package -n libblkid1 -License: GPLv2+ +License: GPL-2.0+ Summary: Filesystem detection library Group: System/Filesystems @@ -131,7 +131,7 @@ Group: System/Filesystems Library for filesystem detection. %package -n libblkid-devel -License: GPLv2+ +License: GPL-2.0+ Summary: Development files for the filesystem detection library Group: Development/Libraries/C and C++ Requires: libblkid1 = %{version} @@ -141,7 +141,7 @@ Files needed to develop applications using the library for filesystem detection. %package -n uuidd -License: GPLv2+ +License: GPL-2.0+ Summary: Helper daemon to guarantee uniqueness of time-based UUIDs Group: System/Filesystems PreReq: %fillup_prereq @@ -155,7 +155,7 @@ uniqueness of time-based UUID generation even at very high rates on SMP systems. %package -n libuuid1 -License: GPLv2+ +License: GPL-2.0+ Summary: Library to generate UUIDs Group: System/Filesystems @@ -163,7 +163,7 @@ Group: System/Filesystems A library to generate universally unique IDs (UUIDs). %package -n libuuid-devel -License: GPLv2+ +License: GPL-2.0+ Summary: Development files for libuuid1 Group: Development/Libraries/C and C++ Requires: libuuid1 = %{version} @@ -173,7 +173,7 @@ Files to develop applications using the library to generate universally unique IDs (UUIDs). %package -n libmount1 -License: GPLv2+ +License: GPL-2.0+ Summary: Device mount library Group: System/Filesystems @@ -182,7 +182,7 @@ Library designed to be used in low-level utils like mount(8) and /sbin/mount. helpers. %package -n libmount-devel -License: GPLv2+ +License: GPL-2.0+ Summary: Development files for libmount1 Group: Development/Libraries/C and C++ Requires: libmount1 = %{version} From 1d0a43fc868b7d6df80166aead73d8639abf3b0fd0a0b17c5bc96db4cf710f91 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 27 Dec 2011 17:39:14 +0000 Subject: [PATCH 137/211] Accepting request 98205 from Base:System - do not call %suse_update_config OBS-URL: https://build.opensuse.org/request/show/98205 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=142 --- util-linux.changes | 5 +++++ util-linux.spec | 18 ++++-------------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index 51a0664..f79ddb8 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Dec 25 22:19:44 UTC 2011 - coolo@suse.com + +- do not call %suse_update_config + ------------------------------------------------------------------- Mon Nov 21 15:13:56 UTC 2011 - aj@suse.de diff --git a/util-linux.spec b/util-linux.spec index 2b64f93..d8ac705 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - %define time_ver 1.7 %define which_ver 2.20 %define adjtimex_ver 1.28 @@ -25,14 +24,14 @@ BuildRequires: audit-devel BuildRequires: gettext-devel BuildRequires: libselinux-devel BuildRequires: libsepol-devel +BuildRequires: libtool BuildRequires: ncurses-devel BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel -BuildRequires: libtool Version: 2.20.1 -Release: 4 +Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole # ldap stack into it. Avoid this whole mess which is done only to @@ -45,11 +44,10 @@ Provides: fsck-with-dev-lock = %{version} # bnc#651598: Provides: util-linux(fake+no-canonicalize) PreReq: %install_info_prereq permissions -License: GPL-2.0+ -Group: System/Base -AutoReqProv: on Recommends: %{name}-lang = %{version} Summary: A collection of basic system utilities +License: GPL-2.0+ +Group: System/Base Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v20/%{name}-%{version}.tar.bz2 Source1: util-linux-rpmlintrc # XXX: make nologin part of login package @@ -123,7 +121,6 @@ that are necessary for a Linux system to function. It contains the mount program, the fdisk configuration tool, and more. %package -n libblkid1 -License: GPL-2.0+ Summary: Filesystem detection library Group: System/Filesystems @@ -131,7 +128,6 @@ Group: System/Filesystems Library for filesystem detection. %package -n libblkid-devel -License: GPL-2.0+ Summary: Development files for the filesystem detection library Group: Development/Libraries/C and C++ Requires: libblkid1 = %{version} @@ -141,7 +137,6 @@ Files needed to develop applications using the library for filesystem detection. %package -n uuidd -License: GPL-2.0+ Summary: Helper daemon to guarantee uniqueness of time-based UUIDs Group: System/Filesystems PreReq: %fillup_prereq @@ -155,7 +150,6 @@ uniqueness of time-based UUID generation even at very high rates on SMP systems. %package -n libuuid1 -License: GPL-2.0+ Summary: Library to generate UUIDs Group: System/Filesystems @@ -163,7 +157,6 @@ Group: System/Filesystems A library to generate universally unique IDs (UUIDs). %package -n libuuid-devel -License: GPL-2.0+ Summary: Development files for libuuid1 Group: Development/Libraries/C and C++ Requires: libuuid1 = %{version} @@ -173,7 +166,6 @@ Files to develop applications using the library to generate universally unique IDs (UUIDs). %package -n libmount1 -License: GPL-2.0+ Summary: Device mount library Group: System/Filesystems @@ -182,7 +174,6 @@ Library designed to be used in low-level utils like mount(8) and /sbin/mount. helpers. %package -n libmount-devel -License: GPL-2.0+ Summary: Development files for libmount1 Group: Development/Libraries/C and C++ Requires: libmount1 = %{version} @@ -230,7 +221,6 @@ cd which-%{which_ver} aclocal --force autoconf --force automake --force-missing --add-missing --foreign -%{?suse_update_config:%{suse_update_config}} %configure --prefix=/usr \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ From d21c6383256514a95a75593995ccd23363bfd38274e53e9e44944672c7aba953 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 28 Feb 2012 13:16:22 +0000 Subject: [PATCH 138/211] Accepting request 106894 from Base:System - update to util-linux-2.21 OBS-URL: https://build.opensuse.org/request/show/106894 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=143 --- adjtimex-1.28.tar.bz2 | 3 - adjtimex_1.29.orig.tar.gz | 3 + fdisk-tinfo.patch | 6 +- ...se-FS-blacklist-for-non-all-mode-too.patch | 94 - ...ir-to-parent-for-restricted-user-umo.patch | 99 -- ...-tailing-slash-in-netfs-source-paths.patch | 218 --- ...ux-2.12r-fdisk_remove_bogus_warnings.patch | 10 +- util-linux-2.17.1-mount_losetup_crypto.patch | 1570 ----------------- util-linux-2.20.1.tar.bz2 | 3 - util-linux-2.21.tar.bz2 | 3 + ...fix-printing-of-multibyte-characters.patch | 52 - util-linux-rpmlintrc | 3 + util-linux.changes | 62 + util-linux.spec | 116 +- 14 files changed, 130 insertions(+), 2112 deletions(-) delete mode 100644 adjtimex-1.28.tar.bz2 create mode 100644 adjtimex_1.29.orig.tar.gz delete mode 100644 fsck-use-FS-blacklist-for-non-all-mode-too.patch delete mode 100644 libmount-fix-chdir-to-parent-for-restricted-user-umo.patch delete mode 100644 libmount-ignore-tailing-slash-in-netfs-source-paths.patch delete mode 100644 util-linux-2.17.1-mount_losetup_crypto.patch delete mode 100644 util-linux-2.20.1.tar.bz2 create mode 100644 util-linux-2.21.tar.bz2 delete mode 100644 util-linux-dmesg-fix-printing-of-multibyte-characters.patch diff --git a/adjtimex-1.28.tar.bz2 b/adjtimex-1.28.tar.bz2 deleted file mode 100644 index 6347052..0000000 --- a/adjtimex-1.28.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:527a20975cbcffb39ab122867c4a9438cf09e7d1e01a06eaa2f340de282a4c95 -size 75184 diff --git a/adjtimex_1.29.orig.tar.gz b/adjtimex_1.29.orig.tar.gz new file mode 100644 index 0000000..cf887f4 --- /dev/null +++ b/adjtimex_1.29.orig.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04b9e8b66e77276ed07e78de89af37fd1aa12725923de853480827c4fafd176a +size 85551 diff --git a/fdisk-tinfo.patch b/fdisk-tinfo.patch index 4735d18..c9c7562 100644 --- a/fdisk-tinfo.patch +++ b/fdisk-tinfo.patch @@ -1,7 +1,7 @@ -Index: util-linux-2.20.1/fdisk/Makefile.am +Index: util-linux-2.21-rc2/fdisk/Makefile.am =================================================================== ---- util-linux-2.20.1.orig/fdisk/Makefile.am -+++ util-linux-2.20.1/fdisk/Makefile.am +--- util-linux-2.21-rc2.orig/fdisk/Makefile.am ++++ util-linux-2.21-rc2/fdisk/Makefile.am @@ -64,9 +64,13 @@ sbin_PROGRAMS += cfdisk dist_man_MANS += cfdisk.8 cfdisk_SOURCES = cfdisk.c $(fdisk_common) diff --git a/fsck-use-FS-blacklist-for-non-all-mode-too.patch b/fsck-use-FS-blacklist-for-non-all-mode-too.patch deleted file mode 100644 index 398e091..0000000 --- a/fsck-use-FS-blacklist-for-non-all-mode-too.patch +++ /dev/null @@ -1,94 +0,0 @@ -From e31741980762744352890d37522cbf4dd0ced9c4 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 2 Nov 2011 15:51:45 +0100 -Subject: [PATCH] fsck: use FS blacklist for non-all mode too - -Reported-by: Lennart Poettering -Signed-off-by: Karel Zak -Signed-off-by: Petr Uzel ---- - fsck/fsck.c | 43 +++++++++++++++++++++++++++++++++++++++---- - 1 files changed, 39 insertions(+), 4 deletions(-) - -Index: util-linux-2.20.1/fsck/fsck.c -=================================================================== ---- util-linux-2.20.1.orig/fsck/fsck.c -+++ util-linux-2.20.1/fsck/fsck.c -@@ -57,14 +57,35 @@ - #include "xalloc.h" - - static const char *ignored_types[] = { -+ "9p", -+ "afs", -+ "autofs", -+ "binfmt_misc", -+ "cgroup", -+ "cifs", -+ "cpuset", -+ "debugfs", -+ "devfs", -+ "devpts", -+ "devtmpfs", -+ "dlmfs", -+ "fusectl", -+ "fuse.gvfs-fuse-daemon", -+ "hugetlbfs", - "ignore", - "iso9660", -+ "mqueue" -+ "ncpfs", - "nfs", - "proc", -+ "rpc_pipefs", -+ "securityfs", -+ "smbfs", -+ "spufs", - "sw", - "swap", -+ "sysfs", - "tmpfs", -- "devpts", - NULL - }; - -@@ -953,6 +974,18 @@ static int device_exists(const char *dev - return 1; - } - -+static int ignored_type(const char *fstype) -+{ -+ const char **ip; -+ -+ for(ip = ignored_types; *ip; ip++) { -+ if (strcmp(fstype, *ip) == 0) -+ return 1; -+ } -+ -+ return 0; -+} -+ - /* Check if we should ignore this filesystem. */ - static int ignore(struct fs_info *fs) - { -@@ -1000,8 +1033,8 @@ static int ignore(struct fs_info *fs) - if (!fs_match(fs, &fs_type_compiled)) return 1; - - /* Are we ignoring this type? */ -- for(ip = ignored_types; *ip; ip++) -- if (strcmp(fs->type, *ip) == 0) return 1; -+ if (fs->type && ignored_type(fs->type)) -+ return 1; - - /* Do we really really want to check this fs? */ - for(ip = really_wanted; *ip; ip++) -@@ -1461,7 +1494,9 @@ int main(int argc, char *argv[]) - 0, -1, -1); - if (!fs) - continue; -- } -+ } else if (fs->type && ignored_type(fs->type)) -+ continue; -+ - if (ignore_mounted && is_mounted(fs->device)) - continue; - status |= fsck_device(fs, interactive); diff --git a/libmount-fix-chdir-to-parent-for-restricted-user-umo.patch b/libmount-fix-chdir-to-parent-for-restricted-user-umo.patch deleted file mode 100644 index 994ac0d..0000000 --- a/libmount-fix-chdir-to-parent-for-restricted-user-umo.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 6107377322d5d6866c3aa363def656fdf68311e6 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 8 Nov 2011 21:47:23 +0100 -Subject: [PATCH] libmount: fix chdir to parent for restricted (user) umounts - -Reported-by: Petr Uzel -Signed-off-by: Karel Zak -Signed-off-by: Petr Uzel ---- - libmount/src/utils.c | 41 +++++++++++++++++++++++++---------------- - 1 files changed, 25 insertions(+), 16 deletions(-) - -Index: util-linux-2.20.1/libmount/src/utils.c -=================================================================== ---- util-linux-2.20.1.orig/libmount/src/utils.c -+++ util-linux-2.20.1/libmount/src/utils.c -@@ -62,34 +62,40 @@ static char *stripoff_last_component(cha - if (!p) - return NULL; - *p = '\0'; -- return ++p; -+ return p + 1; - } - --/* Note that the @target has to be absolute path (so at least "/") -+/* -+ * Note that the @target has to be absolute path (so at least "/"). The -+ * @filename returns allocated buffer with last path component, for example: -+ * -+ * mnt_chdir_to_parent("/mnt/test", &buf) ==> chdir("/mnt"), buf="test" - */ - int mnt_chdir_to_parent(const char *target, char **filename) - { -- char *path, *last = NULL; -+ char *buf, *parent, *last = NULL; - char cwd[PATH_MAX]; - int rc = -EINVAL; - - if (!target || *target != '/') - return -EINVAL; - -- path = strdup(target); -- if (!path) -+ DBG(UTILS, mnt_debug("moving to %s parent", target)); -+ -+ buf = strdup(target); -+ if (!buf) - return -ENOMEM; - -- if (*(path + 1) != '\0') { -- last = stripoff_last_component(path); -+ if (*(buf + 1) != '\0') { -+ last = stripoff_last_component(buf); - if (!last) - goto err; - } -- if (!*path) -- *path = '/'; /* root */ - -- if (chdir(path) == -1) { -- DBG(UTILS, mnt_debug("failed to chdir to %s: %m", path)); -+ parent = buf && *buf ? buf : "/"; -+ -+ if (chdir(parent) == -1) { -+ DBG(UTILS, mnt_debug("failed to chdir to %s: %m", parent)); - rc = -errno; - goto err; - } -@@ -98,14 +104,17 @@ int mnt_chdir_to_parent(const char *targ - rc = -errno; - goto err; - } -- if (strcmp(cwd, path) != 0) { -- DBG(UTILS, mnt_debug("path moved (%s -> %s)", path, cwd)); -+ if (strcmp(cwd, parent) != 0) { -+ DBG(UTILS, mnt_debug( -+ "unexpected chdir (expected=%s, cwd=%s)", parent, cwd)); - goto err; - } - -- DBG(CXT, mnt_debug("current directory moved to %s", path)); -+ DBG(CXT, mnt_debug( -+ "current directory moved to %s [last_component='%s']", -+ parent, last)); - -- *filename = path; -+ *filename = buf; - - if (!last || !*last) - memcpy(*filename, ".", 2); -@@ -113,7 +122,7 @@ int mnt_chdir_to_parent(const char *targ - memcpy(*filename, last, strlen(last) + 1); - return 0; - err: -- free(path); -+ free(buf); - return rc; - } - diff --git a/libmount-ignore-tailing-slash-in-netfs-source-paths.patch b/libmount-ignore-tailing-slash-in-netfs-source-paths.patch deleted file mode 100644 index d39b533..0000000 --- a/libmount-ignore-tailing-slash-in-netfs-source-paths.patch +++ /dev/null @@ -1,218 +0,0 @@ -From b106d052383083b80c0dc41f1555d2661db00374 Mon Sep 17 00:00:00 2001 -From: Petr Uzel -Date: Tue, 8 Nov 2011 16:25:01 +0100 -Subject: [PATCH] libmount: ignore tailing slash in netfs source paths - -Addresses: https://bugzilla.novell.com/show_bug.cgi?id=728480 -Signed-off-by: Petr Uzel -Signed-off-by: Karel Zak ---- - include/strutils.h | 2 ++ - lib/strutils.c | 32 ++++++++++++++++++++++++++++++++ - libmount/src/fs.c | 5 +++-- - libmount/src/tab.c | 17 ++++++++++++----- - libmount/src/tab_parse.c | 11 +++++++++-- - mount/fstab.c | 3 ++- - 6 files changed, 60 insertions(+), 10 deletions(-) - -Index: util-linux-2.20.1/include/strutils.h -=================================================================== ---- util-linux-2.20.1.orig/include/strutils.h -+++ util-linux-2.20.1/include/strutils.h -@@ -44,4 +44,6 @@ extern int string_to_idarray(const char - extern int string_to_bitarray(const char *list, char *ary, - int (*name2bit)(const char *, size_t)); - -+extern int streq_except_trailing_slash(const char *s1, const char *s2); -+ - #endif -Index: util-linux-2.20.1/lib/strutils.c -=================================================================== ---- util-linux-2.20.1.orig/lib/strutils.c -+++ util-linux-2.20.1/lib/strutils.c -@@ -437,6 +437,40 @@ int string_to_bitarray(const char *list, - return 0; - } - -+ -+/* -+ * Compare two strings for equality, ignoring at most one trailing -+ * slash. -+ */ -+int streq_except_trailing_slash(const char *s1, const char *s2) -+{ -+ int equal; -+ -+ if (!s1 && !s2) -+ return 1; -+ if (!s1 || !s2) -+ return 0; -+ -+ equal = !strcmp(s1, s2); -+ -+ if (!equal) { -+ size_t len1 = strlen(s1); -+ size_t len2 = strlen(s2); -+ -+ if (len1 && *(s1 + len1 - 1) == '/') -+ len1--; -+ if (len2 && *(s2 + len2 - 1) == '/') -+ len2--; -+ if (len1 != len2) -+ return 0; -+ -+ equal = !strncmp(s1, s2, len1); -+ } -+ -+ return equal; -+} -+ -+ - #ifdef TEST_PROGRAM - - int main(int argc, char *argv[]) -Index: util-linux-2.20.1/libmount/src/fs.c -=================================================================== ---- util-linux-2.20.1.orig/libmount/src/fs.c -+++ util-linux-2.20.1/libmount/src/fs.c -@@ -16,6 +16,7 @@ - #include - - #include "mountP.h" -+#include "strutils.h" - - /** - * mnt_new_fs: -@@ -1142,7 +1143,7 @@ int mnt_fs_match_source(struct libmnt_fs - return 0; - - /* 1) native paths/tags */ -- if (!strcmp(source, fs->source)) -+ if (streq_except_trailing_slash(source, fs->source)) - return 1; - - if (!cache) -@@ -1156,7 +1157,7 @@ int mnt_fs_match_source(struct libmnt_fs - - /* 2) canonicalized and native */ - src = mnt_fs_get_srcpath(fs); -- if (src && !strcmp(cn, src)) -+ if (src && streq_except_trailing_slash(cn, src)) - return 1; - - /* 3) canonicalized and canonicalized */ -Index: util-linux-2.20.1/libmount/src/tab.c -=================================================================== ---- util-linux-2.20.1.orig/libmount/src/tab.c -+++ util-linux-2.20.1/libmount/src/tab.c -@@ -44,6 +44,7 @@ - #include - - #include "mountP.h" -+#include "strutils.h" - - /** - * mnt_new_table: -@@ -506,7 +507,7 @@ struct libmnt_fs *mnt_table_find_srcpath - - if (path == NULL && src == NULL) - return fs; /* source is "none" */ -- if (p && strcmp(p, path) == 0) -+ if (path && p && streq_except_trailing_slash(p, path)) - return fs; - if (!p && src) - ntags++; /* mnt_fs_get_srcpath() returs nothing, it's TAG */ -@@ -520,7 +521,7 @@ struct libmnt_fs *mnt_table_find_srcpath - mnt_reset_iter(&itr, direction); - while(mnt_table_next_fs(tb, &itr, &fs) == 0) { - p = mnt_fs_get_srcpath(fs); -- if (p && strcmp(p, cn) == 0) -+ if (p && streq_except_trailing_slash(p, cn)) - return fs; - } - } -@@ -551,7 +552,7 @@ struct libmnt_fs *mnt_table_find_srcpath - if (mnt_fs_get_tag(fs, &t, &v)) - continue; - x = mnt_resolve_tag(t, v, tb->cache); -- if (x && !strcmp(x, cn)) -+ if (x && streq_except_trailing_slash(x, cn)) - return fs; - } - } -@@ -566,7 +567,7 @@ struct libmnt_fs *mnt_table_find_srcpath - p = mnt_fs_get_srcpath(fs); - if (p) - p = mnt_resolve_path(p, tb->cache); -- if (p && strcmp(cn, p) == 0) -+ if (p && streq_except_trailing_slash(cn, p)) - return fs; - } - } -@@ -856,8 +857,14 @@ int mnt_table_is_fs_mounted(struct libmn - *t = mnt_fs_get_target(fs), - *r = mnt_fs_get_root(fs); - -- if (s && t && r && !strcmp(t, tgt) && -- !strcmp(s, src) && !strcmp(r, root)) -+ /* -+ * Note that kernel can add tailing slash to the -+ * network filesystem source paths. -+ */ -+ if (t && s && r && -+ strcmp(t, tgt) == 0 && -+ streq_except_trailing_slash(s, src) && -+ strcmp(r, root) == 0) - break; - } - if (fs) -Index: util-linux-2.20.1/libmount/src/tab_parse.c -=================================================================== ---- util-linux-2.20.1.orig/libmount/src/tab_parse.c -+++ util-linux-2.20.1/libmount/src/tab_parse.c -@@ -14,6 +14,7 @@ - #include "mangle.h" - #include "mountP.h" - #include "pathnames.h" -+#include "strutils.h" - - static inline char *skip_spaces(char *s) - { -@@ -654,8 +655,14 @@ static struct libmnt_fs *mnt_table_merge - if (fs->flags & MNT_FS_MERGED) - continue; - -- if (s && t && r && !strcmp(t, target) && -- !strcmp(s, src) && !strcmp(r, root)) -+ /* -+ * Note that kernel can add tailing slash to the network -+ * filesystem source path -+ */ -+ if (s && t && r && -+ strcmp(t, target) == 0 && -+ streq_except_trailing_slash(s, src) && -+ strcmp(r, root) == 0) - break; - } - -Index: util-linux-2.20.1/mount/fstab.c -=================================================================== ---- util-linux-2.20.1.orig/mount/fstab.c -+++ util-linux-2.20.1/mount/fstab.c -@@ -20,6 +20,7 @@ - #include "pathnames.h" - #include "nls.h" - #include "usleep.h" -+#include "strutils.h" - - #define streq(s, t) (strcmp ((s), (t)) == 0) - -@@ -436,7 +437,7 @@ getfs_by_devdir (const char *dev, const - ok = has_uuid(dev, fs + 5); - } else { - fs = canonicalize_spec(mc->m.mnt_fsname); -- ok = streq(fs, dev); -+ ok = streq_except_trailing_slash(fs, dev); - my_free(fs); - } - } diff --git a/util-linux-2.12r-fdisk_remove_bogus_warnings.patch b/util-linux-2.12r-fdisk_remove_bogus_warnings.patch index ca5a94c..3fa89cf 100644 --- a/util-linux-2.12r-fdisk_remove_bogus_warnings.patch +++ b/util-linux-2.12r-fdisk_remove_bogus_warnings.patch @@ -1,8 +1,8 @@ -Index: util-linux-ng-2.18/fdisk/fdisk.c +Index: util-linux-2.21-rc2/fdisk/fdisk.c =================================================================== ---- util-linux-ng-2.18.orig/fdisk/fdisk.c 2010-06-30 14:44:25.000000000 +0200 -+++ util-linux-ng-2.18/fdisk/fdisk.c 2010-07-08 14:35:07.000000000 +0200 -@@ -1838,6 +1838,7 @@ static void check_consistency(struct par +--- util-linux-2.21-rc2.orig/fdisk/fdisk.c ++++ util-linux-2.21-rc2/fdisk/fdisk.c +@@ -1767,6 +1767,7 @@ static void check_consistency(struct par /* compute logical ending (c, h, s) */ long2chs(get_start_sect(p) + get_nr_sects(p) - 1, &lec, &leh, &les); @@ -10,7 +10,7 @@ Index: util-linux-ng-2.18/fdisk/fdisk.c /* Same physical / logical beginning? */ if (cylinders <= 1024 && (pbc != lbc || pbh != lbh || pbs != lbs)) { printf(_("Partition %d has different physical/logical " -@@ -1854,7 +1855,6 @@ static void check_consistency(struct par +@@ -1783,7 +1784,6 @@ static void check_consistency(struct par printf(_("logical=(%d, %d, %d)\n"),lec, leh, les); } diff --git a/util-linux-2.17.1-mount_losetup_crypto.patch b/util-linux-2.17.1-mount_losetup_crypto.patch deleted file mode 100644 index 8f9a34c..0000000 --- a/util-linux-2.17.1-mount_losetup_crypto.patch +++ /dev/null @@ -1,1570 +0,0 @@ -From 2d5b9e07d5b8dd698d83a6702906eefc834a9af5 Mon Sep 17 00:00:00 2001 -From: Ludwig Nussel -Date: Thu, 29 Nov 2007 17:46:36 +0100 -Subject: [PATCH] losetup: support password hashing and specifying the key length - -* add support for password hashing (sha512, sha384, sha256, rmd160). -* add support for loop-AES style strings like "twofish256" for - specifying the encryption algorithm and key length. - -Based on the SUSE patch from Ludwig Nussel , -this patch adds password hashing for cryptoloop devices. While -cryptoloop is deprecated, users may still wish to access existing -volumes. - -Incompatible change: - Default is now to hash using sha256, sha384 or sha512 depending - on key length (16, 24, or 32 bytes). Debian users will need to - specify "--phash rmd160" to access existing Debian devices. - Others will need to specify '--phash none'. - -sha512.c is from loop-AES. - -Signed-off-by: Ludwig Nussel ---- - mount/Makefile.am | 3 +- - mount/lomount.c | 174 +++++++++++++++--- - mount/lomount.h | 5 +- - mount/losetup.8 | 11 + - mount/mount.8 | 13 ++ - mount/mount.c | 21 ++- - mount/rmd160.c | 532 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - mount/rmd160.h | 11 + - mount/sha512.c | 432 +++++++++++++++++++++++++++++++++++++++++++ - mount/sha512.h | 45 +++++ - 10 files changed, 1219 insertions(+), 28 deletions(-) - create mode 100644 mount/rmd160.c - create mode 100644 mount/rmd160.h - create mode 100644 mount/sha512.c - create mode 100644 mount/sha512.h - -Index: util-linux-2.20-rc2/mount/Makefile.am -=================================================================== ---- util-linux-2.20-rc2.orig/mount/Makefile.am -+++ util-linux-2.20-rc2/mount/Makefile.am -@@ -7,7 +7,7 @@ sbin_PROGRAMS = losetup swapon - dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 - - # generic sources for all programs (mount, umount, losetup) --srcs_common = sundries.c xmalloc.c $(top_srcdir)/lib/canonicalize.c sundries.h xmalloc.h -+srcs_common = sundries.c xmalloc.c $(top_srcdir)/lib/canonicalize.c sundries.h xmalloc.h rmd160.c sha512.c - - # generic header for mount and umount - hdrs_mount = fstab.h mount_mntent.h mount_constants.h \ -Index: util-linux-2.20-rc2/mount/lomount.c -=================================================================== ---- util-linux-2.20-rc2.orig/mount/lomount.c -+++ util-linux-2.20-rc2/mount/lomount.c -@@ -23,6 +23,12 @@ - #include "sundries.h" - #include "xmalloc.h" - #include "pathnames.h" -+#include "rmd160.h" -+#include "sha512.h" -+ -+#ifndef MIN -+#define MIN(a,b) ((a 3) { -+ if(isdigit(loopinfo64.lo_crypt_name[len-3]) -+ && isdigit(loopinfo64.lo_crypt_name[len-2]) -+ && isdigit(loopinfo64.lo_crypt_name[len-1])) { -+ loopinfo64.lo_encrypt_key_size = atoi((char*)&loopinfo64.lo_crypt_name[len-3]) >> 3; -+ loopinfo64.lo_crypt_name[len-3] = 0; -+ } -+ } -+ -+ if(keysz && loopinfo64.lo_encrypt_key_size && loopinfo64.lo_encrypt_key_size != keysz >> 3) { -+ fprintf(stderr, _("please either specify '%s%d' or -e '%s' -k '%d'\n"), -+ loopinfo64.lo_crypt_name, loopinfo64.lo_encrypt_key_size<<3, -+ loopinfo64.lo_crypt_name, keysz); -+ return 1; -+ } - } - } - -@@ -855,20 +914,69 @@ set_loop(const char *device, const char - } - #endif - -- switch (loopinfo64.lo_encrypt_type) { -- case LO_CRYPT_NONE: -- loopinfo64.lo_encrypt_key_size = 0; -- break; -- case LO_CRYPT_XOR: -- pass = getpass(_("Password: ")); -- goto gotpass; -- default: -- pass = xgetpass(pfd, _("Password: ")); -- gotpass: -+ if (loopinfo64.lo_encrypt_type != LO_CRYPT_NONE) { -+ void (*hfunc)(const unsigned char*, size_t, unsigned char*, size_t) = NULL; -+ - memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE); -- xstrncpy((char *)loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE); -+ -+ pass = xgetpass(pfd, _("Password: ")); -+ if(!pass) -+ return 1; -+ -+ // set default hash functions, loop-AES compatible -+ if(loopinfo64.lo_encrypt_type == LO_CRYPT_CRYPTOAPI) { -+ hfunc = sha256_hash_buffer; -+ if(loopinfo64.lo_encrypt_key_size == 24) hfunc = sha384_hash_buffer; -+ if(loopinfo64.lo_encrypt_key_size == 32) hfunc = sha512_hash_buffer; -+ } else if(loopinfo64.lo_encrypt_type == 3 ) { // LO_CRYPT_FISH -+ if(!strcmp(encryption, "twofishSL92")) { -+ hfunc = sha512_hash_buffer; -+ loopinfo64.lo_encrypt_key_size = 32; -+ } else { -+ hfunc = phash_rmd160; -+ loopinfo64.lo_encrypt_key_size = 20; -+ } -+ } else { -+ hfunc = phash_none; -+ loopinfo64.lo_encrypt_key_size = keysz?keysz>>3:LO_KEY_SIZE; -+ } -+ -+ if(!loopinfo64.lo_encrypt_key_size) { -+ if(!keysz) { -+ fprintf(stderr, _("please specify a key length\n")); -+ return 1; -+ } -+ loopinfo64.lo_encrypt_key_size = keysz>>3; -+ } -+ -+ if((unsigned)loopinfo64.lo_encrypt_key_size > sizeof(loopinfo64.lo_encrypt_key)) { -+ fprintf(stderr, _("invalid key length\n")); -+ return 1; -+ } -+ -+ if (phash) { -+ if(!strcasecmp(phash, "sha512")) { -+ hfunc = sha512_hash_buffer; -+ } else if(!strcasecmp(phash, "sha384")) { -+ hfunc = sha384_hash_buffer; -+ } else if(!strcasecmp(phash, "sha256")) { -+ hfunc = sha256_hash_buffer; -+ } else if(!strcasecmp(phash, "rmd160")) { -+ hfunc = phash_rmd160; -+ } else if(!strcasecmp(phash, "none")) { -+ hfunc = phash_none; -+ } else { -+ fprintf(stderr, _("unsupported hash method '%s'\n"), phash); -+ return 1; -+ } -+ } -+ -+ if(hfunc) { -+ hfunc((unsigned char*)pass, strlen(pass), loopinfo64.lo_encrypt_key, loopinfo64.lo_encrypt_key_size); -+ } -+ -+ // zero buffer - memset(pass, 0, strlen(pass)); -- loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE; - } - - if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { -@@ -1024,14 +1132,20 @@ usage(FILE *out) { - progname); - - fputs(_("\nOptions:\n"), out); -- fputs(_(" -e, --encryption enable data encryption with specified \n" -- " -h, --help this help\n" -- " -o, --offset start at offset into file\n" -+ fputs(_(" -e | --encryption enable data encryption with specified \n" -+ " -H | --phash hash password using specified algorithm (sha512/sha256/sha384/rmd160/none)\n" -+ " -h | --help this help\n" -+ " -k | --keybits specify number of bits in the hashed key given\n" -+ " to the cipher. Some ciphers support several key\n" -+ " sizes and might be more efficient with a smaller\n" -+ " key size. Key sizes < 128 are generally not\n" -+ " recommended\n" -+ " -o | --offset start at offset into file\n" - " --sizelimit loop limited to only bytes of the file\n" -- " -p, --pass-fd read passphrase from file descriptor \n" -- " -r, --read-only setup read-only loop device\n" -+ " -p | --pass-fd read passphrase from file descriptor \n" -+ " -r | --read-only setup read-only loop device\n" - " --show print device name (with -f )\n" -- " -v, --verbose verbose mode\n\n"), out); -+ " -v | --verbose verbose mode\n\n"), out); - - exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); - } -@@ -1039,11 +1153,14 @@ usage(FILE *out) { - int - main(int argc, char **argv) { - char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc; -+ char *keysize; -+ char *phash = NULL; - int delete, find, c, all, capacity; - int res = 0; - int showdev = 0; - int ro = 0; - int pfd = -1; -+ int keysz = 0; - uintmax_t off = 0, slimit = 0; - - static const struct option longopts[] = { -@@ -1053,6 +1170,8 @@ main(int argc, char **argv) { - { "encryption", 1, 0, 'e' }, - { "find", 0, 0, 'f' }, - { "help", 0, 0, 'h' }, -+ { "keybits", 1, 0, 'k' }, -+ { "phash", 1, 0, 'H' }, - { "associated", 1, 0, 'j' }, - { "offset", 1, 0, 'o' }, - { "sizelimit", 1, 0, 128 }, -@@ -1069,12 +1188,13 @@ main(int argc, char **argv) { - - capacity = delete = find = all = 0; - assoc = offset = sizelimit = encryption = passfd = NULL; -+ keysize = NULL; - - progname = argv[0]; - if ((p = strrchr(progname, '/')) != NULL) - progname = p+1; - -- while ((c = getopt_long(argc, argv, "acde:E:fhj:o:p:rsv", -+ while ((c = getopt_long(argc, argv, "acde:E:fhj:k:o:p:rsvH:", - longopts, NULL)) != -1) { - switch (c) { - case 'a': -@@ -1102,6 +1222,12 @@ main(int argc, char **argv) { - case 'j': - assoc = optarg; - break; -+ case 'k': -+ keysize = optarg; -+ break; -+ case 'H': -+ phash = optarg; -+ break; - case 'o': - offset = optarg; - break; -@@ -1191,8 +1317,10 @@ main(int argc, char **argv) { - else { - if (passfd && sscanf(passfd, "%d", &pfd) != 1) - usage(stderr); -+ if (keysize && sscanf(keysize,"%d",&keysz) != 1) -+ usage(stderr); - do { -- res = set_loop(device, file, off, slimit, encryption, pfd, &ro); -+ res = set_loop(device, file, off, slimit, encryption, phash, pfd, &ro, keysz); - if (res == 2 && find) { - if (verbose) - printf(_("stolen loop=%s...trying again\n"), -Index: util-linux-2.20-rc2/mount/lomount.h -=================================================================== ---- util-linux-2.20-rc2.orig/mount/lomount.h -+++ util-linux-2.20-rc2/mount/lomount.h -@@ -1,8 +1,8 @@ - #ifndef UTIL_LINUX_LOMOUNT_H - #define UTIL_LINUX_LOMOUNT_H - --extern int set_loop(const char *, const char *, unsigned long long, unsigned long long, -- const char *, int, int *); -+extern int set_loop(const char * device, const char * file, unsigned long long offset, unsigned long long, -+ const char * encryption, const char *phash, int pfd, int *options, int keysz); - extern int del_loop(const char *); - extern int is_loop_device(const char *); - extern int is_loop_autoclear(const char *device); -Index: util-linux-2.20-rc2/mount/losetup.8 -=================================================================== ---- util-linux-2.20-rc2.orig/mount/losetup.8 -+++ util-linux-2.20-rc2/mount/losetup.8 -@@ -96,9 +96,18 @@ find the first unused loop device. If a - argument is present, use this device. Otherwise, print its name - .IP "\fB\-h, \-\-help\fP" - print help -+.IP "\fB\-H, \-\-phash \fIhash_type\fP" -+Specify the password hash function. Valid values are: -+.BR sha512 (default), -+.BR sha256 , -+.BR sha384 , -+.BR rmd160 , -+.BR none . - .IP "\fB\-j, \-\-associated \fIfile\fP" - show status of all loop devices associated with given - .I file -+.IP "\fB\-k, \-\-keybits \fInum\fP" -+set the number of bits to use in key to \fInum\fP. - .IP "\fB\-o, \-\-offset \fIoffset\fP" - the data start is moved \fIoffset\fP bytes into the specified file or - device -@@ -169,6 +178,8 @@ the command - .fi - .SH RESTRICTION - DES encryption is painfully slow. On the other hand, XOR is terribly weak. -+Both are insecure nowadays. Some ciphers may require a licence for you to be -+allowed to use them. - - Cryptoloop is deprecated in favor of dm-crypt. For more details see - .BR cryptsetup (8). -Index: util-linux-2.20-rc2/mount/mount.8 -=================================================================== ---- util-linux-2.20-rc2.orig/mount/mount.8 -+++ util-linux-2.20-rc2/mount/mount.8 -@@ -915,6 +915,15 @@ Every time the inode is modified, the i_ - .B noiversion - Do not increment the i_version inode field. - .TP -+.B encryption -+Specifies an encryption algorithm to use. Used in conjunction with the -+.BR loop " option." -+.TP -+.B keybits -+Specifies the key size to use for an encryption algorithm. Used in conjunction -+with the -+.BR loop " and " encryption " options." -+.TP - .B mand - Allow mandatory locks on this filesystem. See - .BR fcntl (2). -@@ -2697,6 +2706,10 @@ that are really options to - .BR \%losetup (8). - (These options can be used in addition to those specific - to the filesystem type.) -+If the mount requires a passphrase, you will be prompted for one unless -+you specify a file descriptor to read from instead with the -+.BR \-\-pass-fd -+option. - - Since Linux 2.6.25 is supported auto-destruction of loop devices and - then any loop device allocated by -Index: util-linux-2.20-rc2/mount/mount.c -=================================================================== ---- util-linux-2.20-rc2.orig/mount/mount.c -+++ util-linux-2.20-rc2/mount/mount.c -@@ -105,6 +105,9 @@ struct mountargs { - void *data; - }; - -+/* Contains the preferred keysize in bits we want to use */ -+static int keysz = 0; -+ - /* Map from -o and fstab option strings to the flag argument to mount(2). */ - struct opt_map { - const char *opt; /* option name */ -@@ -210,6 +213,7 @@ static int opt_nofail = 0; - - static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_sizelimit, - *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper, *opt_helper; -+static const char *opt_keybits, *opt_phash; - - static int is_readonly(const char *node); - static int mounted (const char *spec0, const char *node0, struct mntentchn *fstab_mc); -@@ -226,6 +230,8 @@ static struct string_opt_map { - { "offset=", 0, &opt_offset }, - { "sizelimit=", 0, &opt_sizelimit }, - { "encryption=", 0, &opt_encryption }, -+ { "phash=", 0, &opt_phash }, -+ { "keybits=", 0, &opt_keybits }, - { "speed=", 0, &opt_speed }, - { "comment=", 1, &opt_comment }, - { "uhelper=", 0, &opt_uhelper }, -@@ -1224,7 +1230,8 @@ loop_check(const char **spec, const char - *type = opt_vfstype; - } - -- *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_sizelimit || opt_encryption); -+ *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_sizelimit || -+ opt_encryption || opt_phash || opt_keybits); - *loopfile = *spec; - - /* Automatically create a loop device from a regular file if a filesystem -@@ -1289,7 +1296,7 @@ loop_check(const char **spec, const char - printf(_("mount: going to use the loop device %s\n"), *loopdev); - - if ((res = set_loop(*loopdev, *loopfile, offset, sizelimit, -- opt_encryption, pfd, &loop_opts))) { -+ opt_encryption, opt_phash, pfd, &loop_opts, keysz))) { - if (res == 2) { - /* loop dev has been grabbed by some other process, - try again, if not given explicitly */ -@@ -2269,6 +2276,7 @@ static struct option longopts[] = { - { "options", 1, 0, 'o' }, - { "test-opts", 1, 0, 'O' }, - { "pass-fd", 1, 0, 'p' }, -+ { "keybits", 1, 0, 'k' }, - { "types", 1, 0, 't' }, - { "bind", 0, 0, 'B' }, - { "move", 0, 0, 'M' }, -@@ -2432,6 +2440,7 @@ main(int argc, char *argv[]) { - char *options = NULL, *test_opts = NULL, *node; - const char *spec = NULL; - char *label = NULL; -+ char *keysize = NULL; - char *uuid = NULL; - char *types = NULL; - char *p; -@@ -2462,7 +2471,7 @@ main(int argc, char *argv[]) { - initproctitle(argc, argv); - #endif - -- while ((c = getopt_long (argc, argv, "aBfFhilL:Mno:O:p:rRsU:vVwt:", -+ while ((c = getopt_long (argc, argv, "aBfFhik:lL:Mno:O:p:rRsU:vVwt:", - longopts, NULL)) != -1) { - switch (c) { - case 'a': /* mount everything in fstab */ -@@ -2483,6 +2492,9 @@ main(int argc, char *argv[]) { - case 'i': - external_allowed = 0; - break; -+ case 'k': -+ keysize = optarg; -+ break; - case 'l': - list_with_volumelabel = 1; - break; -@@ -2633,6 +2645,9 @@ main(int argc, char *argv[]) { - - atexit(unlock_mtab); - -+ if (keysize && sscanf(keysize,"%d",&keysz) != 1) -+ die (EX_USAGE, _("mount: argument to --keybits or -k must be a number")); -+ - switch (argc+specseen) { - case 0: - /* mount -a */ -Index: util-linux-2.20-rc2/mount/rmd160.c -=================================================================== ---- /dev/null -+++ util-linux-2.20-rc2/mount/rmd160.c -@@ -0,0 +1,532 @@ -+/* rmd160.c - RIPE-MD160 -+ * Copyright (C) 1998 Free Software Foundation, Inc. -+ */ -+ -+/* This file was part of GnuPG. Modified for use within the Linux -+ * mount utility by Marc Mutz . None of this code is -+ * by myself. I just removed everything that you don't need when all -+ * you want to do is to use rmd160_hash_buffer(). -+ * My comments are marked with (mm). */ -+ -+/* GnuPG is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * GnuPG is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -+ -+#include /* (mm) for memcpy */ -+#include /* (mm) for BIG_ENDIAN and BYTE_ORDER */ -+#include "rmd160.h" -+ -+/* (mm) these are used by the original GnuPG file. In order to modify -+ * that file not too much, we keep the notations. maybe it would be -+ * better to include linux/types.h and typedef __u32 to u32 and __u8 -+ * to byte? */ -+typedef unsigned int u32; /* taken from e.g. util-linux's minix.h */ -+typedef unsigned char byte; -+ -+typedef struct { -+ u32 h0,h1,h2,h3,h4; -+ u32 nblocks; -+ byte buf[64]; -+ int count; -+} RMD160_CONTEXT; -+ -+/**************** -+ * Rotate a 32 bit integer by n bytes -+ */ -+#if defined(__GNUC__) && defined(__i386__) -+static inline u32 -+rol( u32 x, int n) -+{ -+ __asm__("roll %%cl,%0" -+ :"=r" (x) -+ :"0" (x),"c" (n)); -+ return x; -+} -+#else -+ #define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) ) -+#endif -+ -+/********************************* -+ * RIPEMD-160 is not patented, see (as of 25.10.97) -+ * http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html -+ * Note that the code uses Little Endian byteorder, which is good for -+ * 386 etc, but we must add some conversion when used on a big endian box. -+ * -+ * -+ * Pseudo-code for RIPEMD-160 -+ * -+ * RIPEMD-160 is an iterative hash function that operates on 32-bit words. -+ * The round function takes as input a 5-word chaining variable and a 16-word -+ * message block and maps this to a new chaining variable. All operations are -+ * defined on 32-bit words. Padding is identical to that of MD4. -+ * -+ * -+ * RIPEMD-160: definitions -+ * -+ * -+ * nonlinear functions at bit level: exor, mux, -, mux, - -+ * -+ * f(j, x, y, z) = x XOR y XOR z (0 <= j <= 15) -+ * f(j, x, y, z) = (x AND y) OR (NOT(x) AND z) (16 <= j <= 31) -+ * f(j, x, y, z) = (x OR NOT(y)) XOR z (32 <= j <= 47) -+ * f(j, x, y, z) = (x AND z) OR (y AND NOT(z)) (48 <= j <= 63) -+ * f(j, x, y, z) = x XOR (y OR NOT(z)) (64 <= j <= 79) -+ * -+ * -+ * added constants (hexadecimal) -+ * -+ * K(j) = 0x00000000 (0 <= j <= 15) -+ * K(j) = 0x5A827999 (16 <= j <= 31) int(2**30 x sqrt(2)) -+ * K(j) = 0x6ED9EBA1 (32 <= j <= 47) int(2**30 x sqrt(3)) -+ * K(j) = 0x8F1BBCDC (48 <= j <= 63) int(2**30 x sqrt(5)) -+ * K(j) = 0xA953FD4E (64 <= j <= 79) int(2**30 x sqrt(7)) -+ * K'(j) = 0x50A28BE6 (0 <= j <= 15) int(2**30 x cbrt(2)) -+ * K'(j) = 0x5C4DD124 (16 <= j <= 31) int(2**30 x cbrt(3)) -+ * K'(j) = 0x6D703EF3 (32 <= j <= 47) int(2**30 x cbrt(5)) -+ * K'(j) = 0x7A6D76E9 (48 <= j <= 63) int(2**30 x cbrt(7)) -+ * K'(j) = 0x00000000 (64 <= j <= 79) -+ * -+ * -+ * selection of message word -+ * -+ * r(j) = j (0 <= j <= 15) -+ * r(16..31) = 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8 -+ * r(32..47) = 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12 -+ * r(48..63) = 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2 -+ * r(64..79) = 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 -+ * r0(0..15) = 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12 -+ * r0(16..31)= 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2 -+ * r0(32..47)= 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13 -+ * r0(48..63)= 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14 -+ * r0(64..79)= 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 -+ * -+ * -+ * amount for rotate left (rol) -+ * -+ * s(0..15) = 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8 -+ * s(16..31) = 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12 -+ * s(32..47) = 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5 -+ * s(48..63) = 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12 -+ * s(64..79) = 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 -+ * s'(0..15) = 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6 -+ * s'(16..31)= 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11 -+ * s'(32..47)= 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5 -+ * s'(48..63)= 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8 -+ * s'(64..79)= 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 -+ * -+ * -+ * initial value (hexadecimal) -+ * -+ * h0 = 0x67452301; h1 = 0xEFCDAB89; h2 = 0x98BADCFE; h3 = 0x10325476; -+ * h4 = 0xC3D2E1F0; -+ * -+ * -+ * RIPEMD-160: pseudo-code -+ * -+ * It is assumed that the message after padding consists of t 16-word blocks -+ * that will be denoted with X[i][j], with 0 <= i <= t-1 and 0 <= j <= 15. -+ * The symbol [+] denotes addition modulo 2**32 and rol_s denotes cyclic left -+ * shift (rotate) over s positions. -+ * -+ * -+ * for i := 0 to t-1 { -+ * A := h0; B := h1; C := h2; D = h3; E = h4; -+ * A' := h0; B' := h1; C' := h2; D' = h3; E' = h4; -+ * for j := 0 to 79 { -+ * T := rol_s(j)(A [+] f(j, B, C, D) [+] X[i][r(j)] [+] K(j)) [+] E; -+ * A := E; E := D; D := rol_10(C); C := B; B := T; -+ * T := rol_s'(j)(A' [+] f(79-j, B', C', D') [+] X[i][r'(j)] -+ [+] K'(j)) [+] E'; -+ * A' := E'; E' := D'; D' := rol_10(C'); C' := B'; B' := T; -+ * } -+ * T := h1 [+] C [+] D'; h1 := h2 [+] D [+] E'; h2 := h3 [+] E [+] A'; -+ * h3 := h4 [+] A [+] B'; h4 := h0 [+] B [+] C'; h0 := T; -+ * } -+ */ -+ -+/* Some examples: -+ * "" 9c1185a5c5e9fc54612808977ee8f548b2258d31 -+ * "a" 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe -+ * "abc" 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc -+ * "message digest" 5d0689ef49d2fae572b881b123a85ffa21595f36 -+ * "a...z" f71c27109c692c1b56bbdceb5b9d2865b3708dbc -+ * "abcdbcde...nopq" 12a053384a9c0c88e405a06c27dcf49ada62eb2b -+ * "A...Za...z0...9" b0e20b6e3116640286ed3a87a5713079b21f5189 -+ * 8 times "1234567890" 9b752e45573d4b39f4dbd3323cab82bf63326bfb -+ * 1 million times "a" 52783243c1697bdbe16d37f97f68f08325dc1528 -+ */ -+ -+ -+static void -+rmd160_init( RMD160_CONTEXT *hd ) -+{ -+ hd->h0 = 0x67452301; -+ hd->h1 = 0xEFCDAB89; -+ hd->h2 = 0x98BADCFE; -+ hd->h3 = 0x10325476; -+ hd->h4 = 0xC3D2E1F0; -+ hd->nblocks = 0; -+ hd->count = 0; -+} -+ -+ -+ -+/**************** -+ * Transform the message X which consists of 16 32-bit-words -+ */ -+static void -+transform( RMD160_CONTEXT *hd, const byte *data ) -+{ -+ u32 a,b,c,d,e,aa,bb,cc,dd,ee,t; -+ #if BYTE_ORDER == BIG_ENDIAN -+ u32 x[16]; -+ { int i; -+ byte *p2, *p1; -+ for(i=0, p1=data, p2=(byte*)x; i < 16; i++, p2 += 4 ) { -+ p2[3] = *p1++; -+ p2[2] = *p1++; -+ p2[1] = *p1++; -+ p2[0] = *p1++; -+ } -+ } -+ #else -+ #if 0 -+ u32 *x =(u32*)data; -+ #else -+ /* this version is better because it is always aligned; -+ * The performance penalty on a 586-100 is about 6% which -+ * is acceptable - because the data is more local it might -+ * also be possible that this is faster on some machines. -+ * This function (when compiled with -02 on gcc 2.7.2) -+ * executes on a 586-100 (39.73 bogomips) at about 1900kb/sec; -+ * [measured with a 4MB data and "gpgm --print-md rmd160"] */ -+ u32 x[16]; -+ memcpy( x, data, 64 ); -+ #endif -+ #endif -+ -+ -+#define K0 0x00000000 -+#define K1 0x5A827999 -+#define K2 0x6ED9EBA1 -+#define K3 0x8F1BBCDC -+#define K4 0xA953FD4E -+#define KK0 0x50A28BE6 -+#define KK1 0x5C4DD124 -+#define KK2 0x6D703EF3 -+#define KK3 0x7A6D76E9 -+#define KK4 0x00000000 -+#define F0(x,y,z) ( (x) ^ (y) ^ (z) ) -+#define F1(x,y,z) ( ((x) & (y)) | (~(x) & (z)) ) -+#define F2(x,y,z) ( ((x) | ~(y)) ^ (z) ) -+#define F3(x,y,z) ( ((x) & (z)) | ((y) & ~(z)) ) -+#define F4(x,y,z) ( (x) ^ ((y) | ~(z)) ) -+#define R(a,b,c,d,e,f,k,r,s) do { t = a + f(b,c,d) + k + x[r]; \ -+ a = rol(t,s) + e; \ -+ c = rol(c,10); \ -+ } while(0) -+ -+ /* left lane */ -+ a = hd->h0; -+ b = hd->h1; -+ c = hd->h2; -+ d = hd->h3; -+ e = hd->h4; -+ R( a, b, c, d, e, F0, K0, 0, 11 ); -+ R( e, a, b, c, d, F0, K0, 1, 14 ); -+ R( d, e, a, b, c, F0, K0, 2, 15 ); -+ R( c, d, e, a, b, F0, K0, 3, 12 ); -+ R( b, c, d, e, a, F0, K0, 4, 5 ); -+ R( a, b, c, d, e, F0, K0, 5, 8 ); -+ R( e, a, b, c, d, F0, K0, 6, 7 ); -+ R( d, e, a, b, c, F0, K0, 7, 9 ); -+ R( c, d, e, a, b, F0, K0, 8, 11 ); -+ R( b, c, d, e, a, F0, K0, 9, 13 ); -+ R( a, b, c, d, e, F0, K0, 10, 14 ); -+ R( e, a, b, c, d, F0, K0, 11, 15 ); -+ R( d, e, a, b, c, F0, K0, 12, 6 ); -+ R( c, d, e, a, b, F0, K0, 13, 7 ); -+ R( b, c, d, e, a, F0, K0, 14, 9 ); -+ R( a, b, c, d, e, F0, K0, 15, 8 ); -+ R( e, a, b, c, d, F1, K1, 7, 7 ); -+ R( d, e, a, b, c, F1, K1, 4, 6 ); -+ R( c, d, e, a, b, F1, K1, 13, 8 ); -+ R( b, c, d, e, a, F1, K1, 1, 13 ); -+ R( a, b, c, d, e, F1, K1, 10, 11 ); -+ R( e, a, b, c, d, F1, K1, 6, 9 ); -+ R( d, e, a, b, c, F1, K1, 15, 7 ); -+ R( c, d, e, a, b, F1, K1, 3, 15 ); -+ R( b, c, d, e, a, F1, K1, 12, 7 ); -+ R( a, b, c, d, e, F1, K1, 0, 12 ); -+ R( e, a, b, c, d, F1, K1, 9, 15 ); -+ R( d, e, a, b, c, F1, K1, 5, 9 ); -+ R( c, d, e, a, b, F1, K1, 2, 11 ); -+ R( b, c, d, e, a, F1, K1, 14, 7 ); -+ R( a, b, c, d, e, F1, K1, 11, 13 ); -+ R( e, a, b, c, d, F1, K1, 8, 12 ); -+ R( d, e, a, b, c, F2, K2, 3, 11 ); -+ R( c, d, e, a, b, F2, K2, 10, 13 ); -+ R( b, c, d, e, a, F2, K2, 14, 6 ); -+ R( a, b, c, d, e, F2, K2, 4, 7 ); -+ R( e, a, b, c, d, F2, K2, 9, 14 ); -+ R( d, e, a, b, c, F2, K2, 15, 9 ); -+ R( c, d, e, a, b, F2, K2, 8, 13 ); -+ R( b, c, d, e, a, F2, K2, 1, 15 ); -+ R( a, b, c, d, e, F2, K2, 2, 14 ); -+ R( e, a, b, c, d, F2, K2, 7, 8 ); -+ R( d, e, a, b, c, F2, K2, 0, 13 ); -+ R( c, d, e, a, b, F2, K2, 6, 6 ); -+ R( b, c, d, e, a, F2, K2, 13, 5 ); -+ R( a, b, c, d, e, F2, K2, 11, 12 ); -+ R( e, a, b, c, d, F2, K2, 5, 7 ); -+ R( d, e, a, b, c, F2, K2, 12, 5 ); -+ R( c, d, e, a, b, F3, K3, 1, 11 ); -+ R( b, c, d, e, a, F3, K3, 9, 12 ); -+ R( a, b, c, d, e, F3, K3, 11, 14 ); -+ R( e, a, b, c, d, F3, K3, 10, 15 ); -+ R( d, e, a, b, c, F3, K3, 0, 14 ); -+ R( c, d, e, a, b, F3, K3, 8, 15 ); -+ R( b, c, d, e, a, F3, K3, 12, 9 ); -+ R( a, b, c, d, e, F3, K3, 4, 8 ); -+ R( e, a, b, c, d, F3, K3, 13, 9 ); -+ R( d, e, a, b, c, F3, K3, 3, 14 ); -+ R( c, d, e, a, b, F3, K3, 7, 5 ); -+ R( b, c, d, e, a, F3, K3, 15, 6 ); -+ R( a, b, c, d, e, F3, K3, 14, 8 ); -+ R( e, a, b, c, d, F3, K3, 5, 6 ); -+ R( d, e, a, b, c, F3, K3, 6, 5 ); -+ R( c, d, e, a, b, F3, K3, 2, 12 ); -+ R( b, c, d, e, a, F4, K4, 4, 9 ); -+ R( a, b, c, d, e, F4, K4, 0, 15 ); -+ R( e, a, b, c, d, F4, K4, 5, 5 ); -+ R( d, e, a, b, c, F4, K4, 9, 11 ); -+ R( c, d, e, a, b, F4, K4, 7, 6 ); -+ R( b, c, d, e, a, F4, K4, 12, 8 ); -+ R( a, b, c, d, e, F4, K4, 2, 13 ); -+ R( e, a, b, c, d, F4, K4, 10, 12 ); -+ R( d, e, a, b, c, F4, K4, 14, 5 ); -+ R( c, d, e, a, b, F4, K4, 1, 12 ); -+ R( b, c, d, e, a, F4, K4, 3, 13 ); -+ R( a, b, c, d, e, F4, K4, 8, 14 ); -+ R( e, a, b, c, d, F4, K4, 11, 11 ); -+ R( d, e, a, b, c, F4, K4, 6, 8 ); -+ R( c, d, e, a, b, F4, K4, 15, 5 ); -+ R( b, c, d, e, a, F4, K4, 13, 6 ); -+ -+ aa = a; bb = b; cc = c; dd = d; ee = e; -+ -+ /* right lane */ -+ a = hd->h0; -+ b = hd->h1; -+ c = hd->h2; -+ d = hd->h3; -+ e = hd->h4; -+ R( a, b, c, d, e, F4, KK0, 5, 8); -+ R( e, a, b, c, d, F4, KK0, 14, 9); -+ R( d, e, a, b, c, F4, KK0, 7, 9); -+ R( c, d, e, a, b, F4, KK0, 0, 11); -+ R( b, c, d, e, a, F4, KK0, 9, 13); -+ R( a, b, c, d, e, F4, KK0, 2, 15); -+ R( e, a, b, c, d, F4, KK0, 11, 15); -+ R( d, e, a, b, c, F4, KK0, 4, 5); -+ R( c, d, e, a, b, F4, KK0, 13, 7); -+ R( b, c, d, e, a, F4, KK0, 6, 7); -+ R( a, b, c, d, e, F4, KK0, 15, 8); -+ R( e, a, b, c, d, F4, KK0, 8, 11); -+ R( d, e, a, b, c, F4, KK0, 1, 14); -+ R( c, d, e, a, b, F4, KK0, 10, 14); -+ R( b, c, d, e, a, F4, KK0, 3, 12); -+ R( a, b, c, d, e, F4, KK0, 12, 6); -+ R( e, a, b, c, d, F3, KK1, 6, 9); -+ R( d, e, a, b, c, F3, KK1, 11, 13); -+ R( c, d, e, a, b, F3, KK1, 3, 15); -+ R( b, c, d, e, a, F3, KK1, 7, 7); -+ R( a, b, c, d, e, F3, KK1, 0, 12); -+ R( e, a, b, c, d, F3, KK1, 13, 8); -+ R( d, e, a, b, c, F3, KK1, 5, 9); -+ R( c, d, e, a, b, F3, KK1, 10, 11); -+ R( b, c, d, e, a, F3, KK1, 14, 7); -+ R( a, b, c, d, e, F3, KK1, 15, 7); -+ R( e, a, b, c, d, F3, KK1, 8, 12); -+ R( d, e, a, b, c, F3, KK1, 12, 7); -+ R( c, d, e, a, b, F3, KK1, 4, 6); -+ R( b, c, d, e, a, F3, KK1, 9, 15); -+ R( a, b, c, d, e, F3, KK1, 1, 13); -+ R( e, a, b, c, d, F3, KK1, 2, 11); -+ R( d, e, a, b, c, F2, KK2, 15, 9); -+ R( c, d, e, a, b, F2, KK2, 5, 7); -+ R( b, c, d, e, a, F2, KK2, 1, 15); -+ R( a, b, c, d, e, F2, KK2, 3, 11); -+ R( e, a, b, c, d, F2, KK2, 7, 8); -+ R( d, e, a, b, c, F2, KK2, 14, 6); -+ R( c, d, e, a, b, F2, KK2, 6, 6); -+ R( b, c, d, e, a, F2, KK2, 9, 14); -+ R( a, b, c, d, e, F2, KK2, 11, 12); -+ R( e, a, b, c, d, F2, KK2, 8, 13); -+ R( d, e, a, b, c, F2, KK2, 12, 5); -+ R( c, d, e, a, b, F2, KK2, 2, 14); -+ R( b, c, d, e, a, F2, KK2, 10, 13); -+ R( a, b, c, d, e, F2, KK2, 0, 13); -+ R( e, a, b, c, d, F2, KK2, 4, 7); -+ R( d, e, a, b, c, F2, KK2, 13, 5); -+ R( c, d, e, a, b, F1, KK3, 8, 15); -+ R( b, c, d, e, a, F1, KK3, 6, 5); -+ R( a, b, c, d, e, F1, KK3, 4, 8); -+ R( e, a, b, c, d, F1, KK3, 1, 11); -+ R( d, e, a, b, c, F1, KK3, 3, 14); -+ R( c, d, e, a, b, F1, KK3, 11, 14); -+ R( b, c, d, e, a, F1, KK3, 15, 6); -+ R( a, b, c, d, e, F1, KK3, 0, 14); -+ R( e, a, b, c, d, F1, KK3, 5, 6); -+ R( d, e, a, b, c, F1, KK3, 12, 9); -+ R( c, d, e, a, b, F1, KK3, 2, 12); -+ R( b, c, d, e, a, F1, KK3, 13, 9); -+ R( a, b, c, d, e, F1, KK3, 9, 12); -+ R( e, a, b, c, d, F1, KK3, 7, 5); -+ R( d, e, a, b, c, F1, KK3, 10, 15); -+ R( c, d, e, a, b, F1, KK3, 14, 8); -+ R( b, c, d, e, a, F0, KK4, 12, 8); -+ R( a, b, c, d, e, F0, KK4, 15, 5); -+ R( e, a, b, c, d, F0, KK4, 10, 12); -+ R( d, e, a, b, c, F0, KK4, 4, 9); -+ R( c, d, e, a, b, F0, KK4, 1, 12); -+ R( b, c, d, e, a, F0, KK4, 5, 5); -+ R( a, b, c, d, e, F0, KK4, 8, 14); -+ R( e, a, b, c, d, F0, KK4, 7, 6); -+ R( d, e, a, b, c, F0, KK4, 6, 8); -+ R( c, d, e, a, b, F0, KK4, 2, 13); -+ R( b, c, d, e, a, F0, KK4, 13, 6); -+ R( a, b, c, d, e, F0, KK4, 14, 5); -+ R( e, a, b, c, d, F0, KK4, 0, 15); -+ R( d, e, a, b, c, F0, KK4, 3, 13); -+ R( c, d, e, a, b, F0, KK4, 9, 11); -+ R( b, c, d, e, a, F0, KK4, 11, 11); -+ -+ -+ t = hd->h1 + d + cc; -+ hd->h1 = hd->h2 + e + dd; -+ hd->h2 = hd->h3 + a + ee; -+ hd->h3 = hd->h4 + b + aa; -+ hd->h4 = hd->h0 + c + bb; -+ hd->h0 = t; -+} -+ -+ -+/* Update the message digest with the contents -+ * of INBUF with length INLEN. -+ */ -+static void -+rmd160_write( RMD160_CONTEXT *hd, const byte *inbuf, size_t inlen) -+{ -+ if( hd->count == 64 ) { /* flush the buffer */ -+ transform( hd, hd->buf ); -+ hd->count = 0; -+ hd->nblocks++; -+ } -+ if( !inbuf ) -+ return; -+ if( hd->count ) { -+ for( ; inlen && hd->count < 64; inlen-- ) -+ hd->buf[hd->count++] = *inbuf++; -+ rmd160_write( hd, NULL, 0 ); -+ if( !inlen ) -+ return; -+ } -+ -+ while( inlen >= 64 ) { -+ transform( hd, inbuf ); -+ hd->count = 0; -+ hd->nblocks++; -+ inlen -= 64; -+ inbuf += 64; -+ } -+ for( ; inlen && hd->count < 64; inlen-- ) -+ hd->buf[hd->count++] = *inbuf++; -+} -+ -+/* The routine terminates the computation -+ */ -+ -+static void -+rmd160_final( RMD160_CONTEXT *hd ) -+{ -+ u32 t, msb, lsb; -+ byte *p; -+ -+ rmd160_write(hd, NULL, 0); /* flush */; -+ -+ msb = 0; -+ t = hd->nblocks; -+ if( (lsb = t << 6) < t ) /* multiply by 64 to make a byte count */ -+ msb++; -+ msb += t >> 26; -+ t = lsb; -+ if( (lsb = t + hd->count) < t ) /* add the count */ -+ msb++; -+ t = lsb; -+ if( (lsb = t << 3) < t ) /* multiply by 8 to make a bit count */ -+ msb++; -+ msb += t >> 29; -+ -+ if( hd->count < 56 ) { /* enough room */ -+ hd->buf[hd->count++] = 0x80; /* pad */ -+ while( hd->count < 56 ) -+ hd->buf[hd->count++] = 0; /* pad */ -+ } -+ else { /* need one extra block */ -+ hd->buf[hd->count++] = 0x80; /* pad character */ -+ while( hd->count < 64 ) -+ hd->buf[hd->count++] = 0; -+ rmd160_write(hd, NULL, 0); /* flush */; -+ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */ -+ } -+ /* append the 64 bit count */ -+ hd->buf[56] = lsb ; -+ hd->buf[57] = lsb >> 8; -+ hd->buf[58] = lsb >> 16; -+ hd->buf[59] = lsb >> 24; -+ hd->buf[60] = msb ; -+ hd->buf[61] = msb >> 8; -+ hd->buf[62] = msb >> 16; -+ hd->buf[63] = msb >> 24; -+ transform( hd, hd->buf ); -+ -+ p = hd->buf; -+ #if BYTE_ORDER == BIG_ENDIAN -+ #define X(a) do { *p++ = hd->h##a ; *p++ = hd->h##a >> 8; \ -+ *p++ = hd->h##a >> 16; *p++ = hd->h##a >> 24; } while(0) -+ #else /* little endian */ -+ #define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0) -+ #endif -+ X(0); -+ X(1); -+ X(2); -+ X(3); -+ X(4); -+ #undef X -+} -+ -+/**************** -+ * Shortcut functions which puts the hash value of the supplied buffer -+ * into outbuf which must have a size of 20 bytes. -+ */ -+void -+rmd160_hash_buffer( unsigned char *outbuf, const unsigned char *buffer, size_t length ) -+{ -+ RMD160_CONTEXT hd; -+ -+ rmd160_init( &hd ); -+ rmd160_write( &hd, buffer, length ); -+ rmd160_final( &hd ); -+ memcpy( outbuf, hd.buf, 20 ); -+} -Index: util-linux-2.20-rc2/mount/rmd160.h -=================================================================== ---- /dev/null -+++ util-linux-2.20-rc2/mount/rmd160.h -@@ -0,0 +1,11 @@ -+#ifndef RMD160_H -+#define RMD160_H -+ -+#define RMD160_HASH_SIZE 20 -+ -+void -+rmd160_hash_buffer( unsigned char *outbuf, const unsigned char *buffer, size_t length ); -+ -+#endif /*RMD160_H*/ -+ -+ -Index: util-linux-2.20-rc2/mount/sha512.c -=================================================================== ---- /dev/null -+++ util-linux-2.20-rc2/mount/sha512.c -@@ -0,0 +1,432 @@ -+/* -+ * sha512.c -+ * -+ * Written by Jari Ruusu, April 16 2001 -+ * -+ * Copyright 2001 by Jari Ruusu. -+ * Redistribution of this file is permitted under the GNU Public License. -+ */ -+ -+#include -+#include -+#include "sha512.h" -+ -+/* Define one or more of these. If none is defined, you get all of them */ -+#if !defined(SHA256_NEEDED)&&!defined(SHA512_NEEDED)&&!defined(SHA384_NEEDED) -+# define SHA256_NEEDED 1 -+# define SHA512_NEEDED 1 -+# define SHA384_NEEDED 1 -+#endif -+ -+#if defined(SHA256_NEEDED) -+static const u_int32_t sha256_hashInit[8] = { -+ 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, -+ 0x1f83d9ab, 0x5be0cd19 -+}; -+static const u_int32_t sha256_K[64] = { -+ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, -+ 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, -+ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, -+ 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, -+ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, -+ 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, -+ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, -+ 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, -+ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, -+ 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, -+ 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 -+}; -+#endif -+ -+#if defined(SHA512_NEEDED) -+static const u_int64_t sha512_hashInit[8] = { -+ 0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, 0x3c6ef372fe94f82bULL, -+ 0xa54ff53a5f1d36f1ULL, 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, -+ 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL -+}; -+#endif -+ -+#if defined(SHA384_NEEDED) -+static const u_int64_t sha384_hashInit[8] = { -+ 0xcbbb9d5dc1059ed8ULL, 0x629a292a367cd507ULL, 0x9159015a3070dd17ULL, -+ 0x152fecd8f70e5939ULL, 0x67332667ffc00b31ULL, 0x8eb44a8768581511ULL, -+ 0xdb0c2e0d64f98fa7ULL, 0x47b5481dbefa4fa4ULL -+}; -+#endif -+ -+#if defined(SHA512_NEEDED) || defined(SHA384_NEEDED) -+static const u_int64_t sha512_K[80] = { -+ 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL, -+ 0xe9b5dba58189dbbcULL, 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL, -+ 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL, 0xd807aa98a3030242ULL, -+ 0x12835b0145706fbeULL, 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL, -+ 0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL, 0x9bdc06a725c71235ULL, -+ 0xc19bf174cf692694ULL, 0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL, -+ 0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL, 0x2de92c6f592b0275ULL, -+ 0x4a7484aa6ea6e483ULL, 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL, -+ 0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL, 0xb00327c898fb213fULL, -+ 0xbf597fc7beef0ee4ULL, 0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL, -+ 0x06ca6351e003826fULL, 0x142929670a0e6e70ULL, 0x27b70a8546d22ffcULL, -+ 0x2e1b21385c26c926ULL, 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL, -+ 0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL, 0x81c2c92e47edaee6ULL, -+ 0x92722c851482353bULL, 0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL, -+ 0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL, 0xd192e819d6ef5218ULL, -+ 0xd69906245565a910ULL, 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL, -+ 0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL, 0x2748774cdf8eeb99ULL, -+ 0x34b0bcb5e19b48a8ULL, 0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL, -+ 0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL, 0x748f82ee5defb2fcULL, -+ 0x78a5636f43172f60ULL, 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL, -+ 0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL, 0xbef9a3f7b2c67915ULL, -+ 0xc67178f2e372532bULL, 0xca273eceea26619cULL, 0xd186b8c721c0c207ULL, -+ 0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL, 0x06f067aa72176fbaULL, -+ 0x0a637dc5a2c898a6ULL, 0x113f9804bef90daeULL, 0x1b710b35131c471bULL, -+ 0x28db77f523047d84ULL, 0x32caab7b40c72493ULL, 0x3c9ebe0a15c9bebcULL, -+ 0x431d67c49c100d4cULL, 0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL, -+ 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL -+}; -+#endif -+ -+#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z))) -+#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) -+#define R(x,y) ((y) >> (x)) -+ -+#if defined(SHA256_NEEDED) -+void sha256_init(sha256_context *ctx) -+{ -+ memcpy(&ctx->sha_H[0], &sha256_hashInit[0], sizeof(ctx->sha_H)); -+ ctx->sha_blocks = 0; -+ ctx->sha_bufCnt = 0; -+} -+ -+#define S(x,y) (((y) >> (x)) | ((y) << (32 - (x)))) -+#define uSig0(x) ((S(2,(x))) ^ (S(13,(x))) ^ (S(22,(x)))) -+#define uSig1(x) ((S(6,(x))) ^ (S(11,(x))) ^ (S(25,(x)))) -+#define lSig0(x) ((S(7,(x))) ^ (S(18,(x))) ^ (R(3,(x)))) -+#define lSig1(x) ((S(17,(x))) ^ (S(19,(x))) ^ (R(10,(x)))) -+ -+static void sha256_transform(sha256_context *ctx, const unsigned char *datap) -+{ -+ register int j; -+ u_int32_t a, b, c, d, e, f, g, h; -+ u_int32_t T1, T2, W[64], Wm2, Wm15; -+ -+ /* read the data, big endian byte order */ -+ j = 0; -+ do { -+ W[j] = (((u_int32_t)(datap[0]))<<24) | (((u_int32_t)(datap[1]))<<16) | -+ (((u_int32_t)(datap[2]))<<8 ) | ((u_int32_t)(datap[3])); -+ datap += 4; -+ } while(++j < 16); -+ -+ /* initialize variables a...h */ -+ a = ctx->sha_H[0]; -+ b = ctx->sha_H[1]; -+ c = ctx->sha_H[2]; -+ d = ctx->sha_H[3]; -+ e = ctx->sha_H[4]; -+ f = ctx->sha_H[5]; -+ g = ctx->sha_H[6]; -+ h = ctx->sha_H[7]; -+ -+ /* apply compression function */ -+ j = 0; -+ do { -+ if(j >= 16) { -+ Wm2 = W[j - 2]; -+ Wm15 = W[j - 15]; -+ W[j] = lSig1(Wm2) + W[j - 7] + lSig0(Wm15) + W[j - 16]; -+ } -+ T1 = h + uSig1(e) + Ch(e,f,g) + sha256_K[j] + W[j]; -+ T2 = uSig0(a) + Maj(a,b,c); -+ h = g; g = f; f = e; -+ e = d + T1; -+ d = c; c = b; b = a; -+ a = T1 + T2; -+ } while(++j < 64); -+ -+ /* compute intermediate hash value */ -+ ctx->sha_H[0] += a; -+ ctx->sha_H[1] += b; -+ ctx->sha_H[2] += c; -+ ctx->sha_H[3] += d; -+ ctx->sha_H[4] += e; -+ ctx->sha_H[5] += f; -+ ctx->sha_H[6] += g; -+ ctx->sha_H[7] += h; -+ -+ ctx->sha_blocks++; -+} -+ -+void sha256_write(sha256_context *ctx, const unsigned char *datap, int length) -+{ -+ while(length > 0) { -+ if(!ctx->sha_bufCnt) { -+ while(length >= sizeof(ctx->sha_out)) { -+ sha256_transform(ctx, datap); -+ datap += sizeof(ctx->sha_out); -+ length -= sizeof(ctx->sha_out); -+ } -+ if(!length) return; -+ } -+ ctx->sha_out[ctx->sha_bufCnt] = *datap++; -+ length--; -+ if(++ctx->sha_bufCnt == sizeof(ctx->sha_out)) { -+ sha256_transform(ctx, &ctx->sha_out[0]); -+ ctx->sha_bufCnt = 0; -+ } -+ } -+} -+ -+void sha256_final(sha256_context *ctx) -+{ -+ register int j; -+ u_int64_t bitLength; -+ u_int32_t i; -+ unsigned char padByte, *datap; -+ -+ bitLength = (ctx->sha_blocks << 9) | (ctx->sha_bufCnt << 3); -+ padByte = 0x80; -+ sha256_write(ctx, &padByte, 1); -+ -+ /* pad extra space with zeroes */ -+ padByte = 0; -+ while(ctx->sha_bufCnt != 56) { -+ sha256_write(ctx, &padByte, 1); -+ } -+ -+ /* write bit length, big endian byte order */ -+ ctx->sha_out[56] = bitLength >> 56; -+ ctx->sha_out[57] = bitLength >> 48; -+ ctx->sha_out[58] = bitLength >> 40; -+ ctx->sha_out[59] = bitLength >> 32; -+ ctx->sha_out[60] = bitLength >> 24; -+ ctx->sha_out[61] = bitLength >> 16; -+ ctx->sha_out[62] = bitLength >> 8; -+ ctx->sha_out[63] = bitLength; -+ sha256_transform(ctx, &ctx->sha_out[0]); -+ -+ /* return results in ctx->sha_out[0...31] */ -+ datap = &ctx->sha_out[0]; -+ j = 0; -+ do { -+ i = ctx->sha_H[j]; -+ datap[0] = i >> 24; -+ datap[1] = i >> 16; -+ datap[2] = i >> 8; -+ datap[3] = i; -+ datap += 4; -+ } while(++j < 8); -+ -+ /* clear sensitive information */ -+ memset(&ctx->sha_out[32], 0, sizeof(sha256_context) - 32); -+} -+ -+void sha256_hash_buffer(const unsigned char *ib, size_t ile, unsigned char *ob, size_t ole) -+{ -+ sha256_context ctx; -+ -+ if(ole < 1) return; -+ memset(ob, 0, ole); -+ if(ole > 32) ole = 32; -+ sha256_init(&ctx); -+ sha256_write(&ctx, ib, ile); -+ sha256_final(&ctx); -+ memcpy(ob, &ctx.sha_out[0], ole); -+ memset(&ctx, 0, sizeof(ctx)); -+} -+ -+#endif -+ -+#if defined(SHA512_NEEDED) -+void sha512_init(sha512_context *ctx) -+{ -+ memcpy(&ctx->sha_H[0], &sha512_hashInit[0], sizeof(ctx->sha_H)); -+ ctx->sha_blocks = 0; -+ ctx->sha_blocksMSB = 0; -+ ctx->sha_bufCnt = 0; -+} -+#endif -+ -+#if defined(SHA512_NEEDED) || defined(SHA384_NEEDED) -+#undef S -+#undef uSig0 -+#undef uSig1 -+#undef lSig0 -+#undef lSig1 -+#define S(x,y) (((y) >> (x)) | ((y) << (64 - (x)))) -+#define uSig0(x) ((S(28,(x))) ^ (S(34,(x))) ^ (S(39,(x)))) -+#define uSig1(x) ((S(14,(x))) ^ (S(18,(x))) ^ (S(41,(x)))) -+#define lSig0(x) ((S(1,(x))) ^ (S(8,(x))) ^ (R(7,(x)))) -+#define lSig1(x) ((S(19,(x))) ^ (S(61,(x))) ^ (R(6,(x)))) -+ -+static void sha512_transform(sha512_context *ctx, const unsigned char *datap) -+{ -+ register int j; -+ u_int64_t a, b, c, d, e, f, g, h; -+ u_int64_t T1, T2, W[80], Wm2, Wm15; -+ -+ /* read the data, big endian byte order */ -+ j = 0; -+ do { -+ W[j] = (((u_int64_t)(datap[0]))<<56) | (((u_int64_t)(datap[1]))<<48) | -+ (((u_int64_t)(datap[2]))<<40) | (((u_int64_t)(datap[3]))<<32) | -+ (((u_int64_t)(datap[4]))<<24) | (((u_int64_t)(datap[5]))<<16) | -+ (((u_int64_t)(datap[6]))<<8 ) | ((u_int64_t)(datap[7])); -+ datap += 8; -+ } while(++j < 16); -+ -+ /* initialize variables a...h */ -+ a = ctx->sha_H[0]; -+ b = ctx->sha_H[1]; -+ c = ctx->sha_H[2]; -+ d = ctx->sha_H[3]; -+ e = ctx->sha_H[4]; -+ f = ctx->sha_H[5]; -+ g = ctx->sha_H[6]; -+ h = ctx->sha_H[7]; -+ -+ /* apply compression function */ -+ j = 0; -+ do { -+ if(j >= 16) { -+ Wm2 = W[j - 2]; -+ Wm15 = W[j - 15]; -+ W[j] = lSig1(Wm2) + W[j - 7] + lSig0(Wm15) + W[j - 16]; -+ } -+ T1 = h + uSig1(e) + Ch(e,f,g) + sha512_K[j] + W[j]; -+ T2 = uSig0(a) + Maj(a,b,c); -+ h = g; g = f; f = e; -+ e = d + T1; -+ d = c; c = b; b = a; -+ a = T1 + T2; -+ } while(++j < 80); -+ -+ /* compute intermediate hash value */ -+ ctx->sha_H[0] += a; -+ ctx->sha_H[1] += b; -+ ctx->sha_H[2] += c; -+ ctx->sha_H[3] += d; -+ ctx->sha_H[4] += e; -+ ctx->sha_H[5] += f; -+ ctx->sha_H[6] += g; -+ ctx->sha_H[7] += h; -+ -+ ctx->sha_blocks++; -+ if(!ctx->sha_blocks) ctx->sha_blocksMSB++; -+} -+ -+void sha512_write(sha512_context *ctx, const unsigned char *datap, int length) -+{ -+ while(length > 0) { -+ if(!ctx->sha_bufCnt) { -+ while(length >= sizeof(ctx->sha_out)) { -+ sha512_transform(ctx, datap); -+ datap += sizeof(ctx->sha_out); -+ length -= sizeof(ctx->sha_out); -+ } -+ if(!length) return; -+ } -+ ctx->sha_out[ctx->sha_bufCnt] = *datap++; -+ length--; -+ if(++ctx->sha_bufCnt == sizeof(ctx->sha_out)) { -+ sha512_transform(ctx, &ctx->sha_out[0]); -+ ctx->sha_bufCnt = 0; -+ } -+ } -+} -+ -+void sha512_final(sha512_context *ctx) -+{ -+ register int j; -+ u_int64_t bitLength, bitLengthMSB; -+ u_int64_t i; -+ unsigned char padByte, *datap; -+ -+ bitLength = (ctx->sha_blocks << 10) | (ctx->sha_bufCnt << 3); -+ bitLengthMSB = (ctx->sha_blocksMSB << 10) | (ctx->sha_blocks >> 54); -+ padByte = 0x80; -+ sha512_write(ctx, &padByte, 1); -+ -+ /* pad extra space with zeroes */ -+ padByte = 0; -+ while(ctx->sha_bufCnt != 112) { -+ sha512_write(ctx, &padByte, 1); -+ } -+ -+ /* write bit length, big endian byte order */ -+ ctx->sha_out[112] = bitLengthMSB >> 56; -+ ctx->sha_out[113] = bitLengthMSB >> 48; -+ ctx->sha_out[114] = bitLengthMSB >> 40; -+ ctx->sha_out[115] = bitLengthMSB >> 32; -+ ctx->sha_out[116] = bitLengthMSB >> 24; -+ ctx->sha_out[117] = bitLengthMSB >> 16; -+ ctx->sha_out[118] = bitLengthMSB >> 8; -+ ctx->sha_out[119] = bitLengthMSB; -+ ctx->sha_out[120] = bitLength >> 56; -+ ctx->sha_out[121] = bitLength >> 48; -+ ctx->sha_out[122] = bitLength >> 40; -+ ctx->sha_out[123] = bitLength >> 32; -+ ctx->sha_out[124] = bitLength >> 24; -+ ctx->sha_out[125] = bitLength >> 16; -+ ctx->sha_out[126] = bitLength >> 8; -+ ctx->sha_out[127] = bitLength; -+ sha512_transform(ctx, &ctx->sha_out[0]); -+ -+ /* return results in ctx->sha_out[0...63] */ -+ datap = &ctx->sha_out[0]; -+ j = 0; -+ do { -+ i = ctx->sha_H[j]; -+ datap[0] = i >> 56; -+ datap[1] = i >> 48; -+ datap[2] = i >> 40; -+ datap[3] = i >> 32; -+ datap[4] = i >> 24; -+ datap[5] = i >> 16; -+ datap[6] = i >> 8; -+ datap[7] = i; -+ datap += 8; -+ } while(++j < 8); -+ -+ /* clear sensitive information */ -+ memset(&ctx->sha_out[64], 0, sizeof(sha512_context) - 64); -+} -+ -+void sha512_hash_buffer(const unsigned char *ib, size_t ile, unsigned char *ob, size_t ole) -+{ -+ sha512_context ctx; -+ -+ if(ole < 1) return; -+ memset(ob, 0, ole); -+ if(ole > 64) ole = 64; -+ sha512_init(&ctx); -+ sha512_write(&ctx, ib, ile); -+ sha512_final(&ctx); -+ memcpy(ob, &ctx.sha_out[0], ole); -+ memset(&ctx, 0, sizeof(ctx)); -+} -+#endif -+ -+#if defined(SHA384_NEEDED) -+void sha384_init(sha512_context *ctx) -+{ -+ memcpy(&ctx->sha_H[0], &sha384_hashInit[0], sizeof(ctx->sha_H)); -+ ctx->sha_blocks = 0; -+ ctx->sha_blocksMSB = 0; -+ ctx->sha_bufCnt = 0; -+} -+ -+void sha384_hash_buffer(const unsigned char *ib, size_t ile, unsigned char *ob, size_t ole) -+{ -+ sha512_context ctx; -+ -+ if(ole < 1) return; -+ memset(ob, 0, ole); -+ if(ole > 48) ole = 48; -+ sha384_init(&ctx); -+ sha512_write(&ctx, ib, ile); -+ sha512_final(&ctx); -+ memcpy(ob, &ctx.sha_out[0], ole); -+ memset(&ctx, 0, sizeof(ctx)); -+} -+#endif -Index: util-linux-2.20-rc2/mount/sha512.h -=================================================================== ---- /dev/null -+++ util-linux-2.20-rc2/mount/sha512.h -@@ -0,0 +1,45 @@ -+/* -+ * sha512.h -+ * -+ * Written by Jari Ruusu, April 16 2001 -+ * -+ * Copyright 2001 by Jari Ruusu. -+ * Redistribution of this file is permitted under the GNU Public License. -+ */ -+ -+#include -+ -+typedef struct { -+ unsigned char sha_out[64]; /* results are here, bytes 0...31 */ -+ u_int32_t sha_H[8]; -+ u_int64_t sha_blocks; -+ int sha_bufCnt; -+} sha256_context; -+ -+typedef struct { -+ unsigned char sha_out[128]; /* results are here, bytes 0...63 */ -+ u_int64_t sha_H[8]; -+ u_int64_t sha_blocks; -+ u_int64_t sha_blocksMSB; -+ int sha_bufCnt; -+} sha512_context; -+ -+/* no sha384_context, use sha512_context */ -+ -+/* 256 bit hash, provides 128 bits of security against collision attacks */ -+extern void sha256_init(sha256_context *); -+extern void sha256_write(sha256_context *, const unsigned char *, int); -+extern void sha256_final(sha256_context *); -+extern void sha256_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); -+ -+/* 512 bit hash, provides 256 bits of security against collision attacks */ -+extern void sha512_init(sha512_context *); -+extern void sha512_write(sha512_context *, const unsigned char *, int); -+extern void sha512_final(sha512_context *); -+extern void sha512_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); -+ -+/* 384 bit hash, provides 192 bits of security against collision attacks */ -+extern void sha384_init(sha512_context *); -+/* no sha384_write(), use sha512_write() */ -+/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ -+extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); diff --git a/util-linux-2.20.1.tar.bz2 b/util-linux-2.20.1.tar.bz2 deleted file mode 100644 index 0da3679..0000000 --- a/util-linux-2.20.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d16ebcda3e64ab88ed363d9c1242cdb7ccfd5e1f56c83d0c3b0638c23793bbe0 -size 4614302 diff --git a/util-linux-2.21.tar.bz2 b/util-linux-2.21.tar.bz2 new file mode 100644 index 0000000..7e9a6f7 --- /dev/null +++ b/util-linux-2.21.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2813ae6fe0449b60402e122c2baf97f26aa53e6e2dd05591c6cbcdf67ffdb6c6 +size 4756532 diff --git a/util-linux-dmesg-fix-printing-of-multibyte-characters.patch b/util-linux-dmesg-fix-printing-of-multibyte-characters.patch deleted file mode 100644 index 00913de..0000000 --- a/util-linux-dmesg-fix-printing-of-multibyte-characters.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 131b477b61c7eb82aef913bae5aec63f019b7076 Mon Sep 17 00:00:00 2001 -From: Petr Uzel -Date: Tue, 1 Nov 2011 16:17:57 +0100 -Subject: [PATCH] dmesg: fix printing of multibyte characters - -Also make it compile if HAVE_WIDECHAR is not defined. - -Addresses: https://bugzilla.novell.com/show_bug.cgi?id=725993 -Reported-by: Harald Koenig -Signed-off-by: Petr Uzel ---- - sys-utils/dmesg.c | 16 ++++++++-------- - 1 files changed, 8 insertions(+), 8 deletions(-) - -Index: util-linux-2.20.1/sys-utils/dmesg.c -=================================================================== ---- util-linux-2.20.1.orig/sys-utils/dmesg.c -+++ util-linux-2.20.1/sys-utils/dmesg.c -@@ -391,10 +391,11 @@ static void safe_fwrite(const char *buf, - for (i = 0; i < size; i++) { - const char *p = buf + i; - int rc, hex = 0; -+ size_t len = 1; - - #ifdef HAVE_WIDECHAR - wchar_t wc; -- size_t len = mbrtowc(&wc, p, size - i, &s); -+ len = mbrtowc(&wc, p, size - i, &s); - - if (len == 0) /* L'\0' */ - return; -@@ -402,16 +403,15 @@ static void safe_fwrite(const char *buf, - if (len == (size_t)-1 || len == (size_t)-2) { /* invalid sequence */ - memset(&s, 0, sizeof (s)); - len = hex = 1; -- - } else if (len > 1 && !iswprint(wc)) { /* non-printable multibyte */ - hex = 1; -- } else --#endif -- { -+ } -+ i += len - 1; -+#else - if (!isprint((unsigned int) *p) && - !isspace((unsigned int) *p)) /* non-printable */ - hex = 1; -- } -+#endif - if (hex) - rc = fwrite_hex(p, len, out); - else diff --git a/util-linux-rpmlintrc b/util-linux-rpmlintrc index 52ce686..81be4db 100644 --- a/util-linux-rpmlintrc +++ b/util-linux-rpmlintrc @@ -1,4 +1,7 @@ addFilter("init-script-without-%stop_on_removal-preun /etc/init.d/raw") +addFilter("init-script-without-%restart_on_update-postun /etc/init.d/raw") addFilter("incoherent-init-script-name raw") addFilter("no-reload-entry /etc/init.d/raw") +# There is no egrep(1) used -> False positive +addFilter("deprecated-grep") diff --git a/util-linux.changes b/util-linux.changes index f79ddb8..d6ea94a 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,65 @@ +------------------------------------------------------------------- +Tue Feb 21 13:46:25 UTC 2012 - puzel@suse.com + +- update to util-linux-2.21 + chcpu(8): + - new command + prlimit(1): + - new command + losetup(8): + - the command has been rewritten, features: + * supports 64bit ioctls only + * losetup -a does not require root permissions + * uses new /dev/loop-control kernel API + * supports new command line option --partscan to enable + kernel partition table parser + agetty(8): + - supports new command line options --nohints to disable hints + about Num, Caps and Scroll Locks + - supports new command line option --remote to add a hostname + to the login(1) command line + dmesg(1): + - supports new command line options --file to read the log from + a file rather than from kernel buffer + fallocate(8): + - supports new command line options --punch-hole to punch holes + in the file + findmnt(8): + - supports alternative location of the fstab file + ipcrm(8): + - supports new command line option --all to remove all resources + lscpu(1): + - supports new command line options --all, --offline and + --online to list all, offline or online CPUs + - supports s390 topology description (polarization, books, ...) + partx(8): + - supports partitioned loop devices + wipefs(8): + - allows to zap partition tables + - supports new command line option "--type " to wipe only + specified filesystems, RAIDs or partition table types + libblkid: + - provides new function blkid_do_wipe() to remove all + signatures from the given block device. +- disable elvtune (works only with 2.4 kernel) +- drop patches which are upstream now: + - drop fsck-use-FS-blacklist-for-non-all-mode-too.patch + - drop util-linux-dmesg-fix-printing-of-multibyte-characters.patch + - libmount-ignore-tailing-slash-in-netfs-source-paths.patch + - libmount-fix-chdir-to-parent-for-restricted-user-umo.patch +- update to adjtimex-1.29 +- use fdupes to symlink duplicate manpages +- disabled make check for time (noop) +- libraries back to %{_libdir}, /usr merge project (by + crrodriguez@opensuse.org) +- drop cryptoloop support (provided by dm-crypt) + - util-linux-2.17.1-mount_losetup_crypto.patch + +------------------------------------------------------------------- +Tue Feb 7 14:48:23 UTC 2012 - jengelh@medozas.de + +- Remove redundant tags/sections + ------------------------------------------------------------------- Sun Dec 25 22:19:44 UTC 2011 - coolo@suse.com diff --git a/util-linux.spec b/util-linux.spec index d8ac705..5c72639 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,12 +15,14 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %define time_ver 1.7 %define which_ver 2.20 -%define adjtimex_ver 1.28 +%define adjtimex_ver 1.29 Name: util-linux BuildRequires: audit-devel +BuildRequires: fdupes BuildRequires: gettext-devel BuildRequires: libselinux-devel BuildRequires: libsepol-devel @@ -30,7 +32,7 @@ BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel -Version: 2.20.1 +Version: 2.21 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -48,7 +50,7 @@ Recommends: %{name}-lang = %{version} Summary: A collection of basic system utilities License: GPL-2.0+ Group: System/Base -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v20/%{name}-%{version}.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.21/%{name}-%{version}.tar.bz2 Source1: util-linux-rpmlintrc # XXX: make nologin part of login package Source2: nologin.c @@ -56,11 +58,9 @@ Source3: nologin.8 Source4: raw.init Source5: etc.raw Source6: etc_filesystems -# XXX: add libmnt Source7: baselibs.conf -# XXX: post upstream? -Source9: adjtimex-%{adjtimex_ver}.tar.bz2 -# XXX: post upstream? +# TODO: split to separate package +Source9: http://ftp.debian.org/debian/pool/main/a/adjtimex/adjtimex_%{adjtimex_ver}.orig.tar.gz Source11: klogconsole.tar.bz2 # TODO: split to separate package Source12: which-%{which_ver}.tar.bz2 @@ -83,14 +83,8 @@ Source51: blkid.conf ## # 241372 - remove legacy warnings from fdisk Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch -# crypto patch -Patch2: util-linux-2.17.1-mount_losetup_crypto.patch -Patch5: util-linux-2.20-libmount-deps.patch -Patch6: util-linux-dmesg-fix-printing-of-multibyte-characters.patch -Patch7: fsck-use-FS-blacklist-for-non-all-mode-too.patch -Patch8: libmount-ignore-tailing-slash-in-netfs-source-paths.patch -Patch9: libmount-fix-chdir-to-parent-for-restricted-user-umo.patch -Patch10: fdisk-tinfo.patch +Patch2: util-linux-2.20-libmount-deps.patch +Patch3: fdisk-tinfo.patch ## ## adjtimex @@ -183,15 +177,10 @@ Files to develop applications using the libmount library. %lang_package %prep -%setup -q -a 9 -b 11 -b 12 -b 13 +%setup -q -n %{name}-%{version} -a 9 -b 11 -b 12 -b 13 %patch1 -p1 %patch2 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 +%patch3 -p1 # cd adjtimex-* @@ -221,21 +210,14 @@ cd which-%{which_ver} aclocal --force autoconf --force automake --force-missing --add-missing --foreign -%configure --prefix=/usr \ - --mandir=%{_mandir} \ - --infodir=%{_infodir} \ - %{_target_cpu}-suse-linux +%configure make %{?_smp_mflags} cd .. # time build cd time-%{time_ver} -%{?suse_update_config:%{suse_update_config}} export CFLAGS="%{optflags} -D_GNU_SOURCE " export INSTALL_PROGRAM='$(INSTALL)' -%configure --prefix=/usr \ - --mandir=%{_mandir} \ - --infodir=%{_infodir} \ - %{_target_cpu}-suse-linux +%configure make %{?_smp_mflags} cd .. # klogconsole build @@ -255,10 +237,8 @@ export SUID_LDFLAGS="-pie" %configure \ --bindir=/bin \ --sbindir=/sbin \ - --libdir=/%{_lib} \ --with-audit \ --with-selinux \ - --enable-elvtune \ --enable-mesg \ --enable-partx \ --enable-raw \ @@ -269,17 +249,14 @@ export SUID_LDFLAGS="-pie" --disable-mountpoint \ --disable-use-tty-group \ --disable-static \ - --disable-silent-rules --disable-rpath + --disable-silent-rules \ + --disable-rpath # make %{?_smp_mflags} # -%{__cc} %{optflags} -o nologin nologin.c -%{__cc} %{optflags} -o mkzimage_cmdline %{S:29} -%{__cc} %{optflags} -o chrp-addnote %{SOURCE31} - -%check -cd ../time-%{time_ver} -make check +%{__cc} -fwhole-program %{optflags} -o nologin nologin.c +%{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29} +%{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31} %install mkdir -p %{buildroot}{/etc/init.d,%{_mandir}/man{1,8},/bin,/sbin,/usr/bin,/usr/sbin,%{_infodir}} @@ -386,9 +363,8 @@ find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt # rcuuidd helper ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd - -%clean -rm -rf %{buildroot} +# remove duplicate manpages +%fdupes -s %{buildroot}/%{_mandir} %post %{fillup_and_insserv raw} @@ -444,8 +420,7 @@ fi %post -n libuuid1 -p /sbin/ldconfig -%postun -n libuuid1 -/sbin/ldconfig +%postun -n libuuid1 -p /sbin/ldconfig %verifyscript -n uuidd %verify_permissions -e /usr/sbin/uuidd @@ -455,12 +430,21 @@ fi %files -f %{name}.files # Common files for all archs %defattr(-,root,root) -%doc login-utils/README.poeigl -%doc misc-utils/README.cal -%doc mount/README.mount -%doc hwclock/README.hwclock -%doc text-utils/README.col -%doc README.largedisk +# util-linux documentation files +%doc Documentation/blkid.txt +%doc Documentation/cal.txt +%doc Documentation/cfdisk.txt +%doc Documentation/col.txt +%doc Documentation/ddate.txt +%doc Documentation/deprecated.txt +%doc Documentation/fdisk.txt +%doc Documentation/getopt.txt +%doc Documentation/howto-debug.txt +%doc Documentation/hwclock.txt +%doc Documentation/modems-with-agetty.txt +%doc Documentation/mount.txt +%doc Documentation/pg.txt +%doc Documentation/sfdisk.txt %config %attr(744,root,root) %{_sysconfdir}/init.d/raw %config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw %config(noreplace) %{_sysconfdir}/filesystems @@ -474,7 +458,6 @@ fi /sbin/adjtimex /sbin/agetty /sbin/blockdev -/sbin/elvtune /sbin/ctrlaltdel /sbin/fsck.minix /sbin/fsck.cramfs @@ -497,6 +480,7 @@ fi /sbin/fsfreeze /sbin/swaplabel /sbin/fstrim +/sbin/chcpu %{_bindir}/ipcmk /bin/logger %{_bindir}/cal @@ -525,6 +509,7 @@ fi %{_bindir}/mkzimage_cmdline %endif %{_bindir}/namei +%{_bindir}/prlimit %{_bindir}/rename %{_bindir}/renice %{_bindir}/rev @@ -577,7 +562,7 @@ fi %{_mandir}/man1/more.1.gz %{_mandir}/man1/namei.1.gz %{_mandir}/man1/ionice.1.gz -%{_mandir}/man1/readprofile.1.gz +%{_mandir}/man1/prlimit.1.gz %{_mandir}/man1/rename.1.gz %{_mandir}/man1/rev.1.gz %{_mandir}/man1/renice.1.gz @@ -600,7 +585,6 @@ fi %{_mandir}/man8/agetty.8.gz %{_mandir}/man8/blockdev.8.gz %{_mandir}/man8/delpart.8.gz -%{_mandir}/man8/elvtune.8* %{_mandir}/man8/ctrlaltdel.8.gz %{_mandir}/man8/adjtimex.8.gz %{_mandir}/man8/blkid.8.gz @@ -620,6 +604,8 @@ fi %{_mandir}/man8/findmnt.8.gz %{_mandir}/man8/fsfreeze.8.gz %{_mandir}/man8/swaplabel.8.gz +%{_mandir}/man8/readprofile.8.gz +%{_mandir}/man8/chcpu.8.gz %ifnarch ppc ppc64 %{_mandir}/man8/mkzimage_cmdline.8.gz %endif @@ -642,12 +628,12 @@ fi %attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh %ifnarch ia64 -%doc fdisk/README.fdisk +#XXX: post our patches upstream +#XXX: call fdupes on /usr/share/man /sbin/fdisk %{_mandir}/man8/fdisk.8.gz %endif %ifnarch %sparc ia64 -%doc fdisk/README.cfdisk %{_mandir}/man8/cfdisk.8.gz %{_mandir}/man8/sfdisk.8.gz /sbin/cfdisk @@ -669,8 +655,8 @@ fi %files -n libblkid1 %defattr(-, root, root) -/%{_lib}/libblkid.so.1 -/%{_lib}/libblkid.so.1.* +/%{_libdir}/libblkid.so.1 +/%{_libdir}/libblkid.so.1.* %files -n libblkid-devel %defattr(-, root, root) @@ -682,8 +668,8 @@ fi %files -n libmount1 %defattr(-, root, root) -/%{_lib}/libmount.so.1 -/%{_lib}/libmount.so.1.* +/%{_libdir}/libmount.so.1 +/%{_libdir}/libmount.so.1.* %files -n libmount-devel %defattr(-, root, root) @@ -698,14 +684,14 @@ fi %attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid %ghost %{_localstatedir}/lib/libuuid/clock.txt %attr(-,uuidd,uuidd) %ghost %dir %{_localstatedir}/run/uuidd -%{_sysconfdir}/init.d/uuidd +%{_initddir}/uuidd %{_mandir}/man8/uuidd.8.gz %{_sbindir}/rcuuidd %files -n libuuid1 %defattr(-, root, root) -/%{_lib}/libuuid.so.1 -/%{_lib}/libuuid.so.1.* +/%{_libdir}/libuuid.so.1 +/%{_libdir}/libuuid.so.1.* %files -n libuuid-devel %defattr(-, root, root) From 8896f2270941810129fd3eaeb0dd7982986d2f18d785bf14f8cf048361164c8b Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 20 Mar 2012 09:35:30 +0000 Subject: [PATCH 139/211] Accepting request 109642 from Base:System - Fix Obsoletes / Provides for login. (forwarded request 109640 from fcrozat) OBS-URL: https://build.opensuse.org/request/show/109642 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=144 --- login.pamd | 10 +++ remote.pamd | 12 ++++ util-linux.changes | 17 +++++ util-linux.spec | 173 ++++++++++++++++++++++++++++++++++++++------- 4 files changed, 186 insertions(+), 26 deletions(-) create mode 100644 login.pamd create mode 100644 remote.pamd diff --git a/login.pamd b/login.pamd new file mode 100644 index 0000000..9350054 --- /dev/null +++ b/login.pamd @@ -0,0 +1,10 @@ +#%PAM-1.0 +auth requisite pam_nologin.so +auth [user_unknown=ignore success=ok ignore=ignore auth_err=die default=bad] pam_securetty.so +auth include common-auth +account include common-account +password include common-password +session required pam_loginuid.so +session include common-session +session optional pam_lastlog.so nowtmp showfailed +session optional pam_mail.so standard diff --git a/remote.pamd b/remote.pamd new file mode 100644 index 0000000..4dd900b --- /dev/null +++ b/remote.pamd @@ -0,0 +1,12 @@ +#%PAM-1.0 +# This file is used by /bin/login in case of remote logins (means where +# the -h option is used +auth requisite pam_nologin.so +auth [user_unknown=ignore success=ok ignore=ignore auth_err=die default=bad] pam_securetty.so +auth include common-auth +account include common-account +password include common-password +session required pam_loginuid.so +session include common-session +session optional pam_lastlog.so nowtmp showfailed +session optional pam_mail.so standard diff --git a/util-linux.changes b/util-linux.changes index d6ea94a..142ccdc 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Fri Mar 16 09:56:21 UTC 2012 - fcrozat@suse.com + +- Fix Obsoletes / Provides for login. + +------------------------------------------------------------------- +Tue Mar 13 16:38:34 CET 2012 - kukuk@suse.de + +- Enable /bin/login and obsolete old fork now merged back + (not moved to /usr/bin until all problems are solved to + avoid that root is not able to login). + +------------------------------------------------------------------- +Tue Mar 6 21:18:56 UTC 2012 - rschweikert@suse.com + +- keep binaries in /usr tree (UsrMerge project) + ------------------------------------------------------------------- Tue Feb 21 13:46:25 UTC 2012 - puzel@suse.com diff --git a/util-linux.spec b/util-linux.spec index 5c72639..a96e5df 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -52,15 +52,17 @@ License: GPL-2.0+ Group: System/Base Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.21/%{name}-%{version}.tar.bz2 Source1: util-linux-rpmlintrc -# XXX: make nologin part of login package +# XXX: make nologin part of util-linux upstream Source2: nologin.c Source3: nologin.8 Source4: raw.init Source5: etc.raw Source6: etc_filesystems Source7: baselibs.conf +Source8: login.pamd +Source9: remote.pamd # TODO: split to separate package -Source9: http://ftp.debian.org/debian/pool/main/a/adjtimex/adjtimex_%{adjtimex_ver}.orig.tar.gz +Source10: http://ftp.debian.org/debian/pool/main/a/adjtimex/adjtimex_%{adjtimex_ver}.orig.tar.gz Source11: klogconsole.tar.bz2 # TODO: split to separate package Source12: which-%{which_ver}.tar.bz2 @@ -106,8 +108,18 @@ Patch70: which-lib64.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed # -Provides: util = %{version}-%{release} rawio = %{version}-%{release} raw = %{version}-%{release} base = %{version}-%{release} uuid-runtime = %{version}-%{release} -Obsoletes: util < %{version}-%{release} rawio < %{version}-%{release} raw < %{version}-%{release} base < %{version}-%{release} uuid-runtime < %{version}-%{release} +Provides: base = %{version}-%{release} +Provides: login = 4.0-33.7 +Provides: raw = %{version}-%{release} +Provides: rawio = %{version}-%{release} +Provides: util = %{version}-%{release} +Provides: uuid-runtime = %{version}-%{release} +Obsoletes: base < %{version}-%{release} +Obsoletes: login < 4.0-33.7 +Obsoletes: raw < %{version}-%{release} +Obsoletes: rawio < %{version}-%{release} +Obsoletes: util < %{version}-%{release} +Obsoletes: uuid-runtime < %{version}-%{release} %description This package contains a large variety of low-level system utilities @@ -165,7 +177,7 @@ Group: System/Filesystems %description -n libmount1 Library designed to be used in low-level utils like -mount(8) and /sbin/mount. helpers. +mount(8) and /usr/sbin/mount. helpers. %package -n libmount-devel Summary: Development files for libmount1 @@ -177,7 +189,7 @@ Files to develop applications using the libmount library. %lang_package %prep -%setup -q -n %{name}-%{version} -a 9 -b 11 -b 12 -b 13 +%setup -q -n %{name}-%{version} -a 10 -b 11 -b 12 -b 13 %patch1 -p1 %patch2 -p1 %patch3 -p1 @@ -235,8 +247,6 @@ autoreconf -fi export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" %configure \ - --bindir=/bin \ - --sbindir=/sbin \ --with-audit \ --with-selinux \ --enable-mesg \ @@ -246,6 +256,7 @@ export SUID_LDFLAGS="-pie" --enable-line \ --enable-libmount-mount \ --enable-ddate \ + --enable-login-utils \ --disable-mountpoint \ --disable-use-tty-group \ --disable-static \ @@ -259,13 +270,15 @@ make %{?_smp_mflags} %{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31} %install -mkdir -p %{buildroot}{/etc/init.d,%{_mandir}/man{1,8},/bin,/sbin,/usr/bin,/usr/sbin,%{_infodir}} +mkdir -p %{buildroot}{/etc/init.d,/etc/pam.d,%{_mandir}/man{1,8},/bin,/sbin,/usr/bin,/usr/sbin,%{_infodir}} mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid/ mkdir -p %{buildroot}%{_localstatedir}/run/uuidd/ install -m 744 %{SOURCE50} %{buildroot}%{_initddir}/uuidd install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf +install -m 644 %{SOURCE8} %{buildroot}/etc/pam.d/login +install -m 644 %{SOURCE9} %{buildroot}/etc/pam.d/remote mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates -cp adjtimex-*/adjtimex %{buildroot}/sbin/ +cp adjtimex-*/adjtimex %{buildroot}/%{_sbindir} cp adjtimex-*/adjtimex.8 %{buildroot}%{_mandir}/man8/ pushd .. # which install @@ -297,20 +310,60 @@ popd # util-linux install # %make_install -mv %{buildroot}%{_bindir}/logger %{buildroot}/bin/logger +#UsrMerge +ln -s %{_bindir}/logger %{buildroot}/bin +ln -s %{_bindir}/dmesg %{buildroot}/bin +ln -s %{_bindir}/more %{buildroot}/bin +ln -s %{_bindir}/mount %{buildroot}/bin +ln -s %{_bindir}/umount %{buildroot}/bin +ln -s %{_bindir}/findmnt %{buildroot}/bin +ln -s %{_bindir}/lsblk %{buildroot}/bin +ln -s %{_sbindir}/adjtimex %{buildroot}/sbin +ln -s %{_sbindir}/agetty %{buildroot}/sbin +ln -s %{_sbindir}/blockdev %{buildroot}/sbin +ln -s %{_sbindir}/cfdisk %{buildroot}/sbin +ln -s %{_sbindir}/ctrlaltdel %{buildroot}/sbin +ln -s %{_sbindir}/fdisk %{buildroot}/sbin +ln -s %{_sbindir}/fsck.minix %{buildroot}/sbin +ln -s %{_sbindir}/fsck.cramfs %{buildroot}/sbin +ln -s %{_sbindir}/hwclock %{buildroot}/sbin +ln -s %{_sbindir}/losetup %{buildroot}/sbin +ln -s %{_sbindir}/mkfs %{buildroot}/sbin +ln -s %{_sbindir}/mkfs.bfs %{buildroot}/sbin +ln -s %{_sbindir}/mkfs.minix %{buildroot}/sbin +ln -s %{_sbindir}/mkfs.cramfs %{buildroot}/sbin +ln -s %{_sbindir}/mkswap %{buildroot}/sbin +ln -s %{_sbindir}/pivot_root %{buildroot}/sbin +ln -s %{_sbindir}/raw %{buildroot}/sbin +ln -s %{_sbindir}/sfdisk %{buildroot}/sbin +ln -s %{_sbindir}/swapoff %{buildroot}/sbin +ln -s %{_sbindir}/swapon %{buildroot}/sbin +ln -s %{_sbindir}/blkid %{buildroot}/sbin +ln -s %{_sbindir}/findfs %{buildroot}/sbin +ln -s %{_sbindir}/fsck %{buildroot}/sbin +ln -s %{_sbindir}/switch_root %{buildroot}/sbin +ln -s %{_sbindir}/wipefs %{buildroot}/sbin +ln -s %{_sbindir}/fsfreeze %{buildroot}/sbin +ln -s %{_sbindir}/swaplabel %{buildroot}/sbin +ln -s %{_sbindir}/fstrim %{buildroot}/sbin +ln -s %{_sbindir}/chcpu %{buildroot}/sbin +#EndUsrMerge install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/filesystems -install -m 755 nologin %{buildroot}/sbin +install -m 755 nologin %{buildroot}/%{_sbindir} +#UsrMerge +ln -s %{_sbindir}/nologin %{buildroot}/sbin +#EndUsrMerge rm -f %{buildroot}/%{_libdir}/libblkid.la rm -f %{buildroot}/%{_libdir}/libuuid.la rm -f %{buildroot}/%{_libdir}/libmount.la %ifnarch ppc ppc64 -install -m 755 mkzimage_cmdline %{buildroot}%{_prefix}/bin +install -m 755 mkzimage_cmdline %{buildroot}/%{_bindir} install -m 644 %{S:28} %{buildroot}%{_mandir}/man8 -install -m 755 chrp-addnote %{buildroot}%{_prefix}/bin +install -m 755 chrp-addnote %{buildroot}/%{_bindir} %endif install -m 644 nologin.8 %{buildroot}%{_mandir}/man8 # setctsid install -install -m 755 setctsid %{buildroot}%{_prefix}/sbin +install -m 755 setctsid %{buildroot}/%{_sbindir} install -m 444 setctsid.8 %{buildroot}%{_mandir}/man8/ echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir}/flushb chmod 755 %{buildroot}%{_sbindir}/flushb @@ -326,12 +379,22 @@ rm -f %{buildroot}%{_mandir}/man1/pg.1* # Do not package these files to get rid of the perl dependency rm -f %{buildroot}%{_bindir}/chkdupexe rm -f %{buildroot}%{_mandir}/man1/chkdupexe.1 +# we use this tools from pwdutils +rm -f %{buildroot}/%{_bindir}/{chfn,chsh,newgrp} +rm -f %{buildroot}/%{_sbindir}/{vigr,vipw} +rm -f %{buildroot}/%{_mandir}/man1/{chfn.1*,chsh.1*,newgrp.1*} +rm -f %{buildroot}/%{_mandir}/man8/{vigr.8*,vipw.8*} +# login is always and only in /bin +mv %{buildroot}/%{_bindir}/login %{buildroot}/bin/ # arch dependent %ifarch s390 s390x rm -f %{buildroot}%{_sysconfdir}/fdprm rm -f %{buildroot}%{_bindir}/cytune rm -f %{buildroot}%{_sbindir}/fdformat +rm -f %{buildroot}%{_sbindir}/hwclock +#UsrMerge rm -f %{buildroot}/sbin/hwclock +#EndUsrMerge rm -f %{buildroot}%{_sbindir}/klogconsole rm -f %{buildroot}%{_bindir}/setterm rm -f %{buildroot}%{_sbindir}/tunelp @@ -344,11 +407,20 @@ rm -f %{buildroot}/%{_mandir}/man8/tunelp.8* %ifarch ia64 %sparc rm -f %{buildroot}/%{_mandir}/man8/cfdisk.8* rm -f %{buildroot}/%{_mandir}/man8/sfdisk.8* +rm -f %{buildroot}%{_sbindir}/cfdisk +#UsrMerge rm -f %{buildroot}/sbin/cfdisk +#EndUsrMerge +rm -f %{buildroot}%{_sbindir}/sfdisk +#UsrMerge rm -f %{buildroot}/sbin/sfdisk +#EndUsrMerge %endif %ifarch ia64 +rm -f %{buildroot}%{_sbindir}/fdisk +#UsrMerge rm -f %{buildroot}/sbin/fdisk +#EndUsrMerge rm -f %{buildroot}%{_mandir}/man8/fdisk.8* %endif %find_lang %{name} %{name}.lang @@ -373,7 +445,7 @@ ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd %if 0%{?suse_version} <= 1130 %run_permissions %else -%set_permissions /usr/bin/wall /usr/bin/write /bin/mount /bin/umount +%set_permissions /usr/bin/wall /usr/bin/write /usr/bin/mount /usr/bin/umount %endif # mount option 'code=' is now called 'codepage=' so change fstab @@ -388,7 +460,7 @@ fi %{insserv_cleanup} %verifyscript -%verify_permissions -e /usr/bin/wall -e /usr/bin/write -e /bin/mount -e /bin/umount +%verify_permissions -e /usr/bin/wall -e /usr/bin/write -e /usr/bin/mount -e /usr/bin/umount %post -n libblkid1 -p /sbin/ldconfig @@ -449,11 +521,16 @@ fi %config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw %config(noreplace) %{_sysconfdir}/filesystems %config(noreplace) %{_sysconfdir}/blkid.conf +%config(noreplace) /etc/pam.d/login +%config(noreplace) /etc/pam.d/remote +#UsrMerge /bin/dmesg /bin/more /bin/mount /bin/umount /bin/findmnt +/bin/logger +/bin/login /bin/lsblk /sbin/adjtimex /sbin/agetty @@ -481,8 +558,7 @@ fi /sbin/swaplabel /sbin/fstrim /sbin/chcpu -%{_bindir}/ipcmk -/bin/logger +#EndUsrMerge %{_bindir}/cal %{_bindir}/chrt %{_bindir}/col @@ -490,46 +566,80 @@ fi %{_bindir}/colrm %{_bindir}/column %{_bindir}/ddate +%{_bindir}/dmesg %{_bindir}/fallocate +%{_bindir}/findmnt %{_bindir}/flock %{_bindir}/getopt %{_bindir}/hexdump %{_bindir}/ionice +%{_bindir}/ipcmk %{_bindir}/ipcrm %{_bindir}/ipcs %{_bindir}/isosize %{_bindir}/line +%{_bindir}/logger %{_bindir}/look +%{_bindir}/lsblk %{_bindir}/lscpu %{_bindir}/mcookie %{_bindir}/mesg -%{_bindir}/uuidgen -%ifnarch ppc ppc64 -%{_bindir}/chrp-addnote -%{_bindir}/mkzimage_cmdline -%endif +%{_bindir}/more +%{_bindir}/mount %{_bindir}/namei %{_bindir}/prlimit %{_bindir}/rename %{_bindir}/renice %{_bindir}/rev %{_bindir}/script -%{_bindir}/setarch %{_bindir}/scriptreplay +%{_bindir}/setarch %{_bindir}/setsid -%{_bindir}/ul %{_bindir}/tailf %{_bindir}/taskset %{_bindir}/time +%{_bindir}/ul +%{_bindir}/umount %{_bindir}/unshare +%{_bindir}/uuidgen %{_bindir}/which +%ifnarch ppc ppc64 +%{_bindir}/chrp-addnote +%{_bindir}/mkzimage_cmdline +%endif %{_sbindir}/addpart +%{_sbindir}/adjtimex +%{_sbindir}/agetty +%{_sbindir}/blkid +%{_sbindir}/blockdev +%{_sbindir}/chcpu +%{_sbindir}/ctrlaltdel %{_sbindir}/delpart +%{_sbindir}/findfs +%{_sbindir}/fsck +%{_sbindir}/fsck.minix +%{_sbindir}/fsck.cramfs +%{_sbindir}/fsfreeze +%{_sbindir}/fstrim %{_sbindir}/ldattach +%{_sbindir}/losetup +%{_sbindir}/mkfs +%{_sbindir}/mkfs.bfs +%{_sbindir}/mkfs.minix +%{_sbindir}/mkfs.cramfs +%{_sbindir}/mkswap +%{_sbindir}/nologin %{_sbindir}/partx +%{_sbindir}/pivot_root +%{_sbindir}/raw %{_sbindir}/rcraw %{_sbindir}/rtcwake %{_sbindir}/setctsid +%{_sbindir}/swaplabel +%{_sbindir}/swapoff +%{_sbindir}/swapon +%{_sbindir}/switch_root +%{_sbindir}/wipefs %verify(not mode) %attr(0755,root,tty) %{_bindir}/wall %{_bindir}/whereis %verify(not mode) %attr(0755,root,tty) %{_bindir}/write @@ -555,6 +665,7 @@ fi %{_mandir}/man1/ipcs.1.gz %{_mandir}/man1/line.1.gz %{_mandir}/man1/logger.1.gz +%{_mandir}/man1/login.1.gz %{_mandir}/man1/look.1.gz %{_mandir}/man1/lscpu.1.gz %{_mandir}/man1/mcookie.1.gz @@ -630,19 +741,29 @@ fi %ifnarch ia64 #XXX: post our patches upstream #XXX: call fdupes on /usr/share/man +#UsrMerge /sbin/fdisk +#EndUsrMerge +%{_sbindir}/fdisk %{_mandir}/man8/fdisk.8.gz %endif %ifnarch %sparc ia64 %{_mandir}/man8/cfdisk.8.gz %{_mandir}/man8/sfdisk.8.gz +#UsrMerge /sbin/cfdisk /sbin/sfdisk +#EndUsrMerge +%{_sbindir}/cfdisk +%{_sbindir}/sfdisk %endif %ifnarch s390 s390x %{_bindir}/cytune %{_sbindir}/fdformat +#UsrMerge /sbin/hwclock +#EndUsrMerge +%{_sbindir}/hwclock %{_sbindir}/klogconsole %{_bindir}/setterm %{_sbindir}/tunelp From c3b659c9e3b0a34a9a0eefe12eb5907970ccc4c7c3df6f0e1d6000d40f8e2c71 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 2 Apr 2012 08:29:03 +0000 Subject: [PATCH 140/211] Accepting request 112071 from Base:System - update to util-linux-2.21.1 - bugfix release OBS-URL: https://build.opensuse.org/request/show/112071 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=145 --- util-linux-2.21.1.tar.bz2 | 3 +++ util-linux-2.21.tar.bz2 | 3 --- util-linux.changes | 6 ++++++ util-linux.spec | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 util-linux-2.21.1.tar.bz2 delete mode 100644 util-linux-2.21.tar.bz2 diff --git a/util-linux-2.21.1.tar.bz2 b/util-linux-2.21.1.tar.bz2 new file mode 100644 index 0000000..1193c1f --- /dev/null +++ b/util-linux-2.21.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bf9641fd58454106589be8a8d1cfd61e7694f0a6912d8095d17b1fb94b85abe +size 4842473 diff --git a/util-linux-2.21.tar.bz2 b/util-linux-2.21.tar.bz2 deleted file mode 100644 index 7e9a6f7..0000000 --- a/util-linux-2.21.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2813ae6fe0449b60402e122c2baf97f26aa53e6e2dd05591c6cbcdf67ffdb6c6 -size 4756532 diff --git a/util-linux.changes b/util-linux.changes index 142ccdc..bc3255b 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Mar 31 11:09:38 UTC 2012 - puzel@suse.com + +- update to util-linux-2.21.1 + - bugfix release + ------------------------------------------------------------------- Fri Mar 16 09:56:21 UTC 2012 - fcrozat@suse.com diff --git a/util-linux.spec b/util-linux.spec index a96e5df..5dd4a59 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -32,7 +32,7 @@ BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel -Version: 2.21 +Version: 2.21.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole From 288ff77ebb6410a14852ca6bd61009c71139926253025ad7e2669051ea651dfc Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 17 Apr 2012 20:03:20 +0000 Subject: [PATCH 141/211] Accepting request 113321 from Base:System - fix miscalculation in sfdisk on ix86 (bnc#754789) - add sfdisk-fix-calculation-due-to-type-mismatch.patch OBS-URL: https://build.opensuse.org/request/show/113321 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=146 --- ...fix-calculation-due-to-type-mismatch.patch | 59 +++++++++++++++++++ util-linux.changes | 6 ++ util-linux.spec | 3 + 3 files changed, 68 insertions(+) create mode 100644 sfdisk-fix-calculation-due-to-type-mismatch.patch diff --git a/sfdisk-fix-calculation-due-to-type-mismatch.patch b/sfdisk-fix-calculation-due-to-type-mismatch.patch new file mode 100644 index 0000000..2bc4804 --- /dev/null +++ b/sfdisk-fix-calculation-due-to-type-mismatch.patch @@ -0,0 +1,59 @@ +From 9c45d49fe01c1c8f971d7d2d664e40dd82d00cf5 Mon Sep 17 00:00:00 2001 +From: Petr Uzel +Date: Fri, 6 Apr 2012 16:53:13 +0200 +Subject: [PATCH] sfdisk: fix calculation due to type mismatch (ix86) + +Instructing sfdisk to create one partition spanning +across entire disk (",,") on 32bit system, if the disk +is sufficiently large (~2TB) leads to wrong calculation +in compute_start_sect() due to type mismatch. + +Can be reproduced as: + +-------------------------- +linux-3ln5:~ # modprobe scsi_debug virtual_gb=2000 +linux-3ln5:~ # sfdisk /dev/sda <<< ',,' +Checking that no-one is using this disk right now ... +OK + +Disk /dev/sda: 261083 cylinders, 255 heads, 63 sectors/track + +sfdisk: ERROR: sector 0 does not have an msdos signature +sfdisk: /dev/sda: unrecognized partition table type + +Old situation: +sfdisk: No partitions found + +no room for partition descriptor +sfdisk: bad input +-------------------------- + +Addresses: https://bugzilla.novell.com/show_bug.cgi?id=754789 +Reported-by: Dan Mares +Signed-off-by: Petr Uzel +--- + fdisk/sfdisk.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +Index: util-linux-2.21.1/fdisk/sfdisk.c +=================================================================== +--- util-linux-2.21.1.orig/fdisk/sfdisk.c ++++ util-linux-2.21.1/fdisk/sfdisk.c +@@ -1990,7 +1990,7 @@ static int + compute_start_sect(struct part_desc *p, struct part_desc *ep) { + unsigned long long base; + int inc = (DOS && B.sectors) ? B.sectors : 1; +- int delta; ++ long long delta; + + if (ep && p->start + p->size >= ep->start + 1) + delta = p->start - ep->start - inc; +@@ -2005,7 +2005,7 @@ compute_start_sect(struct part_desc *p, + p->size += delta; + if (is_extended(p->p.sys_type) && boxes == ONESECTOR) + p->size = inc; +- else if ((ssize_t) old_size <= (ssize_t) - delta) { ++ else if ((long long) old_size <= -delta) { + my_warn(_("no room for partition descriptor\n")); + return 0; + } diff --git a/util-linux.changes b/util-linux.changes index bc3255b..3228dfb 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 12 09:09:05 UTC 2012 - puzel@suse.com + +- fix miscalculation in sfdisk on ix86 (bnc#754789) + - add sfdisk-fix-calculation-due-to-type-mismatch.patch + ------------------------------------------------------------------- Sat Mar 31 11:09:38 UTC 2012 - puzel@suse.com diff --git a/util-linux.spec b/util-linux.spec index 5dd4a59..9848dd6 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -87,6 +87,7 @@ Source51: blkid.conf Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch2: util-linux-2.20-libmount-deps.patch Patch3: fdisk-tinfo.patch +Patch4: sfdisk-fix-calculation-due-to-type-mismatch.patch ## ## adjtimex @@ -193,6 +194,7 @@ Files to develop applications using the libmount library. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # cd adjtimex-* @@ -246,6 +248,7 @@ make %{?_smp_mflags} setctsid CFLAGS="%{optflags}" CC="%{__cc}" autoreconf -fi export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" +export CFLAGS="-ggdb3 -O0" %configure \ --with-audit \ --with-selinux \ From e109f2e2540c37a518243e5e3b1b8ffc1e83872c28bbb2156ff28285dc02d32c Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sat, 26 May 2012 11:04:36 +0000 Subject: [PATCH 142/211] Accepting request 122372 from Base:System update to 2.21.2 OBS-URL: https://build.opensuse.org/request/show/122372 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=147 --- ...fix-calculation-due-to-type-mismatch.patch | 59 ------------------- util-linux-2.21.1.tar.bz2 | 3 - util-linux-2.21.2.tar.bz2 | 3 + util-linux.changes | 13 ++++ util-linux.spec | 5 +- 5 files changed, 17 insertions(+), 66 deletions(-) delete mode 100644 sfdisk-fix-calculation-due-to-type-mismatch.patch delete mode 100644 util-linux-2.21.1.tar.bz2 create mode 100644 util-linux-2.21.2.tar.bz2 diff --git a/sfdisk-fix-calculation-due-to-type-mismatch.patch b/sfdisk-fix-calculation-due-to-type-mismatch.patch deleted file mode 100644 index 2bc4804..0000000 --- a/sfdisk-fix-calculation-due-to-type-mismatch.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 9c45d49fe01c1c8f971d7d2d664e40dd82d00cf5 Mon Sep 17 00:00:00 2001 -From: Petr Uzel -Date: Fri, 6 Apr 2012 16:53:13 +0200 -Subject: [PATCH] sfdisk: fix calculation due to type mismatch (ix86) - -Instructing sfdisk to create one partition spanning -across entire disk (",,") on 32bit system, if the disk -is sufficiently large (~2TB) leads to wrong calculation -in compute_start_sect() due to type mismatch. - -Can be reproduced as: - --------------------------- -linux-3ln5:~ # modprobe scsi_debug virtual_gb=2000 -linux-3ln5:~ # sfdisk /dev/sda <<< ',,' -Checking that no-one is using this disk right now ... -OK - -Disk /dev/sda: 261083 cylinders, 255 heads, 63 sectors/track - -sfdisk: ERROR: sector 0 does not have an msdos signature -sfdisk: /dev/sda: unrecognized partition table type - -Old situation: -sfdisk: No partitions found - -no room for partition descriptor -sfdisk: bad input --------------------------- - -Addresses: https://bugzilla.novell.com/show_bug.cgi?id=754789 -Reported-by: Dan Mares -Signed-off-by: Petr Uzel ---- - fdisk/sfdisk.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -Index: util-linux-2.21.1/fdisk/sfdisk.c -=================================================================== ---- util-linux-2.21.1.orig/fdisk/sfdisk.c -+++ util-linux-2.21.1/fdisk/sfdisk.c -@@ -1990,7 +1990,7 @@ static int - compute_start_sect(struct part_desc *p, struct part_desc *ep) { - unsigned long long base; - int inc = (DOS && B.sectors) ? B.sectors : 1; -- int delta; -+ long long delta; - - if (ep && p->start + p->size >= ep->start + 1) - delta = p->start - ep->start - inc; -@@ -2005,7 +2005,7 @@ compute_start_sect(struct part_desc *p, - p->size += delta; - if (is_extended(p->p.sys_type) && boxes == ONESECTOR) - p->size = inc; -- else if ((ssize_t) old_size <= (ssize_t) - delta) { -+ else if ((long long) old_size <= -delta) { - my_warn(_("no room for partition descriptor\n")); - return 0; - } diff --git a/util-linux-2.21.1.tar.bz2 b/util-linux-2.21.1.tar.bz2 deleted file mode 100644 index 1193c1f..0000000 --- a/util-linux-2.21.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4bf9641fd58454106589be8a8d1cfd61e7694f0a6912d8095d17b1fb94b85abe -size 4842473 diff --git a/util-linux-2.21.2.tar.bz2 b/util-linux-2.21.2.tar.bz2 new file mode 100644 index 0000000..4f0bf75 --- /dev/null +++ b/util-linux-2.21.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:066f9d8e51bfabd809d266edcd54eefba1cdca57725b95c074fd47fe6fba3d30 +size 4858985 diff --git a/util-linux.changes b/util-linux.changes index 3228dfb..437618a 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Fri May 25 12:12:09 UTC 2012 - puzel@suse.com + +- update to util-linux-2.21.2 + - bugfix release +- drop sfdisk-fix-calculation-due-to-type-mismatch.patch + (fixed upstream) + +------------------------------------------------------------------- +Fri May 25 12:03:07 UTC 2012 - puzel@suse.com + +- build with RPM_OPT_FLAGS again (removed by mistake) + ------------------------------------------------------------------- Thu Apr 12 09:09:05 UTC 2012 - puzel@suse.com diff --git a/util-linux.spec b/util-linux.spec index 9848dd6..8bcb2b4 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -32,7 +32,7 @@ BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: zlib-devel -Version: 2.21.1 +Version: 2.21.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -87,7 +87,6 @@ Source51: blkid.conf Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch2: util-linux-2.20-libmount-deps.patch Patch3: fdisk-tinfo.patch -Patch4: sfdisk-fix-calculation-due-to-type-mismatch.patch ## ## adjtimex @@ -194,7 +193,6 @@ Files to develop applications using the libmount library. %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 # cd adjtimex-* @@ -248,7 +246,6 @@ make %{?_smp_mflags} setctsid CFLAGS="%{optflags}" CC="%{__cc}" autoreconf -fi export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" -export CFLAGS="-ggdb3 -O0" %configure \ --with-audit \ --with-selinux \ From 4381a8fdf1368ceadf27a8e394396ce2fe561d4e3ad84679e01c3b5133b237fe Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 1 Jun 2012 05:24:46 +0000 Subject: [PATCH 143/211] Accepting request 123095 from Base:System - require binutils-devel because "which" wants to find libiberty.a - remove which-lib64.patch because it's broken and couldn't find libiberty.a whithin /usr/lib64 - which doesn't need autoreconf anymore (forwarded request 123013 from rudi_m) OBS-URL: https://build.opensuse.org/request/show/123095 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=148 --- util-linux.changes | 13 +++++++++++++ util-linux.spec | 12 ++---------- which-lib64.patch | 28 ---------------------------- 3 files changed, 15 insertions(+), 38 deletions(-) delete mode 100644 which-lib64.patch diff --git a/util-linux.changes b/util-linux.changes index 437618a..747c987 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu May 31 10:04:23 UTC 2012 - sweet_f_a@gmx.de + +- require binutils-devel because "which" wants to find libiberty.a +- remove which-lib64.patch because it's broken and couldn't find + libiberty.a whithin /usr/lib64 +- which doesn't need autoreconf anymore + +------------------------------------------------------------------- +Tue May 29 09:28:55 UTC 2012 - puzel@suse.com + +- switch to new libmount-based mount(8) + ------------------------------------------------------------------- Fri May 25 12:12:09 UTC 2012 - puzel@suse.com diff --git a/util-linux.spec b/util-linux.spec index 8bcb2b4..21ab64b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -22,6 +22,7 @@ Name: util-linux BuildRequires: audit-devel +BuildRequires: binutils-devel BuildRequires: fdupes BuildRequires: gettext-devel BuildRequires: libselinux-devel @@ -100,10 +101,6 @@ Patch56: klogconsole.diff ## time ## Patch60: time-1.7.dif -## -## which -## -Patch70: which-lib64.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed @@ -207,8 +204,6 @@ cd ../klogconsole %patch56 -p1 cd ../time-* %patch60 -cd ../which-* -%patch70 %build # adjtimex build @@ -219,9 +214,6 @@ cd .. pushd ../ # which build cd which-%{which_ver} -aclocal --force -autoconf --force -automake --force-missing --add-missing --foreign %configure make %{?_smp_mflags} cd .. @@ -254,7 +246,7 @@ export SUID_LDFLAGS="-pie" --enable-raw \ --enable-write \ --enable-line \ - --enable-libmount-mount \ + --enable-new-mount \ --enable-ddate \ --enable-login-utils \ --disable-mountpoint \ diff --git a/which-lib64.patch b/which-lib64.patch deleted file mode 100644 index 0e03a29..0000000 --- a/which-lib64.patch +++ /dev/null @@ -1,28 +0,0 @@ -Index: acinclude.m4 -=================================================================== ---- acinclude.m4.orig 2006-02-02 05:06:43.000000000 +0100 -+++ acinclude.m4 2008-07-07 14:14:59.000000000 +0200 -@@ -10,14 +10,19 @@ dnl because the test really is for libra - dnl just for library $1. Separate tests with the same $1 and different $2s - dnl may have different results. - ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` --AC_CACHE_VAL(ac_cv_lib_static_$ac_lib_var, -+AC_CACHE_VAL(ac_cv_lib_static_$ac_lib_var, [ -+if test "$libdir" != "${exec_prefix}/lib"; then -+ case $libdir in *64) -+ libsuffix=64 -+ esac -+fi - if test -r /etc/ld.so.conf ; then -- ld_so_paths="/lib /usr/lib `cat /etc/ld.so.conf`" -+ ld_so_paths="/lib${libsuffix} /usr/lib${libsuffix} `cat /etc/ld.so.conf`" - else -- ld_so_paths="/lib /usr/lib" -+ ld_so_paths="/lib${libsuffix} /usr/lib${libsuffix}" - fi - for path in $ld_so_paths; do -- [ac_save_LIBS="$LIBS" -+ ac_save_LIBS="$LIBS" - LIBS="$path/$1 $5 $LIBS" - AC_TRY_LINK(dnl - ifelse([$2], [main], , dnl Avoid conflicting decl of main. From aa19c628f4c6a165229eeb2d02ce41d6bab7060b4a921d24e2a06ef43e201814 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sat, 16 Jun 2012 05:24:42 +0000 Subject: [PATCH 144/211] Accepting request 125114 from Base:System - improve error messages from new mount (bnc#767208) - backport patches from upstream git: - mount-new-add-loopdev-specific-error-message.patch - mount-new-use-MNT_ERR-for-error-messages.patch - libmount-add-special-MNT_ERR-codes.patch - mount-new-improve-error-messages.patch - libmount-add-MNT_ERR_LOOPDEV.patch - fix automount with quota (rh#825836) - mount-new-allow-sloppy-for-non-root.patch - fix wrong mount options for CIFS mounts (bnc#766157) - libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch OBS-URL: https://build.opensuse.org/request/show/125114 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=149 --- libmount-add-MNT_ERR_LOOPDEV.patch | 59 +++++++++ libmount-add-special-MNT_ERR-codes.patch | 68 +++++++++++ ...se-nosuid-noexec-nodev-for-cifs-user.patch | 115 ++++++++++++++++++ ...w-add-loopdev-specific-error-message.patch | 51 ++++++++ mount-new-allow-sloppy-for-non-root.patch | 25 ++++ mount-new-improve-error-messages.patch | 46 +++++++ ...t-new-use-MNT_ERR-for-error-messages.patch | 56 +++++++++ util-linux-2.20-libmount-deps.patch | 8 +- util-linux.changes | 19 +++ util-linux.spec | 17 +++ 10 files changed, 460 insertions(+), 4 deletions(-) create mode 100644 libmount-add-MNT_ERR_LOOPDEV.patch create mode 100644 libmount-add-special-MNT_ERR-codes.patch create mode 100644 libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch create mode 100644 mount-new-add-loopdev-specific-error-message.patch create mode 100644 mount-new-allow-sloppy-for-non-root.patch create mode 100644 mount-new-improve-error-messages.patch create mode 100644 mount-new-use-MNT_ERR-for-error-messages.patch diff --git a/libmount-add-MNT_ERR_LOOPDEV.patch b/libmount-add-MNT_ERR_LOOPDEV.patch new file mode 100644 index 0000000..d1212aa --- /dev/null +++ b/libmount-add-MNT_ERR_LOOPDEV.patch @@ -0,0 +1,59 @@ +From 82756a747e4bcfc13a27b7618d889af080649584 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 28 May 2012 12:26:36 +0200 +Subject: [PATCH] libmount: add MNT_ERR_LOOPDEV + +Signed-off-by: Karel Zak +Signed-off-by: Petr Uzel +--- + lib/loopdev.c | 4 ++++ + libmount/src/context_loopdev.c | 1 + + libmount/src/libmount.h.in | 1 + + 3 files changed, 6 insertions(+), 0 deletions(-) + +Index: util-linux-2.21.2/lib/loopdev.c +=================================================================== +--- util-linux-2.21.2.orig/lib/loopdev.c ++++ util-linux-2.21.2/lib/loopdev.c +@@ -173,6 +173,8 @@ int loopcxt_init(struct loopdev_cxt *lc, + */ + void loopcxt_deinit(struct loopdev_cxt *lc) + { ++ int errsv = errno; ++ + if (!lc) + return; + +@@ -183,6 +185,8 @@ void loopcxt_deinit(struct loopdev_cxt * + + loopcxt_set_device(lc, NULL); + loopcxt_deinit_iterator(lc); ++ ++ errno = errsv; + } + + /* +Index: util-linux-2.21.2/libmount/src/context_loopdev.c +=================================================================== +--- util-linux-2.21.2.orig/libmount/src/context_loopdev.c ++++ util-linux-2.21.2/libmount/src/context_loopdev.c +@@ -261,6 +261,7 @@ int mnt_context_setup_loopdev(struct lib + + if (loopdev || rc != -EBUSY) { + DBG(CXT, mnt_debug_h(cxt, "failed to setup device")); ++ rc = -MNT_ERR_LOOPDEV; + goto done; + } + DBG(CXT, mnt_debug_h(cxt, "loopdev stolen...trying again")); +Index: util-linux-2.21.2/libmount/src/libmount.h.in +=================================================================== +--- util-linux-2.21.2.orig/libmount/src/libmount.h.in ++++ util-linux-2.21.2/libmount/src/libmount.h.in +@@ -126,6 +126,7 @@ enum { + #define MNT_ERR_NOFSTAB 5000 /* not found required entry in fstab */ + #define MNT_ERR_NOFSTYPE 5001 /* failed to detect filesystem type */ + #define MNT_ERR_NOSOURCE 5002 /* required mount source undefined */ ++#define MNT_ERR_LOOPDEV 5003 /* loopdev setup failed, errno set by libc */ + + /* init.c */ + extern void mnt_init_debug(int mask); diff --git a/libmount-add-special-MNT_ERR-codes.patch b/libmount-add-special-MNT_ERR-codes.patch new file mode 100644 index 0000000..f0afe25 --- /dev/null +++ b/libmount-add-special-MNT_ERR-codes.patch @@ -0,0 +1,68 @@ +From 47dea49b4cb4a4a98a6c518cc17f6d2c92be9528 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 24 Apr 2012 11:57:32 +0200 +Subject: [PATCH] libmount: add special MNT_ERR_ codes + +... to detect some situations where standard -errno is too generic. + +Signed-off-by: Karel Zak +Signed-off-by: Petr Uzel +--- + libmount/src/context.c | 20 ++++++++++---------- + libmount/src/libmount.h.in | 12 ++++++++++++ + 2 files changed, 22 insertions(+), 10 deletions(-) + +Index: util-linux-2.21.2/libmount/src/context.c +=================================================================== +--- util-linux-2.21.2.orig/libmount/src/context.c ++++ util-linux-2.21.2/libmount/src/context.c +@@ -1186,7 +1186,7 @@ int mnt_context_prepare_srcpath(struct l + if (cache) + path = mnt_resolve_tag(t, v, cache); + +- rc = path ? mnt_fs_set_source(cxt->fs, path) : -EINVAL; ++ rc = path ? mnt_fs_set_source(cxt->fs, path) : -MNT_ERR_NOSOURCE; + + } else if (cache && !mnt_fs_is_pseudofs(cxt->fs)) { + /* +@@ -1247,7 +1247,7 @@ int mnt_context_prepare_target(struct li + cache = mnt_context_get_cache(cxt); + if (cache) { + char *path = mnt_resolve_path(tgt, cache); +- if (strcmp(path, tgt)) ++ if (path && strcmp(path, tgt) != 0) + rc = mnt_fs_set_target(cxt->fs, path); + } + +@@ -1543,7 +1543,7 @@ static int apply_table(struct libmnt_con + } + + if (!fs) +- return -EINVAL; ++ return -MNT_ERR_NOFSTAB; /* not found */ + + DBG(CXT, mnt_debug_h(cxt, "apply entry:")); + DBG(CXT, mnt_fs_print_debug(fs, stderr)); +Index: util-linux-2.21.2/libmount/src/libmount.h.in +=================================================================== +--- util-linux-2.21.2.orig/libmount/src/libmount.h.in ++++ util-linux-2.21.2/libmount/src/libmount.h.in +@@ -115,6 +115,18 @@ enum { + MNT_ACT_UMOUNT + }; + ++/* ++ * Errors -- by default libmount returns -errno for generic errors (ENOMEM, ++ * EINVAL, ...) and for mount(2) errors, but for some specific operations it ++ * returns private error codes. Note that maximum system errno value should be ++ * 4095 on UNIXes. ++ * ++ * See also mnt_context_get_syscall_errno() and mnt_context_get_helper_status(). ++ */ ++#define MNT_ERR_NOFSTAB 5000 /* not found required entry in fstab */ ++#define MNT_ERR_NOFSTYPE 5001 /* failed to detect filesystem type */ ++#define MNT_ERR_NOSOURCE 5002 /* required mount source undefined */ ++ + /* init.c */ + extern void mnt_init_debug(int mask); + diff --git a/libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch b/libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch new file mode 100644 index 0000000..695f5b9 --- /dev/null +++ b/libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch @@ -0,0 +1,115 @@ +From e90e7401d0c318c9dac4a0204e2bca86949b1d32 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 14 Jun 2012 14:19:26 +0200 +Subject: [PATCH] libmount: don't use nosuid,noexec,nodev for cifs user=foo + + mount -t cifs //127.0.0.1/users /mnt/smb -o user=root,password=linux + +is incorrectly translated to + + mount.cifs -o noexec,nosuid,nodev,user=root,password=linux ... + +The command mount(8) should be sensitive to "user" (without "=") +only. The correct cifs command line is: + + mount.cifs -o user=root,password=linux + +Addresses: https://bugzilla.novell.com/show_bug.cgi?id=766157 +Signed-off-by: Karel Zak +Signed-off-by: Petr Uzel +--- + libmount/src/context_mount.c | 29 +++++++++++++++++++++++++++-- + libmount/src/optstr.c | 9 +++++---- + 2 files changed, 32 insertions(+), 6 deletions(-) + +Index: util-linux-2.21.2/libmount/src/context_mount.c +=================================================================== +--- util-linux-2.21.2.orig/libmount/src/context_mount.c ++++ util-linux-2.21.2/libmount/src/context_mount.c +@@ -53,6 +53,15 @@ static int fix_optstr(struct libmnt_cont + if (cxt->mountflags & MS_PROPAGATION) + cxt->mountflags &= (MS_PROPAGATION | MS_REC | MS_SILENT); + ++ /* ++ * The "user" options is our business (so we can modify the option), ++ * but exception is command line for /sbin/mount. helpers. Let's ++ * save the original user= to call the helpers with unchanged ++ * "user" setting. ++ * ++ * Don't check for MNT_MS_USER in cxt->user_mountflags, the flag maybe ++ * removed by evaluate_permissions(). ++ */ + if (!mnt_optstr_get_option(fs->user_optstr, "user", &val, &valsz)) { + if (val) { + cxt->orig_user = strndup(val, valsz); +@@ -196,6 +205,10 @@ err: + + /* + * this has to be called before fix_optstr() ++ * ++ * Note that user= maybe be used by some filesystems as filesystem ++ * specific option (e.g. cifs). Yes, developers of such filesystems have ++ * allocated pretty hot place in hell... + */ + static int evaluate_permissions(struct libmnt_context *cxt) + { +@@ -233,10 +246,22 @@ static int evaluate_permissions(struct l + } + + /* +- * Note that MS_OWNERSECURE and MS_SECURE mount options +- * are applied by mnt_optstr_get_flags() from mnt_context_merge_mflags() ++ * MS_OWNERSECURE and MS_SECURE mount options are already ++ * applied by mnt_optstr_get_flags() in mnt_context_merge_mflags() ++ * if "user" (but no user= !) options is set. ++ * ++ * Let's ignore all user= (if is set) requests. + */ ++ if (cxt->user_mountflags & MNT_MS_USER) { ++ size_t valsz = 0; + ++ if (!mnt_optstr_get_option(cxt->fs->user_optstr, ++ "user", NULL, &valsz) && valsz) { ++ ++ DBG(CXT, mnt_debug_h(cxt, "perms: user= detected, ignore")); ++ cxt->user_mountflags &= ~MNT_MS_USER; ++ } ++ } + + /* + * MS_OWNER: Allow owners to mount when fstab contains the +Index: util-linux-2.21.2/libmount/src/optstr.c +=================================================================== +--- util-linux-2.21.2.orig/libmount/src/optstr.c ++++ util-linux-2.21.2/libmount/src/optstr.c +@@ -579,7 +579,7 @@ int mnt_optstr_get_flags(const char *opt + { + struct libmnt_optmap const *maps[2]; + char *name, *str = (char *) optstr; +- size_t namesz = 0; ++ size_t namesz = 0, valsz = 0; + int nmaps = 0; + + assert(optstr); +@@ -596,7 +596,7 @@ int mnt_optstr_get_flags(const char *opt + */ + maps[nmaps++] = mnt_get_builtin_optmap(MNT_USERSPACE_MAP); + +- while(!mnt_optstr_next_option(&str, &name, &namesz, NULL, NULL)) { ++ while(!mnt_optstr_next_option(&str, &name, &namesz, NULL, &valsz)) { + const struct libmnt_optmap *ent; + const struct libmnt_optmap *m; + +@@ -610,9 +610,10 @@ int mnt_optstr_get_flags(const char *opt + else + *flags |= ent->id; + +- } else if (nmaps == 2 && m == maps[1]) { ++ } else if (nmaps == 2 && m == maps[1] && valsz == 0) { + /* +- * Special case -- translate "user" to MS_ options ++ * Special case -- translate "user" (but no user=) to ++ * MS_ options + */ + if (ent->mask & MNT_INVERT) + continue; diff --git a/mount-new-add-loopdev-specific-error-message.patch b/mount-new-add-loopdev-specific-error-message.patch new file mode 100644 index 0000000..9f1e028 --- /dev/null +++ b/mount-new-add-loopdev-specific-error-message.patch @@ -0,0 +1,51 @@ +From 10389b1e4535dda7d27e5ab39d3d4f9d7868a5c9 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 28 May 2012 12:26:41 +0200 +Subject: [PATCH] mount: (new) add loopdev specific error message + +Signed-off-by: Karel Zak +Signed-off-by: Petr Uzel +--- + sys-utils/mount.c | 15 ++++++++++++--- + 1 files changed, 12 insertions(+), 3 deletions(-) + +Index: util-linux-2.21.2/sys-utils/mount.c +=================================================================== +--- util-linux-2.21.2.orig/sys-utils/mount.c ++++ util-linux-2.21.2/sys-utils/mount.c +@@ -354,6 +354,9 @@ try_readonly: + return MOUNT_EX_SUCCESS; /* mount(2) success */ + } + ++ mnt_context_get_mflags(cxt, &mflags); /* mount(2) flags */ ++ mnt_context_get_user_mflags(cxt, &uflags); /* userspace flags */ ++ + if (!mnt_context_syscall_called(cxt)) { + /* + * libmount errors (extra library checks) +@@ -382,7 +385,15 @@ try_readonly: + else + warnx(_("mount source not defined")); + return MOUNT_EX_USAGE; +- ++ case -MNT_ERR_LOOPDEV: ++ if (errno == ENOENT ++ && (uflags & MNT_MS_ENCRYPTION) ++ && src && stat(src, &st) == 0) ++ warnx(_("%s: failed to setup loop device " ++ "(probably unknown encryption type)"), src); ++ else ++ warn(_("%s: failed to setup loop device"), src); ++ return MOUNT_EX_FAIL; + default: + return handle_generic_errors(rc, _("%s: mount failed"), + tgt ? tgt : src); +@@ -406,8 +417,6 @@ try_readonly: + */ + syserr = mnt_context_get_syscall_errno(cxt); + +- mnt_context_get_mflags(cxt, &mflags); /* mount(2) flags */ +- mnt_context_get_user_mflags(cxt, &uflags); /* userspace flags */ + + switch(syserr) { + case EPERM: diff --git a/mount-new-allow-sloppy-for-non-root.patch b/mount-new-allow-sloppy-for-non-root.patch new file mode 100644 index 0000000..c83533b --- /dev/null +++ b/mount-new-allow-sloppy-for-non-root.patch @@ -0,0 +1,25 @@ +From e26de525e21677c680d87f63e4dafbe4859365bf Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 14 Jun 2012 14:43:21 +0200 +Subject: [PATCH] mount: (new) allow sloppy for non-root + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=825836 +Signed-off-by: Karel Zak +Signed-off-by: Petr Uzel +--- + sys-utils/mount.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +Index: util-linux-2.21.2/sys-utils/mount.c +=================================================================== +--- util-linux-2.21.2.orig/sys-utils/mount.c ++++ util-linux-2.21.2/sys-utils/mount.c +@@ -732,7 +732,7 @@ int main(int argc, char **argv) + longopts, NULL)) != -1) { + + /* only few options are allowed for non-root users */ +- if (mnt_context_is_restricted(cxt) && !strchr("hlLUVvpri", c)) ++ if (mnt_context_is_restricted(cxt) && !strchr("hlLUVvpris", c)) + exit_non_root(option_to_longopt(c, longopts)); + + switch(c) { diff --git a/mount-new-improve-error-messages.patch b/mount-new-improve-error-messages.patch new file mode 100644 index 0000000..36c88b4 --- /dev/null +++ b/mount-new-improve-error-messages.patch @@ -0,0 +1,46 @@ +From 58f108ef2b9c8cc0362e7781a72e5e921dc383b3 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 17 Apr 2012 11:36:36 +0200 +Subject: [PATCH] mount: (new) improve error messages + +Signed-off-by: Karel Zak +Signed-off-by: Petr Uzel +--- + sys-utils/mount.c | 15 +++++++-------- + 1 files changed, 7 insertions(+), 8 deletions(-) + +Index: util-linux-2.21.2/sys-utils/mount.c +=================================================================== +--- util-linux-2.21.2.orig/sys-utils/mount.c ++++ util-linux-2.21.2/sys-utils/mount.c +@@ -367,16 +367,13 @@ try_readonly: + return MOUNT_EX_USAGE; + } + +- /* +- * TODO: add mnt_context_fstab_applied() to check if we found +- * target/source in the file. +- */ +- if (!tgt) { +- if (mflags & MS_REMOUNT) +- warnx(_("%s not mounted"), src ? src : tgt); +- else ++ if (!tgt || (!src && !(mflags & MS_PROPAGATION))) { ++ if (!mnt_context_fstab_applied(cxt)) + warnx(_("can't find %s in %s"), src ? src : tgt, + mnt_get_fstab_path()); ++ else if (mflags & MS_REMOUNT) ++ warnx(_("%s not mounted"), src ? src : tgt); ++ + return MOUNT_EX_USAGE; + } + +@@ -485,6 +482,8 @@ try_readonly: + case EINVAL: + if (mflags & MS_REMOUNT) + warnx(_("%s not mounted or bad option"), tgt); ++ else if (mflags & MS_PROPAGATION) ++ warnx(_("%s is not mountpoint or bad option"), tgt); + else + warnx(_("wrong fs type, bad option, bad superblock on %s,\n" + " missing codepage or helper program, or other error"), diff --git a/mount-new-use-MNT_ERR-for-error-messages.patch b/mount-new-use-MNT_ERR-for-error-messages.patch new file mode 100644 index 0000000..05dc9b2 --- /dev/null +++ b/mount-new-use-MNT_ERR-for-error-messages.patch @@ -0,0 +1,56 @@ +From ba24923e97e099668b8c96dba9596c90cb58c417 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 24 Apr 2012 11:59:18 +0200 +Subject: [PATCH] mount: (new) use MNT_ERR_ for error messages + +Signed-off-by: Karel Zak +Signed-off-by: Petr Uzel +--- + sys-utils/mount.c | 27 +++++++++++++-------------- + 1 files changed, 13 insertions(+), 14 deletions(-) + +Index: util-linux-2.21.2/sys-utils/mount.c +=================================================================== +--- util-linux-2.21.2.orig/sys-utils/mount.c ++++ util-linux-2.21.2/sys-utils/mount.c +@@ -365,29 +365,28 @@ try_readonly: + case -EBUSY: + warnx(_("%s is already mounted"), src); + return MOUNT_EX_USAGE; +- } +- +- if (!tgt || (!src && !(mflags & MS_PROPAGATION))) { +- if (!mnt_context_fstab_applied(cxt)) ++ case -MNT_ERR_NOFSTAB: + warnx(_("can't find %s in %s"), src ? src : tgt, + mnt_get_fstab_path()); +- else if (mflags & MS_REMOUNT) +- warnx(_("%s not mounted"), src ? src : tgt); +- + return MOUNT_EX_USAGE; +- } +- +- if (!mnt_context_get_fstype(cxt)) { ++ case -MNT_ERR_NOFSTYPE: + if (restricted) + warnx(_("I could not determine the filesystem type, " + "and none was specified")); + else + warnx(_("you must specify the filesystem type")); + return MOUNT_EX_USAGE; +- } ++ case -MNT_ERR_NOSOURCE: ++ if (src) ++ warnx(_("can't find %s"), src); ++ else ++ warnx(_("mount source not defined")); ++ return MOUNT_EX_USAGE; ++ ++ default: + return handle_generic_errors(rc, _("%s: mount failed"), + tgt ? tgt : src); +- ++ } + } else if (mnt_context_get_syscall_errno(cxt) == 0) { + /* + * mount(2) syscall success, but something else failed diff --git a/util-linux-2.20-libmount-deps.patch b/util-linux-2.20-libmount-deps.patch index 55a2ad2..50b2f15 100644 --- a/util-linux-2.20-libmount-deps.patch +++ b/util-linux-2.20-libmount-deps.patch @@ -1,8 +1,8 @@ -Index: util-linux-2.20/libmount/src/Makefile.am +Index: util-linux-2.21.2/libmount/src/Makefile.am =================================================================== ---- util-linux-2.20.orig/libmount/src/Makefile.am -+++ util-linux-2.20/libmount/src/Makefile.am -@@ -29,7 +29,7 @@ nodist_libmount_la_SOURCES = mountP.h +--- util-linux-2.21.2.orig/libmount/src/Makefile.am ++++ util-linux-2.21.2/libmount/src/Makefile.am +@@ -30,7 +30,7 @@ nodist_libmount_la_SOURCES = mountP.h libmount_la_LIBADD = $(ul_libblkid_la) $(SELINUX_LIBS) diff --git a/util-linux.changes b/util-linux.changes index 747c987..7efa7c1 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Fri Jun 15 12:57:06 UTC 2012 - puzel@suse.com + +- improve error messages from new mount (bnc#767208) + - backport patches from upstream git: + - mount-new-add-loopdev-specific-error-message.patch + - mount-new-use-MNT_ERR-for-error-messages.patch + - libmount-add-special-MNT_ERR-codes.patch + - mount-new-improve-error-messages.patch + - libmount-add-MNT_ERR_LOOPDEV.patch + +------------------------------------------------------------------- +Thu Jun 14 13:04:40 UTC 2012 - puzel@suse.com + +- fix automount with quota (rh#825836) + - mount-new-allow-sloppy-for-non-root.patch +- fix wrong mount options for CIFS mounts (bnc#766157) + - libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch + ------------------------------------------------------------------- Thu May 31 10:04:23 UTC 2012 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index 21ab64b..c681025 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -88,6 +88,16 @@ Source51: blkid.conf Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch2: util-linux-2.20-libmount-deps.patch Patch3: fdisk-tinfo.patch +Patch4: mount-new-allow-sloppy-for-non-root.patch +Patch5: libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch + +# Patches 6-10: bcn#767208 (taken from upstream +Patch6: mount-new-improve-error-messages.patch +Patch7: libmount-add-special-MNT_ERR-codes.patch +Patch8: mount-new-use-MNT_ERR-for-error-messages.patch +Patch9: libmount-add-MNT_ERR_LOOPDEV.patch +Patch10: mount-new-add-loopdev-specific-error-message.patch +##### ## ## adjtimex @@ -190,6 +200,13 @@ Files to develop applications using the libmount library. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 # cd adjtimex-* From dc6cde93e0a72ffc4b062504c7f7ff9d62745a3288f3bd5f27ed90918ed4b64d Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 25 Jun 2012 12:42:14 +0000 Subject: [PATCH 145/211] Accepting request 125753 from Base:System - Remove pam_lastlog from login.pamd, login is doing it itself. [bnc#768067] (forwarded request 125752 from kukuk) OBS-URL: https://build.opensuse.org/request/show/125753 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=151 --- login.pamd | 2 +- util-linux-2.21.2-noenc-suse.diff | 13 + util-linux-2.21.2-noenc.diff | 535 ++++++++++++++++++++++++++++++ util-linux-HACK-boot.localfs.diff | 27 ++ util-linux.changes | 17 + util-linux.spec | 11 + 6 files changed, 604 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.21.2-noenc-suse.diff create mode 100644 util-linux-2.21.2-noenc.diff create mode 100644 util-linux-HACK-boot.localfs.diff diff --git a/login.pamd b/login.pamd index 9350054..13df590 100644 --- a/login.pamd +++ b/login.pamd @@ -6,5 +6,5 @@ account include common-account password include common-password session required pam_loginuid.so session include common-session -session optional pam_lastlog.so nowtmp showfailed +#session optional pam_lastlog.so nowtmp showfailed session optional pam_mail.so standard diff --git a/util-linux-2.21.2-noenc-suse.diff b/util-linux-2.21.2-noenc-suse.diff new file mode 100644 index 0000000..42da0b1 --- /dev/null +++ b/util-linux-2.21.2-noenc-suse.diff @@ -0,0 +1,13 @@ +Index: util-linux-2.21.2/libmount/src/context_loopdev.c +=================================================================== +--- util-linux-2.21.2.orig/libmount/src/context_loopdev.c ++++ util-linux-2.21.2/libmount/src/context_loopdev.c +@@ -199,6 +199,8 @@ int mnt_context_setup_loopdev(struct lib + if (rc == 0 && (cxt->user_mountflags & MNT_MS_ENCRYPTION) && + mnt_optstr_get_option(optstr, "encryption", &val, &len) == 0) { + DBG(CXT, mnt_debug_h(cxt, "encryption no longer supported")); ++ // XXX: nasty for the lib but there's on better way to give a hint atm ++ fprintf(stderr, "mount: encryption no longer supported. Please use /etc/crypttab instead (man 5 crypttab)\n"); + rc = -EINVAL; + } + diff --git a/util-linux-2.21.2-noenc.diff b/util-linux-2.21.2-noenc.diff new file mode 100644 index 0000000..936d677 --- /dev/null +++ b/util-linux-2.21.2-noenc.diff @@ -0,0 +1,535 @@ +From e1f7680ca45c5173f7853feb76dd093cec8d17ad Mon Sep 17 00:00:00 2001 +From: Ludwig Nussel +Date: Fri, 15 Jun 2012 09:38:36 +0200 +Subject: [PATCH] remove obsolete encryption support from losetup + +kernel cryptoloop is deprecated since ages and support for cryptoloop in +util-linux is incomplete/broken. +- no password hashing +- last 8 bit of key are always set to zero +- no binary keys possible (stops reading key at \n and \0) + +In the past some Distros added the above features with patches. So +remove cryptoloop support from util-linux completely to make sure +people won't try using it. + +Signed-off-by: Ludwig Nussel +--- + include/loopdev.h | 3 -- + lib/loopdev.c | 56 ---------------------------------------- + libmount/src/context_loopdev.c | 22 +++------------- + mount/mount.8 | 9 +----- + mount/mount.c | 20 +++++--------- + sys-utils/losetup.8 | 29 ++------------------ + sys-utils/losetup.c | 30 +++++---------------- + sys-utils/mount.8 | 7 +---- + sys-utils/mount.c | 34 +----------------------- + 9 files changed, 25 insertions(+), 185 deletions(-) + +diff --git a/include/loopdev.h b/include/loopdev.h +index 906bee0..030f215 100644 +--- a/include/loopdev.h ++++ b/include/loopdev.h +@@ -165,9 +165,6 @@ int loopcxt_set_offset(struct loopdev_cxt *lc, uint64_t offset); + int loopcxt_set_sizelimit(struct loopdev_cxt *lc, uint64_t sizelimit); + int loopcxt_set_flags(struct loopdev_cxt *lc, uint32_t flags); + int loopcxt_set_backing_file(struct loopdev_cxt *lc, const char *filename); +-int loopcxt_set_encryption(struct loopdev_cxt *lc, +- const char *encryption, +- const char *password); + + extern char *loopcxt_get_backing_file(struct loopdev_cxt *lc); + extern int loopcxt_get_backing_devno(struct loopdev_cxt *lc, dev_t *devno); +diff --git a/lib/loopdev.c b/lib/loopdev.c +index fd3f9ba..807984e 100644 +--- a/lib/loopdev.c ++++ b/lib/loopdev.c +@@ -963,62 +963,6 @@ int loopcxt_set_backing_file(struct loopdev_cxt *lc, const char *filename) + return 0; + } + +-static int digits_only(const char *s) +-{ +- while (*s) +- if (!isdigit(*s++)) +- return 0; +- return 1; +-} +- +-/* +- * @lc: context +- * @encryption: encryption name / type (see lopsetup man page) +- * @password +- * +- * Note that the encryption functionality is deprecated an unmaintained. Use +- * cryptsetup (it also supports AES-loops). +- * +- * The setting is removed by loopcxt_set_device() loopcxt_next()! +- * +- * Returns: 0 on success, <0 on error. +- */ +-int loopcxt_set_encryption(struct loopdev_cxt *lc, +- const char *encryption, +- const char *password) +-{ +- if (!lc) +- return -EINVAL; +- +- DBG(lc, loopdev_debug("setting encryption '%s'", encryption)); +- +- if (encryption && *encryption) { +- if (digits_only(encryption)) { +- lc->info.lo_encrypt_type = atoi(encryption); +- } else { +- lc->info.lo_encrypt_type = LO_CRYPT_CRYPTOAPI; +- snprintf((char *)lc->info.lo_crypt_name, LO_NAME_SIZE, +- "%s", encryption); +- } +- } +- +- switch (lc->info.lo_encrypt_type) { +- case LO_CRYPT_NONE: +- lc->info.lo_encrypt_key_size = 0; +- break; +- default: +- DBG(lc, loopdev_debug("setting encryption key")); +- memset(lc->info.lo_encrypt_key, 0, LO_KEY_SIZE); +- strncpy((char *)lc->info.lo_encrypt_key, password, LO_KEY_SIZE); +- lc->info.lo_encrypt_key[LO_KEY_SIZE - 1] = '\0'; +- lc->info.lo_encrypt_key_size = LO_KEY_SIZE; +- break; +- } +- +- DBG(lc, loopdev_debug("encryption successfully set")); +- return 0; +-} +- + /* + * @cl: context + * +diff --git a/libmount/src/context_loopdev.c b/libmount/src/context_loopdev.c +index 023c952..863ee3d 100644 +--- a/libmount/src/context_loopdev.c ++++ b/libmount/src/context_loopdev.c +@@ -7,7 +7,6 @@ + + /* + * DOCS: - "lo@" prefix for fstype is unsupported +- * - encyption= mount option for loop device is unssuported + */ + + #include +@@ -35,8 +34,7 @@ int mnt_context_is_loopdev(struct libmnt_context *cxt) + + if (cxt->user_mountflags & (MNT_MS_LOOP | + MNT_MS_OFFSET | +- MNT_MS_SIZELIMIT | +- MNT_MS_ENCRYPTION)) { ++ MNT_MS_SIZELIMIT)) { + + DBG(CXT, mnt_debug_h(cxt, "loopdev specific options detected")); + return 1; +@@ -134,7 +132,7 @@ static int is_mounted_same_loopfile(struct libmnt_context *cxt, + int mnt_context_setup_loopdev(struct libmnt_context *cxt) + { + const char *backing_file, *optstr, *loopdev = NULL; +- char *val = NULL, *enc = NULL, *pwd = NULL; ++ char *val = NULL; + size_t len; + struct loopdev_cxt lc; + int rc = 0, lo_flags = 0; +@@ -200,13 +198,8 @@ int mnt_context_setup_loopdev(struct libmnt_context *cxt) + */ + if (rc == 0 && (cxt->user_mountflags & MNT_MS_ENCRYPTION) && + mnt_optstr_get_option(optstr, "encryption", &val, &len) == 0) { +- enc = strndup(val, len); +- if (val && !enc) +- rc = -ENOMEM; +- if (enc && cxt->pwd_get_cb) { +- DBG(CXT, mnt_debug_h(cxt, "asking for pass")); +- pwd = cxt->pwd_get_cb(cxt); +- } ++ DBG(CXT, mnt_debug_h(cxt, "encryption no longer supported")); ++ rc = -EINVAL; + } + + if (rc == 0 && is_mounted_same_loopfile(cxt, +@@ -245,8 +238,6 @@ int mnt_context_setup_loopdev(struct libmnt_context *cxt) + rc = loopcxt_set_offset(&lc, offset); + if (!rc && sizelimit) + rc = loopcxt_set_sizelimit(&lc, sizelimit); +- if (!rc && enc && pwd) +- loopcxt_set_encryption(&lc, enc, pwd); + if (!rc) + loopcxt_set_flags(&lc, lo_flags); + if (rc) { +@@ -298,11 +289,6 @@ int mnt_context_setup_loopdev(struct libmnt_context *cxt) + loopcxt_set_fd(&lc, -1, 0); + } + done: +- free(enc); +- if (pwd && cxt->pwd_release_cb) { +- DBG(CXT, mnt_debug_h(cxt, "release pass")); +- cxt->pwd_release_cb(cxt, pwd); +- } + loopcxt_deinit(&lc); + return rc; + } +diff --git a/mount/mount.8 b/mount/mount.8 +index 789d9fe..0644e8e 100644 +--- a/mount/mount.8 ++++ b/mount/mount.8 +@@ -535,11 +535,6 @@ Don't canonicalize paths. The mount command canonicalizes all paths + file. This option can be used together with the + .B \-f + flag for already canonicalized absolut paths. +-.IP "\fB\-p, \-\-pass\-fd \fInum\fP" +-In case of a loop mount with encryption, read the passphrase from +-file descriptor +-.I num +-instead of from the terminal. + .IP "\fB\-s\fP" + Tolerate sloppy mount options rather than failing. This will ignore + mount options not supported by a filesystem type. Not all filesystems +@@ -2708,8 +2703,8 @@ not specified or the filesystem is known for libblkid, for example: + .B "mount -t ext3 /tmp/disk.img /mnt" + .sp + .RE +-This type of mount knows about four options, namely +-.BR loop ", " offset ", " sizelimit " and " encryption , ++This type of mount knows about three options, namely ++.BR loop ", " offset ", " sizelimit " , + that are really options to + .BR \%losetup (8). + (These options can be used in addition to those specific +diff --git a/mount/mount.c b/mount/mount.c +index 396f357..b69fd61 100644 +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -83,9 +83,6 @@ static int mounttype = 0; + /* True if (ruid != euid) or (0 != ruid), i.e. only "user" mounts permitted. */ + static int restricted = 1; + +-/* Contains the fd to read the passphrase from, if any. */ +-static int pfd = -1; +- + #ifdef HAVE_LIBMOUNT_MOUNT + static struct libmnt_update *mtab_update; + static char *mtab_opts; +@@ -1262,7 +1259,7 @@ loop_check(const char **spec, const char **type, int *flags, + *type = opt_vfstype; + } + +- *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_sizelimit || opt_encryption); ++ *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_sizelimit); + *loopfile = *spec; + + /* Automatically create a loop device from a regular file if a filesystem +@@ -1317,6 +1314,11 @@ loop_check(const char **spec, const char **type, int *flags, + return EX_FAIL; + } + ++ if (opt_encryption) { ++ error("mount: %s", _("encryption not supported, use cryptsetup(8) instead")); ++ return EX_FAIL; ++ } ++ + loopcxt_init(&lc, 0); + /* loopcxt_enable_debug(&lc, 1); */ + +@@ -1525,14 +1527,6 @@ update_mtab_entry(const char *spec, const char *node, const char *type, + #endif /* !HAVE_LIBMOUNT_MOUNT */ + + static void +-set_pfd(char *s) { +- if (!isdigit(*s)) +- die(EX_USAGE, +- _("mount: argument to -p or --pass-fd must be a number")); +- pfd = atoi(optarg); +-} +- +-static void + cdrom_setspeed(const char *spec) { + #define CDROM_SELECT_SPEED 0x5322 /* Set the CD-ROM speed */ + if (opt_speed) { +@@ -2579,7 +2573,7 @@ main(int argc, char *argv[]) { + test_opts = append_opt(test_opts, optarg, NULL); + break; + case 'p': /* fd on which to read passwd */ +- set_pfd(optarg); ++ error("mount: %s", _("--pass-fd is no longer supported")); + break; + case 'r': /* mount readonly */ + readonly = 1; +diff --git a/sys-utils/losetup.8 b/sys-utils/losetup.8 +index f50b072..8c69689 100644 +--- a/sys-utils/losetup.8 ++++ b/sys-utils/losetup.8 +@@ -40,8 +40,6 @@ Setup loop device: + .sp + .in +5 + .B losetup +-.RB [{ \-e | \-E } +-.IR encryption ] + .RB [ \-o + .IR offset ] + .RB [ \-\-sizelimit +@@ -82,8 +80,6 @@ force loop driver to reread size of the file associated with the specified loop + detach the file or device associated with the specified loop device(s) + .IP "\fB\-D, \-\-detach-all\fP" + detach all associated loop devices +-.IP "\fB\-e, \-E, \-\-encryption \fIencryption_type\fP" +-enable data encryption with specified name or number + .IP "\fB\-f, \-\-find\fP" + find the first unused loop device. If a + .I file +@@ -98,10 +94,6 @@ the data start is moved \fIoffset\fP bytes into the specified file or + device + .IP "\fB\-\-sizelimit \fIsize\fP" + the data end is set to no more than \fIsize\fP bytes after the data start +-.IP "\fB\-p, \-\-pass-fd \fInum\fP" +-read the passphrase from file descriptor with number +-.I num +-instead of from the terminal + .IP "\fB\-P, \-\-partscan\fP" + force kernel to scan partition table on newly created loop device + .IP "\fB\-r, \-\-read-only\fP" +@@ -116,25 +108,10 @@ argument are present. + verbose mode + + .SH ENCRYPTION +-.B Cryptoloop is deprecated in favor of dm-crypt. For more details see +-.B cryptsetup (8). It is possible that all bug reports regarding to -E/-e +-.B options will be ignored. +- +- +-It is possible to specify transfer functions (for encryption/decryption +-or other purposes) using one of the +-.B \-E ++Cryptoloop is no longer supported in favor of dm-crypt. For more details see ++.B cryptsetup (8) + and +-.B \-e +-options. +-There are two mechanisms to specify the desired encryption: by number +-and by name. If an encryption is specified by number then one +-has to make sure that the Linux kernel knows about the encryption with that +-number, probably by patching the kernel. Standard numbers that are +-always present are 0 (no encryption) and 1 (XOR encryption). +-When the cryptoloop module is loaded (or compiled in), it uses number 18. +-This cryptoloop module will take the name of an arbitrary encryption type +-and find the module that knows how to perform that encryption. ++.B crypttab (5). + + .SH RETURN VALUE + .B losetup +diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c +index 9f03151..2513253 100644 +--- a/sys-utils/losetup.c ++++ b/sys-utils/losetup.c +@@ -18,7 +18,6 @@ + #include "nls.h" + #include "strutils.h" + #include "loopdev.h" +-#include "xgetpass.h" + + enum { + A_CREATE = 1, /* setup a new device */ +@@ -164,10 +163,8 @@ static void usage(FILE *out) + " -j, --associated list all devices associated with \n"), out); + fputs(USAGE_SEPARATOR, out); + +- fputs(_(" -e, --encryption enable encryption with specified \n" +- " -o, --offset start at offset into file\n" ++ fputs(_(" -o, --offset start at offset into file\n" + " --sizelimit device limited to bytes of the file\n" +- " -p, --pass-fd read passphrase from file descriptor \n" + " -P, --partscan create partitioned loop device\n" + " -r, --read-only setup read-only loop device\n" + " --show print device name after setup (with -f)\n" +@@ -185,8 +182,8 @@ static void usage(FILE *out) + int main(int argc, char **argv) + { + struct loopdev_cxt lc; +- int act = 0, flags = 0, passfd = -1, c; +- char *file = NULL, *encryption = NULL; ++ int act = 0, flags = 0, c; ++ char *file = NULL; + uint64_t offset = 0, sizelimit = 0; + int res = 0, showdev = 0, lo_flags = 0; + +@@ -249,7 +246,7 @@ int main(int argc, char **argv) + break; + case 'E': + case 'e': +- encryption = optarg; ++ errx(EXIT_FAILURE, _("encryption not supported, use cryptsetup(8) instead")); + break; + case 'f': + act = A_FIND_FREE; +@@ -268,8 +265,7 @@ int main(int argc, char **argv) + flags |= LOOPDEV_FL_OFFSET; + break; + case 'p': +- passfd = strtol_or_err(optarg, +- _("invalid passphrase file descriptor")); ++ warn(_("--pass-fd is no longer supported")); + break; + case 'P': + lo_flags |= LO_FLAGS_PARTSCAN; +@@ -327,10 +323,10 @@ int main(int argc, char **argv) + } + + if (act != A_CREATE && +- (encryption || sizelimit || passfd != -1 || lo_flags || showdev)) ++ (sizelimit || lo_flags || showdev)) + errx(EXIT_FAILURE, + _("the options %s are allowed to loop device setup only"), +- "--{encryption,sizelimit,pass-fd,read-only,show}"); ++ "--{sizelimit,read-only,show}"); + + if ((flags & LOOPDEV_FL_OFFSET) && + act != A_CREATE && (act != A_SHOW || !file)) +@@ -339,16 +335,8 @@ int main(int argc, char **argv) + switch (act) { + case A_CREATE: + { +- char *pass = NULL; + int hasdev = loopcxt_has_device(&lc); + +- if (encryption) { +-#ifdef MCL_FUTURE +- if(mlockall(MCL_CURRENT | MCL_FUTURE)) +- err(EXIT_FAILURE, _("couldn't lock into memory")); +-#endif +- pass = xgetpass(passfd, _("Password: ")); +- } + do { + /* Note that loopcxt_{find_unused,set_device}() resets + * loopcxt struct. +@@ -357,8 +345,6 @@ int main(int argc, char **argv) + warnx(_("not found unused device")); + break; + } +- if (encryption && pass) +- loopcxt_set_encryption(&lc, encryption, pass); + if (flags & LOOPDEV_FL_OFFSET) + loopcxt_set_offset(&lc, offset); + if (flags & LOOPDEV_FL_SIZELIMIT) +@@ -379,8 +365,6 @@ int main(int argc, char **argv) + } + } while (hasdev == 0); + +- free(pass); +- + if (showdev && res == 0) + printf("%s\n", loopcxt_get_device(&lc)); + break; +diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 +index 4f8af0a..73f5170 100644 +--- a/sys-utils/mount.8 ++++ b/sys-utils/mount.8 +@@ -528,11 +528,6 @@ Don't canonicalize paths. The mount command canonicalizes all paths + file. This option can be used together with the + .B \-f + flag for already canonicalized absolut paths. +-.IP "\fB\-p, \-\-pass\-fd \fInum\fP" +-In case of a loop mount with encryption, read the passphrase from +-file descriptor +-.I num +-instead of from the terminal. + .IP "\fB\-s\fP" + Tolerate sloppy mount options rather than failing. This will ignore + mount options not supported by a filesystem type. Not all filesystems +@@ -2715,7 +2710,7 @@ not specified or the filesystem is known for libblkid, for example: + .sp + .RE + This type of mount knows about four options, namely +-.BR loop ", " offset ", " sizelimit " and " encryption , ++.BR loop ", " offset ", " sizelimit ", + that are really options to + .BR \%losetup (8). + (These options can be used in addition to those specific +diff --git a/sys-utils/mount.c b/sys-utils/mount.c +index 7f2d5d8..031fd31 100644 +--- a/sys-utils/mount.c ++++ b/sys-utils/mount.c +@@ -36,7 +36,6 @@ + #include "env.h" + #include "optutils.h" + #include "strutils.h" +-#include "xgetpass.h" + #include "exitcodes.h" + #include "xalloc.h" + +@@ -49,7 +48,6 @@ + * --options-source-force MNT_OMODE_FORCE + */ + +-static int passfd = -1; + static int readwrite; + + static int mk_exit_code(struct libmnt_context *cxt, int rc); +@@ -103,32 +101,6 @@ static int table_parser_errcb(struct libmnt_table *tb __attribute__((__unused__) + return 0; + } + +-static char *encrypt_pass_get(struct libmnt_context *cxt) +-{ +- if (!cxt) +- return 0; +- +-#ifdef MCL_FUTURE +- if (mlockall(MCL_CURRENT | MCL_FUTURE)) { +- warn(_("couldn't lock into memory")); +- return NULL; +- } +-#endif +- return xgetpass(passfd, _("Password: ")); +-} +- +-static void encrypt_pass_release(struct libmnt_context *cxt +- __attribute__((__unused__)), char *pwd) +-{ +- char *p = pwd; +- +- while (p && *p) +- *p++ = '\0'; +- +- free(pwd); +- munlockall(); +-} +- + static void print_all(struct libmnt_context *cxt, char *pattern, int show_label) + { + struct libmnt_table *tb; +@@ -616,7 +588,6 @@ static void __attribute__((__noreturn__)) usage(FILE *out) + fprintf(out, _( + " -o, --options comma-separated list of mount options\n" + " -O, --test-opts limit the set of filesystems (use with -a)\n" +- " -p, --pass-fd read the passphrase from file descriptor\n" + " -r, --read-only mount the filesystem read-only (same as -o ro)\n" + " -t, --types limit the set of filesystem types\n")); + fprintf(out, _( +@@ -782,8 +753,7 @@ int main(int argc, char **argv) + err(MOUNT_EX_SYSERR, _("failed to set options pattern")); + break; + case 'p': +- passfd = strtol_or_err(optarg, +- _("invalid passphrase file descriptor")); ++ warnx(_("--pass-fd is no longer supported")); + break; + case 'L': + case 'U': +@@ -864,8 +834,6 @@ int main(int argc, char **argv) + else if (types) + mnt_context_set_fstype(cxt, types); + +- mnt_context_set_passwd_cb(cxt, encrypt_pass_get, encrypt_pass_release); +- + if (all) { + /* + * A) Mount all +-- +1.7.7 + diff --git a/util-linux-HACK-boot.localfs.diff b/util-linux-HACK-boot.localfs.diff new file mode 100644 index 0000000..a5f7844 --- /dev/null +++ b/util-linux-HACK-boot.localfs.diff @@ -0,0 +1,27 @@ +From 89a0fa3ca57be7440500dd207d96ea1e2908959f Mon Sep 17 00:00:00 2001 +From: Ludwig Nussel +Date: Wed, 20 Jun 2012 10:56:05 +0200 +Subject: [PATCH] UGLY HACK: boot.localfs parses mount ouput and needs source + rather than target + +--- + sys-utils/mount.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/sys-utils/mount.c b/sys-utils/mount.c +index 8706716..b28d67a 100644 +--- a/sys-utils/mount.c ++++ b/sys-utils/mount.c +@@ -166,6 +166,9 @@ static int mount_all(struct libmnt_context *cxt) + while (mnt_context_next_mount(cxt, itr, &fs, &mntrc, &ignored) == 0) { + + const char *tgt = mnt_fs_get_target(fs); ++ if (getenv("MOUNT_PRINT_SOURCE")) { ++ tgt = mnt_fs_get_srcpath(fs); ++ } + + if (ignored) { + if (mnt_context_is_verbose(cxt)) +-- +1.7.7 + diff --git a/util-linux.changes b/util-linux.changes index 7efa7c1..c472788 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Jun 22 09:37:20 CEST 2012 - kukuk@suse.de + +- Remove pam_lastlog from login.pamd, login is doing it itself. + [bnc#768067] + +------------------------------------------------------------------- +Wed Jun 20 09:22:50 UTC 2012 - lnussel@suse.de + +- add a hack for boot.localfs to determine the devices to wait for + ------------------------------------------------------------------- Fri Jun 15 12:57:06 UTC 2012 - puzel@suse.com @@ -9,6 +20,12 @@ Fri Jun 15 12:57:06 UTC 2012 - puzel@suse.com - mount-new-improve-error-messages.patch - libmount-add-MNT_ERR_LOOPDEV.patch +------------------------------------------------------------------- +Fri Jun 15 10:07:26 UTC 2012 - lnussel@suse.de + +- remove encryption options completely as upstream will do that as + well in the next release (bnc#748879). + ------------------------------------------------------------------- Thu Jun 14 13:04:40 UTC 2012 - puzel@suse.com diff --git a/util-linux.spec b/util-linux.spec index c681025..6959f8d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -97,6 +97,13 @@ Patch7: libmount-add-special-MNT_ERR-codes.patch Patch8: mount-new-use-MNT_ERR-for-error-messages.patch Patch9: libmount-add-MNT_ERR_LOOPDEV.patch Patch10: mount-new-add-loopdev-specific-error-message.patch + +# disable encryption +Patch11: util-linux-2.21.2-noenc.diff +Patch12: util-linux-2.21.2-noenc-suse.diff + +# hack for boot.localfs +Patch20: util-linux-HACK-boot.localfs.diff ##### ## @@ -207,6 +214,10 @@ Files to develop applications using the libmount library. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 +%patch12 -p1 +# +%patch20 -p1 # cd adjtimex-* From ee105c51600857d66bbca01a88ff4b7e0830db0ca4b4cb0b7759036cb284fc96 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 26 Sep 2012 14:28:00 +0000 Subject: [PATCH 146/211] Accepting request 135232 from Base:System add name of the patch (forwarded request 135213 from jirislaby) OBS-URL: https://build.opensuse.org/request/show/135232 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=152 --- login-close-tty-before-vhangup.patch | 39 ++++++++++++++++++++++++++++ util-linux.changes | 6 +++++ util-linux.spec | 3 +++ 3 files changed, 48 insertions(+) create mode 100644 login-close-tty-before-vhangup.patch diff --git a/login-close-tty-before-vhangup.patch b/login-close-tty-before-vhangup.patch new file mode 100644 index 0000000..211e051 --- /dev/null +++ b/login-close-tty-before-vhangup.patch @@ -0,0 +1,39 @@ +From 2e7035646eb85851171cc2e989bfa858a4f00cd4 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 12 Jul 2012 16:33:52 +0200 +Subject: login: close tty before vhangup() +Git-commit: 2e7035646eb85851171cc2e989bfa858a4f00cd4 +Patch-mainline: v2.22-rc1 +References: bnc#778842 + +Let's close all tty file descriptors before vhangup() call. + +References: https://lkml.org/lkml/2012/6/5/145 +Signed-off-by: Karel Zak +Signed-off-by: Jiri Slaby +--- + login-utils/login.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/login-utils/login.c b/login-utils/login.c +index fe13d8d..c0cc00a 100644 +--- a/login-utils/login.c ++++ b/login-utils/login.c +@@ -409,6 +409,14 @@ static void init_tty(struct login_context *cxt) + /* Kill processes left on this tty */ + tcsetattr(0, TCSAFLUSH, &ttt); + ++ /* ++ * Let's close file decriptors before vhangup ++ * https://lkml.org/lkml/2012/6/5/145 ++ */ ++ close(STDIN_FILENO); ++ close(STDOUT_FILENO); ++ close(STDERR_FILENO); ++ + signal(SIGHUP, SIG_IGN); /* so vhangup() wont kill us */ + vhangup(); + signal(SIGHUP, SIG_DFL); +-- +1.7.12 + diff --git a/util-linux.changes b/util-linux.changes index c472788..5eb0d8e 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 19 19:41:10 UTC 2012 - jslaby@suse.com + +- login: close tty before vhangup (bnc#778842) + login-close-tty-before-vhangup.patch + ------------------------------------------------------------------- Fri Jun 22 09:37:20 CEST 2012 - kukuk@suse.de diff --git a/util-linux.spec b/util-linux.spec index 6959f8d..109dcf3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -102,6 +102,8 @@ Patch10: mount-new-add-loopdev-specific-error-message.patch Patch11: util-linux-2.21.2-noenc.diff Patch12: util-linux-2.21.2-noenc-suse.diff +Patch13: login-close-tty-before-vhangup.patch + # hack for boot.localfs Patch20: util-linux-HACK-boot.localfs.diff ##### @@ -216,6 +218,7 @@ Files to develop applications using the libmount library. %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 # %patch20 -p1 From d109e32fb70e4d76fc402f5731e5e64d67ec2692da7d983133bd4793485bc687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 3 Jan 2013 12:48:43 +0000 Subject: [PATCH 147/211] Accepting request 146886 from Base:System - 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch Use OS byteswapping macros, this patch is functionally identical to the version submitted upstream with the exception it excludes code that target non-linux systems. (forwarded request 146536 from elvigia) OBS-URL: https://build.opensuse.org/request/show/146886 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=153 --- ...-Use-the-operating-system-byteswappi.patch | 107 ++++++++++++++++++ util-linux.changes | 8 ++ util-linux.spec | 4 +- 3 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch diff --git a/0001-include-bitops.h-Use-the-operating-system-byteswappi.patch b/0001-include-bitops.h-Use-the-operating-system-byteswappi.patch new file mode 100644 index 0000000..8719d34 --- /dev/null +++ b/0001-include-bitops.h-Use-the-operating-system-byteswappi.patch @@ -0,0 +1,107 @@ +From f47373c950e812208f5db14cf728a54c31f750bf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +Date: Wed, 26 Dec 2012 14:30:48 -0300 +Subject: [PATCH 1/2] include/bitops.h: Use the operating system byteswapping + functions + +There is no need to reinvent the wheel. +--- + include/bitops.h | 69 +++++++++++++++----------------------------------------- + 1 file changed, 18 insertions(+), 51 deletions(-) + +diff --git a/include/bitops.h b/include/bitops.h +index 81375d0..89b418c 100644 +--- a/include/bitops.h ++++ b/include/bitops.h +@@ -8,6 +8,9 @@ + */ + #include + ++#include ++#include ++ + #ifndef NBBY + # define NBBY CHAR_BIT + #endif +@@ -22,63 +25,27 @@ + /* + * Byte swab macros (based on linux/byteorder/swab.h) + */ +-#define swab16(x) \ +- ((uint16_t)( \ +- (((uint16_t)(x) & (uint16_t)0x00ffU) << 8) | \ +- (((uint16_t)(x) & (uint16_t)0xff00U) >> 8) )) +- +-#define swab32(x) \ +- ((uint32_t)( \ +- (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \ +- (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \ +- (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \ +- (((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24) )) +- +-#define swab64(x) \ +- ((uint64_t)( \ +- (uint64_t)(((uint64_t)(x) & (uint64_t)0x00000000000000ffULL) << 56) | \ +- (uint64_t)(((uint64_t)(x) & (uint64_t)0x000000000000ff00ULL) << 40) | \ +- (uint64_t)(((uint64_t)(x) & (uint64_t)0x0000000000ff0000ULL) << 24) | \ +- (uint64_t)(((uint64_t)(x) & (uint64_t)0x00000000ff000000ULL) << 8) | \ +- (uint64_t)(((uint64_t)(x) & (uint64_t)0x000000ff00000000ULL) >> 8) | \ +- (uint64_t)(((uint64_t)(x) & (uint64_t)0x0000ff0000000000ULL) >> 24) | \ +- (uint64_t)(((uint64_t)(x) & (uint64_t)0x00ff000000000000ULL) >> 40) | \ +- (uint64_t)(((uint64_t)(x) & (uint64_t)0xff00000000000000ULL) >> 56) )) +- +- +-#ifdef WORDS_BIGENDIAN ++#define swab16(x) bswap_16(x) + +-#define cpu_to_le16(x) swab16(x) +-#define cpu_to_le32(x) swab32(x) +-#define cpu_to_le64(x) swab64(x) +-#define cpu_to_be16(x) ((uint16_t)(x)) +-#define cpu_to_be32(x) ((uint32_t)(x)) +-#define cpu_to_be64(x) ((uint64_t)(x)) ++#define swab32(x) bswap_32(x) + +-#define le16_to_cpu(x) swab16(x) +-#define le32_to_cpu(x) swab32(x) +-#define le64_to_cpu(x) swab64(x) +-#define be16_to_cpu(x) ((uint16_t)(x)) +-#define be32_to_cpu(x) ((uint32_t)(x)) +-#define be64_to_cpu(x) ((uint64_t)(x)) ++#define swab64(x) bswap_64(x) + +-#else /* !WORDS_BIGENDIAN */ ++#define cpu_to_le16(x) htole16(x) ++#define cpu_to_le32(x) htole32(x) ++#define cpu_to_le64(x) htole64(x) + +-#define cpu_to_le16(x) ((uint16_t)(x)) +-#define cpu_to_le32(x) ((uint32_t)(x)) +-#define cpu_to_le64(x) ((uint64_t)(x)) +-#define cpu_to_be16(x) swab16(x) +-#define cpu_to_be32(x) swab32(x) +-#define cpu_to_be64(x) swab64(x) ++#define cpu_to_be16(x) htobe16(x) ++#define cpu_to_be32(x) htobe32(x) ++#define cpu_to_be64(x) htobe64(x) + +-#define le16_to_cpu(x) ((uint16_t)(x)) +-#define le32_to_cpu(x) ((uint32_t)(x)) +-#define le64_to_cpu(x) ((uint64_t)(x)) +-#define be16_to_cpu(x) swab16(x) +-#define be32_to_cpu(x) swab32(x) +-#define be64_to_cpu(x) swab64(x) ++#define le16_to_cpu(x) le16toh(x) ++#define le32_to_cpu(x) le32toh(x) ++#define le64_to_cpu(x) le64toh(x) + +-#endif /* WORDS_BIGENDIAN */ ++#define be16_to_cpu(x) be16toh(x) ++#define be32_to_cpu(x) be32toh(x) ++#define be64_to_cpu(x) be64toh(x) + + #endif /* BITOPS_H */ + +-- +1.8.0.2 + diff --git a/util-linux.changes b/util-linux.changes index 5eb0d8e..6badc46 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Dec 28 04:30:58 UTC 2012 - crrodriguez@opensuse.org + +- 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch + Use OS byteswapping macros, this patch is functionally identical + to the version submitted upstream with the exception it excludes + code that target non-linux systems. + ------------------------------------------------------------------- Wed Sep 19 19:41:10 UTC 2012 - jslaby@suse.com diff --git a/util-linux.spec b/util-linux.spec index 109dcf3..ce79f9c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -121,6 +121,8 @@ Patch56: klogconsole.diff ## Patch60: time-1.7.dif +Patch61: 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed # @@ -221,7 +223,7 @@ Files to develop applications using the libmount library. %patch13 -p1 # %patch20 -p1 - +%patch61 -p1 # cd adjtimex-* # adjtimex patches belongs here From 034a75e4441403a306c0b06739c3f2cb028b4ccc7a09a26b61389ea96b92ee1f Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 8 Jan 2013 14:05:08 +0000 Subject: [PATCH 148/211] Accepting request 147398 from Base:System - add-canonicalize_path_restricted.patch, mount-sanitize-paths-from-non-root-users.patch, umount-sanitize-paths-from-non-root-users.patch: prevent leaking information about existence of folders (bnc#797002, CVE-2013-0157) OBS-URL: https://build.opensuse.org/request/show/147398 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=154 --- add-canonicalize_path_restricted.patch | 78 ++++++++++++++ ...t-sanitize-paths-from-non-root-users.patch | 102 ++++++++++++++++++ ...t-sanitize-paths-from-non-root-users.patch | 84 +++++++++++++++ util-linux.changes | 9 ++ util-linux.spec | 16 ++- 5 files changed, 285 insertions(+), 4 deletions(-) create mode 100644 add-canonicalize_path_restricted.patch create mode 100644 mount-sanitize-paths-from-non-root-users.patch create mode 100644 umount-sanitize-paths-from-non-root-users.patch diff --git a/add-canonicalize_path_restricted.patch b/add-canonicalize_path_restricted.patch new file mode 100644 index 0000000..252c651 --- /dev/null +++ b/add-canonicalize_path_restricted.patch @@ -0,0 +1,78 @@ +From 33c5fd0c5a774458470c86f9d318d8c48a9c9ccb Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 26 Nov 2012 16:24:28 +0100 +Subject: [PATCH] lib/canonicalize: add canonicalize_path_restricted() to + canonicalize without suid permisssions + +Signed-off-by: Karel Zak +Signed-off-by: Petr Uzel +--- + include/canonicalize.h | 1 + + lib/canonicalize.c | 42 ++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 43 insertions(+) + +Index: util-linux-2.21.2/include/canonicalize.h +=================================================================== +--- util-linux-2.21.2.orig/include/canonicalize.h ++++ util-linux-2.21.2/include/canonicalize.h +@@ -4,6 +4,7 @@ + #include "c.h" /* for PATH_MAX */ + + extern char *canonicalize_path(const char *path); ++extern char *canonicalize_path_restricted(const char *path); + extern char *canonicalize_dm_name(const char *ptname); + + #endif /* CANONICALIZE_H */ +Index: util-linux-2.21.2/lib/canonicalize.c +=================================================================== +--- util-linux-2.21.2.orig/lib/canonicalize.c ++++ util-linux-2.21.2/lib/canonicalize.c +@@ -188,6 +188,48 @@ canonicalize_path(const char *path) + return strdup(canonical); + } + ++char * ++canonicalize_path_restricted(const char *path) ++{ ++ char canonical[PATH_MAX+2]; ++ char *p = NULL; ++ int errsv; ++ uid_t euid; ++ gid_t egid; ++ ++ if (path == NULL) ++ return NULL; ++ ++ euid = geteuid(); ++ egid = getegid(); ++ ++ /* drop permissions */ ++ if (setegid(getgid()) < 0 || seteuid(getuid()) < 0) ++ return NULL; ++ ++ errsv = errno = 0; ++ ++ if (myrealpath(path, canonical, PATH_MAX+1)) { ++ p = strrchr(canonical, '/'); ++ if (p && strncmp(p, "/dm-", 4) == 0 && isdigit(*(p + 4))) ++ p = canonicalize_dm_name(p+1); ++ else ++ p = NULL; ++ if (!p) ++ p = strdup(canonical); ++ } else ++ errsv = errno; ++ ++ /* restore */ ++ if (setegid(egid) < 0 || seteuid(euid) < 0) { ++ free(p); ++ return NULL; ++ } ++ ++ errno = errsv; ++ return p; ++} ++ + + #ifdef TEST_PROGRAM_CANONICALIZE + int main(int argc, char **argv) diff --git a/mount-sanitize-paths-from-non-root-users.patch b/mount-sanitize-paths-from-non-root-users.patch new file mode 100644 index 0000000..fe0c1b7 --- /dev/null +++ b/mount-sanitize-paths-from-non-root-users.patch @@ -0,0 +1,102 @@ +From 5ebbc3865d1e53ef42e5f121c41faab23dd59075 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 26 Nov 2012 14:30:22 +0100 +Subject: [PATCH] mount: sanitize paths from non-root users + + $ mount /root/.ssh/../../dev/sda2 + mount: only root can mount UUID=17bc65ec-4125-4e7c-8a7d-e2795064c736 on /boot + +this is too promiscuous. It seems better to ignore on command line +specified paths which are not resolve-able for non-root users. + +Fixed version: + + $ mount /root/.ssh/../../dev/sda2 + mount: /root/.ssh/../../dev/sda2: Permission denied + + $ mount /dev/sda2 + mount: only root can mount UUID=17bc65ec-4125-4e7c-8a7d-e2795064c736 on /boot + +Note that this bug has no relation to mount(2) permissions evaluation +in suid mode. The way how non-root user specifies paths on command +line is completely irrelevant for comparison with fstab entries. + +Signed-off-by: Karel Zak +Signed-off-by: Petr Uzel +--- + sys-utils/Makefile.am | 1 + + sys-utils/mount.c | 35 +++++++++++++++++++++++++++++++++++ + 2 files changed, 36 insertions(+) + +Index: util-linux-2.21.2/sys-utils/Makefile.am +=================================================================== +--- util-linux-2.21.2.orig/sys-utils/Makefile.am ++++ util-linux-2.21.2/sys-utils/Makefile.am +@@ -64,6 +64,7 @@ dist_man_MANS += mount.8 ../mount/fstab. + mount_SOURCES = mount.c \ + $(top_srcdir)/lib/env.c \ + $(top_srcdir)/lib/xgetpass.c \ ++ $(top_srcdir)/lib/canonicalize.c \ + $(top_srcdir)/lib/strutils.c + + mount_LDADD = $(ul_libmount_la) $(SELINUX_LIBS) +Index: util-linux-2.21.2/sys-utils/mount.c +=================================================================== +--- util-linux-2.21.2.orig/sys-utils/mount.c ++++ util-linux-2.21.2/sys-utils/mount.c +@@ -38,6 +38,7 @@ + #include "strutils.h" + #include "exitcodes.h" + #include "xalloc.h" ++#include "canonicalize.h" + + /*** TODO: DOCS: + * +@@ -572,6 +573,37 @@ static struct libmnt_table *append_fstab + return fstab; + } + ++/* ++ * Check source and target paths -- non-root user should not be able to ++ * resolve paths which are unreadable for him. ++ */ ++static void sanitize_paths(struct libmnt_context *cxt) ++{ ++ const char *p; ++ struct libmnt_fs *fs = mnt_context_get_fs(cxt); ++ ++ if (!fs) ++ return; ++ ++ p = mnt_fs_get_target(fs); ++ if (p) { ++ char *np = canonicalize_path_restricted(p); ++ if (!np) ++ err(MOUNT_EX_USAGE, "%s", p); ++ mnt_fs_set_target(fs, np); ++ free(np); ++ } ++ ++ p = mnt_fs_get_srcpath(fs); ++ if (p) { ++ char *np = canonicalize_path_restricted(p); ++ if (!np) ++ err(MOUNT_EX_USAGE, "%s", p); ++ mnt_fs_set_source(fs, np); ++ free(np); ++ } ++} ++ + static void __attribute__((__noreturn__)) usage(FILE *out) + { + fputs(USAGE_HEADER, out); +@@ -880,6 +912,9 @@ int main(int argc, char **argv) + } else + usage(stderr); + ++ if (mnt_context_is_restricted(cxt)) ++ sanitize_paths(cxt); ++ + if (oper) { + /* MS_PROPAGATION operations, let's set the mount flags */ + mnt_context_set_mflags(cxt, oper); diff --git a/umount-sanitize-paths-from-non-root-users.patch b/umount-sanitize-paths-from-non-root-users.patch new file mode 100644 index 0000000..0e20756 --- /dev/null +++ b/umount-sanitize-paths-from-non-root-users.patch @@ -0,0 +1,84 @@ +From cc8cc8f32c863f3ae6a8a88e97b47bcd6a21825f Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 26 Nov 2012 16:25:46 +0100 +Subject: [PATCH] umount: sanitize paths from non-root users + +Signed-off-by: Karel Zak +Signed-off-by: Petr Uzel +--- + sys-utils/Makefile.am | 4 +++- + sys-utils/umount.c | 32 ++++++++++++++++++++++++++++++-- + 2 files changed, 33 insertions(+), 3 deletions(-) + +Index: util-linux-2.21.2/sys-utils/Makefile.am +=================================================================== +--- util-linux-2.21.2.orig/sys-utils/Makefile.am ++++ util-linux-2.21.2/sys-utils/Makefile.am +@@ -71,7 +71,9 @@ mount_LDADD = $(ul_libmount_la) $(SELINU + mount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -I$(ul_libmount_incdir) + mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) + +-umount_SOURCES = umount.c $(top_srcdir)/lib/env.c ++umount_SOURCES = umount.c \ ++ $(top_srcdir)/lib/env.c \ ++ $(top_srcdir)/lib/canonicalize.c + umount_LDADD = $(ul_libmount_la) + umount_CFLAGS = $(AM_CFLAGS) $(SUID_CFLAGS) -I$(ul_libmount_incdir) + umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) +Index: util-linux-2.21.2/sys-utils/umount.c +=================================================================== +--- util-linux-2.21.2.orig/sys-utils/umount.c ++++ util-linux-2.21.2/sys-utils/umount.c +@@ -34,6 +34,7 @@ + #include "env.h" + #include "optutils.h" + #include "exitcodes.h" ++#include "canonicalize.h" + + static int table_parser_errcb(struct libmnt_table *tb __attribute__((__unused__)), + const char *filename, int line) +@@ -277,6 +278,24 @@ static int umount_one(struct libmnt_cont + return rc; + } + ++/* ++ * Check path -- non-root user should not be able to resolve path which is ++ * unreadable for him. ++ */ ++static char *sanitize_path(const char *path) ++{ ++ char *p; ++ ++ if (!path) ++ return NULL; ++ ++ p = canonicalize_path_restricted(path); ++ if (!p) ++ err(MOUNT_EX_USAGE, "%s", path); ++ ++ return p; ++} ++ + int main(int argc, char **argv) + { + int c, rc = 0, all = 0; +@@ -388,8 +407,17 @@ int main(int argc, char **argv) + } else if (argc < 1) { + usage(stderr); + +- } else while (argc--) +- rc += umount_one(cxt, *argv++); ++ } else while (argc--) { ++ char *path = *argv++; ++ ++ if (mnt_context_is_restricted(cxt)) ++ path = sanitize_path(path); ++ ++ rc += umount_one(cxt, path); ++ ++ if (mnt_context_is_restricted(cxt)) ++ free(path); ++ } + + mnt_free_context(cxt); + return rc; diff --git a/util-linux.changes b/util-linux.changes index 6badc46..ea7d050 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Jan 7 13:26:15 UTC 2013 - puzel@suse.com + +- add-canonicalize_path_restricted.patch, + mount-sanitize-paths-from-non-root-users.patch, + umount-sanitize-paths-from-non-root-users.patch: + prevent leaking information about existence of folders + (bnc#797002, CVE-2013-0157) + ------------------------------------------------------------------- Fri Dec 28 04:30:58 UTC 2012 - crrodriguez@opensuse.org diff --git a/util-linux.spec b/util-linux.spec index ce79f9c..45fdddc 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -106,6 +106,13 @@ Patch13: login-close-tty-before-vhangup.patch # hack for boot.localfs Patch20: util-linux-HACK-boot.localfs.diff + +Patch21: 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch + +#bnc#797002 +Patch22: add-canonicalize_path_restricted.patch +Patch23: mount-sanitize-paths-from-non-root-users.patch +Patch24: umount-sanitize-paths-from-non-root-users.patch ##### ## @@ -121,8 +128,6 @@ Patch56: klogconsole.diff ## Patch60: time-1.7.dif -Patch61: 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed # @@ -223,7 +228,10 @@ Files to develop applications using the libmount library. %patch13 -p1 # %patch20 -p1 -%patch61 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 # cd adjtimex-* # adjtimex patches belongs here From 637feefa3090c85c208dd8be6363a70ab6b36350096b80c2b99922065397d6f0 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 7 Feb 2013 09:59:20 +0000 Subject: [PATCH 149/211] Accepting request 151448 from Base:System - 0001-Test-for-secure_getenv-too.patch: Current glibc in 12.3/factory no longer exports internal function __secure_getenv() but has secure_getenv() instead. OBS-URL: https://build.opensuse.org/request/show/151448 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=156 --- 0001-Test-for-secure_getenv-too.patch | 41 +++++++++++++++++++++++++++ util-linux.changes | 7 +++++ util-linux.spec | 4 ++- 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 0001-Test-for-secure_getenv-too.patch diff --git a/0001-Test-for-secure_getenv-too.patch b/0001-Test-for-secure_getenv-too.patch new file mode 100644 index 0000000..24313af --- /dev/null +++ b/0001-Test-for-secure_getenv-too.patch @@ -0,0 +1,41 @@ +From a6f605ed6dcfdf2ea7f6b0bf68e18d8c9ce5ea96 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +Date: Tue, 5 Feb 2013 02:06:04 -0300 +Subject: [PATCH] Test for secure_getenv too. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In current glibc versions, internal __secure_getenv +no longer exists and was replaced by secure_getenv() + +Signed-off-by: Cristian Rodríguez +--- + configure.ac | 1 + + lib/env.c | 5 +++-- + 2 files changed, 4 insertions(+), 2 deletions(-) + +--- util-linux-2.21.2.orig/configure.ac ++++ util-linux-2.21.2/configure.ac +@@ -281,6 +281,7 @@ AC_CHECK_FUNCS( + posix_fadvise \ + getmntinfo \ + __secure_getenv \ ++ secure_getenv \ + warn \ + warnx \ + rpmatch]) +--- util-linux-2.21.2.orig/lib/env.c ++++ util-linux-2.21.2/lib/env.c +@@ -98,8 +98,9 @@ char *safe_getenv(const char *arg) + return NULL; + #endif + #endif +- +-#ifdef HAVE___SECURE_GETENV ++#ifdef HAVE_SECURE_GETENV ++return secure_getenv(arg); ++#elif HAVE___SECURE_GETENV + return __secure_getenv(arg); + #else + return getenv(arg); diff --git a/util-linux.changes b/util-linux.changes index ea7d050..e04ac50 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Feb 5 14:32:49 UTC 2013 - crrodriguez@opensuse.org + +- 0001-Test-for-secure_getenv-too.patch: + Current glibc in 12.3/factory no longer exports internal + function __secure_getenv() but has secure_getenv() instead. + ------------------------------------------------------------------- Mon Jan 7 13:26:15 UTC 2013 - puzel@suse.com diff --git a/util-linux.spec b/util-linux.spec index 45fdddc..ad08dde 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -114,7 +114,8 @@ Patch22: add-canonicalize_path_restricted.patch Patch23: mount-sanitize-paths-from-non-root-users.patch Patch24: umount-sanitize-paths-from-non-root-users.patch ##### - +# There is no __secure_getenv anymore.. +Patch25: 0001-Test-for-secure_getenv-too.patch ## ## adjtimex ## @@ -232,6 +233,7 @@ Files to develop applications using the libmount library. %patch22 -p1 %patch23 -p1 %patch24 -p1 +%patch25 -p1 # cd adjtimex-* # adjtimex patches belongs here From 182f77a1733728cb48d784538e8b96543b0875069f24fa547f18fe59b248fa0f Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 18 Feb 2013 13:00:55 +0000 Subject: [PATCH 150/211] Accepting request 155700 from Base:System - fdiskbsdlabel.patch: Fix fdisk compilation on aarch64 (forwarded request 155674 from Andreas_Schwab) OBS-URL: https://build.opensuse.org/request/show/155700 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=157 --- fdiskbsdlabel.patch | 14 ++++++++++++++ util-linux.changes | 6 ++++++ util-linux.spec | 4 ++++ 3 files changed, 24 insertions(+) create mode 100644 fdiskbsdlabel.patch diff --git a/fdiskbsdlabel.patch b/fdiskbsdlabel.patch new file mode 100644 index 0000000..8d1d4da --- /dev/null +++ b/fdiskbsdlabel.patch @@ -0,0 +1,14 @@ +Index: util-linux-2.21.2/fdisk/fdiskbsdlabel.h +=================================================================== +--- util-linux-2.21.2.orig/fdisk/fdiskbsdlabel.h ++++ util-linux-2.21.2/fdisk/fdiskbsdlabel.h +@@ -48,7 +48,8 @@ + + #if defined (__i386__) || defined (__sparc__) || defined (__arm__) || \ + defined (__mips__) || defined (__s390__) || defined (__sh__) || \ +- defined(__x86_64__) || defined (__avr32__) || defined(__cris__) ++ defined(__x86_64__) || defined (__avr32__) || defined(__cris__) || \ ++ defined(__aarch64__) + #define BSD_LABELSECTOR 1 + #define BSD_LABELOFFSET 0 + #elif defined (__alpha__) || defined (__powerpc__) || defined (__ia64__) || defined (__hppa__) diff --git a/util-linux.changes b/util-linux.changes index e04ac50..cf4ed08 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Feb 16 17:48:29 UTC 2013 - schwab@suse.de + +- fdiskbsdlabel.patch: + Fix fdisk compilation on aarch64 + ------------------------------------------------------------------- Tue Feb 5 14:32:49 UTC 2013 - crrodriguez@opensuse.org diff --git a/util-linux.spec b/util-linux.spec index ad08dde..87891dd 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -116,6 +116,9 @@ Patch24: umount-sanitize-paths-from-non-root-users.patch ##### # There is no __secure_getenv anymore.. Patch25: 0001-Test-for-secure_getenv-too.patch + +# fix fdisk compilation on aarch64 +Patch26: fdiskbsdlabel.patch ## ## adjtimex ## @@ -234,6 +237,7 @@ Files to develop applications using the libmount library. %patch23 -p1 %patch24 -p1 %patch25 -p1 +%patch26 -p1 # cd adjtimex-* # adjtimex patches belongs here From 6aadc0a657c3e43308e057de64d9f046d57905f0af309b09407b627b1019cc40 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 26 Mar 2013 18:48:41 +0000 Subject: [PATCH 151/211] Accepting request 161218 from Base:System Please wait for which, adjtimex, time to go in first since those packages have been split from util-linux. OBS-URL: https://build.opensuse.org/request/show/161218 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=158 --- adjtimex_1.29.orig.tar.gz | 3 -- time-1.7.dif | 20 --------- time-1.7.tar.bz2 | 3 -- util-linux.changes | 5 +++ util-linux.spec | 87 ++++----------------------------------- which-2.20.tar.bz2 | 3 -- 6 files changed, 13 insertions(+), 108 deletions(-) delete mode 100644 adjtimex_1.29.orig.tar.gz delete mode 100644 time-1.7.dif delete mode 100644 time-1.7.tar.bz2 delete mode 100644 which-2.20.tar.bz2 diff --git a/adjtimex_1.29.orig.tar.gz b/adjtimex_1.29.orig.tar.gz deleted file mode 100644 index cf887f4..0000000 --- a/adjtimex_1.29.orig.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:04b9e8b66e77276ed07e78de89af37fd1aa12725923de853480827c4fafd176a -size 85551 diff --git a/time-1.7.dif b/time-1.7.dif deleted file mode 100644 index f3b9104..0000000 --- a/time-1.7.dif +++ /dev/null @@ -1,20 +0,0 @@ ---- resuse.h -+++ resuse.h -@@ -39,6 +39,9 @@ - # if HAVE_WAIT3 - # include - # else -+# if defined(__linux__) && defined(__alpha__) -+# include -+# else - /* Process resource usage structure. */ - struct rusage - { -@@ -49,6 +52,7 @@ - ru_oublock, ru_msgsnd, ru_msgrcv, ru_nsignals, - ru_nvcsw, ru_nivcsw; - }; -+# endif - # endif - #endif - diff --git a/time-1.7.tar.bz2 b/time-1.7.tar.bz2 deleted file mode 100644 index b5ed718..0000000 --- a/time-1.7.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:83eeec8df47e4c939a09b0147c34a36462bb2762f879596e9089b2817dcff7e2 -size 92620 diff --git a/util-linux.changes b/util-linux.changes index cf4ed08..1245122 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Mar 17 20:39:47 UTC 2013 - jengelh@inai.de + +- Split "which", "time" and "adjtimex" off util-linux + ------------------------------------------------------------------- Sat Feb 16 17:48:29 UTC 2013 - schwab@suse.de diff --git a/util-linux.spec b/util-linux.spec index 87891dd..0bbaee7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -16,10 +16,6 @@ # -%define time_ver 1.7 -%define which_ver 2.20 -%define adjtimex_ver 1.29 - Name: util-linux BuildRequires: audit-devel BuildRequires: binutils-devel @@ -63,12 +59,7 @@ Source7: baselibs.conf Source8: login.pamd Source9: remote.pamd # TODO: split to separate package -Source10: http://ftp.debian.org/debian/pool/main/a/adjtimex/adjtimex_%{adjtimex_ver}.orig.tar.gz Source11: klogconsole.tar.bz2 -# TODO: split to separate package -Source12: which-%{which_ver}.tar.bz2 -# TODO: split to separate package -Source13: time-%{time_ver}.tar.bz2 # XXX: needed? Source22: setctsid.c Source23: setctsid.8 @@ -120,17 +111,10 @@ Patch25: 0001-Test-for-secure_getenv-too.patch # fix fdisk compilation on aarch64 Patch26: fdiskbsdlabel.patch ## -## adjtimex -## -## ## klogconsole ## Patch55: klogconsole-quiet.patch Patch56: klogconsole.diff -## -## time -## -Patch60: time-1.7.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed @@ -147,6 +131,13 @@ Obsoletes: raw < %{version}-%{release} Obsoletes: rawio < %{version}-%{release} Obsoletes: util < %{version}-%{release} Obsoletes: uuid-runtime < %{version}-%{release} +# +# Using "Requires" here would lend itself to help upgrading, but since +# util-linux is in the initial bootstrap, that is not a good thing to do: +# +Recommends: adjtimex +Recommends: time +Recommends: which %description This package contains a large variety of low-level system utilities @@ -216,7 +207,7 @@ Files to develop applications using the libmount library. %lang_package %prep -%setup -q -n %{name}-%{version} -a 10 -b 11 -b 12 -b 13 +%setup -q -n %{name}-%{version} -b 11 %patch1 -p1 %patch2 -p1 %patch3 -p1 @@ -239,9 +230,6 @@ Files to develop applications using the libmount library. %patch25 -p1 %patch26 -p1 # -cd adjtimex-* -# adjtimex patches belongs here -cd - # setctsid cp %{S:22} %{S:23} . # nologin @@ -249,28 +237,9 @@ cp %{S:2} %{S:3} %{S:26} %{S:30} . cd ../klogconsole %patch55 -p1 %patch56 -p1 -cd ../time-* -%patch60 %build -# adjtimex build -cd adjtimex-%{adjtimex_ver} -%configure -make %{?_smp_mflags} -cd .. pushd ../ -# which build -cd which-%{which_ver} -%configure -make %{?_smp_mflags} -cd .. -# time build -cd time-%{time_ver} -export CFLAGS="%{optflags} -D_GNU_SOURCE " -export INSTALL_PROGRAM='$(INSTALL)' -%configure -make %{?_smp_mflags} -cd .. # klogconsole build cd klogconsole make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" @@ -317,30 +286,7 @@ install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf install -m 644 %{SOURCE8} %{buildroot}/etc/pam.d/login install -m 644 %{SOURCE9} %{buildroot}/etc/pam.d/remote mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates -cp adjtimex-*/adjtimex %{buildroot}/%{_sbindir} -cp adjtimex-*/adjtimex.8 %{buildroot}%{_mandir}/man8/ pushd .. -# which install -cd which-%{which_ver} -%make_install -mkdir -p %{buildroot}%{_defaultdocdir}/which -install -m 0644 README %{buildroot}%{_defaultdocdir}/which/ -install -m 0644 EXAMPLES %{buildroot}%{_defaultdocdir}/which/ -install -m 0644 README.alias %{buildroot}%{_defaultdocdir}/which/ -cd .. -# time install -cd time-%{time_ver} -mkdir -p %{buildroot}%{_defaultdocdir}/time -make install DESTDIR=%{buildroot} \ - prefix=%{buildroot}/usr \ - infodir=%{buildroot}%{_infodir} \ - mandir=%{buildroot}%{_mandir} \ - bindir=%{buildroot}%{_bindir} -install -m 0644 README %{buildroot}%{_defaultdocdir}/time/ -install -m 0644 AUTHORS %{buildroot}%{_defaultdocdir}/time/ -install -m 0644 COPYING %{buildroot}%{_defaultdocdir}/time/ -install -m 0644 NEWS %{buildroot}%{_defaultdocdir}/time/ -cd .. # klogconsole install cd klogconsole make install DEST=%{buildroot} @@ -357,7 +303,6 @@ ln -s %{_bindir}/mount %{buildroot}/bin ln -s %{_bindir}/umount %{buildroot}/bin ln -s %{_bindir}/findmnt %{buildroot}/bin ln -s %{_bindir}/lsblk %{buildroot}/bin -ln -s %{_sbindir}/adjtimex %{buildroot}/sbin ln -s %{_sbindir}/agetty %{buildroot}/sbin ln -s %{_sbindir}/blockdev %{buildroot}/sbin ln -s %{_sbindir}/cfdisk %{buildroot}/sbin @@ -479,8 +424,6 @@ ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd %post %{fillup_and_insserv raw} -%install_info --entry="* time: (time). summarizing used system resources" --info-dir=%{_infodir} %{_infodir}/time.info.gz -%install_info --info-dir=%{_infodir} %{_infodir}/which.info.gz %if 0%{?suse_version} <= 1130 %run_permissions %else @@ -494,8 +437,6 @@ fi %postun %install_info_delete --info-dir=%{_infodir} %{_infodir}/ipc.info.gz -%install_info_delete --info-dir=%{_infodir} %{_infodir}/time.info.gz -%install_info_delete --info-dir=%{_infodir} %{_infodir}/which.info.gz %{insserv_cleanup} %verifyscript @@ -571,7 +512,6 @@ fi /bin/logger /bin/login /bin/lsblk -/sbin/adjtimex /sbin/agetty /sbin/blockdev /sbin/ctrlaltdel @@ -636,18 +576,15 @@ fi %{_bindir}/setsid %{_bindir}/tailf %{_bindir}/taskset -%{_bindir}/time %{_bindir}/ul %{_bindir}/umount %{_bindir}/unshare %{_bindir}/uuidgen -%{_bindir}/which %ifnarch ppc ppc64 %{_bindir}/chrp-addnote %{_bindir}/mkzimage_cmdline %endif %{_sbindir}/addpart -%{_sbindir}/adjtimex %{_sbindir}/agetty %{_sbindir}/blkid %{_sbindir}/blockdev @@ -682,12 +619,6 @@ fi %verify(not mode) %attr(0755,root,tty) %{_bindir}/wall %{_bindir}/whereis %verify(not mode) %attr(0755,root,tty) %{_bindir}/write -%dir %{_defaultdocdir}/time -%dir %{_defaultdocdir}/which -%{_defaultdocdir}/time/* -%{_defaultdocdir}/which/* -%{_infodir}/time.info*.gz -%{_infodir}/which.info*.gz %{_mandir}/man1/cal.1.gz %{_mandir}/man1/chrt.1.gz %{_mandir}/man1/col.1.gz @@ -727,7 +658,6 @@ fi %{_mandir}/man1/wall.1.gz %{_mandir}/man1/whereis.1.gz %{_mandir}/man1/write.1.gz -%{_mandir}/man1/which.1.gz %{_mandir}/man1/ipcmk.1.gz %{_mandir}/man1/uuidgen.1.gz %{_mandir}/man5/fstab.5.gz @@ -736,7 +666,6 @@ fi %{_mandir}/man8/blockdev.8.gz %{_mandir}/man8/delpart.8.gz %{_mandir}/man8/ctrlaltdel.8.gz -%{_mandir}/man8/adjtimex.8.gz %{_mandir}/man8/blkid.8.gz %{_mandir}/man8/switch_root.8.gz %{_mandir}/man8/mkfs.bfs.8.gz diff --git a/which-2.20.tar.bz2 b/which-2.20.tar.bz2 deleted file mode 100644 index f10b8ce..0000000 --- a/which-2.20.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:33ca01bb3d801338e4a464367d74eaab24f87041c44c9b5e1150393f1744a3a0 -size 107758 From 492e97410d870aec7d8840eb2b8e47c8fdf8891824856e301b3208da3e76e69b Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 5 Jun 2013 17:36:12 +0000 Subject: [PATCH 152/211] Accepting request 177735 from Base:System Added mkfs.bfs_cleanup64bit.patch and mkfs.bfs_cleanup_endian.patch to fix 64Bit and endian issues. (forwarded request 177733 from ihno) OBS-URL: https://build.opensuse.org/request/show/177735 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=159 --- mkfs.bfs_cleanup_64bit.patch | 66 ++++++++++++++++++++++++++++++ mkfs.bfs_cleanup_endian.patch | 76 +++++++++++++++++++++++++++++++++++ util-linux.changes | 7 ++++ util-linux.spec | 8 ++++ 4 files changed, 157 insertions(+) create mode 100644 mkfs.bfs_cleanup_64bit.patch create mode 100644 mkfs.bfs_cleanup_endian.patch diff --git a/mkfs.bfs_cleanup_64bit.patch b/mkfs.bfs_cleanup_64bit.patch new file mode 100644 index 0000000..2efb952 --- /dev/null +++ b/mkfs.bfs_cleanup_64bit.patch @@ -0,0 +1,66 @@ +bla fasel + +--- util-linux-2.21.2.orig/disk-utils/mkfs.bfs.c ++++ util-linux-2.21.2/disk-utils/mkfs.bfs.c +@@ -1,6 +1,7 @@ + /* + * mkfs.bfs - Create SCO BFS filesystem - aeb, 1999-09-07 + * ++ * Usage: mkfs.bfs [-N nr-of-inodes] [-V volume-name] [-F fsname] device + */ + + #include +@@ -27,13 +28,13 @@ + + /* superblock - 512 bytes */ + struct bfssb { +- unsigned int s_magic; +- unsigned int s_start; /* byte offset of start of data */ +- unsigned int s_end; /* sizeof(slice)-1 */ ++ uint32_t s_magic; ++ uint32_t s_start; /* byte offset of start of data */ ++ uint32_t s_end; /* sizeof(slice)-1 */ + + /* for recovery during compaction */ +- int s_from, s_to; /* src and dest block of current transfer */ +- int s_backup_from, s_backup_to; ++ uint32_t s_from, s_to; /* src and dest block of current transfer */ ++ int32_t s_backup_from, s_backup_to; + + /* labels - may well contain garbage */ + char s_fsname[6]; +@@ -43,16 +44,16 @@ + + /* inode - 64 bytes */ + struct bfsi { +- unsigned short i_ino; ++ uint16_t i_ino; + unsigned char i_pad1[2]; +- unsigned long i_first_block; +- unsigned long i_last_block; +- unsigned long i_bytes_to_end; +- unsigned long i_type; /* 1: file, 2: the unique dir */ +- unsigned long i_mode; +- unsigned long i_uid, i_gid; +- unsigned long i_nlinks; +- unsigned long i_atime, i_mtime, i_ctime; ++ uint32_t i_first_block; ++ uint32_t i_last_block; ++ uint32_t i_bytes_to_end; ++ uint32_t i_type; /* 1: file, 2: the unique dir */ ++ uint32_t i_mode; ++ uint32_t i_uid, i_gid; ++ uint32_t i_nlinks; ++ uint32_t i_atime, i_mtime, i_ctime; + unsigned char i_pad2[16]; + }; + +@@ -60,7 +61,7 @@ + + /* directory entry - 16 bytes */ + struct bfsde { +- unsigned short d_ino; ++ uint16_t d_ino; + char d_name[BFS_NAMELEN]; + }; + diff --git a/mkfs.bfs_cleanup_endian.patch b/mkfs.bfs_cleanup_endian.patch new file mode 100644 index 0000000..f27a23a --- /dev/null +++ b/mkfs.bfs_cleanup_endian.patch @@ -0,0 +1,76 @@ +--- util-linux-2.21.2/disk-utils/mkfs.bfs.c.old 2013-05-28 19:26:05.000000000 +0200 ++++ util-linux-2.21.2/disk-utils/mkfs.bfs.c 2013-05-28 19:39:28.000000000 +0200 +@@ -98,6 +98,7 @@ + unsigned long long user_specified_total_blocks = 0; + int verbose = 0; + int fd; ++ uint32_t first_block; + struct bfssb sb; + struct bfsi ri; + struct bfsde de; +@@ -224,9 +224,9 @@ + ino_blocks + 33); + + memset(&sb, 0, sizeof(sb)); +- sb.s_magic = BFS_SUPER_MAGIC; +- sb.s_start = ino_bytes + sizeof(struct bfssb); +- sb.s_end = total_blocks * BFS_BLOCKSIZE - 1; ++ sb.s_magic = htole32(BFS_SUPER_MAGIC); ++ sb.s_start = htole32(ino_bytes + sizeof(struct bfssb)); ++ sb.s_end = htole32(total_blocks * BFS_BLOCKSIZE - 1); + sb.s_from = sb.s_to = sb.s_backup_from = sb.s_backup_to = -1; + memcpy(sb.s_fsname, fsname, 6); + memcpy(sb.s_volume, volume, 6); +@@ -244,28 +244,29 @@ + inodes, ino_blocks); + fprintf(stderr, _("Blocks: %lld\n"), total_blocks); + fprintf(stderr, _("Inode end: %d, Data end: %d\n"), +- sb.s_start - 1, sb.s_end); ++ htole32(sb.s_start) - 1, htole32(sb.s_end)); + } + + if (write(fd, &sb, sizeof(sb)) != sizeof(sb)) + err(EXIT_FAILURE, _("error writing superblock")); + + memset(&ri, 0, sizeof(ri)); +- ri.i_ino = BFS_ROOT_INO; +- ri.i_first_block = 1 + ino_blocks; +- ri.i_last_block = ri.i_first_block + +- (inodes * sizeof(de) - 1) / BFS_BLOCKSIZE; +- ri.i_bytes_to_end = ri.i_first_block * BFS_BLOCKSIZE +- + 2 * sizeof(struct bfsde) - 1; +- ri.i_type = BFS_DIR_TYPE; +- ri.i_mode = S_IFDIR | 0755; /* or just 0755 */ +- ri.i_uid = 0; +- ri.i_gid = 1; /* random */ ++ ri.i_ino = htole16(BFS_ROOT_INO); ++ first_block = 1 + ino_blocks; ++ ri.i_first_block = htole32(first_block); ++ ri.i_last_block = htole32(first_block + ++ (inodes * sizeof(de) - 1) / BFS_BLOCKSIZE); ++ ri.i_bytes_to_end = htole32(first_block * BFS_BLOCKSIZE ++ + 2 * sizeof(struct bfsde) - 1); ++ ri.i_type = htole32(BFS_DIR_TYPE); ++ ri.i_mode = htole32(S_IFDIR | 0755); /* or just 0755 */ ++ ri.i_uid = htole32(0); ++ ri.i_gid = htole32(1); /* random */ + ri.i_nlinks = 2; + time(&now); +- ri.i_atime = now; +- ri.i_mtime = now; +- ri.i_ctime = now; ++ ri.i_atime = htole32(now); ++ ri.i_mtime = htole32(now); ++ ri.i_ctime = htole32(now); + + if (write(fd, &ri, sizeof(ri)) != sizeof(ri)) + err(EXIT_FAILURE, _("error writing root inode")); +@@ -279,7 +280,7 @@ + err(EXIT_FAILURE, _("seek error")); + + memset(&de, 0, sizeof(de)); +- de.d_ino = BFS_ROOT_INO; ++ de.d_ino = htole16(BFS_ROOT_INO); + memcpy(de.d_name, ".", 1); + if (write(fd, &de, sizeof(de)) != sizeof(de)) + err(EXIT_FAILURE, _("error writing . entry")); diff --git a/util-linux.changes b/util-linux.changes index 1245122..be90508 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed May 29 11:45:04 UTC 2013 - ihno@suse.com + +- fixing mkfs.bfs to make it 64bit and endian clean. + adding the patches mkfs.bfs_cleanup_64bit.patch and + mkfs.bfs_cleanup_endian.patch + ------------------------------------------------------------------- Sun Mar 17 20:39:47 UTC 2013 - jengelh@inai.de diff --git a/util-linux.spec b/util-linux.spec index 0bbaee7..38e95ce 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -116,6 +116,10 @@ Patch26: fdiskbsdlabel.patch Patch55: klogconsole-quiet.patch Patch56: klogconsole.diff +## fix mkfs.bfs +Patch60: mkfs.bfs_cleanup_64bit.patch +Patch61: mkfs.bfs_cleanup_endian.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed # @@ -234,6 +238,10 @@ Files to develop applications using the libmount library. cp %{S:22} %{S:23} . # nologin cp %{S:2} %{S:3} %{S:26} %{S:30} . + +%patch60 -p1 +%patch61 -p1 + cd ../klogconsole %patch55 -p1 %patch56 -p1 From a59bc81b6fb214b0c282b45569a0aeae6d2ca9b53a836ec37a0dbca425b7a8b0 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 7 Jun 2013 08:12:05 +0000 Subject: [PATCH 153/211] Accepting request 177962 from Base:System - util-linux.spec: work around su(1) PAM problems based on su(1) being provided by both the coreutils and the util-linux package. Fix macro typo in %post and %verifyscript sections related to su(1): s/sysvinit_tools/enable_su/ (forwarded request 177950 from bernhard-voelker) OBS-URL: https://build.opensuse.org/request/show/177962 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=160 --- 0001-Test-for-secure_getenv-too.patch | 41 -- ...-Use-the-operating-system-byteswappi.patch | 107 ---- add-canonicalize_path_restricted.patch | 78 --- fdisk-tinfo.patch | 26 +- fdiskbsdlabel.patch | 14 - libmount-add-MNT_ERR_LOOPDEV.patch | 59 -- libmount-add-special-MNT_ERR-codes.patch | 68 --- ...se-nosuid-noexec-nodev-for-cifs-user.patch | 115 ---- login-close-tty-before-vhangup.patch | 39 -- make-sure-sbin-resp-usr-sbin-are-in-PATH.diff | 143 +++++ ...w-add-loopdev-specific-error-message.patch | 51 -- mount-new-allow-sloppy-for-non-root.patch | 25 - mount-new-improve-error-messages.patch | 46 -- ...t-new-use-MNT_ERR-for-error-messages.patch | 56 -- ...t-sanitize-paths-from-non-root-users.patch | 102 ---- su.default | 11 + su.pamd | 8 + ...t-sanitize-paths-from-non-root-users.patch | 84 --- ...ux-2.12r-fdisk_remove_bogus_warnings.patch | 20 - util-linux-2.20-libmount-deps.patch | 13 - util-linux-2.21.2-noenc-suse.diff | 13 - util-linux-2.21.2-noenc.diff | 535 ------------------ util-linux-2.21.2.tar.bz2 | 3 - util-linux-2.23.1-eject-fpie.patch | 13 + ...x-2.23.1-fdisk_remove_bogus_warnings.patch | 20 + util-linux-2.23.1-noenc-suse.diff | 12 + util-linux-2.23.1.tar.bz2 | 3 + util-linux-rpmlintrc | 8 +- util-linux.changes | 72 +++ util-linux.spec | 269 ++++++--- 30 files changed, 496 insertions(+), 1558 deletions(-) delete mode 100644 0001-Test-for-secure_getenv-too.patch delete mode 100644 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch delete mode 100644 add-canonicalize_path_restricted.patch delete mode 100644 fdiskbsdlabel.patch delete mode 100644 libmount-add-MNT_ERR_LOOPDEV.patch delete mode 100644 libmount-add-special-MNT_ERR-codes.patch delete mode 100644 libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch delete mode 100644 login-close-tty-before-vhangup.patch create mode 100644 make-sure-sbin-resp-usr-sbin-are-in-PATH.diff delete mode 100644 mount-new-add-loopdev-specific-error-message.patch delete mode 100644 mount-new-allow-sloppy-for-non-root.patch delete mode 100644 mount-new-improve-error-messages.patch delete mode 100644 mount-new-use-MNT_ERR-for-error-messages.patch delete mode 100644 mount-sanitize-paths-from-non-root-users.patch create mode 100644 su.default create mode 100644 su.pamd delete mode 100644 umount-sanitize-paths-from-non-root-users.patch delete mode 100644 util-linux-2.12r-fdisk_remove_bogus_warnings.patch delete mode 100644 util-linux-2.20-libmount-deps.patch delete mode 100644 util-linux-2.21.2-noenc-suse.diff delete mode 100644 util-linux-2.21.2-noenc.diff delete mode 100644 util-linux-2.21.2.tar.bz2 create mode 100644 util-linux-2.23.1-eject-fpie.patch create mode 100644 util-linux-2.23.1-fdisk_remove_bogus_warnings.patch create mode 100644 util-linux-2.23.1-noenc-suse.diff create mode 100644 util-linux-2.23.1.tar.bz2 diff --git a/0001-Test-for-secure_getenv-too.patch b/0001-Test-for-secure_getenv-too.patch deleted file mode 100644 index 24313af..0000000 --- a/0001-Test-for-secure_getenv-too.patch +++ /dev/null @@ -1,41 +0,0 @@ -From a6f605ed6dcfdf2ea7f6b0bf68e18d8c9ce5ea96 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= -Date: Tue, 5 Feb 2013 02:06:04 -0300 -Subject: [PATCH] Test for secure_getenv too. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -In current glibc versions, internal __secure_getenv -no longer exists and was replaced by secure_getenv() - -Signed-off-by: Cristian Rodríguez ---- - configure.ac | 1 + - lib/env.c | 5 +++-- - 2 files changed, 4 insertions(+), 2 deletions(-) - ---- util-linux-2.21.2.orig/configure.ac -+++ util-linux-2.21.2/configure.ac -@@ -281,6 +281,7 @@ AC_CHECK_FUNCS( - posix_fadvise \ - getmntinfo \ - __secure_getenv \ -+ secure_getenv \ - warn \ - warnx \ - rpmatch]) ---- util-linux-2.21.2.orig/lib/env.c -+++ util-linux-2.21.2/lib/env.c -@@ -98,8 +98,9 @@ char *safe_getenv(const char *arg) - return NULL; - #endif - #endif -- --#ifdef HAVE___SECURE_GETENV -+#ifdef HAVE_SECURE_GETENV -+return secure_getenv(arg); -+#elif HAVE___SECURE_GETENV - return __secure_getenv(arg); - #else - return getenv(arg); diff --git a/0001-include-bitops.h-Use-the-operating-system-byteswappi.patch b/0001-include-bitops.h-Use-the-operating-system-byteswappi.patch deleted file mode 100644 index 8719d34..0000000 --- a/0001-include-bitops.h-Use-the-operating-system-byteswappi.patch +++ /dev/null @@ -1,107 +0,0 @@ -From f47373c950e812208f5db14cf728a54c31f750bf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= -Date: Wed, 26 Dec 2012 14:30:48 -0300 -Subject: [PATCH 1/2] include/bitops.h: Use the operating system byteswapping - functions - -There is no need to reinvent the wheel. ---- - include/bitops.h | 69 +++++++++++++++----------------------------------------- - 1 file changed, 18 insertions(+), 51 deletions(-) - -diff --git a/include/bitops.h b/include/bitops.h -index 81375d0..89b418c 100644 ---- a/include/bitops.h -+++ b/include/bitops.h -@@ -8,6 +8,9 @@ - */ - #include - -+#include -+#include -+ - #ifndef NBBY - # define NBBY CHAR_BIT - #endif -@@ -22,63 +25,27 @@ - /* - * Byte swab macros (based on linux/byteorder/swab.h) - */ --#define swab16(x) \ -- ((uint16_t)( \ -- (((uint16_t)(x) & (uint16_t)0x00ffU) << 8) | \ -- (((uint16_t)(x) & (uint16_t)0xff00U) >> 8) )) -- --#define swab32(x) \ -- ((uint32_t)( \ -- (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \ -- (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \ -- (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \ -- (((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24) )) -- --#define swab64(x) \ -- ((uint64_t)( \ -- (uint64_t)(((uint64_t)(x) & (uint64_t)0x00000000000000ffULL) << 56) | \ -- (uint64_t)(((uint64_t)(x) & (uint64_t)0x000000000000ff00ULL) << 40) | \ -- (uint64_t)(((uint64_t)(x) & (uint64_t)0x0000000000ff0000ULL) << 24) | \ -- (uint64_t)(((uint64_t)(x) & (uint64_t)0x00000000ff000000ULL) << 8) | \ -- (uint64_t)(((uint64_t)(x) & (uint64_t)0x000000ff00000000ULL) >> 8) | \ -- (uint64_t)(((uint64_t)(x) & (uint64_t)0x0000ff0000000000ULL) >> 24) | \ -- (uint64_t)(((uint64_t)(x) & (uint64_t)0x00ff000000000000ULL) >> 40) | \ -- (uint64_t)(((uint64_t)(x) & (uint64_t)0xff00000000000000ULL) >> 56) )) -- -- --#ifdef WORDS_BIGENDIAN -+#define swab16(x) bswap_16(x) - --#define cpu_to_le16(x) swab16(x) --#define cpu_to_le32(x) swab32(x) --#define cpu_to_le64(x) swab64(x) --#define cpu_to_be16(x) ((uint16_t)(x)) --#define cpu_to_be32(x) ((uint32_t)(x)) --#define cpu_to_be64(x) ((uint64_t)(x)) -+#define swab32(x) bswap_32(x) - --#define le16_to_cpu(x) swab16(x) --#define le32_to_cpu(x) swab32(x) --#define le64_to_cpu(x) swab64(x) --#define be16_to_cpu(x) ((uint16_t)(x)) --#define be32_to_cpu(x) ((uint32_t)(x)) --#define be64_to_cpu(x) ((uint64_t)(x)) -+#define swab64(x) bswap_64(x) - --#else /* !WORDS_BIGENDIAN */ -+#define cpu_to_le16(x) htole16(x) -+#define cpu_to_le32(x) htole32(x) -+#define cpu_to_le64(x) htole64(x) - --#define cpu_to_le16(x) ((uint16_t)(x)) --#define cpu_to_le32(x) ((uint32_t)(x)) --#define cpu_to_le64(x) ((uint64_t)(x)) --#define cpu_to_be16(x) swab16(x) --#define cpu_to_be32(x) swab32(x) --#define cpu_to_be64(x) swab64(x) -+#define cpu_to_be16(x) htobe16(x) -+#define cpu_to_be32(x) htobe32(x) -+#define cpu_to_be64(x) htobe64(x) - --#define le16_to_cpu(x) ((uint16_t)(x)) --#define le32_to_cpu(x) ((uint32_t)(x)) --#define le64_to_cpu(x) ((uint64_t)(x)) --#define be16_to_cpu(x) swab16(x) --#define be32_to_cpu(x) swab32(x) --#define be64_to_cpu(x) swab64(x) -+#define le16_to_cpu(x) le16toh(x) -+#define le32_to_cpu(x) le32toh(x) -+#define le64_to_cpu(x) le64toh(x) - --#endif /* WORDS_BIGENDIAN */ -+#define be16_to_cpu(x) be16toh(x) -+#define be32_to_cpu(x) be32toh(x) -+#define be64_to_cpu(x) be64toh(x) - - #endif /* BITOPS_H */ - --- -1.8.0.2 - diff --git a/add-canonicalize_path_restricted.patch b/add-canonicalize_path_restricted.patch deleted file mode 100644 index 252c651..0000000 --- a/add-canonicalize_path_restricted.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 33c5fd0c5a774458470c86f9d318d8c48a9c9ccb Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 26 Nov 2012 16:24:28 +0100 -Subject: [PATCH] lib/canonicalize: add canonicalize_path_restricted() to - canonicalize without suid permisssions - -Signed-off-by: Karel Zak -Signed-off-by: Petr Uzel ---- - include/canonicalize.h | 1 + - lib/canonicalize.c | 42 ++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 43 insertions(+) - -Index: util-linux-2.21.2/include/canonicalize.h -=================================================================== ---- util-linux-2.21.2.orig/include/canonicalize.h -+++ util-linux-2.21.2/include/canonicalize.h -@@ -4,6 +4,7 @@ - #include "c.h" /* for PATH_MAX */ - - extern char *canonicalize_path(const char *path); -+extern char *canonicalize_path_restricted(const char *path); - extern char *canonicalize_dm_name(const char *ptname); - - #endif /* CANONICALIZE_H */ -Index: util-linux-2.21.2/lib/canonicalize.c -=================================================================== ---- util-linux-2.21.2.orig/lib/canonicalize.c -+++ util-linux-2.21.2/lib/canonicalize.c -@@ -188,6 +188,48 @@ canonicalize_path(const char *path) - return strdup(canonical); - } - -+char * -+canonicalize_path_restricted(const char *path) -+{ -+ char canonical[PATH_MAX+2]; -+ char *p = NULL; -+ int errsv; -+ uid_t euid; -+ gid_t egid; -+ -+ if (path == NULL) -+ return NULL; -+ -+ euid = geteuid(); -+ egid = getegid(); -+ -+ /* drop permissions */ -+ if (setegid(getgid()) < 0 || seteuid(getuid()) < 0) -+ return NULL; -+ -+ errsv = errno = 0; -+ -+ if (myrealpath(path, canonical, PATH_MAX+1)) { -+ p = strrchr(canonical, '/'); -+ if (p && strncmp(p, "/dm-", 4) == 0 && isdigit(*(p + 4))) -+ p = canonicalize_dm_name(p+1); -+ else -+ p = NULL; -+ if (!p) -+ p = strdup(canonical); -+ } else -+ errsv = errno; -+ -+ /* restore */ -+ if (setegid(egid) < 0 || seteuid(euid) < 0) { -+ free(p); -+ return NULL; -+ } -+ -+ errno = errsv; -+ return p; -+} -+ - - #ifdef TEST_PROGRAM_CANONICALIZE - int main(int argc, char **argv) diff --git a/fdisk-tinfo.patch b/fdisk-tinfo.patch index c9c7562..da5c7bc 100644 --- a/fdisk-tinfo.patch +++ b/fdisk-tinfo.patch @@ -1,18 +1,12 @@ -Index: util-linux-2.21-rc2/fdisk/Makefile.am -=================================================================== ---- util-linux-2.21-rc2.orig/fdisk/Makefile.am -+++ util-linux-2.21-rc2/fdisk/Makefile.am -@@ -64,9 +64,13 @@ sbin_PROGRAMS += cfdisk - dist_man_MANS += cfdisk.8 - cfdisk_SOURCES = cfdisk.c $(fdisk_common) - cfdisk_CFLAGS = $(cflags_blkid) +--- util-linux-2.23.1/fdisks/Makemodule.am ++++ util-linux-2.23.1/fdisks/Makemodule.am 2013-06-05 09:58:30.753439465 +0000 +@@ -79,6 +79,9 @@ endif + if HAVE_SLANG + cfdisk_LDADD += -lslang + else +if HAVE_TINFO -+cfdisk_LDADD = -ltinfo @NCURSES_LIBS@ $(ldadd_blkid) -+else - cfdisk_LDADD = @NCURSES_LIBS@ $(ldadd_blkid) - endif - endif ++cfdisk_LDADD += -ltinfo +endif - - endif # !ARCH_SPARC - endif # !ARCH_M68K + if HAVE_NCURSES + cfdisk_LDADD += @NCURSES_LIBS@ + endif diff --git a/fdiskbsdlabel.patch b/fdiskbsdlabel.patch deleted file mode 100644 index 8d1d4da..0000000 --- a/fdiskbsdlabel.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: util-linux-2.21.2/fdisk/fdiskbsdlabel.h -=================================================================== ---- util-linux-2.21.2.orig/fdisk/fdiskbsdlabel.h -+++ util-linux-2.21.2/fdisk/fdiskbsdlabel.h -@@ -48,7 +48,8 @@ - - #if defined (__i386__) || defined (__sparc__) || defined (__arm__) || \ - defined (__mips__) || defined (__s390__) || defined (__sh__) || \ -- defined(__x86_64__) || defined (__avr32__) || defined(__cris__) -+ defined(__x86_64__) || defined (__avr32__) || defined(__cris__) || \ -+ defined(__aarch64__) - #define BSD_LABELSECTOR 1 - #define BSD_LABELOFFSET 0 - #elif defined (__alpha__) || defined (__powerpc__) || defined (__ia64__) || defined (__hppa__) diff --git a/libmount-add-MNT_ERR_LOOPDEV.patch b/libmount-add-MNT_ERR_LOOPDEV.patch deleted file mode 100644 index d1212aa..0000000 --- a/libmount-add-MNT_ERR_LOOPDEV.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 82756a747e4bcfc13a27b7618d889af080649584 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 28 May 2012 12:26:36 +0200 -Subject: [PATCH] libmount: add MNT_ERR_LOOPDEV - -Signed-off-by: Karel Zak -Signed-off-by: Petr Uzel ---- - lib/loopdev.c | 4 ++++ - libmount/src/context_loopdev.c | 1 + - libmount/src/libmount.h.in | 1 + - 3 files changed, 6 insertions(+), 0 deletions(-) - -Index: util-linux-2.21.2/lib/loopdev.c -=================================================================== ---- util-linux-2.21.2.orig/lib/loopdev.c -+++ util-linux-2.21.2/lib/loopdev.c -@@ -173,6 +173,8 @@ int loopcxt_init(struct loopdev_cxt *lc, - */ - void loopcxt_deinit(struct loopdev_cxt *lc) - { -+ int errsv = errno; -+ - if (!lc) - return; - -@@ -183,6 +185,8 @@ void loopcxt_deinit(struct loopdev_cxt * - - loopcxt_set_device(lc, NULL); - loopcxt_deinit_iterator(lc); -+ -+ errno = errsv; - } - - /* -Index: util-linux-2.21.2/libmount/src/context_loopdev.c -=================================================================== ---- util-linux-2.21.2.orig/libmount/src/context_loopdev.c -+++ util-linux-2.21.2/libmount/src/context_loopdev.c -@@ -261,6 +261,7 @@ int mnt_context_setup_loopdev(struct lib - - if (loopdev || rc != -EBUSY) { - DBG(CXT, mnt_debug_h(cxt, "failed to setup device")); -+ rc = -MNT_ERR_LOOPDEV; - goto done; - } - DBG(CXT, mnt_debug_h(cxt, "loopdev stolen...trying again")); -Index: util-linux-2.21.2/libmount/src/libmount.h.in -=================================================================== ---- util-linux-2.21.2.orig/libmount/src/libmount.h.in -+++ util-linux-2.21.2/libmount/src/libmount.h.in -@@ -126,6 +126,7 @@ enum { - #define MNT_ERR_NOFSTAB 5000 /* not found required entry in fstab */ - #define MNT_ERR_NOFSTYPE 5001 /* failed to detect filesystem type */ - #define MNT_ERR_NOSOURCE 5002 /* required mount source undefined */ -+#define MNT_ERR_LOOPDEV 5003 /* loopdev setup failed, errno set by libc */ - - /* init.c */ - extern void mnt_init_debug(int mask); diff --git a/libmount-add-special-MNT_ERR-codes.patch b/libmount-add-special-MNT_ERR-codes.patch deleted file mode 100644 index f0afe25..0000000 --- a/libmount-add-special-MNT_ERR-codes.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 47dea49b4cb4a4a98a6c518cc17f6d2c92be9528 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 24 Apr 2012 11:57:32 +0200 -Subject: [PATCH] libmount: add special MNT_ERR_ codes - -... to detect some situations where standard -errno is too generic. - -Signed-off-by: Karel Zak -Signed-off-by: Petr Uzel ---- - libmount/src/context.c | 20 ++++++++++---------- - libmount/src/libmount.h.in | 12 ++++++++++++ - 2 files changed, 22 insertions(+), 10 deletions(-) - -Index: util-linux-2.21.2/libmount/src/context.c -=================================================================== ---- util-linux-2.21.2.orig/libmount/src/context.c -+++ util-linux-2.21.2/libmount/src/context.c -@@ -1186,7 +1186,7 @@ int mnt_context_prepare_srcpath(struct l - if (cache) - path = mnt_resolve_tag(t, v, cache); - -- rc = path ? mnt_fs_set_source(cxt->fs, path) : -EINVAL; -+ rc = path ? mnt_fs_set_source(cxt->fs, path) : -MNT_ERR_NOSOURCE; - - } else if (cache && !mnt_fs_is_pseudofs(cxt->fs)) { - /* -@@ -1247,7 +1247,7 @@ int mnt_context_prepare_target(struct li - cache = mnt_context_get_cache(cxt); - if (cache) { - char *path = mnt_resolve_path(tgt, cache); -- if (strcmp(path, tgt)) -+ if (path && strcmp(path, tgt) != 0) - rc = mnt_fs_set_target(cxt->fs, path); - } - -@@ -1543,7 +1543,7 @@ static int apply_table(struct libmnt_con - } - - if (!fs) -- return -EINVAL; -+ return -MNT_ERR_NOFSTAB; /* not found */ - - DBG(CXT, mnt_debug_h(cxt, "apply entry:")); - DBG(CXT, mnt_fs_print_debug(fs, stderr)); -Index: util-linux-2.21.2/libmount/src/libmount.h.in -=================================================================== ---- util-linux-2.21.2.orig/libmount/src/libmount.h.in -+++ util-linux-2.21.2/libmount/src/libmount.h.in -@@ -115,6 +115,18 @@ enum { - MNT_ACT_UMOUNT - }; - -+/* -+ * Errors -- by default libmount returns -errno for generic errors (ENOMEM, -+ * EINVAL, ...) and for mount(2) errors, but for some specific operations it -+ * returns private error codes. Note that maximum system errno value should be -+ * 4095 on UNIXes. -+ * -+ * See also mnt_context_get_syscall_errno() and mnt_context_get_helper_status(). -+ */ -+#define MNT_ERR_NOFSTAB 5000 /* not found required entry in fstab */ -+#define MNT_ERR_NOFSTYPE 5001 /* failed to detect filesystem type */ -+#define MNT_ERR_NOSOURCE 5002 /* required mount source undefined */ -+ - /* init.c */ - extern void mnt_init_debug(int mask); - diff --git a/libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch b/libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch deleted file mode 100644 index 695f5b9..0000000 --- a/libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch +++ /dev/null @@ -1,115 +0,0 @@ -From e90e7401d0c318c9dac4a0204e2bca86949b1d32 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 14 Jun 2012 14:19:26 +0200 -Subject: [PATCH] libmount: don't use nosuid,noexec,nodev for cifs user=foo - - mount -t cifs //127.0.0.1/users /mnt/smb -o user=root,password=linux - -is incorrectly translated to - - mount.cifs -o noexec,nosuid,nodev,user=root,password=linux ... - -The command mount(8) should be sensitive to "user" (without "=") -only. The correct cifs command line is: - - mount.cifs -o user=root,password=linux - -Addresses: https://bugzilla.novell.com/show_bug.cgi?id=766157 -Signed-off-by: Karel Zak -Signed-off-by: Petr Uzel ---- - libmount/src/context_mount.c | 29 +++++++++++++++++++++++++++-- - libmount/src/optstr.c | 9 +++++---- - 2 files changed, 32 insertions(+), 6 deletions(-) - -Index: util-linux-2.21.2/libmount/src/context_mount.c -=================================================================== ---- util-linux-2.21.2.orig/libmount/src/context_mount.c -+++ util-linux-2.21.2/libmount/src/context_mount.c -@@ -53,6 +53,15 @@ static int fix_optstr(struct libmnt_cont - if (cxt->mountflags & MS_PROPAGATION) - cxt->mountflags &= (MS_PROPAGATION | MS_REC | MS_SILENT); - -+ /* -+ * The "user" options is our business (so we can modify the option), -+ * but exception is command line for /sbin/mount. helpers. Let's -+ * save the original user= to call the helpers with unchanged -+ * "user" setting. -+ * -+ * Don't check for MNT_MS_USER in cxt->user_mountflags, the flag maybe -+ * removed by evaluate_permissions(). -+ */ - if (!mnt_optstr_get_option(fs->user_optstr, "user", &val, &valsz)) { - if (val) { - cxt->orig_user = strndup(val, valsz); -@@ -196,6 +205,10 @@ err: - - /* - * this has to be called before fix_optstr() -+ * -+ * Note that user= maybe be used by some filesystems as filesystem -+ * specific option (e.g. cifs). Yes, developers of such filesystems have -+ * allocated pretty hot place in hell... - */ - static int evaluate_permissions(struct libmnt_context *cxt) - { -@@ -233,10 +246,22 @@ static int evaluate_permissions(struct l - } - - /* -- * Note that MS_OWNERSECURE and MS_SECURE mount options -- * are applied by mnt_optstr_get_flags() from mnt_context_merge_mflags() -+ * MS_OWNERSECURE and MS_SECURE mount options are already -+ * applied by mnt_optstr_get_flags() in mnt_context_merge_mflags() -+ * if "user" (but no user= !) options is set. -+ * -+ * Let's ignore all user= (if is set) requests. - */ -+ if (cxt->user_mountflags & MNT_MS_USER) { -+ size_t valsz = 0; - -+ if (!mnt_optstr_get_option(cxt->fs->user_optstr, -+ "user", NULL, &valsz) && valsz) { -+ -+ DBG(CXT, mnt_debug_h(cxt, "perms: user= detected, ignore")); -+ cxt->user_mountflags &= ~MNT_MS_USER; -+ } -+ } - - /* - * MS_OWNER: Allow owners to mount when fstab contains the -Index: util-linux-2.21.2/libmount/src/optstr.c -=================================================================== ---- util-linux-2.21.2.orig/libmount/src/optstr.c -+++ util-linux-2.21.2/libmount/src/optstr.c -@@ -579,7 +579,7 @@ int mnt_optstr_get_flags(const char *opt - { - struct libmnt_optmap const *maps[2]; - char *name, *str = (char *) optstr; -- size_t namesz = 0; -+ size_t namesz = 0, valsz = 0; - int nmaps = 0; - - assert(optstr); -@@ -596,7 +596,7 @@ int mnt_optstr_get_flags(const char *opt - */ - maps[nmaps++] = mnt_get_builtin_optmap(MNT_USERSPACE_MAP); - -- while(!mnt_optstr_next_option(&str, &name, &namesz, NULL, NULL)) { -+ while(!mnt_optstr_next_option(&str, &name, &namesz, NULL, &valsz)) { - const struct libmnt_optmap *ent; - const struct libmnt_optmap *m; - -@@ -610,9 +610,10 @@ int mnt_optstr_get_flags(const char *opt - else - *flags |= ent->id; - -- } else if (nmaps == 2 && m == maps[1]) { -+ } else if (nmaps == 2 && m == maps[1] && valsz == 0) { - /* -- * Special case -- translate "user" to MS_ options -+ * Special case -- translate "user" (but no user=) to -+ * MS_ options - */ - if (ent->mask & MNT_INVERT) - continue; diff --git a/login-close-tty-before-vhangup.patch b/login-close-tty-before-vhangup.patch deleted file mode 100644 index 211e051..0000000 --- a/login-close-tty-before-vhangup.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 2e7035646eb85851171cc2e989bfa858a4f00cd4 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 12 Jul 2012 16:33:52 +0200 -Subject: login: close tty before vhangup() -Git-commit: 2e7035646eb85851171cc2e989bfa858a4f00cd4 -Patch-mainline: v2.22-rc1 -References: bnc#778842 - -Let's close all tty file descriptors before vhangup() call. - -References: https://lkml.org/lkml/2012/6/5/145 -Signed-off-by: Karel Zak -Signed-off-by: Jiri Slaby ---- - login-utils/login.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/login-utils/login.c b/login-utils/login.c -index fe13d8d..c0cc00a 100644 ---- a/login-utils/login.c -+++ b/login-utils/login.c -@@ -409,6 +409,14 @@ static void init_tty(struct login_context *cxt) - /* Kill processes left on this tty */ - tcsetattr(0, TCSAFLUSH, &ttt); - -+ /* -+ * Let's close file decriptors before vhangup -+ * https://lkml.org/lkml/2012/6/5/145 -+ */ -+ close(STDIN_FILENO); -+ close(STDOUT_FILENO); -+ close(STDERR_FILENO); -+ - signal(SIGHUP, SIG_IGN); /* so vhangup() wont kill us */ - vhangup(); - signal(SIGHUP, SIG_DFL); --- -1.7.12 - diff --git a/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff b/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff new file mode 100644 index 0000000..249c5f6 --- /dev/null +++ b/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff @@ -0,0 +1,143 @@ +--- util-linux-2.23.1/login-utils/su-common.c ++++ util-linux-2.23.1/login-utils/su-common.c 2013-06-06 08:46:59.575872090 +0000 +@@ -473,6 +473,117 @@ set_path(const struct passwd* pw) + err (EXIT_FAILURE, _("failed to set PATH")); + } + ++/* Add or clear /sbin and /usr/sbin for the su command ++ used without `-'. */ ++ ++/* Set if /sbin is found in path. */ ++#define SBIN_MASK 0x01 ++/* Set if /usr/sbin is found in path. */ ++#define USBIN_MASK 0x02 ++ ++static char * ++addsbin (const char *const path) ++{ ++ unsigned char smask = 0; ++ char *ptr, *tmp, *cur, *ret = NULL; ++ size_t len; ++ ++ if (!path || *path == 0) ++ return NULL; ++ ++ tmp = xstrdup (path); ++ cur = tmp; ++ for (ptr = strsep (&cur, ":"); ptr != NULL; ptr = strsep (&cur, ":")) ++ { ++ if (!strcmp (ptr, "/sbin")) ++ smask |= SBIN_MASK; ++ if (!strcmp (ptr, "/usr/sbin")) ++ smask |= USBIN_MASK; ++ } ++ ++ if ((smask & (USBIN_MASK|SBIN_MASK)) == (USBIN_MASK|SBIN_MASK)) ++ { ++ free (tmp); ++ return NULL; ++ } ++ ++ len = strlen (path); ++ if (!(smask & USBIN_MASK)) ++ len += strlen ("/usr/sbin:"); ++ ++ if (!(smask & SBIN_MASK)) ++ len += strlen (":/sbin"); ++ ++ ret = xmalloc (len + 1); ++ strcpy (tmp, path); ++ ++ *ret = 0; ++ cur = tmp; ++ for (ptr = strsep (&cur, ":"); ptr; ptr = strsep (&cur, ":")) ++ { ++ if (!strcmp (ptr, ".")) ++ continue; ++ if (*ret) ++ strcat (ret, ":"); ++ if (!(smask & USBIN_MASK) && !strcmp (ptr, "/bin")) ++ { ++ strcat (ret, "/usr/sbin:"); ++ strcat (ret, ptr); ++ smask |= USBIN_MASK; ++ continue; ++ } ++ if (!(smask & SBIN_MASK) && !strcmp (ptr, "/usr/bin")) ++ { ++ strcat (ret, ptr); ++ strcat (ret, ":/sbin"); ++ smask |= SBIN_MASK; ++ continue; ++ } ++ strcat (ret, ptr); ++ } ++ free (tmp); ++ ++ if (!(smask & USBIN_MASK)) ++ strcat (ret, ":/usr/sbin"); ++ ++ if (!(smask & SBIN_MASK)) ++ strcat (ret, ":/sbin"); ++ ++ return ret; ++} ++ ++static char * ++clearsbin (const char *const path) ++{ ++ char *ptr, *tmp, *cur, *ret = NULL; ++ ++ if (!path || *path == 0) ++ return NULL; ++ ++ tmp = strdup (path); ++ if (!tmp) ++ return NULL; ++ ++ ret = xmalloc (strlen (path) + 1); ++ *ret = 0; ++ cur = tmp; ++ for (ptr = strsep (&cur, ":"); ptr; ptr = strsep (&cur, ":")) ++ { ++ if (!strcmp (ptr, "/sbin")) ++ continue; ++ if (!strcmp (ptr, "/usr/sbin")) ++ continue; ++ if (!strcmp (ptr, "/usr/local/sbin")) ++ continue; ++ if (*ret) ++ strcat (ret, ":"); ++ strcat (ret, ptr); ++ } ++ free (tmp); ++ ++ return ret; ++} ++ + /* Update `environ' for the new shell based on PW, with SHELL being + the value for the SHELL environment variable. */ + +@@ -508,6 +619,22 @@ modify_environment (const struct passwd + xsetenv ("SHELL", shell, 1); + if (getlogindefs_bool ("ALWAYS_SET_PATH", 0)) + set_path(pw); ++ else ++ { ++ char const *path = getenv ("PATH"); ++ char *new = NULL; ++ ++ if (pw->pw_uid) ++ new = clearsbin (path); ++ else ++ new = addsbin (path); ++ ++ if (new) ++ { ++ xsetenv ("PATH", new, 1); ++ free (new); ++ } ++ } + + if (pw->pw_uid) + { diff --git a/mount-new-add-loopdev-specific-error-message.patch b/mount-new-add-loopdev-specific-error-message.patch deleted file mode 100644 index 9f1e028..0000000 --- a/mount-new-add-loopdev-specific-error-message.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 10389b1e4535dda7d27e5ab39d3d4f9d7868a5c9 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 28 May 2012 12:26:41 +0200 -Subject: [PATCH] mount: (new) add loopdev specific error message - -Signed-off-by: Karel Zak -Signed-off-by: Petr Uzel ---- - sys-utils/mount.c | 15 ++++++++++++--- - 1 files changed, 12 insertions(+), 3 deletions(-) - -Index: util-linux-2.21.2/sys-utils/mount.c -=================================================================== ---- util-linux-2.21.2.orig/sys-utils/mount.c -+++ util-linux-2.21.2/sys-utils/mount.c -@@ -354,6 +354,9 @@ try_readonly: - return MOUNT_EX_SUCCESS; /* mount(2) success */ - } - -+ mnt_context_get_mflags(cxt, &mflags); /* mount(2) flags */ -+ mnt_context_get_user_mflags(cxt, &uflags); /* userspace flags */ -+ - if (!mnt_context_syscall_called(cxt)) { - /* - * libmount errors (extra library checks) -@@ -382,7 +385,15 @@ try_readonly: - else - warnx(_("mount source not defined")); - return MOUNT_EX_USAGE; -- -+ case -MNT_ERR_LOOPDEV: -+ if (errno == ENOENT -+ && (uflags & MNT_MS_ENCRYPTION) -+ && src && stat(src, &st) == 0) -+ warnx(_("%s: failed to setup loop device " -+ "(probably unknown encryption type)"), src); -+ else -+ warn(_("%s: failed to setup loop device"), src); -+ return MOUNT_EX_FAIL; - default: - return handle_generic_errors(rc, _("%s: mount failed"), - tgt ? tgt : src); -@@ -406,8 +417,6 @@ try_readonly: - */ - syserr = mnt_context_get_syscall_errno(cxt); - -- mnt_context_get_mflags(cxt, &mflags); /* mount(2) flags */ -- mnt_context_get_user_mflags(cxt, &uflags); /* userspace flags */ - - switch(syserr) { - case EPERM: diff --git a/mount-new-allow-sloppy-for-non-root.patch b/mount-new-allow-sloppy-for-non-root.patch deleted file mode 100644 index c83533b..0000000 --- a/mount-new-allow-sloppy-for-non-root.patch +++ /dev/null @@ -1,25 +0,0 @@ -From e26de525e21677c680d87f63e4dafbe4859365bf Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 14 Jun 2012 14:43:21 +0200 -Subject: [PATCH] mount: (new) allow sloppy for non-root - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=825836 -Signed-off-by: Karel Zak -Signed-off-by: Petr Uzel ---- - sys-utils/mount.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -Index: util-linux-2.21.2/sys-utils/mount.c -=================================================================== ---- util-linux-2.21.2.orig/sys-utils/mount.c -+++ util-linux-2.21.2/sys-utils/mount.c -@@ -732,7 +732,7 @@ int main(int argc, char **argv) - longopts, NULL)) != -1) { - - /* only few options are allowed for non-root users */ -- if (mnt_context_is_restricted(cxt) && !strchr("hlLUVvpri", c)) -+ if (mnt_context_is_restricted(cxt) && !strchr("hlLUVvpris", c)) - exit_non_root(option_to_longopt(c, longopts)); - - switch(c) { diff --git a/mount-new-improve-error-messages.patch b/mount-new-improve-error-messages.patch deleted file mode 100644 index 36c88b4..0000000 --- a/mount-new-improve-error-messages.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 58f108ef2b9c8cc0362e7781a72e5e921dc383b3 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 17 Apr 2012 11:36:36 +0200 -Subject: [PATCH] mount: (new) improve error messages - -Signed-off-by: Karel Zak -Signed-off-by: Petr Uzel ---- - sys-utils/mount.c | 15 +++++++-------- - 1 files changed, 7 insertions(+), 8 deletions(-) - -Index: util-linux-2.21.2/sys-utils/mount.c -=================================================================== ---- util-linux-2.21.2.orig/sys-utils/mount.c -+++ util-linux-2.21.2/sys-utils/mount.c -@@ -367,16 +367,13 @@ try_readonly: - return MOUNT_EX_USAGE; - } - -- /* -- * TODO: add mnt_context_fstab_applied() to check if we found -- * target/source in the file. -- */ -- if (!tgt) { -- if (mflags & MS_REMOUNT) -- warnx(_("%s not mounted"), src ? src : tgt); -- else -+ if (!tgt || (!src && !(mflags & MS_PROPAGATION))) { -+ if (!mnt_context_fstab_applied(cxt)) - warnx(_("can't find %s in %s"), src ? src : tgt, - mnt_get_fstab_path()); -+ else if (mflags & MS_REMOUNT) -+ warnx(_("%s not mounted"), src ? src : tgt); -+ - return MOUNT_EX_USAGE; - } - -@@ -485,6 +482,8 @@ try_readonly: - case EINVAL: - if (mflags & MS_REMOUNT) - warnx(_("%s not mounted or bad option"), tgt); -+ else if (mflags & MS_PROPAGATION) -+ warnx(_("%s is not mountpoint or bad option"), tgt); - else - warnx(_("wrong fs type, bad option, bad superblock on %s,\n" - " missing codepage or helper program, or other error"), diff --git a/mount-new-use-MNT_ERR-for-error-messages.patch b/mount-new-use-MNT_ERR-for-error-messages.patch deleted file mode 100644 index 05dc9b2..0000000 --- a/mount-new-use-MNT_ERR-for-error-messages.patch +++ /dev/null @@ -1,56 +0,0 @@ -From ba24923e97e099668b8c96dba9596c90cb58c417 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 24 Apr 2012 11:59:18 +0200 -Subject: [PATCH] mount: (new) use MNT_ERR_ for error messages - -Signed-off-by: Karel Zak -Signed-off-by: Petr Uzel ---- - sys-utils/mount.c | 27 +++++++++++++-------------- - 1 files changed, 13 insertions(+), 14 deletions(-) - -Index: util-linux-2.21.2/sys-utils/mount.c -=================================================================== ---- util-linux-2.21.2.orig/sys-utils/mount.c -+++ util-linux-2.21.2/sys-utils/mount.c -@@ -365,29 +365,28 @@ try_readonly: - case -EBUSY: - warnx(_("%s is already mounted"), src); - return MOUNT_EX_USAGE; -- } -- -- if (!tgt || (!src && !(mflags & MS_PROPAGATION))) { -- if (!mnt_context_fstab_applied(cxt)) -+ case -MNT_ERR_NOFSTAB: - warnx(_("can't find %s in %s"), src ? src : tgt, - mnt_get_fstab_path()); -- else if (mflags & MS_REMOUNT) -- warnx(_("%s not mounted"), src ? src : tgt); -- - return MOUNT_EX_USAGE; -- } -- -- if (!mnt_context_get_fstype(cxt)) { -+ case -MNT_ERR_NOFSTYPE: - if (restricted) - warnx(_("I could not determine the filesystem type, " - "and none was specified")); - else - warnx(_("you must specify the filesystem type")); - return MOUNT_EX_USAGE; -- } -+ case -MNT_ERR_NOSOURCE: -+ if (src) -+ warnx(_("can't find %s"), src); -+ else -+ warnx(_("mount source not defined")); -+ return MOUNT_EX_USAGE; -+ -+ default: - return handle_generic_errors(rc, _("%s: mount failed"), - tgt ? tgt : src); -- -+ } - } else if (mnt_context_get_syscall_errno(cxt) == 0) { - /* - * mount(2) syscall success, but something else failed diff --git a/mount-sanitize-paths-from-non-root-users.patch b/mount-sanitize-paths-from-non-root-users.patch deleted file mode 100644 index fe0c1b7..0000000 --- a/mount-sanitize-paths-from-non-root-users.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 5ebbc3865d1e53ef42e5f121c41faab23dd59075 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 26 Nov 2012 14:30:22 +0100 -Subject: [PATCH] mount: sanitize paths from non-root users - - $ mount /root/.ssh/../../dev/sda2 - mount: only root can mount UUID=17bc65ec-4125-4e7c-8a7d-e2795064c736 on /boot - -this is too promiscuous. It seems better to ignore on command line -specified paths which are not resolve-able for non-root users. - -Fixed version: - - $ mount /root/.ssh/../../dev/sda2 - mount: /root/.ssh/../../dev/sda2: Permission denied - - $ mount /dev/sda2 - mount: only root can mount UUID=17bc65ec-4125-4e7c-8a7d-e2795064c736 on /boot - -Note that this bug has no relation to mount(2) permissions evaluation -in suid mode. The way how non-root user specifies paths on command -line is completely irrelevant for comparison with fstab entries. - -Signed-off-by: Karel Zak -Signed-off-by: Petr Uzel ---- - sys-utils/Makefile.am | 1 + - sys-utils/mount.c | 35 +++++++++++++++++++++++++++++++++++ - 2 files changed, 36 insertions(+) - -Index: util-linux-2.21.2/sys-utils/Makefile.am -=================================================================== ---- util-linux-2.21.2.orig/sys-utils/Makefile.am -+++ util-linux-2.21.2/sys-utils/Makefile.am -@@ -64,6 +64,7 @@ dist_man_MANS += mount.8 ../mount/fstab. - mount_SOURCES = mount.c \ - $(top_srcdir)/lib/env.c \ - $(top_srcdir)/lib/xgetpass.c \ -+ $(top_srcdir)/lib/canonicalize.c \ - $(top_srcdir)/lib/strutils.c - - mount_LDADD = $(ul_libmount_la) $(SELINUX_LIBS) -Index: util-linux-2.21.2/sys-utils/mount.c -=================================================================== ---- util-linux-2.21.2.orig/sys-utils/mount.c -+++ util-linux-2.21.2/sys-utils/mount.c -@@ -38,6 +38,7 @@ - #include "strutils.h" - #include "exitcodes.h" - #include "xalloc.h" -+#include "canonicalize.h" - - /*** TODO: DOCS: - * -@@ -572,6 +573,37 @@ static struct libmnt_table *append_fstab - return fstab; - } - -+/* -+ * Check source and target paths -- non-root user should not be able to -+ * resolve paths which are unreadable for him. -+ */ -+static void sanitize_paths(struct libmnt_context *cxt) -+{ -+ const char *p; -+ struct libmnt_fs *fs = mnt_context_get_fs(cxt); -+ -+ if (!fs) -+ return; -+ -+ p = mnt_fs_get_target(fs); -+ if (p) { -+ char *np = canonicalize_path_restricted(p); -+ if (!np) -+ err(MOUNT_EX_USAGE, "%s", p); -+ mnt_fs_set_target(fs, np); -+ free(np); -+ } -+ -+ p = mnt_fs_get_srcpath(fs); -+ if (p) { -+ char *np = canonicalize_path_restricted(p); -+ if (!np) -+ err(MOUNT_EX_USAGE, "%s", p); -+ mnt_fs_set_source(fs, np); -+ free(np); -+ } -+} -+ - static void __attribute__((__noreturn__)) usage(FILE *out) - { - fputs(USAGE_HEADER, out); -@@ -880,6 +912,9 @@ int main(int argc, char **argv) - } else - usage(stderr); - -+ if (mnt_context_is_restricted(cxt)) -+ sanitize_paths(cxt); -+ - if (oper) { - /* MS_PROPAGATION operations, let's set the mount flags */ - mnt_context_set_mflags(cxt, oper); diff --git a/su.default b/su.default new file mode 100644 index 0000000..62d1702 --- /dev/null +++ b/su.default @@ -0,0 +1,11 @@ +# Per default, only "su -" will set a new PATH. +# If this variable is changed to "yes" (default is "no"), +# every su call will overwrite the PATH variable. +ALWAYS_SET_PATH=no + +# Default path. +PATH=/usr/local/bin:/bin:/usr/bin + +# Default path for a user invoking su to root. +SUPATH=/usr/sbin:/bin:/usr/bin:/sbin + diff --git a/su.pamd b/su.pamd new file mode 100644 index 0000000..d0c9fe8 --- /dev/null +++ b/su.pamd @@ -0,0 +1,8 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +auth include common-auth +account sufficient pam_rootok.so +account include common-account +password include common-password +session include common-session +session optional pam_xauth.so diff --git a/umount-sanitize-paths-from-non-root-users.patch b/umount-sanitize-paths-from-non-root-users.patch deleted file mode 100644 index 0e20756..0000000 --- a/umount-sanitize-paths-from-non-root-users.patch +++ /dev/null @@ -1,84 +0,0 @@ -From cc8cc8f32c863f3ae6a8a88e97b47bcd6a21825f Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 26 Nov 2012 16:25:46 +0100 -Subject: [PATCH] umount: sanitize paths from non-root users - -Signed-off-by: Karel Zak -Signed-off-by: Petr Uzel ---- - sys-utils/Makefile.am | 4 +++- - sys-utils/umount.c | 32 ++++++++++++++++++++++++++++++-- - 2 files changed, 33 insertions(+), 3 deletions(-) - -Index: util-linux-2.21.2/sys-utils/Makefile.am -=================================================================== ---- util-linux-2.21.2.orig/sys-utils/Makefile.am -+++ util-linux-2.21.2/sys-utils/Makefile.am -@@ -71,7 +71,9 @@ mount_LDADD = $(ul_libmount_la) $(SELINU - mount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -I$(ul_libmount_incdir) - mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) - --umount_SOURCES = umount.c $(top_srcdir)/lib/env.c -+umount_SOURCES = umount.c \ -+ $(top_srcdir)/lib/env.c \ -+ $(top_srcdir)/lib/canonicalize.c - umount_LDADD = $(ul_libmount_la) - umount_CFLAGS = $(AM_CFLAGS) $(SUID_CFLAGS) -I$(ul_libmount_incdir) - umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) -Index: util-linux-2.21.2/sys-utils/umount.c -=================================================================== ---- util-linux-2.21.2.orig/sys-utils/umount.c -+++ util-linux-2.21.2/sys-utils/umount.c -@@ -34,6 +34,7 @@ - #include "env.h" - #include "optutils.h" - #include "exitcodes.h" -+#include "canonicalize.h" - - static int table_parser_errcb(struct libmnt_table *tb __attribute__((__unused__)), - const char *filename, int line) -@@ -277,6 +278,24 @@ static int umount_one(struct libmnt_cont - return rc; - } - -+/* -+ * Check path -- non-root user should not be able to resolve path which is -+ * unreadable for him. -+ */ -+static char *sanitize_path(const char *path) -+{ -+ char *p; -+ -+ if (!path) -+ return NULL; -+ -+ p = canonicalize_path_restricted(path); -+ if (!p) -+ err(MOUNT_EX_USAGE, "%s", path); -+ -+ return p; -+} -+ - int main(int argc, char **argv) - { - int c, rc = 0, all = 0; -@@ -388,8 +407,17 @@ int main(int argc, char **argv) - } else if (argc < 1) { - usage(stderr); - -- } else while (argc--) -- rc += umount_one(cxt, *argv++); -+ } else while (argc--) { -+ char *path = *argv++; -+ -+ if (mnt_context_is_restricted(cxt)) -+ path = sanitize_path(path); -+ -+ rc += umount_one(cxt, path); -+ -+ if (mnt_context_is_restricted(cxt)) -+ free(path); -+ } - - mnt_free_context(cxt); - return rc; diff --git a/util-linux-2.12r-fdisk_remove_bogus_warnings.patch b/util-linux-2.12r-fdisk_remove_bogus_warnings.patch deleted file mode 100644 index 3fa89cf..0000000 --- a/util-linux-2.12r-fdisk_remove_bogus_warnings.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: util-linux-2.21-rc2/fdisk/fdisk.c -=================================================================== ---- util-linux-2.21-rc2.orig/fdisk/fdisk.c -+++ util-linux-2.21-rc2/fdisk/fdisk.c -@@ -1767,6 +1767,7 @@ static void check_consistency(struct par - /* compute logical ending (c, h, s) */ - long2chs(get_start_sect(p) + get_nr_sects(p) - 1, &lec, &leh, &les); - -+#if 0 - /* Same physical / logical beginning? */ - if (cylinders <= 1024 && (pbc != lbc || pbh != lbh || pbs != lbs)) { - printf(_("Partition %d has different physical/logical " -@@ -1783,7 +1784,6 @@ static void check_consistency(struct par - printf(_("logical=(%d, %d, %d)\n"),lec, leh, les); - } - --#if 0 - /* Beginning on cylinder boundary? */ - if (pbh != !pbc || pbs != 1) { - printf(_("Partition %i does not start on cylinder " diff --git a/util-linux-2.20-libmount-deps.patch b/util-linux-2.20-libmount-deps.patch deleted file mode 100644 index 50b2f15..0000000 --- a/util-linux-2.20-libmount-deps.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-2.21.2/libmount/src/Makefile.am -=================================================================== ---- util-linux-2.21.2.orig/libmount/src/Makefile.am -+++ util-linux-2.21.2/libmount/src/Makefile.am -@@ -30,7 +30,7 @@ nodist_libmount_la_SOURCES = mountP.h - - libmount_la_LIBADD = $(ul_libblkid_la) $(SELINUX_LIBS) - --libmount_la_DEPENDENCIES = $(libmount_la_LIBADD) libmount.sym libmount.h.in -+libmount_la_DEPENDENCIES = $(ul_libblkid_la) libmount.sym libmount.h.in - - libmount_la_LDFLAGS = -Wl,--version-script=$(ul_libmount_srcdir)/libmount.sym \ - -version-info $(LIBMOUNT_VERSION_INFO) diff --git a/util-linux-2.21.2-noenc-suse.diff b/util-linux-2.21.2-noenc-suse.diff deleted file mode 100644 index 42da0b1..0000000 --- a/util-linux-2.21.2-noenc-suse.diff +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-2.21.2/libmount/src/context_loopdev.c -=================================================================== ---- util-linux-2.21.2.orig/libmount/src/context_loopdev.c -+++ util-linux-2.21.2/libmount/src/context_loopdev.c -@@ -199,6 +199,8 @@ int mnt_context_setup_loopdev(struct lib - if (rc == 0 && (cxt->user_mountflags & MNT_MS_ENCRYPTION) && - mnt_optstr_get_option(optstr, "encryption", &val, &len) == 0) { - DBG(CXT, mnt_debug_h(cxt, "encryption no longer supported")); -+ // XXX: nasty for the lib but there's on better way to give a hint atm -+ fprintf(stderr, "mount: encryption no longer supported. Please use /etc/crypttab instead (man 5 crypttab)\n"); - rc = -EINVAL; - } - diff --git a/util-linux-2.21.2-noenc.diff b/util-linux-2.21.2-noenc.diff deleted file mode 100644 index 936d677..0000000 --- a/util-linux-2.21.2-noenc.diff +++ /dev/null @@ -1,535 +0,0 @@ -From e1f7680ca45c5173f7853feb76dd093cec8d17ad Mon Sep 17 00:00:00 2001 -From: Ludwig Nussel -Date: Fri, 15 Jun 2012 09:38:36 +0200 -Subject: [PATCH] remove obsolete encryption support from losetup - -kernel cryptoloop is deprecated since ages and support for cryptoloop in -util-linux is incomplete/broken. -- no password hashing -- last 8 bit of key are always set to zero -- no binary keys possible (stops reading key at \n and \0) - -In the past some Distros added the above features with patches. So -remove cryptoloop support from util-linux completely to make sure -people won't try using it. - -Signed-off-by: Ludwig Nussel ---- - include/loopdev.h | 3 -- - lib/loopdev.c | 56 ---------------------------------------- - libmount/src/context_loopdev.c | 22 +++------------- - mount/mount.8 | 9 +----- - mount/mount.c | 20 +++++--------- - sys-utils/losetup.8 | 29 ++------------------ - sys-utils/losetup.c | 30 +++++---------------- - sys-utils/mount.8 | 7 +---- - sys-utils/mount.c | 34 +----------------------- - 9 files changed, 25 insertions(+), 185 deletions(-) - -diff --git a/include/loopdev.h b/include/loopdev.h -index 906bee0..030f215 100644 ---- a/include/loopdev.h -+++ b/include/loopdev.h -@@ -165,9 +165,6 @@ int loopcxt_set_offset(struct loopdev_cxt *lc, uint64_t offset); - int loopcxt_set_sizelimit(struct loopdev_cxt *lc, uint64_t sizelimit); - int loopcxt_set_flags(struct loopdev_cxt *lc, uint32_t flags); - int loopcxt_set_backing_file(struct loopdev_cxt *lc, const char *filename); --int loopcxt_set_encryption(struct loopdev_cxt *lc, -- const char *encryption, -- const char *password); - - extern char *loopcxt_get_backing_file(struct loopdev_cxt *lc); - extern int loopcxt_get_backing_devno(struct loopdev_cxt *lc, dev_t *devno); -diff --git a/lib/loopdev.c b/lib/loopdev.c -index fd3f9ba..807984e 100644 ---- a/lib/loopdev.c -+++ b/lib/loopdev.c -@@ -963,62 +963,6 @@ int loopcxt_set_backing_file(struct loopdev_cxt *lc, const char *filename) - return 0; - } - --static int digits_only(const char *s) --{ -- while (*s) -- if (!isdigit(*s++)) -- return 0; -- return 1; --} -- --/* -- * @lc: context -- * @encryption: encryption name / type (see lopsetup man page) -- * @password -- * -- * Note that the encryption functionality is deprecated an unmaintained. Use -- * cryptsetup (it also supports AES-loops). -- * -- * The setting is removed by loopcxt_set_device() loopcxt_next()! -- * -- * Returns: 0 on success, <0 on error. -- */ --int loopcxt_set_encryption(struct loopdev_cxt *lc, -- const char *encryption, -- const char *password) --{ -- if (!lc) -- return -EINVAL; -- -- DBG(lc, loopdev_debug("setting encryption '%s'", encryption)); -- -- if (encryption && *encryption) { -- if (digits_only(encryption)) { -- lc->info.lo_encrypt_type = atoi(encryption); -- } else { -- lc->info.lo_encrypt_type = LO_CRYPT_CRYPTOAPI; -- snprintf((char *)lc->info.lo_crypt_name, LO_NAME_SIZE, -- "%s", encryption); -- } -- } -- -- switch (lc->info.lo_encrypt_type) { -- case LO_CRYPT_NONE: -- lc->info.lo_encrypt_key_size = 0; -- break; -- default: -- DBG(lc, loopdev_debug("setting encryption key")); -- memset(lc->info.lo_encrypt_key, 0, LO_KEY_SIZE); -- strncpy((char *)lc->info.lo_encrypt_key, password, LO_KEY_SIZE); -- lc->info.lo_encrypt_key[LO_KEY_SIZE - 1] = '\0'; -- lc->info.lo_encrypt_key_size = LO_KEY_SIZE; -- break; -- } -- -- DBG(lc, loopdev_debug("encryption successfully set")); -- return 0; --} -- - /* - * @cl: context - * -diff --git a/libmount/src/context_loopdev.c b/libmount/src/context_loopdev.c -index 023c952..863ee3d 100644 ---- a/libmount/src/context_loopdev.c -+++ b/libmount/src/context_loopdev.c -@@ -7,7 +7,6 @@ - - /* - * DOCS: - "lo@" prefix for fstype is unsupported -- * - encyption= mount option for loop device is unssuported - */ - - #include -@@ -35,8 +34,7 @@ int mnt_context_is_loopdev(struct libmnt_context *cxt) - - if (cxt->user_mountflags & (MNT_MS_LOOP | - MNT_MS_OFFSET | -- MNT_MS_SIZELIMIT | -- MNT_MS_ENCRYPTION)) { -+ MNT_MS_SIZELIMIT)) { - - DBG(CXT, mnt_debug_h(cxt, "loopdev specific options detected")); - return 1; -@@ -134,7 +132,7 @@ static int is_mounted_same_loopfile(struct libmnt_context *cxt, - int mnt_context_setup_loopdev(struct libmnt_context *cxt) - { - const char *backing_file, *optstr, *loopdev = NULL; -- char *val = NULL, *enc = NULL, *pwd = NULL; -+ char *val = NULL; - size_t len; - struct loopdev_cxt lc; - int rc = 0, lo_flags = 0; -@@ -200,13 +198,8 @@ int mnt_context_setup_loopdev(struct libmnt_context *cxt) - */ - if (rc == 0 && (cxt->user_mountflags & MNT_MS_ENCRYPTION) && - mnt_optstr_get_option(optstr, "encryption", &val, &len) == 0) { -- enc = strndup(val, len); -- if (val && !enc) -- rc = -ENOMEM; -- if (enc && cxt->pwd_get_cb) { -- DBG(CXT, mnt_debug_h(cxt, "asking for pass")); -- pwd = cxt->pwd_get_cb(cxt); -- } -+ DBG(CXT, mnt_debug_h(cxt, "encryption no longer supported")); -+ rc = -EINVAL; - } - - if (rc == 0 && is_mounted_same_loopfile(cxt, -@@ -245,8 +238,6 @@ int mnt_context_setup_loopdev(struct libmnt_context *cxt) - rc = loopcxt_set_offset(&lc, offset); - if (!rc && sizelimit) - rc = loopcxt_set_sizelimit(&lc, sizelimit); -- if (!rc && enc && pwd) -- loopcxt_set_encryption(&lc, enc, pwd); - if (!rc) - loopcxt_set_flags(&lc, lo_flags); - if (rc) { -@@ -298,11 +289,6 @@ int mnt_context_setup_loopdev(struct libmnt_context *cxt) - loopcxt_set_fd(&lc, -1, 0); - } - done: -- free(enc); -- if (pwd && cxt->pwd_release_cb) { -- DBG(CXT, mnt_debug_h(cxt, "release pass")); -- cxt->pwd_release_cb(cxt, pwd); -- } - loopcxt_deinit(&lc); - return rc; - } -diff --git a/mount/mount.8 b/mount/mount.8 -index 789d9fe..0644e8e 100644 ---- a/mount/mount.8 -+++ b/mount/mount.8 -@@ -535,11 +535,6 @@ Don't canonicalize paths. The mount command canonicalizes all paths - file. This option can be used together with the - .B \-f - flag for already canonicalized absolut paths. --.IP "\fB\-p, \-\-pass\-fd \fInum\fP" --In case of a loop mount with encryption, read the passphrase from --file descriptor --.I num --instead of from the terminal. - .IP "\fB\-s\fP" - Tolerate sloppy mount options rather than failing. This will ignore - mount options not supported by a filesystem type. Not all filesystems -@@ -2708,8 +2703,8 @@ not specified or the filesystem is known for libblkid, for example: - .B "mount -t ext3 /tmp/disk.img /mnt" - .sp - .RE --This type of mount knows about four options, namely --.BR loop ", " offset ", " sizelimit " and " encryption , -+This type of mount knows about three options, namely -+.BR loop ", " offset ", " sizelimit " , - that are really options to - .BR \%losetup (8). - (These options can be used in addition to those specific -diff --git a/mount/mount.c b/mount/mount.c -index 396f357..b69fd61 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -83,9 +83,6 @@ static int mounttype = 0; - /* True if (ruid != euid) or (0 != ruid), i.e. only "user" mounts permitted. */ - static int restricted = 1; - --/* Contains the fd to read the passphrase from, if any. */ --static int pfd = -1; -- - #ifdef HAVE_LIBMOUNT_MOUNT - static struct libmnt_update *mtab_update; - static char *mtab_opts; -@@ -1262,7 +1259,7 @@ loop_check(const char **spec, const char **type, int *flags, - *type = opt_vfstype; - } - -- *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_sizelimit || opt_encryption); -+ *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_sizelimit); - *loopfile = *spec; - - /* Automatically create a loop device from a regular file if a filesystem -@@ -1317,6 +1314,11 @@ loop_check(const char **spec, const char **type, int *flags, - return EX_FAIL; - } - -+ if (opt_encryption) { -+ error("mount: %s", _("encryption not supported, use cryptsetup(8) instead")); -+ return EX_FAIL; -+ } -+ - loopcxt_init(&lc, 0); - /* loopcxt_enable_debug(&lc, 1); */ - -@@ -1525,14 +1527,6 @@ update_mtab_entry(const char *spec, const char *node, const char *type, - #endif /* !HAVE_LIBMOUNT_MOUNT */ - - static void --set_pfd(char *s) { -- if (!isdigit(*s)) -- die(EX_USAGE, -- _("mount: argument to -p or --pass-fd must be a number")); -- pfd = atoi(optarg); --} -- --static void - cdrom_setspeed(const char *spec) { - #define CDROM_SELECT_SPEED 0x5322 /* Set the CD-ROM speed */ - if (opt_speed) { -@@ -2579,7 +2573,7 @@ main(int argc, char *argv[]) { - test_opts = append_opt(test_opts, optarg, NULL); - break; - case 'p': /* fd on which to read passwd */ -- set_pfd(optarg); -+ error("mount: %s", _("--pass-fd is no longer supported")); - break; - case 'r': /* mount readonly */ - readonly = 1; -diff --git a/sys-utils/losetup.8 b/sys-utils/losetup.8 -index f50b072..8c69689 100644 ---- a/sys-utils/losetup.8 -+++ b/sys-utils/losetup.8 -@@ -40,8 +40,6 @@ Setup loop device: - .sp - .in +5 - .B losetup --.RB [{ \-e | \-E } --.IR encryption ] - .RB [ \-o - .IR offset ] - .RB [ \-\-sizelimit -@@ -82,8 +80,6 @@ force loop driver to reread size of the file associated with the specified loop - detach the file or device associated with the specified loop device(s) - .IP "\fB\-D, \-\-detach-all\fP" - detach all associated loop devices --.IP "\fB\-e, \-E, \-\-encryption \fIencryption_type\fP" --enable data encryption with specified name or number - .IP "\fB\-f, \-\-find\fP" - find the first unused loop device. If a - .I file -@@ -98,10 +94,6 @@ the data start is moved \fIoffset\fP bytes into the specified file or - device - .IP "\fB\-\-sizelimit \fIsize\fP" - the data end is set to no more than \fIsize\fP bytes after the data start --.IP "\fB\-p, \-\-pass-fd \fInum\fP" --read the passphrase from file descriptor with number --.I num --instead of from the terminal - .IP "\fB\-P, \-\-partscan\fP" - force kernel to scan partition table on newly created loop device - .IP "\fB\-r, \-\-read-only\fP" -@@ -116,25 +108,10 @@ argument are present. - verbose mode - - .SH ENCRYPTION --.B Cryptoloop is deprecated in favor of dm-crypt. For more details see --.B cryptsetup (8). It is possible that all bug reports regarding to -E/-e --.B options will be ignored. -- -- --It is possible to specify transfer functions (for encryption/decryption --or other purposes) using one of the --.B \-E -+Cryptoloop is no longer supported in favor of dm-crypt. For more details see -+.B cryptsetup (8) - and --.B \-e --options. --There are two mechanisms to specify the desired encryption: by number --and by name. If an encryption is specified by number then one --has to make sure that the Linux kernel knows about the encryption with that --number, probably by patching the kernel. Standard numbers that are --always present are 0 (no encryption) and 1 (XOR encryption). --When the cryptoloop module is loaded (or compiled in), it uses number 18. --This cryptoloop module will take the name of an arbitrary encryption type --and find the module that knows how to perform that encryption. -+.B crypttab (5). - - .SH RETURN VALUE - .B losetup -diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c -index 9f03151..2513253 100644 ---- a/sys-utils/losetup.c -+++ b/sys-utils/losetup.c -@@ -18,7 +18,6 @@ - #include "nls.h" - #include "strutils.h" - #include "loopdev.h" --#include "xgetpass.h" - - enum { - A_CREATE = 1, /* setup a new device */ -@@ -164,10 +163,8 @@ static void usage(FILE *out) - " -j, --associated list all devices associated with \n"), out); - fputs(USAGE_SEPARATOR, out); - -- fputs(_(" -e, --encryption enable encryption with specified \n" -- " -o, --offset start at offset into file\n" -+ fputs(_(" -o, --offset start at offset into file\n" - " --sizelimit device limited to bytes of the file\n" -- " -p, --pass-fd read passphrase from file descriptor \n" - " -P, --partscan create partitioned loop device\n" - " -r, --read-only setup read-only loop device\n" - " --show print device name after setup (with -f)\n" -@@ -185,8 +182,8 @@ static void usage(FILE *out) - int main(int argc, char **argv) - { - struct loopdev_cxt lc; -- int act = 0, flags = 0, passfd = -1, c; -- char *file = NULL, *encryption = NULL; -+ int act = 0, flags = 0, c; -+ char *file = NULL; - uint64_t offset = 0, sizelimit = 0; - int res = 0, showdev = 0, lo_flags = 0; - -@@ -249,7 +246,7 @@ int main(int argc, char **argv) - break; - case 'E': - case 'e': -- encryption = optarg; -+ errx(EXIT_FAILURE, _("encryption not supported, use cryptsetup(8) instead")); - break; - case 'f': - act = A_FIND_FREE; -@@ -268,8 +265,7 @@ int main(int argc, char **argv) - flags |= LOOPDEV_FL_OFFSET; - break; - case 'p': -- passfd = strtol_or_err(optarg, -- _("invalid passphrase file descriptor")); -+ warn(_("--pass-fd is no longer supported")); - break; - case 'P': - lo_flags |= LO_FLAGS_PARTSCAN; -@@ -327,10 +323,10 @@ int main(int argc, char **argv) - } - - if (act != A_CREATE && -- (encryption || sizelimit || passfd != -1 || lo_flags || showdev)) -+ (sizelimit || lo_flags || showdev)) - errx(EXIT_FAILURE, - _("the options %s are allowed to loop device setup only"), -- "--{encryption,sizelimit,pass-fd,read-only,show}"); -+ "--{sizelimit,read-only,show}"); - - if ((flags & LOOPDEV_FL_OFFSET) && - act != A_CREATE && (act != A_SHOW || !file)) -@@ -339,16 +335,8 @@ int main(int argc, char **argv) - switch (act) { - case A_CREATE: - { -- char *pass = NULL; - int hasdev = loopcxt_has_device(&lc); - -- if (encryption) { --#ifdef MCL_FUTURE -- if(mlockall(MCL_CURRENT | MCL_FUTURE)) -- err(EXIT_FAILURE, _("couldn't lock into memory")); --#endif -- pass = xgetpass(passfd, _("Password: ")); -- } - do { - /* Note that loopcxt_{find_unused,set_device}() resets - * loopcxt struct. -@@ -357,8 +345,6 @@ int main(int argc, char **argv) - warnx(_("not found unused device")); - break; - } -- if (encryption && pass) -- loopcxt_set_encryption(&lc, encryption, pass); - if (flags & LOOPDEV_FL_OFFSET) - loopcxt_set_offset(&lc, offset); - if (flags & LOOPDEV_FL_SIZELIMIT) -@@ -379,8 +365,6 @@ int main(int argc, char **argv) - } - } while (hasdev == 0); - -- free(pass); -- - if (showdev && res == 0) - printf("%s\n", loopcxt_get_device(&lc)); - break; -diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 -index 4f8af0a..73f5170 100644 ---- a/sys-utils/mount.8 -+++ b/sys-utils/mount.8 -@@ -528,11 +528,6 @@ Don't canonicalize paths. The mount command canonicalizes all paths - file. This option can be used together with the - .B \-f - flag for already canonicalized absolut paths. --.IP "\fB\-p, \-\-pass\-fd \fInum\fP" --In case of a loop mount with encryption, read the passphrase from --file descriptor --.I num --instead of from the terminal. - .IP "\fB\-s\fP" - Tolerate sloppy mount options rather than failing. This will ignore - mount options not supported by a filesystem type. Not all filesystems -@@ -2715,7 +2710,7 @@ not specified or the filesystem is known for libblkid, for example: - .sp - .RE - This type of mount knows about four options, namely --.BR loop ", " offset ", " sizelimit " and " encryption , -+.BR loop ", " offset ", " sizelimit ", - that are really options to - .BR \%losetup (8). - (These options can be used in addition to those specific -diff --git a/sys-utils/mount.c b/sys-utils/mount.c -index 7f2d5d8..031fd31 100644 ---- a/sys-utils/mount.c -+++ b/sys-utils/mount.c -@@ -36,7 +36,6 @@ - #include "env.h" - #include "optutils.h" - #include "strutils.h" --#include "xgetpass.h" - #include "exitcodes.h" - #include "xalloc.h" - -@@ -49,7 +48,6 @@ - * --options-source-force MNT_OMODE_FORCE - */ - --static int passfd = -1; - static int readwrite; - - static int mk_exit_code(struct libmnt_context *cxt, int rc); -@@ -103,32 +101,6 @@ static int table_parser_errcb(struct libmnt_table *tb __attribute__((__unused__) - return 0; - } - --static char *encrypt_pass_get(struct libmnt_context *cxt) --{ -- if (!cxt) -- return 0; -- --#ifdef MCL_FUTURE -- if (mlockall(MCL_CURRENT | MCL_FUTURE)) { -- warn(_("couldn't lock into memory")); -- return NULL; -- } --#endif -- return xgetpass(passfd, _("Password: ")); --} -- --static void encrypt_pass_release(struct libmnt_context *cxt -- __attribute__((__unused__)), char *pwd) --{ -- char *p = pwd; -- -- while (p && *p) -- *p++ = '\0'; -- -- free(pwd); -- munlockall(); --} -- - static void print_all(struct libmnt_context *cxt, char *pattern, int show_label) - { - struct libmnt_table *tb; -@@ -616,7 +588,6 @@ static void __attribute__((__noreturn__)) usage(FILE *out) - fprintf(out, _( - " -o, --options comma-separated list of mount options\n" - " -O, --test-opts limit the set of filesystems (use with -a)\n" -- " -p, --pass-fd read the passphrase from file descriptor\n" - " -r, --read-only mount the filesystem read-only (same as -o ro)\n" - " -t, --types limit the set of filesystem types\n")); - fprintf(out, _( -@@ -782,8 +753,7 @@ int main(int argc, char **argv) - err(MOUNT_EX_SYSERR, _("failed to set options pattern")); - break; - case 'p': -- passfd = strtol_or_err(optarg, -- _("invalid passphrase file descriptor")); -+ warnx(_("--pass-fd is no longer supported")); - break; - case 'L': - case 'U': -@@ -864,8 +834,6 @@ int main(int argc, char **argv) - else if (types) - mnt_context_set_fstype(cxt, types); - -- mnt_context_set_passwd_cb(cxt, encrypt_pass_get, encrypt_pass_release); -- - if (all) { - /* - * A) Mount all --- -1.7.7 - diff --git a/util-linux-2.21.2.tar.bz2 b/util-linux-2.21.2.tar.bz2 deleted file mode 100644 index 4f0bf75..0000000 --- a/util-linux-2.21.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:066f9d8e51bfabd809d266edcd54eefba1cdca57725b95c074fd47fe6fba3d30 -size 4858985 diff --git a/util-linux-2.23.1-eject-fpie.patch b/util-linux-2.23.1-eject-fpie.patch new file mode 100644 index 0000000..f997932 --- /dev/null +++ b/util-linux-2.23.1-eject-fpie.patch @@ -0,0 +1,13 @@ +--- util-linux-2.23.1/sys-utils/Makemodule.am ++++ util-linux-2.23.1/sys-utils/Makemodule.am 2013-06-05 12:55:10.921439066 +0000 +@@ -142,8 +142,8 @@ endif # LINUX + if BUILD_EJECT + usrbin_exec_PROGRAMS += eject + eject_SOURCES = sys-utils/eject.c +-eject_LDADD = $(LDADD) libmount.la libcommon.la +-eject_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) ++eject_LDADD = $(SUID_LDFLAGS) $(LDADD) libmount.la libcommon.la ++eject_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -I$(ul_libmount_incdir) + dist_man_MANS += sys-utils/eject.1 + endif + diff --git a/util-linux-2.23.1-fdisk_remove_bogus_warnings.patch b/util-linux-2.23.1-fdisk_remove_bogus_warnings.patch new file mode 100644 index 0000000..175720e --- /dev/null +++ b/util-linux-2.23.1-fdisk_remove_bogus_warnings.patch @@ -0,0 +1,20 @@ +--- util-linux-2.23.1/fdisks/fdiskdoslabel.c ++++ util-linux-2.23.1/fdisks/fdiskdoslabel.c 2013-06-05 10:11:14.121939007 +0000 +@@ -817,7 +817,7 @@ static void check_consistency(struct fdi + + /* compute logical ending (c, h, s) */ + long2chs(cxt, get_start_sect(p) + get_nr_sects(p) - 1, &lec, &leh, &les); +- ++#if 0 + /* Same physical / logical beginning? */ + if (cxt->geom.cylinders <= 1024 && (pbc != lbc || pbh != lbh || pbs != lbs)) { + printf(_("Partition %zd has different physical/logical " +@@ -833,7 +833,7 @@ static void check_consistency(struct fdi + printf(_(" phys=(%d, %d, %d) "), pec, peh, pes); + printf(_("logical=(%d, %d, %d)\n"),lec, leh, les); + } +- ++#endif + /* Ending on cylinder boundary? */ + if (peh != (cxt->geom.heads - 1) || pes != cxt->geom.sectors) { + printf(_("Partition %zd does not end on cylinder boundary.\n"), diff --git a/util-linux-2.23.1-noenc-suse.diff b/util-linux-2.23.1-noenc-suse.diff new file mode 100644 index 0000000..b2a1a66 --- /dev/null +++ b/util-linux-2.23.1-noenc-suse.diff @@ -0,0 +1,12 @@ +--- util-linux-2.23.1/libmount/src/context_loopdev.c ++++ util-linux-2.23.1/libmount/src/context_loopdev.c 2013-06-05 09:44:37.081939564 +0000 +@@ -213,6 +213,9 @@ int mnt_context_setup_loopdev(struct lib + if (rc == 0 && (cxt->user_mountflags & MNT_MS_ENCRYPTION) && + mnt_optstr_get_option(optstr, "encryption", &val, &len) == 0) { + DBG(CXT, mnt_debug_h(cxt, "encryption no longer supported")); ++ // XXX: nasty for the lib but there's on better way to give a hint atm ++ fprintf(stderr, "mount: encryption no longer supported.\n" ++ " Please use /etc/crypttab instead (man 5 crypttab)\n"); + rc = -MNT_ERR_MOUNTOPT; + } + diff --git a/util-linux-2.23.1.tar.bz2 b/util-linux-2.23.1.tar.bz2 new file mode 100644 index 0000000..8f556e5 --- /dev/null +++ b/util-linux-2.23.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad4a7831d7b27d0172996fd343e809716c2403b32a94e15194d8ea797223c4af +size 5539830 diff --git a/util-linux-rpmlintrc b/util-linux-rpmlintrc index 81be4db..9f6d408 100644 --- a/util-linux-rpmlintrc +++ b/util-linux-rpmlintrc @@ -4,4 +4,10 @@ addFilter("incoherent-init-script-name raw") addFilter("no-reload-entry /etc/init.d/raw") # There is no egrep(1) used -> False positive addFilter("deprecated-grep") - +# Both pam configs for su and su-l are marked as noreplace +addFilter(".*W:.*files-duplicate.*/pam/su.*/pam.d/su-l.*") +# Useless warning as the /usr/bin variants are known +addFilter(".*W:.*permissions-symlink.*/bin/su.*") +addFilter(".*W:.*permissions-symlink.*/bin/umount.*") +addFilter(".*W:.*permissions-symlink.*/bin/mount.*") + diff --git a/util-linux.changes b/util-linux.changes index be90508..99b0231 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,75 @@ +------------------------------------------------------------------- +Fri Jun 7 00:13:25 UTC 2013 - mail@bernhard-voelker.de + +- util-linux.spec: work around su(1) PAM problems based on su(1) + being provided by both the coreutils and the util-linux package. + Fix macro typo in %post and %verifyscript sections related to su(1): + s/sysvinit_tools/enable_su/ + +------------------------------------------------------------------- +Thu Jun 6 08:27:43 UTC 2013 - werner@suse.de + +- Add make-sure-sbin-resp-usr-sbin-are-in-PATH.diff, that is include + the old "let `su' handle /sbin and /usr/sbin in path" +- Provide the new eject utility to avoid file conflict with old + eject package + +------------------------------------------------------------------- +Wed Jun 5 12:30:45 UTC 2013 - werner@suse.de + +- Update to util-linux-2.23.1 + + Release highlights (2.22) + su(1): + * has been merged from coreutils into util-linux + * utils-linux version uses /etc/pam.d/su-l PAM config file for --login + (e.g. "su -") session. + sulogin(8): + * has been merged from sysvinit into util-linux + utmpdump(1): + * has been merged from sysvinit into util-linux + eject(1): + * has been merged from inactive upstream from sf.net and Fedora into util-linux + * supports new options --manualeject, --force and --no-partitions-unmount + lslocks(1) + * this NEW COMMAND prints local system locks and it's replacement to very + long time unmaintained lslk(1) + wdctl(8): + * this NEW COMMAND shows hardware watchdog status + libuuid: + * does NOT EXECUTE uuidd on demand, the daemon has to be started by + init scripts / systemd + uuidd: + * supports socket activation (for systemd) + * supports new options -no-fork, --no-pid and --socket-activation + + Release highlights (2.23) + blkdiscard(8): + * this NEW COMMAND discard sectors on a device (for example on SSD disks) + sulogin(8): + * provides multi-console feature from SysVinit +- Removed following patches now upstream + * 0001-Test-for-secure_getenv-too.patch + * 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch + * add-canonicalize_path_restricted.patch + * fdiskbsdlabel.patch + * libmount-add-MNT_ERR_LOOPDEV.patch + * libmount-add-special-MNT_ERR-codes.patch + * libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch + * login-close-tty-before-vhangup.patch + * mount-new-add-loopdev-specific-error-message.patch + * mount-new-allow-sloppy-for-non-root.patch + * mount-new-improve-error-messages.patch + * mount-new-use-MNT_ERR-for-error-messages.patch + * mount-sanitize-paths-from-non-root-users.patch + * util-linux-2.21.2-noenc.diff + * umount-sanitize-paths-from-non-root-users.patch +- Removed following patch which otherwise cause to break build + * util-linux-2.20-libmount-deps.patch +- Refreshed following patches with updating version string + * util-linux-2.23.1-fdisk_remove_bogus_warnings.patch + * util-linux-2.23.1-noenc-suse.diff +- Add util-linux-2.23.1-eject-fpie.patch to compile and link eject + with PIE + ------------------------------------------------------------------- Wed May 29 11:45:04 UTC 2013 - ihno@suse.com diff --git a/util-linux.spec b/util-linux.spec index 38e95ce..89ed4f4 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -16,6 +16,26 @@ # +# +# Following package should be fixed: +# coreutils ... do not install su and kill +# sysvinit-tools ... do not install sulogin and utmpdump +# eject ... simply drop this package +# +%bcond_without sysvinit_tools +%bcond_without enable_su +%bcond_without enable_eject + +# === MOVING SU TRICKERY (0/3) START === +# Work around su(1) PAM problems based on su(1) being provided by both the +# coreutils and the util-linux package. In the case the former is installed +# first, the latter will save the config files as ".rpmnew". When the new +# su(1)-less coreutils package is then installed, the `trickery (tm)` symlinks +# of the config files would then remain as dangling. +# This "MOVING SU TRICKERY" consists of 3 parts: 1/3, 2/3 and 3/3. +# This hack can go away when the new su-less coreutils package is out. +# === MOVING SU TRICKERY (0/3) END === + Name: util-linux BuildRequires: audit-devel BuildRequires: binutils-devel @@ -28,8 +48,10 @@ BuildRequires: ncurses-devel BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel +BuildRequires: utempter-devel BuildRequires: zlib-devel -Version: 2.21.2 +BuildRequires: pkgconfig(systemd) +Version: 2.23.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -37,7 +59,7 @@ Release: 0 # make the rpm install check of uuidd happy which has support to work without # these tools as well #!BuildIgnore: pwdutils -Url: http://kernel.org/~kzak/util-linux/ +Url: https://www.kernel.org/pub/linux/utils/util-linux/ Supplements: filesystem(minix) Provides: fsck-with-dev-lock = %{version} # bnc#651598: @@ -58,9 +80,11 @@ Source6: etc_filesystems Source7: baselibs.conf Source8: login.pamd Source9: remote.pamd +Source10: su.pamd +Source11: su.default # TODO: split to separate package -Source11: klogconsole.tar.bz2 -# XXX: needed? +Source40: klogconsole.tar.bz2 +# XXX: Run a program in a new session and with controlling tty Source22: setctsid.c Source23: setctsid.8 # XXX: ppc specific, still needed? @@ -76,40 +100,18 @@ Source51: blkid.conf ## util-linux patches ## # 241372 - remove legacy warnings from fdisk -Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch -Patch2: util-linux-2.20-libmount-deps.patch +Patch1: util-linux-2.23.1-fdisk_remove_bogus_warnings.patch +Patch2: util-linux-2.23.1-eject-fpie.patch Patch3: fdisk-tinfo.patch -Patch4: mount-new-allow-sloppy-for-non-root.patch -Patch5: libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch - -# Patches 6-10: bcn#767208 (taken from upstream -Patch6: mount-new-improve-error-messages.patch -Patch7: libmount-add-special-MNT_ERR-codes.patch -Patch8: mount-new-use-MNT_ERR-for-error-messages.patch -Patch9: libmount-add-MNT_ERR_LOOPDEV.patch -Patch10: mount-new-add-loopdev-specific-error-message.patch +# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path +Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # disable encryption -Patch11: util-linux-2.21.2-noenc.diff -Patch12: util-linux-2.21.2-noenc-suse.diff - -Patch13: login-close-tty-before-vhangup.patch +Patch12: util-linux-2.23.1-noenc-suse.diff # hack for boot.localfs Patch20: util-linux-HACK-boot.localfs.diff -Patch21: 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch - -#bnc#797002 -Patch22: add-canonicalize_path_restricted.patch -Patch23: mount-sanitize-paths-from-non-root-users.patch -Patch24: umount-sanitize-paths-from-non-root-users.patch -##### -# There is no __secure_getenv anymore.. -Patch25: 0001-Test-for-secure_getenv-too.patch - -# fix fdisk compilation on aarch64 -Patch26: fdiskbsdlabel.patch ## ## klogconsole ## @@ -124,12 +126,14 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed # Provides: base = %{version}-%{release} +Provides: eject = %{version}-%{release} Provides: login = 4.0-33.7 Provides: raw = %{version}-%{release} Provides: rawio = %{version}-%{release} Provides: util = %{version}-%{release} Provides: uuid-runtime = %{version}-%{release} Obsoletes: base < %{version}-%{release} +Obsoletes: eject < %{version}-%{release} Obsoletes: login < 4.0-33.7 Obsoletes: raw < %{version}-%{release} Obsoletes: rawio < %{version}-%{release} @@ -211,52 +215,47 @@ Files to develop applications using the libmount library. %lang_package %prep -%setup -q -n %{name}-%{version} -b 11 +%setup -q -n %{name}-%{version} -b 40 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 %patch12 -p1 -%patch13 -p1 # %patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 -%patch24 -p1 -%patch25 -p1 -%patch26 -p1 # # setctsid -cp %{S:22} %{S:23} . +cp -p %{S:22} %{S:23} . # nologin -cp %{S:2} %{S:3} %{S:26} %{S:30} . +cp -p %{S:2} %{S:3} %{S:26} %{S:30} . %patch60 -p1 %patch61 -p1 -cd ../klogconsole +pushd ../klogconsole %patch55 -p1 %patch56 -p1 +popd %build -pushd ../ +pushd ../klogconsole # klogconsole build -cd klogconsole make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" -cd .. popd # setctsid build rm -f setctsid make %{?_smp_mflags} setctsid CFLAGS="%{optflags}" CC="%{__cc}" # +# Version check for libutempter +# +uhead=$(find %_includedir -name utempter.h 2>/dev/null) +if test -n "$uhead" && grep -q utempter_add_record "$uhead" +then + uhead=--with-utempter +else + uhead=--without-utempter +fi +# # util-linux itself # autoreconf -fi @@ -264,16 +263,41 @@ export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" %configure \ --with-audit \ + --with-gnu-ld \ + --with-ncurses \ --with-selinux \ + $uhead \ + --with-systemdsystemunitdir=%_unitdir \ + --with-bashcompletiondir=%{_datadir}/bash-completion \ --enable-mesg \ --enable-partx \ --enable-raw \ --enable-write \ --enable-line \ --enable-new-mount \ - --enable-ddate \ --enable-login-utils \ + --enable-tunelp \ + --enable-logger \ +%if %{with enable_eject} + --enable-eject \ +%else + --disable-eject \ +%endif +%if %{with sysvinit_tools} + --enable-sulogin \ + --enable-sulogin-emergency-mount \ + --enable-mountpoint \ +%else + --disable-sulogin \ --disable-mountpoint \ +%endif +%if %{with enable_su} + --enable-kill \ + --enable-su \ +%else + --disable-su \ + --disable-kill \ +%endif --disable-use-tty-group \ --disable-static \ --disable-silent-rules \ @@ -286,17 +310,28 @@ make %{?_smp_mflags} %{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31} %install -mkdir -p %{buildroot}{/etc/init.d,/etc/pam.d,%{_mandir}/man{1,8},/bin,/sbin,/usr/bin,/usr/sbin,%{_infodir}} +mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid/ mkdir -p %{buildroot}%{_localstatedir}/run/uuidd/ install -m 744 %{SOURCE50} %{buildroot}%{_initddir}/uuidd install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf -install -m 644 %{SOURCE8} %{buildroot}/etc/pam.d/login -install -m 644 %{SOURCE9} %{buildroot}/etc/pam.d/remote +install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login +install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote +%if %{with enable_su} +install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su +install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l +install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su +# === MOVING SU TRICKERY (1/3) START === +# Install a copy of the su(1) config files with .ul suffix. +# This hack can go away when the new su-less coreutils package is out. +install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su.ul +install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l.ul +install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su.ul +# === MOVING SU TRICKERY (1/3) END === +%endif mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates -pushd .. +pushd ../klogconsole # klogconsole install -cd klogconsole make install DEST=%{buildroot} popd # @@ -304,6 +339,10 @@ popd # %make_install #UsrMerge +%if %{with enable_su} +ln -s %{_bindir}/kill %{buildroot}/bin +ln -s %{_bindir}/su %{buildroot}/bin +%endif ln -s %{_bindir}/logger %{buildroot}/bin ln -s %{_bindir}/dmesg %{buildroot}/bin ln -s %{_bindir}/more %{buildroot}/bin @@ -360,9 +399,9 @@ install -m 444 setctsid.8 %{buildroot}%{_mandir}/man8/ echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir}/flushb chmod 755 %{buildroot}%{_sbindir}/flushb # Install scripts to configure raw devices at boot time -install -m 644 $RPM_SOURCE_DIR/etc.raw %{buildroot}%{_sysconfdir}/raw +install -m 644 $RPM_SOURCE_DIR%{_sysconfdir}.raw %{buildroot}%{_sysconfdir}/raw install -m 755 $RPM_SOURCE_DIR/raw.init %{buildroot}%{_initddir}/raw -ln -sf ../../etc/init.d/raw %{buildroot}%{_sbindir}/rcraw +ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw # Stupid hack so we don't have a tcsh dependency chmod 644 %{buildroot}%{_datadir}/getopt/getopt*.tcsh # Following files we don't want to package, so remove them @@ -435,7 +474,13 @@ ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd %if 0%{?suse_version} <= 1130 %run_permissions %else -%set_permissions /usr/bin/wall /usr/bin/write /usr/bin/mount /usr/bin/umount +%set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount +%if %{with enable_su} +%set_permissions %{_bindir}/su +%endif +%if %{with enable_eject} +%set_permissions %{_bindir}/eject +%endif %endif # mount option 'code=' is now called 'codepage=' so change fstab @@ -443,12 +488,35 @@ if [ -f etc/fstab ]; then sed -i 's:code=:codepage=:' etc/fstab fi +%posttrans +%if "%{with enable_su}" +# === MOVING SU TRICKERY (2/3) START === +# If su(1)'s PAM config files are symbolic links, then they have been installed +# by the coreutils package (because su-enabled coreutils has been installed +# before util-linux). Remove the symlinks and install a copy of our .ul files +# in their correct places. +# This hack can go away when the new su-less coreutils package is out. +for f in pam.d/su pam.d/su-l default/su ; do + if [ -L %{_sysconfdir}/$f -a -e %{_sysconfdir}/$f.ul ]; then + rm -v %{_sysconfdir}/$f + cp -av %{_sysconfdir}/$f.ul %{_sysconfdir}/$f + fi +done +# === MOVING SU TRICKERY (2/3) END === +%endif + %postun %install_info_delete --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %{insserv_cleanup} %verifyscript -%verify_permissions -e /usr/bin/wall -e /usr/bin/write -e /usr/bin/mount -e /usr/bin/umount +%verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount +%if %{with enable_su} +%verify_permissions -e %{_bindir}/su +%endif +%if %{with enable_eject} +%verify_permissions -e %{_bindir}/eject +%endif %post -n libblkid1 -p /sbin/ldconfig @@ -459,8 +527,8 @@ fi %postun -n libmount1 -p /sbin/ldconfig %pre -n uuidd -/usr/sbin/groupadd -r uuidd 2>/dev/null || : -/usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ +%{_sbindir}/groupadd -r uuidd 2>/dev/null || : +%{_sbindir}/useradd -r -g uuidd -c "User for uuidd" \ -d /var/run/uuidd uuidd 2>/dev/null || : %preun -n uuidd @@ -471,7 +539,7 @@ fi %if 0%{?suse_version} <= 1130 %run_permissions %else -%set_permissions /usr/sbin/uuidd +%set_permissions %{_sbindir}/uuidd %endif %postun -n uuidd @@ -483,7 +551,7 @@ fi %postun -n libuuid1 -p /sbin/ldconfig %verifyscript -n uuidd -%verify_permissions -e /usr/sbin/uuidd +%verify_permissions -e %{_sbindir}/uuidd %files lang -f %{name}.lang @@ -495,7 +563,6 @@ fi %doc Documentation/cal.txt %doc Documentation/cfdisk.txt %doc Documentation/col.txt -%doc Documentation/ddate.txt %doc Documentation/deprecated.txt %doc Documentation/fdisk.txt %doc Documentation/getopt.txt @@ -509,9 +576,25 @@ fi %config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw %config(noreplace) %{_sysconfdir}/filesystems %config(noreplace) %{_sysconfdir}/blkid.conf -%config(noreplace) /etc/pam.d/login -%config(noreplace) /etc/pam.d/remote +%config(noreplace) %{_sysconfdir}/pam.d/login +%config(noreplace) %{_sysconfdir}/pam.d/remote +%if %{with enable_su} +%config(noreplace) %{_sysconfdir}/pam.d/su +%config(noreplace) %{_sysconfdir}/pam.d/su-l +%config(noreplace) %{_sysconfdir}/default/su +# === MOVING SU TRICKERY (3/3) START === +# Package su(1) config files with .ul suffix needed in posttrans above. +# This hack can go away when the new su-less coreutils package is out. +%config %{_sysconfdir}/pam.d/su.ul +%config %{_sysconfdir}/pam.d/su-l.ul +%config %{_sysconfdir}/default/su.ul +# === MOVING SU TRICKERY (3/3) END === +%endif #UsrMerge +%if %{with enable_su} +/bin/kill +/bin/su +%endif /bin/dmesg /bin/more /bin/mount @@ -546,13 +629,19 @@ fi /sbin/fstrim /sbin/chcpu #EndUsrMerge +%if %{with enable_su} +%{_bindir}/kill +%{_bindir}/su +%endif +%if %{with enable_eject} +%verify(not mode) %attr(4750,root,audio) %{_bindir}/eject +%endif %{_bindir}/cal %{_bindir}/chrt %{_bindir}/col %{_bindir}/colcrt %{_bindir}/colrm %{_bindir}/column -%{_bindir}/ddate %{_bindir}/dmesg %{_bindir}/fallocate %{_bindir}/findmnt @@ -569,11 +658,13 @@ fi %{_bindir}/look %{_bindir}/lsblk %{_bindir}/lscpu +%{_bindir}/lslocks %{_bindir}/mcookie %{_bindir}/mesg %{_bindir}/more %{_bindir}/mount %{_bindir}/namei +%{_bindir}/nsenter %{_bindir}/prlimit %{_bindir}/rename %{_bindir}/renice @@ -587,14 +678,20 @@ fi %{_bindir}/ul %{_bindir}/umount %{_bindir}/unshare +%if %{with sysvinit_tools} +%{_bindir}/mountpoint +%{_bindir}/utmpdump +%endif %{_bindir}/uuidgen %ifnarch ppc ppc64 %{_bindir}/chrp-addnote %{_bindir}/mkzimage_cmdline %endif +%{_bindir}/wdctl %{_sbindir}/addpart %{_sbindir}/agetty %{_sbindir}/blkid +%{_sbindir}/blkdiscard %{_sbindir}/blockdev %{_sbindir}/chcpu %{_sbindir}/ctrlaltdel @@ -617,8 +714,13 @@ fi %{_sbindir}/pivot_root %{_sbindir}/raw %{_sbindir}/rcraw +%{_sbindir}/resizepart %{_sbindir}/rtcwake +%{_sbindir}/runuser %{_sbindir}/setctsid +%if %{with sysvinit_tools} +%{_sbindir}/sulogin +%endif %{_sbindir}/swaplabel %{_sbindir}/swapoff %{_sbindir}/swapon @@ -627,14 +729,20 @@ fi %verify(not mode) %attr(0755,root,tty) %{_bindir}/wall %{_bindir}/whereis %verify(not mode) %attr(0755,root,tty) %{_bindir}/write +%if %{with enable_su} +%{_mandir}/man1/kill.1.gz +%{_mandir}/man1/su.1.gz +%endif %{_mandir}/man1/cal.1.gz %{_mandir}/man1/chrt.1.gz %{_mandir}/man1/col.1.gz %{_mandir}/man1/colcrt.1.gz %{_mandir}/man1/colrm.1.gz %{_mandir}/man1/column.1.gz -%{_mandir}/man1/ddate.1.gz %{_mandir}/man1/dmesg.1.gz +%if %{with enable_eject} +%{_mandir}/man1/eject.1.gz +%endif %{_mandir}/man1/fallocate.1.gz %{_mandir}/man1/flock.1.gz %{_mandir}/man1/getopt.1.gz @@ -650,6 +758,7 @@ fi %{_mandir}/man1/mesg.1.gz %{_mandir}/man1/more.1.gz %{_mandir}/man1/namei.1.gz +%{_mandir}/man1/nsenter.1.gz %{_mandir}/man1/ionice.1.gz %{_mandir}/man1/prlimit.1.gz %{_mandir}/man1/rename.1.gz @@ -667,6 +776,11 @@ fi %{_mandir}/man1/whereis.1.gz %{_mandir}/man1/write.1.gz %{_mandir}/man1/ipcmk.1.gz +%if %{with sysvinit_tools} +%{_mandir}/man1/mountpoint.1.gz +%{_mandir}/man1/utmpdump.1.gz +%endif +%{_mandir}/man1/runuser.1.gz %{_mandir}/man1/uuidgen.1.gz %{_mandir}/man5/fstab.5.gz %{_mandir}/man8/addpart.8.gz @@ -675,16 +789,20 @@ fi %{_mandir}/man8/delpart.8.gz %{_mandir}/man8/ctrlaltdel.8.gz %{_mandir}/man8/blkid.8.gz +%{_mandir}/man8/blkdiscard.8.gz %{_mandir}/man8/switch_root.8.gz %{_mandir}/man8/mkfs.bfs.8.gz %{_mandir}/man8/mkfs.minix.8.gz %{_mandir}/man8/findfs.8.gz %{_mandir}/man8/fsck.8.gz +%{_mandir}/man8/fsck.cramfs.8.gz %{_mandir}/man8/fsck.minix.8.gz %{_mandir}/man8/isosize.8.gz %{_mandir}/man8/ldattach.8.gz %{_mandir}/man8/losetup.8.gz +%{_mandir}/man8/lslocks.8.gz %{_mandir}/man8/mkfs.8.gz +%{_mandir}/man8/mkfs.cramfs.8.gz %{_mandir}/man8/mkswap.8.gz %{_mandir}/man8/mount.8.gz %{_mandir}/man8/nologin.8.gz @@ -708,12 +826,17 @@ fi %{_mandir}/man8/wipefs.8.gz %{_mandir}/man8/fstrim.8.gz %{_mandir}/man8/lsblk.8.gz -%{_mandir}/ru +%{_mandir}/man8/resizepart.8.gz +%if %{with sysvinit_tools} +%{_mandir}/man8/sulogin.8.gz +%endif +%{_mandir}/man8/wdctl.8.gz %{_sbindir}/flushb %{_sbindir}/readprofile %dir %{_datadir}/getopt %attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh +%{_datadir}/bash-completion/* %ifnarch ia64 #XXX: post our patches upstream #XXX: call fdupes on /usr/share/man @@ -784,6 +907,8 @@ fi %{_initddir}/uuidd %{_mandir}/man8/uuidd.8.gz %{_sbindir}/rcuuidd +%{_unitdir}/uuidd.service +%{_unitdir}/uuidd.socket %files -n libuuid1 %defattr(-, root, root) From b4989627ed383ed6a3767a554ad6c4e06ce31e3c9ae46f906e635e94c9e47d67 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 14 Jun 2013 14:48:20 +0000 Subject: [PATCH 154/211] Accepting request 178855 from Base:System - util-linux.spec: remove previously added "moving-su-trickery" again as a su-less coreutils packet is in Base:Build and Factory now. (forwarded request 178821 from bernhard-voelker) OBS-URL: https://build.opensuse.org/request/show/178855 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=161 --- util-linux.changes | 6 ++++++ util-linux.spec | 41 ----------------------------------------- 2 files changed, 6 insertions(+), 41 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index 99b0231..28a6635 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 12 21:02:28 UTC 2013 - mail@bernhard-voelker.de + +- util-linux.spec: remove previously added "moving-su-trickery" again + as a su-less coreutils packet is in Base:Build and Factory now. + ------------------------------------------------------------------- Fri Jun 7 00:13:25 UTC 2013 - mail@bernhard-voelker.de diff --git a/util-linux.spec b/util-linux.spec index 89ed4f4..2870a39 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -26,16 +26,6 @@ %bcond_without enable_su %bcond_without enable_eject -# === MOVING SU TRICKERY (0/3) START === -# Work around su(1) PAM problems based on su(1) being provided by both the -# coreutils and the util-linux package. In the case the former is installed -# first, the latter will save the config files as ".rpmnew". When the new -# su(1)-less coreutils package is then installed, the `trickery (tm)` symlinks -# of the config files would then remain as dangling. -# This "MOVING SU TRICKERY" consists of 3 parts: 1/3, 2/3 and 3/3. -# This hack can go away when the new su-less coreutils package is out. -# === MOVING SU TRICKERY (0/3) END === - Name: util-linux BuildRequires: audit-devel BuildRequires: binutils-devel @@ -321,13 +311,6 @@ install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su -# === MOVING SU TRICKERY (1/3) START === -# Install a copy of the su(1) config files with .ul suffix. -# This hack can go away when the new su-less coreutils package is out. -install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su.ul -install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l.ul -install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su.ul -# === MOVING SU TRICKERY (1/3) END === %endif mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates pushd ../klogconsole @@ -488,23 +471,6 @@ if [ -f etc/fstab ]; then sed -i 's:code=:codepage=:' etc/fstab fi -%posttrans -%if "%{with enable_su}" -# === MOVING SU TRICKERY (2/3) START === -# If su(1)'s PAM config files are symbolic links, then they have been installed -# by the coreutils package (because su-enabled coreutils has been installed -# before util-linux). Remove the symlinks and install a copy of our .ul files -# in their correct places. -# This hack can go away when the new su-less coreutils package is out. -for f in pam.d/su pam.d/su-l default/su ; do - if [ -L %{_sysconfdir}/$f -a -e %{_sysconfdir}/$f.ul ]; then - rm -v %{_sysconfdir}/$f - cp -av %{_sysconfdir}/$f.ul %{_sysconfdir}/$f - fi -done -# === MOVING SU TRICKERY (2/3) END === -%endif - %postun %install_info_delete --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %{insserv_cleanup} @@ -582,13 +548,6 @@ done %config(noreplace) %{_sysconfdir}/pam.d/su %config(noreplace) %{_sysconfdir}/pam.d/su-l %config(noreplace) %{_sysconfdir}/default/su -# === MOVING SU TRICKERY (3/3) START === -# Package su(1) config files with .ul suffix needed in posttrans above. -# This hack can go away when the new su-less coreutils package is out. -%config %{_sysconfdir}/pam.d/su.ul -%config %{_sysconfdir}/pam.d/su-l.ul -%config %{_sysconfdir}/default/su.ul -# === MOVING SU TRICKERY (3/3) END === %endif #UsrMerge %if %{with enable_su} From 962b426e1bb98fce9590d35baef699a6cea3acd45dad4a13544cb65349467cf0 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 25 Jun 2013 04:56:52 +0000 Subject: [PATCH 155/211] Accepting request 180243 from Base:System - rely on systemd-rpm-macros instead of the full thing OBS-URL: https://build.opensuse.org/request/show/180243 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=162 --- util-linux.changes | 5 +++++ util-linux.spec | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index 28a6635..fe6c6cb 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 19 10:58:17 UTC 2013 - coolo@suse.com + +- rely on systemd-rpm-macros instead of the full thing + ------------------------------------------------------------------- Wed Jun 12 21:02:28 UTC 2013 - mail@bernhard-voelker.de diff --git a/util-linux.spec b/util-linux.spec index 2870a39..ca119b0 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -38,9 +38,9 @@ BuildRequires: ncurses-devel BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel +BuildRequires: systemd-rpm-macros BuildRequires: utempter-devel BuildRequires: zlib-devel -BuildRequires: pkgconfig(systemd) Version: 2.23.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls @@ -795,7 +795,7 @@ fi %dir %{_datadir}/getopt %attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh -%{_datadir}/bash-completion/* +%{_datadir}/bash-completion %ifnarch ia64 #XXX: post our patches upstream #XXX: call fdupes on /usr/share/man From 737a0b0c2e1b422e955ce852a9e25de856c64ff806b7dd99560c533af6d71581 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 2 Jul 2013 10:30:09 +0000 Subject: [PATCH 156/211] Accepting request 181637 from Base:System Correct condition for Conflicts of sysvinit-tools. (forwarded request 181632 from bernhard-voelker) OBS-URL: https://build.opensuse.org/request/show/181637 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=163 --- ...-check-host_status-and-driver_status.patch | 77 +++++++++++++++++++ util-linux.changes | 23 ++++++ util-linux.spec | 42 +++++----- 3 files changed, 122 insertions(+), 20 deletions(-) create mode 100644 eject-scsi-check-host_status-and-driver_status.patch diff --git a/eject-scsi-check-host_status-and-driver_status.patch b/eject-scsi-check-host_status-and-driver_status.patch new file mode 100644 index 0000000..6347102 --- /dev/null +++ b/eject-scsi-check-host_status-and-driver_status.patch @@ -0,0 +1,77 @@ +From 90a0e97c7be9da39fd54600228e006b98667ad56 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 18 Jun 2013 12:24:28 +0200 +Subject: [PATCH 1/2] eject: Check host_status and driver_status when using + SG_IO. + +Based on Suse patch, originally from + Anna Bernathova , May 2008 + + SG_IO completion status is weird but still well defined. You'll need + to check both host_status, driver_status and status to determine that + a command actually succeeded. -- Tejun Heo, May 2008 + +Note that we also need to check driver_status and sense_buffer to +detect situation when there is no medium. It's valid request to call +eject(8) for device with no medium. + +References: https://bugzilla.novell.com/show_bug.cgi?id=358033 +Signed-off-by: Anna Bernathova +Signed-off-by: Karel Zak +--- + sys-utils/eject.c | 24 +++++++++++++++++++++--- + 1 file changed, 21 insertions(+), 3 deletions(-) + +diff --git a/sys-utils/eject.c b/sys-utils/eject.c +index 4ec69e7..f98f227 100644 +--- a/sys-utils/eject.c ++++ b/sys-utils/eject.c +@@ -53,6 +53,14 @@ + #include "pathnames.h" + #include "sysfs.h" + ++/* ++ * sg_io_hdr_t driver_status -- see kernel include/scsi/scsi.h ++ */ ++#ifndef DRIVER_SENSE ++# define DRIVER_SENSE 0x08 ++#endif ++ ++ + #define EJECT_DEFAULT_DEVICE "/dev/cdrom" + + +@@ -604,17 +612,27 @@ static int eject_scsi(int fd) + + io_hdr.cmdp = allowRmBlk; + status = ioctl(fd, SG_IO, (void *)&io_hdr); +- if (status < 0) ++ if (status < 0 || io_hdr.host_status || io_hdr.driver_status) + return 0; + + io_hdr.cmdp = startStop1Blk; + status = ioctl(fd, SG_IO, (void *)&io_hdr); +- if (status < 0) ++ if (status < 0 || io_hdr.host_status) ++ return 0; ++ ++ /* Ignore errors when there is not medium -- in this case driver sense ++ * buffer sets MEDIUM NOT PRESENT (3a) bit. For more details see: ++ * http://www.tldp.org/HOWTO/archived/SCSI-Programming-HOWTO/SCSI-Programming-HOWTO-22.html#sec-sensecodes ++ * -- kzak Jun 2013 ++ */ ++ if (io_hdr.driver_status != 0 && ++ !(io_hdr.driver_status == DRIVER_SENSE && io_hdr.sbp && ++ io_hdr.sbp[12] == 0x3a)) + return 0; + + io_hdr.cmdp = startStop2Blk; + status = ioctl(fd, SG_IO, (void *)&io_hdr); +- if (status < 0) ++ if (status < 0 || io_hdr.host_status || io_hdr.driver_status) + return 0; + + /* force kernel to reread partition table when new disc inserted */ +-- +1.8.1.4 + diff --git a/util-linux.changes b/util-linux.changes index fe6c6cb..b0154a4 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +Mon Jul 1 13:43:23 UTC 2013 - mail@bernhard-voelker.de + +- Correct condition for Conflicts of sysvinit-tools. + +------------------------------------------------------------------- +Mon Jul 1 07:08:46 UTC 2013 - werner@suse.de + +- Correct version in source URL path. + +------------------------------------------------------------------- +Fri Jun 28 17:42:14 CEST 2013 - sbrabec@suse.cz + +- Fix Provides and Obsoletes of eject. +- Conflict with old coreutils and sysvinit-tools with conflicting + files to guarantee seamless upgrade. +- Remove Provides and Obsoletes of packages that do not exist since + SuSE Linux 8. +- Include upstreamed patch from SUSE eject package: + Check eject host_status and driver_status when using SG_IO + (eject-scsi-check-host_status-and-driver_status.patch, + bnc#358033). + ------------------------------------------------------------------- Wed Jun 19 10:58:17 UTC 2013 - coolo@suse.com diff --git a/util-linux.spec b/util-linux.spec index ca119b0..bfb2abf 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -16,12 +16,6 @@ # -# -# Following package should be fixed: -# coreutils ... do not install su and kill -# sysvinit-tools ... do not install sulogin and utmpdump -# eject ... simply drop this package -# %bcond_without sysvinit_tools %bcond_without enable_su %bcond_without enable_eject @@ -59,7 +53,7 @@ Recommends: %{name}-lang = %{version} Summary: A collection of basic system utilities License: GPL-2.0+ Group: System/Base -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.21/%{name}-%{version}.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/%{name}-%{version}.tar.bz2 Source1: util-linux-rpmlintrc # XXX: make nologin part of util-linux upstream Source2: nologin.c @@ -95,7 +89,8 @@ Patch2: util-linux-2.23.1-eject-fpie.patch Patch3: fdisk-tinfo.patch # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff - +# PATCH-FIX-UPSTREAM eject-scsi-check-host_status-and-driver_status.patch bnc358033 anicka@suse.cz -- Check eject host_status and driver_status when using SG_IO. +Patch5: eject-scsi-check-host_status-and-driver_status.patch # disable encryption Patch12: util-linux-2.23.1-noenc-suse.diff @@ -115,20 +110,25 @@ Patch61: mkfs.bfs_cleanup_endian.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed # -Provides: base = %{version}-%{release} -Provides: eject = %{version}-%{release} +%if %{with enable_eject} +Provides: eject = 2.1.0-166.8 +%endif Provides: login = 4.0-33.7 -Provides: raw = %{version}-%{release} -Provides: rawio = %{version}-%{release} -Provides: util = %{version}-%{release} -Provides: uuid-runtime = %{version}-%{release} -Obsoletes: base < %{version}-%{release} -Obsoletes: eject < %{version}-%{release} +%if %{with enable_eject} +# File conflict of eject (up to 12.3 and SLE11). +Obsoletes: eject < 2.1.0-166.8 +%endif +# File conflict of login (up to 12.1 and SLE11). Obsoletes: login < 4.0-33.7 -Obsoletes: raw < %{version}-%{release} -Obsoletes: rawio < %{version}-%{release} -Obsoletes: util < %{version}-%{release} -Obsoletes: uuid-runtime < %{version}-%{release} +%if %{with enable_su} +# File conflict of su and kill (up to 12.3 and SLE11). +# It should be coreutils < 8.21-4, but coreutils provide Release-less symbol. +Conflicts: coreutils < 8.21 +%endif +%if %{with sysvinit_tools} +# File conflict of sulogin and utmpdump (up to 12.3 and SLE11). +Conflicts: sysvinit-tools < 2.88+-87 +%endif # # Using "Requires" here would lend itself to help upgrading, but since # util-linux is in the initial bootstrap, that is not a good thing to do: @@ -210,6 +210,7 @@ Files to develop applications using the libmount library. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %patch12 -p1 # %patch20 -p1 @@ -795,6 +796,7 @@ fi %dir %{_datadir}/getopt %attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh +# FIXME: Fix directory ownership. %{_datadir}/bash-completion %ifnarch ia64 #XXX: post our patches upstream From 1c4a8418497a02c5f35ea299668b6cc12f15d2ba30620ce6e98f43caac50aa8c Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 23 Sep 2013 09:16:12 +0000 Subject: [PATCH 157/211] Accepting request 199432 from Base:System - Avoid build require gpg-offline twice - Update to version 2.23.2: nsenter(1): * this NEW COMMAND provides command line interface to setns() Linux syscall and allows to run program with namespaces of other processes unshare(1): * supports new PID and USER namespaces fdisk(8): * provides experimental support for GUID Partition Table (GPT), the implementation is still not complete and some (unimportant) features are missing. * ~50% of fdisk code has been refactored, this task is going to be complete in the next release. The goal is to have libfdisk shared between all fdisks. partx(8): * supports new "update" command (implemented by BLKPG_RESIZE_PARTITION ioctl) mount(8): * supports new userspace mount option x-mount.mkdir[=] to create mountpoints on demand * the support for propagation flags has been improved, now the flags could be specified in /etc/fstab and used together with regular mount options. It's also possible to specify more propagation flags together. This EXPERIMENTAL feature is implemented by additional mount(2) syscalls, because Linux does not allow to use propagation flags with another options or more flags together. umount(8): * supports new command line option --recursive to recursively unmount all sub-mounts for the specified mountpoint * supports new command line option --all-targets to unmount all mountpoints in the current namespace for the specified filesystem * the options --recursive and --all-targets could be used together dmesg(1): * supports new command line options --color, --human and --nopager, the --human option enables relative times, colors and pager support. su(1): * supports new command line options --group and --supp-group to specify primary and supplementary groups chfn(1) and chsh(1): * the commands could be linked with libuser to support non-local accounts modification (e.g. LDAP, etc). kill(1): * the command has been improved to be compatible with procps version, the procps version is deprecated now, the util-linux version is enabled by default. blkdiscard(8): * this NEW COMMAND discard sectors on a device (for example on SSD disks) sulogin(8): * provides multi-console feature from SysVinit findmnt(8): * provides new columns FREQ, PASSNO, ID, OPT-FIELDS, PROPAGATION lslocks(8): * provides new column BLOCKER and detects blocked locks lsblk(8): * supports new command line option --scsi and new columns HCTL, TRANsport VENDOR and REVision swapon(8) and losetup(8): * the commands prints basic overview by default if no option specified column(1): * supports new command line option --output-separator to specify table output delimiter rename(1): * supports new command line option --symlink to rename symlink target hwclock(8): * supports new command line option --compare to periodically compare the Hardware Clock to the System Time (based on adjtimex -c) ipcs(1): * supports new command line options --bytes and --human wipefs(1): * supports new command line option --force to force erase on used devices - Removed upstreamed patches (mkfs.bfs_cleanup_64bit.patch-Patch, mkfs.bfs_cleanup_endian.patch) OBS-URL: https://build.opensuse.org/request/show/199432 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=165 --- mkfs.bfs_cleanup_64bit.patch | 66 -------------------------- mkfs.bfs_cleanup_endian.patch | 76 ------------------------------ util-linux-2.23.1.tar.bz2 | 3 -- util-linux-2.23.2.tar.sign | 17 +++++++ util-linux-2.23.2.tar.xz | 3 ++ util-linux.changes | 89 +++++++++++++++++++++++++++++++++++ util-linux.keyring | 56 ++++++++++++++++++++++ util-linux.spec | 23 +++++---- 8 files changed, 179 insertions(+), 154 deletions(-) delete mode 100644 mkfs.bfs_cleanup_64bit.patch delete mode 100644 mkfs.bfs_cleanup_endian.patch delete mode 100644 util-linux-2.23.1.tar.bz2 create mode 100644 util-linux-2.23.2.tar.sign create mode 100644 util-linux-2.23.2.tar.xz create mode 100644 util-linux.keyring diff --git a/mkfs.bfs_cleanup_64bit.patch b/mkfs.bfs_cleanup_64bit.patch deleted file mode 100644 index 2efb952..0000000 --- a/mkfs.bfs_cleanup_64bit.patch +++ /dev/null @@ -1,66 +0,0 @@ -bla fasel - ---- util-linux-2.21.2.orig/disk-utils/mkfs.bfs.c -+++ util-linux-2.21.2/disk-utils/mkfs.bfs.c -@@ -1,6 +1,7 @@ - /* - * mkfs.bfs - Create SCO BFS filesystem - aeb, 1999-09-07 - * -+ * Usage: mkfs.bfs [-N nr-of-inodes] [-V volume-name] [-F fsname] device - */ - - #include -@@ -27,13 +28,13 @@ - - /* superblock - 512 bytes */ - struct bfssb { -- unsigned int s_magic; -- unsigned int s_start; /* byte offset of start of data */ -- unsigned int s_end; /* sizeof(slice)-1 */ -+ uint32_t s_magic; -+ uint32_t s_start; /* byte offset of start of data */ -+ uint32_t s_end; /* sizeof(slice)-1 */ - - /* for recovery during compaction */ -- int s_from, s_to; /* src and dest block of current transfer */ -- int s_backup_from, s_backup_to; -+ uint32_t s_from, s_to; /* src and dest block of current transfer */ -+ int32_t s_backup_from, s_backup_to; - - /* labels - may well contain garbage */ - char s_fsname[6]; -@@ -43,16 +44,16 @@ - - /* inode - 64 bytes */ - struct bfsi { -- unsigned short i_ino; -+ uint16_t i_ino; - unsigned char i_pad1[2]; -- unsigned long i_first_block; -- unsigned long i_last_block; -- unsigned long i_bytes_to_end; -- unsigned long i_type; /* 1: file, 2: the unique dir */ -- unsigned long i_mode; -- unsigned long i_uid, i_gid; -- unsigned long i_nlinks; -- unsigned long i_atime, i_mtime, i_ctime; -+ uint32_t i_first_block; -+ uint32_t i_last_block; -+ uint32_t i_bytes_to_end; -+ uint32_t i_type; /* 1: file, 2: the unique dir */ -+ uint32_t i_mode; -+ uint32_t i_uid, i_gid; -+ uint32_t i_nlinks; -+ uint32_t i_atime, i_mtime, i_ctime; - unsigned char i_pad2[16]; - }; - -@@ -60,7 +61,7 @@ - - /* directory entry - 16 bytes */ - struct bfsde { -- unsigned short d_ino; -+ uint16_t d_ino; - char d_name[BFS_NAMELEN]; - }; - diff --git a/mkfs.bfs_cleanup_endian.patch b/mkfs.bfs_cleanup_endian.patch deleted file mode 100644 index f27a23a..0000000 --- a/mkfs.bfs_cleanup_endian.patch +++ /dev/null @@ -1,76 +0,0 @@ ---- util-linux-2.21.2/disk-utils/mkfs.bfs.c.old 2013-05-28 19:26:05.000000000 +0200 -+++ util-linux-2.21.2/disk-utils/mkfs.bfs.c 2013-05-28 19:39:28.000000000 +0200 -@@ -98,6 +98,7 @@ - unsigned long long user_specified_total_blocks = 0; - int verbose = 0; - int fd; -+ uint32_t first_block; - struct bfssb sb; - struct bfsi ri; - struct bfsde de; -@@ -224,9 +224,9 @@ - ino_blocks + 33); - - memset(&sb, 0, sizeof(sb)); -- sb.s_magic = BFS_SUPER_MAGIC; -- sb.s_start = ino_bytes + sizeof(struct bfssb); -- sb.s_end = total_blocks * BFS_BLOCKSIZE - 1; -+ sb.s_magic = htole32(BFS_SUPER_MAGIC); -+ sb.s_start = htole32(ino_bytes + sizeof(struct bfssb)); -+ sb.s_end = htole32(total_blocks * BFS_BLOCKSIZE - 1); - sb.s_from = sb.s_to = sb.s_backup_from = sb.s_backup_to = -1; - memcpy(sb.s_fsname, fsname, 6); - memcpy(sb.s_volume, volume, 6); -@@ -244,28 +244,29 @@ - inodes, ino_blocks); - fprintf(stderr, _("Blocks: %lld\n"), total_blocks); - fprintf(stderr, _("Inode end: %d, Data end: %d\n"), -- sb.s_start - 1, sb.s_end); -+ htole32(sb.s_start) - 1, htole32(sb.s_end)); - } - - if (write(fd, &sb, sizeof(sb)) != sizeof(sb)) - err(EXIT_FAILURE, _("error writing superblock")); - - memset(&ri, 0, sizeof(ri)); -- ri.i_ino = BFS_ROOT_INO; -- ri.i_first_block = 1 + ino_blocks; -- ri.i_last_block = ri.i_first_block + -- (inodes * sizeof(de) - 1) / BFS_BLOCKSIZE; -- ri.i_bytes_to_end = ri.i_first_block * BFS_BLOCKSIZE -- + 2 * sizeof(struct bfsde) - 1; -- ri.i_type = BFS_DIR_TYPE; -- ri.i_mode = S_IFDIR | 0755; /* or just 0755 */ -- ri.i_uid = 0; -- ri.i_gid = 1; /* random */ -+ ri.i_ino = htole16(BFS_ROOT_INO); -+ first_block = 1 + ino_blocks; -+ ri.i_first_block = htole32(first_block); -+ ri.i_last_block = htole32(first_block + -+ (inodes * sizeof(de) - 1) / BFS_BLOCKSIZE); -+ ri.i_bytes_to_end = htole32(first_block * BFS_BLOCKSIZE -+ + 2 * sizeof(struct bfsde) - 1); -+ ri.i_type = htole32(BFS_DIR_TYPE); -+ ri.i_mode = htole32(S_IFDIR | 0755); /* or just 0755 */ -+ ri.i_uid = htole32(0); -+ ri.i_gid = htole32(1); /* random */ - ri.i_nlinks = 2; - time(&now); -- ri.i_atime = now; -- ri.i_mtime = now; -- ri.i_ctime = now; -+ ri.i_atime = htole32(now); -+ ri.i_mtime = htole32(now); -+ ri.i_ctime = htole32(now); - - if (write(fd, &ri, sizeof(ri)) != sizeof(ri)) - err(EXIT_FAILURE, _("error writing root inode")); -@@ -279,7 +280,7 @@ - err(EXIT_FAILURE, _("seek error")); - - memset(&de, 0, sizeof(de)); -- de.d_ino = BFS_ROOT_INO; -+ de.d_ino = htole16(BFS_ROOT_INO); - memcpy(de.d_name, ".", 1); - if (write(fd, &de, sizeof(de)) != sizeof(de)) - err(EXIT_FAILURE, _("error writing . entry")); diff --git a/util-linux-2.23.1.tar.bz2 b/util-linux-2.23.1.tar.bz2 deleted file mode 100644 index 8f556e5..0000000 --- a/util-linux-2.23.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ad4a7831d7b27d0172996fd343e809716c2403b32a94e15194d8ea797223c4af -size 5539830 diff --git a/util-linux-2.23.2.tar.sign b/util-linux-2.23.2.tar.sign new file mode 100644 index 0000000..67239b5 --- /dev/null +++ b/util-linux-2.23.2.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.13 (GNU/Linux) + +iQIcBAABAgAGBQJR+QNKAAoJEOS3HV7sOcKEUSUP/i4HacPa4Lpj6Ub7SmdLGnrn +Eakoy/USxaVIPNe600ER31mAPxa6HL/tJJWGN2V5PNakMWpLPjsgFaV5hoOVJqsX +qBGnL7W5OaovZWgEtj9d0aGv1sTzHqX+NfUhr6AkGTNiebwpRicDFBMW86mDp6E4 +H/jlhv2LVvkd3wSOk8cq6OH0lP1P1T39WfEq3wqwQ+mTKV7ua4iYGQe2bNWhdY7B +F8vtg2VXj2ezU/BxxbMXEfFLiQmSPH6aXyUmniMYYEGlbl+6nz/v1HBDXcublVp9 +2XJJxY8w2MrF46+zd3fIfT71LoqG4orlNk3F45zbnrsAGsnIuqv+0Kmisx2h6CKf +RQJkv9I3jwORpeg2LBhP6e9M/H7mdfVtl7wZ14JUqgc9hO1qG284K4wlSqevIzoc +BXf96IpckhPC2xNHj5jHlTX/bL3YTmjxRL5JhNTVP5MH5szsGy+S4UMj31oS8kjd +ppr+a48FineEbJpHIjg1MFiv1pVSV1W4EyJ9obA/4r4KcT5WrJKhU3wFvXr3VILg +RVXT6hlpka1gIsSes8JB2o4ludEKYQTFzqgzNIhNTMlHiIkx9a/3Bj77//W2w42m +XkAiOVHmJfqJAyWdFOFsWhVHmcr9fh84qdoTH/uc423V0euOQmUoSxDxvlrboeXb +cMXAXk+wHMHYHEV1H142 +=bIui +-----END PGP SIGNATURE----- diff --git a/util-linux-2.23.2.tar.xz b/util-linux-2.23.2.tar.xz new file mode 100644 index 0000000..d0ea2a5 --- /dev/null +++ b/util-linux-2.23.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c4042bd91f621250d7b3b2f34e3b11921a32c7f080c149dcc0c7ce62a8a7cac +size 3383052 diff --git a/util-linux.changes b/util-linux.changes index b0154a4..d70cc6c 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,92 @@ +------------------------------------------------------------------- +Fri Sep 13 07:06:19 UTC 2013 - werner@suse.de + +- Avoid build require gpg-offline twice + +------------------------------------------------------------------- +Wed Sep 11 20:54:24 CEST 2013 - sbrabec@suse.cz + +- Update to version 2.23.2: + nsenter(1): + * this NEW COMMAND provides command line interface to setns() + Linux syscall and allows to run program with namespaces of + other processes + unshare(1): + * supports new PID and USER namespaces + fdisk(8): + * provides experimental support for GUID Partition Table (GPT), + the implementation is still not complete and some (unimportant) + features are missing. + * ~50% of fdisk code has been refactored, this task is going to + be complete in the next release. The goal is to have libfdisk + shared between all fdisks. + partx(8): + * supports new "update" command (implemented by + BLKPG_RESIZE_PARTITION ioctl) + mount(8): + * supports new userspace mount option x-mount.mkdir[=] to + create mountpoints on demand + * the support for propagation flags has been improved, now the + flags could be specified in /etc/fstab and used together with + regular mount options. It's also possible to specify more + propagation flags together. This EXPERIMENTAL feature is + implemented by additional mount(2) syscalls, because Linux does + not allow to use propagation flags with another options or more + flags together. + umount(8): + * supports new command line option --recursive to recursively + unmount all sub-mounts for the specified mountpoint * supports + new command line option --all-targets to unmount all + mountpoints in the current namespace for the specified + filesystem * the options --recursive and --all-targets could be + used together + dmesg(1): + * supports new command line options --color, --human and + --nopager, the --human option enables relative times, colors and + pager support. + su(1): + * supports new command line options --group and --supp-group to + specify primary and supplementary groups + chfn(1) and chsh(1): + * the commands could be linked with libuser to support non-local + accounts modification (e.g. LDAP, etc). + kill(1): + * the command has been improved to be compatible with procps + version, the procps version is deprecated now, the util-linux + version is enabled by default. + blkdiscard(8): + * this NEW COMMAND discard sectors on a device (for example on + SSD disks) + sulogin(8): + * provides multi-console feature from SysVinit + findmnt(8): + * provides new columns FREQ, PASSNO, ID, OPT-FIELDS, PROPAGATION + lslocks(8): + * provides new column BLOCKER and detects blocked locks + lsblk(8): + * supports new command line option --scsi and new columns HCTL, + TRANsport VENDOR and REVision + swapon(8) and losetup(8): + * the commands prints basic overview by default if no option + specified + column(1): + * supports new command line option --output-separator to specify + table output delimiter + rename(1): + * supports new command line option --symlink to rename symlink + target + hwclock(8): + * supports new command line option --compare to periodically + compare the Hardware Clock to the System Time (based on + adjtimex -c) + ipcs(1): + * supports new command line options --bytes and --human + wipefs(1): + * supports new command line option --force to force erase on used + devices +- Removed upstreamed patches (mkfs.bfs_cleanup_64bit.patch-Patch, + mkfs.bfs_cleanup_endian.patch) + ------------------------------------------------------------------- Mon Jul 1 13:43:23 UTC 2013 - mail@bernhard-voelker.de diff --git a/util-linux.keyring b/util-linux.keyring new file mode 100644 index 0000000..a34bbee --- /dev/null +++ b/util-linux.keyring @@ -0,0 +1,56 @@ +pub 4096R/EC39C284 2011-10-10 [expires: 2016-10-08] +uid Karel Zak +sub 4096R/7BA16CAC 2011-10-10 [expires: 2016-10-08] + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2.0.20 (GNU/Linux) + +mQINBE6StA4BEACp9++Y+DgbBloJEuVhsDjDIvAR1n/aHPDyPQQzg/DkKtR3BXHn +dGfTL9/DR8y9YzLNwUf2lWsEAvwHZ2XfUTp5S5nVbgpAB0/Q2ebP0TnkNYaRkxq7 +VJF+kvUcA6hxYKYcIos2kJyfVytPE6FpFBqlgTmjcCTx4HHwePkVTVRyotOoA2V/ +UUwixgkyG7aVfy4QBKHAkATpTPC4l+ISaOHKUiajxRoa99rpmBPl4FhIw3b5rPYA +26q9Pz8q1AwbXA1PXxzwKVqqfwEkl6sxUVKiM8rUuhic2lnDMIXexNMvqznpFqtB +v7n+z/5N8RbB1DQjWpy/Z7OW6yyYXW9e33c6IgU5n46rIyTPYyzq3mDfOsJdvoG/ +nhF7VUkGDPYWfmx9ejvpKdoNCQ2q+MVp20msntcETcOq1r9SJwNXcsx+I/3ptbtX +Q+MQyA1L5FifkpA7+akITF5luOqUb2TToEBLiF/nn8y0sIUa/HGgcUrK2N9E1VNJ +tcIt/z0sZJUHYC+EBh/G0UNt9tRwPdnUks5sua1sCquXnkd9IS0Kr3Kq/C6JOKzz +UDGdFKVc6wExf70hX5h0g1kkypyjNwipGSdk+qVXO0IF/tKMToa8WZqoK3enzryI +Kmdq7IQ0ThdTTTC1ctVk4367/30prpNHF4/642G0OOiQCzWBrb0V217HvQARAQAB +tBtLYXJlbCBaYWsgPGt6YWtAcmVkaGF0LmNvbT6JAj4EEwECACgFAk6StA4CGwMF +CQlmAYAGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEOS3HV7sOcKETI8QAI0U +StG6dv1l9kqkmFpXPZJ75hf5SJA69+upcKeTg9BXKrEqjZLeyEn1OVPmfVGwWpz8 +SRbiYcHh8AhJaggAxKcIgQ/sAUBkmrTP6RyYEQUV6vFW5qv7dcEOs46d+LE/Wkxs +ymC2FSXxYOFiw7z27gkXQYq/IkdwfhRLFD6aD5egxcBVl91ZlRyklvPPW7qo046B +MWh2LaCVowYg+33GjS4A4JcF+tGkWZc0yqANwov93uhY0VXEdDsT4YWrTVdNDI3/ +lZ5u5k9sEUGR03oV336M/j0qNtMfAG5iDt2PFrzhJZcGcQPiGd/DeYuJeLVCd8Nl +jAwsnfGqu9VITgaDOreLbpSTNSj8egPqOoUBAGncMSfdiQ2ZEhluPyCTwspDy5Pa +dESyk0q2Z6tKG9ae01g/RzfTGCVN4GxkORPxcEHloa4XM3C9FBohM1LTWmsvnNXe +cPdbPyCoiFKio/yFZDt1CYDkols4uf/0ztCSH6pI874sCmYJVkYev2W9RCxE4aYK +KMb8XCUPec8L4C1mpmBiej0NT/d9GHQUnJUpRD4EG7UBxMwNWflhO4P4Q81uM0Kr +RMht0lS0EylZXuQPPG5C1nMsa1+eN0wjSTpy7232PTCxu+bhxA1HzvWXYuueUmp2 +QuV8PyA1lsfYI7PEgk2skfAvbP5vJszorklo2hVGuQINBE6StA4BEADG5Hind61Y +qoXXHotraJO2ejsPiy3BxSZTQet+IJO5tyURSXVIv+ZuV/MBRS/88fkBL2nHpK5b +BtJT11D2ZESmziZWGgMtZRV4va3fh3GaMeVdi5pXpmPZp4fBc60F3iCKfd1V8/1a +zwicZtdhTphkc6O7ETCr240OrJoOgvilbpv8WuVwhjfEOL2DwKITK6tzba1VScXi +ehDhhTssP14RQiH/OcMFuiHCHJeHQOH9ku4fzqT2/lxxSo4kMWKR2VslW17f3Zr3 +Zvrbi/b8UE/3T/RsoaQn2ml9BfDiMgNwT4l2ILlE7HpZMfD2WAP6itGHolcdbhNa +jxAMHdP5t64zSdwKmB8AbuIo7nbMKuJMiPdkOS/8x3YHRle4WEEeRWTEcqyzqkMq +MCqKLxc4SCuSMv+ingDrHr+d5usuMlQjT8c71PIipl9OpM8Jkl8CI2ToVF20wijY +Oof4T/jjObYiZk1KcqqKhQzMXEhKCt9hK5AaKMq5BiublS/Q5EXpzcRgVmG+SMHd +hUNLN7gilFx5939Ev+36TNE/f66r9aiF+WbiI1V1JGs0LYVyFzwmFMCgQUsnyqyA +RNREnLysdLE98PDSO2ESxu9BO7kTvlP0q5p+MKQiYj/s5wSqXw8EDCSBH9u0/FQi +gyV0a+J70WZZNpdi5wq+qVZ16LENQdxtKwARAQABiQIlBBgBAgAPBQJOkrQOAhsM +BQkJZgGAAAoJEOS3HV7sOcKEtCYP/3ji7Kt4+M0N6IOkh7wHfWk3HLqBa1XOD1Oz +X+rp79L1cDK8J1XUHoW/84bsS8Y3NsXlIej1wLOcaH0HOpEsPzqoqP1JxGilRkAu +Yazt3WhqdM2FcOQNEnuk66F8HnN/mD4vLzxdxuPlRtlCruUcDZlZlyzpywk6B7Gi +cVfh1CvUJsDA++aOlgYIHB4Z6nSJWYp64z+5QAVToBHzI7ywVyWTJbjO1RCR5QsV +fPD07p1deSW96QhqLSb2wQfk93I4YGshaVPwG01ZamxPEbspKqrEIG+5S6E4q/B+ +VF0zj5GU7jt/6M4qFzKbaY+vxsaqjgCOCPL5bCz5RFTHdtEmC/cmsvVbYuBD/5UY +D3JbyXt7KSG/a5Oel4ynK1pRQbnS6eNcGQqZPUop4PBouRKnUqv8uzljaiL9Wm3G +Hv9tn1L6ly86VcLt1ALTVuqwm5ci1fDVbddSliPv5atWNJ+So2MfEg3qbCzEC8Is +JNsVd4N6fSctYfFvBxsPjy7fw1iEqKq7SzTlHMO5hiKpS+8HSRVv6djHlj3aWtgy +u+BTXT/tRQ6c3TlZadqoyumX1U+Tflb6qMyJaZPsqv3bsOpXwjLAVfT4nPRXqbN6 +WWUhdompzuZufyCCL9Tc6lPDgVmuWyycHk4gbdfERodk4SEYJ0cEwFbl+GjL9XFZ +VeljfCzq +=8wc5 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/util-linux.spec b/util-linux.spec index bfb2abf..81e2fc2 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,6 +25,13 @@ BuildRequires: audit-devel BuildRequires: binutils-devel BuildRequires: fdupes BuildRequires: gettext-devel +# Use rpmbuild -D 'VERIFY_SIG 1' to verify signature during build or run +# one-shot check by +# xzcat util-linux-*.tar.xz | \ +# sh -x gpg-offline --verify --package=util-linux *.tar.sign - +%if 0%{?VERIFY_SIG} +BuildRequires: gpg-offline +%endif BuildRequires: libselinux-devel BuildRequires: libsepol-devel BuildRequires: libtool @@ -35,7 +42,7 @@ BuildRequires: readline-devel BuildRequires: systemd-rpm-macros BuildRequires: utempter-devel BuildRequires: zlib-devel -Version: 2.23.1 +Version: 2.23.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -53,7 +60,7 @@ Recommends: %{name}-lang = %{version} Summary: A collection of basic system utilities License: GPL-2.0+ Group: System/Base -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/%{name}-%{version}.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/%{name}-%{version}.tar.xz Source1: util-linux-rpmlintrc # XXX: make nologin part of util-linux upstream Source2: nologin.c @@ -66,6 +73,8 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/%{name}-%{version}.tar.sign +Source13: %{name}.keyring # TODO: split to separate package Source40: klogconsole.tar.bz2 # XXX: Run a program in a new session and with controlling tty @@ -103,10 +112,6 @@ Patch20: util-linux-HACK-boot.localfs.diff Patch55: klogconsole-quiet.patch Patch56: klogconsole.diff -## fix mkfs.bfs -Patch60: mkfs.bfs_cleanup_64bit.patch -Patch61: mkfs.bfs_cleanup_endian.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq /bin/sed # @@ -205,6 +210,9 @@ Files to develop applications using the libmount library. %lang_package %prep +%if 0%{?VERIFY_SIG} +xzcat %{S:0} | %gpg_verify %{S:12} - +%endif %setup -q -n %{name}-%{version} -b 40 %patch1 -p1 %patch2 -p1 @@ -220,9 +228,6 @@ cp -p %{S:22} %{S:23} . # nologin cp -p %{S:2} %{S:3} %{S:26} %{S:30} . -%patch60 -p1 -%patch61 -p1 - pushd ../klogconsole %patch55 -p1 %patch56 -p1 From 92c35424609a52ac8efdbfc432b9e08f32cdc3c5cd7d02eb4409e4bc3f9e4f7c Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sun, 29 Sep 2013 15:54:14 +0000 Subject: [PATCH 158/211] Accepting request 201216 from Base:System - Add more-fix-buffer-overflow.patch (bnc#829720). (forwarded request 201207 from mgorse) OBS-URL: https://build.opensuse.org/request/show/201216 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=166 --- more-fix-buffer-overflow.patch | 32 ++++++++++++++++++++++++++++++++ util-linux.changes | 5 +++++ util-linux.spec | 3 +++ 3 files changed, 40 insertions(+) create mode 100644 more-fix-buffer-overflow.patch diff --git a/more-fix-buffer-overflow.patch b/more-fix-buffer-overflow.patch new file mode 100644 index 0000000..f41bb16 --- /dev/null +++ b/more-fix-buffer-overflow.patch @@ -0,0 +1,32 @@ +From 1ef2db5a5672e09fa1337099b7d9d6ab61c19bdc Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 1 Aug 2013 12:58:22 +0200 +Subject: [PATCH] more: fix buffer overflow + +The bug has been probably introduced by commit +1ac300932deab8dea2c43050921bbbdb36d62ff1. + +Reported-by: "Dr. David Alan Gilbert" +References: https://bugzilla.novell.com/show_bug.cgi?id=829720 +Signed-off-by: Karel Zak +--- + text-utils/more.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/text-utils/more.c b/text-utils/more.c +index 3bbeede..3377118 100644 +--- a/text-utils/more.c ++++ b/text-utils/more.c +@@ -835,7 +835,8 @@ void prepare_line_buffer(void) + if (nsz < LINSIZ) + nsz = LINSIZ; + +- nline = xrealloc(Line, nsz); ++ /* alloc nsz and extra space for \n\0 */ ++ nline = xrealloc(Line, nsz + 2); + Line = nline; + LineLen = nsz; + } +-- +1.8.4 + diff --git a/util-linux.changes b/util-linux.changes index d70cc6c..d724676 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Sep 27 16:58:40 UTC 2013 - mgorse@suse.com + +- Add more-fix-buffer-overflow.patch (bnc#829720). + ------------------------------------------------------------------- Fri Sep 13 07:06:19 UTC 2013 - werner@suse.de diff --git a/util-linux.spec b/util-linux.spec index 81e2fc2..78c81ea 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -100,6 +100,8 @@ Patch3: fdisk-tinfo.patch Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FIX-UPSTREAM eject-scsi-check-host_status-and-driver_status.patch bnc358033 anicka@suse.cz -- Check eject host_status and driver_status when using SG_IO. Patch5: eject-scsi-check-host_status-and-driver_status.patch +# PATCH-FIX-UPSTREAM more-fix-buffer-overflow.patch bnc839720 mgorse@suse.com -- More: Fix under-allocation of memory. +Patch6: more-fix-buffer-overflow.patch # disable encryption Patch12: util-linux-2.23.1-noenc-suse.diff @@ -219,6 +221,7 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 %patch12 -p1 # %patch20 -p1 From e3cc16fab3f24a6f32c638a39a084c83668e8af9dea451e2ea102f6a5e3790f5 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 30 Sep 2013 07:32:48 +0000 Subject: [PATCH 159/211] Accepting request 201407 from Base:System - Add more-check-for-buffer-size-when-write-multibyte-char.patch and more-guarantee-space-for-multibyte.patch -- check for buffer space with multi-byte chars (BNC#829720). (forwarded request 201241 from mgorse) OBS-URL: https://build.opensuse.org/request/show/201407 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=167 --- ...uffer-size-when-write-multibyte-char.patch | 27 ++++++++++++++++ more-guarantee-space-for-multibyte.patch | 32 +++++++++++++++++++ util-linux.changes | 7 ++++ util-linux.spec | 6 ++++ 4 files changed, 72 insertions(+) create mode 100644 more-check-for-buffer-size-when-write-multibyte-char.patch create mode 100644 more-guarantee-space-for-multibyte.patch diff --git a/more-check-for-buffer-size-when-write-multibyte-char.patch b/more-check-for-buffer-size-when-write-multibyte-char.patch new file mode 100644 index 0000000..af179a4 --- /dev/null +++ b/more-check-for-buffer-size-when-write-multibyte-char.patch @@ -0,0 +1,27 @@ +From c36407293d63d428af176097527df89d623bc74f Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 1 Aug 2013 16:00:21 +0200 +Subject: [PATCH] more: check for buffer size when write multibyte char + +Signed-off-by: Karel Zak +--- + text-utils/more.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/text-utils/more.c b/text-utils/more.c +index 3377118..9af15b3 100644 +--- a/text-utils/more.c ++++ b/text-utils/more.c +@@ -912,7 +912,8 @@ int get_line(register FILE *f, int *length) + Fseek(f, file_pos_bak); + break_flag = 1; + } else { +- for (i = 0; i < mbc_pos; i++) ++ for (i = 0; p < &Line[LineLen - 1] && ++ i < mbc_pos; i++) + *p++ = mbc[i]; + if (wc_width > 0) + column += wc_width; +-- +1.8.4 + diff --git a/more-guarantee-space-for-multibyte.patch b/more-guarantee-space-for-multibyte.patch new file mode 100644 index 0000000..00832ae --- /dev/null +++ b/more-guarantee-space-for-multibyte.patch @@ -0,0 +1,32 @@ +From 418cb4b3bb7a61aec62ebe91194f7722ea608842 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 1 Aug 2013 16:41:50 +0200 +Subject: [PATCH] more: guarantee space for multibyte + +.. to make the code more robust. + +Signed-off-by: Karel Zak +--- + text-utils/more.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/text-utils/more.c b/text-utils/more.c +index 9af15b3..ac35acc 100644 +--- a/text-utils/more.c ++++ b/text-utils/more.c +@@ -1030,6 +1030,12 @@ int get_line(register FILE *f, int *length) + + if (column >= Mcol && fold_opt) + break; ++#ifdef HAVE_WIDECHAR ++ if (use_mbc_buffer_flag == 0 && p >= &Line[LineLen - 1 - 4]) ++ /* don't read another char if there is no space for ++ * whole multibyte sequence */ ++ break; ++#endif + c = Getc(f); + } + if (column >= Mcol && Mcol > 0) { +-- +1.8.4 + diff --git a/util-linux.changes b/util-linux.changes index d724676..6d1ea14 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Sep 27 21:58:03 UTC 2013 - mgorse@suse.com + +- Add more-check-for-buffer-size-when-write-multibyte-char.patch and + more-guarantee-space-for-multibyte.patch -- check for buffer space with + multi-byte chars (BNC#829720). + ------------------------------------------------------------------- Fri Sep 27 16:58:40 UTC 2013 - mgorse@suse.com diff --git a/util-linux.spec b/util-linux.spec index 78c81ea..9936a5a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -102,6 +102,10 @@ Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff Patch5: eject-scsi-check-host_status-and-driver_status.patch # PATCH-FIX-UPSTREAM more-fix-buffer-overflow.patch bnc839720 mgorse@suse.com -- More: Fix under-allocation of memory. Patch6: more-fix-buffer-overflow.patch +# PATCH-FIX-UPSTREAM more-check-for-buffer-size-when-write-multibyte-char.patch bnc839720 mgorse@suse.com +Patch7: more-check-for-buffer-size-when-write-multibyte-char.patch +# PATCH-FIX-UPSTREAM more-guarantee-space-for-multibyte.patch bnc839720 mgorse@suse.com +Patch8: more-guarantee-space-for-multibyte.patch # disable encryption Patch12: util-linux-2.23.1-noenc-suse.diff @@ -222,6 +226,8 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 +%patch8 -p1 %patch12 -p1 # %patch20 -p1 From 3e140e9f5734a4bf7916c827e4df7caddd9528f8a59335a1dafc9ba61d71b2c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 9 Oct 2013 12:42:59 +0000 Subject: [PATCH 160/211] Accepting request 202588 from Base:System - Safely migrate su config files from coreutils to util-linux (bnc#814626#c18). (forwarded request 201935 from sbrabec) OBS-URL: https://build.opensuse.org/request/show/202588 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=168 --- util-linux.changes | 6 ++++++ util-linux.spec | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/util-linux.changes b/util-linux.changes index 6d1ea14..ab3bc3a 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 2 18:55:22 CEST 2013 - sbrabec@suse.cz + +- Safely migrate su config files from coreutils to util-linux + (bnc#814626#c18). + ------------------------------------------------------------------- Fri Sep 27 21:58:03 UTC 2013 - mgorse@suse.com diff --git a/util-linux.spec b/util-linux.spec index 9936a5a..d3ca846 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -475,6 +475,23 @@ ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd %set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount %if %{with enable_su} %set_permissions %{_bindir}/su +# Safely migrate PAM files from coreutils to util-linux +# (openSUSE 12.3->13.1, SLE11->SLE12) +# +# coreutils with su were upgraded (and su removed) before util-linux +# with su was installed (see the Conflicts above). If the admin edited +# the PAM file, the seemingly no more used modified file was saved as +# .rpmsave and the new clean file was installed. As we want +# "noreplace" upgrade, and the contents of the clean file contents has +# no changes, we should restore admin modification, and rename the +# clean file to .rpmnew, as it would happen if the file was not moved +# from one package to another. +for PAM_FILE in default/su pam.d/su pam.d/su-l ; do + if test -f %{_sysconfdir}/$PAM_FILE.rpmsave ; then + mv %{_sysconfdir}/$PAM_FILE %{_sysconfdir}/$PAM_FILE.rpmnew + mv %{_sysconfdir}/$PAM_FILE.rpmsave %{_sysconfdir}/$PAM_FILE + fi +done %endif %if %{with enable_eject} %set_permissions %{_bindir}/eject From 55bfd2015963e927c4a8f6b23c7b4d7e77d3fedac1a961bbddef5548fbe18ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 9 Oct 2013 21:42:13 +0000 Subject: [PATCH 161/211] Accepting request 202718 from Base:System - No *fdisk on m68k (forwarded request 202697 from Andreas_Schwab) OBS-URL: https://build.opensuse.org/request/show/202718 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=169 --- util-linux.changes | 5 +++++ util-linux.spec | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index ab3bc3a..11b484c 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 9 10:00:55 UTC 2013 - schwab@suse.de + +- No *fdisk on m68k + ------------------------------------------------------------------- Wed Oct 2 18:55:22 CEST 2013 - sbrabec@suse.cz diff --git a/util-linux.spec b/util-linux.spec index d3ca846..3322308 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -433,7 +433,7 @@ rm -f %{buildroot}/%{_mandir}/man8/hwclock.8* rm -f %{buildroot}/%{_mandir}/man8/klogconsole.8* rm -f %{buildroot}/%{_mandir}/man8/tunelp.8* %endif -%ifarch ia64 %sparc +%ifarch ia64 %sparc m68k rm -f %{buildroot}/%{_mandir}/man8/cfdisk.8* rm -f %{buildroot}/%{_mandir}/man8/sfdisk.8* rm -f %{buildroot}%{_sbindir}/cfdisk @@ -445,7 +445,7 @@ rm -f %{buildroot}%{_sbindir}/sfdisk rm -f %{buildroot}/sbin/sfdisk #EndUsrMerge %endif -%ifarch ia64 +%ifarch ia64 m68k rm -f %{buildroot}%{_sbindir}/fdisk #UsrMerge rm -f %{buildroot}/sbin/fdisk @@ -829,7 +829,7 @@ fi %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh # FIXME: Fix directory ownership. %{_datadir}/bash-completion -%ifnarch ia64 +%ifnarch ia64 m68k #XXX: post our patches upstream #XXX: call fdupes on /usr/share/man #UsrMerge @@ -838,7 +838,7 @@ fi %{_sbindir}/fdisk %{_mandir}/man8/fdisk.8.gz %endif -%ifnarch %sparc ia64 +%ifnarch %sparc ia64 m68k %{_mandir}/man8/cfdisk.8.gz %{_mandir}/man8/sfdisk.8.gz #UsrMerge From 31d5449b4d71115d03feb89fd7a9a1b2aa4503d2fa3f411dd8c9bb3e6d3ac910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 30 Oct 2013 15:01:09 +0000 Subject: [PATCH 162/211] Accepting request 204988 from Base:System - Drop SUID flag for eject (bnc#824406). Depends on request id 204833! (forwarded request 204834 from sbrabec) OBS-URL: https://build.opensuse.org/request/show/204988 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=170 --- util-linux.changes | 5 +++++ util-linux.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/util-linux.changes b/util-linux.changes index 11b484c..d082081 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 25 18:52:01 CEST 2013 - sbrabec@suse.cz + +- Drop SUID flag for eject (bnc#824406). + ------------------------------------------------------------------- Wed Oct 9 10:00:55 UTC 2013 - schwab@suse.de diff --git a/util-linux.spec b/util-linux.spec index 3322308..be6361b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -625,7 +625,7 @@ fi %{_bindir}/su %endif %if %{with enable_eject} -%verify(not mode) %attr(4750,root,audio) %{_bindir}/eject +%{_bindir}/eject %endif %{_bindir}/cal %{_bindir}/chrt From 0636dfed64bd916ad4adcf58c494146684e0ee366078f6c116c4e910d1b24a1d Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 5 Nov 2013 12:53:50 +0000 Subject: [PATCH 163/211] Accepting request 205813 from Base:System - blkdiscard-BLKSSZGET-fills-in-an-int.patch: Fix type mismatch in blkdiscard (forwarded request 205643 from AndreasSchwab) OBS-URL: https://build.opensuse.org/request/show/205813 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=171 --- blkdiscard-BLKSSZGET-fills-in-an-int.patch | 27 ++++++++++++++++++++++ util-linux.changes | 6 +++++ util-linux.spec | 3 +++ 3 files changed, 36 insertions(+) create mode 100644 blkdiscard-BLKSSZGET-fills-in-an-int.patch diff --git a/blkdiscard-BLKSSZGET-fills-in-an-int.patch b/blkdiscard-BLKSSZGET-fills-in-an-int.patch new file mode 100644 index 0000000..7ce7143 --- /dev/null +++ b/blkdiscard-BLKSSZGET-fills-in-an-int.patch @@ -0,0 +1,27 @@ +Subject: [PATCH] blkdiscard: BLKSSZGET fills in an int, not a uint64 +Message-ID: 1383435966-29337-1-git-send-email-tytso@mit.edu + +Reported-by: Jason Cipriani +Signed-off-by: "Theodore Ts'o" +--- + sys-utils/blkdiscard.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sys-utils/blkdiscard.c b/sys-utils/blkdiscard.c +index af9ed66..2ddcdb1 100644 +--- a/sys-utils/blkdiscard.c ++++ b/sys-utils/blkdiscard.c +@@ -70,8 +70,8 @@ static void __attribute__((__noreturn__)) usage(FILE *out) + int main(int argc, char **argv) + { + char *path; +- int c, fd, verbose = 0, secure = 0; +- uint64_t end, blksize, secsize, range[2]; ++ int c, fd, verbose = 0, secure = 0, secsize; ++ uint64_t end, blksize, range[2]; + struct stat sb; + + static const struct option longopts[] = { +-- +1.7.12.rc0.22.gcdd159b + diff --git a/util-linux.changes b/util-linux.changes index d082081..fba0b31 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Nov 3 12:53:34 UTC 2013 - schwab@linux-m68k.org + +- blkdiscard-BLKSSZGET-fills-in-an-int.patch: Fix type mismatch in + blkdiscard + ------------------------------------------------------------------- Fri Oct 25 18:52:01 CEST 2013 - sbrabec@suse.cz diff --git a/util-linux.spec b/util-linux.spec index be6361b..a8c6d2d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -108,6 +108,8 @@ Patch7: more-check-for-buffer-size-when-write-multibyte-char.patch Patch8: more-guarantee-space-for-multibyte.patch # disable encryption Patch12: util-linux-2.23.1-noenc-suse.diff +# PATCH-FIX-UPSTREAM blkdiscard-BLKSSZGET-fills-in-an-int.patch tytso@mit.edu +Patch13: blkdiscard-BLKSSZGET-fills-in-an-int.patch # hack for boot.localfs Patch20: util-linux-HACK-boot.localfs.diff @@ -229,6 +231,7 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch7 -p1 %patch8 -p1 %patch12 -p1 +%patch13 -p1 # %patch20 -p1 # From f51635d70228b27477f6eba71be452e2c4ab5b77f9b7165ae071dd391c4600c3 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 29 Nov 2013 15:26:17 +0000 Subject: [PATCH 164/211] Accepting request 208910 from Base:System - Add patch tty3270-on-serial-line-of-s390.patch to better support the first and second serial line on s390/x OBS-URL: https://build.opensuse.org/request/show/208910 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=172 --- tty3270-on-serial-line-of-s390.patch | 43 ++++++++++++++++++++++++++++ util-linux.changes | 7 +++++ util-linux.spec | 3 ++ 3 files changed, 53 insertions(+) create mode 100644 tty3270-on-serial-line-of-s390.patch diff --git a/tty3270-on-serial-line-of-s390.patch b/tty3270-on-serial-line-of-s390.patch new file mode 100644 index 0000000..57ae1b2 --- /dev/null +++ b/tty3270-on-serial-line-of-s390.patch @@ -0,0 +1,43 @@ +Support the special terminal on first serial line on a S/390(x) which +is due legacy reasons a block terminal of type 3270 or higher. Whereas +the second serial line on a S/390(x) is a real character terminal which +is compatible with VT220. + +--- + agetty.c | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +--- term-utils/agetty.c ++++ term-utils/agetty.c 2013-11-29 11:57:11.000000000 +0000 +@@ -49,6 +49,10 @@ + # ifndef DEFAULT_VCTERM + # define DEFAULT_VCTERM "linux" + # endif ++# if defined (__s390__) || defined (__s390x__) ++# define DEFAULT_TTYS0 "ibm327x" ++# define DEFAULT_TTYS1 "vt220" ++# endif + # ifndef DEFAULT_STERM + # define DEFAULT_STERM "vt102" + # endif +@@ -983,6 +987,20 @@ static void open_tty(char *tty, struct t + if (tcgetattr(STDIN_FILENO, tp) < 0) + log_err(_("%s: failed to get terminal attributes: %m"), tty); + ++#if defined (__s390__) || defined (__s390x__) ++ if (!op->term) { ++ /* ++ * Special terminal on first serial line on a S/390(x) which ++ * is due legacy reasons a block terminal of type 3270 or ++ * higher. Whereas the second serial line on a S/390(x) is ++ * a real character terminal which is compatible with VT220. ++ */ ++ if (strcmp(op->tty, "ttyS0") == 0) ++ op->term = DEFAULT_TTYS0; ++ else if (strcmp(op->tty, "ttyS1") == 0) ++ op->term = DEFAULT_TTYS1; ++ } ++#endif + /* + * Detect if this is a virtual console or serial/modem line. + * In case of a virtual console the ioctl TIOCMGET fails and diff --git a/util-linux.changes b/util-linux.changes index fba0b31..739f4ab 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Nov 29 13:46:21 UTC 2013 - werner@suse.de + +- Add patch + tty3270-on-serial-line-of-s390.patch + to better support the first and second serial line on s390/x + ------------------------------------------------------------------- Sun Nov 3 12:53:34 UTC 2013 - schwab@linux-m68k.org diff --git a/util-linux.spec b/util-linux.spec index a8c6d2d..06b1b2c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -110,6 +110,8 @@ Patch8: more-guarantee-space-for-multibyte.patch Patch12: util-linux-2.23.1-noenc-suse.diff # PATCH-FIX-UPSTREAM blkdiscard-BLKSSZGET-fills-in-an-int.patch tytso@mit.edu Patch13: blkdiscard-BLKSSZGET-fills-in-an-int.patch +# PATCH-FIX-SUSE -- better support of S390 in agetty +Patch14: tty3270-on-serial-line-of-s390.patch # hack for boot.localfs Patch20: util-linux-HACK-boot.localfs.diff @@ -232,6 +234,7 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch8 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p0 # %patch20 -p1 # From 4efd0700ac45a9dbead872adaa2d8686b7fcf459ee5d2b8702419bd126d8fbf0 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 16 Dec 2013 06:15:12 +0000 Subject: [PATCH 165/211] Accepting request 210834 from Base:System - Update to util-linux-2.24 + Release highlights (2.24) fdisk(8): * the code has been completely refactored and moved to libfdisk (the library does not have a stable API yet) * user interface has been unified for all label types and it supports colors * GPT disk UUID, partition UUID and partition name modification is supported now pylibmount: * this new library provides PYTHON BINDINGS for libmount; use --with-python[=2|3] to enable the bindings last(1) and lastb(1): * the NEW IMPLEMENTATION has been merged from sysvinit to util-linux and extended; now it supports command line options --present, --since, and --time-format * use --enable-deprecated-last to enable the old util-linux last(1) implementation swapon(8): * the option --discard= and fstab mount option discard= allow to explicitly specify 'pages' or 'once' discard policy. If no policy is selected, the default behavior is to enable both. See swapon.8 man page for more details. libblkid and blkid(8): * supports LOGUUID= for external logs (e.g. extN and XFS) * generates a pseudo PARTUUID= for MBR partitions (based on MBR Id, Linux kernel supports the same concept for root= command line option) agetty(8): * supportes new issue file \S escape code to read information OBS-URL: https://build.opensuse.org/request/show/210834 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=173 --- ...-check-host_status-and-driver_status.patch | 77 ------------------- fdisk-tinfo.patch | 12 --- ...uffer-size-when-write-multibyte-char.patch | 27 ------- more-fix-buffer-overflow.patch | 32 -------- more-guarantee-space-for-multibyte.patch | 32 -------- ...x-2.23.1-fdisk_remove_bogus_warnings.patch | 20 ----- util-linux-2.23.2.tar.sign | 17 ---- util-linux-2.23.2.tar.xz | 3 - ...nux-2.24-fdisk_remove_bogus_warnings.patch | 18 +++++ util-linux-2.24.tar.sign | 17 ++++ util-linux-2.24.tar.xz | 3 + util-linux.changes | 73 ++++++++++++++++++ util-linux.spec | 63 ++++++++------- 13 files changed, 148 insertions(+), 246 deletions(-) delete mode 100644 eject-scsi-check-host_status-and-driver_status.patch delete mode 100644 fdisk-tinfo.patch delete mode 100644 more-check-for-buffer-size-when-write-multibyte-char.patch delete mode 100644 more-fix-buffer-overflow.patch delete mode 100644 more-guarantee-space-for-multibyte.patch delete mode 100644 util-linux-2.23.1-fdisk_remove_bogus_warnings.patch delete mode 100644 util-linux-2.23.2.tar.sign delete mode 100644 util-linux-2.23.2.tar.xz create mode 100644 util-linux-2.24-fdisk_remove_bogus_warnings.patch create mode 100644 util-linux-2.24.tar.sign create mode 100644 util-linux-2.24.tar.xz diff --git a/eject-scsi-check-host_status-and-driver_status.patch b/eject-scsi-check-host_status-and-driver_status.patch deleted file mode 100644 index 6347102..0000000 --- a/eject-scsi-check-host_status-and-driver_status.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 90a0e97c7be9da39fd54600228e006b98667ad56 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 18 Jun 2013 12:24:28 +0200 -Subject: [PATCH 1/2] eject: Check host_status and driver_status when using - SG_IO. - -Based on Suse patch, originally from - Anna Bernathova , May 2008 - - SG_IO completion status is weird but still well defined. You'll need - to check both host_status, driver_status and status to determine that - a command actually succeeded. -- Tejun Heo, May 2008 - -Note that we also need to check driver_status and sense_buffer to -detect situation when there is no medium. It's valid request to call -eject(8) for device with no medium. - -References: https://bugzilla.novell.com/show_bug.cgi?id=358033 -Signed-off-by: Anna Bernathova -Signed-off-by: Karel Zak ---- - sys-utils/eject.c | 24 +++++++++++++++++++++--- - 1 file changed, 21 insertions(+), 3 deletions(-) - -diff --git a/sys-utils/eject.c b/sys-utils/eject.c -index 4ec69e7..f98f227 100644 ---- a/sys-utils/eject.c -+++ b/sys-utils/eject.c -@@ -53,6 +53,14 @@ - #include "pathnames.h" - #include "sysfs.h" - -+/* -+ * sg_io_hdr_t driver_status -- see kernel include/scsi/scsi.h -+ */ -+#ifndef DRIVER_SENSE -+# define DRIVER_SENSE 0x08 -+#endif -+ -+ - #define EJECT_DEFAULT_DEVICE "/dev/cdrom" - - -@@ -604,17 +612,27 @@ static int eject_scsi(int fd) - - io_hdr.cmdp = allowRmBlk; - status = ioctl(fd, SG_IO, (void *)&io_hdr); -- if (status < 0) -+ if (status < 0 || io_hdr.host_status || io_hdr.driver_status) - return 0; - - io_hdr.cmdp = startStop1Blk; - status = ioctl(fd, SG_IO, (void *)&io_hdr); -- if (status < 0) -+ if (status < 0 || io_hdr.host_status) -+ return 0; -+ -+ /* Ignore errors when there is not medium -- in this case driver sense -+ * buffer sets MEDIUM NOT PRESENT (3a) bit. For more details see: -+ * http://www.tldp.org/HOWTO/archived/SCSI-Programming-HOWTO/SCSI-Programming-HOWTO-22.html#sec-sensecodes -+ * -- kzak Jun 2013 -+ */ -+ if (io_hdr.driver_status != 0 && -+ !(io_hdr.driver_status == DRIVER_SENSE && io_hdr.sbp && -+ io_hdr.sbp[12] == 0x3a)) - return 0; - - io_hdr.cmdp = startStop2Blk; - status = ioctl(fd, SG_IO, (void *)&io_hdr); -- if (status < 0) -+ if (status < 0 || io_hdr.host_status || io_hdr.driver_status) - return 0; - - /* force kernel to reread partition table when new disc inserted */ --- -1.8.1.4 - diff --git a/fdisk-tinfo.patch b/fdisk-tinfo.patch deleted file mode 100644 index da5c7bc..0000000 --- a/fdisk-tinfo.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- util-linux-2.23.1/fdisks/Makemodule.am -+++ util-linux-2.23.1/fdisks/Makemodule.am 2013-06-05 09:58:30.753439465 +0000 -@@ -79,6 +79,9 @@ endif - if HAVE_SLANG - cfdisk_LDADD += -lslang - else -+if HAVE_TINFO -+cfdisk_LDADD += -ltinfo -+endif - if HAVE_NCURSES - cfdisk_LDADD += @NCURSES_LIBS@ - endif diff --git a/more-check-for-buffer-size-when-write-multibyte-char.patch b/more-check-for-buffer-size-when-write-multibyte-char.patch deleted file mode 100644 index af179a4..0000000 --- a/more-check-for-buffer-size-when-write-multibyte-char.patch +++ /dev/null @@ -1,27 +0,0 @@ -From c36407293d63d428af176097527df89d623bc74f Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 1 Aug 2013 16:00:21 +0200 -Subject: [PATCH] more: check for buffer size when write multibyte char - -Signed-off-by: Karel Zak ---- - text-utils/more.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/text-utils/more.c b/text-utils/more.c -index 3377118..9af15b3 100644 ---- a/text-utils/more.c -+++ b/text-utils/more.c -@@ -912,7 +912,8 @@ int get_line(register FILE *f, int *length) - Fseek(f, file_pos_bak); - break_flag = 1; - } else { -- for (i = 0; i < mbc_pos; i++) -+ for (i = 0; p < &Line[LineLen - 1] && -+ i < mbc_pos; i++) - *p++ = mbc[i]; - if (wc_width > 0) - column += wc_width; --- -1.8.4 - diff --git a/more-fix-buffer-overflow.patch b/more-fix-buffer-overflow.patch deleted file mode 100644 index f41bb16..0000000 --- a/more-fix-buffer-overflow.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1ef2db5a5672e09fa1337099b7d9d6ab61c19bdc Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 1 Aug 2013 12:58:22 +0200 -Subject: [PATCH] more: fix buffer overflow - -The bug has been probably introduced by commit -1ac300932deab8dea2c43050921bbbdb36d62ff1. - -Reported-by: "Dr. David Alan Gilbert" -References: https://bugzilla.novell.com/show_bug.cgi?id=829720 -Signed-off-by: Karel Zak ---- - text-utils/more.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/text-utils/more.c b/text-utils/more.c -index 3bbeede..3377118 100644 ---- a/text-utils/more.c -+++ b/text-utils/more.c -@@ -835,7 +835,8 @@ void prepare_line_buffer(void) - if (nsz < LINSIZ) - nsz = LINSIZ; - -- nline = xrealloc(Line, nsz); -+ /* alloc nsz and extra space for \n\0 */ -+ nline = xrealloc(Line, nsz + 2); - Line = nline; - LineLen = nsz; - } --- -1.8.4 - diff --git a/more-guarantee-space-for-multibyte.patch b/more-guarantee-space-for-multibyte.patch deleted file mode 100644 index 00832ae..0000000 --- a/more-guarantee-space-for-multibyte.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 418cb4b3bb7a61aec62ebe91194f7722ea608842 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 1 Aug 2013 16:41:50 +0200 -Subject: [PATCH] more: guarantee space for multibyte - -.. to make the code more robust. - -Signed-off-by: Karel Zak ---- - text-utils/more.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/text-utils/more.c b/text-utils/more.c -index 9af15b3..ac35acc 100644 ---- a/text-utils/more.c -+++ b/text-utils/more.c -@@ -1030,6 +1030,12 @@ int get_line(register FILE *f, int *length) - - if (column >= Mcol && fold_opt) - break; -+#ifdef HAVE_WIDECHAR -+ if (use_mbc_buffer_flag == 0 && p >= &Line[LineLen - 1 - 4]) -+ /* don't read another char if there is no space for -+ * whole multibyte sequence */ -+ break; -+#endif - c = Getc(f); - } - if (column >= Mcol && Mcol > 0) { --- -1.8.4 - diff --git a/util-linux-2.23.1-fdisk_remove_bogus_warnings.patch b/util-linux-2.23.1-fdisk_remove_bogus_warnings.patch deleted file mode 100644 index 175720e..0000000 --- a/util-linux-2.23.1-fdisk_remove_bogus_warnings.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- util-linux-2.23.1/fdisks/fdiskdoslabel.c -+++ util-linux-2.23.1/fdisks/fdiskdoslabel.c 2013-06-05 10:11:14.121939007 +0000 -@@ -817,7 +817,7 @@ static void check_consistency(struct fdi - - /* compute logical ending (c, h, s) */ - long2chs(cxt, get_start_sect(p) + get_nr_sects(p) - 1, &lec, &leh, &les); -- -+#if 0 - /* Same physical / logical beginning? */ - if (cxt->geom.cylinders <= 1024 && (pbc != lbc || pbh != lbh || pbs != lbs)) { - printf(_("Partition %zd has different physical/logical " -@@ -833,7 +833,7 @@ static void check_consistency(struct fdi - printf(_(" phys=(%d, %d, %d) "), pec, peh, pes); - printf(_("logical=(%d, %d, %d)\n"),lec, leh, les); - } -- -+#endif - /* Ending on cylinder boundary? */ - if (peh != (cxt->geom.heads - 1) || pes != cxt->geom.sectors) { - printf(_("Partition %zd does not end on cylinder boundary.\n"), diff --git a/util-linux-2.23.2.tar.sign b/util-linux-2.23.2.tar.sign deleted file mode 100644 index 67239b5..0000000 --- a/util-linux-2.23.2.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.13 (GNU/Linux) - -iQIcBAABAgAGBQJR+QNKAAoJEOS3HV7sOcKEUSUP/i4HacPa4Lpj6Ub7SmdLGnrn -Eakoy/USxaVIPNe600ER31mAPxa6HL/tJJWGN2V5PNakMWpLPjsgFaV5hoOVJqsX -qBGnL7W5OaovZWgEtj9d0aGv1sTzHqX+NfUhr6AkGTNiebwpRicDFBMW86mDp6E4 -H/jlhv2LVvkd3wSOk8cq6OH0lP1P1T39WfEq3wqwQ+mTKV7ua4iYGQe2bNWhdY7B -F8vtg2VXj2ezU/BxxbMXEfFLiQmSPH6aXyUmniMYYEGlbl+6nz/v1HBDXcublVp9 -2XJJxY8w2MrF46+zd3fIfT71LoqG4orlNk3F45zbnrsAGsnIuqv+0Kmisx2h6CKf -RQJkv9I3jwORpeg2LBhP6e9M/H7mdfVtl7wZ14JUqgc9hO1qG284K4wlSqevIzoc -BXf96IpckhPC2xNHj5jHlTX/bL3YTmjxRL5JhNTVP5MH5szsGy+S4UMj31oS8kjd -ppr+a48FineEbJpHIjg1MFiv1pVSV1W4EyJ9obA/4r4KcT5WrJKhU3wFvXr3VILg -RVXT6hlpka1gIsSes8JB2o4ludEKYQTFzqgzNIhNTMlHiIkx9a/3Bj77//W2w42m -XkAiOVHmJfqJAyWdFOFsWhVHmcr9fh84qdoTH/uc423V0euOQmUoSxDxvlrboeXb -cMXAXk+wHMHYHEV1H142 -=bIui ------END PGP SIGNATURE----- diff --git a/util-linux-2.23.2.tar.xz b/util-linux-2.23.2.tar.xz deleted file mode 100644 index d0ea2a5..0000000 --- a/util-linux-2.23.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c4042bd91f621250d7b3b2f34e3b11921a32c7f080c149dcc0c7ce62a8a7cac -size 3383052 diff --git a/util-linux-2.24-fdisk_remove_bogus_warnings.patch b/util-linux-2.24-fdisk_remove_bogus_warnings.patch new file mode 100644 index 0000000..0a07b8b --- /dev/null +++ b/util-linux-2.24-fdisk_remove_bogus_warnings.patch @@ -0,0 +1,18 @@ +--- util-linux-2.24/libfdisk/src/dos.c.orig 2013-10-21 11:22:29.810014709 +0200 ++++ util-linux-2.24/libfdisk/src/dos.c 2013-11-13 23:57:27.535962925 +0100 +@@ -1107,6 +1107,7 @@ + /* compute logical ending (c, h, s) */ + long2chs(cxt, dos_partition_get_start(p) + dos_partition_get_size(p) - 1, &lec, &leh, &les); + ++#if 0 + /* Same physical / logical beginning? */ + if (cxt->geom.cylinders <= 1024 + && (pbc != lbc || pbh != lbh || pbs != lbs)) { +@@ -1117,6 +1118,7 @@ + pbc, pbh, pbs, + lbc, lbh, lbs); + } ++#endif + + /* Same physical / logical ending? */ + if (cxt->geom.cylinders <= 1024 diff --git a/util-linux-2.24.tar.sign b/util-linux-2.24.tar.sign new file mode 100644 index 0000000..ed3d37f --- /dev/null +++ b/util-linux-2.24.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.15 (GNU/Linux) + +iQIcBAABAgAGBQJSZS9lAAoJEOS3HV7sOcKEVVEP/25GXdItGSiajLPnWumK5QDl +eVMqhCtqnS7cR+WcOr3S11ngE2wpZyp63ednBrQnK+OZRNvyJaXTqqQ8+naYZ86G +gfK+EtnBOemuUS9yFSLEjseJvBJoRsSWSoJyA5w3id0exiLJiziAM/KTNKvzbPuK +QX09CtUDNWCFuV/wzYSa0Ur7MMk+dZkxb+e9gm0TKhaz4XMr4LXgv+nApTp6LVnO +6DMrFid7kuQrvXdZya04T7GSuev7sLslsiVzWlwVM+aD+jKBTqQeBarb39/vok6n +JlbJl1M8EwwIkwuLL+BoBsioNXBLRB/vhRcbiyx3DNY0n/1Glm+DqbgSmv+FMvgo +wmp1T+q/8uoTN2moi8TKeGMvt2rdf9VRAMBqeUwryqfCZKwAw/koQQmfCN/5oqtX +2uggYFaZPGgDS/ovoOads8Gee7NXkKLW81Yn7WtLUiDSkt4kyVYCaqhthGvkAUtG +Fun9UtIaPr7V80g2VyxHZqitzjJn8zIdsxvLalJsB7HarZKAg3CpvB1G7MZaKEle +lOn/oCoPWGvbAEOjl4t4M3mgjitfmhBwVmhjal3pY0Oq844s1km8z096Xb8oOzdN +g+TzWvfn5dQO+SEIAUv+t2FEIgRQH0e+wMk0dR8rVy4YmcjVwsyoNTQ3sV4lTDTy +o4LwYqKNU+uQ6EmDsnZ2 +=6YN4 +-----END PGP SIGNATURE----- diff --git a/util-linux-2.24.tar.xz b/util-linux-2.24.tar.xz new file mode 100644 index 0000000..3adc5b0 --- /dev/null +++ b/util-linux-2.24.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30add9a8869cef9e5a76755214f074689b6294cea63f4569711faeb099aecc06 +size 3531936 diff --git a/util-linux.changes b/util-linux.changes index 739f4ab..baf13a7 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,76 @@ +------------------------------------------------------------------- +Tue Dec 10 16:10:27 UTC 2013 - sweet_f_a@gmx.de + +- Update to util-linux-2.24 + + Release highlights (2.24) + fdisk(8): + * the code has been completely refactored and moved to libfdisk + (the library does not have a stable API yet) + * user interface has been unified for all label types and it + supports colors + * GPT disk UUID, partition UUID and partition name modification + is supported now + pylibmount: + * this new library provides PYTHON BINDINGS for libmount; + use --with-python[=2|3] to enable the bindings + last(1) and lastb(1): + * the NEW IMPLEMENTATION has been merged from sysvinit to + util-linux and extended; now it supports command line options + --present, --since, and --time-format + * use --enable-deprecated-last to enable the old util-linux + last(1) implementation + swapon(8): + * the option --discard= and fstab mount option discard= allow + to explicitly specify 'pages' or 'once' discard policy. If no + policy is selected, the default behavior is to enable both. + See swapon.8 man page for more details. + libblkid and blkid(8): + * supports LOGUUID= for external logs (e.g. extN and XFS) + * generates a pseudo PARTUUID= for MBR partitions (based on MBR + Id, Linux kernel supports the same concept for root= command + line option) + agetty(8): + * supportes new issue file \S escape code to read information + from /etc/os-release + * the option -L allows to completely control CLOCAL flag + dmesg(1): + * supports new command line option --time-format to specify + time format + * supports new iso-8601 time format + hexdump(1): + * supports long options now + wall(1): + * the command is compatible with sysvinit implementation now + logger(1): + * supports new command line option --prio-prefix when logging + stdin + lscpu(1): + * allows to detect more hypervisor types and provides info + about Max and Min CPU Mhz + unshare(8): + * supports new command line options --fork and --mount-proc for + pid namespaces + wipefs(8): + * now wipes superblocks with incorrect checksums too + * supports new command line option --backup to backup erased + data to $HOME/wipefs--.bak + nologin(8): + * this command has been merged into util-linux, the command + politely refuses a login. +- Removed following patches now upstream + * eject-scsi-check-host_status-and-driver_status.patch + * more-fix-buffer-overflow.patch + * more-check-for-buffer-size-when-write-multibyte-char.patch + * more-guarantee-space-for-multibyte.patch +- Removed following patch because now pkg-config does that + * fdisk-tinfo.patch +- Refreshed following patches with updating version string + * util-linux-2.23.1-fdisk_remove_bogus_warnings.patch +- Added enable_last condition in case we don't want to use the last + binary from sysvinit-tools in future +- Upstream moved getopt examples from datadir to docdir but we keep + the old location because we would need to fix the manpage first. + ------------------------------------------------------------------- Fri Nov 29 13:46:21 UTC 2013 - werner@suse.de diff --git a/util-linux.spec b/util-linux.spec index 06b1b2c..ead67ef 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -19,6 +19,7 @@ %bcond_without sysvinit_tools %bcond_without enable_su %bcond_without enable_eject +%bcond_with enable_last Name: util-linux BuildRequires: audit-devel @@ -39,10 +40,14 @@ BuildRequires: ncurses-devel BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel +%if 0%{?suse_version} <= 1230 +BuildRequires: pkgconfig(systemd) +%else BuildRequires: systemd-rpm-macros +%endif BuildRequires: utempter-devel BuildRequires: zlib-devel -Version: 2.23.2 +Version: 2.24 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -60,7 +65,7 @@ Recommends: %{name}-lang = %{version} Summary: A collection of basic system utilities License: GPL-2.0+ Group: System/Base -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/%{name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/%{name}-%{version}.tar.xz Source1: util-linux-rpmlintrc # XXX: make nologin part of util-linux upstream Source2: nologin.c @@ -73,7 +78,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/%{name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/%{name}-%{version}.tar.sign Source13: %{name}.keyring # TODO: split to separate package Source40: klogconsole.tar.bz2 @@ -93,19 +98,10 @@ Source51: blkid.conf ## util-linux patches ## # 241372 - remove legacy warnings from fdisk -Patch1: util-linux-2.23.1-fdisk_remove_bogus_warnings.patch +Patch1: util-linux-2.24-fdisk_remove_bogus_warnings.patch Patch2: util-linux-2.23.1-eject-fpie.patch -Patch3: fdisk-tinfo.patch # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff -# PATCH-FIX-UPSTREAM eject-scsi-check-host_status-and-driver_status.patch bnc358033 anicka@suse.cz -- Check eject host_status and driver_status when using SG_IO. -Patch5: eject-scsi-check-host_status-and-driver_status.patch -# PATCH-FIX-UPSTREAM more-fix-buffer-overflow.patch bnc839720 mgorse@suse.com -- More: Fix under-allocation of memory. -Patch6: more-fix-buffer-overflow.patch -# PATCH-FIX-UPSTREAM more-check-for-buffer-size-when-write-multibyte-char.patch bnc839720 mgorse@suse.com -Patch7: more-check-for-buffer-size-when-write-multibyte-char.patch -# PATCH-FIX-UPSTREAM more-guarantee-space-for-multibyte.patch bnc839720 mgorse@suse.com -Patch8: more-guarantee-space-for-multibyte.patch # disable encryption Patch12: util-linux-2.23.1-noenc-suse.diff # PATCH-FIX-UPSTREAM blkdiscard-BLKSSZGET-fills-in-an-int.patch tytso@mit.edu @@ -226,12 +222,7 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %setup -q -n %{name}-%{version} -b 40 %patch1 -p1 %patch2 -p1 -%patch3 -p1 %patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 %patch12 -p1 %patch13 -p1 %patch14 -p0 @@ -273,6 +264,7 @@ autoreconf -fi export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" %configure \ + --docdir=%{_docdir}/%{name} \ --with-audit \ --with-gnu-ld \ --with-ncurses \ @@ -288,6 +280,11 @@ export SUID_LDFLAGS="-pie" --enable-new-mount \ --enable-login-utils \ --enable-tunelp \ +%if %{with enable_last} + --enable-last \ +%else + --disable-last \ +%endif --enable-logger \ %if %{with enable_eject} --enable-eject \ @@ -320,6 +317,13 @@ make %{?_smp_mflags} %{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29} %{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31} +%check +if ! make check; then + echo "cat test diffs:" + find tests/diff -type f | xargs -r cat + #exit 1 +fi + %install mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid/ @@ -406,6 +410,9 @@ chmod 755 %{buildroot}%{_sbindir}/flushb install -m 644 $RPM_SOURCE_DIR%{_sysconfdir}.raw %{buildroot}%{_sysconfdir}/raw install -m 755 $RPM_SOURCE_DIR/raw.init %{buildroot}%{_initddir}/raw ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw +# upstream moved getopt examples from datadir to docdir but we keep +# the old location because we would need to fix the manpage first +mv %{buildroot}%{_docdir}/%{name}/getopt %{buildroot}%{_datadir}/ # Stupid hack so we don't have a tcsh dependency chmod 644 %{buildroot}%{_datadir}/getopt/getopt*.tcsh # Following files we don't want to package, so remove them @@ -475,9 +482,6 @@ ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd %post %{fillup_and_insserv raw} -%if 0%{?suse_version} <= 1130 -%run_permissions -%else %set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount %if %{with enable_su} %set_permissions %{_bindir}/su @@ -502,7 +506,6 @@ done %if %{with enable_eject} %set_permissions %{_bindir}/eject %endif -%endif # mount option 'code=' is now called 'codepage=' so change fstab if [ -f etc/fstab ]; then @@ -540,11 +543,7 @@ fi %post -n uuidd %{fillup_and_insserv -n uuidd} -%if 0%{?suse_version} <= 1130 -%run_permissions -%else %set_permissions %{_sbindir}/uuidd -%endif %postun -n uuidd %{restart_on_update uuidd} @@ -631,8 +630,12 @@ fi %{_bindir}/su %endif %if %{with enable_eject} +%if 0%{?suse_version} <= 1310 +%verify(not mode) %attr(4750,root,audio) %{_bindir}/eject +%else %{_bindir}/eject %endif +%endif %{_bindir}/cal %{_bindir}/chrt %{_bindir}/col @@ -650,6 +653,10 @@ fi %{_bindir}/ipcrm %{_bindir}/ipcs %{_bindir}/isosize +%if %{with enable_last} +%{_bindir}/last +%{_bindir}/lastb +%endif %{_bindir}/line %{_bindir}/logger %{_bindir}/look @@ -746,6 +753,10 @@ fi %{_mandir}/man1/hexdump.1.gz %{_mandir}/man1/ipcrm.1.gz %{_mandir}/man1/ipcs.1.gz +%if %{with enable_last} +%{_mandir}/man1/last.1.gz +%{_mandir}/man1/lastb.1.gz +%endif %{_mandir}/man1/line.1.gz %{_mandir}/man1/logger.1.gz %{_mandir}/man1/login.1.gz From 5b6c15d996a8acc01b382b1039070105d94568c5393d2a2d3eff434ae9857369 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 13 Jan 2014 15:53:16 +0000 Subject: [PATCH 166/211] Accepting request 213474 from Base:System - Add patch agetty-fooled-on-serial-line-due-plymouth.patch even with TTYReset=no it seems with systemd or plymouth the termios flags become changed from under the first agetty on a serial system console as the flags are locked (bnc#774126). OBS-URL: https://build.opensuse.org/request/show/213474 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=174 --- ...y-fooled-on-serial-line-due-plymouth.patch | 101 ++++++++++++++++++ util-linux.changes | 9 ++ util-linux.spec | 5 +- 3 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 agetty-fooled-on-serial-line-due-plymouth.patch diff --git a/agetty-fooled-on-serial-line-due-plymouth.patch b/agetty-fooled-on-serial-line-due-plymouth.patch new file mode 100644 index 0000000..8efb5e8 --- /dev/null +++ b/agetty-fooled-on-serial-line-due-plymouth.patch @@ -0,0 +1,101 @@ +Even with TTYReset=no it seems with systemd or plymouth the termios +flags become changed from under the first agetty on a serial system +console as the flags are locked. + +--- + agetty.c | 39 ++++++++++++++++++++++++++++++++------- + 1 file changed, 32 insertions(+), 7 deletions(-) + +--- term-utils/agetty.c ++++ term-utils/agetty.c 2014-01-10 13:05:50.411075349 +0000 +@@ -281,8 +281,9 @@ static void login_options_to_argv(char * + static char *fakehost; + + #ifdef DEBUGGING ++# include "closestream.h" + # ifndef DEBUG_OUTPUT +-# define DEBUG_OUTPUT "/dev/ttyp0" ++# define DEBUG_OUTPUT "/dev/tty10" + # endif + # define debug(s) do { fprintf(dbf,s); fflush(dbf); } while (0) + FILE *dbf; +@@ -320,8 +321,12 @@ int main(int argc, char **argv) + + #ifdef DEBUGGING + dbf = fopen(DEBUG_OUTPUT, "w"); +- for (int i = 1; i < argc; i++) ++ for (int i = 1; i < argc; i++) { ++ if (i > 1) ++ debug(" "); + debug(argv[i]); ++ } ++ debug("\n"); + #endif /* DEBUGGING */ + + /* Parse command-line arguments. */ +@@ -473,7 +478,6 @@ int main(int argc, char **argv) + if (options.osrelease) + free(options.osrelease); + #ifdef DEBUGGING +- fprintf(dbf, "read %c\n", ch); + if (close_stream(dbf) != 0) + log_err("write failed: %s", DEBUG_OUTPUT); + #endif +@@ -1090,6 +1094,23 @@ static void termio_init(struct options * + { + speed_t ispeed, ospeed; + struct winsize ws; ++ int i; ++ ++ for (i = 0; i < 20; i++) { ++ /* ++ * Even with TTYReset=no it seems with systemd or plymouth ++ * the termios flags become changed from under the first ++ * agetty on a serial system console as the flags are locked. ++ */ ++ struct termios lock; ++ memset(&lock, 0, sizeof(struct termios)); ++ if (ioctl(STDIN_FILENO, TIOCGLCKTRMIOS, &lock) < 0) ++ break; ++ if (!lock.c_iflag && !lock.c_oflag && !lock.c_cflag && !lock.c_lflag) ++ break; ++ debug("termios locked\n"); ++ tcsendbreak(STDIN_FILENO, 0); /* 0.25 upto 0.5 seconds */ ++ } + + if (op->flags & F_VCONSOLE) { + #if defined(IUTF8) && defined(KDGKBMODE) +@@ -1154,9 +1175,6 @@ static void termio_init(struct options * + * later on. + */ + +- /* Flush input and output queues, important for modems! */ +- tcflush(STDIN_FILENO, TCIOFLUSH); +- + #ifdef IUTF8 + tp->c_iflag = tp->c_iflag & IUTF8; + if (tp->c_iflag & IUTF8) +@@ -1216,8 +1234,11 @@ static void termio_init(struct options * + if (op->flags & F_RTSCTS) + tp->c_cflag |= CRTSCTS; + #endif ++ /* Flush input and output queues, important for modems! */ ++ tcflush(STDIN_FILENO, TCIOFLUSH); + +- tcsetattr(STDIN_FILENO, TCSANOW, tp); ++ if (tcsetattr(STDIN_FILENO, TCSANOW, tp)) ++ log_warn(_("setting terminal attributes failed: %m")); + + /* Go to blocking input even in local mode. */ + fcntl(STDIN_FILENO, F_SETFL, +@@ -1238,6 +1259,10 @@ static void reset_vc(const struct option + + if (tcsetattr(STDIN_FILENO, TCSADRAIN, tp)) + log_warn(_("setting terminal attributes failed: %m")); ++ ++ /* Go to blocking input even in local mode. */ ++ fcntl(STDIN_FILENO, F_SETFL, ++ fcntl(STDIN_FILENO, F_GETFL, 0) & ~O_NONBLOCK); + } + + /* Extract baud rate from modem status message. */ diff --git a/util-linux.changes b/util-linux.changes index baf13a7..19f0687 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Jan 10 13:08:45 UTC 2014 - werner@suse.de + +- Add patch + agetty-fooled-on-serial-line-due-plymouth.patch + even with TTYReset=no it seems with systemd or plymouth the termios + flags become changed from under the first agetty on a serial system + console as the flags are locked (bnc#774126). + ------------------------------------------------------------------- Tue Dec 10 16:10:27 UTC 2013 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index ead67ef..8faf5c7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -108,6 +108,8 @@ Patch12: util-linux-2.23.1-noenc-suse.diff Patch13: blkdiscard-BLKSSZGET-fills-in-an-int.patch # PATCH-FIX-SUSE -- better support of S390 in agetty Patch14: tty3270-on-serial-line-of-s390.patch +# PATCH-FIX-SUSE -- Let agetty not be fooled by locked termios srtucture +Patch15: agetty-fooled-on-serial-line-due-plymouth.patch # hack for boot.localfs Patch20: util-linux-HACK-boot.localfs.diff @@ -226,6 +228,7 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch12 -p1 %patch13 -p1 %patch14 -p0 +%patch15 -p0 # %patch20 -p1 # From 65c9b2b788220ac689a316f953206717c35f8518aa736d30448670194381a2a5 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 17 Jan 2014 10:17:28 +0000 Subject: [PATCH 167/211] Accepting request 213763 from Base:System - Ensure localstatedir value used by configure is /run (changed to that value upstream since 2012). (forwarded request 213676 from fcrozat) OBS-URL: https://build.opensuse.org/request/show/213763 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=175 --- util-linux.changes | 6 ++++++ util-linux.spec | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index 19f0687..d1f4778 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 13 10:45:54 CET 2014 - fcrozat@suse.com + +- Ensure localstatedir value used by configure is /run (changed to that + value upstream since 2012). + ------------------------------------------------------------------- Fri Jan 10 13:08:45 UTC 2014 - werner@suse.de diff --git a/util-linux.spec b/util-linux.spec index 8faf5c7..9c8f185 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -266,7 +266,10 @@ fi autoreconf -fi export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" +# override default localstatedir to /run +# only used for volatile data %configure \ + --localstatedir=/run \ --docdir=%{_docdir}/%{name} \ --with-audit \ --with-gnu-ld \ @@ -330,7 +333,7 @@ fi %install mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid/ -mkdir -p %{buildroot}%{_localstatedir}/run/uuidd/ +mkdir -p %{buildroot}/run/uuidd/ install -m 744 %{SOURCE50} %{buildroot}%{_initddir}/uuidd install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login @@ -915,7 +918,7 @@ fi %verify(not mode) %attr(0755,root,root) %{_sbindir}/uuidd %attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid %ghost %{_localstatedir}/lib/libuuid/clock.txt -%attr(-,uuidd,uuidd) %ghost %dir %{_localstatedir}/run/uuidd +%attr(-,uuidd,uuidd) %ghost %dir /run/uuidd %{_initddir}/uuidd %{_mandir}/man8/uuidd.8.gz %{_sbindir}/rcuuidd From 3bdb207355c6ef58cbe94da21b10f6d2bfbc8ad90b13d05544d4a2f166bb9249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 27 Jan 2014 10:23:56 +0000 Subject: [PATCH 168/211] Accepting request 214769 from Base:System - Change patch agetty-fooled-on-serial-line-due-plymouth.patch to sleep instead of sending breaks to terminal (bnc#774126). OBS-URL: https://build.opensuse.org/request/show/214769 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=176 --- agetty-fooled-on-serial-line-due-plymouth.patch | 2 +- util-linux.changes | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/agetty-fooled-on-serial-line-due-plymouth.patch b/agetty-fooled-on-serial-line-due-plymouth.patch index 8efb5e8..dffe781 100644 --- a/agetty-fooled-on-serial-line-due-plymouth.patch +++ b/agetty-fooled-on-serial-line-due-plymouth.patch @@ -60,7 +60,7 @@ console as the flags are locked. + if (!lock.c_iflag && !lock.c_oflag && !lock.c_cflag && !lock.c_lflag) + break; + debug("termios locked\n"); -+ tcsendbreak(STDIN_FILENO, 0); /* 0.25 upto 0.5 seconds */ ++ sleep(1); + } if (op->flags & F_VCONSOLE) { diff --git a/util-linux.changes b/util-linux.changes index d1f4778..72afef4 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 23 12:40:06 UTC 2014 - werner@suse.de + +- Change patch agetty-fooled-on-serial-line-due-plymouth.patch + to sleep instead of sending breaks to terminal (bnc#774126). + ------------------------------------------------------------------- Mon Jan 13 10:45:54 CET 2014 - fcrozat@suse.com From 7ac4d4f90c717f567e498c2a7f4ffefdd38652b88f41fd97a4d02d1223b15900 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 30 Jan 2014 18:26:43 +0000 Subject: [PATCH 169/211] Accepting request 215478 from Base:System - Don't verify /usr/bin/eject, it lost the SUID bit and was dropped from /etc/permissions (bnc#824406) (forwarded request 215357 from saschpe) OBS-URL: https://build.opensuse.org/request/show/215478 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=177 --- util-linux.changes | 6 ++++++ util-linux.spec | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index 72afef4..6fbdb18 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 28 09:37:57 UTC 2014 - speilicke@suse.com + +- Don't verify /usr/bin/eject, it lost the SUID bit and was dropped + from /etc/permissions (bnc#824406) + ------------------------------------------------------------------- Thu Jan 23 12:40:06 UTC 2014 - werner@suse.de diff --git a/util-linux.spec b/util-linux.spec index 9c8f185..1656e70 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -527,9 +527,6 @@ fi %if %{with enable_su} %verify_permissions -e %{_bindir}/su %endif -%if %{with enable_eject} -%verify_permissions -e %{_bindir}/eject -%endif %post -n libblkid1 -p /sbin/ldconfig From 1383751f43b7e88b925993ed247854de39134d754aaeaab91b1732ff2a6d2296 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 6 Feb 2014 06:06:46 +0000 Subject: [PATCH 170/211] Accepting request 220785 from Base:System - Modify patch agetty-on-s390-on-dev--3270-tty1-line.patch and patch tty3270-on-serial-line-of-s390.patch to handle 3270 terminals - Really do not verify /usr/bin/eject - Add patch agetty-on-s390-on-dev--3270-tty1-line.patch to let agetty detect /dev/3270/tty1 as device not as baud rate OBS-URL: https://build.opensuse.org/request/show/220785 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=178 --- agetty-on-s390-on-dev-3270-tty1-line.patch | 37 ++++++++++++++++++++++ tty3270-on-serial-line-of-s390.patch | 2 +- util-linux.changes | 14 ++++++++ util-linux.spec | 6 ++-- 4 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 agetty-on-s390-on-dev-3270-tty1-line.patch diff --git a/agetty-on-s390-on-dev-3270-tty1-line.patch b/agetty-on-s390-on-dev-3270-tty1-line.patch new file mode 100644 index 0000000..98997df --- /dev/null +++ b/agetty-on-s390-on-dev-3270-tty1-line.patch @@ -0,0 +1,37 @@ +Be aware that on s390 the 3270 terminal line is found at +/dev/3270/tty. That is that the baud speed rate numbers +have to be identified in a unique way. + +--- + agetty.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- term-utils/agetty.c ++++ term-utils/agetty.c 2014-02-04 09:33:13.162735763 +0000 +@@ -568,6 +568,8 @@ static void login_options_to_argv(char * + *argc = i; + } + ++#define is_speed(str) (strlen((str)) == strspn((str), "0123456789,")) ++ + /* Parse command-line arguments. */ + static void parse_args(int argc, char **argv, struct options *op) + { +@@ -746,7 +748,7 @@ static void parse_args(int argc, char ** + } + + /* Accept "tty", "baudrate tty", and "tty baudrate". */ +- if ('0' <= argv[optind][0] && argv[optind][0] <= '9') { ++ if (is_speed(argv[optind])) { + /* Assume BSD style speed. */ + parse_speeds(op, argv[optind++]); + if (argc < optind + 1) { +@@ -758,7 +760,7 @@ static void parse_args(int argc, char ** + op->tty = argv[optind++]; + if (argc > optind) { + char *v = argv[optind++]; +- if ('0' <= *v && *v <= '9') ++ if (is_speed(v)) + parse_speeds(op, v); + else + op->speeds[op->numspeed++] = bcode("9600"); diff --git a/tty3270-on-serial-line-of-s390.patch b/tty3270-on-serial-line-of-s390.patch index 57ae1b2..8e5b4d2 100644 --- a/tty3270-on-serial-line-of-s390.patch +++ b/tty3270-on-serial-line-of-s390.patch @@ -32,7 +32,7 @@ is compatible with VT220. + * higher. Whereas the second serial line on a S/390(x) is + * a real character terminal which is compatible with VT220. + */ -+ if (strcmp(op->tty, "ttyS0") == 0) ++ if (strcmp(op->tty, "ttyS0") == 0 || strncmp(op->tty, "3270/tty", 8) == 0) + op->term = DEFAULT_TTYS0; + else if (strcmp(op->tty, "ttyS1") == 0) + op->term = DEFAULT_TTYS1; diff --git a/util-linux.changes b/util-linux.changes index 6fbdb18..8517585 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Tue Feb 4 10:24:02 UTC 2014 - werner@suse.de + +- Modify patch agetty-on-s390-on-dev--3270-tty1-line.patch and + patch tty3270-on-serial-line-of-s390.patch to handle 3270 + terminals +- Really do not verify /usr/bin/eject + +------------------------------------------------------------------- +Mon Feb 3 16:16:36 UTC 2014 - werner@suse.de + +- Add patch agetty-on-s390-on-dev--3270-tty1-line.patch + to let agetty detect /dev/3270/tty1 as device not as baud rate + ------------------------------------------------------------------- Tue Jan 28 09:37:57 UTC 2014 - speilicke@suse.com diff --git a/util-linux.spec b/util-linux.spec index 1656e70..07fef46 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -110,6 +110,8 @@ Patch13: blkdiscard-BLKSSZGET-fills-in-an-int.patch Patch14: tty3270-on-serial-line-of-s390.patch # PATCH-FIX-SUSE -- Let agetty not be fooled by locked termios srtucture Patch15: agetty-fooled-on-serial-line-due-plymouth.patch +# PATCH-FIX-SUSE -- Let agetty detect /dev/3270/tty1 as device not as baud rate +Patch16: agetty-on-s390-on-dev-3270-tty1-line.patch # hack for boot.localfs Patch20: util-linux-HACK-boot.localfs.diff @@ -229,6 +231,7 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch13 -p1 %patch14 -p0 %patch15 -p0 +%patch16 -p0 # %patch20 -p1 # @@ -509,9 +512,6 @@ for PAM_FILE in default/su pam.d/su pam.d/su-l ; do fi done %endif -%if %{with enable_eject} -%set_permissions %{_bindir}/eject -%endif # mount option 'code=' is now called 'codepage=' so change fstab if [ -f etc/fstab ]; then From 9afc78f8566c1a4fb971e8b2e00af3c733a9dbe2e8a076c84ff15686ce4e9bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sun, 9 Feb 2014 12:18:02 +0000 Subject: [PATCH 171/211] Accepting request 221269 from Base:System - Add patch sulogin-does-not-find-any-console.patch to enable sulogin to find suitable console device even if first is not usable (bnc#862078) - Avoid that hanging plymouth locks terminal lines that is add patch sulogin-fooled-on-tty-line-due-plymouth.patch and modify patch agetty-fooled-on-serial-line-due-plymouth.patch to remove any lock which had been left over. OBS-URL: https://build.opensuse.org/request/show/221269 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=179 --- ...y-fooled-on-serial-line-due-plymouth.patch | 12 ++++--- sulogin-does-not-find-any-console.patch | 32 ++++++++++++++++++ sulogin-fooled-on-tty-line-due-plymouth.patch | 33 +++++++++++++++++++ util-linux.changes | 14 ++++++++ util-linux.spec | 6 ++++ 5 files changed, 92 insertions(+), 5 deletions(-) create mode 100644 sulogin-does-not-find-any-console.patch create mode 100644 sulogin-fooled-on-tty-line-due-plymouth.patch diff --git a/agetty-fooled-on-serial-line-due-plymouth.patch b/agetty-fooled-on-serial-line-due-plymouth.patch index dffe781..2d69aa0 100644 --- a/agetty-fooled-on-serial-line-due-plymouth.patch +++ b/agetty-fooled-on-serial-line-due-plymouth.patch @@ -41,10 +41,11 @@ console as the flags are locked. if (close_stream(dbf) != 0) log_err("write failed: %s", DEBUG_OUTPUT); #endif -@@ -1090,6 +1094,23 @@ static void termio_init(struct options * +@@ -1090,6 +1094,25 @@ static void termio_init(struct options * { speed_t ispeed, ospeed; struct winsize ws; ++ struct termios lock; + int i; + + for (i = 0; i < 20; i++) { @@ -53,7 +54,6 @@ console as the flags are locked. + * the termios flags become changed from under the first + * agetty on a serial system console as the flags are locked. + */ -+ struct termios lock; + memset(&lock, 0, sizeof(struct termios)); + if (ioctl(STDIN_FILENO, TIOCGLCKTRMIOS, &lock) < 0) + break; @@ -62,10 +62,12 @@ console as the flags are locked. + debug("termios locked\n"); + sleep(1); + } ++ memset(&lock, 0, sizeof(struct termios)); ++ ioctl(STDIN_FILENO, TIOCSLCKTRMIOS, &lock); if (op->flags & F_VCONSOLE) { #if defined(IUTF8) && defined(KDGKBMODE) -@@ -1154,9 +1175,6 @@ static void termio_init(struct options * +@@ -1154,9 +1177,6 @@ static void termio_init(struct options * * later on. */ @@ -75,7 +77,7 @@ console as the flags are locked. #ifdef IUTF8 tp->c_iflag = tp->c_iflag & IUTF8; if (tp->c_iflag & IUTF8) -@@ -1216,8 +1234,11 @@ static void termio_init(struct options * +@@ -1216,8 +1236,11 @@ static void termio_init(struct options * if (op->flags & F_RTSCTS) tp->c_cflag |= CRTSCTS; #endif @@ -88,7 +90,7 @@ console as the flags are locked. /* Go to blocking input even in local mode. */ fcntl(STDIN_FILENO, F_SETFL, -@@ -1238,6 +1259,10 @@ static void reset_vc(const struct option +@@ -1238,6 +1261,10 @@ static void reset_vc(const struct option if (tcsetattr(STDIN_FILENO, TCSADRAIN, tp)) log_warn(_("setting terminal attributes failed: %m")); diff --git a/sulogin-does-not-find-any-console.patch b/sulogin-does-not-find-any-console.patch new file mode 100644 index 0000000..77ed85c --- /dev/null +++ b/sulogin-does-not-find-any-console.patch @@ -0,0 +1,32 @@ +Enable sulogin to find a suitable console device even if the first line +in /proc/consoles does not have any major and minor number (bnc#862078) + +--- + sulogin-consoles.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- login-utils/sulogin-consoles.c ++++ login-utils/sulogin-consoles.c 2014-02-07 15:47:14.246235487 +0000 +@@ -319,7 +319,7 @@ static int detect_consoles_from_proc(str + char fbuf[16 + 1]; + DIR *dir = NULL; + FILE *fc = NULL; +- int maj, min, rc = 1; ++ int maj, min, rc = 1, matches; + + DBG(dbgprint("trying /proc")); + +@@ -332,10 +332,12 @@ static int detect_consoles_from_proc(str + if (!dir) + goto done; + +- while (fscanf(fc, "%*s %*s (%16[^)]) %d:%d", fbuf, &maj, &min) == 3) { ++ while ((matches = fscanf(fc, "%*s %*s (%16[^)]) %d:%d", fbuf, &maj, &min)) >= 1) { + char *name; + dev_t comparedev; + ++ if (matches != 3) ++ continue; + if (!strchr(fbuf, 'E')) + continue; + comparedev = makedev(maj, min); diff --git a/sulogin-fooled-on-tty-line-due-plymouth.patch b/sulogin-fooled-on-tty-line-due-plymouth.patch new file mode 100644 index 0000000..45c111d --- /dev/null +++ b/sulogin-fooled-on-tty-line-due-plymouth.patch @@ -0,0 +1,33 @@ +Make sure that plymouth does not break sulogin. + +--- + sulogin.c | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +--- login-utils/sulogin.c ++++ login-utils/sulogin.c 2014-02-06 09:39:57.726236116 +0000 +@@ -83,7 +83,23 @@ static void tcinit(struct console *con) + { + int mode = 0, flags = 0; + struct termios *tio = &con->tio; +- int fd = con->fd; ++ struct termios lock; ++ int i, fd = con->fd; ++ ++ for (i = 0; i < 5; i++) { ++ /* ++ * With plymouth the termios flags become changed after this ++ * function had changed the termios. ++ */ ++ memset(&lock, 0, sizeof(struct termios)); ++ if (ioctl(fd, TIOCGLCKTRMIOS, &lock) < 0) ++ break; ++ if (!lock.c_iflag && !lock.c_oflag && !lock.c_cflag && !lock.c_lflag) ++ break; ++ sleep(1); ++ } ++ memset(&lock, 0, sizeof(struct termios)); ++ ioctl(fd, TIOCSLCKTRMIOS, &lock); + + errno = 0; + diff --git a/util-linux.changes b/util-linux.changes index 8517585..93dab9e 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Fri Feb 7 15:59:20 UTC 2014 - werner@suse.de + +- Add patch sulogin-does-not-find-any-console.patch to enable sulogin + to find suitable console device even if first is not usable (bnc#862078) + +------------------------------------------------------------------- +Thu Feb 6 10:03:30 UTC 2014 - werner@suse.de + +- Avoid that hanging plymouth locks terminal lines that is + add patch sulogin-fooled-on-tty-line-due-plymouth.patch and + modify patch agetty-fooled-on-serial-line-due-plymouth.patch + to remove any lock which had been left over. + ------------------------------------------------------------------- Tue Feb 4 10:24:02 UTC 2014 - werner@suse.de diff --git a/util-linux.spec b/util-linux.spec index 07fef46..5179b37 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -112,6 +112,10 @@ Patch14: tty3270-on-serial-line-of-s390.patch Patch15: agetty-fooled-on-serial-line-due-plymouth.patch # PATCH-FIX-SUSE -- Let agetty detect /dev/3270/tty1 as device not as baud rate Patch16: agetty-on-s390-on-dev-3270-tty1-line.patch +# PATCH-FIX-SUSE -- Make sure that plymouth does not break sulogin +Patch17: sulogin-fooled-on-tty-line-due-plymouth.patch +# PATCH-FIX-SUSE -- sulogin: find suitable console device even if first is not usable +Patch18: sulogin-does-not-find-any-console.patch # hack for boot.localfs Patch20: util-linux-HACK-boot.localfs.diff @@ -232,6 +236,8 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch14 -p0 %patch15 -p0 %patch16 -p0 +%patch17 -p0 +%patch18 -p0 # %patch20 -p1 # From eb15c584136a48211eaad230bd9967fcf0100de83b5e57ee9c0cdfe9e05e40a2 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sat, 15 Feb 2014 16:23:05 +0000 Subject: [PATCH 172/211] Accepting request 222119 from Base:System util-linux 2.24.1 (forwarded request 221543 from AndreasStieger) OBS-URL: https://build.opensuse.org/request/show/222119 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=180 --- blkdiscard-BLKSSZGET-fills-in-an-int.patch | 27 ----- tty3270-on-serial-line-of-s390.patch | 31 ++---- util-linux-2.24.1.tar.sign | 17 +++ util-linux-2.24.1.tar.xz | 3 + util-linux-2.24.tar.sign | 17 --- util-linux-2.24.tar.xz | 3 - util-linux.changes | 120 +++++++++++++++++++++ util-linux.spec | 7 +- 8 files changed, 153 insertions(+), 72 deletions(-) delete mode 100644 blkdiscard-BLKSSZGET-fills-in-an-int.patch create mode 100644 util-linux-2.24.1.tar.sign create mode 100644 util-linux-2.24.1.tar.xz delete mode 100644 util-linux-2.24.tar.sign delete mode 100644 util-linux-2.24.tar.xz diff --git a/blkdiscard-BLKSSZGET-fills-in-an-int.patch b/blkdiscard-BLKSSZGET-fills-in-an-int.patch deleted file mode 100644 index 7ce7143..0000000 --- a/blkdiscard-BLKSSZGET-fills-in-an-int.patch +++ /dev/null @@ -1,27 +0,0 @@ -Subject: [PATCH] blkdiscard: BLKSSZGET fills in an int, not a uint64 -Message-ID: 1383435966-29337-1-git-send-email-tytso@mit.edu - -Reported-by: Jason Cipriani -Signed-off-by: "Theodore Ts'o" ---- - sys-utils/blkdiscard.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/sys-utils/blkdiscard.c b/sys-utils/blkdiscard.c -index af9ed66..2ddcdb1 100644 ---- a/sys-utils/blkdiscard.c -+++ b/sys-utils/blkdiscard.c -@@ -70,8 +70,8 @@ static void __attribute__((__noreturn__)) usage(FILE *out) - int main(int argc, char **argv) - { - char *path; -- int c, fd, verbose = 0, secure = 0; -- uint64_t end, blksize, secsize, range[2]; -+ int c, fd, verbose = 0, secure = 0, secsize; -+ uint64_t end, blksize, range[2]; - struct stat sb; - - static const struct option longopts[] = { --- -1.7.12.rc0.22.gcdd159b - diff --git a/tty3270-on-serial-line-of-s390.patch b/tty3270-on-serial-line-of-s390.patch index 8e5b4d2..891682a 100644 --- a/tty3270-on-serial-line-of-s390.patch +++ b/tty3270-on-serial-line-of-s390.patch @@ -4,25 +4,16 @@ the second serial line on a S/390(x) is a real character terminal which is compatible with VT220. --- - agetty.c | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) + term-utils/agetty.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) ---- term-utils/agetty.c -+++ term-utils/agetty.c 2013-11-29 11:57:11.000000000 +0000 -@@ -49,6 +49,10 @@ - # ifndef DEFAULT_VCTERM - # define DEFAULT_VCTERM "linux" - # endif -+# if defined (__s390__) || defined (__s390x__) -+# define DEFAULT_TTYS0 "ibm327x" -+# define DEFAULT_TTYS1 "vt220" -+# endif - # ifndef DEFAULT_STERM - # define DEFAULT_STERM "vt102" - # endif -@@ -983,6 +987,20 @@ static void open_tty(char *tty, struct t - if (tcgetattr(STDIN_FILENO, tp) < 0) - log_err(_("%s: failed to get terminal attributes: %m"), tty); +Index: util-linux-2.24.1/term-utils/agetty.c +=================================================================== +--- util-linux-2.24.1.orig/term-utils/agetty.c 2014-02-09 21:19:01.000000000 +0000 ++++ util-linux-2.24.1/term-utils/agetty.c 2014-02-09 21:19:27.000000000 +0000 +@@ -1042,6 +1042,20 @@ static void open_tty(char *tty, struct t + /* make stdio unbuffered for slow modem lines */ + setvbuf(stdout, NULL, _IONBF, 0); +#if defined (__s390__) || defined (__s390x__) + if (!op->term) { @@ -39,5 +30,5 @@ is compatible with VT220. + } +#endif /* - * Detect if this is a virtual console or serial/modem line. - * In case of a virtual console the ioctl TIOCMGET fails and + * The following ioctl will fail if stdin is not a tty, but also when + * there is noise on the modem control lines. In the latter case, the diff --git a/util-linux-2.24.1.tar.sign b/util-linux-2.24.1.tar.sign new file mode 100644 index 0000000..b4d8f10 --- /dev/null +++ b/util-linux-2.24.1.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIcBAABAgAGBQJS3R7fAAoJEOS3HV7sOcKEODUP/2BqIqmRfuqP9rJkwQ5K19pk +vpoVSNIPVgcjkImP+CAz6PGkLGBjCEeVurY0QgblebVFgowK430LaejW5uwrz9ca +5OWqmDJXxrUQWDj9HLmABNkOclAtgT/BF8gt+J2uB8HWcVHKt8PKc6guX4+KJ3vE +Ct6kQcE7gWFxdQtdrBodst4546YDABasqxZncoz+AaakJW5IM70nmfKrzoEV1Seu +BQHivazmJMdHgPlUaz2Ujl6NPcQ4QtdKCWc0f0EkwaN1jSP7ArWPBQZdDynA6vRv +qkQ3JC4VBoxec9AMUVDSqy09kXhP6jxDMqLJ29JRi2EJ8MeNh9naT7snSvejaX1e +plbJARuRAyRSlFDhunFydAQXNHjLfAI4TME2TbRi9z+pYLbcuiHfq2eJQXPZAaHL +BY3esejflzytLpQ5ABDDGRNJhLIZgF9dUYElVHONC5oTA/TnzuzhLxzcY2QENHtr +mZoJhlR+7hyyLTFWWdACGGFextwdl2Qjxeh6zw911QKRSu64qn3Velg3Hm21CYYB +s0CpWVHxKnTJ9wIOY6unZuqDSg2fElXJpwD8EYzts/dxhZ08bCFulrPoYQsFcajm +amAf03xKz6akRp4pc5061Yprl/0jDIRYjuttFpFVLrB32lZiBrzN+hMjF4ioDorh +6U6NLJVF4YRXQ6gTfVf3 +=gxA/ +-----END PGP SIGNATURE----- diff --git a/util-linux-2.24.1.tar.xz b/util-linux-2.24.1.tar.xz new file mode 100644 index 0000000..a91ea25 --- /dev/null +++ b/util-linux-2.24.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:835eb6232cfab0118ef2e4fd649de0ba9f5bd1b8cbf9a7d4d84594541dec8410 +size 3543692 diff --git a/util-linux-2.24.tar.sign b/util-linux-2.24.tar.sign deleted file mode 100644 index ed3d37f..0000000 --- a/util-linux-2.24.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.15 (GNU/Linux) - -iQIcBAABAgAGBQJSZS9lAAoJEOS3HV7sOcKEVVEP/25GXdItGSiajLPnWumK5QDl -eVMqhCtqnS7cR+WcOr3S11ngE2wpZyp63ednBrQnK+OZRNvyJaXTqqQ8+naYZ86G -gfK+EtnBOemuUS9yFSLEjseJvBJoRsSWSoJyA5w3id0exiLJiziAM/KTNKvzbPuK -QX09CtUDNWCFuV/wzYSa0Ur7MMk+dZkxb+e9gm0TKhaz4XMr4LXgv+nApTp6LVnO -6DMrFid7kuQrvXdZya04T7GSuev7sLslsiVzWlwVM+aD+jKBTqQeBarb39/vok6n -JlbJl1M8EwwIkwuLL+BoBsioNXBLRB/vhRcbiyx3DNY0n/1Glm+DqbgSmv+FMvgo -wmp1T+q/8uoTN2moi8TKeGMvt2rdf9VRAMBqeUwryqfCZKwAw/koQQmfCN/5oqtX -2uggYFaZPGgDS/ovoOads8Gee7NXkKLW81Yn7WtLUiDSkt4kyVYCaqhthGvkAUtG -Fun9UtIaPr7V80g2VyxHZqitzjJn8zIdsxvLalJsB7HarZKAg3CpvB1G7MZaKEle -lOn/oCoPWGvbAEOjl4t4M3mgjitfmhBwVmhjal3pY0Oq844s1km8z096Xb8oOzdN -g+TzWvfn5dQO+SEIAUv+t2FEIgRQH0e+wMk0dR8rVy4YmcjVwsyoNTQ3sV4lTDTy -o4LwYqKNU+uQ6EmDsnZ2 -=6YN4 ------END PGP SIGNATURE----- diff --git a/util-linux-2.24.tar.xz b/util-linux-2.24.tar.xz deleted file mode 100644 index 3adc5b0..0000000 --- a/util-linux-2.24.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:30add9a8869cef9e5a76755214f074689b6294cea63f4569711faeb099aecc06 -size 3531936 diff --git a/util-linux.changes b/util-linux.changes index 93dab9e..e0f285e 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,4 +1,124 @@ ------------------------------------------------------------------- +Sun Feb 9 21:20:31 UTC 2014 - andreas.stieger@gmx.de + +- util-linux 2.24.1 +- agetty: + * support the special terminal on first serial line on a S/390 +- blkdiscard: + * BLKSSZGET fills in an int, not a uint64 +- blkid: + * escape quotes in the output + * simple typo +- blockdev: + * don't use HDIO_GETGEO +- build-sys: + * add --with-smack to config-gen.d + * fstrim depends on libmount +- chsh, chfn: + * add info about non-local support to the man pages +- dmesg: + * fix --raw zero timestamp for kmsg +- docs: + * add patching process to howto-contribute.txt + * update AUTHORS file + * update links to http //git.kernel.org/ web repository views + -fdisk: + * don't care about partition type + * fix printf stuff + * fix usage(), -l [] +- flock: + * Change the 'exit status' man page section to make more sense +- fsck: + * add ext4 to list of filesystems with progress bars in fsck man page +- fstrim: + * add --all to discard all filesystem + * cleanup usage() +- lib/path: + * add path_strdup() +- libblkid: + * (nilfs2) check also backup superblock + * detect alone PMBR + * fix memory leak in blkid_parse_tag_string() + * fix swap-area version +- libfdisk: + * (dos) be more verbose when change bootable flag + * (dos) fix free part counter + * (dos) warn on type 0 + * (gpt) add /home GUID + * (gpt) improve and cleanup recovery code + * (gpt) recover from corrupted primary/backup PT + * (sgi) generate partname according to partition position + * (sun) fix end sectors with +1 error +- libmount: + * add efivarfs to the list of pseudo filesystems + * add mnt_tag_is_valid() + * cleanup fix_optstr() regards to selinux and smack + * fix typo in smack path + * remove smackfs* option when SMACK not enabled +- lsblk: + * fix -D segfault +- lscpu: + * sort NUMA nodes to keep output human readable + * support discontinuous NUMA nodes + * support non sequentially numbering of CPUs +- man: + * Syntax and spelling fixes +- mkfs.minix: + * fix fscanf() format string [coverity scan] +- mkswap: + * fix compiler warning [-Wunused-variable] + * remove cruft from the man page +- mount: + * add note about "noauto" to --all description + * correct mount man page default iso9660 permission + * fix man mount page type + * improve -s man mage info + * make NAME=value tags usable for non-root + * mount.8 fix grammar + * update man page ext3/4 mount options +- partx: + * fix --update ranges and out of order tables +- po: + * merge changes + * update da.po (from translationproject.org) + * update de.po (from translationproject.org) + * update pt_BR.po (from translationproject.org) + * update zh_CN.po (from translationproject.org) +- pylibmount: + * correctly import from pylibmount.so + * import directly from pylibmount in tests + * remove unncessary subdirectory +- script: + * don't call TIOCGWINSZ in signal handler + * restore errno in signal handler + * use poll() rather then O_NONBLOCK +- setpriv: + * simplify usage() +- setterm: + * fix -dump man page info +- sulogin: + * use dirent->d_type when scans /dev +- taskset: + * fix PERMISSIONS section of taskset man page +- tests: + * update blkid swap tests + * update build-sys tests + * update lscpu tests +- textual: + * small inprovements to usage and man page of fstrim +- umount: + * fix umount by tag for non-roots +- unshare: + * add more hints about mount namespaces to the man page +- wipefs: + * call BLKRRPART when erase partition table +- removed patches: + * blkdiscard-BLKSSZGET-fills-in-an-int.patch, applied upstream +- modified patches: + * tty3270-on-serial-line-of-s390.patch, one hunk applied + upstream + +------------------------------------------------------------------ Fri Feb 7 15:59:20 UTC 2014 - werner@suse.de - Add patch sulogin-does-not-find-any-console.patch to enable sulogin diff --git a/util-linux.spec b/util-linux.spec index 5179b37..a943e1a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -47,7 +47,7 @@ BuildRequires: systemd-rpm-macros %endif BuildRequires: utempter-devel BuildRequires: zlib-devel -Version: 2.24 +Version: 2.24.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -104,8 +104,6 @@ Patch2: util-linux-2.23.1-eject-fpie.patch Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # disable encryption Patch12: util-linux-2.23.1-noenc-suse.diff -# PATCH-FIX-UPSTREAM blkdiscard-BLKSSZGET-fills-in-an-int.patch tytso@mit.edu -Patch13: blkdiscard-BLKSSZGET-fills-in-an-int.patch # PATCH-FIX-SUSE -- better support of S390 in agetty Patch14: tty3270-on-serial-line-of-s390.patch # PATCH-FIX-SUSE -- Let agetty not be fooled by locked termios srtucture @@ -232,8 +230,7 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch2 -p1 %patch4 -p1 %patch12 -p1 -%patch13 -p1 -%patch14 -p0 +%patch14 -p1 %patch15 -p0 %patch16 -p0 %patch17 -p0 From 886795613a5de747f6b1ef08b8c78d8d1c54e471d750552ad203247cc9ab7fc9 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sat, 15 Mar 2014 16:37:59 +0000 Subject: [PATCH 173/211] Accepting request 225791 from Base:System Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/225791 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=181 --- ...y-fooled-on-serial-line-due-plymouth.patch | 78 +++++++++++++++---- sulogin-fooled-on-tty-line-due-plymouth.patch | 51 ++++++++++-- util-linux.changes | 9 +++ 3 files changed, 118 insertions(+), 20 deletions(-) diff --git a/agetty-fooled-on-serial-line-due-plymouth.patch b/agetty-fooled-on-serial-line-due-plymouth.patch index 2d69aa0..2612439 100644 --- a/agetty-fooled-on-serial-line-due-plymouth.patch +++ b/agetty-fooled-on-serial-line-due-plymouth.patch @@ -3,12 +3,26 @@ flags become changed from under the first agetty on a serial system console as the flags are locked. --- - agetty.c | 39 ++++++++++++++++++++++++++++++++------- - 1 file changed, 32 insertions(+), 7 deletions(-) + agetty.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 68 insertions(+), 7 deletions(-) --- term-utils/agetty.c -+++ term-utils/agetty.c 2014-01-10 13:05:50.411075349 +0000 -@@ -281,8 +281,9 @@ static void login_options_to_argv(char * ++++ term-utils/agetty.c 2014-03-05 17:52:32.574235616 +0000 +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -276,13 +277,15 @@ static void log_warn (const char *, ...) + static ssize_t append(char *dest, size_t len, const char *sep, const char *src); + static void check_username (const char* nm); + static void login_options_to_argv(char *argv[], int *argc, char *str, char *username); ++static int plymouth_command(const char* arg); + + /* Fake hostname for ut_host specified on command line. */ static char *fakehost; #ifdef DEBUGGING @@ -19,7 +33,7 @@ console as the flags are locked. # endif # define debug(s) do { fprintf(dbf,s); fflush(dbf); } while (0) FILE *dbf; -@@ -320,8 +321,12 @@ int main(int argc, char **argv) +@@ -320,8 +323,12 @@ int main(int argc, char **argv) #ifdef DEBUGGING dbf = fopen(DEBUG_OUTPUT, "w"); @@ -33,7 +47,7 @@ console as the flags are locked. #endif /* DEBUGGING */ /* Parse command-line arguments. */ -@@ -473,7 +478,6 @@ int main(int argc, char **argv) +@@ -473,7 +480,6 @@ int main(int argc, char **argv) if (options.osrelease) free(options.osrelease); #ifdef DEBUGGING @@ -41,14 +55,14 @@ console as the flags are locked. if (close_stream(dbf) != 0) log_err("write failed: %s", DEBUG_OUTPUT); #endif -@@ -1090,6 +1094,25 @@ static void termio_init(struct options * +@@ -1104,6 +1110,27 @@ static void termio_init(struct options * { speed_t ispeed, ospeed; struct winsize ws; + struct termios lock; -+ int i; ++ int i = (plymouth_command("--ping") == 0) ? 30 : 0; + -+ for (i = 0; i < 20; i++) { ++ while (i-- > 0) { + /* + * Even with TTYReset=no it seems with systemd or plymouth + * the termios flags become changed from under the first @@ -60,14 +74,16 @@ console as the flags are locked. + if (!lock.c_iflag && !lock.c_oflag && !lock.c_cflag && !lock.c_lflag) + break; + debug("termios locked\n"); ++ if (i == 15 && plymouth_command("quit") != 0) ++ break; + sleep(1); + } -+ memset(&lock, 0, sizeof(struct termios)); -+ ioctl(STDIN_FILENO, TIOCSLCKTRMIOS, &lock); ++ memset(&lock, 0, sizeof(struct termios)); ++ ioctl(STDIN_FILENO, TIOCSLCKTRMIOS, &lock); if (op->flags & F_VCONSOLE) { #if defined(IUTF8) && defined(KDGKBMODE) -@@ -1154,9 +1177,6 @@ static void termio_init(struct options * +@@ -1168,9 +1195,6 @@ static void termio_init(struct options * * later on. */ @@ -77,7 +93,7 @@ console as the flags are locked. #ifdef IUTF8 tp->c_iflag = tp->c_iflag & IUTF8; if (tp->c_iflag & IUTF8) -@@ -1216,8 +1236,11 @@ static void termio_init(struct options * +@@ -1230,8 +1254,11 @@ static void termio_init(struct options * if (op->flags & F_RTSCTS) tp->c_cflag |= CRTSCTS; #endif @@ -90,7 +106,7 @@ console as the flags are locked. /* Go to blocking input even in local mode. */ fcntl(STDIN_FILENO, F_SETFL, -@@ -1238,6 +1261,10 @@ static void reset_vc(const struct option +@@ -1252,6 +1279,10 @@ static void reset_vc(const struct option if (tcsetattr(STDIN_FILENO, TCSADRAIN, tp)) log_warn(_("setting terminal attributes failed: %m")); @@ -101,3 +117,37 @@ console as the flags are locked. } /* Extract baud rate from modem status message. */ +@@ -2273,3 +2304,33 @@ err: + log_err(_("checkname failed: %m")); + } + ++/* ++ * For the case plymouth is found on this system ++ */ ++static int plymouth_command(const char* arg) ++{ ++ const char *cmd = "/usr/bin/plymouth"; ++ static int has_plymouth = 1; ++ pid_t pid; ++ ++ if (!has_plymouth) ++ return 127; ++ ++ pid = fork(); ++ if (!pid) { ++ int fd = open("/dev/null", O_RDWR); ++ dup2(fd, 0); ++ dup2(fd, 1); ++ dup2(fd, 2); ++ close(fd); ++ execl(cmd, cmd, arg, (char *) NULL); ++ exit(127); ++ } else if (pid > 0) { ++ int status; ++ waitpid(pid, &status, 0); ++ if (status == 127) ++ has_plymouth = 0; ++ return status; ++ } ++ return 1; ++} diff --git a/sulogin-fooled-on-tty-line-due-plymouth.patch b/sulogin-fooled-on-tty-line-due-plymouth.patch index 45c111d..cf6ad5f 100644 --- a/sulogin-fooled-on-tty-line-due-plymouth.patch +++ b/sulogin-fooled-on-tty-line-due-plymouth.patch @@ -1,20 +1,57 @@ Make sure that plymouth does not break sulogin. --- - sulogin.c | 18 +++++++++++++++++- - 1 file changed, 17 insertions(+), 1 deletion(-) + sulogin.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 50 insertions(+), 1 deletion(-) --- login-utils/sulogin.c -+++ login-utils/sulogin.c 2014-02-06 09:39:57.726236116 +0000 -@@ -83,7 +83,23 @@ static void tcinit(struct console *con) ++++ login-utils/sulogin.c 2014-03-05 17:42:40.442235465 +0000 +@@ -77,13 +77,62 @@ static volatile sig_atomic_t sigchild; + #endif + + /* ++ * For the case plymouth is found on this system ++ */ ++static int plymouth_command(const char* arg) ++{ ++ const char *cmd = "/usr/bin/plymouth"; ++ static int has_plymouth = 1; ++ pid_t pid; ++ ++ if (!has_plymouth) ++ return 127; ++ ++ pid = fork(); ++ if (!pid) { ++ int fd = open("/dev/null", O_RDWR); ++ dup2(fd, 0); ++ dup2(fd, 1); ++ dup2(fd, 2); ++ close(fd); ++ execl(cmd, cmd, arg, (char *) NULL); ++ exit(127); ++ } else if (pid > 0) { ++ int status; ++ waitpid(pid, &status, 0); ++ if (status == 127) ++ has_plymouth = 0; ++ return status; ++ } ++ return 1; ++} ++ ++/* + * Fix the tty modes and set reasonable defaults. + */ + static void tcinit(struct console *con) { int mode = 0, flags = 0; struct termios *tio = &con->tio; - int fd = con->fd; + struct termios lock; -+ int i, fd = con->fd; ++ int fd = con->fd, i = (plymouth_command("--ping")) ? 20 : 0; + -+ for (i = 0; i < 5; i++) { ++ while (i-- > 0) { + /* + * With plymouth the termios flags become changed after this + * function had changed the termios. @@ -24,6 +61,8 @@ Make sure that plymouth does not break sulogin. + break; + if (!lock.c_iflag && !lock.c_oflag && !lock.c_cflag && !lock.c_lflag) + break; ++ if (i == 15 && plymouth_command("quit") != 0) ++ break; + sleep(1); + } + memset(&lock, 0, sizeof(struct termios)); diff --git a/util-linux.changes b/util-linux.changes index e0f285e..03b811e 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Mar 6 09:43:34 UTC 2014 - werner@suse.de + +- Modify the patches + agetty-fooled-on-serial-line-due-plymouth.patch + sulogin-fooled-on-tty-line-due-plymouth.patch + to be able to disable plymouth if not already terminated due to + a hanging network service (bnc#866860) + ------------------------------------------------------------------- Sun Feb 9 21:20:31 UTC 2014 - andreas.stieger@gmx.de From 02e1738cc332a572f1154962589c043bb1dac0b7b784ed74d446a8abe2e2d2cf Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sat, 22 Mar 2014 06:49:49 +0000 Subject: [PATCH 174/211] Accepting request 226832 from Base:System - Merge fixes and features from SLE11 (bnc#831868): * Detect squashfs version <= 3 as squashfs3 and version >= 4 as squashfs. (mszeredi@suse.cz, util-linux-ng-2.16-squashfs3-detect.patch, bnc#666893) * add sfdisk-warn-about-2TB-limit.patch (puzel@novell.com, bnc#495657) * Document barrier option in mount.8 (jack@suse.cz, hvogel@suse.de, util-linux-ng-2.19.1-barrier_documentation.patch, bnc#489740) * lscpu: improve hypervisor detection (puzel@novell.com, fate#310255) - util-linux-lscpu-improve-hypervisor-detection.patch * umount: avoid calling readlink on mountpoints if not necessary - add: umount-avoid-readlink.patch (puzel@suse.com, bnc#794529) * fix file conflict between util-linux and s390-32 (puzel@suse.com, bnc#805684) * util-linux-update-default-commit-interval.patch: mount(8): update default commit interval (puzel@suse.com, bnc#809480) * Obsolete no more packaged uuid-runtime. - Add uname26 (util-linux-setarch-uname26.patch, FATE#313476). (forwarded request 226509 from sbrabec) OBS-URL: https://build.opensuse.org/request/show/226832 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=182 --- sfdisk-warn-about-2TB-limit.patch | 31 +++ umount-avoid-readlink.patch | 46 ++++ ...x-lscpu-improve-hypervisor-detection.patch | 229 ++++++++++++++++++ util-linux-ng-2.16-squashfs3-detect.patch | 118 +++++++++ ...inux-ng-2.19.1-barrier_documentation.patch | 131 ++++++++++ util-linux-setarch-uname26.patch | 25 ++ ...linux-update-default-commit-interval.patch | 30 +++ util-linux.changes | 25 ++ util-linux.spec | 34 ++- 9 files changed, 667 insertions(+), 2 deletions(-) create mode 100644 sfdisk-warn-about-2TB-limit.patch create mode 100644 umount-avoid-readlink.patch create mode 100644 util-linux-lscpu-improve-hypervisor-detection.patch create mode 100644 util-linux-ng-2.16-squashfs3-detect.patch create mode 100644 util-linux-ng-2.19.1-barrier_documentation.patch create mode 100644 util-linux-setarch-uname26.patch create mode 100644 util-linux-update-default-commit-interval.patch diff --git a/sfdisk-warn-about-2TB-limit.patch b/sfdisk-warn-about-2TB-limit.patch new file mode 100644 index 0000000..0759672 --- /dev/null +++ b/sfdisk-warn-about-2TB-limit.patch @@ -0,0 +1,31 @@ +Index: util-linux-2.19.1/fdisk/sfdisk.c +=================================================================== +--- util-linux-2.24.1.orig/fdisks/sfdisk.c ++++ util-linux-2.24.1/fdisks/sfdisk.c +@@ -1271,6 +1271,26 @@ partitions_ok(int fd, struct disk_desc * + return 0; + } + } ++ /* Are the data partitions and the extended partition ++ within the DOS 2TB limit? */ ++ for (p = partitions; p < partitions+partno; p++) { ++ if (p->size && !is_extended(p->p.sys_type)) { ++ if( p->size >= (unsigned long) 0xffffffff ) { ++ warn(_("Warning: partition %s of size %lu exceeds " ++ "msdos 2TB limit.\n"), ++ PNO(p), p->size); ++ return 0; ++ } ++ for (q = partitions; q < partitions+partno; q++) ++ if (is_extended(q->p.sys_type)) ++ if ( q->size >= (unsigned long) 0xffffffff ) { ++ warn(_("Warning: partition %s of size %lu exceeds " ++ "msdos 2TB limit.\n"), ++ PNO(q), q->size); ++ return 0; ++ } ++ } ++ } + + /* + * Do all partitions start at a cylinder boundary ? diff --git a/umount-avoid-readlink.patch b/umount-avoid-readlink.patch new file mode 100644 index 0000000..fdf7d6f --- /dev/null +++ b/umount-avoid-readlink.patch @@ -0,0 +1,46 @@ +Subject: umount: avoid calling readlink on mountpoints. +References: bnc#794529 + +We normally want to canonicalize a path given to umount +in case it contains symlinks. This ensure the right entry +is removed from /etc/mtab. +However if the mountpoint is for a non-responsive NFS server, +that readlink could hang (*will* have if mounted with -o noac). + +In the normal case where no symlinks are used we don't need the +readlink() and we can easily detect this by checking if the +mount table contains the given name. +If it does, use the name as-is. +If it doesn't, then call canonicalize() + +--- + mount/umount.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +Index: util-linux-2.19.1/mount/umount.c +=================================================================== +--- util-linux-2.19.1.orig/mount-deprecated/umount.c ++++ util-linux-2.19.1/mount-deprecated/umount.c +@@ -588,12 +588,22 @@ umount_file (char *arg) { + return 0; + } + ++ /* If the name given is listed in the mount table, don't ++ * bother with canonicalize() - it can block an a non-responsive ++ * NFS server. ++ */ ++ file = arg; ++ mc = getmntdirbackward(arg, NULL); ++ if (!mc && !nocanonicalize) + file = canonicalize(arg); /* mtab paths are canonicalized */ ++ else ++ file = strdup(arg); + + try_loopdev: + if (verbose > 1) + printf(_("Trying to unmount %s\n"), file); + ++ if (!mc) + mc = getmntdirbackward(file, NULL); + if (!mc) { + mc = getmntdevbackward(file, NULL); diff --git a/util-linux-lscpu-improve-hypervisor-detection.patch b/util-linux-lscpu-improve-hypervisor-detection.patch new file mode 100644 index 0000000..6ab24c0 --- /dev/null +++ b/util-linux-lscpu-improve-hypervisor-detection.patch @@ -0,0 +1,229 @@ +--- + sys-utils/lscpu.c | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 152 insertions(+), 4 deletions(-) + +Index: util-linux-2.24.1/sys-utils/lscpu.c +=================================================================== +--- util-linux-2.24.1.orig/sys-utils/lscpu.c ++++ util-linux-2.24.1/sys-utils/lscpu.c +@@ -32,6 +32,15 @@ + #include + #include + #include ++#include ++#include ++#include ++#include ++#if defined(__x86_64__) || defined(__i386__) ++#ifdef HAVE_sys_io_h ++#include ++#endif ++#endif + + #include "cpuset.h" + #include "nls.h" +@@ -59,6 +68,7 @@ + #define _PATH_PROC_STATUS "/proc/self/status" + #define _PATH_PROC_VZ "/proc/vz" + #define _PATH_PROC_BC "/proc/bc" ++#define _PATH_PROC_DEVICETREE "/proc/device-tree" + #define _PATH_DEV_MEM "/dev/mem" + + /* virtualization types */ +@@ -86,7 +96,28 @@ const char *hv_vendors[] = { + [HYPER_UML] = "User-mode Linux", + [HYPER_INNOTEK] = "Innotek GmbH", + [HYPER_HITACHI] = "Hitachi", +- [HYPER_PARALLELS] = "Parallels" ++ [HYPER_PARALLELS] = "Parallels", ++ [HYPER_VBOX] = "Oracle", ++ [HYPER_OS400] = "OS/400", ++ [HYPER_PHYP] = "pHyp" ++}; ++ ++const int hv_vendor_pci[] = { ++ [HYPER_NONE] = 0x0000, ++ [HYPER_XEN] = 0x5853, ++ [HYPER_KVM] = 0x0000, ++ [HYPER_MSHV] = 0x1414, ++ [HYPER_VMWARE] = 0x15ad, ++ [HYPER_VBOX] = 0x80ee ++}; ++ ++const int hv_graphics_pci[] = { ++ [HYPER_NONE] = 0x0000, ++ [HYPER_XEN] = 0x0001, ++ [HYPER_KVM] = 0x0000, ++ [HYPER_MSHV] = 0x5353, ++ [HYPER_VMWARE] = 0x0710, ++ [HYPER_VBOX] = 0xbeef + }; + + /* CPU modes */ +@@ -550,10 +581,111 @@ read_hypervisor_cpuid(struct lscpu_desc + desc->hyper = HYPER_VMWARE; + } + ++#define VMWARE_BDOOR_MAGIC 0x564D5868 ++#define VMWARE_BDOOR_PORT 0x5658 ++#define VMWARE_BDOOR_CMD_GETVERSION 10 ++ ++#define VMWARE_BDOOR(eax, ebx, ecx, edx) \ ++ __asm__("inl (%%dx)" : \ ++ "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : \ ++ "0"(VMWARE_BDOOR_MAGIC), "1"(VMWARE_BDOOR_CMD_GETVERSION), \ ++ "2"(VMWARE_BDOOR_PORT), "3"(0) : \ ++ "memory"); ++ ++static jmp_buf segv_handler_env; ++ ++static void ++segv_handler(int sig, siginfo_t *info, void *ignored) ++{ ++ siglongjmp(segv_handler_env, 1); ++} ++ ++static int ++is_vmware_platform(void) ++{ ++ uint32_t eax, ebx, ecx, edx; ++ struct sigaction act, oact; ++ ++ /* ++ * The assembly routine for vmware detection works ++ * fine under vmware, even if ran as regular user. But ++ * on real HW or under other hypervisors, it segfaults (which is ++ * expected). So we temporarily install SIGSEGV handler to catch ++ * the signal. All this magic is needed because lscpu ++ * isn't supposed to require root privileges. ++ */ ++ if (sigsetjmp(segv_handler_env, 1)) ++ return 0; ++ ++ bzero(&act, sizeof(act)); ++ act.sa_sigaction = segv_handler; ++ act.sa_flags = SA_SIGINFO; ++ ++ if (sigaction(SIGSEGV, &act, &oact)) ++ err(EXIT_FAILURE, _("error: can not set signal handler")); ++ ++ VMWARE_BDOOR(eax, ebx, ecx, edx); ++ ++ if (sigaction(SIGSEGV, &oact, NULL)) ++ err(EXIT_FAILURE, _("error: can not restore signal handler")); ++ ++ return eax != (uint32_t)-1 && ebx == VMWARE_BDOOR_MAGIC; ++} ++ + #else /* ! __x86_64__ */ + static void + read_hypervisor_cpuid(struct lscpu_desc *desc __attribute__((__unused__))) + { ++#ifdef __powerpc__ ++ /* powerpc: ++ * IBM iSeries: legacy, if /proc/iSeries exists, its para-virtualized on top of OS/400 ++ * IBM pSeries: always has a hypervisor ++ * if partition-name is "full", its kind of "bare-metal": full-system-partition ++ * otherwise its some partition created by Hardware Management Console ++ * in any case, its always some sort of HVM ++ * KVM: "linux,kvm" in /hypervisor/compatible indicates a KVM guest ++ * Xen: not in use, not detected ++ */ ++ if (path_exist("/proc/iSeries")) { ++ desc->hyper = HYPER_OS400; ++ desc->virtype = VIRT_FULL; ++ } else if (path_exist(_PATH_PROC_DEVICETREE "/ibm,partition-name")) { ++ FILE *fd; ++ desc->hyper = HYPER_PHYP; ++ desc->virtype = VIRT_FULL; ++ fd = fopen(_PATH_PROC_DEVICETREE "/ibm,partition-name", "r"); ++ if (fd) { ++ char buf[256]; ++ if (fscanf(fd, "%s", buf) == 1 && !strcmp(buf, "full")) ++ desc->virtype = VIRT_NONE; ++ fclose(fd); ++ } ++ } else if (path_exist(_PATH_PROC_DEVICETREE "/hypervisor/compatible")) { ++ FILE *fd; ++ fd = fopen(_PATH_PROC_DEVICETREE "/hypervisor/compatible", "r"); ++ if (fd) { ++ char buf[256]; ++ int i; ++ memset(buf, 0, sizeof(buf)); ++ fread(buf, sizeof(buf) - 1, 1, fd); ++ fclose(fd); ++ for (i = 0; i < sizeof(buf);) { ++ if (!strcmp(&buf[i], "linux,kvm")) { ++ desc->hyper = HYPER_KVM; ++ desc->virtype = VIRT_FULL; ++ break; ++ } ++ i += strlen(&buf[i]); ++ i++; ++ } ++ } ++ } ++#endif ++} ++ ++static int is_vmware_platform(void) ++{ ++ return 0; + } + #endif + +@@ -588,9 +720,18 @@ read_hypervisor(struct lscpu_desc *desc, + desc->hyper = HYPER_XEN; + + /* Xen full-virt on non-x86_64 */ +- } else if (has_pci_device(0x5853, 0x0001)) { ++ } else if (has_pci_device( hv_vendor_pci[HYPER_XEN], hv_graphics_pci[HYPER_XEN])) { + desc->hyper = HYPER_XEN; + desc->virtype = VIRT_FULL; ++ } else if (is_vmware_platform()) { ++ desc->hyper = HYPER_VMWARE; ++ desc->virtype = VIRT_FULL; ++ } else if (has_pci_device( hv_vendor_pci[HYPER_VMWARE], hv_graphics_pci[HYPER_VMWARE])) { ++ desc->hyper = HYPER_VMWARE; ++ desc->virtype = VIRT_FULL; ++ } else if (has_pci_device( hv_vendor_pci[HYPER_VBOX], hv_graphics_pci[HYPER_VBOX])) { ++ desc->hyper = HYPER_VBOX; ++ desc->virtype = VIRT_FULL; + + /* IBM PR/SM */ + } else if (path_exist(_PATH_PROC_SYSINFO)) { +@@ -1181,6 +1322,7 @@ print_parsable(struct lscpu_desc *desc, + } + fputs(data && *data ? data : "", stdout); + } ++ printf(",HvVendor,VirtType"); + putchar('\n'); + + /* +@@ -1210,7 +1352,9 @@ print_parsable(struct lscpu_desc *desc, + buf, sizeof(buf)); + fputs(data && *data ? data : "", stdout); + } +- putchar('\n'); ++ printf(",%s,%s\n", ++ hv_vendors[desc->hyper] ? hv_vendors[desc->hyper] : "none", ++ virt_types[desc->virtype]); + } + } + +Index: util-linux-2.24.1/sys-utils/lscpu.h +=================================================================== +--- util-linux-2.24.1.orig/sys-utils/lscpu.h ++++ util-linux-2.24.1/sys-utils/lscpu.h +@@ -13,7 +13,10 @@ enum { + HYPER_UML, + HYPER_INNOTEK, /* VBOX */ + HYPER_HITACHI, +- HYPER_PARALLELS /* OpenVZ/VIrtuozzo */ ++ HYPER_PARALLELS, /* OpenVZ/VIrtuozzo */ ++ HYPER_VBOX, ++ HYPER_OS400, ++ HYPER_PHYP + }; + + extern int read_hypervisor_dmi(void); diff --git a/util-linux-ng-2.16-squashfs3-detect.patch b/util-linux-ng-2.16-squashfs3-detect.patch new file mode 100644 index 0000000..94caaab --- /dev/null +++ b/util-linux-ng-2.16-squashfs3-detect.patch @@ -0,0 +1,118 @@ +--- + shlibs/blkid/src/superblocks/superblocks.c | 1 + shlibs/blkid/src/superblocks/superblocks.h | 1 + shlibs/blkid/src/superblocks/squashfs.c | 63 +++++++++++++++++++++++++++--------- + 3 files changed, 50 insertions(+), 15 deletions(-) + +Index: util-linux-2.19/shlibs/blkid/src/superblocks/superblocks.c +=================================================================== +--- util-linux-2.19.orig/libblkid/src/superblocks/superblocks.c ++++ util-linux-2.19/libblkid/src/superblocks/superblocks.c +@@ -131,6 +131,7 @@ static const struct blkid_idinfo *idinfo + &oracleasm_idinfo, + &vxfs_idinfo, + &squashfs_idinfo, ++ &squashfs3_idinfo, + &netware_idinfo, + &btrfs_idinfo, + &ubifs_idinfo, +Index: util-linux-2.19/shlibs/blkid/src/superblocks/superblocks.h +=================================================================== +--- util-linux-2.19.orig/libblkid/src/superblocks/superblocks.h ++++ util-linux-2.19/libblkid/src/superblocks/superblocks.h +@@ -54,6 +54,7 @@ extern const struct blkid_idinfo luks_id + extern const struct blkid_idinfo highpoint37x_idinfo; + extern const struct blkid_idinfo highpoint45x_idinfo; + extern const struct blkid_idinfo squashfs_idinfo; ++extern const struct blkid_idinfo squashfs3_idinfo; + extern const struct blkid_idinfo netware_idinfo; + extern const struct blkid_idinfo sysv_idinfo; + extern const struct blkid_idinfo xenix_idinfo; +Index: util-linux-2.19/shlibs/blkid/src/superblocks/squashfs.c +=================================================================== +--- util-linux-2.19.orig/libblkid/src/superblocks/squashfs.c ++++ util-linux-2.19/libblkid/src/superblocks/squashfs.c +@@ -31,20 +31,46 @@ struct sqsh_super_block { + static int probe_squashfs(blkid_probe pr, const struct blkid_idmag *mag) + { + struct sqsh_super_block *sq; ++ uint16_t major; ++ uint16_t minor; + + sq = blkid_probe_get_sb(pr, mag, struct sqsh_super_block); + if (!sq) + return -1; + +- if (strcmp(mag->magic, "sqsh") == 0 || +- strcmp(mag->magic, "qshs") == 0) +- blkid_probe_sprintf_version(pr, "%u.%u", +- sq->s_major, +- sq->s_minor); +- else +- blkid_probe_sprintf_version(pr, "%u.%u", +- swab16(sq->s_major), +- swab16(sq->s_minor)); ++ major = le16_to_cpu(sq->s_major); ++ minor = le16_to_cpu(sq->s_minor); ++ if (major < 4) ++ return -1; ++ ++ blkid_probe_sprintf_version(pr, "%u.%u", major, minor); ++ ++ return 0; ++} ++ ++static int probe_squashfs3(blkid_probe pr, const struct blkid_idmag *mag) ++{ ++ struct sqsh_super_block *sq; ++ uint16_t major; ++ uint16_t minor; ++ ++ sq = blkid_probe_get_sb(pr, mag, struct sqsh_super_block); ++ if (!sq) ++ return -1; ++ ++ if (strcmp(mag->magic, "sqsh") == 0) { ++ major = be16_to_cpu(sq->s_major); ++ minor = be16_to_cpu(sq->s_minor); ++ } else { ++ major = le16_to_cpu(sq->s_major); ++ minor = le16_to_cpu(sq->s_minor); ++ } ++ ++ if (major > 3) ++ return -1; ++ ++ blkid_probe_sprintf_version(pr, "%u.%u", major, minor); ++ + return 0; + } + +@@ -55,14 +81,21 @@ const struct blkid_idinfo squashfs_idinf + .probefunc = probe_squashfs, + .magics = + { +- { .magic = "sqsh", .len = 4 }, +- { .magic = "hsqs", .len = 4 }, /* swap */ +- +- /* LZMA version */ +- { .magic = "qshs", .len = 4 }, +- { .magic = "shsq", .len = 4 }, /* swap */ ++ { .magic = "hsqs", .len = 4 }, + { NULL } + } + }; + ++const struct blkid_idinfo squashfs3_idinfo = ++{ ++ .name = "squashfs3", ++ .usage = BLKID_USAGE_FILESYSTEM, ++ .probefunc = probe_squashfs3, ++ .magics = ++ { ++ { .magic = "sqsh", .len = 4 }, /* big endian */ ++ { .magic = "hsqs", .len = 4 }, /* little endian */ ++ { NULL } ++ } ++}; + diff --git a/util-linux-ng-2.19.1-barrier_documentation.patch b/util-linux-ng-2.19.1-barrier_documentation.patch new file mode 100644 index 0000000..a6aee65 --- /dev/null +++ b/util-linux-ng-2.19.1-barrier_documentation.patch @@ -0,0 +1,131 @@ +From: Jan Kara +Subject: Update documentation of mount(8) about barrier mount options + +Signed-off-by: Jan Kara + +Index: util-linux-2.24.1/sys-utils/mount.8 +=================================================================== +--- util-linux-2.24.1.orig/sys-utils/mount.8 ++++ util-linux-2.24.1/sys-utils/mount.8 +@@ -1524,12 +1524,13 @@ ordered mode. + Abort the journal if an error occurs in a file data buffer in ordered mode. + .TP + .BR barrier=0 " / " barrier=1 " +-This enables/disables barriers. barrier=0 disables it, barrier=1 enables it. +-Write barriers enforce proper on-disk ordering of journal commits, making +-volatile disk write caches safe to use, at some performance penalty. The ext3 +-filesystem does not enable write barriers by default. Be sure to enable +-barriers unless your disks are battery-backed one way or another. Otherwise +-you risk filesystem corruption in case of power failure. ++This disables / enables the use of write barriers in the jbd code. barrier=0 ++disables, barrier=1 enables (default). This also requires an IO stack which can ++support barriers, and if jbd gets an error on a barrier write, it will disable ++barriers again with a warning. Write barriers enforce proper on-disk ordering ++of journal commits, making volatile disk write caches safe to use, at some ++performance penalty. If your disks are battery-backed in one way or another, ++disabling barriers may safely improve performance. + .TP + .BI commit= nrsec + Sync all data and metadata every +@@ -1577,15 +1578,9 @@ enabled older kernels cannot mount the d + This will enable 'journal_checksum' internally. + .TP + .BR barrier=0 " / " barrier=1 " / " barrier " / " nobarrier +-This enables/disables the use of write barriers in the jbd code. barrier=0 +-disables, barrier=1 enables. This also requires an IO stack which can support +-barriers, and if jbd gets an error on a barrier write, it will disable again +-with a warning. Write barriers enforce proper on-disk ordering of journal +-commits, making volatile disk write caches safe to use, at some performance +-penalty. If your disks are battery-backed in one way or another, disabling +-barriers may safely improve performance. The mount options "barrier" and +-"nobarrier" can also be used to enable or disable barriers, for consistency +-with other ext4 mount options. ++These mount options have the same effect as in ext3. The mount options ++"barrier" and "nobarrier" are added for consistency with other ext4 mount ++options. + + The ext4 filesystem enables write barriers by default. + .TP +@@ -2266,13 +2261,13 @@ Enable POSIX Access Control Lists. See t + manual page. + .TP + .BR barrier=none " / " barrier=flush " +-This enables/disables the use of write barriers in the journaling code. +-barrier=none disables it, barrier=flush enables it. Write barriers enforce ++This disables / enables the use of write barriers in the journaling code. ++barrier=none disables, barrier=flush enables (default). This also requires an ++IO stack which can support barriers, and if reiserfs gets an error on a barrier ++write, it will disable barriers again with a warning. Write barriers enforce + proper on-disk ordering of journal commits, making volatile disk write caches +-safe to use, at some performance penalty. The reiserfs filesystem does not +-enable write barriers by default. Be sure to enable barriers unless your disks +-are battery-backed one way or another. Otherwise you risk filesystem +-corruption in case of power failure. ++safe to use, at some performance penalty. If your disks are battery-backed in ++one way or another, disabling barriers may safely improve performance. + + .SH "Mount options for romfs" + None. +Index: util-linux-2.24.1/mount-deprecated/mount.8 +=================================================================== +--- util-linux-2.24.1.orig/mount-deprecated/mount.8 ++++ util-linux-2.24.1/mount-deprecated/mount.8 +@@ -1389,12 +1389,13 @@ in files after a crash and journal recov + .RE + .TP + .BR barrier=0 " / " barrier=1 " +-This enables/disables barriers. barrier=0 disables it, barrier=1 enables it. +-Write barriers enforce proper on-disk ordering of journal commits, making +-volatile disk write caches safe to use, at some performance penalty. The ext3 +-filesystem does not enable write barriers by default. Be sure to enable +-barriers unless your disks are battery-backed one way or another. Otherwise +-you risk filesystem corruption in case of power failure. ++This disables / enables the use of write barriers in the jbd code. barrier=0 ++disables, barrier=1 enables (default). This also requires an IO stack which can ++support barriers, and if jbd gets an error on a barrier write, it will disable ++barriers again with a warning. Write barriers enforce proper on-disk ordering ++of journal commits, making volatile disk write caches safe to use, at some ++performance penalty. If your disks are battery-backed in one way or another, ++disabling barriers may safely improve performance. + .TP + .BI commit= nrsec + Sync all data and metadata every +@@ -1433,15 +1434,9 @@ enabled older kernels cannot mount the d + This will enable 'journal_checksum' internally. + .TP + .BR barrier=0 " / " barrier=1 " / " barrier " / " nobarrier +-This enables/disables the use of write barriers in the jbd code. barrier=0 +-disables, barrier=1 enables. This also requires an IO stack which can support +-barriers, and if jbd gets an error on a barrier write, it will disable again +-with a warning. Write barriers enforce proper on-disk ordering of journal +-commits, making volatile disk write caches safe to use, at some performance +-penalty. If your disks are battery-backed in one way or another, disabling +-barriers may safely improve performance. The mount options "barrier" and +-"nobarrier" can also be used to enable or disable barriers, for consistency +-with other ext4 mount options. ++These mount options have the same effect as in ext3. The mount options ++"barrier" and "nobarrier" are added for consistency with other ext4 mount ++options. + + The ext4 filesystem enables write barriers by default. + .TP +@@ -2099,13 +2094,13 @@ Enable POSIX Access Control Lists. See t + manual page. + .TP + .BR barrier=none " / " barrier=flush " +-This enables/disables the use of write barriers in the journaling code. +-barrier=none disables it, barrier=flush enables it. Write barriers enforce ++This disables / enables the use of write barriers in the journaling code. ++barrier=none disables, barrier=flush enables (default). This also requires an ++IO stack which can support barriers, and if reiserfs gets an error on a barrier ++write, it will disable barriers again with a warning. Write barriers enforce + proper on-disk ordering of journal commits, making volatile disk write caches +-safe to use, at some performance penalty. The reiserfs filesystem does not +-enable write barriers by default. Be sure to enable barriers unless your disks +-are battery-backed one way or another. Otherwise you risk filesystem +-corruption in case of power failure. ++safe to use, at some performance penalty. If your disks are battery-backed in ++one way or another, disabling barriers may safely improve performance. + + .SH "Mount options for romfs" + None. diff --git a/util-linux-setarch-uname26.patch b/util-linux-setarch-uname26.patch new file mode 100644 index 0000000..eab770f --- /dev/null +++ b/util-linux-setarch-uname26.patch @@ -0,0 +1,25 @@ +Index: util-linux-2.24/sys-utils/setarch.c +=================================================================== +--- util-linux-2.24.orig/sys-utils/setarch.c ++++ util-linux-2.24/sys-utils/setarch.c +@@ -146,6 +146,7 @@ set_arch(const char *pers, unsigned long + int perval; + const char *target_arch, *result_arch; + } transitions[] = { ++ {UNAME26, "uname26", NULL}, + {PER_LINUX32, "linux32", NULL}, + {PER_LINUX, "linux64", NULL}, + #if defined(__powerpc__) || defined(__powerpc64__) +Index: util-linux-2.24/sys-utils/Makemodule.am +=================================================================== +--- util-linux-2.24.orig/sys-utils/Makemodule.am ++++ util-linux-2.24/sys-utils/Makemodule.am +@@ -89,7 +89,7 @@ usrbin_exec_PROGRAMS += setarch + dist_man_MANS += sys-utils/setarch.8 + setarch_SOURCES = sys-utils/setarch.c + +-SETARCH_LINKS = linux32 linux64 ++SETARCH_LINKS = uname26 linux32 linux64 + + if ARCH_S390 + SETARCH_LINKS += s390 s390x diff --git a/util-linux-update-default-commit-interval.patch b/util-linux-update-default-commit-interval.patch new file mode 100644 index 0000000..db3f5c8 --- /dev/null +++ b/util-linux-update-default-commit-interval.patch @@ -0,0 +1,30 @@ +--- + mount/mount.8 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: util-linux-2.19.1/mount/mount.8 +=================================================================== +--- util-linux-2.19.1.orig/sys-utils/mount.8 ++++ util-linux-2.19.1/sys-utils/mount.8 +@@ -1384,7 +1384,7 @@ disabling barriers may safely improve pe + .BI commit= nrsec + Sync all data and metadata every + .I nrsec +-seconds. The default value is 5 seconds. Zero means default. ++seconds. The default value is 15 seconds. Zero means default. + .TP + .BR user_xattr + Enable Extended User Attributes. See the +Index: util-linux-2.19.1/mount/mount.8 +=================================================================== +--- util-linux-2.19.1.orig/mount-deprecated/mount.8 ++++ util-linux-2.19.1/mount-deprecated/mount.8 +@@ -1384,7 +1384,7 @@ disabling barriers may safely improve pe + .BI commit= nrsec + Sync all data and metadata every + .I nrsec +-seconds. The default value is 5 seconds. Zero means default. ++seconds. The default value is 15 seconds. Zero means default. + .TP + .BR user_xattr + Enable Extended User Attributes. See the diff --git a/util-linux.changes b/util-linux.changes index 03b811e..85aef43 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Mon Mar 17 22:36:58 CET 2014 - sbrabec@suse.cz + +- Merge fixes and features from SLE11 (bnc#831868): + * Detect squashfs version <= 3 as squashfs3 and version >= 4 as + squashfs. (mszeredi@suse.cz, + util-linux-ng-2.16-squashfs3-detect.patch, bnc#666893) + * add sfdisk-warn-about-2TB-limit.patch (puzel@novell.com, + bnc#495657) + * Document barrier option in mount.8 (jack@suse.cz, + hvogel@suse.de, + util-linux-ng-2.19.1-barrier_documentation.patch, bnc#489740) + * lscpu: improve hypervisor detection (puzel@novell.com, + fate#310255) + - util-linux-lscpu-improve-hypervisor-detection.patch + * umount: avoid calling readlink on mountpoints if not necessary + - add: umount-avoid-readlink.patch (puzel@suse.com, bnc#794529) + * fix file conflict between util-linux and s390-32 + (puzel@suse.com, bnc#805684) + * util-linux-update-default-commit-interval.patch: + mount(8): update default commit interval (puzel@suse.com, + bnc#809480) + * Obsolete no more packaged uuid-runtime. +- Add uname26 (util-linux-setarch-uname26.patch, FATE#313476). + ------------------------------------------------------------------- Thu Mar 6 09:43:34 UTC 2014 - werner@suse.de diff --git a/util-linux.spec b/util-linux.spec index a943e1a..a7bb3af 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -114,10 +114,22 @@ Patch16: agetty-on-s390-on-dev-3270-tty1-line.patch Patch17: sulogin-fooled-on-tty-line-due-plymouth.patch # PATCH-FIX-SUSE -- sulogin: find suitable console device even if first is not usable Patch18: sulogin-does-not-find-any-console.patch - +# PATCH-FEATURE-SLES util-linux-setarch-uname26.patch fate313476 sbrabec@suse.cz -- Support for uname26 binary. +Patch19: util-linux-setarch-uname26.patch # hack for boot.localfs Patch20: util-linux-HACK-boot.localfs.diff - +# PATCH-FEATURE-SLES util-linux-ng-2.16-squashfs3-detect.patch bnc666893 mszeredi@suse.cz -- Detect squashfs version <= 3 as squashfs3 and version >= 4 as squashfs. +Patch21: util-linux-ng-2.16-squashfs3-detect.patch +# PATCH-FEATURE-SLES fdisk-warn-about-2TB-limit.patch bnc495657 puzel@novell.com -- Warn about 2TB limit. +Patch22: sfdisk-warn-about-2TB-limit.patch +# PATCH-FEATURE-SLES util-linux-ng-2.19.1-barrier_documentation.patch bnc489740 jack@suse.cz -- Document barrier option in mount.8. +Patch23: util-linux-ng-2.19.1-barrier_documentation.patch +# PATCH-FEATURE-SLES util-linux-lscpu-improve-hypervisor-detection.patch fate310255 puzel@novell.com -- Improve hypervisor detection. +Patch24: util-linux-lscpu-improve-hypervisor-detection.patch +# PATCH-FIX-SLES umount-avoid-readlink.patch bnc794529 puzel@suse.com -- umount: avoid calling readlink on mountpoints if not necessary. +Patch25: umount-avoid-readlink.patch +# PATCH-FIX-SLES util-linux-update-default-commit-interval.patch bnc#809480 puzel@suse.com -- Update default commit interval. +Patch26: util-linux-update-default-commit-interval.patch ## ## klogconsole ## @@ -146,6 +158,14 @@ Conflicts: coreutils < 8.21 # File conflict of sulogin and utmpdump (up to 12.3 and SLE11). Conflicts: sysvinit-tools < 2.88+-87 %endif +# bnc#805684: +%ifarch s390x +Obsoletes: s390-32 +Provides: s390-32 +%endif +# uuid-runtime appeared in SLE11 SP1 to SLE11 SP3 +Provides: uuid-runtime = %{version}-%{release} +Obsoletes: uuid-runtime < %{version}-%{release} # # Using "Requires" here would lend itself to help upgrading, but since # util-linux is in the initial bootstrap, that is not a good thing to do: @@ -235,9 +255,17 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch16 -p0 %patch17 -p0 %patch18 -p0 +%patch19 -p1 # %patch20 -p1 # +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 +# # setctsid cp -p %{S:22} %{S:23} . # nologin @@ -693,6 +721,7 @@ fi %{_bindir}/utmpdump %endif %{_bindir}/uuidgen +%{_bindir}/uname26 %ifnarch ppc ppc64 %{_bindir}/chrp-addnote %{_bindir}/mkzimage_cmdline @@ -836,6 +865,7 @@ fi %{_mandir}/man8/swapoff.8.gz %{_mandir}/man8/swapon.8.gz %{_mandir}/man8/umount.8.gz +%{_mandir}/man8/uname26.8.gz %{_mandir}/man8/setctsid.8.gz %{_mandir}/man8/wipefs.8.gz %{_mandir}/man8/fstrim.8.gz From 668729991b7b502d537069d2c270d7bf40a7bdf311275f824e9e45d3a15c8711 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sun, 6 Apr 2014 07:56:38 +0000 Subject: [PATCH 175/211] Accepting request 229044 from Base:System - remove unnecessarily added patches from SLE11: * util-linux-update-default-commit-interval.patch, openSUSE has never changed the default and neither will SLE12 * sfdisk-warn-about-2TB-limit.patch, fixed by upstream years ago * umount-avoid-readlink.patch, this patch only affects unused code and the used code does not have this bug - edit util-linux-lscpu-improve-hypervisor-detection.patch to not change the default behaviour of "lscpu -p" as documented in it's man page. Now this patch only affects the summary output. Also see discussion here http://lists.opensuse.org/opensuse-factory/2014-03/msg00256.html (forwarded request 228719 from rudi_m) OBS-URL: https://build.opensuse.org/request/show/229044 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=183 --- sfdisk-warn-about-2TB-limit.patch | 31 ------------- umount-avoid-readlink.patch | 46 ------------------- ...x-lscpu-improve-hypervisor-detection.patch | 23 ---------- ...linux-update-default-commit-interval.patch | 30 ------------ util-linux.changes | 13 ++++++ util-linux.spec | 9 ---- 6 files changed, 13 insertions(+), 139 deletions(-) delete mode 100644 sfdisk-warn-about-2TB-limit.patch delete mode 100644 umount-avoid-readlink.patch delete mode 100644 util-linux-update-default-commit-interval.patch diff --git a/sfdisk-warn-about-2TB-limit.patch b/sfdisk-warn-about-2TB-limit.patch deleted file mode 100644 index 0759672..0000000 --- a/sfdisk-warn-about-2TB-limit.patch +++ /dev/null @@ -1,31 +0,0 @@ -Index: util-linux-2.19.1/fdisk/sfdisk.c -=================================================================== ---- util-linux-2.24.1.orig/fdisks/sfdisk.c -+++ util-linux-2.24.1/fdisks/sfdisk.c -@@ -1271,6 +1271,26 @@ partitions_ok(int fd, struct disk_desc * - return 0; - } - } -+ /* Are the data partitions and the extended partition -+ within the DOS 2TB limit? */ -+ for (p = partitions; p < partitions+partno; p++) { -+ if (p->size && !is_extended(p->p.sys_type)) { -+ if( p->size >= (unsigned long) 0xffffffff ) { -+ warn(_("Warning: partition %s of size %lu exceeds " -+ "msdos 2TB limit.\n"), -+ PNO(p), p->size); -+ return 0; -+ } -+ for (q = partitions; q < partitions+partno; q++) -+ if (is_extended(q->p.sys_type)) -+ if ( q->size >= (unsigned long) 0xffffffff ) { -+ warn(_("Warning: partition %s of size %lu exceeds " -+ "msdos 2TB limit.\n"), -+ PNO(q), q->size); -+ return 0; -+ } -+ } -+ } - - /* - * Do all partitions start at a cylinder boundary ? diff --git a/umount-avoid-readlink.patch b/umount-avoid-readlink.patch deleted file mode 100644 index fdf7d6f..0000000 --- a/umount-avoid-readlink.patch +++ /dev/null @@ -1,46 +0,0 @@ -Subject: umount: avoid calling readlink on mountpoints. -References: bnc#794529 - -We normally want to canonicalize a path given to umount -in case it contains symlinks. This ensure the right entry -is removed from /etc/mtab. -However if the mountpoint is for a non-responsive NFS server, -that readlink could hang (*will* have if mounted with -o noac). - -In the normal case where no symlinks are used we don't need the -readlink() and we can easily detect this by checking if the -mount table contains the given name. -If it does, use the name as-is. -If it doesn't, then call canonicalize() - ---- - mount/umount.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -Index: util-linux-2.19.1/mount/umount.c -=================================================================== ---- util-linux-2.19.1.orig/mount-deprecated/umount.c -+++ util-linux-2.19.1/mount-deprecated/umount.c -@@ -588,12 +588,22 @@ umount_file (char *arg) { - return 0; - } - -+ /* If the name given is listed in the mount table, don't -+ * bother with canonicalize() - it can block an a non-responsive -+ * NFS server. -+ */ -+ file = arg; -+ mc = getmntdirbackward(arg, NULL); -+ if (!mc && !nocanonicalize) - file = canonicalize(arg); /* mtab paths are canonicalized */ -+ else -+ file = strdup(arg); - - try_loopdev: - if (verbose > 1) - printf(_("Trying to unmount %s\n"), file); - -+ if (!mc) - mc = getmntdirbackward(file, NULL); - if (!mc) { - mc = getmntdevbackward(file, NULL); diff --git a/util-linux-lscpu-improve-hypervisor-detection.patch b/util-linux-lscpu-improve-hypervisor-detection.patch index 6ab24c0..2a2f3e6 100644 --- a/util-linux-lscpu-improve-hypervisor-detection.patch +++ b/util-linux-lscpu-improve-hypervisor-detection.patch @@ -1,7 +1,3 @@ ---- - sys-utils/lscpu.c | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 152 insertions(+), 4 deletions(-) - Index: util-linux-2.24.1/sys-utils/lscpu.c =================================================================== --- util-linux-2.24.1.orig/sys-utils/lscpu.c @@ -192,25 +188,6 @@ Index: util-linux-2.24.1/sys-utils/lscpu.c /* IBM PR/SM */ } else if (path_exist(_PATH_PROC_SYSINFO)) { -@@ -1181,6 +1322,7 @@ print_parsable(struct lscpu_desc *desc, - } - fputs(data && *data ? data : "", stdout); - } -+ printf(",HvVendor,VirtType"); - putchar('\n'); - - /* -@@ -1210,7 +1352,9 @@ print_parsable(struct lscpu_desc *desc, - buf, sizeof(buf)); - fputs(data && *data ? data : "", stdout); - } -- putchar('\n'); -+ printf(",%s,%s\n", -+ hv_vendors[desc->hyper] ? hv_vendors[desc->hyper] : "none", -+ virt_types[desc->virtype]); - } - } - Index: util-linux-2.24.1/sys-utils/lscpu.h =================================================================== --- util-linux-2.24.1.orig/sys-utils/lscpu.h diff --git a/util-linux-update-default-commit-interval.patch b/util-linux-update-default-commit-interval.patch deleted file mode 100644 index db3f5c8..0000000 --- a/util-linux-update-default-commit-interval.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- - mount/mount.8 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: util-linux-2.19.1/mount/mount.8 -=================================================================== ---- util-linux-2.19.1.orig/sys-utils/mount.8 -+++ util-linux-2.19.1/sys-utils/mount.8 -@@ -1384,7 +1384,7 @@ disabling barriers may safely improve pe - .BI commit= nrsec - Sync all data and metadata every - .I nrsec --seconds. The default value is 5 seconds. Zero means default. -+seconds. The default value is 15 seconds. Zero means default. - .TP - .BR user_xattr - Enable Extended User Attributes. See the -Index: util-linux-2.19.1/mount/mount.8 -=================================================================== ---- util-linux-2.19.1.orig/mount-deprecated/mount.8 -+++ util-linux-2.19.1/mount-deprecated/mount.8 -@@ -1384,7 +1384,7 @@ disabling barriers may safely improve pe - .BI commit= nrsec - Sync all data and metadata every - .I nrsec --seconds. The default value is 5 seconds. Zero means default. -+seconds. The default value is 15 seconds. Zero means default. - .TP - .BR user_xattr - Enable Extended User Attributes. See the diff --git a/util-linux.changes b/util-linux.changes index 85aef43..4d4112d 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Tue Apr 1 18:49:26 UTC 2014 - sweet_f_a@gmx.de + +- remove unnecessarily added patches from SLE11: + * util-linux-update-default-commit-interval.patch, openSUSE has + never changed the default and neither will SLE12 + * sfdisk-warn-about-2TB-limit.patch, fixed by upstream years ago + * umount-avoid-readlink.patch, this patch only affects unused + code and the used code does not have this bug +- edit util-linux-lscpu-improve-hypervisor-detection.patch to not + change the default behaviour of "lscpu -p" as documented in it's + man page. Now this patch only affects the summary output. + ------------------------------------------------------------------- Mon Mar 17 22:36:58 CET 2014 - sbrabec@suse.cz diff --git a/util-linux.spec b/util-linux.spec index a7bb3af..14528d4 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -120,16 +120,10 @@ Patch19: util-linux-setarch-uname26.patch Patch20: util-linux-HACK-boot.localfs.diff # PATCH-FEATURE-SLES util-linux-ng-2.16-squashfs3-detect.patch bnc666893 mszeredi@suse.cz -- Detect squashfs version <= 3 as squashfs3 and version >= 4 as squashfs. Patch21: util-linux-ng-2.16-squashfs3-detect.patch -# PATCH-FEATURE-SLES fdisk-warn-about-2TB-limit.patch bnc495657 puzel@novell.com -- Warn about 2TB limit. -Patch22: sfdisk-warn-about-2TB-limit.patch # PATCH-FEATURE-SLES util-linux-ng-2.19.1-barrier_documentation.patch bnc489740 jack@suse.cz -- Document barrier option in mount.8. Patch23: util-linux-ng-2.19.1-barrier_documentation.patch # PATCH-FEATURE-SLES util-linux-lscpu-improve-hypervisor-detection.patch fate310255 puzel@novell.com -- Improve hypervisor detection. Patch24: util-linux-lscpu-improve-hypervisor-detection.patch -# PATCH-FIX-SLES umount-avoid-readlink.patch bnc794529 puzel@suse.com -- umount: avoid calling readlink on mountpoints if not necessary. -Patch25: umount-avoid-readlink.patch -# PATCH-FIX-SLES util-linux-update-default-commit-interval.patch bnc#809480 puzel@suse.com -- Update default commit interval. -Patch26: util-linux-update-default-commit-interval.patch ## ## klogconsole ## @@ -260,11 +254,8 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch20 -p1 # %patch21 -p1 -%patch22 -p1 %patch23 -p1 %patch24 -p1 -%patch25 -p1 -%patch26 -p1 # # setctsid cp -p %{S:22} %{S:23} . From 279b07414ad464c30bdcf8010236a609a4de97b7821c6f687da5d4d8e79b6a62 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 22 Apr 2014 05:49:58 +0000 Subject: [PATCH 176/211] Accepting request 230697 from Base:System - Enable socket activation needed by systemd service (bnc#872807). - libblkid: Drop the broken ext2/ext3/ext4 discrimination logic (util-linux-libblkid-ext-probe.patch, bnc#864703). - Abort blkid probing on I/O errors (bnc#859062, blkid-stop-scanning-on-I-O-error.patch, blkid-convert-superblocks-to-new-calling-convention.patch, http://www.spinics.net/lists/util-linux-ng/msg08976.html) (forwarded request 230696 from sbrabec) OBS-URL: https://build.opensuse.org/request/show/230697 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=184 --- ...uperblocks-to-new-calling-convention.patch | 2268 +++++++++++++++++ blkid-stop-scanning-on-I-O-error.patch | 138 + util-linux-libblkid-ext-probe.patch | 274 ++ util-linux.changes | 19 + util-linux.spec | 11 + 5 files changed, 2710 insertions(+) create mode 100644 blkid-convert-superblocks-to-new-calling-convention.patch create mode 100644 blkid-stop-scanning-on-I-O-error.patch create mode 100644 util-linux-libblkid-ext-probe.patch diff --git a/blkid-convert-superblocks-to-new-calling-convention.patch b/blkid-convert-superblocks-to-new-calling-convention.patch new file mode 100644 index 0000000..a4240f7 --- /dev/null +++ b/blkid-convert-superblocks-to-new-calling-convention.patch @@ -0,0 +1,2268 @@ +From 5cb7e4a24f8fb29ddf36309419aa1172f13f3310 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Tue, 21 Jan 2014 10:10:19 +0100 +Subject: [PATCH] blkid: convert superblocks to new calling convention + +With the previous patch the scanning functions were +modified to return a differentiated return code. +To correctly abort scanning when an I/O error occurs +we need to differentiate between 'error' (= -1) and +'not found' (= 1) in the probe functions. +This patch updates all superblock scanning functions +to the new calling convention. + +Signed-off-by: Hannes Reinecke +--- + libblkid/src/partitions/aix.c | 2 +- + libblkid/src/partitions/bsd.c | 14 ++++++--- + libblkid/src/partitions/dos.c | 24 ++++++++++----- + libblkid/src/partitions/gpt.c | 26 +++++++++++----- + libblkid/src/partitions/mac.c | 19 ++++++++---- + libblkid/src/partitions/minix.c | 14 ++++++--- + libblkid/src/partitions/sgi.c | 14 ++++++--- + libblkid/src/partitions/solaris_x86.c | 14 ++++++--- + libblkid/src/partitions/sun.c | 14 ++++++--- + libblkid/src/partitions/ultrix.c | 16 ++++++---- + libblkid/src/partitions/unixware.c | 14 ++++++--- + libblkid/src/superblocks/adaptec_raid.c | 15 ++++----- + libblkid/src/superblocks/bcache.c | 4 +-- + libblkid/src/superblocks/befs.c | 24 +++++++-------- + libblkid/src/superblocks/btrfs.c | 2 +- + libblkid/src/superblocks/cramfs.c | 2 +- + libblkid/src/superblocks/ddf_raid.c | 19 +++++++----- + libblkid/src/superblocks/drbd.c | 8 ++--- + libblkid/src/superblocks/drbdproxy_datalog.c | 2 +- + libblkid/src/superblocks/exfat.c | 4 ++- + libblkid/src/superblocks/ext.c | 34 ++++++++++---------- + libblkid/src/superblocks/f2fs.c | 2 +- + libblkid/src/superblocks/gfs.c | 8 ++--- + libblkid/src/superblocks/hfs.c | 12 ++++---- + libblkid/src/superblocks/highpoint_raid.c | 12 ++++---- + libblkid/src/superblocks/hpfs.c | 8 ++--- + libblkid/src/superblocks/iso9660.c | 4 +-- + libblkid/src/superblocks/isw_raid.c | 13 ++++---- + libblkid/src/superblocks/jfs.c | 2 +- + libblkid/src/superblocks/jmicron_raid.c | 13 ++++---- + libblkid/src/superblocks/linux_raid.c | 46 ++++++++++++++++------------ + libblkid/src/superblocks/lsi_raid.c | 10 +++--- + libblkid/src/superblocks/luks.c | 2 +- + libblkid/src/superblocks/lvm.c | 6 ++-- + libblkid/src/superblocks/minix.c | 18 ++++++----- + libblkid/src/superblocks/netware.c | 2 +- + libblkid/src/superblocks/nilfs.c | 4 +-- + libblkid/src/superblocks/ntfs.c | 6 ++-- + libblkid/src/superblocks/nvidia_raid.c | 12 ++++---- + libblkid/src/superblocks/ocfs.c | 8 ++--- + libblkid/src/superblocks/promise_raid.c | 10 +++--- + libblkid/src/superblocks/reiserfs.c | 8 ++--- + libblkid/src/superblocks/romfs.c | 2 +- + libblkid/src/superblocks/silicon_raid.c | 10 +++--- + libblkid/src/superblocks/squashfs.c | 6 ++-- + libblkid/src/superblocks/swap.c | 24 +++++++-------- + libblkid/src/superblocks/sysv.c | 8 ++--- + libblkid/src/superblocks/ubifs.c | 2 +- + libblkid/src/superblocks/udf.c | 16 +++++----- + libblkid/src/superblocks/ufs.c | 4 +-- + libblkid/src/superblocks/vfat.c | 16 +++++----- + libblkid/src/superblocks/via_raid.c | 6 ++-- + libblkid/src/superblocks/vmfs.c | 4 +-- + libblkid/src/superblocks/vxfs.c | 2 +- + libblkid/src/superblocks/xfs.c | 6 ++-- + libblkid/src/superblocks/zfs.c | 6 ++-- + 56 files changed, 338 insertions(+), 265 deletions(-) + +diff --git a/libblkid/src/partitions/aix.c b/libblkid/src/partitions/aix.c +index de397bf..ded9dfd 100644 +--- a/libblkid/src/partitions/aix.c ++++ b/libblkid/src/partitions/aix.c +@@ -34,7 +34,7 @@ static int probe_aix_pt(blkid_probe pr, + + return 0; + err: +- return -1; ++ return 1; + } + + /* +diff --git a/libblkid/src/partitions/bsd.c b/libblkid/src/partitions/bsd.c +index 3de6a58..6fdb82f 100644 +--- a/libblkid/src/partitions/bsd.c ++++ b/libblkid/src/partitions/bsd.c +@@ -42,14 +42,18 @@ static int probe_bsd_pt(blkid_probe pr, const struct blkid_idmag *mag) + return 0; + + data = blkid_probe_get_sector(pr, BLKID_MAG_SECTOR(mag)); +- if (!data) +- goto nothing; ++ if (!data) { ++ if (errno) ++ goto err; ++ else ++ goto nothing; ++ } + + l = (struct bsd_disklabel *) data + BLKID_MAG_LASTOFFSET(mag); + + ls = blkid_probe_get_partlist(pr); + if (!ls) +- goto err; ++ goto nothing; + + /* try to determine the real type of BSD system according to + * (parental) primary partition */ +@@ -76,7 +80,7 @@ static int probe_bsd_pt(blkid_probe pr, const struct blkid_idmag *mag) + + tab = blkid_partlist_new_parttable(ls, name, BLKID_MAG_OFFSET(mag)); + if (!tab) +- goto err; ++ goto nothing; + + if (le16_to_cpu(l->d_npartitions) < BSD_MAXPARTITIONS) + nparts = le16_to_cpu(l->d_npartitions); +@@ -113,7 +117,7 @@ static int probe_bsd_pt(blkid_probe pr, const struct blkid_idmag *mag) + + par = blkid_partlist_add_partition(ls, tab, start, size); + if (!par) +- goto err; ++ goto nothing; + + blkid_partition_set_type(par, p->p_fstype); + } +diff --git a/libblkid/src/partitions/dos.c b/libblkid/src/partitions/dos.c +index 14f326d..8888c0c 100644 +--- a/libblkid/src/partitions/dos.c ++++ b/libblkid/src/partitions/dos.c +@@ -54,8 +54,12 @@ static int parse_dos_extended(blkid_probe pr, blkid_parttable tab, + if (++ct_nodata > 100) + return 0; + data = blkid_probe_get_sector(pr, cur_start); +- if (!data) +- goto leave; /* malformed partition? */ ++ if (!data) { ++ if (errno) ++ goto err; ++ else ++ goto leave; /* malformed partition? */ ++ } + + if (!mbr_is_valid_magic(data)) + goto leave; +@@ -98,7 +102,7 @@ static int parse_dos_extended(blkid_probe pr, blkid_parttable tab, + + par = blkid_partlist_add_partition(ls, tab, abs_start, size); + if (!par) +- goto err; ++ goto leave; + + blkid_partition_set_type(par, p->sys_ind); + blkid_partition_set_flags(par, p->boot_ind); +@@ -142,8 +146,12 @@ static int probe_dos_pt(blkid_probe pr, + + + data = blkid_probe_get_sector(pr, 0); +- if (!data) +- goto nothing; ++ if (!data) { ++ if (errno) ++ goto err; ++ else ++ goto nothing; ++ } + + /* ignore disks with AIX magic number -- for more details see aix.c */ + if (memcmp(data, BLKID_AIX_MAGIC_STRING, BLKID_AIX_MAGIC_STRLEN) == 0) +@@ -207,7 +215,7 @@ static int probe_dos_pt(blkid_probe pr, + /* allocate a new partition table */ + tab = blkid_partlist_new_parttable(ls, "dos", MBR_PT_OFFSET); + if (!tab) +- goto err; ++ goto nothing; + + if (id) + blkid_parttable_set_id(tab, (unsigned char *) idstr); +@@ -227,7 +235,7 @@ static int probe_dos_pt(blkid_probe pr, + } + par = blkid_partlist_add_partition(ls, tab, start, size); + if (!par) +- goto err; ++ goto nothing; + + blkid_partition_set_type(par, p->sys_ind); + blkid_partition_set_flags(par, p->boot_ind); +@@ -248,7 +256,7 @@ static int probe_dos_pt(blkid_probe pr, + continue; + if (is_extended(p) && + parse_dos_extended(pr, tab, start, size, ssf) == -1) +- goto err; ++ goto nothing; + } + + /* Parse subtypes (nested partitions) on large disks */ +diff --git a/libblkid/src/partitions/gpt.c b/libblkid/src/partitions/gpt.c +index 14a255a..79a4053 100644 +--- a/libblkid/src/partitions/gpt.c ++++ b/libblkid/src/partitions/gpt.c +@@ -168,8 +168,11 @@ static int is_pmbr_valid(blkid_probe pr, int *has) + goto ok; /* skip PMBR check */ + + data = blkid_probe_get_sector(pr, 0); +- if (!data) ++ if (!data) { ++ if (errno) ++ return -1; + goto failed; ++ } + + if (!mbr_is_valid_magic(data)) + goto failed; +@@ -302,26 +305,33 @@ static int probe_gpt_pt(blkid_probe pr, + uint64_t fu, lu; + uint32_t ssf, i; + efi_guid_t guid; ++ int ret; + + if (last_lba(pr, &lastlba)) + goto nothing; + +- if (!is_pmbr_valid(pr, NULL)) ++ ret = is_pmbr_valid(pr, NULL); ++ if (ret < 0) ++ goto err; ++ else if (ret == 0) + goto nothing; + + h = get_gpt_header(pr, &hdr, &e, (lba = GPT_PRIMARY_LBA), lastlba); +- if (!h) ++ if (!h && !errno) + h = get_gpt_header(pr, &hdr, &e, (lba = lastlba), lastlba); + +- if (!h) ++ if (!h) { ++ if (errno) ++ goto err; + goto nothing; ++ } + + blkid_probe_use_wiper(pr, lba * blkid_probe_get_size(pr), 8); + + if (blkid_probe_set_magic(pr, lba << 9, + sizeof(GPT_HEADER_SIGNATURE_STR) - 1, + (unsigned char *) GPT_HEADER_SIGNATURE_STR)) +- goto err; ++ goto nothing; + + guid = h->disk_guid; + swap_efi_guid(&guid); +@@ -335,11 +345,11 @@ static int probe_gpt_pt(blkid_probe pr, + + ls = blkid_probe_get_partlist(pr); + if (!ls) +- goto err; ++ goto nothing; + + tab = blkid_partlist_new_parttable(ls, "gpt", lba << 9); + if (!tab) +- goto err; ++ goto nothing; + + blkid_parttable_set_uuid(tab, (const unsigned char *) &guid); + +@@ -372,7 +382,7 @@ static int probe_gpt_pt(blkid_probe pr, + par = blkid_partlist_add_partition(ls, tab, + start * ssf, size * ssf); + if (!par) +- goto err; ++ goto nothing; + + blkid_partition_set_utf8name(par, + (unsigned char *) e->partition_name, +diff --git a/libblkid/src/partitions/mac.c b/libblkid/src/partitions/mac.c +index 7f8bb75..e64bde2 100644 +--- a/libblkid/src/partitions/mac.c ++++ b/libblkid/src/partitions/mac.c +@@ -87,8 +87,12 @@ static int probe_mac_pt(blkid_probe pr, + * the first block on the disk. + */ + md = (struct mac_driver_desc *) blkid_probe_get_sector(pr, 0); +- if (!md) +- goto nothing; ++ if (!md) { ++ if (errno) ++ goto err; ++ else ++ goto nothing; ++ } + + block_size = be16_to_cpu(md->block_size); + +@@ -96,8 +100,11 @@ static int probe_mac_pt(blkid_probe pr, + * the second block on the disk. + */ + p = (struct mac_partition *) get_mac_block(pr, block_size, 1); +- if (!p) ++ if (!p) { ++ if (errno) ++ goto err; + goto nothing; ++ } + + /* check the first partition signature */ + if (!has_part_signature(p)) +@@ -109,11 +116,11 @@ static int probe_mac_pt(blkid_probe pr, + + ls = blkid_probe_get_partlist(pr); + if (!ls) +- goto err; ++ goto nothing; + + tab = blkid_partlist_new_parttable(ls, "mac", 0); + if (!tab) +- goto err; ++ goto nothing; + + ssf = block_size / 512; + nblks = be32_to_cpu(p->map_count); +@@ -148,7 +155,7 @@ static int probe_mac_pt(blkid_probe pr, + + par = blkid_partlist_add_partition(ls, tab, start, size); + if (!par) +- goto err; ++ goto nothing; + + blkid_partition_set_name(par, (unsigned char *) p->name, + sizeof(p->name)); +diff --git a/libblkid/src/partitions/minix.c b/libblkid/src/partitions/minix.c +index 0a597fb..2f6f513 100644 +--- a/libblkid/src/partitions/minix.c ++++ b/libblkid/src/partitions/minix.c +@@ -25,12 +25,16 @@ static int probe_minix_pt(blkid_probe pr, + int i; + + data = blkid_probe_get_sector(pr, 0); +- if (!data) +- goto nothing; ++ if (!data) { ++ if (errno) ++ goto err; ++ else ++ goto nothing; ++ } + + ls = blkid_probe_get_partlist(pr); + if (!ls) +- goto err; ++ goto nothing; + + /* Parent is required, because Minix uses the same PT as DOS and + * difference is only in primary partition (parent) type. +@@ -48,7 +52,7 @@ static int probe_minix_pt(blkid_probe pr, + + tab = blkid_partlist_new_parttable(ls, "minix", MBR_PT_OFFSET); + if (!tab) +- goto err; ++ goto nothing; + + for (i = 0, p = mbr_get_partition(data, 0); + i < MINIX_MAXPARTITIONS; i++, p++) { +@@ -71,7 +75,7 @@ static int probe_minix_pt(blkid_probe pr, + + par = blkid_partlist_add_partition(ls, tab, start, size); + if (!par) +- goto err; ++ goto nothing; + + blkid_partition_set_type(par, p->sys_ind); + blkid_partition_set_flags(par, p->boot_ind); +diff --git a/libblkid/src/partitions/sgi.c b/libblkid/src/partitions/sgi.c +index bcde84f..b216340 100644 +--- a/libblkid/src/partitions/sgi.c ++++ b/libblkid/src/partitions/sgi.c +@@ -25,8 +25,12 @@ static int probe_sgi_pt(blkid_probe pr, + int i; + + l = (struct sgi_disklabel *) blkid_probe_get_sector(pr, 0); +- if (!l) +- goto nothing; ++ if (!l) { ++ if (errno) ++ goto err; ++ else ++ goto nothing; ++ } + + if (sgi_pt_checksum(l)) { + DBG(LOWPROBE, blkid_debug( +@@ -40,7 +44,7 @@ static int probe_sgi_pt(blkid_probe pr, + + ls = blkid_probe_get_partlist(pr); + if (!ls) +- goto err; ++ goto nothing; + + tab = blkid_partlist_new_parttable(ls, "sgi", 0); + if (!tab) +@@ -53,13 +57,13 @@ static int probe_sgi_pt(blkid_probe pr, + blkid_partition par; + + if (size == 0 || type == SGI_TYPE_ENTIRE_DISK || +- type == SGI_TYPE_VOLHDR) { ++ type == SGI_TYPE_VOLHDR) { + blkid_partlist_increment_partno(ls); + continue; + } + par = blkid_partlist_add_partition(ls, tab, start, size); + if (!par) +- goto err; ++ goto nothing; + + blkid_partition_set_type(par, type); + } +diff --git a/libblkid/src/partitions/solaris_x86.c b/libblkid/src/partitions/solaris_x86.c +index 4e08caf..d8fe859 100644 +--- a/libblkid/src/partitions/solaris_x86.c ++++ b/libblkid/src/partitions/solaris_x86.c +@@ -69,8 +69,12 @@ static int probe_solaris_pt(blkid_probe pr, + uint16_t nparts; + + l = (struct solaris_vtoc *) blkid_probe_get_sector(pr, SOLARIS_SECTOR); +- if (!l) +- goto nothing; ++ if (!l) { ++ if (errno) ++ goto err; ++ else ++ goto nothing; ++ } + + if (le32_to_cpu(l->v_version) != 1) { + DBG(LOWPROBE, blkid_debug( +@@ -85,13 +89,13 @@ static int probe_solaris_pt(blkid_probe pr, + + ls = blkid_probe_get_partlist(pr); + if (!ls) +- goto err; ++ goto nothing; + + parent = blkid_partlist_get_parent(ls); + + tab = blkid_partlist_new_parttable(ls, "solaris", SOLARIS_OFFSET); + if (!tab) +- goto err; ++ goto nothing; + + nparts = le16_to_cpu(l->v_nparts); + if (nparts > SOLARIS_MAXPARTITIONS) +@@ -120,7 +124,7 @@ static int probe_solaris_pt(blkid_probe pr, + + par = blkid_partlist_add_partition(ls, tab, start, size); + if (!par) +- goto err; ++ goto nothing; + + blkid_partition_set_type(par, le16_to_cpu(p->s_tag)); + blkid_partition_set_flags(par, le16_to_cpu(p->s_flag)); +diff --git a/libblkid/src/partitions/sun.c b/libblkid/src/partitions/sun.c +index ba7ca3a..83adf83 100644 +--- a/libblkid/src/partitions/sun.c ++++ b/libblkid/src/partitions/sun.c +@@ -27,8 +27,12 @@ static int probe_sun_pt(blkid_probe pr, + int i, use_vtoc; + + l = (struct sun_disklabel *) blkid_probe_get_sector(pr, 0); +- if (!l) +- goto nothing; ++ if (!l) { ++ if (errno) ++ goto err; ++ else ++ goto nothing; ++ } + + if (sun_pt_checksum(l)) { + DBG(LOWPROBE, blkid_debug( +@@ -42,11 +46,11 @@ static int probe_sun_pt(blkid_probe pr, + + ls = blkid_probe_get_partlist(pr); + if (!ls) +- goto err; ++ goto nothing; + + tab = blkid_partlist_new_parttable(ls, "sun", 0); + if (!tab) +- goto err; ++ goto nothing; + + /* sectors per cylinder (partition offset is in cylinders...) */ + spc = be16_to_cpu(l->nhead) * be16_to_cpu(l->nsect); +@@ -89,7 +93,7 @@ static int probe_sun_pt(blkid_probe pr, + } + par = blkid_partlist_add_partition(ls, tab, start, size); + if (!par) +- goto err; ++ goto nothing; + + if (type) + blkid_partition_set_type(par, type); +diff --git a/libblkid/src/partitions/ultrix.c b/libblkid/src/partitions/ultrix.c +index 853ae6e..fa08811 100644 +--- a/libblkid/src/partitions/ultrix.c ++++ b/libblkid/src/partitions/ultrix.c +@@ -44,8 +44,12 @@ static int probe_ultrix_pt(blkid_probe pr, + int i; + + data = blkid_probe_get_sector(pr, ULTRIX_SECTOR); +- if (!data) +- goto nothing; ++ if (!data) { ++ if (errno) ++ goto err; ++ else ++ goto nothing; ++ } + + l = (struct ultrix_disklabel *) (data + ULTRIX_OFFSET); + +@@ -55,7 +59,7 @@ static int probe_ultrix_pt(blkid_probe pr, + if (blkid_probe_set_magic(pr, (ULTRIX_SECTOR << 9) + ULTRIX_OFFSET, + sizeof(ULTRIX_MAGIC_STR) - 1, + (unsigned char *) ULTRIX_MAGIC_STR)) +- goto err; ++ goto nothing; + + if (blkid_partitions_need_typeonly(pr)) + /* caller does not ask for details about partitions */ +@@ -63,11 +67,11 @@ static int probe_ultrix_pt(blkid_probe pr, + + ls = blkid_probe_get_partlist(pr); + if (!ls) +- goto err; ++ goto nothing; + + tab = blkid_partlist_new_parttable(ls, "ultrix", 0); + if (!tab) +- goto err; ++ goto nothing; + + for (i = 0; i < ULTRIX_MAXPARTITIONS; i++) { + if (!l->pt_part[i].pi_nblocks) +@@ -76,7 +80,7 @@ static int probe_ultrix_pt(blkid_probe pr, + if (!blkid_partlist_add_partition(ls, tab, + l->pt_part[i].pi_blkoff, + l->pt_part[i].pi_nblocks)) +- goto err; ++ goto nothing; + } + } + +diff --git a/libblkid/src/partitions/unixware.c b/libblkid/src/partitions/unixware.c +index ce176b8..8cdae31 100644 +--- a/libblkid/src/partitions/unixware.c ++++ b/libblkid/src/partitions/unixware.c +@@ -106,8 +106,12 @@ static int probe_unixware_pt(blkid_probe pr, + + l = (struct unixware_disklabel *) + blkid_probe_get_sector(pr, UNIXWARE_SECTOR); +- if (!l) +- goto nothing; ++ if (!l) { ++ if (errno) ++ goto err; ++ else ++ goto nothing; ++ } + + if (le32_to_cpu(l->vtoc.v_magic) != UNIXWARE_VTOCMAGIC) + goto nothing; +@@ -118,13 +122,13 @@ static int probe_unixware_pt(blkid_probe pr, + + ls = blkid_probe_get_partlist(pr); + if (!ls) +- goto err; ++ goto nothing; + + parent = blkid_partlist_get_parent(ls); + + tab = blkid_partlist_new_parttable(ls, "unixware", UNIXWARE_OFFSET); + if (!tab) +- goto err; ++ goto nothing; + + /* Skip the first partition that describe whole disk + */ +@@ -155,7 +159,7 @@ static int probe_unixware_pt(blkid_probe pr, + + par = blkid_partlist_add_partition(ls, tab, start, size); + if (!par) +- goto err; ++ goto nothing; + + blkid_partition_set_type(par, tag); + blkid_partition_set_flags(par, flg); +diff --git a/libblkid/src/superblocks/adaptec_raid.c b/libblkid/src/superblocks/adaptec_raid.c +index 02e900d..eedf547 100644 +--- a/libblkid/src/superblocks/adaptec_raid.c ++++ b/libblkid/src/superblocks/adaptec_raid.c +@@ -80,10 +80,10 @@ static int probe_adraid(blkid_probe pr, + struct adaptec_metadata *ad; + + if (pr->size < 0x10000) +- return -1; ++ return 1; + + if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) +- return -1; ++ return 1; + + off = ((pr->size / 0x200)-1) * 0x200; + ad = (struct adaptec_metadata *) +@@ -91,16 +91,17 @@ static int probe_adraid(blkid_probe pr, + off, + sizeof(struct adaptec_metadata)); + if (!ad) +- return -1; ++ return errno ? -1 : 1; ++ + if (ad->smagic != be32_to_cpu(AD_SIGNATURE)) +- return -1; ++ return 1; + if (ad->b0idcode != be32_to_cpu(AD_MAGIC)) +- return -1; ++ return 1; + if (blkid_probe_sprintf_version(pr, "%u", ad->resver) != 0) +- return -1; ++ return 1; + if (blkid_probe_set_magic(pr, off, sizeof(ad->b0idcode), + (unsigned char *) &ad->b0idcode)) +- return -1; ++ return 1; + return 0; + } + +diff --git a/libblkid/src/superblocks/bcache.c b/libblkid/src/superblocks/bcache.c +index 303f7ee..a8f8fa6 100644 +--- a/libblkid/src/superblocks/bcache.c ++++ b/libblkid/src/superblocks/bcache.c +@@ -104,7 +104,7 @@ static int probe_bcache (blkid_probe pr, const struct blkid_idmag *mag) + + bcs = blkid_probe_get_sb(pr, mag, struct bcache_super_block); + if (!bcs) +- return -1; ++ return errno ? -1 : 1; + + if (le64_to_cpu(bcs->offset) != BCACHE_SB_OFF / 512) + return 1; +@@ -112,7 +112,7 @@ static int probe_bcache (blkid_probe pr, const struct blkid_idmag *mag) + return 1; + + if (blkid_probe_set_uuid(pr, bcs->uuid) < 0) +- return -1; ++ return 1; + + return 0; + }; +diff --git a/libblkid/src/superblocks/befs.c b/libblkid/src/superblocks/befs.c +index 452da1e..4bb260d 100644 +--- a/libblkid/src/superblocks/befs.c ++++ b/libblkid/src/superblocks/befs.c +@@ -264,7 +264,7 @@ static int64_t get_key_value(blkid_probe pr, const struct befs_super_block *bs, + bh = (struct bplustree_header *) get_tree_node(pr, bs, &bi->data, 0, + sizeof(struct bplustree_header), fs_le); + if (!bh) +- return -1; ++ return errno ? -1 : 1; + + if ((int32_t) FS32_TO_CPU(bh->magic, fs_le) != BPLUSTREE_MAGIC) + return -1; +@@ -275,7 +275,7 @@ static int64_t get_key_value(blkid_probe pr, const struct befs_super_block *bs, + bn = (struct bplustree_node *) get_tree_node(pr, bs, &bi->data, + node_pointer, FS32_TO_CPU(bh->node_size, fs_le), fs_le); + if (!bn) +- return -1; ++ return errno ? -1 : 1; + + keylengths = (uint16_t *) ((uint8_t *) bn + + ((sizeof(struct bplustree_node) +@@ -336,10 +336,10 @@ static int get_uuid(blkid_probe pr, const struct befs_super_block *bs, + + bi = (struct befs_inode *) get_block_run(pr, bs, &bs->root_dir, fs_le); + if (!bi) +- return -1; ++ return errno ? -1 : 1; + + if (FS32_TO_CPU(bi->magic1, fs_le) != INODE_MAGIC1) +- return -1; ++ return 1; + + sd = (struct small_data *) bi->small_data; + +@@ -376,10 +376,10 @@ static int get_uuid(blkid_probe pr, const struct befs_super_block *bs, + bi = (struct befs_inode *) get_block_run(pr, bs, + &bi->attributes, fs_le); + if (!bi) +- return -1; ++ return errno ? -1 : 1; + + if (FS32_TO_CPU(bi->magic1, fs_le) != INODE_MAGIC1) +- return -1; ++ return 1; + + value = get_key_value(pr, bs, bi, KEY_NAME, fs_le); + +@@ -390,10 +390,10 @@ static int get_uuid(blkid_probe pr, const struct befs_super_block *bs, + value << FS32_TO_CPU(bs->block_shift, fs_le), + FS32_TO_CPU(bs->block_size, fs_le)); + if (!bi) +- return -1; ++ return errno ? -1 : 1; + + if (FS32_TO_CPU(bi->magic1, fs_le) != INODE_MAGIC1) +- return -1; ++ return 1; + + if (FS32_TO_CPU(bi->type, fs_le) == B_UINT64_TYPE + && FS64_TO_CPU(bi->data.size, fs_le) == KEY_SIZE +@@ -404,7 +404,7 @@ static int get_uuid(blkid_probe pr, const struct befs_super_block *bs, + attr_data = (uint64_t *) get_block_run(pr, bs, + &bi->data.direct[0], fs_le); + if (!attr_data) +- return -1; ++ return errno ? -1 : 1; + + *uuid = *attr_data; + } +@@ -424,7 +424,7 @@ static int probe_befs(blkid_probe pr, const struct blkid_idmag *mag) + mag->sboff - B_OS_NAME_LENGTH, + sizeof(struct befs_super_block)); + if (!bs) +- return -1; ++ return errno ? -1 : 1; + + if (le32_to_cpu(bs->magic1) == SUPER_BLOCK_MAGIC1 + && le32_to_cpu(bs->magic2) == SUPER_BLOCK_MAGIC2 +@@ -439,11 +439,11 @@ static int probe_befs(blkid_probe pr, const struct blkid_idmag *mag) + fs_le = 0; + version = "big-endian"; + } else +- return -1; ++ return 1; + + ret = get_uuid(pr, bs, &volume_id, fs_le); + +- if (ret < 0) ++ if (ret != 0) + return ret; + + /* +diff --git a/libblkid/src/superblocks/btrfs.c b/libblkid/src/superblocks/btrfs.c +index 034683b..3c5c151 100644 +--- a/libblkid/src/superblocks/btrfs.c ++++ b/libblkid/src/superblocks/btrfs.c +@@ -70,7 +70,7 @@ static int probe_btrfs(blkid_probe pr, const struct blkid_idmag *mag) + + bfs = blkid_probe_get_sb(pr, mag, struct btrfs_super_block); + if (!bfs) +- return -1; ++ return errno ? -1 : 1; + + if (*bfs->label) + blkid_probe_set_label(pr, +diff --git a/libblkid/src/superblocks/cramfs.c b/libblkid/src/superblocks/cramfs.c +index b58ed08..cb7273f 100644 +--- a/libblkid/src/superblocks/cramfs.c ++++ b/libblkid/src/superblocks/cramfs.c +@@ -40,7 +40,7 @@ static int probe_cramfs(blkid_probe pr, const struct blkid_idmag *mag) + + cs = blkid_probe_get_sb(pr, mag, struct cramfs_super); + if (!cs) +- return -1; ++ return errno ? -1 : 1; + + blkid_probe_set_label(pr, cs->name, sizeof(cs->name)); + return 0; +diff --git a/libblkid/src/superblocks/ddf_raid.c b/libblkid/src/superblocks/ddf_raid.c +index 24df421..90820f8 100644 +--- a/libblkid/src/superblocks/ddf_raid.c ++++ b/libblkid/src/superblocks/ddf_raid.c +@@ -81,7 +81,7 @@ static int probe_ddf(blkid_probe pr, + uint64_t off, lba; + + if (pr->size < 0x30000) +- return -1; ++ return 1; + + for (i = 0; i < ARRAY_SIZE(hdrs); i++) { + off = ((pr->size / 0x200) - hdrs[i]) * 0x200; +@@ -90,8 +90,7 @@ static int probe_ddf(blkid_probe pr, + off, + sizeof(struct ddf_header)); + if (!ddf) +- return -1; +- ++ return errno ? -1 : 1; + if (ddf->signature == cpu_to_be32(DDF_MAGIC) || + ddf->signature == cpu_to_le32(DDF_MAGIC)) + break; +@@ -99,7 +98,7 @@ static int probe_ddf(blkid_probe pr, + } + + if (!ddf) +- return -1; ++ return 1; + + lba = ddf->signature == cpu_to_be32(DDF_MAGIC) ? + be64_to_cpu(ddf->primary_lba) : +@@ -111,8 +110,12 @@ static int probe_ddf(blkid_probe pr, + + buf = blkid_probe_get_buffer(pr, + lba << 9, sizeof(ddf->signature)); +- if (!buf || memcmp(buf, &ddf->signature, 4)) +- return -1; ++ if (!buf) { ++ if (errno) ++ return -1; ++ if (memcmp(buf, &ddf->signature, 4)) ++ return 1; ++ } + } + + blkid_probe_strncpy_uuid(pr, ddf->guid, sizeof(ddf->guid)); +@@ -121,11 +124,11 @@ static int probe_ddf(blkid_probe pr, + *(version + sizeof(ddf->ddf_rev)) = '\0'; + + if (blkid_probe_set_version(pr, version) != 0) +- return -1; ++ return 1; + if (blkid_probe_set_magic(pr, off, + sizeof(ddf->signature), + (unsigned char *) &ddf->signature)) +- return -1; ++ return 1; + return 0; + } + +diff --git a/libblkid/src/superblocks/drbd.c b/libblkid/src/superblocks/drbd.c +index 43e544e..d8309da 100644 +--- a/libblkid/src/superblocks/drbd.c ++++ b/libblkid/src/superblocks/drbd.c +@@ -75,18 +75,18 @@ static int probe_drbd(blkid_probe pr, + + /* Small devices cannot be drbd (?) */ + if (pr->size < 0x10000) +- return -1; ++ return 1; + + md = (struct md_on_disk_08 *) + blkid_probe_get_buffer(pr, + off, + sizeof(struct md_on_disk_08)); + if (!md) +- return -1; ++ return errno ? -1 : 1; + + if (be32_to_cpu(md->magic) != DRBD_MD_MAGIC_08 && + be32_to_cpu(md->magic) != DRBD_MD_MAGIC_84_UNCLEAN) +- return -1; ++ return 1; + + /* + * DRBD does not have "real" uuids; the following resembles DRBD's +@@ -102,7 +102,7 @@ static int probe_drbd(blkid_probe pr, + off + offsetof(struct md_on_disk_08, magic), + sizeof(md->magic), + (unsigned char *) &md->magic)) +- return -1; ++ return 1; + + return 0; + } +diff --git a/libblkid/src/superblocks/drbdproxy_datalog.c b/libblkid/src/superblocks/drbdproxy_datalog.c +index afe4725..2b76fe4 100644 +--- a/libblkid/src/superblocks/drbdproxy_datalog.c ++++ b/libblkid/src/superblocks/drbdproxy_datalog.c +@@ -33,7 +33,7 @@ static int probe_drbdproxy_datalog(blkid_probe pr, + + lh = (struct log_header_t *) blkid_probe_get_buffer(pr, 0, sizeof(*lh)); + if (!lh) +- return -1; ++ return errno ? -1 : 1; + + blkid_probe_set_uuid(pr, lh->uuid); + blkid_probe_sprintf_version(pr, "v%jd", le64_to_cpu(lh->version)); +diff --git a/libblkid/src/superblocks/exfat.c b/libblkid/src/superblocks/exfat.c +index 215c671..e684875 100644 +--- a/libblkid/src/superblocks/exfat.c ++++ b/libblkid/src/superblocks/exfat.c +@@ -115,12 +115,14 @@ static int probe_exfat(blkid_probe pr, const struct blkid_idmag *mag) + + sb = blkid_probe_get_sb(pr, mag, struct exfat_super_block); + if (!sb) +- return -1; ++ return errno ? -1 : 1; + + label = find_label(pr, sb); + if (label) + blkid_probe_set_utf8label(pr, label->name, + min(label->length * 2, 30), BLKID_ENC_UTF16LE); ++ else if (errno) ++ return -1; + + blkid_probe_sprintf_uuid(pr, sb->volume_serial, 4, + "%02hhX%02hhX-%02hhX%02hhX", +diff --git a/libblkid/src/superblocks/ext.c b/libblkid/src/superblocks/ext.c +index 8d57cb5..0b391c7 100644 +--- a/libblkid/src/superblocks/ext.c ++++ b/libblkid/src/superblocks/ext.c +@@ -328,9 +328,9 @@ static int probe_jbd(blkid_probe pr, + + es = ext_get_super(pr, NULL, &fi, NULL); + if (!es) +- return -BLKID_ERR_PARAM; ++ return errno ? -1 : 1; + if (!(fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)) +- return -BLKID_ERR_PARAM; ++ return 1; + + ext_get_info(pr, 2, es); + blkid_probe_set_uuid_as(pr, es->s_uuid, "LOGUUID"); +@@ -346,16 +346,16 @@ static int probe_ext2(blkid_probe pr, + + es = ext_get_super(pr, &fc, &fi, &frc); + if (!es) +- return -BLKID_ERR_PARAM; ++ return errno ? -1 : 1; + + /* Distinguish between ext3 and ext2 */ + if (fc & EXT3_FEATURE_COMPAT_HAS_JOURNAL) +- return -BLKID_ERR_PARAM; ++ return 1; + + /* Any features which ext2 doesn't understand */ + if ((frc & EXT2_FEATURE_RO_COMPAT_UNSUPPORTED) || + (fi & EXT2_FEATURE_INCOMPAT_UNSUPPORTED)) +- return -BLKID_ERR_PARAM; ++ return 1; + + /* + * If ext2 is not present, but ext4 or ext4dev are, then +@@ -364,7 +364,7 @@ static int probe_ext2(blkid_probe pr, + if (!system_supports_ext2() && + (system_supports_ext4() || system_supports_ext4dev()) && + system_supports_ext4_ext2()) +- return -BLKID_ERR_PARAM; ++ return 1; + + ext_get_info(pr, 2, es); + return 0; +@@ -378,16 +378,16 @@ static int probe_ext3(blkid_probe pr, + + es = ext_get_super(pr, &fc, &fi, &frc); + if (!es) +- return -BLKID_ERR_PARAM; ++ return errno ? -1 : 1; + + /* ext3 requires journal */ + if (!(fc & EXT3_FEATURE_COMPAT_HAS_JOURNAL)) +- return -BLKID_ERR_PARAM; ++ return 1; + + /* Any features which ext3 doesn't understand */ + if ((frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) || + (fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) +- return -BLKID_ERR_PARAM; ++ return 1; + + ext_get_info(pr, 3, es); + return 0; +@@ -402,11 +402,11 @@ static int probe_ext4dev(blkid_probe pr, + + es = ext_get_super(pr, &fc, &fi, &frc); + if (!es) +- return -BLKID_ERR_PARAM; ++ return errno ? -1 : 1; + + /* Distinguish from jbd */ + if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) +- return -BLKID_ERR_PARAM; ++ return 1; + + /* + * If the filesystem does not have a journal and ext2 and ext4 +@@ -431,9 +431,9 @@ static int probe_ext4dev(blkid_probe pr, + */ + if (le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS) { + if (!system_supports_ext4dev() && system_supports_ext4()) +- return -BLKID_ERR_PARAM; ++ return 1; + } else +- return -BLKID_ERR_PARAM; ++ return 1; + + force_ext4dev: + ext_get_info(pr, 4, es); +@@ -448,11 +448,11 @@ static int probe_ext4(blkid_probe pr, + + es = ext_get_super(pr, &fc, &fi, &frc); + if (!es) +- return -1; ++ return errno ? -1 : 1; + + /* Distinguish from jbd */ + if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) +- return -BLKID_ERR_PARAM; ++ return 1; + + /* + * If the filesystem does not have a journal and ext2 is not +@@ -467,7 +467,7 @@ static int probe_ext4(blkid_probe pr, + /* Ext4 has at least one feature which ext3 doesn't understand */ + if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) && + !(fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) +- return -BLKID_ERR_PARAM; ++ return 1; + + force_ext4: + /* +@@ -482,7 +482,7 @@ force_ext4: + */ + if (le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS) { + if (system_supports_ext4dev() || !system_supports_ext4()) +- return -BLKID_ERR_PARAM; ++ return 1; + } + + ext_get_info(pr, 4, es); +diff --git a/libblkid/src/superblocks/f2fs.c b/libblkid/src/superblocks/f2fs.c +index 1543a7a..e798952 100644 +--- a/libblkid/src/superblocks/f2fs.c ++++ b/libblkid/src/superblocks/f2fs.c +@@ -62,7 +62,7 @@ static int probe_f2fs(blkid_probe pr, const struct blkid_idmag *mag) + + sb = blkid_probe_get_sb(pr, mag, struct f2fs_super_block); + if (!sb) +- return -1; ++ return errno ? -1 : 1; + + major = le16_to_cpu(sb->major_ver); + minor = le16_to_cpu(sb->minor_ver); +diff --git a/libblkid/src/superblocks/gfs.c b/libblkid/src/superblocks/gfs.c +index b2c0163..1ca74a5 100644 +--- a/libblkid/src/superblocks/gfs.c ++++ b/libblkid/src/superblocks/gfs.c +@@ -64,7 +64,7 @@ static int probe_gfs(blkid_probe pr, const struct blkid_idmag *mag) + + sbd = blkid_probe_get_sb(pr, mag, struct gfs2_sb); + if (!sbd) +- return -1; ++ return errno ? -1 : 1; + + if (be32_to_cpu(sbd->sb_fs_format) == GFS_FORMAT_FS && + be32_to_cpu(sbd->sb_multihost_format) == GFS_FORMAT_MULTI) +@@ -78,7 +78,7 @@ static int probe_gfs(blkid_probe pr, const struct blkid_idmag *mag) + return 0; + } + +- return -1; ++ return 1; + } + + static int probe_gfs2(blkid_probe pr, const struct blkid_idmag *mag) +@@ -87,7 +87,7 @@ static int probe_gfs2(blkid_probe pr, const struct blkid_idmag *mag) + + sbd = blkid_probe_get_sb(pr, mag, struct gfs2_sb); + if (!sbd) +- return -1; ++ return errno ? -1 : 1; + + if (be32_to_cpu(sbd->sb_fs_format) == GFS2_FORMAT_FS && + be32_to_cpu(sbd->sb_multihost_format) == GFS2_FORMAT_MULTI) +@@ -100,7 +100,7 @@ static int probe_gfs2(blkid_probe pr, const struct blkid_idmag *mag) + blkid_probe_set_version(pr, "1"); + return 0; + } +- return -1; ++ return 1; + } + + const struct blkid_idinfo gfs_idinfo = +diff --git a/libblkid/src/superblocks/hfs.c b/libblkid/src/superblocks/hfs.c +index 6d960e9..c04b176 100644 +--- a/libblkid/src/superblocks/hfs.c ++++ b/libblkid/src/superblocks/hfs.c +@@ -154,7 +154,7 @@ static int probe_hfs(blkid_probe pr, const struct blkid_idmag *mag) + + hfs = blkid_probe_get_sb(pr, mag, struct hfs_mdb); + if (!hfs) +- return -1; ++ return errno ? -1 : 1; + + if ((memcmp(hfs->embed_sig, "H+", 2) == 0) || + (memcmp(hfs->embed_sig, "HX", 2) == 0)) +@@ -193,7 +193,7 @@ static int probe_hfsplus(blkid_probe pr, const struct blkid_idmag *mag) + + sbd = blkid_probe_get_sb(pr, mag, struct hfs_mdb); + if (!sbd) +- return -1; ++ return errno ? -1 : 1; + + /* Check for a HFS+ volume embedded in a HFS volume */ + if (memcmp(sbd->signature, "BD", 2) == 0) { +@@ -218,7 +218,7 @@ static int probe_hfsplus(blkid_probe pr, const struct blkid_idmag *mag) + struct hfsplus_vol_header); + + if (!hfsplus) +- return -1; ++ return errno ? -1 : 1; + + if ((memcmp(hfsplus->signature, "H+", 2) != 0) && + (memcmp(hfsplus->signature, "HX", 2) != 0)) +@@ -228,7 +228,7 @@ static int probe_hfsplus(blkid_probe pr, const struct blkid_idmag *mag) + + blocksize = be32_to_cpu(hfsplus->blocksize); + if (blocksize < HFSPLUS_SECTOR_SIZE) +- return -1; ++ return 1; + + memcpy(extents, hfsplus->cat_file.extents, sizeof(extents)); + cat_block = be32_to_cpu(extents[0].start_block); +@@ -236,7 +236,7 @@ static int probe_hfsplus(blkid_probe pr, const struct blkid_idmag *mag) + buf = blkid_probe_get_buffer(pr, + off + ((blkid_loff_t) cat_block * blocksize), 0x2000); + if (!buf) +- return 0; ++ return errno ? -1 : 0; + + bnode = (struct hfsplus_bheader_record *) + &buf[sizeof(struct hfsplus_bnode_descriptor)]; +@@ -271,7 +271,7 @@ static int probe_hfsplus(blkid_probe pr, const struct blkid_idmag *mag) + (blkid_loff_t) off + leaf_off, + leaf_node_size); + if (!buf) +- return 0; ++ return errno ? -1 : 0; + + descr = (struct hfsplus_bnode_descriptor *) buf; + record_count = be16_to_cpu(descr->num_recs); +diff --git a/libblkid/src/superblocks/highpoint_raid.c b/libblkid/src/superblocks/highpoint_raid.c +index 0b41344..1e242d8 100644 +--- a/libblkid/src/superblocks/highpoint_raid.c ++++ b/libblkid/src/superblocks/highpoint_raid.c +@@ -30,9 +30,9 @@ static int probe_highpoint45x(blkid_probe pr, + uint32_t magic; + + if (pr->size < 0x10000) +- return -1; ++ return 1; + if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) +- return -1; ++ return 1; + + off = ((pr->size / 0x200) - 11) * 0x200; + hpt = (struct hpt45x_metadata *) +@@ -40,13 +40,13 @@ static int probe_highpoint45x(blkid_probe pr, + off, + sizeof(struct hpt45x_metadata)); + if (!hpt) +- return -1; ++ return errno ? -1 : 1; + magic = le32_to_cpu(hpt->magic); + if (magic != HPT45X_MAGIC_OK && magic != HPT45X_MAGIC_BAD) +- return -1; ++ return 1; + if (blkid_probe_set_magic(pr, off, sizeof(hpt->magic), + (unsigned char *) &hpt->magic)) +- return -1; ++ return 1; + return 0; + } + +@@ -54,7 +54,7 @@ static int probe_highpoint37x(blkid_probe pr, + const struct blkid_idmag *mag __attribute__((__unused__))) + { + if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) +- return -1; ++ return 1; + return 0; + } + +diff --git a/libblkid/src/superblocks/hpfs.c b/libblkid/src/superblocks/hpfs.c +index f9b851a..48a0192 100644 +--- a/libblkid/src/superblocks/hpfs.c ++++ b/libblkid/src/superblocks/hpfs.c +@@ -68,7 +68,7 @@ static int probe_hpfs(blkid_probe pr, const struct blkid_idmag *mag) + /* super block */ + hs = blkid_probe_get_sb(pr, mag, struct hpfs_super_block); + if (!hs) +- return -1; ++ return errno ? -1 : 1; + version = hs->version; + + /* spare super block */ +@@ -77,9 +77,9 @@ static int probe_hpfs(blkid_probe pr, const struct blkid_idmag *mag) + HPFS_SBSPARE_OFFSET, + sizeof(struct hpfs_spare_super)); + if (!hss) +- return -1; ++ return errno ? -1 : 1; + if (memcmp(hss->magic, "\x49\x18\x91\xf9", 4) != 0) +- return -1; ++ return 1; + + /* boot block (with UUID and LABEL) */ + hbb = (struct hpfs_boot_block *) +@@ -87,7 +87,7 @@ static int probe_hpfs(blkid_probe pr, const struct blkid_idmag *mag) + 0, + sizeof(struct hpfs_boot_block)); + if (!hbb) +- return -1; ++ return errno ? -1 : 1; + if (memcmp(hbb->magic, "\x55\xaa", 2) == 0 && + memcmp(hbb->sig_hpfs, "HPFS", 4) == 0 && + hbb->sig_28h == 0x28) { +diff --git a/libblkid/src/superblocks/iso9660.c b/libblkid/src/superblocks/iso9660.c +index 148587b..911fcc0 100644 +--- a/libblkid/src/superblocks/iso9660.c ++++ b/libblkid/src/superblocks/iso9660.c +@@ -100,7 +100,7 @@ static int probe_iso9660_hsfs(blkid_probe pr, const struct blkid_idmag *mag) + + iso = blkid_probe_get_sb(pr, mag, struct high_sierra_volume_descriptor); + if (!iso) +- return -1; ++ return errno ? -1 : 1; + + blkid_probe_set_version(pr, "High Sierra"); + blkid_probe_set_label(pr, iso->volume_id, sizeof(iso->volume_id)); +@@ -178,7 +178,7 @@ int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag) + + iso = blkid_probe_get_sb(pr, mag, struct iso_volume_descriptor); + if (!iso) +- return -1; ++ return errno ? -1 : 1; + + memcpy(label, iso->volume_id, sizeof(label)); + +diff --git a/libblkid/src/superblocks/isw_raid.c b/libblkid/src/superblocks/isw_raid.c +index 755c1b6..4491cda 100644 +--- a/libblkid/src/superblocks/isw_raid.c ++++ b/libblkid/src/superblocks/isw_raid.c +@@ -33,9 +33,9 @@ static int probe_iswraid(blkid_probe pr, + struct isw_metadata *isw; + + if (pr->size < 0x10000) +- return -1; ++ return 1; + if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) +- return -1; ++ return 1; + + off = ((pr->size / 0x200) - 2) * 0x200; + isw = (struct isw_metadata *) +@@ -43,15 +43,16 @@ static int probe_iswraid(blkid_probe pr, + off, + sizeof(struct isw_metadata)); + if (!isw) +- return -1; ++ return errno ? -1 : 1; ++ + if (memcmp(isw->sig, ISW_SIGNATURE, sizeof(ISW_SIGNATURE)-1) != 0) +- return -1; ++ return 1; + if (blkid_probe_sprintf_version(pr, "%6s", + &isw->sig[sizeof(ISW_SIGNATURE)-1]) != 0) +- return -1; ++ return 1; + if (blkid_probe_set_magic(pr, off, sizeof(isw->sig), + (unsigned char *) isw->sig)) +- return -1; ++ return 1; + return 0; + } + +diff --git a/libblkid/src/superblocks/jfs.c b/libblkid/src/superblocks/jfs.c +index 78c018c..6f1bf1c 100644 +--- a/libblkid/src/superblocks/jfs.c ++++ b/libblkid/src/superblocks/jfs.c +@@ -40,7 +40,7 @@ static int probe_jfs(blkid_probe pr, const struct blkid_idmag *mag) + + js = blkid_probe_get_sb(pr, mag, struct jfs_super_block); + if (!js) +- return -1; ++ return errno ? -1 : 1; + if (le32_to_cpu(js->js_bsize) != (1U << le16_to_cpu(js->js_l2bsize))) + return 1; + if (le32_to_cpu(js->js_pbsize) != (1U << le16_to_cpu(js->js_l2pbsize))) +diff --git a/libblkid/src/superblocks/jmicron_raid.c b/libblkid/src/superblocks/jmicron_raid.c +index c708078..60ee187 100644 +--- a/libblkid/src/superblocks/jmicron_raid.c ++++ b/libblkid/src/superblocks/jmicron_raid.c +@@ -32,9 +32,9 @@ static int probe_jmraid(blkid_probe pr, + struct jm_metadata *jm; + + if (pr->size < 0x10000) +- return -1; ++ return 1; + if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) +- return -1; ++ return 1; + + off = ((pr->size / 0x200) - 1) * 0x200; + jm = (struct jm_metadata *) +@@ -42,15 +42,16 @@ static int probe_jmraid(blkid_probe pr, + off, + sizeof(struct jm_metadata)); + if (!jm) +- return -1; ++ return errno ? -1 : 1; ++ + if (memcmp(jm->signature, JM_SIGNATURE, sizeof(JM_SIGNATURE) - 1) != 0) +- return -1; ++ return 1; + if (blkid_probe_sprintf_version(pr, "%u.%u", + jm->major_version, jm->minor_version) != 0) +- return -1; ++ return 1; + if (blkid_probe_set_magic(pr, off, sizeof(jm->signature), + (unsigned char *) jm->signature)) +- return -1; ++ return 1; + return 0; + } + +diff --git a/libblkid/src/superblocks/linux_raid.c b/libblkid/src/superblocks/linux_raid.c +index a3f9d67..2c36b6e 100644 +--- a/libblkid/src/superblocks/linux_raid.c ++++ b/libblkid/src/superblocks/linux_raid.c +@@ -110,13 +110,13 @@ static int probe_raid0(blkid_probe pr, blkid_loff_t off) + uint64_t size; + + if (pr->size < MD_RESERVED_BYTES) +- return -1; ++ return 1; + mdp0 = (struct mdp0_super_block *) + blkid_probe_get_buffer(pr, + off, + sizeof(struct mdp0_super_block)); + if (!mdp0) +- return -1; ++ return errno ? -1 : 1; + + memset(uuid.ints, 0, sizeof(uuid.ints)); + +@@ -173,12 +173,12 @@ static int probe_raid0(blkid_probe pr, blkid_loff_t off) + } + + if (blkid_probe_sprintf_version(pr, "%u.%u.%u", ma, mi, pa) != 0) +- return -1; ++ return 1; + if (blkid_probe_set_uuid(pr, (unsigned char *) uuid.bytes) != 0) +- return -1; ++ return 1; + if (blkid_probe_set_magic(pr, off, sizeof(mdp0->md_magic), + (unsigned char *) &mdp0->md_magic)) +- return -1; ++ return 1; + return 0; + } + +@@ -191,24 +191,24 @@ static int probe_raid1(blkid_probe pr, off_t off) + off, + sizeof(struct mdp1_super_block)); + if (!mdp1) +- return -1; ++ return errno ? -1 : 1; + if (le32_to_cpu(mdp1->magic) != MD_SB_MAGIC) +- return -1; ++ return 1; + if (le32_to_cpu(mdp1->major_version) != 1U) +- return -1; ++ return 1; + if (le64_to_cpu(mdp1->super_offset) != (uint64_t) off >> 9) +- return -1; ++ return 1; + if (blkid_probe_set_uuid(pr, (unsigned char *) mdp1->set_uuid) != 0) +- return -1; ++ return 1; + if (blkid_probe_set_uuid_as(pr, + (unsigned char *) mdp1->device_uuid, "UUID_SUB") != 0) +- return -1; ++ return 1; + if (blkid_probe_set_label(pr, mdp1->set_name, + sizeof(mdp1->set_name)) != 0) +- return -1; ++ return 1; + if (blkid_probe_set_magic(pr, off, sizeof(mdp1->magic), + (unsigned char *) &mdp1->magic)) +- return -1; ++ return 1; + return 0; + } + +@@ -216,23 +216,31 @@ int probe_raid(blkid_probe pr, + const struct blkid_idmag *mag __attribute__((__unused__))) + { + const char *ver = NULL; ++ int ret; + + if (pr->size > MD_RESERVED_BYTES) { + /* version 0 at the end of the device */ + uint64_t sboff = (pr->size & ~(MD_RESERVED_BYTES - 1)) +- - MD_RESERVED_BYTES; +- if (probe_raid0(pr, sboff) == 0) +- return 0; ++ - MD_RESERVED_BYTES; ++ ret = probe_raid0(pr, sboff); ++ if (ret < 1) ++ return ret; + + /* version 1.0 at the end of the device */ + sboff = (pr->size & ~(0x1000 - 1)) - 0x2000; +- if (probe_raid1(pr, sboff) == 0) ++ ret = probe_raid1(pr, sboff); ++ if (ret < 0) ++ return ret; ++ if (ret == 0) + ver = "1.0"; + } + + if (!ver) { + /* version 1.1 at the start of the device */ +- if (probe_raid1(pr, 0) == 0) ++ ret = probe_raid1(pr, 0); ++ if (ret < 0) ++ return ret; ++ if (ret == 0) + ver = "1.1"; + + /* version 1.2 at 4k offset from the start */ +@@ -244,7 +252,7 @@ int probe_raid(blkid_probe pr, + blkid_probe_set_version(pr, ver); + return 0; + } +- return -1; ++ return 1; + } + + +diff --git a/libblkid/src/superblocks/lsi_raid.c b/libblkid/src/superblocks/lsi_raid.c +index 56721dd..5bfbe15 100644 +--- a/libblkid/src/superblocks/lsi_raid.c ++++ b/libblkid/src/superblocks/lsi_raid.c +@@ -30,9 +30,9 @@ static int probe_lsiraid(blkid_probe pr, + struct lsi_metadata *lsi; + + if (pr->size < 0x10000) +- return -1; ++ return 1; + if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) +- return -1; ++ return 1; + + off = ((pr->size / 0x200) - 1) * 0x200; + lsi = (struct lsi_metadata *) +@@ -40,13 +40,13 @@ static int probe_lsiraid(blkid_probe pr, + off, + sizeof(struct lsi_metadata)); + if (!lsi) +- return -1; ++ return errno ? -1 : 1; + + if (memcmp(lsi->sig, LSI_SIGNATURE, sizeof(LSI_SIGNATURE)-1) != 0) +- return -1; ++ return 1; + if (blkid_probe_set_magic(pr, off, sizeof(lsi->sig), + (unsigned char *) lsi->sig)) +- return -1; ++ return 1; + return 0; + } + +diff --git a/libblkid/src/superblocks/luks.c b/libblkid/src/superblocks/luks.c +index f716e31..420eaa0 100644 +--- a/libblkid/src/superblocks/luks.c ++++ b/libblkid/src/superblocks/luks.c +@@ -45,7 +45,7 @@ static int probe_luks(blkid_probe pr, const struct blkid_idmag *mag) + + header = blkid_probe_get_sb(pr, mag, struct luks_phdr); + if (header == NULL) +- return -1; ++ return errno ? -1 : 1; + + blkid_probe_strncpy_uuid(pr, (unsigned char *) header->uuid, + sizeof(header->uuid)); +diff --git a/libblkid/src/superblocks/lvm.c b/libblkid/src/superblocks/lvm.c +index 65c7c35..d956beb 100644 +--- a/libblkid/src/superblocks/lvm.c ++++ b/libblkid/src/superblocks/lvm.c +@@ -82,7 +82,7 @@ static int probe_lvm2(blkid_probe pr, const struct blkid_idmag *mag) + mag->kboff << 10, + 512 + sizeof(struct lvm2_pv_label_header)); + if (!buf) +- return -1; ++ return errno ? -1 : 1; + + /* buf is at 0k or 1k offset; find label inside */ + if (memcmp(buf, "LABELONE", 8) == 0) { +@@ -128,7 +128,7 @@ static int probe_lvm1(blkid_probe pr, const struct blkid_idmag *mag) + + label = blkid_probe_get_sb(pr, mag, struct lvm1_pv_label_header); + if (!label) +- return -1; ++ return errno ? -1 : 1; + + version = le16_to_cpu(label->version); + if (version != 1 && version != 2) +@@ -163,7 +163,7 @@ static int probe_verity(blkid_probe pr, const struct blkid_idmag *mag) + + sb = blkid_probe_get_sb(pr, mag, struct verity_sb); + if (sb == NULL) +- return -1; ++ return errno ? -1 : 1; + + version = le32_to_cpu(sb->version); + if (version != 1) +diff --git a/libblkid/src/superblocks/minix.c b/libblkid/src/superblocks/minix.c +index 0e7cd93..3aa236a 100644 +--- a/libblkid/src/superblocks/minix.c ++++ b/libblkid/src/superblocks/minix.c +@@ -80,17 +80,17 @@ static int probe_minix(blkid_probe pr, const struct blkid_idmag *mag) + max(sizeof(struct minix_super_block), + sizeof(struct minix3_super_block))); + if (!data) +- return -1; ++ return errno ? -1 : 1; + version = get_minix_version(data, &swabme); + if (version < 1) +- return -1; ++ return 1; + + if (version <= 2) { + struct minix_super_block *sb = (struct minix_super_block *) data; + int zones, ninodes, imaps, zmaps, firstz; + + if (sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0) +- return -1; ++ return 1; + + zones = version == 2 ? minix_swab32(swabme, sb->s_zones) : + minix_swab16(swabme, sb->s_nzones); +@@ -101,15 +101,15 @@ static int probe_minix(blkid_probe pr, const struct blkid_idmag *mag) + + /* sanity checks to be sure that the FS is really minix */ + if (imaps * MINIX_BLOCK_SIZE * 8 < ninodes + 1) +- return -1; ++ return 1; + if (zmaps * MINIX_BLOCK_SIZE * 8 < zones - firstz + 1) +- return -1; ++ return 1; + + } else if (version == 3) { + struct minix3_super_block *sb = (struct minix3_super_block *) data; + + if (sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0) +- return -1; ++ return 1; + } + + /* unfortunately, some parts of ext3 is sometimes possible to +@@ -117,8 +117,10 @@ static int probe_minix(blkid_probe pr, const struct blkid_idmag *mag) + * string. (For extN magic string and offsets see ext.c.) + */ + ext = blkid_probe_get_buffer(pr, 0x400 + 0x38, 2); +- if (ext && memcmp(ext, "\123\357", 2) == 0) +- return -1; ++ if (!ext) ++ return errno ? -1 : 1; ++ else if (memcmp(ext, "\123\357", 2) == 0) ++ return 1; + + blkid_probe_sprintf_version(pr, "%d", version); + return 0; +diff --git a/libblkid/src/superblocks/netware.c b/libblkid/src/superblocks/netware.c +index 7ef2162..9e2801b 100644 +--- a/libblkid/src/superblocks/netware.c ++++ b/libblkid/src/superblocks/netware.c +@@ -71,7 +71,7 @@ static int probe_netware(blkid_probe pr, const struct blkid_idmag *mag) + + nw = blkid_probe_get_sb(pr, mag, struct netware_super_block); + if (!nw) +- return -1; ++ return errno ? -1 : 1; + + blkid_probe_set_uuid(pr, nw->SBH_PoolID); + +diff --git a/libblkid/src/superblocks/nilfs.c b/libblkid/src/superblocks/nilfs.c +index 24ccf63..41c5066 100644 +--- a/libblkid/src/superblocks/nilfs.c ++++ b/libblkid/src/superblocks/nilfs.c +@@ -93,12 +93,12 @@ static int probe_nilfs2(blkid_probe pr, const struct blkid_idmag *mag) + sbp = (struct nilfs_super_block *) blkid_probe_get_buffer( + pr, NILFS_SB_OFFSET, sizeof(struct nilfs_super_block)); + if (!sbp) +- return -1; ++ return errno ? -1 : 1; + /* backup */ + sbb = (struct nilfs_super_block *) blkid_probe_get_buffer( + pr, ((pr->size / 0x200) - 8) * 0x200, sizeof(struct nilfs_super_block)); + if (!sbp) +- return -1; ++ return errno ? -1 : 1; + + /* + * Compare two super blocks and set 1 in swp if the secondary +diff --git a/libblkid/src/superblocks/ntfs.c b/libblkid/src/superblocks/ntfs.c +index d767cb4..3f62bbc 100644 +--- a/libblkid/src/superblocks/ntfs.c ++++ b/libblkid/src/superblocks/ntfs.c +@@ -91,7 +91,7 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag) + + ns = blkid_probe_get_sb(pr, mag, struct ntfs_super_block); + if (!ns) +- return -1; ++ return errno ? -1 : 1; + + /* + * Check bios parameters block +@@ -158,7 +158,7 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag) + + buf_mft = blkid_probe_get_buffer(pr, off, mft_record_size); + if (!buf_mft) +- return 1; ++ return errno ? -1 : 1; + + if (memcmp(buf_mft, "FILE", 4)) + return 1; +@@ -167,7 +167,7 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag) + + buf_mft = blkid_probe_get_buffer(pr, off, mft_record_size); + if (!buf_mft) +- return 1; ++ return errno ? -1 : 1; + + if (memcmp(buf_mft, "FILE", 4)) + return 1; +diff --git a/libblkid/src/superblocks/nvidia_raid.c b/libblkid/src/superblocks/nvidia_raid.c +index dd86cdc..54038e7 100644 +--- a/libblkid/src/superblocks/nvidia_raid.c ++++ b/libblkid/src/superblocks/nvidia_raid.c +@@ -32,9 +32,9 @@ static int probe_nvraid(blkid_probe pr, + struct nv_metadata *nv; + + if (pr->size < 0x10000) +- return -1; ++ return 1; + if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) +- return -1; ++ return 1; + + off = ((pr->size / 0x200) - 2) * 0x200; + nv = (struct nv_metadata *) +@@ -42,15 +42,15 @@ static int probe_nvraid(blkid_probe pr, + off, + sizeof(struct nv_metadata)); + if (!nv) +- return -1; ++ return errno ? -1 : 1; + + if (memcmp(nv->vendor, NVIDIA_SIGNATURE, sizeof(NVIDIA_SIGNATURE)-1) != 0) +- return -1; ++ return 1; + if (blkid_probe_sprintf_version(pr, "%u", le16_to_cpu(nv->version)) != 0) +- return -1; ++ return 1; + if (blkid_probe_set_magic(pr, off, sizeof(nv->vendor), + (unsigned char *) nv->vendor)) +- return -1; ++ return 1; + return 0; + } + +diff --git a/libblkid/src/superblocks/ocfs.c b/libblkid/src/superblocks/ocfs.c +index 82170ac..f537db4 100644 +--- a/libblkid/src/superblocks/ocfs.c ++++ b/libblkid/src/superblocks/ocfs.c +@@ -109,14 +109,14 @@ static int probe_ocfs(blkid_probe pr, const struct blkid_idmag *mag) + buf = blkid_probe_get_buffer(pr, mag->kboff << 10, + sizeof(struct ocfs_volume_header)); + if (!buf) +- return -1; ++ return errno ? -1 : 1; + memcpy(&ovh, buf, sizeof(ovh)); + + /* label */ + buf = blkid_probe_get_buffer(pr, (mag->kboff << 10) + 512, + sizeof(struct ocfs_volume_label)); + if (!buf) +- return -1; ++ return errno ? -1 : 1; + memcpy(&ovl, buf, sizeof(ovl)); + + maj = ocfsmajor(ovh); +@@ -144,7 +144,7 @@ static int probe_ocfs2(blkid_probe pr, const struct blkid_idmag *mag) + + osb = blkid_probe_get_sb(pr, mag, struct ocfs2_super_block); + if (!osb) +- return -1; ++ return errno ? -1 : 1; + + blkid_probe_set_label(pr, (unsigned char *) osb->s_label, sizeof(osb->s_label)); + blkid_probe_set_uuid(pr, osb->s_uuid); +@@ -162,7 +162,7 @@ static int probe_oracleasm(blkid_probe pr, const struct blkid_idmag *mag) + + dl = blkid_probe_get_sb(pr, mag, struct oracle_asm_disk_label); + if (!dl) +- return -1; ++ return errno ? -1 : 1; + + blkid_probe_set_label(pr, (unsigned char *) dl->dl_id, sizeof(dl->dl_id)); + return 0; +diff --git a/libblkid/src/superblocks/promise_raid.c b/libblkid/src/superblocks/promise_raid.c +index 01e4e37..d56560c 100644 +--- a/libblkid/src/superblocks/promise_raid.c ++++ b/libblkid/src/superblocks/promise_raid.c +@@ -33,9 +33,9 @@ static int probe_pdcraid(blkid_probe pr, + }; + + if (pr->size < 0x40000) +- return -1; ++ return 1; + if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) +- return -1; ++ return 1; + + for (i = 0; sectors[i] != 0; i++) { + uint64_t off; +@@ -47,18 +47,18 @@ static int probe_pdcraid(blkid_probe pr, + off, + sizeof(struct promise_metadata)); + if (!pdc) +- return -1; ++ return errno ? -1 : 1; + + if (memcmp(pdc->sig, PDC_SIGNATURE, + sizeof(PDC_SIGNATURE) - 1) == 0) { + + if (blkid_probe_set_magic(pr, off, sizeof(pdc->sig), + (unsigned char *) pdc->sig)) +- return -1; ++ return 1; + return 0; + } + } +- return -1; ++ return 1; + } + + const struct blkid_idinfo pdcraid_idinfo = { +diff --git a/libblkid/src/superblocks/reiserfs.c b/libblkid/src/superblocks/reiserfs.c +index 152571f..247891a 100644 +--- a/libblkid/src/superblocks/reiserfs.c ++++ b/libblkid/src/superblocks/reiserfs.c +@@ -45,17 +45,17 @@ static int probe_reiser(blkid_probe pr, const struct blkid_idmag *mag) + + rs = blkid_probe_get_sb(pr, mag, struct reiserfs_super_block); + if (!rs) +- return -1; ++ return errno ? -1 : 1; + + blocksize = le16_to_cpu(rs->rs_blocksize); + + /* The blocksize must be at least 512B */ + if ((blocksize >> 9) == 0) +- return -BLKID_ERR_PARAM; ++ return 1; + + /* If the superblock is inside the journal, we have the wrong one */ + if (mag->kboff / (blocksize >> 9) > le32_to_cpu(rs->rs_journal_block) / 2) +- return -BLKID_ERR_BIG; ++ return 1; + + /* LABEL/UUID are only valid for later versions of Reiserfs v3.6. */ + if (mag->magic[6] == '2' || mag->magic[6] == '3') { +@@ -82,7 +82,7 @@ static int probe_reiser4(blkid_probe pr, const struct blkid_idmag *mag) + + rs4 = blkid_probe_get_sb(pr, mag, struct reiser4_super_block); + if (!rs4) +- return -1; ++ return errno ? -1 : 1; + + if (*rs4->rs4_label) + blkid_probe_set_label(pr, rs4->rs4_label, sizeof(rs4->rs4_label)); +diff --git a/libblkid/src/superblocks/romfs.c b/libblkid/src/superblocks/romfs.c +index 91ef996..6f339c0 100644 +--- a/libblkid/src/superblocks/romfs.c ++++ b/libblkid/src/superblocks/romfs.c +@@ -29,7 +29,7 @@ static int probe_romfs(blkid_probe pr, const struct blkid_idmag *mag) + + ros = blkid_probe_get_sb(pr, mag, struct romfs_super_block); + if (!ros) +- return -1; ++ return errno ? -1 : 1; + + if (strlen((char *) ros->ros_volume)) + blkid_probe_set_label(pr, ros->ros_volume, +diff --git a/libblkid/src/superblocks/silicon_raid.c b/libblkid/src/superblocks/silicon_raid.c +index 10a3023..e38606c 100644 +--- a/libblkid/src/superblocks/silicon_raid.c ++++ b/libblkid/src/superblocks/silicon_raid.c +@@ -88,9 +88,9 @@ static int probe_silraid(blkid_probe pr, + struct silicon_metadata *sil; + + if (pr->size < 0x10000) +- return -1; ++ return 1; + if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) +- return -1; ++ return 1; + + off = ((pr->size / 0x200) - 1) * 0x200; + +@@ -98,7 +98,7 @@ static int probe_silraid(blkid_probe pr, + blkid_probe_get_buffer(pr, off, + sizeof(struct silicon_metadata)); + if (!sil) +- return -1; ++ return errno ? -1 : 1; + + if (le32_to_cpu(sil->magic) != SILICON_MAGIC) + return 1; +@@ -110,13 +110,13 @@ static int probe_silraid(blkid_probe pr, + if (blkid_probe_sprintf_version(pr, "%u.%u", + le16_to_cpu(sil->major_ver), + le16_to_cpu(sil->minor_ver)) != 0) +- return -1; ++ return 1; + + if (blkid_probe_set_magic(pr, + off + offsetof(struct silicon_metadata, magic), + sizeof(sil->magic), + (unsigned char *) &sil->magic)) +- return -1; ++ return 1; + return 0; + } + +diff --git a/libblkid/src/superblocks/squashfs.c b/libblkid/src/superblocks/squashfs.c +index f8ac95e..6b2f1b1 100644 +--- a/libblkid/src/superblocks/squashfs.c ++++ b/libblkid/src/superblocks/squashfs.c +@@ -36,7 +36,7 @@ static int probe_squashfs(blkid_probe pr, const struct blkid_idmag *mag) + + sq = blkid_probe_get_sb(pr, mag, struct sqsh_super_block); + if (!sq) +- return -1; ++ return errno ? -1 : 1; + + major = le16_to_cpu(sq->s_major); + minor = le16_to_cpu(sq->s_minor); +@@ -56,7 +56,7 @@ static int probe_squashfs3(blkid_probe pr, const struct blkid_idmag *mag) + + sq = blkid_probe_get_sb(pr, mag, struct sqsh_super_block); + if (!sq) +- return -1; ++ return errno ? -1 : 1; + + if (strcmp(mag->magic, "sqsh") == 0) { + major = be16_to_cpu(sq->s_major); +@@ -67,7 +67,7 @@ static int probe_squashfs3(blkid_probe pr, const struct blkid_idmag *mag) + } + + if (major > 3) +- return -1; ++ return 1; + + blkid_probe_sprintf_version(pr, "%u.%u", major, minor); + +diff --git a/libblkid/src/superblocks/swap.c b/libblkid/src/superblocks/swap.c +index 4297a9c..2ea94d2 100644 +--- a/libblkid/src/superblocks/swap.c ++++ b/libblkid/src/superblocks/swap.c +@@ -44,27 +44,27 @@ static int swap_set_info(blkid_probe pr, const char *version) + hdr = (struct swap_header_v1_2 *) blkid_probe_get_buffer(pr, 1024, + sizeof(struct swap_header_v1_2)); + if (!hdr) +- return -1; ++ return errno ? -1 : 1; + + /* SWAPSPACE2 - check for wrong version or zeroed pagecount */ +- if (strcmp(version, "1") == 0) { ++ if (strcmp(version, "2") == 0) { + if (hdr->version != 1 && swab32(hdr->version) != 1) { + DBG(LOWPROBE, blkid_debug("incorrect swap version")); +- return -1; ++ return 1; + } + if (hdr->lastpage == 0) { + DBG(LOWPROBE, blkid_debug("not set last swap page")); +- return -1; ++ return 1; + } +- } ++ } + + /* arbitrary sanity check.. is there any garbage down there? */ + if (hdr->padding[32] == 0 && hdr->padding[33] == 0) { + if (hdr->volume[0] && blkid_probe_set_label(pr, hdr->volume, + sizeof(hdr->volume)) < 0) +- return -1; ++ return 1; + if (blkid_probe_set_uuid(pr, hdr->uuid) < 0) +- return -1; ++ return 1; + } + + blkid_probe_set_version(pr, version); +@@ -76,12 +76,12 @@ static int probe_swap(blkid_probe pr, const struct blkid_idmag *mag) + unsigned char *buf; + + if (!mag) +- return -1; ++ return 1; + + /* TuxOnIce keeps valid swap header at the end of the 1st page */ + buf = blkid_probe_get_buffer(pr, 0, TOI_MAGIC_STRLEN); + if (!buf) +- return -1; ++ return errno ? -1 : 1; + + if (memcmp(buf, TOI_MAGIC_STRING, TOI_MAGIC_STRLEN) == 0) + return 1; /* Ignore swap signature, it's TuxOnIce */ +@@ -94,13 +94,13 @@ static int probe_swap(blkid_probe pr, const struct blkid_idmag *mag) + } else if (!memcmp(mag->magic, "SWAPSPACE2", mag->len)) + return swap_set_info(pr, "1"); + +- return -1; ++ return 1; + } + + static int probe_swsuspend(blkid_probe pr, const struct blkid_idmag *mag) + { + if (!mag) +- return -1; ++ return 1; + if (!memcmp(mag->magic, "S1SUSPEND", mag->len)) + return swap_set_info(pr, "s1suspend"); + if (!memcmp(mag->magic, "S2SUSPEND", mag->len)) +@@ -112,7 +112,7 @@ static int probe_swsuspend(blkid_probe pr, const struct blkid_idmag *mag) + if (!memcmp(mag->magic, "LINHIB0001", mag->len)) + return swap_set_info(pr, "linhib0001"); + +- return -1; /* no signature detected */ ++ return 1; /* no signature detected */ + } + + const struct blkid_idinfo swap_idinfo = +diff --git a/libblkid/src/superblocks/sysv.c b/libblkid/src/superblocks/sysv.c +index 80b0cc5..528e8f9 100644 +--- a/libblkid/src/superblocks/sysv.c ++++ b/libblkid/src/superblocks/sysv.c +@@ -80,7 +80,7 @@ static int probe_xenix(blkid_probe pr, const struct blkid_idmag *mag) + + sb = blkid_probe_get_sb(pr, mag, struct xenix_super_block); + if (!sb) +- return -1; ++ return errno ? -1 : 1; + blkid_probe_set_label(pr, sb->s_fname, sizeof(sb->s_fname)); + return 0; + } +@@ -105,21 +105,21 @@ static int probe_sysv(blkid_probe pr, + off, + sizeof(struct sysv_super_block)); + if (!sb) +- return -1; ++ return errno ? -1 : 1; + + if (sb->s_magic == cpu_to_le32(0xfd187e20) || + sb->s_magic == cpu_to_be32(0xfd187e20)) { + + if (blkid_probe_set_label(pr, sb->s_fname, + sizeof(sb->s_fname))) +- return -1; ++ return 1; + + if (blkid_probe_set_magic(pr, + off + offsetof(struct sysv_super_block, + s_magic), + sizeof(sb->s_magic), + (unsigned char *) &sb->s_magic)) +- return -1; ++ return 1; + + return 0; + } +diff --git a/libblkid/src/superblocks/ubifs.c b/libblkid/src/superblocks/ubifs.c +index ef84f53..761f3db 100644 +--- a/libblkid/src/superblocks/ubifs.c ++++ b/libblkid/src/superblocks/ubifs.c +@@ -99,7 +99,7 @@ static int probe_ubifs(blkid_probe pr, const struct blkid_idmag *mag) + + sb = blkid_probe_get_sb(pr, mag, struct ubifs_sb_node); + if (!sb) +- return -1; ++ return errno ? -1 : 1; + + blkid_probe_set_uuid(pr, sb->uuid); + blkid_probe_sprintf_version(pr, "w%dr%d", +diff --git a/libblkid/src/superblocks/udf.c b/libblkid/src/superblocks/udf.c +index 8702dd0..e3b38c2 100644 +--- a/libblkid/src/superblocks/udf.c ++++ b/libblkid/src/superblocks/udf.c +@@ -85,11 +85,11 @@ static int probe_udf(blkid_probe pr, + UDF_VSD_OFFSET + b, + sizeof(*vsd)); + if (!vsd) +- return 1; ++ return errno ? -1 : 1; + if (vsd->id[0] != '\0') + goto nsr; + } +- return -1; ++ return 1; + + nsr: + /* search the list of VSDs for a NSR descriptor */ +@@ -99,15 +99,15 @@ nsr: + UDF_VSD_OFFSET + ((blkid_loff_t) b * 0x800), + sizeof(*vsd)); + if (!vsd) +- return -1; ++ return errno ? -1 : 1; + if (vsd->id[0] == '\0') +- return -1; ++ return 1; + if (memcmp(vsd->id, "NSR02", 5) == 0) + goto anchor; + if (memcmp(vsd->id, "NSR03", 5) == 0) + goto anchor; + } +- return -1; ++ return 1; + + anchor: + /* read Anchor Volume Descriptor (AVDP), checking block size */ +@@ -115,7 +115,7 @@ anchor: + vd = (struct volume_descriptor *) + blkid_probe_get_buffer(pr, 256 * pbs[i], sizeof(*vd)); + if (!vd) +- return -1; ++ return errno ? -1 : 1; + + type = le16_to_cpu(vd->tag.id); + if (type == 2) /* TAG_ID_AVDP */ +@@ -138,7 +138,7 @@ real_blksz: + (blkid_loff_t) (loc + b) * bs, + sizeof(*vd)); + if (!vd) +- return -1; ++ return errno ? -1 : 1; + } + + /* Try extract all possible ISO9660 information -- if there is +@@ -155,7 +155,7 @@ real_blksz: + (blkid_loff_t) (loc + b) * bs, + sizeof(*vd)); + if (!vd) +- return -1; ++ return errno ? -1 : 1; + type = le16_to_cpu(vd->tag.id); + if (type == 0) + break; +diff --git a/libblkid/src/superblocks/ufs.c b/libblkid/src/superblocks/ufs.c +index 673a528..999fd90 100644 +--- a/libblkid/src/superblocks/ufs.c ++++ b/libblkid/src/superblocks/ufs.c +@@ -185,7 +185,7 @@ static int probe_ufs(blkid_probe pr, + offsets[i] * 1024, + sizeof(struct ufs_super_block)); + if (!ufs) +- return -1; ++ return errno ? -1 : 1; + + magBE = be32_to_cpu(ufs->fs_magic); + magLE = le32_to_cpu(ufs->fs_magic); +@@ -231,7 +231,7 @@ found: + offsetof(struct ufs_super_block, fs_magic), + sizeof(ufs->fs_magic), + (unsigned char *) &ufs->fs_magic)) +- return -1; ++ return 1; + + return 0; + } +diff --git a/libblkid/src/superblocks/vfat.c b/libblkid/src/superblocks/vfat.c +index 8ff241b..3e278e7 100644 +--- a/libblkid/src/superblocks/vfat.c ++++ b/libblkid/src/superblocks/vfat.c +@@ -261,10 +261,10 @@ int blkid_probe_is_vfat(blkid_probe pr) + + ms = blkid_probe_get_sb(pr, mag, struct msdos_super_block); + if (!ms) +- return 0; ++ return errno ? -1 : 0; + vs = blkid_probe_get_sb(pr, mag, struct vfat_super_block); + if (!vs) +- return 0; ++ return errno ? -1 : 0; + + return fat_valid_superblock(mag, ms, vs, NULL, NULL); + } +@@ -283,10 +283,12 @@ static int probe_vfat(blkid_probe pr, const struct blkid_idmag *mag) + + ms = blkid_probe_get_sb(pr, mag, struct msdos_super_block); + if (!ms) +- return 0; ++ return errno ? -1 : 1; ++ + vs = blkid_probe_get_sb(pr, mag, struct vfat_super_block); + if (!vs) +- return 0; ++ return errno ? -1 : 1; ++ + if (!fat_valid_superblock(mag, ms, vs, &cluster_count, &fat_size)) + return 1; + +@@ -376,16 +378,16 @@ static int probe_vfat(blkid_probe pr, const struct blkid_idmag *mag) + (blkid_loff_t) fsinfo_sect * sector_size, + sizeof(struct fat32_fsinfo)); + if (buf == NULL) +- return -1; ++ return errno ? -1 : 1; + + fsinfo = (struct fat32_fsinfo *) buf; + if (memcmp(fsinfo->signature1, "\x52\x52\x61\x41", 4) != 0 && + memcmp(fsinfo->signature1, "\x52\x52\x64\x41", 4) != 0 && + memcmp(fsinfo->signature1, "\x00\x00\x00\x00", 4) != 0) +- return -1; ++ return 1; + if (memcmp(fsinfo->signature2, "\x72\x72\x41\x61", 4) != 0 && + memcmp(fsinfo->signature2, "\x00\x00\x00\x00", 4) != 0) +- return -1; ++ return 1; + } + } + +diff --git a/libblkid/src/superblocks/via_raid.c b/libblkid/src/superblocks/via_raid.c +index 5c15167..ff7a965 100644 +--- a/libblkid/src/superblocks/via_raid.c ++++ b/libblkid/src/superblocks/via_raid.c +@@ -63,7 +63,7 @@ static int probe_viaraid(blkid_probe pr, + off, + sizeof(struct via_metadata)); + if (!v) +- return -1; ++ return errno ? -1 : 1; + + if (le16_to_cpu(v->signature) != VIA_SIGNATURE) + return 1; +@@ -73,11 +73,11 @@ static int probe_viaraid(blkid_probe pr, + return 1; + + if (blkid_probe_sprintf_version(pr, "%u", v->version_number) != 0) +- return -1; ++ return 1; + if (blkid_probe_set_magic(pr, off, + sizeof(v->signature), + (unsigned char *) &v->signature)) +- return -1; ++ return 1; + return 0; + } + +diff --git a/libblkid/src/superblocks/vmfs.c b/libblkid/src/superblocks/vmfs.c +index ead09a8..27d0888 100644 +--- a/libblkid/src/superblocks/vmfs.c ++++ b/libblkid/src/superblocks/vmfs.c +@@ -28,7 +28,7 @@ static int probe_vmfs_fs(blkid_probe pr, const struct blkid_idmag *mag) + + header = blkid_probe_get_sb(pr, mag, struct vmfs_fs_info); + if (header == NULL) +- return -1; ++ return errno ? -1 : 1; + + blkid_probe_sprintf_uuid(pr, (unsigned char *) header->uuid, 16, + "%02x%02x%02x%02x-%02x%02x%02x%02x-" +@@ -53,7 +53,7 @@ static int probe_vmfs_volume(blkid_probe pr, const struct blkid_idmag *mag) + + header = blkid_probe_get_sb(pr, mag, struct vmfs_volume_info); + if (header == NULL) +- return -1; ++ return errno ? -1 : 1; + + blkid_probe_sprintf_value(pr, "UUID_SUB", + "%02x%02x%02x%02x-%02x%02x%02x%02x-" +diff --git a/libblkid/src/superblocks/vxfs.c b/libblkid/src/superblocks/vxfs.c +index fdab85a..4537560 100644 +--- a/libblkid/src/superblocks/vxfs.c ++++ b/libblkid/src/superblocks/vxfs.c +@@ -20,7 +20,7 @@ static int probe_vxfs(blkid_probe pr, const struct blkid_idmag *mag) + + vxs = blkid_probe_get_sb(pr, mag, struct vxfs_super_block); + if (!vxs) +- return -1; ++ return errno ? -1 : 1; + + blkid_probe_sprintf_version(pr, "%u", (unsigned int) vxs->vs_version); + return 0; +diff --git a/libblkid/src/superblocks/xfs.c b/libblkid/src/superblocks/xfs.c +index b485917..3c8b5ea 100644 +--- a/libblkid/src/superblocks/xfs.c ++++ b/libblkid/src/superblocks/xfs.c +@@ -41,7 +41,7 @@ static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag) + + xs = blkid_probe_get_sb(pr, mag, struct xfs_super_block); + if (!xs) +- return -1; ++ return errno ? -1 : 1; + + if (strlen(xs->xs_fname)) + blkid_probe_set_label(pr, (unsigned char *) xs->xs_fname, +@@ -123,7 +123,7 @@ static int probe_xfs_log(blkid_probe pr, const struct blkid_idmag *mag) + + buf = blkid_probe_get_buffer(pr, 0, 256*1024); + if (!buf) +- return -1; ++ return errno ? -1 : 1; + + if (memcmp(buf, "XFSB", 4) == 0) + return 1; /* this is regular XFS, ignore */ +@@ -138,7 +138,7 @@ static int probe_xfs_log(blkid_probe pr, const struct blkid_idmag *mag) + } + } + +- return -1; ++ return 1; + } + + const struct blkid_idinfo xfs_log_idinfo = +diff --git a/libblkid/src/superblocks/zfs.c b/libblkid/src/superblocks/zfs.c +index fb86aec..d28786b 100644 +--- a/libblkid/src/superblocks/zfs.c ++++ b/libblkid/src/superblocks/zfs.c +@@ -185,7 +185,7 @@ static int probe_zfs(blkid_probe pr, + blkid_probe_get_buffer(pr, offset, + sizeof(struct zfs_uberblock)); + if (ub == NULL) +- return -1; ++ return errno ? -1 : 1; + + if (ub->ub_magic == UBERBLOCK_MAGIC) { + ub_offset = offset; +@@ -202,7 +202,7 @@ static int probe_zfs(blkid_probe pr, + } + + if (found < 4) +- return -1; ++ return 1; + + /* If we found the 4th uberblock, then we will have exited from the + * scanning loop immediately, and ub will be a valid uberblock. */ +@@ -214,7 +214,7 @@ static int probe_zfs(blkid_probe pr, + if (blkid_probe_set_magic(pr, ub_offset, + sizeof(ub->ub_magic), + (unsigned char *) &ub->ub_magic)) +- return -1; ++ return 1; + + return 0; + } +-- +1.8.1.4 + diff --git a/blkid-stop-scanning-on-I-O-error.patch b/blkid-stop-scanning-on-I-O-error.patch new file mode 100644 index 0000000..f34927a --- /dev/null +++ b/blkid-stop-scanning-on-I-O-error.patch @@ -0,0 +1,138 @@ +From 65245d440656a8df4352f9a5b9ec047bf4b6a663 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Tue, 21 Jan 2014 09:16:46 +0100 +Subject: [PATCH] blkid: stop scanning on I/O error + +Whenever we fail to read from a device it's pointless to +continue with probing; we should be failing immediately. +Otherwise the system will continue logging I/O errors. + +This patch updates the probe functions to return -1 +on error and 1 if not found. + +Signed-off-by: Hannes Reinecke +--- + libblkid/src/partitions/partitions.c | 13 +++++++++---- + libblkid/src/probe.c | 13 +++++++++++-- + libblkid/src/superblocks/superblocks.c | 13 ++++++++++--- + 3 files changed, 30 insertions(+), 9 deletions(-) + +diff --git a/libblkid/src/partitions/partitions.c b/libblkid/src/partitions/partitions.c +index 6c915d9..98baece 100644 +--- a/libblkid/src/partitions/partitions.c ++++ b/libblkid/src/partitions/partitions.c +@@ -540,7 +540,8 @@ static int idinfo_probe(blkid_probe pr, const struct blkid_idinfo *id, + if (pr->size <= 0 || (id->minsz && id->minsz > pr->size)) + goto nothing; /* the device is too small */ + +- if (blkid_probe_get_idmag(pr, id, &off, &mag)) ++ rc = blkid_probe_get_idmag(pr, id, &off, &mag); ++ if (rc != 0) + goto nothing; + + /* final check by probing function */ +@@ -548,12 +549,13 @@ static int idinfo_probe(blkid_probe pr, const struct blkid_idinfo *id, + DBG(LOWPROBE, blkid_debug( + "%s: ---> call probefunc()", id->name)); + rc = id->probefunc(pr, mag); +- if (rc == -1) { ++ if (rc != 0) { + /* reset after error */ + reset_partlist(blkid_probe_get_partlist(pr)); + if (chn && !chn->binary) + blkid_probe_chain_reset_vals(pr, chn); +- DBG(LOWPROBE, blkid_debug("%s probefunc failed", id->name)); ++ DBG(LOWPROBE, blkid_debug("%s probefunc failed, rc %d", ++ id->name, rc)); + } + if (rc == 0 && mag && chn && !chn->binary) + rc = blkid_probe_set_magic(pr, off, mag->len, +@@ -599,7 +601,10 @@ static int partitions_probe(blkid_probe pr, struct blkid_chain *chn) + continue; + + /* apply checks from idinfo */ +- if (idinfo_probe(pr, idinfos[i], chn) != 0) ++ rc = idinfo_probe(pr, idinfos[i], chn); ++ if (rc < 0) ++ return rc; ++ if (rc > 0) + continue; + + name = idinfos[i]->name; +diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c +index 4b0c997..452c743 100644 +--- a/libblkid/src/probe.c ++++ b/libblkid/src/probe.c +@@ -569,13 +569,17 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr, + if (!bf) { + ssize_t ret; + +- if (blkid_llseek(pr->fd, pr->off + off, SEEK_SET) < 0) ++ if (blkid_llseek(pr->fd, pr->off + off, SEEK_SET) < 0) { ++ errno = 0; + return NULL; ++ } + + /* allocate info and space for data by why call */ + bf = calloc(1, sizeof(struct blkid_bufinfo) + len); +- if (!bf) ++ if (!bf) { ++ errno = 0; + return NULL; ++ } + + bf->data = ((unsigned char *) bf) + sizeof(struct blkid_bufinfo); + bf->len = len; +@@ -587,7 +591,10 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr, + + ret = read(pr->fd, bf->data, len); + if (ret != (ssize_t) len) { ++ DBG(LOWPROBE, blkid_debug("\tbuffer read: return %d error %d", ret, errno)); + free(bf); ++ if (ret >= 0 || errno != EIO) ++ errno = 0; + return NULL; + } + list_add_tail(&bf->bufs, &pr->buffers); +@@ -794,6 +801,8 @@ int blkid_probe_get_idmag(blkid_probe pr, const struct blkid_idinfo *id, + off = (mag->kboff + (mag->sboff >> 10)) << 10; + buf = blkid_probe_get_buffer(pr, off, 1024); + ++ if (!buf && errno) ++ return -1; + if (buf && !memcmp(mag->magic, + buf + (mag->sboff & 0x3ff), mag->len)) { + DBG(LOWPROBE, blkid_debug("\tmagic sboff=%u, kboff=%ld", +diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c +index 565daf2..ad93b4e 100644 +--- a/libblkid/src/superblocks/superblocks.c ++++ b/libblkid/src/superblocks/superblocks.c +@@ -380,15 +380,22 @@ static int superblocks_probe(blkid_probe pr, struct blkid_chain *chn) + + DBG(LOWPROBE, blkid_debug("[%zd] %s:", i, id->name)); + +- if (blkid_probe_get_idmag(pr, id, &off, &mag)) ++ rc = blkid_probe_get_idmag(pr, id, &off, &mag); ++ if (rc < 0) ++ break; ++ if (rc > 0) + continue; + + /* final check by probing function */ + if (id->probefunc) { + DBG(LOWPROBE, blkid_debug("\tcall probefunc()")); +- if (id->probefunc(pr, mag) != 0) { ++ rc = id->probefunc(pr, mag); ++ if (rc != 0) { + blkid_probe_chain_reset_vals(pr, chn); +- continue; ++ if (rc < 0) ++ break; ++ else ++ continue; + } + } + +-- +1.8.1.4 + diff --git a/util-linux-libblkid-ext-probe.patch b/util-linux-libblkid-ext-probe.patch new file mode 100644 index 0000000..7212335 --- /dev/null +++ b/util-linux-libblkid-ext-probe.patch @@ -0,0 +1,274 @@ +This is a backport of patch from master branch. + +commit a1ca32fb3862ccac7275d6b342805b6d99f20e39 +Author: Lukas Czerner +Date: Tue Dec 3 16:24:44 2013 +0100 + + libblkid: Identify extN file system properly + + Currently when trying to identify extN file system we're playing games + with searching for kernel modules and parsing /proc/filesystem. All of + this just because ext4 module can be used to mount ext3 and ext2 file + systems on recent kernel and also because of ext4dev. + + However all of this is not necessary. Ext4 module which does support + mounting ext2 and ext3 file system is able to recognize and mount ext2 + and ext3 type so there is no need to disguise it and ext4dev should only + be ever used for testing and not as fallback when other modules are + missing (use -t instead). + + This also introduces a bug when in situation that we only have ext4 + modules with ext2/ext3 support which is not loaded and we try to mount + ext2 file system we will mount it incorrectly as ext4. This will not + happen if the ext4 module is already loaded. + + With this patch we remove all the unnecessary checks and return the real + type of the file system which is on the device. This fixes the issue. + However on the kernel which was not compiled with EXT4_USE_FOR_EXT23 + support one would have to provide file system type (-t) to be able to + mount the file system with ext4 driver. + + Signed-off-by: Lukas Czerner + Signed-off-by: Karel Zak + +Index: util-linux-2.24.1/libblkid/src/superblocks/ext.c +=================================================================== +--- util-linux-2.24.1.orig/libblkid/src/superblocks/ext.c ++++ util-linux-2.24.1/libblkid/src/superblocks/ext.c +@@ -18,7 +18,6 @@ + #endif + #include + +-#include "linux_version.h" + #include "superblocks.h" + + struct ext2_super_block { +@@ -132,140 +131,11 @@ struct ext2_super_block { + #define EXT3_FEATURE_RO_COMPAT_UNSUPPORTED ~EXT3_FEATURE_RO_COMPAT_SUPP + + /* +- * Check to see if a filesystem is in /proc/filesystems. +- * Returns 1 if found, 0 if not +- */ +-static int fs_proc_check(const char *fs_name) +-{ +- FILE *f; +- char buf[80], *cp, *t; +- +- f = fopen("/proc/filesystems", "r" UL_CLOEXECSTR); +- if (!f) +- return 0; +- while (!feof(f)) { +- if (!fgets(buf, sizeof(buf), f)) +- break; +- cp = buf; +- if (!isspace(*cp)) { +- while (*cp && !isspace(*cp)) +- cp++; +- } +- while (*cp && isspace(*cp)) +- cp++; +- if ((t = strchr(cp, '\n')) != NULL) +- *t = 0; +- if ((t = strchr(cp, '\t')) != NULL) +- *t = 0; +- if ((t = strchr(cp, ' ')) != NULL) +- *t = 0; +- if (!strcmp(fs_name, cp)) { +- fclose(f); +- return 1; +- } +- } +- fclose(f); +- return (0); +-} +- +-/* +- * Check to see if a filesystem is available as a module +- * Returns 1 if found, 0 if not +- */ +-static int check_for_modules(const char *fs_name) +-{ +-#ifdef __linux__ +- struct utsname uts; +- FILE *f; +- char buf[1024], *cp; +- int namesz; +- +- if (uname(&uts)) +- return 0; +- snprintf(buf, sizeof(buf), "/lib/modules/%s/modules.dep", uts.release); +- +- f = fopen(buf, "r" UL_CLOEXECSTR); +- if (!f) +- return 0; +- +- namesz = strlen(fs_name); +- +- while (!feof(f)) { +- if (!fgets(buf, sizeof(buf), f)) +- break; +- if ((cp = strchr(buf, ':')) != NULL) +- *cp = 0; +- else +- continue; +- if ((cp = strrchr(buf, '/')) == NULL) +- continue; +- cp++; +- +- if (!strncmp(cp, fs_name, namesz) && +- (!strcmp(cp + namesz, ".ko") || +- !strcmp(cp + namesz, ".ko.gz"))) { +- fclose(f); +- return 1; +- } +- } +- fclose(f); +-#endif /* __linux__ */ +- return 0; +-} +- +-/* + * Starting in 2.6.29, ext4 can be used to support filesystems + * without a journal. + */ + #define EXT4_SUPPORTS_EXT2 KERNEL_VERSION(2, 6, 29) + +-static int system_supports_ext2(void) +-{ +- static time_t last_check = 0; +- static int ret = -1; +- time_t now = time(0); +- +- if (ret != -1 || (now - last_check) < 5) +- return ret; +- last_check = now; +- ret = (fs_proc_check("ext2") || check_for_modules("ext2")); +- return ret; +-} +- +-static int system_supports_ext4(void) +-{ +- static time_t last_check = 0; +- static int ret = -1; +- time_t now = time(0); +- +- if (ret != -1 || (now - last_check) < 5) +- return ret; +- last_check = now; +- ret = (fs_proc_check("ext4") || check_for_modules("ext4")); +- return ret; +-} +- +-static int system_supports_ext4dev(void) +-{ +- static time_t last_check = 0; +- static int ret = -1; +- time_t now = time(0); +- +- if (ret != -1 || (now - last_check) < 5) +- return ret; +- last_check = now; +- ret = (fs_proc_check("ext4dev") || check_for_modules("ext4dev")); +- return ret; +-} +- +-static int system_supports_ext4_ext2(void) +-{ +-#ifdef __linux__ +- return get_linux_version() >= EXT4_SUPPORTS_EXT2; +-#else +- return 0; +-#endif +-} + /* + * reads superblock and returns: + * fc = feature_compat +@@ -357,15 +227,6 @@ static int probe_ext2(blkid_probe pr, + (fi & EXT2_FEATURE_INCOMPAT_UNSUPPORTED)) + return 1; + +- /* +- * If ext2 is not present, but ext4 or ext4dev are, then +- * disclaim we are ext2 +- */ +- if (!system_supports_ext2() && +- (system_supports_ext4() || system_supports_ext4dev()) && +- system_supports_ext4_ext2()) +- return 1; +- + ext_get_info(pr, 2, es); + return 0; + } +@@ -408,34 +269,9 @@ static int probe_ext4dev(blkid_probe pr, + if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) + return 1; + +- /* +- * If the filesystem does not have a journal and ext2 and ext4 +- * is not present, then force this to be detected as an +- * ext4dev filesystem. +- */ +- if (!(fc & EXT3_FEATURE_COMPAT_HAS_JOURNAL) && +- !system_supports_ext2() && !system_supports_ext4() && +- system_supports_ext4dev() && +- system_supports_ext4_ext2()) +- goto force_ext4dev; +- +- /* +- * If the filesystem is marked as OK for use by in-development +- * filesystem code, but ext4dev is not supported, and ext4 is, +- * then don't call ourselves ext4dev, since we should be +- * detected as ext4 in that case. +- * +- * If the filesystem is marked as in use by production +- * filesystem, then it can only be used by ext4 and NOT by +- * ext4dev, so always disclaim we are ext4dev in that case. +- */ +- if (le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS) { +- if (!system_supports_ext4dev() && system_supports_ext4()) +- return 1; +- } else ++ if (!(le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS)) + return 1; + +-force_ext4dev: + ext_get_info(pr, 4, es); + return 0; + } +@@ -454,22 +290,11 @@ static int probe_ext4(blkid_probe pr, + if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) + return 1; + +- /* +- * If the filesystem does not have a journal and ext2 is not +- * present, then force this to be detected as an ext2 +- * filesystem. +- */ +- if (!(fc & EXT3_FEATURE_COMPAT_HAS_JOURNAL) && +- !system_supports_ext2() && system_supports_ext4() && +- system_supports_ext4_ext2()) +- goto force_ext4; +- + /* Ext4 has at least one feature which ext3 doesn't understand */ + if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) && + !(fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) + return 1; + +-force_ext4: + /* + * If the filesystem is a OK for use by in-development + * filesystem code, and ext4dev is supported or ext4 is not +@@ -480,10 +305,8 @@ force_ext4: + * filesystem, then it can only be used by ext4 and NOT by + * ext4dev. + */ +- if (le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS) { +- if (system_supports_ext4dev() || !system_supports_ext4()) +- return 1; +- } ++ if (le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS) ++ return 1; + + ext_get_info(pr, 4, es); + return 0; diff --git a/util-linux.changes b/util-linux.changes index 4d4112d..d7f92fe 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Thu Apr 17 22:43:31 CEST 2014 - sbrabec@suse.cz + +- Enable socket activation needed by systemd service (bnc#872807). + +------------------------------------------------------------------- +Fri Apr 11 16:45:03 CEST 2014 - sbrabec@suse.cz + +- libblkid: Drop the broken ext2/ext3/ext4 discrimination logic + (util-linux-libblkid-ext-probe.patch, bnc#864703). + +------------------------------------------------------------------- +Fri Apr 11 16:27:11 CEST 2014 - hare@suse.de + +- Abort blkid probing on I/O errors (bnc#859062, + blkid-stop-scanning-on-I-O-error.patch, + blkid-convert-superblocks-to-new-calling-convention.patch, + http://www.spinics.net/lists/util-linux-ng/msg08976.html) + ------------------------------------------------------------------- Tue Apr 1 18:49:26 UTC 2014 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index 14528d4..44cfade 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -124,6 +124,13 @@ Patch21: util-linux-ng-2.16-squashfs3-detect.patch Patch23: util-linux-ng-2.19.1-barrier_documentation.patch # PATCH-FEATURE-SLES util-linux-lscpu-improve-hypervisor-detection.patch fate310255 puzel@novell.com -- Improve hypervisor detection. Patch24: util-linux-lscpu-improve-hypervisor-detection.patch +# PATH-FIX-SLES blkid-stop-scanning-on-I-O-error.patch bnc859062 hare@suse.de -- Abort blkid probing on I/O errors +Patch30: blkid-stop-scanning-on-I-O-error.patch +# PATH-FIX-SLES lkid-convert-superblocks-to-new-calling-convention.patch bnc859062 hare@suse.de -- convert blkid probing functions to new calling sequence +Patch31: blkid-convert-superblocks-to-new-calling-convention.patch +# PATH-FIX-UPSTREAM util-linux-libblkid-ext-probe.patch bnc864703 sbrabec@suse.cz -- libblkid: Drop the broken ext2/ext3/ext4 discrimination logic. +Patch32: util-linux-libblkid-ext-probe.patch + ## ## klogconsole ## @@ -256,6 +263,9 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch21 -p1 %patch23 -p1 %patch24 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -311,6 +321,7 @@ export SUID_LDFLAGS="-pie" --enable-new-mount \ --enable-login-utils \ --enable-tunelp \ + --enable-socket-activation \ %if %{with enable_last} --enable-last \ %else From ec440aeae6a55d69b27fc8f6a82365c0af69fec812ed401f2dd9b0995c5fb74b Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sat, 3 May 2014 14:51:32 +0000 Subject: [PATCH 177/211] Accepting request 231816 from Base:System - minor update to util-linux 2.24.2 - remove tty3270-on-serial-line-of-s390.patch (was already upstream since 2.24.1) - remove barrier_documentation.patch (applied upstream) - rebase blkid-convert-superblocks-to-new-calling-convention.patch (forwarded request 231272 from rudi_m) OBS-URL: https://build.opensuse.org/request/show/231816 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=185 --- ...uperblocks-to-new-calling-convention.patch | 17 +- tty3270-on-serial-line-of-s390.patch | 34 ---- util-linux-2.24.1.tar.sign | 17 -- util-linux-2.24.1.tar.xz | 3 - util-linux-2.24.2.tar.sign | 17 ++ util-linux-2.24.2.tar.xz | 3 + ...inux-ng-2.19.1-barrier_documentation.patch | 131 --------------- util-linux.changes | 151 ++++++++++++++++++ util-linux.spec | 8 +- 9 files changed, 181 insertions(+), 200 deletions(-) delete mode 100644 tty3270-on-serial-line-of-s390.patch delete mode 100644 util-linux-2.24.1.tar.sign delete mode 100644 util-linux-2.24.1.tar.xz create mode 100644 util-linux-2.24.2.tar.sign create mode 100644 util-linux-2.24.2.tar.xz delete mode 100644 util-linux-ng-2.19.1-barrier_documentation.patch diff --git a/blkid-convert-superblocks-to-new-calling-convention.patch b/blkid-convert-superblocks-to-new-calling-convention.patch index a4240f7..a0253c3 100644 --- a/blkid-convert-superblocks-to-new-calling-convention.patch +++ b/blkid-convert-superblocks-to-new-calling-convention.patch @@ -1,4 +1,4 @@ -From 5cb7e4a24f8fb29ddf36309419aa1172f13f3310 Mon Sep 17 00:00:00 2001 +From 9d3bb346fb30f5e03f919b4f68dc8e7e59499bc7 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Tue, 21 Jan 2014 10:10:19 +0100 Subject: [PATCH] blkid: convert superblocks to new calling convention @@ -12,6 +12,7 @@ This patch updates all superblock scanning functions to the new calling convention. Signed-off-by: Hannes Reinecke +Signed-off-by: Ruediger Meier --- libblkid/src/partitions/aix.c | 2 +- libblkid/src/partitions/bsd.c | 14 ++++++--- @@ -2202,19 +2203,19 @@ index fdab85a..4537560 100644 blkid_probe_sprintf_version(pr, "%u", (unsigned int) vxs->vs_version); return 0; diff --git a/libblkid/src/superblocks/xfs.c b/libblkid/src/superblocks/xfs.c -index b485917..3c8b5ea 100644 +index f4bb721..58a985d 100644 --- a/libblkid/src/superblocks/xfs.c +++ b/libblkid/src/superblocks/xfs.c -@@ -41,7 +41,7 @@ static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag) +@@ -164,7 +164,7 @@ static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag) xs = blkid_probe_get_sb(pr, mag, struct xfs_super_block); if (!xs) - return -1; + return errno ? -1 : 1; - if (strlen(xs->xs_fname)) - blkid_probe_set_label(pr, (unsigned char *) xs->xs_fname, -@@ -123,7 +123,7 @@ static int probe_xfs_log(blkid_probe pr, const struct blkid_idmag *mag) + if (!xfs_verify_sb(xs)) + return 1; +@@ -249,7 +249,7 @@ static int probe_xfs_log(blkid_probe pr, const struct blkid_idmag *mag) buf = blkid_probe_get_buffer(pr, 0, 256*1024); if (!buf) @@ -2223,7 +2224,7 @@ index b485917..3c8b5ea 100644 if (memcmp(buf, "XFSB", 4) == 0) return 1; /* this is regular XFS, ignore */ -@@ -138,7 +138,7 @@ static int probe_xfs_log(blkid_probe pr, const struct blkid_idmag *mag) +@@ -264,7 +264,7 @@ static int probe_xfs_log(blkid_probe pr, const struct blkid_idmag *mag) } } @@ -2264,5 +2265,5 @@ index fb86aec..d28786b 100644 return 0; } -- -1.8.1.4 +1.8.4.5 diff --git a/tty3270-on-serial-line-of-s390.patch b/tty3270-on-serial-line-of-s390.patch deleted file mode 100644 index 891682a..0000000 --- a/tty3270-on-serial-line-of-s390.patch +++ /dev/null @@ -1,34 +0,0 @@ -Support the special terminal on first serial line on a S/390(x) which -is due legacy reasons a block terminal of type 3270 or higher. Whereas -the second serial line on a S/390(x) is a real character terminal which -is compatible with VT220. - ---- - term-utils/agetty.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -Index: util-linux-2.24.1/term-utils/agetty.c -=================================================================== ---- util-linux-2.24.1.orig/term-utils/agetty.c 2014-02-09 21:19:01.000000000 +0000 -+++ util-linux-2.24.1/term-utils/agetty.c 2014-02-09 21:19:27.000000000 +0000 -@@ -1042,6 +1042,20 @@ static void open_tty(char *tty, struct t - /* make stdio unbuffered for slow modem lines */ - setvbuf(stdout, NULL, _IONBF, 0); - -+#if defined (__s390__) || defined (__s390x__) -+ if (!op->term) { -+ /* -+ * Special terminal on first serial line on a S/390(x) which -+ * is due legacy reasons a block terminal of type 3270 or -+ * higher. Whereas the second serial line on a S/390(x) is -+ * a real character terminal which is compatible with VT220. -+ */ -+ if (strcmp(op->tty, "ttyS0") == 0 || strncmp(op->tty, "3270/tty", 8) == 0) -+ op->term = DEFAULT_TTYS0; -+ else if (strcmp(op->tty, "ttyS1") == 0) -+ op->term = DEFAULT_TTYS1; -+ } -+#endif - /* - * The following ioctl will fail if stdin is not a tty, but also when - * there is noise on the modem control lines. In the latter case, the diff --git a/util-linux-2.24.1.tar.sign b/util-linux-2.24.1.tar.sign deleted file mode 100644 index b4d8f10..0000000 --- a/util-linux-2.24.1.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQIcBAABAgAGBQJS3R7fAAoJEOS3HV7sOcKEODUP/2BqIqmRfuqP9rJkwQ5K19pk -vpoVSNIPVgcjkImP+CAz6PGkLGBjCEeVurY0QgblebVFgowK430LaejW5uwrz9ca -5OWqmDJXxrUQWDj9HLmABNkOclAtgT/BF8gt+J2uB8HWcVHKt8PKc6guX4+KJ3vE -Ct6kQcE7gWFxdQtdrBodst4546YDABasqxZncoz+AaakJW5IM70nmfKrzoEV1Seu -BQHivazmJMdHgPlUaz2Ujl6NPcQ4QtdKCWc0f0EkwaN1jSP7ArWPBQZdDynA6vRv -qkQ3JC4VBoxec9AMUVDSqy09kXhP6jxDMqLJ29JRi2EJ8MeNh9naT7snSvejaX1e -plbJARuRAyRSlFDhunFydAQXNHjLfAI4TME2TbRi9z+pYLbcuiHfq2eJQXPZAaHL -BY3esejflzytLpQ5ABDDGRNJhLIZgF9dUYElVHONC5oTA/TnzuzhLxzcY2QENHtr -mZoJhlR+7hyyLTFWWdACGGFextwdl2Qjxeh6zw911QKRSu64qn3Velg3Hm21CYYB -s0CpWVHxKnTJ9wIOY6unZuqDSg2fElXJpwD8EYzts/dxhZ08bCFulrPoYQsFcajm -amAf03xKz6akRp4pc5061Yprl/0jDIRYjuttFpFVLrB32lZiBrzN+hMjF4ioDorh -6U6NLJVF4YRXQ6gTfVf3 -=gxA/ ------END PGP SIGNATURE----- diff --git a/util-linux-2.24.1.tar.xz b/util-linux-2.24.1.tar.xz deleted file mode 100644 index a91ea25..0000000 --- a/util-linux-2.24.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:835eb6232cfab0118ef2e4fd649de0ba9f5bd1b8cbf9a7d4d84594541dec8410 -size 3543692 diff --git a/util-linux-2.24.2.tar.sign b/util-linux-2.24.2.tar.sign new file mode 100644 index 0000000..7185d53 --- /dev/null +++ b/util-linux-2.24.2.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIcBAABAgAGBQJTWOMEAAoJEOS3HV7sOcKENCYP+wbqkV8Oj9rfvgQguiN7hFje +xGshx7s7R4q3ZOK3k7Iw6yln0vT/XWAieEmuy1SIitsQ7GWe81qMloJ85hGKeryQ +G6U/+T5RX3F3bpGBGAMrQ8Z1VM85+6Q84g4LbXK9QclVNpdYuIF68hs5KWjSlx+R +GhH87GpEVIskpTlNE7UmEGoxYm5sdmwb3pIg04SkVFPtvjlRxlTgL5uLjNc1d2tW +XVKgflMD6RLX/OeQTpmqPpfE8yQwwi20hph9ISQ/0cHXsp3Ab6Tx+hSZUlujQPZT +7ljuTioRplp0n7tBbE4Fu0r7BqummGgRTA8q1JakOCxs5UGDvhhILjNxf42jpkL4 +g++J6M2IoiMPbZlXu3NQEwaTkbIRY4THnWj0SSZtc6WVNdcPggwV8sx9fuzVHYjR ++FPRkPLFMsTYg1FZDFFNHVU0DynzHhCvY2idWEFTUFxou71dS1EMlaF7yu8uHN1R +QJZqfl0K1s76uffnzU3ljTg6ZD6PgVSYrJj85Q4UBUjxz3FLlj7XP9n/rNZszmc0 +YGRwmkifdiAh1g5vmax8LRPWs46450XUjd+U+d5NvAfLihtNhwsjlXs+Xqsnk9Do +Aq6IeyoVLO+pi2KRbYEWFzajUhBp5qpcNPjQHXn/1FOTuVFDpMwWhEhHrVb/SYlo +9qhwLq9ab+rI3J7Zgiqh +=JB8F +-----END PGP SIGNATURE----- diff --git a/util-linux-2.24.2.tar.xz b/util-linux-2.24.2.tar.xz new file mode 100644 index 0000000..8f68bee --- /dev/null +++ b/util-linux-2.24.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1243d6c07f1c5b38aa4c3814c81a71c24cba7dafe08942916bf216a90a460ff0 +size 3586580 diff --git a/util-linux-ng-2.19.1-barrier_documentation.patch b/util-linux-ng-2.19.1-barrier_documentation.patch deleted file mode 100644 index a6aee65..0000000 --- a/util-linux-ng-2.19.1-barrier_documentation.patch +++ /dev/null @@ -1,131 +0,0 @@ -From: Jan Kara -Subject: Update documentation of mount(8) about barrier mount options - -Signed-off-by: Jan Kara - -Index: util-linux-2.24.1/sys-utils/mount.8 -=================================================================== ---- util-linux-2.24.1.orig/sys-utils/mount.8 -+++ util-linux-2.24.1/sys-utils/mount.8 -@@ -1524,12 +1524,13 @@ ordered mode. - Abort the journal if an error occurs in a file data buffer in ordered mode. - .TP - .BR barrier=0 " / " barrier=1 " --This enables/disables barriers. barrier=0 disables it, barrier=1 enables it. --Write barriers enforce proper on-disk ordering of journal commits, making --volatile disk write caches safe to use, at some performance penalty. The ext3 --filesystem does not enable write barriers by default. Be sure to enable --barriers unless your disks are battery-backed one way or another. Otherwise --you risk filesystem corruption in case of power failure. -+This disables / enables the use of write barriers in the jbd code. barrier=0 -+disables, barrier=1 enables (default). This also requires an IO stack which can -+support barriers, and if jbd gets an error on a barrier write, it will disable -+barriers again with a warning. Write barriers enforce proper on-disk ordering -+of journal commits, making volatile disk write caches safe to use, at some -+performance penalty. If your disks are battery-backed in one way or another, -+disabling barriers may safely improve performance. - .TP - .BI commit= nrsec - Sync all data and metadata every -@@ -1577,15 +1578,9 @@ enabled older kernels cannot mount the d - This will enable 'journal_checksum' internally. - .TP - .BR barrier=0 " / " barrier=1 " / " barrier " / " nobarrier --This enables/disables the use of write barriers in the jbd code. barrier=0 --disables, barrier=1 enables. This also requires an IO stack which can support --barriers, and if jbd gets an error on a barrier write, it will disable again --with a warning. Write barriers enforce proper on-disk ordering of journal --commits, making volatile disk write caches safe to use, at some performance --penalty. If your disks are battery-backed in one way or another, disabling --barriers may safely improve performance. The mount options "barrier" and --"nobarrier" can also be used to enable or disable barriers, for consistency --with other ext4 mount options. -+These mount options have the same effect as in ext3. The mount options -+"barrier" and "nobarrier" are added for consistency with other ext4 mount -+options. - - The ext4 filesystem enables write barriers by default. - .TP -@@ -2266,13 +2261,13 @@ Enable POSIX Access Control Lists. See t - manual page. - .TP - .BR barrier=none " / " barrier=flush " --This enables/disables the use of write barriers in the journaling code. --barrier=none disables it, barrier=flush enables it. Write barriers enforce -+This disables / enables the use of write barriers in the journaling code. -+barrier=none disables, barrier=flush enables (default). This also requires an -+IO stack which can support barriers, and if reiserfs gets an error on a barrier -+write, it will disable barriers again with a warning. Write barriers enforce - proper on-disk ordering of journal commits, making volatile disk write caches --safe to use, at some performance penalty. The reiserfs filesystem does not --enable write barriers by default. Be sure to enable barriers unless your disks --are battery-backed one way or another. Otherwise you risk filesystem --corruption in case of power failure. -+safe to use, at some performance penalty. If your disks are battery-backed in -+one way or another, disabling barriers may safely improve performance. - - .SH "Mount options for romfs" - None. -Index: util-linux-2.24.1/mount-deprecated/mount.8 -=================================================================== ---- util-linux-2.24.1.orig/mount-deprecated/mount.8 -+++ util-linux-2.24.1/mount-deprecated/mount.8 -@@ -1389,12 +1389,13 @@ in files after a crash and journal recov - .RE - .TP - .BR barrier=0 " / " barrier=1 " --This enables/disables barriers. barrier=0 disables it, barrier=1 enables it. --Write barriers enforce proper on-disk ordering of journal commits, making --volatile disk write caches safe to use, at some performance penalty. The ext3 --filesystem does not enable write barriers by default. Be sure to enable --barriers unless your disks are battery-backed one way or another. Otherwise --you risk filesystem corruption in case of power failure. -+This disables / enables the use of write barriers in the jbd code. barrier=0 -+disables, barrier=1 enables (default). This also requires an IO stack which can -+support barriers, and if jbd gets an error on a barrier write, it will disable -+barriers again with a warning. Write barriers enforce proper on-disk ordering -+of journal commits, making volatile disk write caches safe to use, at some -+performance penalty. If your disks are battery-backed in one way or another, -+disabling barriers may safely improve performance. - .TP - .BI commit= nrsec - Sync all data and metadata every -@@ -1433,15 +1434,9 @@ enabled older kernels cannot mount the d - This will enable 'journal_checksum' internally. - .TP - .BR barrier=0 " / " barrier=1 " / " barrier " / " nobarrier --This enables/disables the use of write barriers in the jbd code. barrier=0 --disables, barrier=1 enables. This also requires an IO stack which can support --barriers, and if jbd gets an error on a barrier write, it will disable again --with a warning. Write barriers enforce proper on-disk ordering of journal --commits, making volatile disk write caches safe to use, at some performance --penalty. If your disks are battery-backed in one way or another, disabling --barriers may safely improve performance. The mount options "barrier" and --"nobarrier" can also be used to enable or disable barriers, for consistency --with other ext4 mount options. -+These mount options have the same effect as in ext3. The mount options -+"barrier" and "nobarrier" are added for consistency with other ext4 mount -+options. - - The ext4 filesystem enables write barriers by default. - .TP -@@ -2099,13 +2094,13 @@ Enable POSIX Access Control Lists. See t - manual page. - .TP - .BR barrier=none " / " barrier=flush " --This enables/disables the use of write barriers in the journaling code. --barrier=none disables it, barrier=flush enables it. Write barriers enforce -+This disables / enables the use of write barriers in the journaling code. -+barrier=none disables, barrier=flush enables (default). This also requires an -+IO stack which can support barriers, and if reiserfs gets an error on a barrier -+write, it will disable barriers again with a warning. Write barriers enforce - proper on-disk ordering of journal commits, making volatile disk write caches --safe to use, at some performance penalty. The reiserfs filesystem does not --enable write barriers by default. Be sure to enable barriers unless your disks --are battery-backed one way or another. Otherwise you risk filesystem --corruption in case of power failure. -+safe to use, at some performance penalty. If your disks are battery-backed in -+one way or another, disabling barriers may safely improve performance. - - .SH "Mount options for romfs" - None. diff --git a/util-linux.changes b/util-linux.changes index d7f92fe..ba298b6 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,154 @@ +------------------------------------------------------------------- +Thu Apr 24 11:33:36 UTC 2014 - sweet_f_a@gmx.de + +- Update to util-linux-2.24.2: + addpart: + * minor man page improvements + blockdev: + * Some minor corrections to the manual + build-sys: + * don't connect _DEPENDENCIES and _LIBADD + * fix .h.in usage in libblkid and libmount + * libmount/python/__init__.py is always a dist file + chcpu: + * cleanup return codes + * cleanup stdout/stderr usage + delpart: + * minor man page improvements + dmesg: + * -w output not line-buffered + * don't report EPIPE + docs: + * update AUTHORS file + fallocate: + * Clarify that space can also be deallocated + fdformat: + * Some minor change to the manual + fdisk: + * don't colorize "foo " prefixes + flock: + * use nfs4 fallback on EBADF too + fsck: + * Some typographical corrections to the manual + fsck.minix: + * A few typographical corrections to the manual + fstrim: + * add hint to man page + getopt: + * getopt.1 The usual doc dir is /usr/share/doc, not .../docs + hwclock: + * fix possible hang and other set_hardware_clock_exact() issues + include/closestream: + * don't wipe errno on EPIPE + ipcs: + * cleanup jumplabel stlyes + * fix ipc_msg_get_info fallback case + * fix ipc_sem_get_info fallback case + * fix ipc_shm_get_info fallback case + * fix memleak in ipc_*_get_info functions + isosize: + * A few typographical changes to the manual + last: + * fix minor typos in the man page + lib/sysfs: + * make dirent d_type usage more robust + libblkid: + * add extra checks to XFS prober + libfdisk: + * fix logical partition reorder command + * make qsort_r() optional + * properly implement read-only mode + libmount: + * FS id and parent ID could be zero + * accept (deleted) path suffix in mountinfo file + * initialize *root to NULL in mnt_table_get_root_fs + login: + * fix minor typos in the man page + losetup: + * wait for udev + lscpu: + * cleanup, use _PATH_SYS_CPU/NODE + * don't abort if cache size is unknown + * don't assume filesystem supports d_type when searching for NUMA nodes + * read_hypervisor_dmi only fallback to memory scan on x86/x86_64 + mkfs: + * Some typographical changes to the manual + mkfs.bfs: + * One typographical correction to the manual + mkfs.cramfs: + * Some typographical corrections to the manual + mkfs.minix: + * Some typographical changes in the manual + mkswap: + * Some minor typographical corrections to the manual + more: + * improve formatting and wording of man page and help text + mount: + * apply "nofail" to MNT_ERR_NOSOURCE libmount error + * fix --all and nofail return code + * mount.8 Some typographical and prefix corrections to the manual + * remove obsolete and confusing statement from mount.8 + * update mount.8 about barrier mount options defaults + nologin: + * minor man page improvements + nsenter: + * fix set{gid,uid} order,drop supplementary groups + partx: + * Improve the typesetting of the manual + * make dirent d_type usage more robust + po: + * merge changes + * update cs.po (from translationproject.org) + * update da.po (from translationproject.org) + * update de.po (from translationproject.org) + raw: + * Improve the typesetting of the manual + renice: + * correct max priority in renice man page + runuser: + * fix minor typos in the man page + script: + * Also flush writes to timing file. + * time from end of read() call partially fixes #58 + scriptreplay: + * no need to skip first time value or last bytes fixes #58 + setarch: + * Fix ppc64le architectures + setpriv: + * Fix --apparmor-profile + su: + * don't use kill(0, ...) when propagate signal + * fix minor typos in the man page + sulogin: + * minor man page improvements + swaplabel: + * Improve the typesetting of the manual + * wrong version number in check + switch_root: + * make dirent d_type usage more robust + * verify initramfs by f_type, not devno + tests: + * add fdisk 'f' command MBR test + * add lscpu dump for ppc cpu with no cache size + * clean up backport + * cleanup, remove unused lscpu output + * update Py parse mountinfo test + * update libmount tabdiff tests + * use old output format + umount: + * fix typo in usage + * more robust success message for --all + unshare: + * include libmount.h to provide missing MS_* defines + utmpdump: + * minor man page improvements + vipw: + * minor man page improvements +- remove tty3270-on-serial-line-of-s390.patch (was already upstream + since 2.24.1) +- remove barrier_documentation.patch (applied upstream) +- rebase blkid-convert-superblocks-to-new-calling-convention.patch + ------------------------------------------------------------------- Thu Apr 17 22:43:31 CEST 2014 - sbrabec@suse.cz diff --git a/util-linux.spec b/util-linux.spec index 44cfade..1df7767 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -47,7 +47,7 @@ BuildRequires: systemd-rpm-macros %endif BuildRequires: utempter-devel BuildRequires: zlib-devel -Version: 2.24.1 +Version: 2.24.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -104,8 +104,6 @@ Patch2: util-linux-2.23.1-eject-fpie.patch Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # disable encryption Patch12: util-linux-2.23.1-noenc-suse.diff -# PATCH-FIX-SUSE -- better support of S390 in agetty -Patch14: tty3270-on-serial-line-of-s390.patch # PATCH-FIX-SUSE -- Let agetty not be fooled by locked termios srtucture Patch15: agetty-fooled-on-serial-line-due-plymouth.patch # PATCH-FIX-SUSE -- Let agetty detect /dev/3270/tty1 as device not as baud rate @@ -120,8 +118,6 @@ Patch19: util-linux-setarch-uname26.patch Patch20: util-linux-HACK-boot.localfs.diff # PATCH-FEATURE-SLES util-linux-ng-2.16-squashfs3-detect.patch bnc666893 mszeredi@suse.cz -- Detect squashfs version <= 3 as squashfs3 and version >= 4 as squashfs. Patch21: util-linux-ng-2.16-squashfs3-detect.patch -# PATCH-FEATURE-SLES util-linux-ng-2.19.1-barrier_documentation.patch bnc489740 jack@suse.cz -- Document barrier option in mount.8. -Patch23: util-linux-ng-2.19.1-barrier_documentation.patch # PATCH-FEATURE-SLES util-linux-lscpu-improve-hypervisor-detection.patch fate310255 puzel@novell.com -- Improve hypervisor detection. Patch24: util-linux-lscpu-improve-hypervisor-detection.patch # PATH-FIX-SLES blkid-stop-scanning-on-I-O-error.patch bnc859062 hare@suse.de -- Abort blkid probing on I/O errors @@ -251,7 +247,6 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch2 -p1 %patch4 -p1 %patch12 -p1 -%patch14 -p1 %patch15 -p0 %patch16 -p0 %patch17 -p0 @@ -261,7 +256,6 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch20 -p1 # %patch21 -p1 -%patch23 -p1 %patch24 -p1 %patch30 -p1 %patch31 -p1 From 97ec1372334feff2b6bf0cee8ed37743d7e40bc9f4b7346dc48a0172329c6370 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 22 May 2014 18:38:39 +0000 Subject: [PATCH 178/211] Accepting request 234890 from Base:System squashed sr234195 and re-submitted - Prevent excessive clock drift calculations (bnc#871698, util-linux-prevent-excessive-clock-drift-calculations.patch), committed by sbrabec@suse.cz (forwarded request 234334 from rudi_m) OBS-URL: https://build.opensuse.org/request/show/234890 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=186 --- agetty-on-s390-on-dev-3270-tty1-line.patch | 61 +++++-- support-other-tty-lines-not-vconsole.patch | 104 +++++++++++ ...t-excessive-clock-drift-calculations.patch | 162 ++++++++++++++++++ util-linux.changes | 21 +++ util-linux.spec | 6 + 5 files changed, 344 insertions(+), 10 deletions(-) create mode 100644 support-other-tty-lines-not-vconsole.patch create mode 100644 util-linux-prevent-excessive-clock-drift-calculations.patch diff --git a/agetty-on-s390-on-dev-3270-tty1-line.patch b/agetty-on-s390-on-dev-3270-tty1-line.patch index 98997df..36b85e6 100644 --- a/agetty-on-s390-on-dev-3270-tty1-line.patch +++ b/agetty-on-s390-on-dev-3270-tty1-line.patch @@ -1,14 +1,21 @@ -Be aware that on s390 the 3270 terminal line is found at -/dev/3270/tty. That is that the baud speed rate numbers -have to be identified in a unique way. - --- - agetty.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) + login-utils/sulogin.c | 8 +++++++- + term-utils/agetty.c | 15 ++++++++++----- + 2 files changed, 17 insertions(+), 6 deletions(-) --- term-utils/agetty.c -+++ term-utils/agetty.c 2014-02-04 09:33:13.162735763 +0000 -@@ -568,6 +568,8 @@ static void login_options_to_argv(char * ++++ term-utils/agetty.c 2014-05-08 08:08:26.384484940 +0000 +@@ -51,7 +51,8 @@ + # define DEFAULT_VCTERM "linux" + # endif + # if defined (__s390__) || defined (__s390x__) +-# define DEFAULT_TTYS0 "ibm327x" ++# define DEFAULT_TTYS0 "dumb" ++# define DEFAULT_TTY32 "ibm327x" + # define DEFAULT_TTYS1 "vt220" + # endif + # ifndef DEFAULT_STERM +@@ -571,6 +572,8 @@ static void login_options_to_argv(char * *argc = i; } @@ -17,7 +24,7 @@ have to be identified in a unique way. /* Parse command-line arguments. */ static void parse_args(int argc, char **argv, struct options *op) { -@@ -746,7 +748,7 @@ static void parse_args(int argc, char ** +@@ -749,7 +752,7 @@ static void parse_args(int argc, char ** } /* Accept "tty", "baudrate tty", and "tty baudrate". */ @@ -26,7 +33,7 @@ have to be identified in a unique way. /* Assume BSD style speed. */ parse_speeds(op, argv[optind++]); if (argc < optind + 1) { -@@ -758,7 +760,7 @@ static void parse_args(int argc, char ** +@@ -761,7 +764,7 @@ static void parse_args(int argc, char ** op->tty = argv[optind++]; if (argc > optind) { char *v = argv[optind++]; @@ -35,3 +42,37 @@ have to be identified in a unique way. parse_speeds(op, v); else op->speeds[op->numspeed++] = bcode("9600"); +@@ -1071,9 +1074,11 @@ static void open_tty(char *tty, struct t + * higher. Whereas the second serial line on a S/390(x) is + * a real character terminal which is compatible with VT220. + */ +- if (strcmp(op->tty, "ttyS0") == 0) ++ if (strcmp(op->tty, "ttyS0") == 0) /* linux/drivers/s390/char/con3215.c */ + op->term = DEFAULT_TTYS0; +- else if (strcmp(op->tty, "ttyS1") == 0) ++ else if (strncmp(op->tty, "3270/tty", 8) == 0) /* linux/drivers/s390/char/con3270.c */ ++ op->term = DEFAULT_TTY32; ++ else if (strcmp(op->tty, "ttyS1") == 0) /* linux/drivers/s390/char/sclp_vt220.c */ + op->term = DEFAULT_TTYS1; + } + #endif +--- login-utils/sulogin.c ++++ login-utils/sulogin.c 2014-05-08 08:22:38.572781002 +0000 +@@ -189,10 +189,16 @@ static void tcfinal(struct console *con) + setenv("TERM", "linux", 1); + return; + } +- if (con->flags & CON_NOTTY) ++ if (con->flags & CON_NOTTY) { ++ setenv("TERM", "dumb", 1); + return; ++ } + ++#if defined (__s390__) || defined (__s390x__) ++ setenv("TERM", "dumb", 1); ++#else + setenv("TERM", "vt102", 1); ++#endif + tio = &con->tio; + fd = con->fd; + diff --git a/support-other-tty-lines-not-vconsole.patch b/support-other-tty-lines-not-vconsole.patch new file mode 100644 index 0000000..ce31fd0 --- /dev/null +++ b/support-other-tty-lines-not-vconsole.patch @@ -0,0 +1,104 @@ +--- + login-utils/sulogin.c | 17 ++++++++++++----- + term-utils/agetty.c | 23 +++++++++++------------ + 2 files changed, 23 insertions(+), 17 deletions(-) + +--- login-utils/sulogin.c ++++ login-utils/sulogin.c 2014-05-08 08:01:13.102622002 +0000 +@@ -49,6 +49,11 @@ + # include + #endif + ++#ifdef __linux__ ++# include ++# include ++#endif ++ + #include "c.h" + #include "closestream.h" + #include "nls.h" +@@ -142,10 +147,14 @@ static void tcinit(struct console *con) + return; + } + +- /* Handle serial lines here */ +- if (ioctl(fd, TIOCMGET, (char *) &mode) == 0) { ++ /* Handle lines other than virtual consoles here */ ++#if defined(KDGKBMODE) ++ if (ioctl(fd, KDGKBMODE, &mode) < 0) ++#endif ++ { + speed_t ispeed, ospeed; + struct winsize ws; ++ errno = 0; + + /* this is a modem line */ + con->flags |= CON_SERIAL; +@@ -191,9 +200,7 @@ static void tcinit(struct console *con) + goto setattr; + } + #if defined(IUTF8) && defined(KDGKBMODE) +- /* Detect mode of current keyboard setup, e.g. for UTF-8 */ +- if (ioctl(fd, KDGKBMODE, &mode) < 0) +- mode = K_RAW; ++ /* Handle mode of current keyboard setup, e.g. for UTF-8 */ + switch(mode) { + case K_UNICODE: + setlocale(LC_CTYPE, "C.UTF-8"); +--- term-utils/agetty.c ++++ term-utils/agetty.c 2014-05-08 08:02:16.786235584 +0000 +@@ -139,6 +139,7 @@ struct options { + int nice; /* Run login with this priority */ + int numspeed; /* number of baud rates to try */ + int clocal; /* CLOCAL_MODE_* */ ++ int kbmode; /* Keyboard mode if virtual console */ + speed_t speeds[MAX_SPEED]; /* baud rates to be tried */ + }; + +@@ -936,7 +937,7 @@ static void update_utmp(struct options * + static void open_tty(char *tty, struct termios *tp, struct options *op) + { + const pid_t pid = getpid(); +- int serial, closed = 0; ++ int closed = 0; + + /* Set up new standard input, unless we are given an already opened port. */ + +@@ -1080,15 +1081,18 @@ static void open_tty(char *tty, struct t + #endif + /* + * Detect if this is a virtual console or serial/modem line. +- * In case of a virtual console the ioctl TIOCMGET fails and +- * the error number will be set to EINVAL. ++ * In case of a virtual console the ioctl KDGKBMODE succeeds ++ * whereas on other lines it will fails. + */ +- if (ioctl(STDIN_FILENO, TIOCMGET, &serial) < 0 && (errno == EINVAL)) { ++ if (ioctl(STDIN_FILENO, KDGKBMODE, &op->kbmode) == 0) { + op->flags |= F_VCONSOLE; + if (!op->term) + op->term = DEFAULT_VCTERM; +- } else if (!op->term) +- op->term = DEFAULT_STERM; ++ } else { ++ op->kbmode = K_RAW; ++ if (!op->term) ++ op->term = DEFAULT_STERM; ++ } + + setenv("TERM", op->term, 1); + } +@@ -1122,12 +1126,7 @@ static void termio_init(struct options * + + if (op->flags & F_VCONSOLE) { + #if defined(IUTF8) && defined(KDGKBMODE) +- int mode; +- +- /* Detect mode of current keyboard setup, e.g. for UTF-8 */ +- if (ioctl(STDIN_FILENO, KDGKBMODE, &mode) < 0) +- mode = K_RAW; +- switch(mode) { ++ switch(op->kbmode) { + case K_UNICODE: + setlocale(LC_CTYPE, "C.UTF-8"); + op->flags |= F_UTF8; diff --git a/util-linux-prevent-excessive-clock-drift-calculations.patch b/util-linux-prevent-excessive-clock-drift-calculations.patch new file mode 100644 index 0000000..9b7f359 --- /dev/null +++ b/util-linux-prevent-excessive-clock-drift-calculations.patch @@ -0,0 +1,162 @@ +From 654e902731ea15a3494a3831b78d2b9f1cd1408d Mon Sep 17 00:00:00 2001 +From: Ruediger Meier +Date: Fri, 16 May 2014 17:01:43 +0200 +Subject: [PATCH] Prevent excessive clock drift calculations + +Squashed commit of the following: + +commit f55b4b45126b657fe02f5f0d3d7fde740e6a6247 +Author: Karel Zak +Date: Tue May 6 12:51:42 2014 +0200 + + hwclock: fix typo + + Reported-by: Stanislav Brabec + Signed-off-by: Karel Zak + +commit db8fc5f37728810bdd5b865ac420c31714e35def +Author: Stanislav Brabec +Date: Mon May 5 20:49:49 2014 +0200 + + hwclock: Check drift value in /etc/adjtime + + Due to bug in older versions of hwclock, /etc/adjtime can contain + excessive drift value (up to many years per day). Prevent it + from applying. + + Signed-off-by: Stanislav Brabec + +commit f196fd1a5f8fff63635fd88b5a0f0bbc96978df2 +Author: Stanislav Brabec +Date: Mon May 5 20:49:29 2014 +0200 + + hwclock: Prevent excessive drift values + + Failure of CMOS battery can cause writing of excessive drift + values (up to many years per day). + + This causes excessive hwclock adjustment next time, which may lead + to overflow in calculate_adjustment() (and hang before 4a44a54b). + + Prevent this situation, check drift for limits and reset drift to zero + instead. + + Steps to reproduce: + + mv /etc/adjtime /etc/adjtime.backup + + rm /etc/adjtime + hwclock --set --date 2001-01-01\ 01:00:00 + + changing of /etc/adjtime. + mv /etc/adjtime /etc/adjtime.saved + hwclock --set --date 2001-01-02\ 01:00:01 + mv /etc/adjtime.saved /etc/adjtime + + echo "======= The /etc/adjtime has a \"correct\" look:" + cat /etc/adjtime + + hwclock --debug --systohc --utc + echo "======= The /etc/adjtime now has deeply failed drift value:" + cat /etc/adjtime + + mv /etc/adjtime /etc/adjtime.saved + hwclock --set --date 2015-01-01\ 01:00:00 + mv /etc/adjtime.saved /etc/adjtime + + hwclock --debug --adjust + echo "======= And the last /etc/adjtime:" + cat /etc/adjtime + + mv /etc/adjtime.backup /etc/adjtime + hwclock --systohc --utc + + Signed-off-by: Stanislav Brabec + +Signed-off-by: Ruediger Meier +--- + sys-utils/hwclock.c | 47 ++++++++++++++++++++++++++++++++++------------- + 1 file changed, 34 insertions(+), 13 deletions(-) + +diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c +index 395b5c3..0abf01f 100644 +--- a/sys-utils/hwclock.c ++++ b/sys-utils/hwclock.c +@@ -91,6 +91,11 @@ struct clock_ops *ur; + + #define FLOOR(arg) ((arg >= 0 ? (int) arg : ((int) arg) - 1)); + ++/* Maximal clock adjustment in seconds per day. ++ (adjtime() glibc call has 2145 seconds limit on i386, so it is good enough for us as well, ++ 43219 is a maximal safe value preventing exact_adjustment overflow.) */ ++#define MAX_DRIFT 2145.0 ++ + const char *adj_file_name = NULL; + + struct adjtime { +@@ -1008,6 +1013,7 @@ adjust_drift_factor(struct adjtime *adjtime_p, + double adj_days, cal_days; + double exp_drift, unc_drift; + double factor_adjust; ++ double drift_factor; + + /* Adjusted time units per hardware time unit */ + atime_per_htime = 1.0 + adjtime_p->drift_factor / sec_per_day; +@@ -1033,16 +1039,28 @@ adjust_drift_factor(struct adjtime *adjtime_p, + /* Amount to add to previous drift factor */ + factor_adjust = unc_drift / cal_days; + +- if (debug) +- printf(_("Clock drifted %.1f seconds in the past " +- "%d seconds in spite of a drift factor of " +- "%f seconds/day.\n" +- "Adjusting drift factor by %f seconds/day\n"), +- unc_drift, +- (int)(nowtime - adjtime_p->last_calib_time), +- adjtime_p->drift_factor, factor_adjust); +- +- adjtime_p->drift_factor += factor_adjust; ++ /* New drift factor */ ++ drift_factor = adjtime_p->drift_factor + factor_adjust; ++ ++ if (abs(drift_factor) > MAX_DRIFT) { ++ if (debug) ++ printf(_("Clock drift factor was calculated as " ++ "%f seconds/day.\n" ++ "It is far too much. Resetting to zero.\n"), ++ drift_factor); ++ drift_factor = 0; ++ } else { ++ if (debug) ++ printf(_("Clock drifted %.1f seconds in the past " ++ "%d seconds in spite of a drift factor of " ++ "%f seconds/day.\n" ++ "Adjusting drift factor by %f seconds/day\n"), ++ unc_drift, ++ (int)(nowtime - adjtime_p->last_calib_time), ++ adjtime_p->drift_factor, factor_adjust); ++ } ++ ++ adjtime_p->drift_factor = drift_factor; + } + adjtime_p->last_calib_time = nowtime; + +@@ -1190,9 +1208,12 @@ do_adjustment(struct adjtime *adjtime_p, + adjtime_p->dirty = TRUE; + } else if (adjtime_p->last_adj_time == 0) { + if (debug) +- printf(_ +- ("Not setting clock because last adjustment time is zero, " +- "so history is bad.")); ++ printf(_("Not setting clock because last adjustment time is zero, " ++ "so history is bad.\n")); ++ } else if (abs(adjtime_p->drift_factor) > MAX_DRIFT) { ++ if (debug) ++ printf(_("Not setting clock because drift factor %f is far too high.\n"), ++ adjtime_p->drift_factor); + } else { + int adjustment; + /* Number of seconds we must insert in the Hardware Clock */ +-- +1.8.4.5 + diff --git a/util-linux.changes b/util-linux.changes index ba298b6..53a1411 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Fri May 16 15:10:53 UTC 2014 - sweet_f_a@gmx.de + +- Prevent excessive clock drift calculations (bnc#871698, + util-linux-prevent-excessive-clock-drift-calculations.patch), + committed by sbrabec@suse.cz + +------------------------------------------------------------------- +Thu May 8 08:15:04 UTC 2014 - werner@suse.de + +- Modify patch support-other-tty-lines-not-vconsole.patch to + make it work on virtual console +- Modify patch agetty-on-s390-on-dev-3270-tty1-line.patch + to add the missed 3270 support upstream + +------------------------------------------------------------------- +Wed May 7 14:12:32 UTC 2014 - werner@suse.de + +- Add patch support-other-tty-lines-not-vconsole.patch + to be able to support console lines like xvc and hvc + ------------------------------------------------------------------- Thu Apr 24 11:33:36 UTC 2014 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index 1df7767..2373d3a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -104,6 +104,8 @@ Patch2: util-linux-2.23.1-eject-fpie.patch Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # disable encryption Patch12: util-linux-2.23.1-noenc-suse.diff +# PATCH-FIX-SUSE Be aware that there are e.g. xvc/hvc +Patch14: support-other-tty-lines-not-vconsole.patch # PATCH-FIX-SUSE -- Let agetty not be fooled by locked termios srtucture Patch15: agetty-fooled-on-serial-line-due-plymouth.patch # PATCH-FIX-SUSE -- Let agetty detect /dev/3270/tty1 as device not as baud rate @@ -126,6 +128,8 @@ Patch30: blkid-stop-scanning-on-I-O-error.patch Patch31: blkid-convert-superblocks-to-new-calling-convention.patch # PATH-FIX-UPSTREAM util-linux-libblkid-ext-probe.patch bnc864703 sbrabec@suse.cz -- libblkid: Drop the broken ext2/ext3/ext4 discrimination logic. Patch32: util-linux-libblkid-ext-probe.patch +# PATCH-FIX-UPSTREAM bnc871698 sbrabec@suse.cz +Patch33: util-linux-prevent-excessive-clock-drift-calculations.patch ## ## klogconsole @@ -247,6 +251,7 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch2 -p1 %patch4 -p1 %patch12 -p1 +%patch14 -p0 %patch15 -p0 %patch16 -p0 %patch17 -p0 @@ -260,6 +265,7 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch30 -p1 %patch31 -p1 %patch32 -p1 +%patch33 -p1 # # setctsid cp -p %{S:22} %{S:23} . From f009dd27b5ef84b5132904d4278c6b6122d71f42a8beafdc69f6a25f19eddd79 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 2 Jun 2014 05:02:19 +0000 Subject: [PATCH 179/211] Accepting request 235663 from Base:System - use nologin from upstream (was added in 2.24) - remove unknown configure options - remove unused and outdated suse READMEs - require bc for checks (forwarded request 235657 from rudi_m) OBS-URL: https://build.opensuse.org/request/show/235663 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=187 --- README.largedisk | 12 --------- README.raw | 54 --------------------------------------- nologin.8 | 63 ---------------------------------------------- nologin.c | 58 ------------------------------------------ util-linux.changes | 8 ++++++ util-linux.spec | 22 +++------------- 6 files changed, 11 insertions(+), 206 deletions(-) delete mode 100644 README.largedisk delete mode 100644 README.raw delete mode 100644 nologin.8 delete mode 100644 nologin.c diff --git a/README.largedisk b/README.largedisk deleted file mode 100644 index 854dd3d..0000000 --- a/README.largedisk +++ /dev/null @@ -1,12 +0,0 @@ -Some hints on fdisk and large disks (> 2TB) -------------------------------------------- - -Note that fdisk only supports legacy partition tables. -Legacy partition tables (like DOS) use 32 bit LBA addressing, -which means that you can only address partitions with a starting -sector and a size with a maximum of 2**32 sectors = 2TB. -This means you can not create partitions that are greater than 2TB -with fdisk! -If you want to use partition sizes above this limit, you need to use -GUID Partition Tables (GPT) which use 64 bit LBA addressing. -They are supported by parted. diff --git a/README.raw b/README.raw deleted file mode 100644 index 6696ec8..0000000 --- a/README.raw +++ /dev/null @@ -1,54 +0,0 @@ -Raw device driver support on SLS 9 - -On SLS 9, you will notice that by default, raw devices (nodes) (/dev/rawctl -and /dev/raw/rawN (1-15)) no longer exist whereas in SLES 8, the raw nodes were -created when the system was initially installed. SLS 9, by default, uses -the new dynamic userspace implementation "sysfs" together with "udev" which -replaces the previous static "dev" system. - -Raw devices are moving towards eventual obsolescence with block+O_DIRECT -support intended as a replacement. The primary application users of raw -character devices have been databases so the database you are using will have -to support the O_DIRECT functionality before moving away from raw character -devices. - -Using RAW with kernel 2.6 (SLS 9) ---------------------------------- -Raw device usage in kernel 2.6 together with udev and sysfs was intended to be -quite seamless. Basically, all that is required is to load the raw module after -each reboot using the commands "modprobe raw" or "rcraw start". Then use the -"raw" command to create the bindings to the block character devices. The raw -device nodes are no longer required to exist before the bindings are assigned -and used. - -Using a single script, you can you load the raw module and bind the raw nodes -to block devices. - -#!/usr/bin -# load the raw module -modprobe raw # can also use "rcraw start" -# create the raw bindings -raw /dev/raw/raw1 /dev/sdb1 -raw /dev/raw/raw2 /dev/sbc1 - -You can see if the raw driver is available by issuing "rcraw status". If the -raw driver is loaded, the command should return a status of "running". A status -of "dead" will usually indicate that the driver was not loaded or -the /dev/rawctl file does not exist. The /dev/rawctl file is automatically -created when the module is loaded. This file and the /dev/raw/rawN nodes can -also be viewed under the /sys/class/raw directory. - -Raw node permissions ----------------------------------- -When the raw devices are assigned, permission settings are determined from the -/etc/udev/udev.permission file. This file can be modified to assign different -owner, group and/or access permissions to the raw nodes. For example, by -default, the permission settings for raw nodes are as follows: - -raw/raw*:root:disk:660 - -Here, root:disk is the default owner:group with read write access for owner and -group. As an example, to create the raw nodes with an owner:group of -user1:group1 and read write access for all, change the assignment as follows: - -raw/raw*:user1:group1:666 diff --git a/nologin.8 b/nologin.8 deleted file mode 100644 index 1aceb4a..0000000 --- a/nologin.8 +++ /dev/null @@ -1,63 +0,0 @@ -.\" $OpenBSD: nologin.8,v 1.8 1999/06/04 02:45:19 aaron Exp $ -.\" $NetBSD: nologin.8,v 1.3 1995/03/18 14:59:09 cgd Exp $ -.\" -.\" Copyright (c) 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)nologin.8 8.1 (Berkeley) 6/19/93 -.\" -.Dd February 15, 1997 -.Dt NOLOGIN 8 -.Os -.Sh NAME -.Nm nologin -.Nd politely refuse a login -.Sh SYNOPSIS -.Nm nologin -.Sh DESCRIPTION -.Nm -displays a message that an account is not available and -exits non-zero. -It is intended as a replacement shell field for accounts that -have been disabled. -.Pp -If the file -.Pa /etc/nologin.txt -exists, -.Nm -displays its contents to the user instead of the default message. -.Sh SEE ALSO -.Xr login 1 -.Sh HISTORY -The -.Nm -command appeared in -.Bx 4.4 . diff --git a/nologin.c b/nologin.c deleted file mode 100644 index fc0ff26..0000000 --- a/nologin.c +++ /dev/null @@ -1,58 +0,0 @@ -/* $OpenBSD: nologin.c,v 1.2 1997/04/04 16:51:37 millert Exp $ */ - -/* - * Copyright (c) 1997, Jason Downs. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include - -/* Distinctly different from _PATH_NOLOGIN. */ -#define _PATH_NOLOGIN_TXT "/etc/nologin.txt" - -#define DEFAULT_MESG "This account is currently not available.\n" - -/*ARGSUSED*/ -int main(argc, argv) - int argc; - char *argv[]; -{ - int nfd, nrd; - char nbuf[128]; - - nfd = open(_PATH_NOLOGIN_TXT, O_RDONLY); - if (nfd < 0) { - write(STDOUT_FILENO, DEFAULT_MESG, strlen(DEFAULT_MESG)); - exit (1); - } - - while ((nrd = read(nfd, nbuf, sizeof(nbuf))) > 0) - write(STDOUT_FILENO, nbuf, nrd); - close (nfd); - - exit (1); -} diff --git a/util-linux.changes b/util-linux.changes index 53a1411..cd771a6 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue May 27 21:17:40 UTC 2014 - sweet_f_a@gmx.de + +- use nologin from upstream (was added in 2.24) +- remove unknown configure options +- remove unused and outdated suse READMEs +- require bc for checks + ------------------------------------------------------------------- Fri May 16 15:10:53 UTC 2014 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index 2373d3a..42dc9a1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -23,6 +23,7 @@ Name: util-linux BuildRequires: audit-devel +BuildRequires: bc BuildRequires: binutils-devel BuildRequires: fdupes BuildRequires: gettext-devel @@ -67,9 +68,6 @@ License: GPL-2.0+ Group: System/Base Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/%{name}-%{version}.tar.xz Source1: util-linux-rpmlintrc -# XXX: make nologin part of util-linux upstream -Source2: nologin.c -Source3: nologin.8 Source4: raw.init Source5: etc.raw Source6: etc_filesystems @@ -90,8 +88,6 @@ Source28: mkzimage_cmdline.8 Source29: mkzimage_cmdline.c Source31: addnote.c # -Source26: README.raw -Source30: README.largedisk Source50: uuidd.rc Source51: blkid.conf ## @@ -269,8 +265,6 @@ xzcat %{S:0} | %gpg_verify %{S:12} - # # setctsid cp -p %{S:22} %{S:23} . -# nologin -cp -p %{S:2} %{S:3} %{S:26} %{S:30} . pushd ../klogconsole %patch55 -p1 @@ -318,8 +312,6 @@ export SUID_LDFLAGS="-pie" --enable-raw \ --enable-write \ --enable-line \ - --enable-new-mount \ - --enable-login-utils \ --enable-tunelp \ --enable-socket-activation \ %if %{with enable_last} @@ -327,7 +319,6 @@ export SUID_LDFLAGS="-pie" %else --disable-last \ %endif - --enable-logger \ %if %{with enable_eject} --enable-eject \ %else @@ -355,7 +346,6 @@ export SUID_LDFLAGS="-pie" # make %{?_smp_mflags} # -%{__cc} -fwhole-program %{optflags} -o nologin nologin.c %{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29} %{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31} @@ -388,6 +378,7 @@ popd # util-linux install # %make_install +rm -f %{buildroot}/%{_libdir}/lib*.la #UsrMerge %if %{with enable_su} ln -s %{_bindir}/kill %{buildroot}/bin @@ -414,6 +405,7 @@ ln -s %{_sbindir}/mkfs.bfs %{buildroot}/sbin ln -s %{_sbindir}/mkfs.minix %{buildroot}/sbin ln -s %{_sbindir}/mkfs.cramfs %{buildroot}/sbin ln -s %{_sbindir}/mkswap %{buildroot}/sbin +ln -s %{_sbindir}/nologin %{buildroot}/sbin ln -s %{_sbindir}/pivot_root %{buildroot}/sbin ln -s %{_sbindir}/raw %{buildroot}/sbin ln -s %{_sbindir}/sfdisk %{buildroot}/sbin @@ -430,19 +422,11 @@ ln -s %{_sbindir}/fstrim %{buildroot}/sbin ln -s %{_sbindir}/chcpu %{buildroot}/sbin #EndUsrMerge install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/filesystems -install -m 755 nologin %{buildroot}/%{_sbindir} -#UsrMerge -ln -s %{_sbindir}/nologin %{buildroot}/sbin -#EndUsrMerge -rm -f %{buildroot}/%{_libdir}/libblkid.la -rm -f %{buildroot}/%{_libdir}/libuuid.la -rm -f %{buildroot}/%{_libdir}/libmount.la %ifnarch ppc ppc64 install -m 755 mkzimage_cmdline %{buildroot}/%{_bindir} install -m 644 %{S:28} %{buildroot}%{_mandir}/man8 install -m 755 chrp-addnote %{buildroot}/%{_bindir} %endif -install -m 644 nologin.8 %{buildroot}%{_mandir}/man8 # setctsid install install -m 755 setctsid %{buildroot}/%{_sbindir} install -m 444 setctsid.8 %{buildroot}%{_mandir}/man8/ From b06a2d6032d21a07c20899b6efed8d8cd470347599c202dc00a7c171af7c5bac Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sun, 27 Jul 2014 06:24:04 +0000 Subject: [PATCH 180/211] Accepting request 242481 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/242481 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=188 --- util-linux.changes | 16 ++++++++++++++++ util-linux.spec | 40 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/util-linux.changes b/util-linux.changes index cd771a6..2936f09 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Sat Jul 26 11:44:57 UTC 2014 - dimstar@opensuse.org + +- Really fix devel-static requires (libblkid-devel-static). + +------------------------------------------------------------------- +Sat Jul 26 09:39:30 UTC 2014 - coolo@suse.com + +- fix requires of devel-static packages + +------------------------------------------------------------------- +Thu Jul 24 18:45:53 CEST 2014 - dsterba@suse.cz + +- enable build of libmount-devel-static, libuuid-devel-static and + libblkid-devel-static + ------------------------------------------------------------------- Tue May 27 21:17:40 UTC 2014 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index 42dc9a1..d42cffa 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -192,6 +192,15 @@ Requires: libblkid1 = %{version} Files needed to develop applications using the library for filesystem detection. +%package -n libblkid-devel-static +Summary: Development files for the filesystem detection library +Group: Development/Libraries/C and C++ +Requires: libblkid-devel = %{version} + +%description -n libblkid-devel-static +Files needed to develop applications using the library for filesystem +detection. + %package -n uuidd Summary: Helper daemon to guarantee uniqueness of time-based UUIDs Group: System/Filesystems @@ -221,6 +230,15 @@ Requires: libuuid1 = %{version} Files to develop applications using the library to generate universally unique IDs (UUIDs). +%package -n libuuid-devel-static +Summary: Development files for libuuid1 +Group: Development/Libraries/C and C++ +Requires: libuuid-devel = %{version} + +%description -n libuuid-devel-static +Files to develop applications using the library to generate universally +unique IDs (UUIDs). + %package -n libmount1 Summary: Device mount library Group: System/Filesystems @@ -237,6 +255,14 @@ Requires: libmount1 = %{version} %description -n libmount-devel Files to develop applications using the libmount library. +%package -n libmount-devel-static +Summary: Development files for libmount1 +Group: Development/Libraries/C and C++ +Requires: libmount-devel = %{version} + +%description -n libmount-devel-static +Files to develop applications using the libmount library. + %lang_package %prep %if 0%{?VERIFY_SIG} @@ -340,7 +366,7 @@ export SUID_LDFLAGS="-pie" --disable-kill \ %endif --disable-use-tty-group \ - --disable-static \ + --enable-static \ --disable-silent-rules \ --disable-rpath # @@ -917,6 +943,10 @@ fi %{_libdir}/pkgconfig/blkid.pc %{_mandir}/man3/libblkid.3.gz +%files -n libblkid-devel-static +%defattr(-, root, root) +%{_libdir}/libblkid.a + %files -n libmount1 %defattr(-, root, root) /%{_libdir}/libmount.so.1 @@ -929,6 +959,10 @@ fi %{_includedir}/libmount/libmount.h %{_libdir}/pkgconfig/mount.pc +%files -n libmount-devel-static +%defattr(-, root, root) +%{_libdir}/libmount.a + %files -n uuidd %defattr(-, root, root) %verify(not mode) %attr(0755,root,root) %{_sbindir}/uuidd @@ -954,4 +988,8 @@ fi %{_libdir}/pkgconfig/uuid.pc %{_mandir}/man3/uuid* +%files -n libuuid-devel-static +%defattr(-, root, root) +%{_libdir}/libuuid.a + %changelog From 6c689062ac6b615fe08274cc04e5827eb25cd067e3a17824147d603b4f5400fe Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 25 Aug 2014 10:59:47 +0000 Subject: [PATCH 181/211] Accepting request 245630 from Base:System - Update to version 2.25 (using work of Ruediger Meier ): * based on the git master branch of util-linux * many fixes (including bnc#869355, bnc#871951 and bnc#871698#c49) * new Python binding sub-package for libmount: python-libmount * new library: libsmartcols * new commands: lslogins, setpriv * add fstrim systemd timer * better systemd integration * DROPPED command: * cytune: Upstream decided to remove tool untested for years that supports this old hardware. - Dropped patches included in the upstream: (*git) Included with no changes (+git) Included with improvements (!git) Included with differences * support-other-tty-lines-not-vconsole.patch (*b9c7390) * agetty-fooled-on-serial-line-due-plymouth.patch, * sulogin-fooled-on-tty-line-due-plymouth.patch (*bb280f7) * agetty-on-s390-on-dev-3270-tty1-line.patch (*f2bcda5) * sulogin-does-not-find-any-console.patch (*624b204) * util-linux-setarch-uname26.patch (*f6eb160) * util-linux-ng-2.16-squashfs3-detect.patch (*11402f5) * util-linux-lscpu-improve-hypervisor-detection.patch (!b774473, b32488c, 5bd31c6, 0f0c558, 96ce475) WARNING, INCOMPATIBLE CHANGE: "lscpu -p" no more reports hypervisor, as it breaks standard behavior. Use standard output instead! (FATE#310255) * blkid-stop-scanning-on-I-O-error.patch (+296d96e) OBS-URL: https://build.opensuse.org/request/show/245630 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=189 --- ...y-fooled-on-serial-line-due-plymouth.patch | 153 - agetty-on-s390-on-dev-3270-tty1-line.patch | 78 - ...uperblocks-to-new-calling-convention.patch | 2269 ---------- blkid-stop-scanning-on-I-O-error.patch | 138 - pre_checkin.sh | 35 + python-libmount.changes | 3997 +++++++++++++++++ python-libmount.spec | 1328 ++++++ sulogin-does-not-find-any-console.patch | 32 - sulogin-fooled-on-tty-line-due-plymouth.patch | 72 - support-other-tty-lines-not-vconsole.patch | 104 - util-linux-2.23.1-eject-fpie.patch | 13 - ...nux-2.24-fdisk_remove_bogus_warnings.patch | 18 - util-linux-2.24.2.tar.sign | 17 - util-linux-2.24.2.tar.xz | 3 - util-linux-2.25.tar.sign | 17 + util-linux-2.25.tar.xz | 3 + util-linux-HACK-boot.localfs.diff | 27 - util-linux-bash-completion-blockdev.patch | 13 + util-linux-libblkid-ext-probe.patch | 274 -- ...x-lscpu-improve-hypervisor-detection.patch | 206 - util-linux-ng-2.16-squashfs3-detect.patch | 118 - ...c-suse.diff => util-linux-noenc-suse.patch | 10 +- ...t-excessive-clock-drift-calculations.patch | 162 - util-linux-rpmlintrc | 3 +- util-linux-setarch-uname26.patch | 25 - util-linux-systemd.changes | 3997 +++++++++++++++++ util-linux-systemd.spec | 1328 ++++++ util-linux.changes | 60 +- util-linux.preamble | 1 + util-linux.python-libmount | 2 + util-linux.spec | 707 ++- util-linux.util-linux | 2 + 32 files changed, 11310 insertions(+), 3902 deletions(-) delete mode 100644 agetty-fooled-on-serial-line-due-plymouth.patch delete mode 100644 agetty-on-s390-on-dev-3270-tty1-line.patch delete mode 100644 blkid-convert-superblocks-to-new-calling-convention.patch delete mode 100644 blkid-stop-scanning-on-I-O-error.patch create mode 100644 pre_checkin.sh create mode 100644 python-libmount.changes create mode 100644 python-libmount.spec delete mode 100644 sulogin-does-not-find-any-console.patch delete mode 100644 sulogin-fooled-on-tty-line-due-plymouth.patch delete mode 100644 support-other-tty-lines-not-vconsole.patch delete mode 100644 util-linux-2.23.1-eject-fpie.patch delete mode 100644 util-linux-2.24-fdisk_remove_bogus_warnings.patch delete mode 100644 util-linux-2.24.2.tar.sign delete mode 100644 util-linux-2.24.2.tar.xz create mode 100644 util-linux-2.25.tar.sign create mode 100644 util-linux-2.25.tar.xz delete mode 100644 util-linux-HACK-boot.localfs.diff create mode 100644 util-linux-bash-completion-blockdev.patch delete mode 100644 util-linux-libblkid-ext-probe.patch delete mode 100644 util-linux-lscpu-improve-hypervisor-detection.patch delete mode 100644 util-linux-ng-2.16-squashfs3-detect.patch rename util-linux-2.23.1-noenc-suse.diff => util-linux-noenc-suse.patch (52%) delete mode 100644 util-linux-prevent-excessive-clock-drift-calculations.patch delete mode 100644 util-linux-setarch-uname26.patch create mode 100644 util-linux-systemd.changes create mode 100644 util-linux-systemd.spec create mode 100644 util-linux.preamble create mode 100644 util-linux.python-libmount create mode 100644 util-linux.util-linux diff --git a/agetty-fooled-on-serial-line-due-plymouth.patch b/agetty-fooled-on-serial-line-due-plymouth.patch deleted file mode 100644 index 2612439..0000000 --- a/agetty-fooled-on-serial-line-due-plymouth.patch +++ /dev/null @@ -1,153 +0,0 @@ -Even with TTYReset=no it seems with systemd or plymouth the termios -flags become changed from under the first agetty on a serial system -console as the flags are locked. - ---- - agetty.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++------ - 1 file changed, 68 insertions(+), 7 deletions(-) - ---- term-utils/agetty.c -+++ term-utils/agetty.c 2014-03-05 17:52:32.574235616 +0000 -@@ -20,6 +20,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -276,13 +277,15 @@ static void log_warn (const char *, ...) - static ssize_t append(char *dest, size_t len, const char *sep, const char *src); - static void check_username (const char* nm); - static void login_options_to_argv(char *argv[], int *argc, char *str, char *username); -+static int plymouth_command(const char* arg); - - /* Fake hostname for ut_host specified on command line. */ - static char *fakehost; - - #ifdef DEBUGGING -+# include "closestream.h" - # ifndef DEBUG_OUTPUT --# define DEBUG_OUTPUT "/dev/ttyp0" -+# define DEBUG_OUTPUT "/dev/tty10" - # endif - # define debug(s) do { fprintf(dbf,s); fflush(dbf); } while (0) - FILE *dbf; -@@ -320,8 +323,12 @@ int main(int argc, char **argv) - - #ifdef DEBUGGING - dbf = fopen(DEBUG_OUTPUT, "w"); -- for (int i = 1; i < argc; i++) -+ for (int i = 1; i < argc; i++) { -+ if (i > 1) -+ debug(" "); - debug(argv[i]); -+ } -+ debug("\n"); - #endif /* DEBUGGING */ - - /* Parse command-line arguments. */ -@@ -473,7 +480,6 @@ int main(int argc, char **argv) - if (options.osrelease) - free(options.osrelease); - #ifdef DEBUGGING -- fprintf(dbf, "read %c\n", ch); - if (close_stream(dbf) != 0) - log_err("write failed: %s", DEBUG_OUTPUT); - #endif -@@ -1104,6 +1110,27 @@ static void termio_init(struct options * - { - speed_t ispeed, ospeed; - struct winsize ws; -+ struct termios lock; -+ int i = (plymouth_command("--ping") == 0) ? 30 : 0; -+ -+ while (i-- > 0) { -+ /* -+ * Even with TTYReset=no it seems with systemd or plymouth -+ * the termios flags become changed from under the first -+ * agetty on a serial system console as the flags are locked. -+ */ -+ memset(&lock, 0, sizeof(struct termios)); -+ if (ioctl(STDIN_FILENO, TIOCGLCKTRMIOS, &lock) < 0) -+ break; -+ if (!lock.c_iflag && !lock.c_oflag && !lock.c_cflag && !lock.c_lflag) -+ break; -+ debug("termios locked\n"); -+ if (i == 15 && plymouth_command("quit") != 0) -+ break; -+ sleep(1); -+ } -+ memset(&lock, 0, sizeof(struct termios)); -+ ioctl(STDIN_FILENO, TIOCSLCKTRMIOS, &lock); - - if (op->flags & F_VCONSOLE) { - #if defined(IUTF8) && defined(KDGKBMODE) -@@ -1168,9 +1195,6 @@ static void termio_init(struct options * - * later on. - */ - -- /* Flush input and output queues, important for modems! */ -- tcflush(STDIN_FILENO, TCIOFLUSH); -- - #ifdef IUTF8 - tp->c_iflag = tp->c_iflag & IUTF8; - if (tp->c_iflag & IUTF8) -@@ -1230,8 +1254,11 @@ static void termio_init(struct options * - if (op->flags & F_RTSCTS) - tp->c_cflag |= CRTSCTS; - #endif -+ /* Flush input and output queues, important for modems! */ -+ tcflush(STDIN_FILENO, TCIOFLUSH); - -- tcsetattr(STDIN_FILENO, TCSANOW, tp); -+ if (tcsetattr(STDIN_FILENO, TCSANOW, tp)) -+ log_warn(_("setting terminal attributes failed: %m")); - - /* Go to blocking input even in local mode. */ - fcntl(STDIN_FILENO, F_SETFL, -@@ -1252,6 +1279,10 @@ static void reset_vc(const struct option - - if (tcsetattr(STDIN_FILENO, TCSADRAIN, tp)) - log_warn(_("setting terminal attributes failed: %m")); -+ -+ /* Go to blocking input even in local mode. */ -+ fcntl(STDIN_FILENO, F_SETFL, -+ fcntl(STDIN_FILENO, F_GETFL, 0) & ~O_NONBLOCK); - } - - /* Extract baud rate from modem status message. */ -@@ -2273,3 +2304,33 @@ err: - log_err(_("checkname failed: %m")); - } - -+/* -+ * For the case plymouth is found on this system -+ */ -+static int plymouth_command(const char* arg) -+{ -+ const char *cmd = "/usr/bin/plymouth"; -+ static int has_plymouth = 1; -+ pid_t pid; -+ -+ if (!has_plymouth) -+ return 127; -+ -+ pid = fork(); -+ if (!pid) { -+ int fd = open("/dev/null", O_RDWR); -+ dup2(fd, 0); -+ dup2(fd, 1); -+ dup2(fd, 2); -+ close(fd); -+ execl(cmd, cmd, arg, (char *) NULL); -+ exit(127); -+ } else if (pid > 0) { -+ int status; -+ waitpid(pid, &status, 0); -+ if (status == 127) -+ has_plymouth = 0; -+ return status; -+ } -+ return 1; -+} diff --git a/agetty-on-s390-on-dev-3270-tty1-line.patch b/agetty-on-s390-on-dev-3270-tty1-line.patch deleted file mode 100644 index 36b85e6..0000000 --- a/agetty-on-s390-on-dev-3270-tty1-line.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- - login-utils/sulogin.c | 8 +++++++- - term-utils/agetty.c | 15 ++++++++++----- - 2 files changed, 17 insertions(+), 6 deletions(-) - ---- term-utils/agetty.c -+++ term-utils/agetty.c 2014-05-08 08:08:26.384484940 +0000 -@@ -51,7 +51,8 @@ - # define DEFAULT_VCTERM "linux" - # endif - # if defined (__s390__) || defined (__s390x__) --# define DEFAULT_TTYS0 "ibm327x" -+# define DEFAULT_TTYS0 "dumb" -+# define DEFAULT_TTY32 "ibm327x" - # define DEFAULT_TTYS1 "vt220" - # endif - # ifndef DEFAULT_STERM -@@ -571,6 +572,8 @@ static void login_options_to_argv(char * - *argc = i; - } - -+#define is_speed(str) (strlen((str)) == strspn((str), "0123456789,")) -+ - /* Parse command-line arguments. */ - static void parse_args(int argc, char **argv, struct options *op) - { -@@ -749,7 +752,7 @@ static void parse_args(int argc, char ** - } - - /* Accept "tty", "baudrate tty", and "tty baudrate". */ -- if ('0' <= argv[optind][0] && argv[optind][0] <= '9') { -+ if (is_speed(argv[optind])) { - /* Assume BSD style speed. */ - parse_speeds(op, argv[optind++]); - if (argc < optind + 1) { -@@ -761,7 +764,7 @@ static void parse_args(int argc, char ** - op->tty = argv[optind++]; - if (argc > optind) { - char *v = argv[optind++]; -- if ('0' <= *v && *v <= '9') -+ if (is_speed(v)) - parse_speeds(op, v); - else - op->speeds[op->numspeed++] = bcode("9600"); -@@ -1071,9 +1074,11 @@ static void open_tty(char *tty, struct t - * higher. Whereas the second serial line on a S/390(x) is - * a real character terminal which is compatible with VT220. - */ -- if (strcmp(op->tty, "ttyS0") == 0) -+ if (strcmp(op->tty, "ttyS0") == 0) /* linux/drivers/s390/char/con3215.c */ - op->term = DEFAULT_TTYS0; -- else if (strcmp(op->tty, "ttyS1") == 0) -+ else if (strncmp(op->tty, "3270/tty", 8) == 0) /* linux/drivers/s390/char/con3270.c */ -+ op->term = DEFAULT_TTY32; -+ else if (strcmp(op->tty, "ttyS1") == 0) /* linux/drivers/s390/char/sclp_vt220.c */ - op->term = DEFAULT_TTYS1; - } - #endif ---- login-utils/sulogin.c -+++ login-utils/sulogin.c 2014-05-08 08:22:38.572781002 +0000 -@@ -189,10 +189,16 @@ static void tcfinal(struct console *con) - setenv("TERM", "linux", 1); - return; - } -- if (con->flags & CON_NOTTY) -+ if (con->flags & CON_NOTTY) { -+ setenv("TERM", "dumb", 1); - return; -+ } - -+#if defined (__s390__) || defined (__s390x__) -+ setenv("TERM", "dumb", 1); -+#else - setenv("TERM", "vt102", 1); -+#endif - tio = &con->tio; - fd = con->fd; - diff --git a/blkid-convert-superblocks-to-new-calling-convention.patch b/blkid-convert-superblocks-to-new-calling-convention.patch deleted file mode 100644 index a0253c3..0000000 --- a/blkid-convert-superblocks-to-new-calling-convention.patch +++ /dev/null @@ -1,2269 +0,0 @@ -From 9d3bb346fb30f5e03f919b4f68dc8e7e59499bc7 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Tue, 21 Jan 2014 10:10:19 +0100 -Subject: [PATCH] blkid: convert superblocks to new calling convention - -With the previous patch the scanning functions were -modified to return a differentiated return code. -To correctly abort scanning when an I/O error occurs -we need to differentiate between 'error' (= -1) and -'not found' (= 1) in the probe functions. -This patch updates all superblock scanning functions -to the new calling convention. - -Signed-off-by: Hannes Reinecke -Signed-off-by: Ruediger Meier ---- - libblkid/src/partitions/aix.c | 2 +- - libblkid/src/partitions/bsd.c | 14 ++++++--- - libblkid/src/partitions/dos.c | 24 ++++++++++----- - libblkid/src/partitions/gpt.c | 26 +++++++++++----- - libblkid/src/partitions/mac.c | 19 ++++++++---- - libblkid/src/partitions/minix.c | 14 ++++++--- - libblkid/src/partitions/sgi.c | 14 ++++++--- - libblkid/src/partitions/solaris_x86.c | 14 ++++++--- - libblkid/src/partitions/sun.c | 14 ++++++--- - libblkid/src/partitions/ultrix.c | 16 ++++++---- - libblkid/src/partitions/unixware.c | 14 ++++++--- - libblkid/src/superblocks/adaptec_raid.c | 15 ++++----- - libblkid/src/superblocks/bcache.c | 4 +-- - libblkid/src/superblocks/befs.c | 24 +++++++-------- - libblkid/src/superblocks/btrfs.c | 2 +- - libblkid/src/superblocks/cramfs.c | 2 +- - libblkid/src/superblocks/ddf_raid.c | 19 +++++++----- - libblkid/src/superblocks/drbd.c | 8 ++--- - libblkid/src/superblocks/drbdproxy_datalog.c | 2 +- - libblkid/src/superblocks/exfat.c | 4 ++- - libblkid/src/superblocks/ext.c | 34 ++++++++++---------- - libblkid/src/superblocks/f2fs.c | 2 +- - libblkid/src/superblocks/gfs.c | 8 ++--- - libblkid/src/superblocks/hfs.c | 12 ++++---- - libblkid/src/superblocks/highpoint_raid.c | 12 ++++---- - libblkid/src/superblocks/hpfs.c | 8 ++--- - libblkid/src/superblocks/iso9660.c | 4 +-- - libblkid/src/superblocks/isw_raid.c | 13 ++++---- - libblkid/src/superblocks/jfs.c | 2 +- - libblkid/src/superblocks/jmicron_raid.c | 13 ++++---- - libblkid/src/superblocks/linux_raid.c | 46 ++++++++++++++++------------ - libblkid/src/superblocks/lsi_raid.c | 10 +++--- - libblkid/src/superblocks/luks.c | 2 +- - libblkid/src/superblocks/lvm.c | 6 ++-- - libblkid/src/superblocks/minix.c | 18 ++++++----- - libblkid/src/superblocks/netware.c | 2 +- - libblkid/src/superblocks/nilfs.c | 4 +-- - libblkid/src/superblocks/ntfs.c | 6 ++-- - libblkid/src/superblocks/nvidia_raid.c | 12 ++++---- - libblkid/src/superblocks/ocfs.c | 8 ++--- - libblkid/src/superblocks/promise_raid.c | 10 +++--- - libblkid/src/superblocks/reiserfs.c | 8 ++--- - libblkid/src/superblocks/romfs.c | 2 +- - libblkid/src/superblocks/silicon_raid.c | 10 +++--- - libblkid/src/superblocks/squashfs.c | 6 ++-- - libblkid/src/superblocks/swap.c | 24 +++++++-------- - libblkid/src/superblocks/sysv.c | 8 ++--- - libblkid/src/superblocks/ubifs.c | 2 +- - libblkid/src/superblocks/udf.c | 16 +++++----- - libblkid/src/superblocks/ufs.c | 4 +-- - libblkid/src/superblocks/vfat.c | 16 +++++----- - libblkid/src/superblocks/via_raid.c | 6 ++-- - libblkid/src/superblocks/vmfs.c | 4 +-- - libblkid/src/superblocks/vxfs.c | 2 +- - libblkid/src/superblocks/xfs.c | 6 ++-- - libblkid/src/superblocks/zfs.c | 6 ++-- - 56 files changed, 338 insertions(+), 265 deletions(-) - -diff --git a/libblkid/src/partitions/aix.c b/libblkid/src/partitions/aix.c -index de397bf..ded9dfd 100644 ---- a/libblkid/src/partitions/aix.c -+++ b/libblkid/src/partitions/aix.c -@@ -34,7 +34,7 @@ static int probe_aix_pt(blkid_probe pr, - - return 0; - err: -- return -1; -+ return 1; - } - - /* -diff --git a/libblkid/src/partitions/bsd.c b/libblkid/src/partitions/bsd.c -index 3de6a58..6fdb82f 100644 ---- a/libblkid/src/partitions/bsd.c -+++ b/libblkid/src/partitions/bsd.c -@@ -42,14 +42,18 @@ static int probe_bsd_pt(blkid_probe pr, const struct blkid_idmag *mag) - return 0; - - data = blkid_probe_get_sector(pr, BLKID_MAG_SECTOR(mag)); -- if (!data) -- goto nothing; -+ if (!data) { -+ if (errno) -+ goto err; -+ else -+ goto nothing; -+ } - - l = (struct bsd_disklabel *) data + BLKID_MAG_LASTOFFSET(mag); - - ls = blkid_probe_get_partlist(pr); - if (!ls) -- goto err; -+ goto nothing; - - /* try to determine the real type of BSD system according to - * (parental) primary partition */ -@@ -76,7 +80,7 @@ static int probe_bsd_pt(blkid_probe pr, const struct blkid_idmag *mag) - - tab = blkid_partlist_new_parttable(ls, name, BLKID_MAG_OFFSET(mag)); - if (!tab) -- goto err; -+ goto nothing; - - if (le16_to_cpu(l->d_npartitions) < BSD_MAXPARTITIONS) - nparts = le16_to_cpu(l->d_npartitions); -@@ -113,7 +117,7 @@ static int probe_bsd_pt(blkid_probe pr, const struct blkid_idmag *mag) - - par = blkid_partlist_add_partition(ls, tab, start, size); - if (!par) -- goto err; -+ goto nothing; - - blkid_partition_set_type(par, p->p_fstype); - } -diff --git a/libblkid/src/partitions/dos.c b/libblkid/src/partitions/dos.c -index 14f326d..8888c0c 100644 ---- a/libblkid/src/partitions/dos.c -+++ b/libblkid/src/partitions/dos.c -@@ -54,8 +54,12 @@ static int parse_dos_extended(blkid_probe pr, blkid_parttable tab, - if (++ct_nodata > 100) - return 0; - data = blkid_probe_get_sector(pr, cur_start); -- if (!data) -- goto leave; /* malformed partition? */ -+ if (!data) { -+ if (errno) -+ goto err; -+ else -+ goto leave; /* malformed partition? */ -+ } - - if (!mbr_is_valid_magic(data)) - goto leave; -@@ -98,7 +102,7 @@ static int parse_dos_extended(blkid_probe pr, blkid_parttable tab, - - par = blkid_partlist_add_partition(ls, tab, abs_start, size); - if (!par) -- goto err; -+ goto leave; - - blkid_partition_set_type(par, p->sys_ind); - blkid_partition_set_flags(par, p->boot_ind); -@@ -142,8 +146,12 @@ static int probe_dos_pt(blkid_probe pr, - - - data = blkid_probe_get_sector(pr, 0); -- if (!data) -- goto nothing; -+ if (!data) { -+ if (errno) -+ goto err; -+ else -+ goto nothing; -+ } - - /* ignore disks with AIX magic number -- for more details see aix.c */ - if (memcmp(data, BLKID_AIX_MAGIC_STRING, BLKID_AIX_MAGIC_STRLEN) == 0) -@@ -207,7 +215,7 @@ static int probe_dos_pt(blkid_probe pr, - /* allocate a new partition table */ - tab = blkid_partlist_new_parttable(ls, "dos", MBR_PT_OFFSET); - if (!tab) -- goto err; -+ goto nothing; - - if (id) - blkid_parttable_set_id(tab, (unsigned char *) idstr); -@@ -227,7 +235,7 @@ static int probe_dos_pt(blkid_probe pr, - } - par = blkid_partlist_add_partition(ls, tab, start, size); - if (!par) -- goto err; -+ goto nothing; - - blkid_partition_set_type(par, p->sys_ind); - blkid_partition_set_flags(par, p->boot_ind); -@@ -248,7 +256,7 @@ static int probe_dos_pt(blkid_probe pr, - continue; - if (is_extended(p) && - parse_dos_extended(pr, tab, start, size, ssf) == -1) -- goto err; -+ goto nothing; - } - - /* Parse subtypes (nested partitions) on large disks */ -diff --git a/libblkid/src/partitions/gpt.c b/libblkid/src/partitions/gpt.c -index 14a255a..79a4053 100644 ---- a/libblkid/src/partitions/gpt.c -+++ b/libblkid/src/partitions/gpt.c -@@ -168,8 +168,11 @@ static int is_pmbr_valid(blkid_probe pr, int *has) - goto ok; /* skip PMBR check */ - - data = blkid_probe_get_sector(pr, 0); -- if (!data) -+ if (!data) { -+ if (errno) -+ return -1; - goto failed; -+ } - - if (!mbr_is_valid_magic(data)) - goto failed; -@@ -302,26 +305,33 @@ static int probe_gpt_pt(blkid_probe pr, - uint64_t fu, lu; - uint32_t ssf, i; - efi_guid_t guid; -+ int ret; - - if (last_lba(pr, &lastlba)) - goto nothing; - -- if (!is_pmbr_valid(pr, NULL)) -+ ret = is_pmbr_valid(pr, NULL); -+ if (ret < 0) -+ goto err; -+ else if (ret == 0) - goto nothing; - - h = get_gpt_header(pr, &hdr, &e, (lba = GPT_PRIMARY_LBA), lastlba); -- if (!h) -+ if (!h && !errno) - h = get_gpt_header(pr, &hdr, &e, (lba = lastlba), lastlba); - -- if (!h) -+ if (!h) { -+ if (errno) -+ goto err; - goto nothing; -+ } - - blkid_probe_use_wiper(pr, lba * blkid_probe_get_size(pr), 8); - - if (blkid_probe_set_magic(pr, lba << 9, - sizeof(GPT_HEADER_SIGNATURE_STR) - 1, - (unsigned char *) GPT_HEADER_SIGNATURE_STR)) -- goto err; -+ goto nothing; - - guid = h->disk_guid; - swap_efi_guid(&guid); -@@ -335,11 +345,11 @@ static int probe_gpt_pt(blkid_probe pr, - - ls = blkid_probe_get_partlist(pr); - if (!ls) -- goto err; -+ goto nothing; - - tab = blkid_partlist_new_parttable(ls, "gpt", lba << 9); - if (!tab) -- goto err; -+ goto nothing; - - blkid_parttable_set_uuid(tab, (const unsigned char *) &guid); - -@@ -372,7 +382,7 @@ static int probe_gpt_pt(blkid_probe pr, - par = blkid_partlist_add_partition(ls, tab, - start * ssf, size * ssf); - if (!par) -- goto err; -+ goto nothing; - - blkid_partition_set_utf8name(par, - (unsigned char *) e->partition_name, -diff --git a/libblkid/src/partitions/mac.c b/libblkid/src/partitions/mac.c -index 7f8bb75..e64bde2 100644 ---- a/libblkid/src/partitions/mac.c -+++ b/libblkid/src/partitions/mac.c -@@ -87,8 +87,12 @@ static int probe_mac_pt(blkid_probe pr, - * the first block on the disk. - */ - md = (struct mac_driver_desc *) blkid_probe_get_sector(pr, 0); -- if (!md) -- goto nothing; -+ if (!md) { -+ if (errno) -+ goto err; -+ else -+ goto nothing; -+ } - - block_size = be16_to_cpu(md->block_size); - -@@ -96,8 +100,11 @@ static int probe_mac_pt(blkid_probe pr, - * the second block on the disk. - */ - p = (struct mac_partition *) get_mac_block(pr, block_size, 1); -- if (!p) -+ if (!p) { -+ if (errno) -+ goto err; - goto nothing; -+ } - - /* check the first partition signature */ - if (!has_part_signature(p)) -@@ -109,11 +116,11 @@ static int probe_mac_pt(blkid_probe pr, - - ls = blkid_probe_get_partlist(pr); - if (!ls) -- goto err; -+ goto nothing; - - tab = blkid_partlist_new_parttable(ls, "mac", 0); - if (!tab) -- goto err; -+ goto nothing; - - ssf = block_size / 512; - nblks = be32_to_cpu(p->map_count); -@@ -148,7 +155,7 @@ static int probe_mac_pt(blkid_probe pr, - - par = blkid_partlist_add_partition(ls, tab, start, size); - if (!par) -- goto err; -+ goto nothing; - - blkid_partition_set_name(par, (unsigned char *) p->name, - sizeof(p->name)); -diff --git a/libblkid/src/partitions/minix.c b/libblkid/src/partitions/minix.c -index 0a597fb..2f6f513 100644 ---- a/libblkid/src/partitions/minix.c -+++ b/libblkid/src/partitions/minix.c -@@ -25,12 +25,16 @@ static int probe_minix_pt(blkid_probe pr, - int i; - - data = blkid_probe_get_sector(pr, 0); -- if (!data) -- goto nothing; -+ if (!data) { -+ if (errno) -+ goto err; -+ else -+ goto nothing; -+ } - - ls = blkid_probe_get_partlist(pr); - if (!ls) -- goto err; -+ goto nothing; - - /* Parent is required, because Minix uses the same PT as DOS and - * difference is only in primary partition (parent) type. -@@ -48,7 +52,7 @@ static int probe_minix_pt(blkid_probe pr, - - tab = blkid_partlist_new_parttable(ls, "minix", MBR_PT_OFFSET); - if (!tab) -- goto err; -+ goto nothing; - - for (i = 0, p = mbr_get_partition(data, 0); - i < MINIX_MAXPARTITIONS; i++, p++) { -@@ -71,7 +75,7 @@ static int probe_minix_pt(blkid_probe pr, - - par = blkid_partlist_add_partition(ls, tab, start, size); - if (!par) -- goto err; -+ goto nothing; - - blkid_partition_set_type(par, p->sys_ind); - blkid_partition_set_flags(par, p->boot_ind); -diff --git a/libblkid/src/partitions/sgi.c b/libblkid/src/partitions/sgi.c -index bcde84f..b216340 100644 ---- a/libblkid/src/partitions/sgi.c -+++ b/libblkid/src/partitions/sgi.c -@@ -25,8 +25,12 @@ static int probe_sgi_pt(blkid_probe pr, - int i; - - l = (struct sgi_disklabel *) blkid_probe_get_sector(pr, 0); -- if (!l) -- goto nothing; -+ if (!l) { -+ if (errno) -+ goto err; -+ else -+ goto nothing; -+ } - - if (sgi_pt_checksum(l)) { - DBG(LOWPROBE, blkid_debug( -@@ -40,7 +44,7 @@ static int probe_sgi_pt(blkid_probe pr, - - ls = blkid_probe_get_partlist(pr); - if (!ls) -- goto err; -+ goto nothing; - - tab = blkid_partlist_new_parttable(ls, "sgi", 0); - if (!tab) -@@ -53,13 +57,13 @@ static int probe_sgi_pt(blkid_probe pr, - blkid_partition par; - - if (size == 0 || type == SGI_TYPE_ENTIRE_DISK || -- type == SGI_TYPE_VOLHDR) { -+ type == SGI_TYPE_VOLHDR) { - blkid_partlist_increment_partno(ls); - continue; - } - par = blkid_partlist_add_partition(ls, tab, start, size); - if (!par) -- goto err; -+ goto nothing; - - blkid_partition_set_type(par, type); - } -diff --git a/libblkid/src/partitions/solaris_x86.c b/libblkid/src/partitions/solaris_x86.c -index 4e08caf..d8fe859 100644 ---- a/libblkid/src/partitions/solaris_x86.c -+++ b/libblkid/src/partitions/solaris_x86.c -@@ -69,8 +69,12 @@ static int probe_solaris_pt(blkid_probe pr, - uint16_t nparts; - - l = (struct solaris_vtoc *) blkid_probe_get_sector(pr, SOLARIS_SECTOR); -- if (!l) -- goto nothing; -+ if (!l) { -+ if (errno) -+ goto err; -+ else -+ goto nothing; -+ } - - if (le32_to_cpu(l->v_version) != 1) { - DBG(LOWPROBE, blkid_debug( -@@ -85,13 +89,13 @@ static int probe_solaris_pt(blkid_probe pr, - - ls = blkid_probe_get_partlist(pr); - if (!ls) -- goto err; -+ goto nothing; - - parent = blkid_partlist_get_parent(ls); - - tab = blkid_partlist_new_parttable(ls, "solaris", SOLARIS_OFFSET); - if (!tab) -- goto err; -+ goto nothing; - - nparts = le16_to_cpu(l->v_nparts); - if (nparts > SOLARIS_MAXPARTITIONS) -@@ -120,7 +124,7 @@ static int probe_solaris_pt(blkid_probe pr, - - par = blkid_partlist_add_partition(ls, tab, start, size); - if (!par) -- goto err; -+ goto nothing; - - blkid_partition_set_type(par, le16_to_cpu(p->s_tag)); - blkid_partition_set_flags(par, le16_to_cpu(p->s_flag)); -diff --git a/libblkid/src/partitions/sun.c b/libblkid/src/partitions/sun.c -index ba7ca3a..83adf83 100644 ---- a/libblkid/src/partitions/sun.c -+++ b/libblkid/src/partitions/sun.c -@@ -27,8 +27,12 @@ static int probe_sun_pt(blkid_probe pr, - int i, use_vtoc; - - l = (struct sun_disklabel *) blkid_probe_get_sector(pr, 0); -- if (!l) -- goto nothing; -+ if (!l) { -+ if (errno) -+ goto err; -+ else -+ goto nothing; -+ } - - if (sun_pt_checksum(l)) { - DBG(LOWPROBE, blkid_debug( -@@ -42,11 +46,11 @@ static int probe_sun_pt(blkid_probe pr, - - ls = blkid_probe_get_partlist(pr); - if (!ls) -- goto err; -+ goto nothing; - - tab = blkid_partlist_new_parttable(ls, "sun", 0); - if (!tab) -- goto err; -+ goto nothing; - - /* sectors per cylinder (partition offset is in cylinders...) */ - spc = be16_to_cpu(l->nhead) * be16_to_cpu(l->nsect); -@@ -89,7 +93,7 @@ static int probe_sun_pt(blkid_probe pr, - } - par = blkid_partlist_add_partition(ls, tab, start, size); - if (!par) -- goto err; -+ goto nothing; - - if (type) - blkid_partition_set_type(par, type); -diff --git a/libblkid/src/partitions/ultrix.c b/libblkid/src/partitions/ultrix.c -index 853ae6e..fa08811 100644 ---- a/libblkid/src/partitions/ultrix.c -+++ b/libblkid/src/partitions/ultrix.c -@@ -44,8 +44,12 @@ static int probe_ultrix_pt(blkid_probe pr, - int i; - - data = blkid_probe_get_sector(pr, ULTRIX_SECTOR); -- if (!data) -- goto nothing; -+ if (!data) { -+ if (errno) -+ goto err; -+ else -+ goto nothing; -+ } - - l = (struct ultrix_disklabel *) (data + ULTRIX_OFFSET); - -@@ -55,7 +59,7 @@ static int probe_ultrix_pt(blkid_probe pr, - if (blkid_probe_set_magic(pr, (ULTRIX_SECTOR << 9) + ULTRIX_OFFSET, - sizeof(ULTRIX_MAGIC_STR) - 1, - (unsigned char *) ULTRIX_MAGIC_STR)) -- goto err; -+ goto nothing; - - if (blkid_partitions_need_typeonly(pr)) - /* caller does not ask for details about partitions */ -@@ -63,11 +67,11 @@ static int probe_ultrix_pt(blkid_probe pr, - - ls = blkid_probe_get_partlist(pr); - if (!ls) -- goto err; -+ goto nothing; - - tab = blkid_partlist_new_parttable(ls, "ultrix", 0); - if (!tab) -- goto err; -+ goto nothing; - - for (i = 0; i < ULTRIX_MAXPARTITIONS; i++) { - if (!l->pt_part[i].pi_nblocks) -@@ -76,7 +80,7 @@ static int probe_ultrix_pt(blkid_probe pr, - if (!blkid_partlist_add_partition(ls, tab, - l->pt_part[i].pi_blkoff, - l->pt_part[i].pi_nblocks)) -- goto err; -+ goto nothing; - } - } - -diff --git a/libblkid/src/partitions/unixware.c b/libblkid/src/partitions/unixware.c -index ce176b8..8cdae31 100644 ---- a/libblkid/src/partitions/unixware.c -+++ b/libblkid/src/partitions/unixware.c -@@ -106,8 +106,12 @@ static int probe_unixware_pt(blkid_probe pr, - - l = (struct unixware_disklabel *) - blkid_probe_get_sector(pr, UNIXWARE_SECTOR); -- if (!l) -- goto nothing; -+ if (!l) { -+ if (errno) -+ goto err; -+ else -+ goto nothing; -+ } - - if (le32_to_cpu(l->vtoc.v_magic) != UNIXWARE_VTOCMAGIC) - goto nothing; -@@ -118,13 +122,13 @@ static int probe_unixware_pt(blkid_probe pr, - - ls = blkid_probe_get_partlist(pr); - if (!ls) -- goto err; -+ goto nothing; - - parent = blkid_partlist_get_parent(ls); - - tab = blkid_partlist_new_parttable(ls, "unixware", UNIXWARE_OFFSET); - if (!tab) -- goto err; -+ goto nothing; - - /* Skip the first partition that describe whole disk - */ -@@ -155,7 +159,7 @@ static int probe_unixware_pt(blkid_probe pr, - - par = blkid_partlist_add_partition(ls, tab, start, size); - if (!par) -- goto err; -+ goto nothing; - - blkid_partition_set_type(par, tag); - blkid_partition_set_flags(par, flg); -diff --git a/libblkid/src/superblocks/adaptec_raid.c b/libblkid/src/superblocks/adaptec_raid.c -index 02e900d..eedf547 100644 ---- a/libblkid/src/superblocks/adaptec_raid.c -+++ b/libblkid/src/superblocks/adaptec_raid.c -@@ -80,10 +80,10 @@ static int probe_adraid(blkid_probe pr, - struct adaptec_metadata *ad; - - if (pr->size < 0x10000) -- return -1; -+ return 1; - - if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) -- return -1; -+ return 1; - - off = ((pr->size / 0x200)-1) * 0x200; - ad = (struct adaptec_metadata *) -@@ -91,16 +91,17 @@ static int probe_adraid(blkid_probe pr, - off, - sizeof(struct adaptec_metadata)); - if (!ad) -- return -1; -+ return errno ? -1 : 1; -+ - if (ad->smagic != be32_to_cpu(AD_SIGNATURE)) -- return -1; -+ return 1; - if (ad->b0idcode != be32_to_cpu(AD_MAGIC)) -- return -1; -+ return 1; - if (blkid_probe_sprintf_version(pr, "%u", ad->resver) != 0) -- return -1; -+ return 1; - if (blkid_probe_set_magic(pr, off, sizeof(ad->b0idcode), - (unsigned char *) &ad->b0idcode)) -- return -1; -+ return 1; - return 0; - } - -diff --git a/libblkid/src/superblocks/bcache.c b/libblkid/src/superblocks/bcache.c -index 303f7ee..a8f8fa6 100644 ---- a/libblkid/src/superblocks/bcache.c -+++ b/libblkid/src/superblocks/bcache.c -@@ -104,7 +104,7 @@ static int probe_bcache (blkid_probe pr, const struct blkid_idmag *mag) - - bcs = blkid_probe_get_sb(pr, mag, struct bcache_super_block); - if (!bcs) -- return -1; -+ return errno ? -1 : 1; - - if (le64_to_cpu(bcs->offset) != BCACHE_SB_OFF / 512) - return 1; -@@ -112,7 +112,7 @@ static int probe_bcache (blkid_probe pr, const struct blkid_idmag *mag) - return 1; - - if (blkid_probe_set_uuid(pr, bcs->uuid) < 0) -- return -1; -+ return 1; - - return 0; - }; -diff --git a/libblkid/src/superblocks/befs.c b/libblkid/src/superblocks/befs.c -index 452da1e..4bb260d 100644 ---- a/libblkid/src/superblocks/befs.c -+++ b/libblkid/src/superblocks/befs.c -@@ -264,7 +264,7 @@ static int64_t get_key_value(blkid_probe pr, const struct befs_super_block *bs, - bh = (struct bplustree_header *) get_tree_node(pr, bs, &bi->data, 0, - sizeof(struct bplustree_header), fs_le); - if (!bh) -- return -1; -+ return errno ? -1 : 1; - - if ((int32_t) FS32_TO_CPU(bh->magic, fs_le) != BPLUSTREE_MAGIC) - return -1; -@@ -275,7 +275,7 @@ static int64_t get_key_value(blkid_probe pr, const struct befs_super_block *bs, - bn = (struct bplustree_node *) get_tree_node(pr, bs, &bi->data, - node_pointer, FS32_TO_CPU(bh->node_size, fs_le), fs_le); - if (!bn) -- return -1; -+ return errno ? -1 : 1; - - keylengths = (uint16_t *) ((uint8_t *) bn - + ((sizeof(struct bplustree_node) -@@ -336,10 +336,10 @@ static int get_uuid(blkid_probe pr, const struct befs_super_block *bs, - - bi = (struct befs_inode *) get_block_run(pr, bs, &bs->root_dir, fs_le); - if (!bi) -- return -1; -+ return errno ? -1 : 1; - - if (FS32_TO_CPU(bi->magic1, fs_le) != INODE_MAGIC1) -- return -1; -+ return 1; - - sd = (struct small_data *) bi->small_data; - -@@ -376,10 +376,10 @@ static int get_uuid(blkid_probe pr, const struct befs_super_block *bs, - bi = (struct befs_inode *) get_block_run(pr, bs, - &bi->attributes, fs_le); - if (!bi) -- return -1; -+ return errno ? -1 : 1; - - if (FS32_TO_CPU(bi->magic1, fs_le) != INODE_MAGIC1) -- return -1; -+ return 1; - - value = get_key_value(pr, bs, bi, KEY_NAME, fs_le); - -@@ -390,10 +390,10 @@ static int get_uuid(blkid_probe pr, const struct befs_super_block *bs, - value << FS32_TO_CPU(bs->block_shift, fs_le), - FS32_TO_CPU(bs->block_size, fs_le)); - if (!bi) -- return -1; -+ return errno ? -1 : 1; - - if (FS32_TO_CPU(bi->magic1, fs_le) != INODE_MAGIC1) -- return -1; -+ return 1; - - if (FS32_TO_CPU(bi->type, fs_le) == B_UINT64_TYPE - && FS64_TO_CPU(bi->data.size, fs_le) == KEY_SIZE -@@ -404,7 +404,7 @@ static int get_uuid(blkid_probe pr, const struct befs_super_block *bs, - attr_data = (uint64_t *) get_block_run(pr, bs, - &bi->data.direct[0], fs_le); - if (!attr_data) -- return -1; -+ return errno ? -1 : 1; - - *uuid = *attr_data; - } -@@ -424,7 +424,7 @@ static int probe_befs(blkid_probe pr, const struct blkid_idmag *mag) - mag->sboff - B_OS_NAME_LENGTH, - sizeof(struct befs_super_block)); - if (!bs) -- return -1; -+ return errno ? -1 : 1; - - if (le32_to_cpu(bs->magic1) == SUPER_BLOCK_MAGIC1 - && le32_to_cpu(bs->magic2) == SUPER_BLOCK_MAGIC2 -@@ -439,11 +439,11 @@ static int probe_befs(blkid_probe pr, const struct blkid_idmag *mag) - fs_le = 0; - version = "big-endian"; - } else -- return -1; -+ return 1; - - ret = get_uuid(pr, bs, &volume_id, fs_le); - -- if (ret < 0) -+ if (ret != 0) - return ret; - - /* -diff --git a/libblkid/src/superblocks/btrfs.c b/libblkid/src/superblocks/btrfs.c -index 034683b..3c5c151 100644 ---- a/libblkid/src/superblocks/btrfs.c -+++ b/libblkid/src/superblocks/btrfs.c -@@ -70,7 +70,7 @@ static int probe_btrfs(blkid_probe pr, const struct blkid_idmag *mag) - - bfs = blkid_probe_get_sb(pr, mag, struct btrfs_super_block); - if (!bfs) -- return -1; -+ return errno ? -1 : 1; - - if (*bfs->label) - blkid_probe_set_label(pr, -diff --git a/libblkid/src/superblocks/cramfs.c b/libblkid/src/superblocks/cramfs.c -index b58ed08..cb7273f 100644 ---- a/libblkid/src/superblocks/cramfs.c -+++ b/libblkid/src/superblocks/cramfs.c -@@ -40,7 +40,7 @@ static int probe_cramfs(blkid_probe pr, const struct blkid_idmag *mag) - - cs = blkid_probe_get_sb(pr, mag, struct cramfs_super); - if (!cs) -- return -1; -+ return errno ? -1 : 1; - - blkid_probe_set_label(pr, cs->name, sizeof(cs->name)); - return 0; -diff --git a/libblkid/src/superblocks/ddf_raid.c b/libblkid/src/superblocks/ddf_raid.c -index 24df421..90820f8 100644 ---- a/libblkid/src/superblocks/ddf_raid.c -+++ b/libblkid/src/superblocks/ddf_raid.c -@@ -81,7 +81,7 @@ static int probe_ddf(blkid_probe pr, - uint64_t off, lba; - - if (pr->size < 0x30000) -- return -1; -+ return 1; - - for (i = 0; i < ARRAY_SIZE(hdrs); i++) { - off = ((pr->size / 0x200) - hdrs[i]) * 0x200; -@@ -90,8 +90,7 @@ static int probe_ddf(blkid_probe pr, - off, - sizeof(struct ddf_header)); - if (!ddf) -- return -1; -- -+ return errno ? -1 : 1; - if (ddf->signature == cpu_to_be32(DDF_MAGIC) || - ddf->signature == cpu_to_le32(DDF_MAGIC)) - break; -@@ -99,7 +98,7 @@ static int probe_ddf(blkid_probe pr, - } - - if (!ddf) -- return -1; -+ return 1; - - lba = ddf->signature == cpu_to_be32(DDF_MAGIC) ? - be64_to_cpu(ddf->primary_lba) : -@@ -111,8 +110,12 @@ static int probe_ddf(blkid_probe pr, - - buf = blkid_probe_get_buffer(pr, - lba << 9, sizeof(ddf->signature)); -- if (!buf || memcmp(buf, &ddf->signature, 4)) -- return -1; -+ if (!buf) { -+ if (errno) -+ return -1; -+ if (memcmp(buf, &ddf->signature, 4)) -+ return 1; -+ } - } - - blkid_probe_strncpy_uuid(pr, ddf->guid, sizeof(ddf->guid)); -@@ -121,11 +124,11 @@ static int probe_ddf(blkid_probe pr, - *(version + sizeof(ddf->ddf_rev)) = '\0'; - - if (blkid_probe_set_version(pr, version) != 0) -- return -1; -+ return 1; - if (blkid_probe_set_magic(pr, off, - sizeof(ddf->signature), - (unsigned char *) &ddf->signature)) -- return -1; -+ return 1; - return 0; - } - -diff --git a/libblkid/src/superblocks/drbd.c b/libblkid/src/superblocks/drbd.c -index 43e544e..d8309da 100644 ---- a/libblkid/src/superblocks/drbd.c -+++ b/libblkid/src/superblocks/drbd.c -@@ -75,18 +75,18 @@ static int probe_drbd(blkid_probe pr, - - /* Small devices cannot be drbd (?) */ - if (pr->size < 0x10000) -- return -1; -+ return 1; - - md = (struct md_on_disk_08 *) - blkid_probe_get_buffer(pr, - off, - sizeof(struct md_on_disk_08)); - if (!md) -- return -1; -+ return errno ? -1 : 1; - - if (be32_to_cpu(md->magic) != DRBD_MD_MAGIC_08 && - be32_to_cpu(md->magic) != DRBD_MD_MAGIC_84_UNCLEAN) -- return -1; -+ return 1; - - /* - * DRBD does not have "real" uuids; the following resembles DRBD's -@@ -102,7 +102,7 @@ static int probe_drbd(blkid_probe pr, - off + offsetof(struct md_on_disk_08, magic), - sizeof(md->magic), - (unsigned char *) &md->magic)) -- return -1; -+ return 1; - - return 0; - } -diff --git a/libblkid/src/superblocks/drbdproxy_datalog.c b/libblkid/src/superblocks/drbdproxy_datalog.c -index afe4725..2b76fe4 100644 ---- a/libblkid/src/superblocks/drbdproxy_datalog.c -+++ b/libblkid/src/superblocks/drbdproxy_datalog.c -@@ -33,7 +33,7 @@ static int probe_drbdproxy_datalog(blkid_probe pr, - - lh = (struct log_header_t *) blkid_probe_get_buffer(pr, 0, sizeof(*lh)); - if (!lh) -- return -1; -+ return errno ? -1 : 1; - - blkid_probe_set_uuid(pr, lh->uuid); - blkid_probe_sprintf_version(pr, "v%jd", le64_to_cpu(lh->version)); -diff --git a/libblkid/src/superblocks/exfat.c b/libblkid/src/superblocks/exfat.c -index 215c671..e684875 100644 ---- a/libblkid/src/superblocks/exfat.c -+++ b/libblkid/src/superblocks/exfat.c -@@ -115,12 +115,14 @@ static int probe_exfat(blkid_probe pr, const struct blkid_idmag *mag) - - sb = blkid_probe_get_sb(pr, mag, struct exfat_super_block); - if (!sb) -- return -1; -+ return errno ? -1 : 1; - - label = find_label(pr, sb); - if (label) - blkid_probe_set_utf8label(pr, label->name, - min(label->length * 2, 30), BLKID_ENC_UTF16LE); -+ else if (errno) -+ return -1; - - blkid_probe_sprintf_uuid(pr, sb->volume_serial, 4, - "%02hhX%02hhX-%02hhX%02hhX", -diff --git a/libblkid/src/superblocks/ext.c b/libblkid/src/superblocks/ext.c -index 8d57cb5..0b391c7 100644 ---- a/libblkid/src/superblocks/ext.c -+++ b/libblkid/src/superblocks/ext.c -@@ -328,9 +328,9 @@ static int probe_jbd(blkid_probe pr, - - es = ext_get_super(pr, NULL, &fi, NULL); - if (!es) -- return -BLKID_ERR_PARAM; -+ return errno ? -1 : 1; - if (!(fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)) -- return -BLKID_ERR_PARAM; -+ return 1; - - ext_get_info(pr, 2, es); - blkid_probe_set_uuid_as(pr, es->s_uuid, "LOGUUID"); -@@ -346,16 +346,16 @@ static int probe_ext2(blkid_probe pr, - - es = ext_get_super(pr, &fc, &fi, &frc); - if (!es) -- return -BLKID_ERR_PARAM; -+ return errno ? -1 : 1; - - /* Distinguish between ext3 and ext2 */ - if (fc & EXT3_FEATURE_COMPAT_HAS_JOURNAL) -- return -BLKID_ERR_PARAM; -+ return 1; - - /* Any features which ext2 doesn't understand */ - if ((frc & EXT2_FEATURE_RO_COMPAT_UNSUPPORTED) || - (fi & EXT2_FEATURE_INCOMPAT_UNSUPPORTED)) -- return -BLKID_ERR_PARAM; -+ return 1; - - /* - * If ext2 is not present, but ext4 or ext4dev are, then -@@ -364,7 +364,7 @@ static int probe_ext2(blkid_probe pr, - if (!system_supports_ext2() && - (system_supports_ext4() || system_supports_ext4dev()) && - system_supports_ext4_ext2()) -- return -BLKID_ERR_PARAM; -+ return 1; - - ext_get_info(pr, 2, es); - return 0; -@@ -378,16 +378,16 @@ static int probe_ext3(blkid_probe pr, - - es = ext_get_super(pr, &fc, &fi, &frc); - if (!es) -- return -BLKID_ERR_PARAM; -+ return errno ? -1 : 1; - - /* ext3 requires journal */ - if (!(fc & EXT3_FEATURE_COMPAT_HAS_JOURNAL)) -- return -BLKID_ERR_PARAM; -+ return 1; - - /* Any features which ext3 doesn't understand */ - if ((frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) || - (fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) -- return -BLKID_ERR_PARAM; -+ return 1; - - ext_get_info(pr, 3, es); - return 0; -@@ -402,11 +402,11 @@ static int probe_ext4dev(blkid_probe pr, - - es = ext_get_super(pr, &fc, &fi, &frc); - if (!es) -- return -BLKID_ERR_PARAM; -+ return errno ? -1 : 1; - - /* Distinguish from jbd */ - if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) -- return -BLKID_ERR_PARAM; -+ return 1; - - /* - * If the filesystem does not have a journal and ext2 and ext4 -@@ -431,9 +431,9 @@ static int probe_ext4dev(blkid_probe pr, - */ - if (le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS) { - if (!system_supports_ext4dev() && system_supports_ext4()) -- return -BLKID_ERR_PARAM; -+ return 1; - } else -- return -BLKID_ERR_PARAM; -+ return 1; - - force_ext4dev: - ext_get_info(pr, 4, es); -@@ -448,11 +448,11 @@ static int probe_ext4(blkid_probe pr, - - es = ext_get_super(pr, &fc, &fi, &frc); - if (!es) -- return -1; -+ return errno ? -1 : 1; - - /* Distinguish from jbd */ - if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) -- return -BLKID_ERR_PARAM; -+ return 1; - - /* - * If the filesystem does not have a journal and ext2 is not -@@ -467,7 +467,7 @@ static int probe_ext4(blkid_probe pr, - /* Ext4 has at least one feature which ext3 doesn't understand */ - if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) && - !(fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) -- return -BLKID_ERR_PARAM; -+ return 1; - - force_ext4: - /* -@@ -482,7 +482,7 @@ force_ext4: - */ - if (le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS) { - if (system_supports_ext4dev() || !system_supports_ext4()) -- return -BLKID_ERR_PARAM; -+ return 1; - } - - ext_get_info(pr, 4, es); -diff --git a/libblkid/src/superblocks/f2fs.c b/libblkid/src/superblocks/f2fs.c -index 1543a7a..e798952 100644 ---- a/libblkid/src/superblocks/f2fs.c -+++ b/libblkid/src/superblocks/f2fs.c -@@ -62,7 +62,7 @@ static int probe_f2fs(blkid_probe pr, const struct blkid_idmag *mag) - - sb = blkid_probe_get_sb(pr, mag, struct f2fs_super_block); - if (!sb) -- return -1; -+ return errno ? -1 : 1; - - major = le16_to_cpu(sb->major_ver); - minor = le16_to_cpu(sb->minor_ver); -diff --git a/libblkid/src/superblocks/gfs.c b/libblkid/src/superblocks/gfs.c -index b2c0163..1ca74a5 100644 ---- a/libblkid/src/superblocks/gfs.c -+++ b/libblkid/src/superblocks/gfs.c -@@ -64,7 +64,7 @@ static int probe_gfs(blkid_probe pr, const struct blkid_idmag *mag) - - sbd = blkid_probe_get_sb(pr, mag, struct gfs2_sb); - if (!sbd) -- return -1; -+ return errno ? -1 : 1; - - if (be32_to_cpu(sbd->sb_fs_format) == GFS_FORMAT_FS && - be32_to_cpu(sbd->sb_multihost_format) == GFS_FORMAT_MULTI) -@@ -78,7 +78,7 @@ static int probe_gfs(blkid_probe pr, const struct blkid_idmag *mag) - return 0; - } - -- return -1; -+ return 1; - } - - static int probe_gfs2(blkid_probe pr, const struct blkid_idmag *mag) -@@ -87,7 +87,7 @@ static int probe_gfs2(blkid_probe pr, const struct blkid_idmag *mag) - - sbd = blkid_probe_get_sb(pr, mag, struct gfs2_sb); - if (!sbd) -- return -1; -+ return errno ? -1 : 1; - - if (be32_to_cpu(sbd->sb_fs_format) == GFS2_FORMAT_FS && - be32_to_cpu(sbd->sb_multihost_format) == GFS2_FORMAT_MULTI) -@@ -100,7 +100,7 @@ static int probe_gfs2(blkid_probe pr, const struct blkid_idmag *mag) - blkid_probe_set_version(pr, "1"); - return 0; - } -- return -1; -+ return 1; - } - - const struct blkid_idinfo gfs_idinfo = -diff --git a/libblkid/src/superblocks/hfs.c b/libblkid/src/superblocks/hfs.c -index 6d960e9..c04b176 100644 ---- a/libblkid/src/superblocks/hfs.c -+++ b/libblkid/src/superblocks/hfs.c -@@ -154,7 +154,7 @@ static int probe_hfs(blkid_probe pr, const struct blkid_idmag *mag) - - hfs = blkid_probe_get_sb(pr, mag, struct hfs_mdb); - if (!hfs) -- return -1; -+ return errno ? -1 : 1; - - if ((memcmp(hfs->embed_sig, "H+", 2) == 0) || - (memcmp(hfs->embed_sig, "HX", 2) == 0)) -@@ -193,7 +193,7 @@ static int probe_hfsplus(blkid_probe pr, const struct blkid_idmag *mag) - - sbd = blkid_probe_get_sb(pr, mag, struct hfs_mdb); - if (!sbd) -- return -1; -+ return errno ? -1 : 1; - - /* Check for a HFS+ volume embedded in a HFS volume */ - if (memcmp(sbd->signature, "BD", 2) == 0) { -@@ -218,7 +218,7 @@ static int probe_hfsplus(blkid_probe pr, const struct blkid_idmag *mag) - struct hfsplus_vol_header); - - if (!hfsplus) -- return -1; -+ return errno ? -1 : 1; - - if ((memcmp(hfsplus->signature, "H+", 2) != 0) && - (memcmp(hfsplus->signature, "HX", 2) != 0)) -@@ -228,7 +228,7 @@ static int probe_hfsplus(blkid_probe pr, const struct blkid_idmag *mag) - - blocksize = be32_to_cpu(hfsplus->blocksize); - if (blocksize < HFSPLUS_SECTOR_SIZE) -- return -1; -+ return 1; - - memcpy(extents, hfsplus->cat_file.extents, sizeof(extents)); - cat_block = be32_to_cpu(extents[0].start_block); -@@ -236,7 +236,7 @@ static int probe_hfsplus(blkid_probe pr, const struct blkid_idmag *mag) - buf = blkid_probe_get_buffer(pr, - off + ((blkid_loff_t) cat_block * blocksize), 0x2000); - if (!buf) -- return 0; -+ return errno ? -1 : 0; - - bnode = (struct hfsplus_bheader_record *) - &buf[sizeof(struct hfsplus_bnode_descriptor)]; -@@ -271,7 +271,7 @@ static int probe_hfsplus(blkid_probe pr, const struct blkid_idmag *mag) - (blkid_loff_t) off + leaf_off, - leaf_node_size); - if (!buf) -- return 0; -+ return errno ? -1 : 0; - - descr = (struct hfsplus_bnode_descriptor *) buf; - record_count = be16_to_cpu(descr->num_recs); -diff --git a/libblkid/src/superblocks/highpoint_raid.c b/libblkid/src/superblocks/highpoint_raid.c -index 0b41344..1e242d8 100644 ---- a/libblkid/src/superblocks/highpoint_raid.c -+++ b/libblkid/src/superblocks/highpoint_raid.c -@@ -30,9 +30,9 @@ static int probe_highpoint45x(blkid_probe pr, - uint32_t magic; - - if (pr->size < 0x10000) -- return -1; -+ return 1; - if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) -- return -1; -+ return 1; - - off = ((pr->size / 0x200) - 11) * 0x200; - hpt = (struct hpt45x_metadata *) -@@ -40,13 +40,13 @@ static int probe_highpoint45x(blkid_probe pr, - off, - sizeof(struct hpt45x_metadata)); - if (!hpt) -- return -1; -+ return errno ? -1 : 1; - magic = le32_to_cpu(hpt->magic); - if (magic != HPT45X_MAGIC_OK && magic != HPT45X_MAGIC_BAD) -- return -1; -+ return 1; - if (blkid_probe_set_magic(pr, off, sizeof(hpt->magic), - (unsigned char *) &hpt->magic)) -- return -1; -+ return 1; - return 0; - } - -@@ -54,7 +54,7 @@ static int probe_highpoint37x(blkid_probe pr, - const struct blkid_idmag *mag __attribute__((__unused__))) - { - if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) -- return -1; -+ return 1; - return 0; - } - -diff --git a/libblkid/src/superblocks/hpfs.c b/libblkid/src/superblocks/hpfs.c -index f9b851a..48a0192 100644 ---- a/libblkid/src/superblocks/hpfs.c -+++ b/libblkid/src/superblocks/hpfs.c -@@ -68,7 +68,7 @@ static int probe_hpfs(blkid_probe pr, const struct blkid_idmag *mag) - /* super block */ - hs = blkid_probe_get_sb(pr, mag, struct hpfs_super_block); - if (!hs) -- return -1; -+ return errno ? -1 : 1; - version = hs->version; - - /* spare super block */ -@@ -77,9 +77,9 @@ static int probe_hpfs(blkid_probe pr, const struct blkid_idmag *mag) - HPFS_SBSPARE_OFFSET, - sizeof(struct hpfs_spare_super)); - if (!hss) -- return -1; -+ return errno ? -1 : 1; - if (memcmp(hss->magic, "\x49\x18\x91\xf9", 4) != 0) -- return -1; -+ return 1; - - /* boot block (with UUID and LABEL) */ - hbb = (struct hpfs_boot_block *) -@@ -87,7 +87,7 @@ static int probe_hpfs(blkid_probe pr, const struct blkid_idmag *mag) - 0, - sizeof(struct hpfs_boot_block)); - if (!hbb) -- return -1; -+ return errno ? -1 : 1; - if (memcmp(hbb->magic, "\x55\xaa", 2) == 0 && - memcmp(hbb->sig_hpfs, "HPFS", 4) == 0 && - hbb->sig_28h == 0x28) { -diff --git a/libblkid/src/superblocks/iso9660.c b/libblkid/src/superblocks/iso9660.c -index 148587b..911fcc0 100644 ---- a/libblkid/src/superblocks/iso9660.c -+++ b/libblkid/src/superblocks/iso9660.c -@@ -100,7 +100,7 @@ static int probe_iso9660_hsfs(blkid_probe pr, const struct blkid_idmag *mag) - - iso = blkid_probe_get_sb(pr, mag, struct high_sierra_volume_descriptor); - if (!iso) -- return -1; -+ return errno ? -1 : 1; - - blkid_probe_set_version(pr, "High Sierra"); - blkid_probe_set_label(pr, iso->volume_id, sizeof(iso->volume_id)); -@@ -178,7 +178,7 @@ int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag) - - iso = blkid_probe_get_sb(pr, mag, struct iso_volume_descriptor); - if (!iso) -- return -1; -+ return errno ? -1 : 1; - - memcpy(label, iso->volume_id, sizeof(label)); - -diff --git a/libblkid/src/superblocks/isw_raid.c b/libblkid/src/superblocks/isw_raid.c -index 755c1b6..4491cda 100644 ---- a/libblkid/src/superblocks/isw_raid.c -+++ b/libblkid/src/superblocks/isw_raid.c -@@ -33,9 +33,9 @@ static int probe_iswraid(blkid_probe pr, - struct isw_metadata *isw; - - if (pr->size < 0x10000) -- return -1; -+ return 1; - if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) -- return -1; -+ return 1; - - off = ((pr->size / 0x200) - 2) * 0x200; - isw = (struct isw_metadata *) -@@ -43,15 +43,16 @@ static int probe_iswraid(blkid_probe pr, - off, - sizeof(struct isw_metadata)); - if (!isw) -- return -1; -+ return errno ? -1 : 1; -+ - if (memcmp(isw->sig, ISW_SIGNATURE, sizeof(ISW_SIGNATURE)-1) != 0) -- return -1; -+ return 1; - if (blkid_probe_sprintf_version(pr, "%6s", - &isw->sig[sizeof(ISW_SIGNATURE)-1]) != 0) -- return -1; -+ return 1; - if (blkid_probe_set_magic(pr, off, sizeof(isw->sig), - (unsigned char *) isw->sig)) -- return -1; -+ return 1; - return 0; - } - -diff --git a/libblkid/src/superblocks/jfs.c b/libblkid/src/superblocks/jfs.c -index 78c018c..6f1bf1c 100644 ---- a/libblkid/src/superblocks/jfs.c -+++ b/libblkid/src/superblocks/jfs.c -@@ -40,7 +40,7 @@ static int probe_jfs(blkid_probe pr, const struct blkid_idmag *mag) - - js = blkid_probe_get_sb(pr, mag, struct jfs_super_block); - if (!js) -- return -1; -+ return errno ? -1 : 1; - if (le32_to_cpu(js->js_bsize) != (1U << le16_to_cpu(js->js_l2bsize))) - return 1; - if (le32_to_cpu(js->js_pbsize) != (1U << le16_to_cpu(js->js_l2pbsize))) -diff --git a/libblkid/src/superblocks/jmicron_raid.c b/libblkid/src/superblocks/jmicron_raid.c -index c708078..60ee187 100644 ---- a/libblkid/src/superblocks/jmicron_raid.c -+++ b/libblkid/src/superblocks/jmicron_raid.c -@@ -32,9 +32,9 @@ static int probe_jmraid(blkid_probe pr, - struct jm_metadata *jm; - - if (pr->size < 0x10000) -- return -1; -+ return 1; - if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) -- return -1; -+ return 1; - - off = ((pr->size / 0x200) - 1) * 0x200; - jm = (struct jm_metadata *) -@@ -42,15 +42,16 @@ static int probe_jmraid(blkid_probe pr, - off, - sizeof(struct jm_metadata)); - if (!jm) -- return -1; -+ return errno ? -1 : 1; -+ - if (memcmp(jm->signature, JM_SIGNATURE, sizeof(JM_SIGNATURE) - 1) != 0) -- return -1; -+ return 1; - if (blkid_probe_sprintf_version(pr, "%u.%u", - jm->major_version, jm->minor_version) != 0) -- return -1; -+ return 1; - if (blkid_probe_set_magic(pr, off, sizeof(jm->signature), - (unsigned char *) jm->signature)) -- return -1; -+ return 1; - return 0; - } - -diff --git a/libblkid/src/superblocks/linux_raid.c b/libblkid/src/superblocks/linux_raid.c -index a3f9d67..2c36b6e 100644 ---- a/libblkid/src/superblocks/linux_raid.c -+++ b/libblkid/src/superblocks/linux_raid.c -@@ -110,13 +110,13 @@ static int probe_raid0(blkid_probe pr, blkid_loff_t off) - uint64_t size; - - if (pr->size < MD_RESERVED_BYTES) -- return -1; -+ return 1; - mdp0 = (struct mdp0_super_block *) - blkid_probe_get_buffer(pr, - off, - sizeof(struct mdp0_super_block)); - if (!mdp0) -- return -1; -+ return errno ? -1 : 1; - - memset(uuid.ints, 0, sizeof(uuid.ints)); - -@@ -173,12 +173,12 @@ static int probe_raid0(blkid_probe pr, blkid_loff_t off) - } - - if (blkid_probe_sprintf_version(pr, "%u.%u.%u", ma, mi, pa) != 0) -- return -1; -+ return 1; - if (blkid_probe_set_uuid(pr, (unsigned char *) uuid.bytes) != 0) -- return -1; -+ return 1; - if (blkid_probe_set_magic(pr, off, sizeof(mdp0->md_magic), - (unsigned char *) &mdp0->md_magic)) -- return -1; -+ return 1; - return 0; - } - -@@ -191,24 +191,24 @@ static int probe_raid1(blkid_probe pr, off_t off) - off, - sizeof(struct mdp1_super_block)); - if (!mdp1) -- return -1; -+ return errno ? -1 : 1; - if (le32_to_cpu(mdp1->magic) != MD_SB_MAGIC) -- return -1; -+ return 1; - if (le32_to_cpu(mdp1->major_version) != 1U) -- return -1; -+ return 1; - if (le64_to_cpu(mdp1->super_offset) != (uint64_t) off >> 9) -- return -1; -+ return 1; - if (blkid_probe_set_uuid(pr, (unsigned char *) mdp1->set_uuid) != 0) -- return -1; -+ return 1; - if (blkid_probe_set_uuid_as(pr, - (unsigned char *) mdp1->device_uuid, "UUID_SUB") != 0) -- return -1; -+ return 1; - if (blkid_probe_set_label(pr, mdp1->set_name, - sizeof(mdp1->set_name)) != 0) -- return -1; -+ return 1; - if (blkid_probe_set_magic(pr, off, sizeof(mdp1->magic), - (unsigned char *) &mdp1->magic)) -- return -1; -+ return 1; - return 0; - } - -@@ -216,23 +216,31 @@ int probe_raid(blkid_probe pr, - const struct blkid_idmag *mag __attribute__((__unused__))) - { - const char *ver = NULL; -+ int ret; - - if (pr->size > MD_RESERVED_BYTES) { - /* version 0 at the end of the device */ - uint64_t sboff = (pr->size & ~(MD_RESERVED_BYTES - 1)) -- - MD_RESERVED_BYTES; -- if (probe_raid0(pr, sboff) == 0) -- return 0; -+ - MD_RESERVED_BYTES; -+ ret = probe_raid0(pr, sboff); -+ if (ret < 1) -+ return ret; - - /* version 1.0 at the end of the device */ - sboff = (pr->size & ~(0x1000 - 1)) - 0x2000; -- if (probe_raid1(pr, sboff) == 0) -+ ret = probe_raid1(pr, sboff); -+ if (ret < 0) -+ return ret; -+ if (ret == 0) - ver = "1.0"; - } - - if (!ver) { - /* version 1.1 at the start of the device */ -- if (probe_raid1(pr, 0) == 0) -+ ret = probe_raid1(pr, 0); -+ if (ret < 0) -+ return ret; -+ if (ret == 0) - ver = "1.1"; - - /* version 1.2 at 4k offset from the start */ -@@ -244,7 +252,7 @@ int probe_raid(blkid_probe pr, - blkid_probe_set_version(pr, ver); - return 0; - } -- return -1; -+ return 1; - } - - -diff --git a/libblkid/src/superblocks/lsi_raid.c b/libblkid/src/superblocks/lsi_raid.c -index 56721dd..5bfbe15 100644 ---- a/libblkid/src/superblocks/lsi_raid.c -+++ b/libblkid/src/superblocks/lsi_raid.c -@@ -30,9 +30,9 @@ static int probe_lsiraid(blkid_probe pr, - struct lsi_metadata *lsi; - - if (pr->size < 0x10000) -- return -1; -+ return 1; - if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) -- return -1; -+ return 1; - - off = ((pr->size / 0x200) - 1) * 0x200; - lsi = (struct lsi_metadata *) -@@ -40,13 +40,13 @@ static int probe_lsiraid(blkid_probe pr, - off, - sizeof(struct lsi_metadata)); - if (!lsi) -- return -1; -+ return errno ? -1 : 1; - - if (memcmp(lsi->sig, LSI_SIGNATURE, sizeof(LSI_SIGNATURE)-1) != 0) -- return -1; -+ return 1; - if (blkid_probe_set_magic(pr, off, sizeof(lsi->sig), - (unsigned char *) lsi->sig)) -- return -1; -+ return 1; - return 0; - } - -diff --git a/libblkid/src/superblocks/luks.c b/libblkid/src/superblocks/luks.c -index f716e31..420eaa0 100644 ---- a/libblkid/src/superblocks/luks.c -+++ b/libblkid/src/superblocks/luks.c -@@ -45,7 +45,7 @@ static int probe_luks(blkid_probe pr, const struct blkid_idmag *mag) - - header = blkid_probe_get_sb(pr, mag, struct luks_phdr); - if (header == NULL) -- return -1; -+ return errno ? -1 : 1; - - blkid_probe_strncpy_uuid(pr, (unsigned char *) header->uuid, - sizeof(header->uuid)); -diff --git a/libblkid/src/superblocks/lvm.c b/libblkid/src/superblocks/lvm.c -index 65c7c35..d956beb 100644 ---- a/libblkid/src/superblocks/lvm.c -+++ b/libblkid/src/superblocks/lvm.c -@@ -82,7 +82,7 @@ static int probe_lvm2(blkid_probe pr, const struct blkid_idmag *mag) - mag->kboff << 10, - 512 + sizeof(struct lvm2_pv_label_header)); - if (!buf) -- return -1; -+ return errno ? -1 : 1; - - /* buf is at 0k or 1k offset; find label inside */ - if (memcmp(buf, "LABELONE", 8) == 0) { -@@ -128,7 +128,7 @@ static int probe_lvm1(blkid_probe pr, const struct blkid_idmag *mag) - - label = blkid_probe_get_sb(pr, mag, struct lvm1_pv_label_header); - if (!label) -- return -1; -+ return errno ? -1 : 1; - - version = le16_to_cpu(label->version); - if (version != 1 && version != 2) -@@ -163,7 +163,7 @@ static int probe_verity(blkid_probe pr, const struct blkid_idmag *mag) - - sb = blkid_probe_get_sb(pr, mag, struct verity_sb); - if (sb == NULL) -- return -1; -+ return errno ? -1 : 1; - - version = le32_to_cpu(sb->version); - if (version != 1) -diff --git a/libblkid/src/superblocks/minix.c b/libblkid/src/superblocks/minix.c -index 0e7cd93..3aa236a 100644 ---- a/libblkid/src/superblocks/minix.c -+++ b/libblkid/src/superblocks/minix.c -@@ -80,17 +80,17 @@ static int probe_minix(blkid_probe pr, const struct blkid_idmag *mag) - max(sizeof(struct minix_super_block), - sizeof(struct minix3_super_block))); - if (!data) -- return -1; -+ return errno ? -1 : 1; - version = get_minix_version(data, &swabme); - if (version < 1) -- return -1; -+ return 1; - - if (version <= 2) { - struct minix_super_block *sb = (struct minix_super_block *) data; - int zones, ninodes, imaps, zmaps, firstz; - - if (sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0) -- return -1; -+ return 1; - - zones = version == 2 ? minix_swab32(swabme, sb->s_zones) : - minix_swab16(swabme, sb->s_nzones); -@@ -101,15 +101,15 @@ static int probe_minix(blkid_probe pr, const struct blkid_idmag *mag) - - /* sanity checks to be sure that the FS is really minix */ - if (imaps * MINIX_BLOCK_SIZE * 8 < ninodes + 1) -- return -1; -+ return 1; - if (zmaps * MINIX_BLOCK_SIZE * 8 < zones - firstz + 1) -- return -1; -+ return 1; - - } else if (version == 3) { - struct minix3_super_block *sb = (struct minix3_super_block *) data; - - if (sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0) -- return -1; -+ return 1; - } - - /* unfortunately, some parts of ext3 is sometimes possible to -@@ -117,8 +117,10 @@ static int probe_minix(blkid_probe pr, const struct blkid_idmag *mag) - * string. (For extN magic string and offsets see ext.c.) - */ - ext = blkid_probe_get_buffer(pr, 0x400 + 0x38, 2); -- if (ext && memcmp(ext, "\123\357", 2) == 0) -- return -1; -+ if (!ext) -+ return errno ? -1 : 1; -+ else if (memcmp(ext, "\123\357", 2) == 0) -+ return 1; - - blkid_probe_sprintf_version(pr, "%d", version); - return 0; -diff --git a/libblkid/src/superblocks/netware.c b/libblkid/src/superblocks/netware.c -index 7ef2162..9e2801b 100644 ---- a/libblkid/src/superblocks/netware.c -+++ b/libblkid/src/superblocks/netware.c -@@ -71,7 +71,7 @@ static int probe_netware(blkid_probe pr, const struct blkid_idmag *mag) - - nw = blkid_probe_get_sb(pr, mag, struct netware_super_block); - if (!nw) -- return -1; -+ return errno ? -1 : 1; - - blkid_probe_set_uuid(pr, nw->SBH_PoolID); - -diff --git a/libblkid/src/superblocks/nilfs.c b/libblkid/src/superblocks/nilfs.c -index 24ccf63..41c5066 100644 ---- a/libblkid/src/superblocks/nilfs.c -+++ b/libblkid/src/superblocks/nilfs.c -@@ -93,12 +93,12 @@ static int probe_nilfs2(blkid_probe pr, const struct blkid_idmag *mag) - sbp = (struct nilfs_super_block *) blkid_probe_get_buffer( - pr, NILFS_SB_OFFSET, sizeof(struct nilfs_super_block)); - if (!sbp) -- return -1; -+ return errno ? -1 : 1; - /* backup */ - sbb = (struct nilfs_super_block *) blkid_probe_get_buffer( - pr, ((pr->size / 0x200) - 8) * 0x200, sizeof(struct nilfs_super_block)); - if (!sbp) -- return -1; -+ return errno ? -1 : 1; - - /* - * Compare two super blocks and set 1 in swp if the secondary -diff --git a/libblkid/src/superblocks/ntfs.c b/libblkid/src/superblocks/ntfs.c -index d767cb4..3f62bbc 100644 ---- a/libblkid/src/superblocks/ntfs.c -+++ b/libblkid/src/superblocks/ntfs.c -@@ -91,7 +91,7 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag) - - ns = blkid_probe_get_sb(pr, mag, struct ntfs_super_block); - if (!ns) -- return -1; -+ return errno ? -1 : 1; - - /* - * Check bios parameters block -@@ -158,7 +158,7 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag) - - buf_mft = blkid_probe_get_buffer(pr, off, mft_record_size); - if (!buf_mft) -- return 1; -+ return errno ? -1 : 1; - - if (memcmp(buf_mft, "FILE", 4)) - return 1; -@@ -167,7 +167,7 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag) - - buf_mft = blkid_probe_get_buffer(pr, off, mft_record_size); - if (!buf_mft) -- return 1; -+ return errno ? -1 : 1; - - if (memcmp(buf_mft, "FILE", 4)) - return 1; -diff --git a/libblkid/src/superblocks/nvidia_raid.c b/libblkid/src/superblocks/nvidia_raid.c -index dd86cdc..54038e7 100644 ---- a/libblkid/src/superblocks/nvidia_raid.c -+++ b/libblkid/src/superblocks/nvidia_raid.c -@@ -32,9 +32,9 @@ static int probe_nvraid(blkid_probe pr, - struct nv_metadata *nv; - - if (pr->size < 0x10000) -- return -1; -+ return 1; - if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) -- return -1; -+ return 1; - - off = ((pr->size / 0x200) - 2) * 0x200; - nv = (struct nv_metadata *) -@@ -42,15 +42,15 @@ static int probe_nvraid(blkid_probe pr, - off, - sizeof(struct nv_metadata)); - if (!nv) -- return -1; -+ return errno ? -1 : 1; - - if (memcmp(nv->vendor, NVIDIA_SIGNATURE, sizeof(NVIDIA_SIGNATURE)-1) != 0) -- return -1; -+ return 1; - if (blkid_probe_sprintf_version(pr, "%u", le16_to_cpu(nv->version)) != 0) -- return -1; -+ return 1; - if (blkid_probe_set_magic(pr, off, sizeof(nv->vendor), - (unsigned char *) nv->vendor)) -- return -1; -+ return 1; - return 0; - } - -diff --git a/libblkid/src/superblocks/ocfs.c b/libblkid/src/superblocks/ocfs.c -index 82170ac..f537db4 100644 ---- a/libblkid/src/superblocks/ocfs.c -+++ b/libblkid/src/superblocks/ocfs.c -@@ -109,14 +109,14 @@ static int probe_ocfs(blkid_probe pr, const struct blkid_idmag *mag) - buf = blkid_probe_get_buffer(pr, mag->kboff << 10, - sizeof(struct ocfs_volume_header)); - if (!buf) -- return -1; -+ return errno ? -1 : 1; - memcpy(&ovh, buf, sizeof(ovh)); - - /* label */ - buf = blkid_probe_get_buffer(pr, (mag->kboff << 10) + 512, - sizeof(struct ocfs_volume_label)); - if (!buf) -- return -1; -+ return errno ? -1 : 1; - memcpy(&ovl, buf, sizeof(ovl)); - - maj = ocfsmajor(ovh); -@@ -144,7 +144,7 @@ static int probe_ocfs2(blkid_probe pr, const struct blkid_idmag *mag) - - osb = blkid_probe_get_sb(pr, mag, struct ocfs2_super_block); - if (!osb) -- return -1; -+ return errno ? -1 : 1; - - blkid_probe_set_label(pr, (unsigned char *) osb->s_label, sizeof(osb->s_label)); - blkid_probe_set_uuid(pr, osb->s_uuid); -@@ -162,7 +162,7 @@ static int probe_oracleasm(blkid_probe pr, const struct blkid_idmag *mag) - - dl = blkid_probe_get_sb(pr, mag, struct oracle_asm_disk_label); - if (!dl) -- return -1; -+ return errno ? -1 : 1; - - blkid_probe_set_label(pr, (unsigned char *) dl->dl_id, sizeof(dl->dl_id)); - return 0; -diff --git a/libblkid/src/superblocks/promise_raid.c b/libblkid/src/superblocks/promise_raid.c -index 01e4e37..d56560c 100644 ---- a/libblkid/src/superblocks/promise_raid.c -+++ b/libblkid/src/superblocks/promise_raid.c -@@ -33,9 +33,9 @@ static int probe_pdcraid(blkid_probe pr, - }; - - if (pr->size < 0x40000) -- return -1; -+ return 1; - if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) -- return -1; -+ return 1; - - for (i = 0; sectors[i] != 0; i++) { - uint64_t off; -@@ -47,18 +47,18 @@ static int probe_pdcraid(blkid_probe pr, - off, - sizeof(struct promise_metadata)); - if (!pdc) -- return -1; -+ return errno ? -1 : 1; - - if (memcmp(pdc->sig, PDC_SIGNATURE, - sizeof(PDC_SIGNATURE) - 1) == 0) { - - if (blkid_probe_set_magic(pr, off, sizeof(pdc->sig), - (unsigned char *) pdc->sig)) -- return -1; -+ return 1; - return 0; - } - } -- return -1; -+ return 1; - } - - const struct blkid_idinfo pdcraid_idinfo = { -diff --git a/libblkid/src/superblocks/reiserfs.c b/libblkid/src/superblocks/reiserfs.c -index 152571f..247891a 100644 ---- a/libblkid/src/superblocks/reiserfs.c -+++ b/libblkid/src/superblocks/reiserfs.c -@@ -45,17 +45,17 @@ static int probe_reiser(blkid_probe pr, const struct blkid_idmag *mag) - - rs = blkid_probe_get_sb(pr, mag, struct reiserfs_super_block); - if (!rs) -- return -1; -+ return errno ? -1 : 1; - - blocksize = le16_to_cpu(rs->rs_blocksize); - - /* The blocksize must be at least 512B */ - if ((blocksize >> 9) == 0) -- return -BLKID_ERR_PARAM; -+ return 1; - - /* If the superblock is inside the journal, we have the wrong one */ - if (mag->kboff / (blocksize >> 9) > le32_to_cpu(rs->rs_journal_block) / 2) -- return -BLKID_ERR_BIG; -+ return 1; - - /* LABEL/UUID are only valid for later versions of Reiserfs v3.6. */ - if (mag->magic[6] == '2' || mag->magic[6] == '3') { -@@ -82,7 +82,7 @@ static int probe_reiser4(blkid_probe pr, const struct blkid_idmag *mag) - - rs4 = blkid_probe_get_sb(pr, mag, struct reiser4_super_block); - if (!rs4) -- return -1; -+ return errno ? -1 : 1; - - if (*rs4->rs4_label) - blkid_probe_set_label(pr, rs4->rs4_label, sizeof(rs4->rs4_label)); -diff --git a/libblkid/src/superblocks/romfs.c b/libblkid/src/superblocks/romfs.c -index 91ef996..6f339c0 100644 ---- a/libblkid/src/superblocks/romfs.c -+++ b/libblkid/src/superblocks/romfs.c -@@ -29,7 +29,7 @@ static int probe_romfs(blkid_probe pr, const struct blkid_idmag *mag) - - ros = blkid_probe_get_sb(pr, mag, struct romfs_super_block); - if (!ros) -- return -1; -+ return errno ? -1 : 1; - - if (strlen((char *) ros->ros_volume)) - blkid_probe_set_label(pr, ros->ros_volume, -diff --git a/libblkid/src/superblocks/silicon_raid.c b/libblkid/src/superblocks/silicon_raid.c -index 10a3023..e38606c 100644 ---- a/libblkid/src/superblocks/silicon_raid.c -+++ b/libblkid/src/superblocks/silicon_raid.c -@@ -88,9 +88,9 @@ static int probe_silraid(blkid_probe pr, - struct silicon_metadata *sil; - - if (pr->size < 0x10000) -- return -1; -+ return 1; - if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr)) -- return -1; -+ return 1; - - off = ((pr->size / 0x200) - 1) * 0x200; - -@@ -98,7 +98,7 @@ static int probe_silraid(blkid_probe pr, - blkid_probe_get_buffer(pr, off, - sizeof(struct silicon_metadata)); - if (!sil) -- return -1; -+ return errno ? -1 : 1; - - if (le32_to_cpu(sil->magic) != SILICON_MAGIC) - return 1; -@@ -110,13 +110,13 @@ static int probe_silraid(blkid_probe pr, - if (blkid_probe_sprintf_version(pr, "%u.%u", - le16_to_cpu(sil->major_ver), - le16_to_cpu(sil->minor_ver)) != 0) -- return -1; -+ return 1; - - if (blkid_probe_set_magic(pr, - off + offsetof(struct silicon_metadata, magic), - sizeof(sil->magic), - (unsigned char *) &sil->magic)) -- return -1; -+ return 1; - return 0; - } - -diff --git a/libblkid/src/superblocks/squashfs.c b/libblkid/src/superblocks/squashfs.c -index f8ac95e..6b2f1b1 100644 ---- a/libblkid/src/superblocks/squashfs.c -+++ b/libblkid/src/superblocks/squashfs.c -@@ -36,7 +36,7 @@ static int probe_squashfs(blkid_probe pr, const struct blkid_idmag *mag) - - sq = blkid_probe_get_sb(pr, mag, struct sqsh_super_block); - if (!sq) -- return -1; -+ return errno ? -1 : 1; - - major = le16_to_cpu(sq->s_major); - minor = le16_to_cpu(sq->s_minor); -@@ -56,7 +56,7 @@ static int probe_squashfs3(blkid_probe pr, const struct blkid_idmag *mag) - - sq = blkid_probe_get_sb(pr, mag, struct sqsh_super_block); - if (!sq) -- return -1; -+ return errno ? -1 : 1; - - if (strcmp(mag->magic, "sqsh") == 0) { - major = be16_to_cpu(sq->s_major); -@@ -67,7 +67,7 @@ static int probe_squashfs3(blkid_probe pr, const struct blkid_idmag *mag) - } - - if (major > 3) -- return -1; -+ return 1; - - blkid_probe_sprintf_version(pr, "%u.%u", major, minor); - -diff --git a/libblkid/src/superblocks/swap.c b/libblkid/src/superblocks/swap.c -index 4297a9c..2ea94d2 100644 ---- a/libblkid/src/superblocks/swap.c -+++ b/libblkid/src/superblocks/swap.c -@@ -44,27 +44,27 @@ static int swap_set_info(blkid_probe pr, const char *version) - hdr = (struct swap_header_v1_2 *) blkid_probe_get_buffer(pr, 1024, - sizeof(struct swap_header_v1_2)); - if (!hdr) -- return -1; -+ return errno ? -1 : 1; - - /* SWAPSPACE2 - check for wrong version or zeroed pagecount */ -- if (strcmp(version, "1") == 0) { -+ if (strcmp(version, "2") == 0) { - if (hdr->version != 1 && swab32(hdr->version) != 1) { - DBG(LOWPROBE, blkid_debug("incorrect swap version")); -- return -1; -+ return 1; - } - if (hdr->lastpage == 0) { - DBG(LOWPROBE, blkid_debug("not set last swap page")); -- return -1; -+ return 1; - } -- } -+ } - - /* arbitrary sanity check.. is there any garbage down there? */ - if (hdr->padding[32] == 0 && hdr->padding[33] == 0) { - if (hdr->volume[0] && blkid_probe_set_label(pr, hdr->volume, - sizeof(hdr->volume)) < 0) -- return -1; -+ return 1; - if (blkid_probe_set_uuid(pr, hdr->uuid) < 0) -- return -1; -+ return 1; - } - - blkid_probe_set_version(pr, version); -@@ -76,12 +76,12 @@ static int probe_swap(blkid_probe pr, const struct blkid_idmag *mag) - unsigned char *buf; - - if (!mag) -- return -1; -+ return 1; - - /* TuxOnIce keeps valid swap header at the end of the 1st page */ - buf = blkid_probe_get_buffer(pr, 0, TOI_MAGIC_STRLEN); - if (!buf) -- return -1; -+ return errno ? -1 : 1; - - if (memcmp(buf, TOI_MAGIC_STRING, TOI_MAGIC_STRLEN) == 0) - return 1; /* Ignore swap signature, it's TuxOnIce */ -@@ -94,13 +94,13 @@ static int probe_swap(blkid_probe pr, const struct blkid_idmag *mag) - } else if (!memcmp(mag->magic, "SWAPSPACE2", mag->len)) - return swap_set_info(pr, "1"); - -- return -1; -+ return 1; - } - - static int probe_swsuspend(blkid_probe pr, const struct blkid_idmag *mag) - { - if (!mag) -- return -1; -+ return 1; - if (!memcmp(mag->magic, "S1SUSPEND", mag->len)) - return swap_set_info(pr, "s1suspend"); - if (!memcmp(mag->magic, "S2SUSPEND", mag->len)) -@@ -112,7 +112,7 @@ static int probe_swsuspend(blkid_probe pr, const struct blkid_idmag *mag) - if (!memcmp(mag->magic, "LINHIB0001", mag->len)) - return swap_set_info(pr, "linhib0001"); - -- return -1; /* no signature detected */ -+ return 1; /* no signature detected */ - } - - const struct blkid_idinfo swap_idinfo = -diff --git a/libblkid/src/superblocks/sysv.c b/libblkid/src/superblocks/sysv.c -index 80b0cc5..528e8f9 100644 ---- a/libblkid/src/superblocks/sysv.c -+++ b/libblkid/src/superblocks/sysv.c -@@ -80,7 +80,7 @@ static int probe_xenix(blkid_probe pr, const struct blkid_idmag *mag) - - sb = blkid_probe_get_sb(pr, mag, struct xenix_super_block); - if (!sb) -- return -1; -+ return errno ? -1 : 1; - blkid_probe_set_label(pr, sb->s_fname, sizeof(sb->s_fname)); - return 0; - } -@@ -105,21 +105,21 @@ static int probe_sysv(blkid_probe pr, - off, - sizeof(struct sysv_super_block)); - if (!sb) -- return -1; -+ return errno ? -1 : 1; - - if (sb->s_magic == cpu_to_le32(0xfd187e20) || - sb->s_magic == cpu_to_be32(0xfd187e20)) { - - if (blkid_probe_set_label(pr, sb->s_fname, - sizeof(sb->s_fname))) -- return -1; -+ return 1; - - if (blkid_probe_set_magic(pr, - off + offsetof(struct sysv_super_block, - s_magic), - sizeof(sb->s_magic), - (unsigned char *) &sb->s_magic)) -- return -1; -+ return 1; - - return 0; - } -diff --git a/libblkid/src/superblocks/ubifs.c b/libblkid/src/superblocks/ubifs.c -index ef84f53..761f3db 100644 ---- a/libblkid/src/superblocks/ubifs.c -+++ b/libblkid/src/superblocks/ubifs.c -@@ -99,7 +99,7 @@ static int probe_ubifs(blkid_probe pr, const struct blkid_idmag *mag) - - sb = blkid_probe_get_sb(pr, mag, struct ubifs_sb_node); - if (!sb) -- return -1; -+ return errno ? -1 : 1; - - blkid_probe_set_uuid(pr, sb->uuid); - blkid_probe_sprintf_version(pr, "w%dr%d", -diff --git a/libblkid/src/superblocks/udf.c b/libblkid/src/superblocks/udf.c -index 8702dd0..e3b38c2 100644 ---- a/libblkid/src/superblocks/udf.c -+++ b/libblkid/src/superblocks/udf.c -@@ -85,11 +85,11 @@ static int probe_udf(blkid_probe pr, - UDF_VSD_OFFSET + b, - sizeof(*vsd)); - if (!vsd) -- return 1; -+ return errno ? -1 : 1; - if (vsd->id[0] != '\0') - goto nsr; - } -- return -1; -+ return 1; - - nsr: - /* search the list of VSDs for a NSR descriptor */ -@@ -99,15 +99,15 @@ nsr: - UDF_VSD_OFFSET + ((blkid_loff_t) b * 0x800), - sizeof(*vsd)); - if (!vsd) -- return -1; -+ return errno ? -1 : 1; - if (vsd->id[0] == '\0') -- return -1; -+ return 1; - if (memcmp(vsd->id, "NSR02", 5) == 0) - goto anchor; - if (memcmp(vsd->id, "NSR03", 5) == 0) - goto anchor; - } -- return -1; -+ return 1; - - anchor: - /* read Anchor Volume Descriptor (AVDP), checking block size */ -@@ -115,7 +115,7 @@ anchor: - vd = (struct volume_descriptor *) - blkid_probe_get_buffer(pr, 256 * pbs[i], sizeof(*vd)); - if (!vd) -- return -1; -+ return errno ? -1 : 1; - - type = le16_to_cpu(vd->tag.id); - if (type == 2) /* TAG_ID_AVDP */ -@@ -138,7 +138,7 @@ real_blksz: - (blkid_loff_t) (loc + b) * bs, - sizeof(*vd)); - if (!vd) -- return -1; -+ return errno ? -1 : 1; - } - - /* Try extract all possible ISO9660 information -- if there is -@@ -155,7 +155,7 @@ real_blksz: - (blkid_loff_t) (loc + b) * bs, - sizeof(*vd)); - if (!vd) -- return -1; -+ return errno ? -1 : 1; - type = le16_to_cpu(vd->tag.id); - if (type == 0) - break; -diff --git a/libblkid/src/superblocks/ufs.c b/libblkid/src/superblocks/ufs.c -index 673a528..999fd90 100644 ---- a/libblkid/src/superblocks/ufs.c -+++ b/libblkid/src/superblocks/ufs.c -@@ -185,7 +185,7 @@ static int probe_ufs(blkid_probe pr, - offsets[i] * 1024, - sizeof(struct ufs_super_block)); - if (!ufs) -- return -1; -+ return errno ? -1 : 1; - - magBE = be32_to_cpu(ufs->fs_magic); - magLE = le32_to_cpu(ufs->fs_magic); -@@ -231,7 +231,7 @@ found: - offsetof(struct ufs_super_block, fs_magic), - sizeof(ufs->fs_magic), - (unsigned char *) &ufs->fs_magic)) -- return -1; -+ return 1; - - return 0; - } -diff --git a/libblkid/src/superblocks/vfat.c b/libblkid/src/superblocks/vfat.c -index 8ff241b..3e278e7 100644 ---- a/libblkid/src/superblocks/vfat.c -+++ b/libblkid/src/superblocks/vfat.c -@@ -261,10 +261,10 @@ int blkid_probe_is_vfat(blkid_probe pr) - - ms = blkid_probe_get_sb(pr, mag, struct msdos_super_block); - if (!ms) -- return 0; -+ return errno ? -1 : 0; - vs = blkid_probe_get_sb(pr, mag, struct vfat_super_block); - if (!vs) -- return 0; -+ return errno ? -1 : 0; - - return fat_valid_superblock(mag, ms, vs, NULL, NULL); - } -@@ -283,10 +283,12 @@ static int probe_vfat(blkid_probe pr, const struct blkid_idmag *mag) - - ms = blkid_probe_get_sb(pr, mag, struct msdos_super_block); - if (!ms) -- return 0; -+ return errno ? -1 : 1; -+ - vs = blkid_probe_get_sb(pr, mag, struct vfat_super_block); - if (!vs) -- return 0; -+ return errno ? -1 : 1; -+ - if (!fat_valid_superblock(mag, ms, vs, &cluster_count, &fat_size)) - return 1; - -@@ -376,16 +378,16 @@ static int probe_vfat(blkid_probe pr, const struct blkid_idmag *mag) - (blkid_loff_t) fsinfo_sect * sector_size, - sizeof(struct fat32_fsinfo)); - if (buf == NULL) -- return -1; -+ return errno ? -1 : 1; - - fsinfo = (struct fat32_fsinfo *) buf; - if (memcmp(fsinfo->signature1, "\x52\x52\x61\x41", 4) != 0 && - memcmp(fsinfo->signature1, "\x52\x52\x64\x41", 4) != 0 && - memcmp(fsinfo->signature1, "\x00\x00\x00\x00", 4) != 0) -- return -1; -+ return 1; - if (memcmp(fsinfo->signature2, "\x72\x72\x41\x61", 4) != 0 && - memcmp(fsinfo->signature2, "\x00\x00\x00\x00", 4) != 0) -- return -1; -+ return 1; - } - } - -diff --git a/libblkid/src/superblocks/via_raid.c b/libblkid/src/superblocks/via_raid.c -index 5c15167..ff7a965 100644 ---- a/libblkid/src/superblocks/via_raid.c -+++ b/libblkid/src/superblocks/via_raid.c -@@ -63,7 +63,7 @@ static int probe_viaraid(blkid_probe pr, - off, - sizeof(struct via_metadata)); - if (!v) -- return -1; -+ return errno ? -1 : 1; - - if (le16_to_cpu(v->signature) != VIA_SIGNATURE) - return 1; -@@ -73,11 +73,11 @@ static int probe_viaraid(blkid_probe pr, - return 1; - - if (blkid_probe_sprintf_version(pr, "%u", v->version_number) != 0) -- return -1; -+ return 1; - if (blkid_probe_set_magic(pr, off, - sizeof(v->signature), - (unsigned char *) &v->signature)) -- return -1; -+ return 1; - return 0; - } - -diff --git a/libblkid/src/superblocks/vmfs.c b/libblkid/src/superblocks/vmfs.c -index ead09a8..27d0888 100644 ---- a/libblkid/src/superblocks/vmfs.c -+++ b/libblkid/src/superblocks/vmfs.c -@@ -28,7 +28,7 @@ static int probe_vmfs_fs(blkid_probe pr, const struct blkid_idmag *mag) - - header = blkid_probe_get_sb(pr, mag, struct vmfs_fs_info); - if (header == NULL) -- return -1; -+ return errno ? -1 : 1; - - blkid_probe_sprintf_uuid(pr, (unsigned char *) header->uuid, 16, - "%02x%02x%02x%02x-%02x%02x%02x%02x-" -@@ -53,7 +53,7 @@ static int probe_vmfs_volume(blkid_probe pr, const struct blkid_idmag *mag) - - header = blkid_probe_get_sb(pr, mag, struct vmfs_volume_info); - if (header == NULL) -- return -1; -+ return errno ? -1 : 1; - - blkid_probe_sprintf_value(pr, "UUID_SUB", - "%02x%02x%02x%02x-%02x%02x%02x%02x-" -diff --git a/libblkid/src/superblocks/vxfs.c b/libblkid/src/superblocks/vxfs.c -index fdab85a..4537560 100644 ---- a/libblkid/src/superblocks/vxfs.c -+++ b/libblkid/src/superblocks/vxfs.c -@@ -20,7 +20,7 @@ static int probe_vxfs(blkid_probe pr, const struct blkid_idmag *mag) - - vxs = blkid_probe_get_sb(pr, mag, struct vxfs_super_block); - if (!vxs) -- return -1; -+ return errno ? -1 : 1; - - blkid_probe_sprintf_version(pr, "%u", (unsigned int) vxs->vs_version); - return 0; -diff --git a/libblkid/src/superblocks/xfs.c b/libblkid/src/superblocks/xfs.c -index f4bb721..58a985d 100644 ---- a/libblkid/src/superblocks/xfs.c -+++ b/libblkid/src/superblocks/xfs.c -@@ -164,7 +164,7 @@ static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag) - - xs = blkid_probe_get_sb(pr, mag, struct xfs_super_block); - if (!xs) -- return -1; -+ return errno ? -1 : 1; - - if (!xfs_verify_sb(xs)) - return 1; -@@ -249,7 +249,7 @@ static int probe_xfs_log(blkid_probe pr, const struct blkid_idmag *mag) - - buf = blkid_probe_get_buffer(pr, 0, 256*1024); - if (!buf) -- return -1; -+ return errno ? -1 : 1; - - if (memcmp(buf, "XFSB", 4) == 0) - return 1; /* this is regular XFS, ignore */ -@@ -264,7 +264,7 @@ static int probe_xfs_log(blkid_probe pr, const struct blkid_idmag *mag) - } - } - -- return -1; -+ return 1; - } - - const struct blkid_idinfo xfs_log_idinfo = -diff --git a/libblkid/src/superblocks/zfs.c b/libblkid/src/superblocks/zfs.c -index fb86aec..d28786b 100644 ---- a/libblkid/src/superblocks/zfs.c -+++ b/libblkid/src/superblocks/zfs.c -@@ -185,7 +185,7 @@ static int probe_zfs(blkid_probe pr, - blkid_probe_get_buffer(pr, offset, - sizeof(struct zfs_uberblock)); - if (ub == NULL) -- return -1; -+ return errno ? -1 : 1; - - if (ub->ub_magic == UBERBLOCK_MAGIC) { - ub_offset = offset; -@@ -202,7 +202,7 @@ static int probe_zfs(blkid_probe pr, - } - - if (found < 4) -- return -1; -+ return 1; - - /* If we found the 4th uberblock, then we will have exited from the - * scanning loop immediately, and ub will be a valid uberblock. */ -@@ -214,7 +214,7 @@ static int probe_zfs(blkid_probe pr, - if (blkid_probe_set_magic(pr, ub_offset, - sizeof(ub->ub_magic), - (unsigned char *) &ub->ub_magic)) -- return -1; -+ return 1; - - return 0; - } --- -1.8.4.5 - diff --git a/blkid-stop-scanning-on-I-O-error.patch b/blkid-stop-scanning-on-I-O-error.patch deleted file mode 100644 index f34927a..0000000 --- a/blkid-stop-scanning-on-I-O-error.patch +++ /dev/null @@ -1,138 +0,0 @@ -From 65245d440656a8df4352f9a5b9ec047bf4b6a663 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Tue, 21 Jan 2014 09:16:46 +0100 -Subject: [PATCH] blkid: stop scanning on I/O error - -Whenever we fail to read from a device it's pointless to -continue with probing; we should be failing immediately. -Otherwise the system will continue logging I/O errors. - -This patch updates the probe functions to return -1 -on error and 1 if not found. - -Signed-off-by: Hannes Reinecke ---- - libblkid/src/partitions/partitions.c | 13 +++++++++---- - libblkid/src/probe.c | 13 +++++++++++-- - libblkid/src/superblocks/superblocks.c | 13 ++++++++++--- - 3 files changed, 30 insertions(+), 9 deletions(-) - -diff --git a/libblkid/src/partitions/partitions.c b/libblkid/src/partitions/partitions.c -index 6c915d9..98baece 100644 ---- a/libblkid/src/partitions/partitions.c -+++ b/libblkid/src/partitions/partitions.c -@@ -540,7 +540,8 @@ static int idinfo_probe(blkid_probe pr, const struct blkid_idinfo *id, - if (pr->size <= 0 || (id->minsz && id->minsz > pr->size)) - goto nothing; /* the device is too small */ - -- if (blkid_probe_get_idmag(pr, id, &off, &mag)) -+ rc = blkid_probe_get_idmag(pr, id, &off, &mag); -+ if (rc != 0) - goto nothing; - - /* final check by probing function */ -@@ -548,12 +549,13 @@ static int idinfo_probe(blkid_probe pr, const struct blkid_idinfo *id, - DBG(LOWPROBE, blkid_debug( - "%s: ---> call probefunc()", id->name)); - rc = id->probefunc(pr, mag); -- if (rc == -1) { -+ if (rc != 0) { - /* reset after error */ - reset_partlist(blkid_probe_get_partlist(pr)); - if (chn && !chn->binary) - blkid_probe_chain_reset_vals(pr, chn); -- DBG(LOWPROBE, blkid_debug("%s probefunc failed", id->name)); -+ DBG(LOWPROBE, blkid_debug("%s probefunc failed, rc %d", -+ id->name, rc)); - } - if (rc == 0 && mag && chn && !chn->binary) - rc = blkid_probe_set_magic(pr, off, mag->len, -@@ -599,7 +601,10 @@ static int partitions_probe(blkid_probe pr, struct blkid_chain *chn) - continue; - - /* apply checks from idinfo */ -- if (idinfo_probe(pr, idinfos[i], chn) != 0) -+ rc = idinfo_probe(pr, idinfos[i], chn); -+ if (rc < 0) -+ return rc; -+ if (rc > 0) - continue; - - name = idinfos[i]->name; -diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c -index 4b0c997..452c743 100644 ---- a/libblkid/src/probe.c -+++ b/libblkid/src/probe.c -@@ -569,13 +569,17 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr, - if (!bf) { - ssize_t ret; - -- if (blkid_llseek(pr->fd, pr->off + off, SEEK_SET) < 0) -+ if (blkid_llseek(pr->fd, pr->off + off, SEEK_SET) < 0) { -+ errno = 0; - return NULL; -+ } - - /* allocate info and space for data by why call */ - bf = calloc(1, sizeof(struct blkid_bufinfo) + len); -- if (!bf) -+ if (!bf) { -+ errno = 0; - return NULL; -+ } - - bf->data = ((unsigned char *) bf) + sizeof(struct blkid_bufinfo); - bf->len = len; -@@ -587,7 +591,10 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr, - - ret = read(pr->fd, bf->data, len); - if (ret != (ssize_t) len) { -+ DBG(LOWPROBE, blkid_debug("\tbuffer read: return %d error %d", ret, errno)); - free(bf); -+ if (ret >= 0 || errno != EIO) -+ errno = 0; - return NULL; - } - list_add_tail(&bf->bufs, &pr->buffers); -@@ -794,6 +801,8 @@ int blkid_probe_get_idmag(blkid_probe pr, const struct blkid_idinfo *id, - off = (mag->kboff + (mag->sboff >> 10)) << 10; - buf = blkid_probe_get_buffer(pr, off, 1024); - -+ if (!buf && errno) -+ return -1; - if (buf && !memcmp(mag->magic, - buf + (mag->sboff & 0x3ff), mag->len)) { - DBG(LOWPROBE, blkid_debug("\tmagic sboff=%u, kboff=%ld", -diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c -index 565daf2..ad93b4e 100644 ---- a/libblkid/src/superblocks/superblocks.c -+++ b/libblkid/src/superblocks/superblocks.c -@@ -380,15 +380,22 @@ static int superblocks_probe(blkid_probe pr, struct blkid_chain *chn) - - DBG(LOWPROBE, blkid_debug("[%zd] %s:", i, id->name)); - -- if (blkid_probe_get_idmag(pr, id, &off, &mag)) -+ rc = blkid_probe_get_idmag(pr, id, &off, &mag); -+ if (rc < 0) -+ break; -+ if (rc > 0) - continue; - - /* final check by probing function */ - if (id->probefunc) { - DBG(LOWPROBE, blkid_debug("\tcall probefunc()")); -- if (id->probefunc(pr, mag) != 0) { -+ rc = id->probefunc(pr, mag); -+ if (rc != 0) { - blkid_probe_chain_reset_vals(pr, chn); -- continue; -+ if (rc < 0) -+ break; -+ else -+ continue; - } - } - --- -1.8.1.4 - diff --git a/pre_checkin.sh b/pre_checkin.sh new file mode 100644 index 0000000..4ed7c53 --- /dev/null +++ b/pre_checkin.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +if test util-linux.spec -ot python-libmount.spec ; then + echo "util-linux.spec is older than python-libmount.spec. Please merge changes manually and call pre-checkin.sh again." + exit 1 +fi +if test util-linux.changes -ot python-libmount.changes ; then + echo "util-linux.changes is older than python-libmount.changes. Please merge changes manually and call pre-checkin.sh again." + exit 1 +fi + +if test util-linux.spec -ot util-linux-systemd.spec ; then + echo "util-linux.spec is older than util-linux-systemd.spec. Please merge changes manually and call pre-checkin.sh again." + exit 1 +fi +if test util-linux.changes -ot util-linux-systemd.changes ; then + echo "util-linux.changes is older than util-linux-systemd.changes. Please merge changes manually and call pre-checkin.sh again." + exit 1 +fi + +sed ' + s/spec file for package util-linux/spec file for package python-libmount/; + /^Name:/s/util-linux/python-libmount/; +' python-libmount.spec + +sed ' + s/spec file for package util-linux/spec file for package util-linux-systemd/; + /^Name:/s/util-linux/util-linux-systemd/; +' util-linux-systemd.spec + +cp -a util-linux.changes python-libmount.changes + +cp -a util-linux.changes util-linux-systemd.changes + +touch util-linux.spec util-linux.changes diff --git a/python-libmount.changes b/python-libmount.changes new file mode 100644 index 0000000..2eaed7c --- /dev/null +++ b/python-libmount.changes @@ -0,0 +1,3997 @@ +------------------------------------------------------------------- +Fri Aug 8 22:17:29 CEST 2014 - sbrabec@suse.cz + +- Update to version 2.25 + (using work of Ruediger Meier ): + * based on the git master branch of util-linux + * many fixes (including bnc#869355, bnc#871951 and + bnc#871698#c49) + * new Python binding sub-package for libmount: python-libmount + * new library: libsmartcols + * new commands: lslogins, setpriv + * add fstrim systemd timer + * better systemd integration + * DROPPED command: + * cytune: Upstream decided to remove tool untested for years + that supports this old hardware. +- Dropped patches included in the upstream: + (*git) Included with no changes + (+git) Included with improvements + (!git) Included with differences + * support-other-tty-lines-not-vconsole.patch (*b9c7390) + * agetty-fooled-on-serial-line-due-plymouth.patch, + * sulogin-fooled-on-tty-line-due-plymouth.patch (*bb280f7) + * agetty-on-s390-on-dev-3270-tty1-line.patch (*f2bcda5) + * sulogin-does-not-find-any-console.patch (*624b204) + * util-linux-setarch-uname26.patch (*f6eb160) + * util-linux-ng-2.16-squashfs3-detect.patch (*11402f5) + * util-linux-lscpu-improve-hypervisor-detection.patch + (!b774473, b32488c, 5bd31c6, 0f0c558, 96ce475) + WARNING, INCOMPATIBLE CHANGE: "lscpu -p" no more reports + hypervisor, as it breaks standard behavior. Use standard output + instead! (FATE#310255) + * blkid-stop-scanning-on-I-O-error.patch (+296d96e) + * blkid-convert-superblocks-to-new-calling-convention.patch + (+37f4060) + * util-linux-libblkid-ext-probe.patch (*a1ca32f) + * util-linux-hwclock-drift-check.patch (*f196fd1) + * util-linux-hwclock-adjtime-check.patch (*db8fc5f) +- Dropped obsolete patch: + * util-linux-2.23.1-eject-fpie.patch (eject is no more SUID) + * util-linux-2.24-fdisk_remove_bogus_warnings.patch + (upstream fixed it in a different way) + * util-linux-HACK-boot.localfs.diff + (MOUNT_PRINT_SOURCE is no more referenced) +- Ported and renamed: + * util-linux-2.23.1-noenc-suse.diff + -> util-linux-noenc-suse.patch +- Split spec file to three stages: + * util-linux.spec: Everything that do not need python or systemd. + * util-linux-systemd.spec: Stuff that needs systemd: + util-linux-systemd and uuidd + NOTE: Not building systemd-less variants of utilities. + * python-libmount.spec: Just python-libmount +- Move bash-completion files to correct packages. +- Add patch util-linux-bash-completion-blockdev.patch. +- Add hacks to prevent damaging of spec files by format_spec_file + (bnc#891152, also edited util-linux-rpmlintrc). + +------------------------------------------------------------------- +Sat Jul 26 11:44:57 UTC 2014 - dimstar@opensuse.org + +- Really fix devel-static requires (libblkid-devel-static). + +------------------------------------------------------------------- +Sat Jul 26 09:39:30 UTC 2014 - coolo@suse.com + +- fix requires of devel-static packages + +------------------------------------------------------------------- +Thu Jul 24 18:45:53 CEST 2014 - dsterba@suse.cz + +- enable build of libmount-devel-static, libuuid-devel-static and + libblkid-devel-static + +------------------------------------------------------------------- +Tue May 27 21:17:40 UTC 2014 - sweet_f_a@gmx.de + +- use nologin from upstream (was added in 2.24) +- remove unknown configure options +- remove unused and outdated suse READMEs +- require bc for checks + +------------------------------------------------------------------- +Fri May 16 15:10:53 UTC 2014 - sweet_f_a@gmx.de + +- Prevent excessive clock drift calculations (bnc#871698, + util-linux-prevent-excessive-clock-drift-calculations.patch), + committed by sbrabec@suse.cz + +------------------------------------------------------------------- +Thu May 8 08:15:04 UTC 2014 - werner@suse.de + +- Modify patch support-other-tty-lines-not-vconsole.patch to + make it work on virtual console +- Modify patch agetty-on-s390-on-dev-3270-tty1-line.patch + to add the missed 3270 support upstream + +------------------------------------------------------------------- +Wed May 7 14:12:32 UTC 2014 - werner@suse.de + +- Add patch support-other-tty-lines-not-vconsole.patch + to be able to support console lines like xvc and hvc + +------------------------------------------------------------------- +Thu Apr 24 11:33:36 UTC 2014 - sweet_f_a@gmx.de + +- Update to util-linux-2.24.2: + addpart: + * minor man page improvements + blockdev: + * Some minor corrections to the manual + build-sys: + * don't connect _DEPENDENCIES and _LIBADD + * fix .h.in usage in libblkid and libmount + * libmount/python/__init__.py is always a dist file + chcpu: + * cleanup return codes + * cleanup stdout/stderr usage + delpart: + * minor man page improvements + dmesg: + * -w output not line-buffered + * don't report EPIPE + docs: + * update AUTHORS file + fallocate: + * Clarify that space can also be deallocated + fdformat: + * Some minor change to the manual + fdisk: + * don't colorize "foo " prefixes + flock: + * use nfs4 fallback on EBADF too + fsck: + * Some typographical corrections to the manual + fsck.minix: + * A few typographical corrections to the manual + fstrim: + * add hint to man page + getopt: + * getopt.1 The usual doc dir is /usr/share/doc, not .../docs + hwclock: + * fix possible hang and other set_hardware_clock_exact() issues + include/closestream: + * don't wipe errno on EPIPE + ipcs: + * cleanup jumplabel stlyes + * fix ipc_msg_get_info fallback case + * fix ipc_sem_get_info fallback case + * fix ipc_shm_get_info fallback case + * fix memleak in ipc_*_get_info functions + isosize: + * A few typographical changes to the manual + last: + * fix minor typos in the man page + lib/sysfs: + * make dirent d_type usage more robust + libblkid: + * add extra checks to XFS prober + libfdisk: + * fix logical partition reorder command + * make qsort_r() optional + * properly implement read-only mode + libmount: + * FS id and parent ID could be zero + * accept (deleted) path suffix in mountinfo file + * initialize *root to NULL in mnt_table_get_root_fs + login: + * fix minor typos in the man page + losetup: + * wait for udev + lscpu: + * cleanup, use _PATH_SYS_CPU/NODE + * don't abort if cache size is unknown + * don't assume filesystem supports d_type when searching for NUMA nodes + * read_hypervisor_dmi only fallback to memory scan on x86/x86_64 + mkfs: + * Some typographical changes to the manual + mkfs.bfs: + * One typographical correction to the manual + mkfs.cramfs: + * Some typographical corrections to the manual + mkfs.minix: + * Some typographical changes in the manual + mkswap: + * Some minor typographical corrections to the manual + more: + * improve formatting and wording of man page and help text + mount: + * apply "nofail" to MNT_ERR_NOSOURCE libmount error + * fix --all and nofail return code + * mount.8 Some typographical and prefix corrections to the manual + * remove obsolete and confusing statement from mount.8 + * update mount.8 about barrier mount options defaults + nologin: + * minor man page improvements + nsenter: + * fix set{gid,uid} order,drop supplementary groups + partx: + * Improve the typesetting of the manual + * make dirent d_type usage more robust + po: + * merge changes + * update cs.po (from translationproject.org) + * update da.po (from translationproject.org) + * update de.po (from translationproject.org) + raw: + * Improve the typesetting of the manual + renice: + * correct max priority in renice man page + runuser: + * fix minor typos in the man page + script: + * Also flush writes to timing file. + * time from end of read() call partially fixes #58 + scriptreplay: + * no need to skip first time value or last bytes fixes #58 + setarch: + * Fix ppc64le architectures + setpriv: + * Fix --apparmor-profile + su: + * don't use kill(0, ...) when propagate signal + * fix minor typos in the man page + sulogin: + * minor man page improvements + swaplabel: + * Improve the typesetting of the manual + * wrong version number in check + switch_root: + * make dirent d_type usage more robust + * verify initramfs by f_type, not devno + tests: + * add fdisk 'f' command MBR test + * add lscpu dump for ppc cpu with no cache size + * clean up backport + * cleanup, remove unused lscpu output + * update Py parse mountinfo test + * update libmount tabdiff tests + * use old output format + umount: + * fix typo in usage + * more robust success message for --all + unshare: + * include libmount.h to provide missing MS_* defines + utmpdump: + * minor man page improvements + vipw: + * minor man page improvements +- remove tty3270-on-serial-line-of-s390.patch (was already upstream + since 2.24.1) +- remove barrier_documentation.patch (applied upstream) +- rebase blkid-convert-superblocks-to-new-calling-convention.patch + +------------------------------------------------------------------- +Thu Apr 17 22:43:31 CEST 2014 - sbrabec@suse.cz + +- Enable socket activation needed by systemd service (bnc#872807). + +------------------------------------------------------------------- +Fri Apr 11 16:45:03 CEST 2014 - sbrabec@suse.cz + +- libblkid: Drop the broken ext2/ext3/ext4 discrimination logic + (util-linux-libblkid-ext-probe.patch, bnc#864703). + +------------------------------------------------------------------- +Fri Apr 11 16:27:11 CEST 2014 - hare@suse.de + +- Abort blkid probing on I/O errors (bnc#859062, + blkid-stop-scanning-on-I-O-error.patch, + blkid-convert-superblocks-to-new-calling-convention.patch, + http://www.spinics.net/lists/util-linux-ng/msg08976.html) + +------------------------------------------------------------------- +Tue Apr 1 18:49:26 UTC 2014 - sweet_f_a@gmx.de + +- remove unnecessarily added patches from SLE11: + * util-linux-update-default-commit-interval.patch, openSUSE has + never changed the default and neither will SLE12 + * sfdisk-warn-about-2TB-limit.patch, fixed by upstream years ago + * umount-avoid-readlink.patch, this patch only affects unused + code and the used code does not have this bug +- edit util-linux-lscpu-improve-hypervisor-detection.patch to not + change the default behaviour of "lscpu -p" as documented in it's + man page. Now this patch only affects the summary output. + +------------------------------------------------------------------- +Mon Mar 17 22:36:58 CET 2014 - sbrabec@suse.cz + +- Merge fixes and features from SLE11 (bnc#831868): + * Detect squashfs version <= 3 as squashfs3 and version >= 4 as + squashfs. (mszeredi@suse.cz, + util-linux-ng-2.16-squashfs3-detect.patch, bnc#666893) + * add sfdisk-warn-about-2TB-limit.patch (puzel@novell.com, + bnc#495657) + * Document barrier option in mount.8 (jack@suse.cz, + hvogel@suse.de, + util-linux-ng-2.19.1-barrier_documentation.patch, bnc#489740) + * lscpu: improve hypervisor detection (puzel@novell.com, + fate#310255) + - util-linux-lscpu-improve-hypervisor-detection.patch + * umount: avoid calling readlink on mountpoints if not necessary + - add: umount-avoid-readlink.patch (puzel@suse.com, bnc#794529) + * fix file conflict between util-linux and s390-32 + (puzel@suse.com, bnc#805684) + * util-linux-update-default-commit-interval.patch: + mount(8): update default commit interval (puzel@suse.com, + bnc#809480) + * Obsolete no more packaged uuid-runtime. +- Add uname26 (util-linux-setarch-uname26.patch, FATE#313476). + +------------------------------------------------------------------- +Thu Mar 6 09:43:34 UTC 2014 - werner@suse.de + +- Modify the patches + agetty-fooled-on-serial-line-due-plymouth.patch + sulogin-fooled-on-tty-line-due-plymouth.patch + to be able to disable plymouth if not already terminated due to + a hanging network service (bnc#866860) + +------------------------------------------------------------------- +Sun Feb 9 21:20:31 UTC 2014 - andreas.stieger@gmx.de + +- util-linux 2.24.1 +- agetty: + * support the special terminal on first serial line on a S/390 +- blkdiscard: + * BLKSSZGET fills in an int, not a uint64 +- blkid: + * escape quotes in the output + * simple typo +- blockdev: + * don't use HDIO_GETGEO +- build-sys: + * add --with-smack to config-gen.d + * fstrim depends on libmount +- chsh, chfn: + * add info about non-local support to the man pages +- dmesg: + * fix --raw zero timestamp for kmsg +- docs: + * add patching process to howto-contribute.txt + * update AUTHORS file + * update links to http //git.kernel.org/ web repository views + -fdisk: + * don't care about partition type + * fix printf stuff + * fix usage(), -l [] +- flock: + * Change the 'exit status' man page section to make more sense +- fsck: + * add ext4 to list of filesystems with progress bars in fsck man page +- fstrim: + * add --all to discard all filesystem + * cleanup usage() +- lib/path: + * add path_strdup() +- libblkid: + * (nilfs2) check also backup superblock + * detect alone PMBR + * fix memory leak in blkid_parse_tag_string() + * fix swap-area version +- libfdisk: + * (dos) be more verbose when change bootable flag + * (dos) fix free part counter + * (dos) warn on type 0 + * (gpt) add /home GUID + * (gpt) improve and cleanup recovery code + * (gpt) recover from corrupted primary/backup PT + * (sgi) generate partname according to partition position + * (sun) fix end sectors with +1 error +- libmount: + * add efivarfs to the list of pseudo filesystems + * add mnt_tag_is_valid() + * cleanup fix_optstr() regards to selinux and smack + * fix typo in smack path + * remove smackfs* option when SMACK not enabled +- lsblk: + * fix -D segfault +- lscpu: + * sort NUMA nodes to keep output human readable + * support discontinuous NUMA nodes + * support non sequentially numbering of CPUs +- man: + * Syntax and spelling fixes +- mkfs.minix: + * fix fscanf() format string [coverity scan] +- mkswap: + * fix compiler warning [-Wunused-variable] + * remove cruft from the man page +- mount: + * add note about "noauto" to --all description + * correct mount man page default iso9660 permission + * fix man mount page type + * improve -s man mage info + * make NAME=value tags usable for non-root + * mount.8 fix grammar + * update man page ext3/4 mount options +- partx: + * fix --update ranges and out of order tables +- po: + * merge changes + * update da.po (from translationproject.org) + * update de.po (from translationproject.org) + * update pt_BR.po (from translationproject.org) + * update zh_CN.po (from translationproject.org) +- pylibmount: + * correctly import from pylibmount.so + * import directly from pylibmount in tests + * remove unncessary subdirectory +- script: + * don't call TIOCGWINSZ in signal handler + * restore errno in signal handler + * use poll() rather then O_NONBLOCK +- setpriv: + * simplify usage() +- setterm: + * fix -dump man page info +- sulogin: + * use dirent->d_type when scans /dev +- taskset: + * fix PERMISSIONS section of taskset man page +- tests: + * update blkid swap tests + * update build-sys tests + * update lscpu tests +- textual: + * small inprovements to usage and man page of fstrim +- umount: + * fix umount by tag for non-roots +- unshare: + * add more hints about mount namespaces to the man page +- wipefs: + * call BLKRRPART when erase partition table +- removed patches: + * blkdiscard-BLKSSZGET-fills-in-an-int.patch, applied upstream +- modified patches: + * tty3270-on-serial-line-of-s390.patch, one hunk applied + upstream + +------------------------------------------------------------------ +Fri Feb 7 15:59:20 UTC 2014 - werner@suse.de + +- Add patch sulogin-does-not-find-any-console.patch to enable sulogin + to find suitable console device even if first is not usable (bnc#862078) + +------------------------------------------------------------------- +Thu Feb 6 10:03:30 UTC 2014 - werner@suse.de + +- Avoid that hanging plymouth locks terminal lines that is + add patch sulogin-fooled-on-tty-line-due-plymouth.patch and + modify patch agetty-fooled-on-serial-line-due-plymouth.patch + to remove any lock which had been left over. + +------------------------------------------------------------------- +Tue Feb 4 10:24:02 UTC 2014 - werner@suse.de + +- Modify patch agetty-on-s390-on-dev--3270-tty1-line.patch and + patch tty3270-on-serial-line-of-s390.patch to handle 3270 + terminals +- Really do not verify /usr/bin/eject + +------------------------------------------------------------------- +Mon Feb 3 16:16:36 UTC 2014 - werner@suse.de + +- Add patch agetty-on-s390-on-dev--3270-tty1-line.patch + to let agetty detect /dev/3270/tty1 as device not as baud rate + +------------------------------------------------------------------- +Tue Jan 28 09:37:57 UTC 2014 - speilicke@suse.com + +- Don't verify /usr/bin/eject, it lost the SUID bit and was dropped + from /etc/permissions (bnc#824406) + +------------------------------------------------------------------- +Thu Jan 23 12:40:06 UTC 2014 - werner@suse.de + +- Change patch agetty-fooled-on-serial-line-due-plymouth.patch + to sleep instead of sending breaks to terminal (bnc#774126). + +------------------------------------------------------------------- +Mon Jan 13 10:45:54 CET 2014 - fcrozat@suse.com + +- Ensure localstatedir value used by configure is /run (changed to that + value upstream since 2012). + +------------------------------------------------------------------- +Fri Jan 10 13:08:45 UTC 2014 - werner@suse.de + +- Add patch + agetty-fooled-on-serial-line-due-plymouth.patch + even with TTYReset=no it seems with systemd or plymouth the termios + flags become changed from under the first agetty on a serial system + console as the flags are locked (bnc#774126). + +------------------------------------------------------------------- +Tue Dec 10 16:10:27 UTC 2013 - sweet_f_a@gmx.de + +- Update to util-linux-2.24 + + Release highlights (2.24) + fdisk(8): + * the code has been completely refactored and moved to libfdisk + (the library does not have a stable API yet) + * user interface has been unified for all label types and it + supports colors + * GPT disk UUID, partition UUID and partition name modification + is supported now + pylibmount: + * this new library provides PYTHON BINDINGS for libmount; + use --with-python[=2|3] to enable the bindings + last(1) and lastb(1): + * the NEW IMPLEMENTATION has been merged from sysvinit to + util-linux and extended; now it supports command line options + --present, --since, and --time-format + * use --enable-deprecated-last to enable the old util-linux + last(1) implementation + swapon(8): + * the option --discard= and fstab mount option discard= allow + to explicitly specify 'pages' or 'once' discard policy. If no + policy is selected, the default behavior is to enable both. + See swapon.8 man page for more details. + libblkid and blkid(8): + * supports LOGUUID= for external logs (e.g. extN and XFS) + * generates a pseudo PARTUUID= for MBR partitions (based on MBR + Id, Linux kernel supports the same concept for root= command + line option) + agetty(8): + * supportes new issue file \S escape code to read information + from /etc/os-release + * the option -L allows to completely control CLOCAL flag + dmesg(1): + * supports new command line option --time-format to specify + time format + * supports new iso-8601 time format + hexdump(1): + * supports long options now + wall(1): + * the command is compatible with sysvinit implementation now + logger(1): + * supports new command line option --prio-prefix when logging + stdin + lscpu(1): + * allows to detect more hypervisor types and provides info + about Max and Min CPU Mhz + unshare(8): + * supports new command line options --fork and --mount-proc for + pid namespaces + wipefs(8): + * now wipes superblocks with incorrect checksums too + * supports new command line option --backup to backup erased + data to $HOME/wipefs--.bak + nologin(8): + * this command has been merged into util-linux, the command + politely refuses a login. +- Removed following patches now upstream + * eject-scsi-check-host_status-and-driver_status.patch + * more-fix-buffer-overflow.patch + * more-check-for-buffer-size-when-write-multibyte-char.patch + * more-guarantee-space-for-multibyte.patch +- Removed following patch because now pkg-config does that + * fdisk-tinfo.patch +- Refreshed following patches with updating version string + * util-linux-2.23.1-fdisk_remove_bogus_warnings.patch +- Added enable_last condition in case we don't want to use the last + binary from sysvinit-tools in future +- Upstream moved getopt examples from datadir to docdir but we keep + the old location because we would need to fix the manpage first. + +------------------------------------------------------------------- +Fri Nov 29 13:46:21 UTC 2013 - werner@suse.de + +- Add patch + tty3270-on-serial-line-of-s390.patch + to better support the first and second serial line on s390/x + +------------------------------------------------------------------- +Sun Nov 3 12:53:34 UTC 2013 - schwab@linux-m68k.org + +- blkdiscard-BLKSSZGET-fills-in-an-int.patch: Fix type mismatch in + blkdiscard + +------------------------------------------------------------------- +Fri Oct 25 18:52:01 CEST 2013 - sbrabec@suse.cz + +- Drop SUID flag for eject (bnc#824406). + +------------------------------------------------------------------- +Wed Oct 9 10:00:55 UTC 2013 - schwab@suse.de + +- No *fdisk on m68k + +------------------------------------------------------------------- +Wed Oct 2 18:55:22 CEST 2013 - sbrabec@suse.cz + +- Safely migrate su config files from coreutils to util-linux + (bnc#814626#c18). + +------------------------------------------------------------------- +Fri Sep 27 21:58:03 UTC 2013 - mgorse@suse.com + +- Add more-check-for-buffer-size-when-write-multibyte-char.patch and + more-guarantee-space-for-multibyte.patch -- check for buffer space with + multi-byte chars (BNC#829720). + +------------------------------------------------------------------- +Fri Sep 27 16:58:40 UTC 2013 - mgorse@suse.com + +- Add more-fix-buffer-overflow.patch (bnc#829720). + +------------------------------------------------------------------- +Fri Sep 13 07:06:19 UTC 2013 - werner@suse.de + +- Avoid build require gpg-offline twice + +------------------------------------------------------------------- +Wed Sep 11 20:54:24 CEST 2013 - sbrabec@suse.cz + +- Update to version 2.23.2: + nsenter(1): + * this NEW COMMAND provides command line interface to setns() + Linux syscall and allows to run program with namespaces of + other processes + unshare(1): + * supports new PID and USER namespaces + fdisk(8): + * provides experimental support for GUID Partition Table (GPT), + the implementation is still not complete and some (unimportant) + features are missing. + * ~50% of fdisk code has been refactored, this task is going to + be complete in the next release. The goal is to have libfdisk + shared between all fdisks. + partx(8): + * supports new "update" command (implemented by + BLKPG_RESIZE_PARTITION ioctl) + mount(8): + * supports new userspace mount option x-mount.mkdir[=] to + create mountpoints on demand + * the support for propagation flags has been improved, now the + flags could be specified in /etc/fstab and used together with + regular mount options. It's also possible to specify more + propagation flags together. This EXPERIMENTAL feature is + implemented by additional mount(2) syscalls, because Linux does + not allow to use propagation flags with another options or more + flags together. + umount(8): + * supports new command line option --recursive to recursively + unmount all sub-mounts for the specified mountpoint * supports + new command line option --all-targets to unmount all + mountpoints in the current namespace for the specified + filesystem * the options --recursive and --all-targets could be + used together + dmesg(1): + * supports new command line options --color, --human and + --nopager, the --human option enables relative times, colors and + pager support. + su(1): + * supports new command line options --group and --supp-group to + specify primary and supplementary groups + chfn(1) and chsh(1): + * the commands could be linked with libuser to support non-local + accounts modification (e.g. LDAP, etc). + kill(1): + * the command has been improved to be compatible with procps + version, the procps version is deprecated now, the util-linux + version is enabled by default. + blkdiscard(8): + * this NEW COMMAND discard sectors on a device (for example on + SSD disks) + sulogin(8): + * provides multi-console feature from SysVinit + findmnt(8): + * provides new columns FREQ, PASSNO, ID, OPT-FIELDS, PROPAGATION + lslocks(8): + * provides new column BLOCKER and detects blocked locks + lsblk(8): + * supports new command line option --scsi and new columns HCTL, + TRANsport VENDOR and REVision + swapon(8) and losetup(8): + * the commands prints basic overview by default if no option + specified + column(1): + * supports new command line option --output-separator to specify + table output delimiter + rename(1): + * supports new command line option --symlink to rename symlink + target + hwclock(8): + * supports new command line option --compare to periodically + compare the Hardware Clock to the System Time (based on + adjtimex -c) + ipcs(1): + * supports new command line options --bytes and --human + wipefs(1): + * supports new command line option --force to force erase on used + devices +- Removed upstreamed patches (mkfs.bfs_cleanup_64bit.patch-Patch, + mkfs.bfs_cleanup_endian.patch) + +------------------------------------------------------------------- +Mon Jul 1 13:43:23 UTC 2013 - mail@bernhard-voelker.de + +- Correct condition for Conflicts of sysvinit-tools. + +------------------------------------------------------------------- +Mon Jul 1 07:08:46 UTC 2013 - werner@suse.de + +- Correct version in source URL path. + +------------------------------------------------------------------- +Fri Jun 28 17:42:14 CEST 2013 - sbrabec@suse.cz + +- Fix Provides and Obsoletes of eject. +- Conflict with old coreutils and sysvinit-tools with conflicting + files to guarantee seamless upgrade. +- Remove Provides and Obsoletes of packages that do not exist since + SuSE Linux 8. +- Include upstreamed patch from SUSE eject package: + Check eject host_status and driver_status when using SG_IO + (eject-scsi-check-host_status-and-driver_status.patch, + bnc#358033). + +------------------------------------------------------------------- +Wed Jun 19 10:58:17 UTC 2013 - coolo@suse.com + +- rely on systemd-rpm-macros instead of the full thing + +------------------------------------------------------------------- +Wed Jun 12 21:02:28 UTC 2013 - mail@bernhard-voelker.de + +- util-linux.spec: remove previously added "moving-su-trickery" again + as a su-less coreutils packet is in Base:Build and Factory now. + +------------------------------------------------------------------- +Fri Jun 7 00:13:25 UTC 2013 - mail@bernhard-voelker.de + +- util-linux.spec: work around su(1) PAM problems based on su(1) + being provided by both the coreutils and the util-linux package. + Fix macro typo in %post and %verifyscript sections related to su(1): + s/sysvinit_tools/enable_su/ + +------------------------------------------------------------------- +Thu Jun 6 08:27:43 UTC 2013 - werner@suse.de + +- Add make-sure-sbin-resp-usr-sbin-are-in-PATH.diff, that is include + the old "let `su' handle /sbin and /usr/sbin in path" +- Provide the new eject utility to avoid file conflict with old + eject package + +------------------------------------------------------------------- +Wed Jun 5 12:30:45 UTC 2013 - werner@suse.de + +- Update to util-linux-2.23.1 + + Release highlights (2.22) + su(1): + * has been merged from coreutils into util-linux + * utils-linux version uses /etc/pam.d/su-l PAM config file for --login + (e.g. "su -") session. + sulogin(8): + * has been merged from sysvinit into util-linux + utmpdump(1): + * has been merged from sysvinit into util-linux + eject(1): + * has been merged from inactive upstream from sf.net and Fedora into util-linux + * supports new options --manualeject, --force and --no-partitions-unmount + lslocks(1) + * this NEW COMMAND prints local system locks and it's replacement to very + long time unmaintained lslk(1) + wdctl(8): + * this NEW COMMAND shows hardware watchdog status + libuuid: + * does NOT EXECUTE uuidd on demand, the daemon has to be started by + init scripts / systemd + uuidd: + * supports socket activation (for systemd) + * supports new options -no-fork, --no-pid and --socket-activation + + Release highlights (2.23) + blkdiscard(8): + * this NEW COMMAND discard sectors on a device (for example on SSD disks) + sulogin(8): + * provides multi-console feature from SysVinit +- Removed following patches now upstream + * 0001-Test-for-secure_getenv-too.patch + * 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch + * add-canonicalize_path_restricted.patch + * fdiskbsdlabel.patch + * libmount-add-MNT_ERR_LOOPDEV.patch + * libmount-add-special-MNT_ERR-codes.patch + * libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch + * login-close-tty-before-vhangup.patch + * mount-new-add-loopdev-specific-error-message.patch + * mount-new-allow-sloppy-for-non-root.patch + * mount-new-improve-error-messages.patch + * mount-new-use-MNT_ERR-for-error-messages.patch + * mount-sanitize-paths-from-non-root-users.patch + * util-linux-2.21.2-noenc.diff + * umount-sanitize-paths-from-non-root-users.patch +- Removed following patch which otherwise cause to break build + * util-linux-2.20-libmount-deps.patch +- Refreshed following patches with updating version string + * util-linux-2.23.1-fdisk_remove_bogus_warnings.patch + * util-linux-2.23.1-noenc-suse.diff +- Add util-linux-2.23.1-eject-fpie.patch to compile and link eject + with PIE + +------------------------------------------------------------------- +Wed May 29 11:45:04 UTC 2013 - ihno@suse.com + +- fixing mkfs.bfs to make it 64bit and endian clean. + adding the patches mkfs.bfs_cleanup_64bit.patch and + mkfs.bfs_cleanup_endian.patch + +------------------------------------------------------------------- +Sun Mar 17 20:39:47 UTC 2013 - jengelh@inai.de + +- Split "which", "time" and "adjtimex" off util-linux + +------------------------------------------------------------------- +Sat Feb 16 17:48:29 UTC 2013 - schwab@suse.de + +- fdiskbsdlabel.patch: + Fix fdisk compilation on aarch64 + +------------------------------------------------------------------- +Tue Feb 5 14:32:49 UTC 2013 - crrodriguez@opensuse.org + +- 0001-Test-for-secure_getenv-too.patch: + Current glibc in 12.3/factory no longer exports internal + function __secure_getenv() but has secure_getenv() instead. + +------------------------------------------------------------------- +Mon Jan 7 13:26:15 UTC 2013 - puzel@suse.com + +- add-canonicalize_path_restricted.patch, + mount-sanitize-paths-from-non-root-users.patch, + umount-sanitize-paths-from-non-root-users.patch: + prevent leaking information about existence of folders + (bnc#797002, CVE-2013-0157) + +------------------------------------------------------------------- +Fri Dec 28 04:30:58 UTC 2012 - crrodriguez@opensuse.org + +- 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch + Use OS byteswapping macros, this patch is functionally identical + to the version submitted upstream with the exception it excludes + code that target non-linux systems. + +------------------------------------------------------------------- +Wed Sep 19 19:41:10 UTC 2012 - jslaby@suse.com + +- login: close tty before vhangup (bnc#778842) + login-close-tty-before-vhangup.patch + +------------------------------------------------------------------- +Fri Jun 22 09:37:20 CEST 2012 - kukuk@suse.de + +- Remove pam_lastlog from login.pamd, login is doing it itself. + [bnc#768067] + +------------------------------------------------------------------- +Wed Jun 20 09:22:50 UTC 2012 - lnussel@suse.de + +- add a hack for boot.localfs to determine the devices to wait for + +------------------------------------------------------------------- +Fri Jun 15 12:57:06 UTC 2012 - puzel@suse.com + +- improve error messages from new mount (bnc#767208) + - backport patches from upstream git: + - mount-new-add-loopdev-specific-error-message.patch + - mount-new-use-MNT_ERR-for-error-messages.patch + - libmount-add-special-MNT_ERR-codes.patch + - mount-new-improve-error-messages.patch + - libmount-add-MNT_ERR_LOOPDEV.patch + +------------------------------------------------------------------- +Fri Jun 15 10:07:26 UTC 2012 - lnussel@suse.de + +- remove encryption options completely as upstream will do that as + well in the next release (bnc#748879). + +------------------------------------------------------------------- +Thu Jun 14 13:04:40 UTC 2012 - puzel@suse.com + +- fix automount with quota (rh#825836) + - mount-new-allow-sloppy-for-non-root.patch +- fix wrong mount options for CIFS mounts (bnc#766157) + - libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch + +------------------------------------------------------------------- +Thu May 31 10:04:23 UTC 2012 - sweet_f_a@gmx.de + +- require binutils-devel because "which" wants to find libiberty.a +- remove which-lib64.patch because it's broken and couldn't find + libiberty.a whithin /usr/lib64 +- which doesn't need autoreconf anymore + +------------------------------------------------------------------- +Tue May 29 09:28:55 UTC 2012 - puzel@suse.com + +- switch to new libmount-based mount(8) + +------------------------------------------------------------------- +Fri May 25 12:12:09 UTC 2012 - puzel@suse.com + +- update to util-linux-2.21.2 + - bugfix release +- drop sfdisk-fix-calculation-due-to-type-mismatch.patch + (fixed upstream) + +------------------------------------------------------------------- +Fri May 25 12:03:07 UTC 2012 - puzel@suse.com + +- build with RPM_OPT_FLAGS again (removed by mistake) + +------------------------------------------------------------------- +Thu Apr 12 09:09:05 UTC 2012 - puzel@suse.com + +- fix miscalculation in sfdisk on ix86 (bnc#754789) + - add sfdisk-fix-calculation-due-to-type-mismatch.patch + +------------------------------------------------------------------- +Sat Mar 31 11:09:38 UTC 2012 - puzel@suse.com + +- update to util-linux-2.21.1 + - bugfix release + +------------------------------------------------------------------- +Fri Mar 16 09:56:21 UTC 2012 - fcrozat@suse.com + +- Fix Obsoletes / Provides for login. + +------------------------------------------------------------------- +Tue Mar 13 16:38:34 CET 2012 - kukuk@suse.de + +- Enable /bin/login and obsolete old fork now merged back + (not moved to /usr/bin until all problems are solved to + avoid that root is not able to login). + +------------------------------------------------------------------- +Tue Mar 6 21:18:56 UTC 2012 - rschweikert@suse.com + +- keep binaries in /usr tree (UsrMerge project) + +------------------------------------------------------------------- +Tue Feb 21 13:46:25 UTC 2012 - puzel@suse.com + +- update to util-linux-2.21 + chcpu(8): + - new command + prlimit(1): + - new command + losetup(8): + - the command has been rewritten, features: + * supports 64bit ioctls only + * losetup -a does not require root permissions + * uses new /dev/loop-control kernel API + * supports new command line option --partscan to enable + kernel partition table parser + agetty(8): + - supports new command line options --nohints to disable hints + about Num, Caps and Scroll Locks + - supports new command line option --remote to add a hostname + to the login(1) command line + dmesg(1): + - supports new command line options --file to read the log from + a file rather than from kernel buffer + fallocate(8): + - supports new command line options --punch-hole to punch holes + in the file + findmnt(8): + - supports alternative location of the fstab file + ipcrm(8): + - supports new command line option --all to remove all resources + lscpu(1): + - supports new command line options --all, --offline and + --online to list all, offline or online CPUs + - supports s390 topology description (polarization, books, ...) + partx(8): + - supports partitioned loop devices + wipefs(8): + - allows to zap partition tables + - supports new command line option "--type " to wipe only + specified filesystems, RAIDs or partition table types + libblkid: + - provides new function blkid_do_wipe() to remove all + signatures from the given block device. +- disable elvtune (works only with 2.4 kernel) +- drop patches which are upstream now: + - drop fsck-use-FS-blacklist-for-non-all-mode-too.patch + - drop util-linux-dmesg-fix-printing-of-multibyte-characters.patch + - libmount-ignore-tailing-slash-in-netfs-source-paths.patch + - libmount-fix-chdir-to-parent-for-restricted-user-umo.patch +- update to adjtimex-1.29 +- use fdupes to symlink duplicate manpages +- disabled make check for time (noop) +- libraries back to %{_libdir}, /usr merge project (by + crrodriguez@opensuse.org) +- drop cryptoloop support (provided by dm-crypt) + - util-linux-2.17.1-mount_losetup_crypto.patch + +------------------------------------------------------------------- +Tue Feb 7 14:48:23 UTC 2012 - jengelh@medozas.de + +- Remove redundant tags/sections + +------------------------------------------------------------------- +Sun Dec 25 22:19:44 UTC 2011 - coolo@suse.com + +- do not call %suse_update_config + +------------------------------------------------------------------- +Mon Nov 21 15:13:56 UTC 2011 - aj@suse.de + +- add fdisk-tinfo.patch to fix build with newer curses. + +------------------------------------------------------------------- +Tue Nov 15 13:15:19 UTC 2011 - coolo@suse.com + +- add libtool as buildrequire to avoid implicit dependency + +------------------------------------------------------------------- +Wed Nov 9 08:27:17 UTC 2011 - puzel@suse.com + +- add libmount-ignore-tailing-slash-in-netfs-source-paths.patch and + libmount-fix-chdir-to-parent-for-restricted-user-umo.patch: + fix umounting network filesystems as plain user (bnc#728480) + +------------------------------------------------------------------- +Tue Nov 8 09:36:41 UTC 2011 - puzel@suse.com + +- add fsck-use-FS-blacklist-for-non-all-mode-too.patch (bnc#728645) + +------------------------------------------------------------------- +Wed Nov 2 09:37:12 UTC 2011 - puzel@suse.com + +- add util-linux-dmesg-fix-printing-of-multibyte-characters.patch + (bnc#725993) + +------------------------------------------------------------------- +Thu Oct 20 13:01:22 UTC 2011 - puzel@suse.com + +- update to util-linux-2.20.1 + - bugfix release +- drop patches (in upstream): + - util-linux-sfdisk-manpage-fix.patch + - util-linux-lib-sysfs-deinit.patch + - fdisk-dont-shorten-long-path-to-disk.patch + +------------------------------------------------------------------- +Wed Oct 12 09:26:40 UTC 2011 - puzel@suse.com + +- add fdisk-dont-shorten-long-path-to-disk.patch (bnc#722959) + +------------------------------------------------------------------- +Tue Oct 4 11:32:11 UTC 2011 - uli@suse.com + +- cross-build fix: use %__cc, %configure macros +- set bindir explicitly when installing +- (cross-?)build fix: disable build dependency on SELINUX_LIBS + in libmount + +------------------------------------------------------------------- +Tue Sep 13 09:10:43 UTC 2011 - puzel@suse.com + +- add util-linux-lib-sysfs-deinit.patch (bnc#714151) + +------------------------------------------------------------------- +Mon Aug 29 14:57:57 UTC 2011 - puzel@suse.com + +- update to util-linux-2.20 + - cleanups, bugfixes +- build with --enable-ddate +- add util-linux-sfdisk-manpage-fix.patch + +------------------------------------------------------------------- +Thu Aug 25 14:12:15 UTC 2011 - rguenther@novell.com + +- BuildIgnore pwdutils. + +------------------------------------------------------------------- +Wed Aug 17 10:37:20 UTC 2011 - puzel@novell.com + +- update to util-linux-2.20-rc2 + - bugfixes +- drop patches: + - util-linux-fix-manpages.patch + - util-linux-wall-build-with-pie.patch + - util-linux-2.20-rc1-agetty-fixes.patch + - util-linux-2.20-rc1-hexdump-segfault.patch + - util-linux-2.20-rc-fix-dmesg.patch + +------------------------------------------------------------------- +Wed Aug 10 13:42:33 UTC 2011 - puzel@novell.com + +- add util-linux-2.20-rc1-hexdump-segfault.patch (bnc#710877) + +------------------------------------------------------------------- +Wed Aug 10 12:20:41 UTC 2011 - puzel@novell.com + +- add util-linux-2.20-rc-fix-dmesg.patch (bnc#710417) + +------------------------------------------------------------------- +Wed Aug 10 11:06:15 UTC 2011 - puzel@novell.com + +- add util-linux-2.20-rc1-agetty-fixes.patch (bnc#711240) + +------------------------------------------------------------------- +Mon Aug 1 13:44:21 UTC 2011 - puzel@novell.com + +- update to util-linux-2.20-rc1 + - Release highlights + agetty(8): + - mingetty features have been merged to agetty + chrt(1), taskset(1): + - supports new command line option "--all-tasks" to set or + retrieve the scheduling attributes of all the tasks (threads) + for a given PID + dmesg(1): + - supports new command line options: --clear, --console-on, + --console-off, --ctime, --decode, --facility=, + --level=, --show-delta, --notime, --kernel and + --userspace + fdisk(8): + - improved dialogs to be more user-friendly + findmnt(8), partx(8), lsblk(8) + - support new command line option "--pairs" to enable + key="value" output format + findmnt(8): + - supports new command line options "--poll" and "--timeout" to + monitor /proc/self/mountinfo changes + ionice(1): + - supports human-readable scheduling class names, for example: + ionice -c best-effort $PID + kill(1): + - supports new command line option "-q " to use + sigqueue(2) + - supports real-time signals in formats RT, RTMIN+ and + RTMAX- + lsblk(8): + - supports new columns + - supports new command line option "-D" to print device discard + topology + lscpu(8): + - improved support for s390 boxes + mkfs.minix: + - supports minix version 3 + simpleinit: + - this set of deprecated utils has been REMOVED + wall(1): + - support new command line option "--timeout" to specify write + timeout to terminals in seconds. +- add util-linux-fix-manpages.patch +- add util-linux-wall-build-with-pie.patch +- package /sbin/rcuuidd + +------------------------------------------------------------------- +Tue May 3 09:39:37 UTC 2011 - puzel@novell.com + +- update to util-linux-2.19.1 + - numerous bugfixes, including (bnc#690486 and bnc#690488) +- drop umount-by-imgname.patch (merged upstream) +- cleanup: do not register ipc.info.gz (not provided by + this package) + +------------------------------------------------------------------- +Thu Apr 14 16:27:27 UTC 2011 - puzel@novell.com + +- merge util-linux-2.17.1-losetup-honor-documented-c-option and + util-linux-2.17.1-mount_losetup_crypto.patch) + +------------------------------------------------------------------- +Mon Feb 21 16:28:38 UTC 2011 - puzel@novell.com + +- add umount-by-imgname.patch (bnc#666161) + +------------------------------------------------------------------- +Thu Feb 10 11:01:40 UTC 2011 - puzel@novell.com + +- update to util-linux-2.19 + - uuid fixes + - cleanups, documentation and translation updates +- drop util-linux-2.19-rc1-loop-offset.diff (fixed in upstream, by + different patch) + +------------------------------------------------------------------- +Wed Jan 26 11:47:55 UTC 2011 - puzel@novell.com + +- update to util-linux-2.19-rc3 + - bugfixes + +------------------------------------------------------------------- +Tue Jan 25 09:29:15 UTC 2011 - lnussel@suse.de + +- don't mess with /etc/mtab in %post. aaa_base does that for us + already. + +------------------------------------------------------------------- +Fri Jan 21 12:34:35 UTC 2011 - lnussel@suse.de + +- fix parsing offset= followed by more options (bnc#666150) + +------------------------------------------------------------------- +Tue Jan 18 09:47:11 UTC 2011 - bwiedemann@novell.com + +- fix bnc#664873 + +------------------------------------------------------------------- +Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com + +- update to util-linux-2.19-rc1 +- important changes: + * lsblk(8): + - this NEW COMMAND lists information about all or selected block + devices in tree-like format. + * partx(8): + - this command has been rewritten to use libblkid for partition + tables parsing. It supports aix, bsd, dos, gpt, mac, minix, + sgi, solaris_x86, sun, ultrix and unixware now. + - supports new command line option "--show" to list partitions in + new format + - prints UUID and name for GPT and mac partitions + * findmnt(8): + - supports new command line option "--submounts" to list all + submounts for selected mountpoint(s) + * agetty(8): + - supports new command line options "-c" and "-s" to reuse + already initialized tty cflags and existing baud rate + * mount(8), umount(8): + - could be linked with libmount (--enable-libmount-mount) to + manage userspace mount options outside /etc/mtab on systems + where the file is a symlink to /proc/mounts. (EXPERIMENTAL, + enabled in openSUSE package) + * losetup(8), mount(8): + - uses /sys/dev/block//loop/backing_file rather than + loopdev ioctls (requires kernel >= 2.6.37) + * fsck(8): + - supports new command line option "-l" to lock whole-disk device + by exclusive flock(2). This option is recommended when more + fsck(8) instances are executed in the same time. + * rtcwake(8): + - supports new mode "show" to print the current RTC alarm time + * fstrim(8): + - this NEW COMMAND allows to discard unused blocks on a mounted + filesystem (wrapper for FITRIM ioctl) + * swapon(8): + - supports new options "discard" and "nofail" + +- in post, replace /etc/mtab with a symlink to /proc/mounts/self +- drop following patches (in upstream) + - util-linux-swapon-btrfs-limitations + - util-linux-agetty-s-option.patch + - util-linux-fsck-l-option.patch + - util-linux-2.18-no-canonicalize-fix.patch + - util-linux-swapon-canonicalize-swap-device.patch +- fix uuidd Summary and Description +- build with --enable-libmount-mount (new option) +- use set_permissions macros +- run spec-cleaner + +------------------------------------------------------------------- +Tue Dec 14 16:11:34 UTC 2010 - puzel@novell.com + +- add util-linux-swapon-canonicalize-swap-device.patch + (bnc#641142) + +------------------------------------------------------------------- +Thu Dec 2 17:09:08 CET 2010 - mszeredi@suse.cz + +- mount: don't canonicalize "spec" with --no-canonicalize option + [bnc#651598] + +------------------------------------------------------------------- +Thu Dec 2 15:23:36 CET 2010 - mszeredi@suse.cz + +- add Provides: util-linux(fake+no-canonicalize) [bnc#651598] + +------------------------------------------------------------------- +Tue Nov 30 12:19:53 UTC 2010 - puzel@novell.com + +- update util-linux-2.17.1-mount_losetup_crypto.patch (bnc#655804) + +------------------------------------------------------------------- +Fri Nov 26 19:10:27 CET 2010 - kay.sievers@novell.com + +- add Provides: fsck-with-dev-lock + +------------------------------------------------------------------- +Thu Nov 25 13:37:43 CET 2010 - kay.sievers@novell.com + +- add 'fsck -l' option needed for systemd + +------------------------------------------------------------------- +Tue Nov 16 16:08:48 UTC 2010 - cristian.rodriguez@opensuse.org + +- disable silent rules + +------------------------------------------------------------------- +Thu Nov 11 10:36:35 CET 2010 - kay.sievers@novell.com + +- add 'agetty' -s option needed for systemd's serial console setup + +------------------------------------------------------------------- +Tue Sep 28 11:42:46 UTC 2010 - aj@suse.de + +- uuidd rc file already creates /var/run/uuidd, mark it as %ghost + in spec file. + +------------------------------------------------------------------- +Fri Jul 9 06:23:27 UTC 2010 - puzel@novell.com + +- update to util-linux-ng-2.18 + - do not provide rdev, ramsize, vidmode and rootflags commands + anymore + - fdisk does not use cylinders as display units by default + - libmount: new library; its API is still officially unstable + - new commands: findmnt, fsfreeze, swaplabel + - blkid: new option "-i" to print I/O limits + - full release notes: + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes +- update to adjtimex-1.28 +- update to which-2.20 +- drop util-linux-2.14.1-mount_skip_sync.patch (fixed upstream) +- drop util-linux-addpart-use-atoll.patch (fixed upstream) +- drop util-linux-mount-detect-ro-mount.patch (fixed upstream) +- drop adjtimex-1.20-nosyscall.diff (fixed upstream) +- cleanup specfile a bit + +------------------------------------------------------------------- +Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de + +- use %_smp_mflags + +------------------------------------------------------------------- +Thu Jun 24 23:24:41 CEST 2010 - jeffm@suse.de + +- document btrfs limitation with swapfiles (bnc#616617) + +------------------------------------------------------------------- +Tue Jun 22 16:48:29 UTC 2010 - bg@novell.com + +- hppa specific binaries are parisc{,32,64} + +------------------------------------------------------------------- +Tue Jun 1 14:23:23 UTC 2010 - puzel@novell.com + +- do not run uuidd as root, but uuidd:uuidd (bnc#604168) + +------------------------------------------------------------------- +Fri May 28 13:24:43 UTC 2010 - puzel@novell.com + +- add util-linux-mount-detect-ro-mount.patch (bnc#481123) + +------------------------------------------------------------------- +Tue May 11 13:58:49 UTC 2010 - puzel@novell.com + +- add util-linux-addpart-use-atoll.patch (bnc#603328) + +------------------------------------------------------------------- +Tue Apr 6 13:22:37 UTC 2010 - hvogel@novell.com + +- update to version 2.17.2 + - fix small typo in v2.17.1-ReleaseNotes + - fix -b fdisk + - fix typo in ionice + - fix display of device size, fix infinite loop when probe chain + bails out early, more robust minix probing, remove "0x" prefix + from DRBD UUID, reset BLKID_TINY_DEV flag in + blkid_probe_set_device, support alignment_offset=-1 in libblkid + - fix cpuid opcode detection in lscpu + - more explicitly explain fstab usage in mount.8, posix option + of vfat is obsolete, properly ignore comments in + /etc/filesystems in mount + - update ja.po, pl.po, update vi.po + - remove " (deleted)" from filenames from /proc/swaps + - cleanup usage() and man page of wipefs + +------------------------------------------------------------------- +Wed Mar 10 23:11:42 CET 2010 - jeffm@suse.de + +- Properly honor documented -c option (bnc#583677) + +------------------------------------------------------------------- +Tue Mar 2 09:53:04 UTC 2010 - lnussel@suse.de + +- drop freeramdisk (bnc#584565) +- drop hostid (bnc#584562) + +------------------------------------------------------------------- +Tue Feb 23 12:46:07 UTC 2010 - lnussel@suse.de + +- new version 2.17.1 + - new commands: wipefs, unshare, fallocate + - fdisk: DOS-compatible mode marked deprecated + - honor nofail option in fsck + - libblkid overhaul + - lots of bug fixes +- fix self-obsoletes +- compile suid programs using -fpie +- drop -DCONFIG_SMP for s390 as it doesn't seem to be used anyways + +------------------------------------------------------------------- +Sun Dec 13 15:19:16 CET 2009 - jengelh@medozas.de + +- add baselibs.conf as a source + +------------------------------------------------------------------- +Sun Dec 6 15:07:33 CET 2009 - jengelh@medozas.de + +- enabled parallel build + +------------------------------------------------------------------- +Mon Nov 30 17:05:38 CET 2009 - meissner@suse.de + +- exclude sparc correctly -> %sparc bnc#559180 + +------------------------------------------------------------------- +Sun Nov 15 14:04:48 CET 2009 - meissner@suse.de + +- refreshed patches with fuzz=0 + +------------------------------------------------------------------- +Mon Oct 26 17:45:53 UTC 2009 - crrodriguez@opensuse.org + +- fsck during boot up fails with Too many open files [bnc#503008] + +------------------------------------------------------------------- +Tue Oct 20 12:14:24 CEST 2009 - dmueller@suse.de + +- fix typo in baselibs.conf change + +------------------------------------------------------------------- +Tue Oct 13 11:23:07 UTC 2009 - aj@suse.de + +- Fix requires of 32-bit devel packages. + +------------------------------------------------------------------- +Tue Sep 29 12:58:37 UTC 2009 - hvogel@novell.com + +- finaly remove the mount mtab locking patch: + * util-linux-2.14.1-mount_race.patch + It causes too much regressions. + +------------------------------------------------------------------- +Mon Jul 13 14:21:07 CEST 2009 - kay.sievers@novell.com + +- update to final 2.16 release + - fix libdir issues in pkgconfig files + - fix location of uuidd run directory + - improve libuuid handling if uuidd is installed but not setuid +- add blkid.conf file to: + - disable the sequential /dev scanner + - move cache to /dev/.blkid.tab to get file out of /etc + and prevent the cache file to survive a reboot + +------------------------------------------------------------------- +Wed Jul 8 13:14:42 CEST 2009 - meissner@novell.com + +- added baselibs.conf for libblkid* and libuuid* + +------------------------------------------------------------------- +Sun Jun 28 21:36:57 CEST 2009 - kay.sievers@novell.com + +- update to version 2.16 +- switch from libvolume_id to new libblkid +- provide fsck +- provide libblkid +- provide libuuid +- provide setarch +- provide separate uuidd package +- remove patches: + util-linux-2.14.1-lscpu.patch (upstream) + util-linux-2.14.1-lscpu_add_hypervisor_detection.patch (upstream) + util-linux-2.14.1-lscpu_sysroot_option.patch (upstream) + util-linux-2.14.1-sys-utils_lscpu_exit.patch (upstream) + util-linux-2.14.2-schedutils_fix_email.patch (upstream) + util-linux-2.12r-fdisk_cyl.patch (upstream) + util-linux-2.14.1-mount_swap_pagesize.patch (--fixpg option) + util-linux-2.14.2-schedutils_ionice_enosys.patch (-t option) + util-linux-2.14.1-hwclock_adjust_and_hctosys.patch (--systz) + +------------------------------------------------------------------- +Thu Apr 16 14:55:22 CEST 2009 - werner@suse.de + +- Move /usr/sbin/adjtimex to /sbin/adjtimex to be able to check the + kernel time variables even without /usr mounted + +------------------------------------------------------------------- +Mon Feb 16 12:35:00 CET 2009 - mkoenig@suse.de + +- remove util-linux-2.14.1-fdisk_cylinder.patch + fixed upstream + +------------------------------------------------------------------- +Thu Feb 12 17:12:28 CET 2009 - mkoenig@suse.de + +- update to version 2.14.2 + chrt: + * support CFS SCHED_IDLE priority and document it + fdisk: + * cannot create partition with starting beyond 1 TB + * remove obsolete information from man page + hwclock: + * remove "cli" and "sti" from i386 CMOS code + * remove x86_64-specific bogon + losetup: + * add warning about read-only mode + * missing EBUSY error hint message + more: + * minor fixes to magic() + mount: + * add i_version support + * add info about /proc/mounts to mount.1 + * add info about semantics of read-only mount to mount.8 + * add rootcontext= SELinux mount option + * clean up SPEC canonicalization + * create separate section for fs-independent options in mount.8 + * finalize support of quoted LABELs/UUIDs + * mtab created multiple times with -a option + * suggest to use blockdev --setro rather than losetup +- catch ENOSYS in ionice to allow execution in virtualized + environments which don't support ioprio_{get,set} calls [bnc#444637] +- umount: fix suid check for user mounted loop devices [bnc#461732] +- fix doc [bnc#456375] +- remove patches: + util-linux-2.13.1-fdisk_cfdisk_yesno.patch + util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch + util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch + util-linux-2.14.1-fdisk_missing_include.patch + util-linux-2.14.1-mount_loop_ro_fix.patch + +------------------------------------------------------------------- +Sat Feb 7 18:28:58 CET 2009 - schwab@suse.de + +- Fix info dir entry for which. + +------------------------------------------------------------------- +Wed Jan 7 15:42:38 CET 2009 - mkoenig@suse.de + +- fix locking problem for external mount helpers when type + is not given [bnc#459839] + +------------------------------------------------------------------- +Tue Dec 2 12:23:37 CET 2008 - mkoenig@suse.de + +- raw: do not stat the raw devices when binding, since they + are created dynamically [bnc#450675] + +------------------------------------------------------------------- +Thu Nov 27 01:27:19 CET 2008 - dmueller@suse.de + +- mount: fix hang on trying to find a free loop device + if one of them has a stale nfs handle mounted (bnc#449646) + +------------------------------------------------------------------- +Mon Nov 24 15:24:11 CET 2008 - mkoenig@suse.de + +- mount: fix locking patch to not break -n [bnc#447937] + +------------------------------------------------------------------- +Thu Nov 20 18:08:33 CET 2008 - mkoenig@suse.de + +- mount: enhance mount/umount mtab locking and lock the whole + read mtab/syscall/write mtab process to avoid mtab corruption + with highly concurrent mount/umount calls [bnc#444966] +- add arch/powerpc/boot/addnote.c from kernel 2.6.27 + as /usr/bin/chrp-addnote [bnc#443859] +- umount: skip sync() in umount -a if no umount happened [bnc#447036] +- hwclock: allow --adjust and --hctosys simultaneously [bnc#441106] + +------------------------------------------------------------------- +Fri Nov 7 14:50:00 CET 2008 - mkoenig@suse.de + +- fdisk: support +cylinder notation [bnc#441871] +- check for EACCES when using ro fallback when loop mounting + a readonly image +- fix uninitialized variable in swapon pagesize detection + +------------------------------------------------------------------- +Mon Oct 27 17:33:01 CET 2008 - mkoenig@suse.de + +- fdisk: add missing includes [bnc#438670] + +------------------------------------------------------------------- +Thu Oct 23 17:58:28 CEST 2008 - mkoenig@suse.de + +- swapon: add swap pagesize detection [bnc#433028] +- lscpu: fix return code [bnc#437367] +- mkfs.minix: fix device size detection [bnc#437980] +- lscpu: update to most recent version for hypervisor detection + +------------------------------------------------------------------- +Thu Oct 2 11:10:11 CEST 2008 - mkoenig@suse.de + +- add lscpu tool from current util-linux-ng git, + needed for fate#303051 +- replace hypervisor detection tool with the solution blessed by + upstream, which adds hv detection as lscpu feature [fate#303051] + +------------------------------------------------------------------- +Wed Sep 24 11:28:07 CEST 2008 - mkoenig@suse.de + +- add new tool /bin/hypervisor for x86, x86_64 + from Ky Srinivasan + to detect the presence of a hypervisor [fate#303051] + +------------------------------------------------------------------- +Wed Sep 10 15:58:52 CEST 2008 - mkoenig@suse.de + +- update to version 2.14.1 + * fdisk: don't check for GPT when asked for disk size only + * losetup: remove unnecessary minor number check + * rtcwake: prefer RTC_WKALM_SET over RTC_ALM_SET + * scriptreplay: new implementation is out-of-sync + * selinux: is_selinux_enabled() returns 0, 1 and -1 + * umount: improve "-d" option for autoclear loops +- remove patch + util-linux-2.14-loop_autoclear.patch + +------------------------------------------------------------------- +Wed Aug 20 15:20:06 CEST 2008 - mkoenig@suse.de + +- enable SELinux support [fate#303662] + +------------------------------------------------------------------- +Mon Aug 18 18:13:10 CEST 2008 - mrueckert@suse.de + +- remove outdated options in the fillup_and_insserv call + +------------------------------------------------------------------- +Mon Aug 18 12:36:39 CEST 2008 - mkoenig@suse.de + +- raw: fix init script tags + +------------------------------------------------------------------- +Mon Jul 7 15:13:24 CEST 2008 - mkoenig@suse.de + +- update which to version 2.19 + * Upgraded code from bash to version 3.2. This DOES has influence + on how Which behaves under certain circumstances. + * When the environment variable HOME is not set, the home directory + is now read from /etc/passwd or set to '/' if no home directory + could be found (this now matches the tilde lib used in bash) + * Changed the license to GPLv3 + * Add support for shells that output '{' on the same line as the + function name in the output of 'declare -f' (ie zsh). +- fix build + +------------------------------------------------------------------- +Wed Jul 2 15:47:08 CEST 2008 - mkoenig@suse.de + +- replace util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch + with upstream version + util-linux-2.14-loop_autoclear.patch + +------------------------------------------------------------------- +Fri Jun 27 17:05:46 CEST 2008 - schwab@suse.de + +- Fix lib64 check. + +------------------------------------------------------------------- +Wed Jun 25 14:26:49 CEST 2008 - mkoenig@suse.de + +- update to version 2.14 + most important changes: + * new command ldattach + mount: + * support auto-destruction of loop devices + losetup: + * new option -j + * supports unlimited number of loop devices + * new option --sizelimit to set data end + * option -s (short form of --show) now deprecated + mkswap: + * new option -U to set UUID explicitly + fdisk: + * calculate partition size in 2^N [bnc#381270] + hwclock: + * new option --adjfile to override default /etc/adjtime +- readd scriptreplay, implemented now in C +- add retry for mount if ENOMEDIUM is returned [bnc#390204] +- ignore ENXIO in del_loop, because they might have been + auto-destructed +- removed patches: + util-linux-2.13.1-canonicalize_loopfile_name.patch + util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch + util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch + util-linux-2.13.1-mount_getfs_fix.patch + util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch + util-linux-2.13-fdisk_cfdisk_ncursesw.patch + util-linux-mount_opt_nofail.patch + util-linux-ng-2.13-swapon-swsuspend.patch + +------------------------------------------------------------------- +Thu Apr 3 17:11:53 CEST 2008 - mkoenig@suse.de + +- cfdisk: accept english answer [bnc#369043] +- use upstream getfs fix + +------------------------------------------------------------------- +Wed Mar 26 22:05:42 CET 2008 - coolo@suse.de + +- actually require the split out package + +------------------------------------------------------------------- +Sun Mar 23 11:13:13 CET 2008 - coolo@suse.de + +- splitting out 60% of the size of the package: + creating lang subpackage + +------------------------------------------------------------------- +Wed Feb 13 10:21:42 CET 2008 - bg@suse.de + +- don't try to package parisc*.8 manual pages + +------------------------------------------------------------------- +Mon Feb 11 17:49:04 CET 2008 - mkoenig@suse.de + +- update to version 2.13.1 again +- fix broken util-linux-2.13.1-getfs_fix.patch + +------------------------------------------------------------------- +Sun Feb 10 18:11:07 CET 2008 - lrupp@suse.de + +- revert to 2.13.0.1+git20071121 + breaks current 'mount' call in Buildservice + +------------------------------------------------------------------- +Thu Feb 7 12:41:25 CET 2008 - mkoenig@suse.de + +- update to version 2.13.1: + mount: + * -L|-U segfault when label or uuid doesn't exist + * chain of symlinks to fstab causes use of pointer after free + * don't call canonicalize(SPEC) for cifs, smbfs and nfs + * improve error message when helper program not present + losetup: + * fix errno usage + mkswap: + * possible to crash with SELinux relabeling support + sfdisk: + * allow partitioning drives of over 2^31 sectors + hwclock: + * check for ENODEV +- mount: fix problem with device canonicalization when using + persistent name in fstab but call mount with real bd name +- patches merged: + util-linux-2.13-mount_fd_leak.patch + +------------------------------------------------------------------- +Tue Dec 18 15:55:19 CET 2007 - mkoenig@suse.de + +- add temporary workaround for broken RTC update interrupts + [#338419] + +------------------------------------------------------------------- +Mon Dec 3 11:03:57 CET 2007 - ro@suse.de + +- remove "arch", in coreutils now + +------------------------------------------------------------------- +Thu Nov 29 17:51:17 CET 2007 - lnussel@suse.de + +- update crypto patch + * fix mount buffer overflow when reading the passphrase (#332148) + * add loop_fish2 compatability code to losetup/mount again (#332095) + * change default hash size for 128bit keys to sha256 again + + +------------------------------------------------------------------- +Wed Nov 21 13:43:31 CET 2007 - mkoenig@suse.de + +- update to git20071121: + add sector size check for mkfs.minix [#308256] + fix canonicalization for cifs [#338375] +- provide Short-Description for raw init script +- add rpmlintrc + +------------------------------------------------------------------- +Tue Nov 20 17:49:35 CET 2007 - mkoenig@suse.de + +- fix raw path in init script + +------------------------------------------------------------------- +Tue Nov 6 16:11:02 CET 2007 - mkoenig@suse.de + +- update to 2.13.0.1+git20071106 +- prevent loop mounting the same file twice [#240653] +- merged upstream: + util-linux-2.13-mount_helper_fix.patch + util-linux-2.13-hwclock_rtc_option.patch + +------------------------------------------------------------------- +Thu Oct 4 22:24:04 CEST 2007 - bg@suse.de + +- don't use parisc, parisc32 and parisc64. + +------------------------------------------------------------------- +Mon Oct 1 17:08:06 CEST 2007 - mkoenig@suse.de + +- update to version 2.13 + merged upstream: + util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch + util-linux-2.13-loop.patch + util-linux-2.13-mount_create_mtab.patch + util-linux-2.13-schedutils_error_handling.patch + util-linux-2.13-sys_utils_build_rdev_x86_64.patch +- fix hwclock --rtc option [#326106] +- fix setuid/setgid mixup and error checking [#327022] + +------------------------------------------------------------------- +Fri Sep 14 11:24:33 CEST 2007 - mkoenig@suse.de + +- link cfdisk against libncursesw instead libncurses to fix + broken utf-8 characters [#307353] + +------------------------------------------------------------------- +Wed Aug 29 12:22:21 CEST 2007 - mkoenig@suse.de + +- fix fd leaks in previous patch + +------------------------------------------------------------------- +Tue Aug 28 16:42:04 CEST 2007 - lnussel@suse.de + +- add support for specifying the key length and password hash + algorithm [#304861] + +------------------------------------------------------------------- +Fri Aug 24 14:09:19 CEST 2007 - mkoenig@suse.de + +- avoid duplicates of root fs if defined with LABEL in fstab + [#297959] +- fix ionice error handling [#301675] + +------------------------------------------------------------------- +Thu Aug 16 18:34:30 CEST 2007 - ssommer@suse.de + +- free loop devices when mount fails [#297172] + +------------------------------------------------------------------- +Wed Jul 25 18:43:42 CEST 2007 - mkoenig@suse.de + +- update to git20070725 +- removed patches (merged upstream): + util-linux-2.12r-mount_mount.8_xfs_update.patch + util-linux-2.12r-sys_utils_readprofile_mapfile.patch + util-linux-2.12r-disk_utils_mkswap_fix.patch + util-linux-2.13-schedutils_ionice_idle.patch + +------------------------------------------------------------------- +Tue Jul 17 10:44:18 CEST 2007 - mkoenig@suse.de + +- updated to version 2.13-rc2: + * add wakertc +- cleanup ionice usage [#270251] +- enable hwclock audit support [#280113] +- removed patches (merged/fixed upstream) + util-linux-login_utils_wall.patch + util-linux-mount_mount.8-acl.patch + util-linux-2.12r-mount_mtab_update.patch + util-linux-2.13-schedutils_chrt.patch + util-linux-2.13-sys_utils_arch.patch + util-linux-2.12a-mount_mountpointwithcolon.patch + util-linux-2.12a-mount_procswapcheck.patch + util-linux-2.12q-mount_umount2_not_static.patch + +------------------------------------------------------------------- +Fri Jul 13 12:31:56 CEST 2007 - mkoenig@suse.de + +- replace hotplug with nofail option and fix it to not use + syscall reserved values. +- removed patch + util-linux-2.11z-hwclock_geteuid.patch + it is intentional that suid hwclock capabilities are limited +- removed patch (fixed upstream) + util-linux-2.12q-mount_--move.patch + +------------------------------------------------------------------- +Mon Jul 9 11:34:33 CEST 2007 - mkoenig@suse.de + +- add libuuid-devel to BuildRequires to let mkswap use UUIDs + +------------------------------------------------------------------- +Thu Jul 5 16:08:58 CEST 2007 - mkoenig@suse.de + +- use %config(noreplace) for /etc/filesystems +- Keep rdev stuff for x86_64 + util-linux-2.13-sys_utils_build_rdev_x86_64.patch +- removed patches (merged upstream) + util-linux-2.12r-misc_utils_cal_formatting.patch + util-linux-2.12q-sys_utils_ionice.patch + +------------------------------------------------------------------- +Thu Jul 5 11:59:30 CEST 2007 - mkoenig@suse.de + +- update to 2.13-rc1: + * mount fixes + * agetty: add 'O' escape code to display domain name + * blockdev: add BLKFRAGET/BLKFRASET ioctls + * fdisk: many significant improvements and fixes to Sun label handling + * update po files +- removed patches (merged upstream): + util-linux-2.11q-fdisk_fs_mac.patch + util-linux-2.12r-fdisk_fdiskwrap.patch + util-linux-2.12r-mount_racy_loop.patch + util-linux-2.13-misc_utils_cal_ncurses.patch + util-linux-2.13-mount_volumeid_label.patch +- use %find_lang + +------------------------------------------------------------------- +Thu Jun 21 14:50:58 CEST 2007 - mkoenig@suse.de + +- use encoded label names with volume_id [#232929] + util-linux-2.13-mount_volumeid_label.patch + +------------------------------------------------------------------- +Thu Jun 14 10:52:25 CEST 2007 - mkoenig@suse.de + +- mkzimage_cmdline: activate commandline if used with -s [#279935] + +------------------------------------------------------------------- +Wed Jun 13 12:33:59 CEST 2007 - mkoenig@suse.de + +- schedutils: let chrt accept pid 0 for current process and + fix some documentation bugs [#266879] + util-linux-2.13-schedutils_chrt.patch + +------------------------------------------------------------------- +Wed Jun 6 16:15:43 CEST 2007 - mkoenig@suse.de + +- update to git20070530 +- removed patches + util-linux-2.13-mount_volume_id.patch + util-linux-2.12r-mount_by_uuid.patch + util-linux-2.13-build_gnu_source.patch +- fix build with ncurses + +------------------------------------------------------------------- +Tue Jun 5 17:01:48 CEST 2007 - mkoenig@suse.de + +- update to git20070509 + mount: NFS code removed (use mount.nfs{,4} from nfs-utils) +- remove sm-notify (nfs-utils) +- removed patches + util-linux-2.11u-mount_nfs_mount_acl.patch + util-linux-2.12-mount_base_nfsv4.patch + util-linux-2.12-mount_mountfallback.patch + util-linux-2.12-mount_nfs_tcp.patch + util-linux-2.12q-mount_strict_aliasing.patch + util-linux-2.12r-mount_nfs_remount_options.patch + util-linux-2.12r-mount_rpcsec_gss.patch + util-linux-2.12r-mount_sec_manpage.patch + util-linux-2.12r-mount_umount_nosysfs.patch + util-linux-2.13-mount_nfs_timeo.patch + util-linux-mount_nfs.8.patch + util-linux-mount_warn_nfsudp.patch + +------------------------------------------------------------------- +Tue Jun 5 14:34:49 CEST 2007 - pth@suse.de + +- Update to which-2.16, mainly because regenerating configure + with newer autotools works. +- Fix the patch for AC_CHECK_STATICLIB +- Our distribution doesn't install libiberty.a, so pass + --disable-iberty to configure of which to not use a libiberty from + somewhere else. + +------------------------------------------------------------------- +Mon Jun 4 17:06:47 CEST 2007 - pth@suse.de + +- Make configure of which search for static libs in lib64 subdirs. + +------------------------------------------------------------------- +Mon Apr 23 16:49:00 CEST 2007 - mkoenig@suse.de + +- update to git20070412 +- remove chkdupexe and scriptreplay to get rid of the + perl dependency [#265757] + util-linux-2.13-build_no_perl_dependency.patch +- upstream integration of umount helper support [#252089] +- merged patches: + util-linux-2.13-misc_utils_add_man_scriptreplay.patch + util-linux-2.13-tests_missing_include.patch + +------------------------------------------------------------------- +Mon Apr 16 17:20:16 CEST 2007 - mkoenig@suse.de + +- fix initialization of offset in + util-linux-2.12r-mount_racy_loop.patch [#264225] + +------------------------------------------------------------------- +Tue Apr 10 17:25:34 CEST 2007 - mkoenig@suse.de + +- update to version git20070330 of new forked development tree +- removed Suse crypto patches for losetup [FATE#302001] +- removed binaries: + /bin/guessfstype + /sbin/sln + /usr/bin/setfdprm +- removed obsolete patches: + * guessfstype2.patch + * loop-AES-v3.0a-util-linux-2.12p.diff + * mount-nfs-nonreserved + * stupid-programmer.diff + * util-linux-nodiratime.diff + * util-linux-2.12-multipleraw.diff + * util-linux-2.12-enablereplaybuild.diff + * util-linux-2.12-mount_guessfstype.diff + * util-linux-2.12h-mtablock.diff + * util-linux-2.12i-x86_64intel.diff + * util-linux-2.12q-null.diff + * util-linux-2.12r.diff + * util-linux-2.12r-fdisk_llseek.patch + * util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff + * util-linux-2.12r-mount_external_prog_on_guess.patch + * util-linux-2.12r-nonfsmountfallback.diff + * util-linux-2.12r-pagesize.patch + * util-linux-2.12r-partx_enable.patch + * util-linux-2.12r-partx_gpt_warning.patch +- add patches: + * util-linux-2.13-misc_utils_add_man_scriptreplay.patch + install man page for scriptreplay + * util-linux-2.13-tests_missing_include.patch + fix missing header in tests/mnt_test_sysinfo.c + * util-linux-2.13-sys_utils_arch.patch + keep /bin/arch + * util-linux-2.13-build_gnu_source.patch + build with _GNU_SOURCE + * util-linux-2.13-build_fix_intel_check.patch + detect also x86_64 as INTEL architecture +- rename patches to identify them clearly by subsystem +- schedutils now part of util-linux itself + +------------------------------------------------------------------- +Wed Apr 4 12:55:40 CEST 2007 - mkoenig@suse.de + +- add Supplements line [FATE#301966] + +------------------------------------------------------------------- +Mon Mar 26 15:49:09 CEST 2007 - rguenther@suse.de + +- add ncurses-devel and zlib-devel BuildRequires + +------------------------------------------------------------------- +Thu Mar 15 17:24:34 CET 2007 - mkoenig@suse.de + +- mount: Let swapon automatically reinitialize a suspended + swap partition [#254437] + +------------------------------------------------------------------- +Thu Mar 9 11:00:11 CET 2007 - mkoenig@suse.de + +- mount: fix mtablock patch to avoid mtab corruption [#226783] + +------------------------------------------------------------------- +Thu Mar 8 17:27:22 CET 2007 - mkoenig@suse.de + +- partx: fix warning for too long literal + +------------------------------------------------------------------- +Wed Mar 7 16:58:08 CET 2007 - rguenther@suse.de + +- fix changelog entry order + +------------------------------------------------------------------- +Tue Feb 27 10:58:46 CET 2007 - mkoenig@suse.de + +- fix missing return code in + util-linux-2.12r-losetup_password.patch +- mount: fix race condition in mount -o loop [#242750] + +------------------------------------------------------------------- +Mon Feb 12 17:22:45 CET 2007 - mkoenig@suse.de + +- remove legacy warnings from fdisk [#241372] + +------------------------------------------------------------------- +Fri Feb 2 13:27:31 CET 2007 - mkoenig@suse.de + +- do not use O_EXCL for mkfs.cramfs [#241466] + +------------------------------------------------------------------- +Wed Jan 31 12:06:55 CET 2007 - mkoenig@suse.de + +- let mkfs tools open with O_EXCL [#238687] + +------------------------------------------------------------------- +Tue Dec 12 11:04:07 CET 2006 - mkoenig@suse.de + +- provide different return codes for losetup with encryption + for empty and too short passwords. [#197493] + +------------------------------------------------------------------- +Tue Dec 5 18:13:32 CET 2006 - mkoenig@suse.de + +- default swap to V1 in any case [#205956] + patch: util-linux-2.12r-mkswap_fix.patch +- do not append addr option with each nfs remount [#130625] + patch: util-linux-2.12r-nfs_remount_options.patch +- add README.largedisk about fdisk partition size constraints + [#153657] + +------------------------------------------------------------------- +Tue Nov 7 13:09:45 CET 2006 - mkoenig@suse.de + +- enable partx [#214992] + +------------------------------------------------------------------- +Tue Oct 10 18:17:42 CEST 2006 - mkoenig@suse.de + +- Round up partition end LBA to a cylinder boundary during + add_partition() [#174892] +- Fix readprofile on ppc64 [#179122] +- Fix cal formatting bug [#203469] + +------------------------------------------------------------------- +Mon Oct 9 12:27:33 CEST 2006 - mkoenig@suse.de + +- Fix llseek issues. +- swapon.c: Do not use PAGE_SIZE macro. + +------------------------------------------------------------------- +Mon Aug 21 12:10:01 CEST 2006 - mkoenig@suse.de + +- Added sysfs to list of filesystems not to unmount with + umount -a, resolves #190385 + +------------------------------------------------------------------- +Mon Jun 12 14:08:25 CEST 2006 - kay.sievers@suse.de + +- use libvolume_id from provided as a rpm by udev 094 + +------------------------------------------------------------------- +Wed May 17 23:48:27 CEST 2006 - jeffm@suse.com + +- Fixed support for calling external programs w/o -t , + it would add mtab twice [#176582] + +------------------------------------------------------------------- +Mon Apr 24 14:33:20 CEST 2006 - hvogel@suse.de + +- document xfs dmapi mount options better [#158955] + +------------------------------------------------------------------- +Fri Apr 21 15:48:16 CEST 2006 - olh@suse.de + +- add mkzimage_cmdline to edit CHRP zImage kernel cmdline (168313) + +------------------------------------------------------------------- +Tue Apr 18 16:09:46 CEST 2006 - hvogel@suse.de + +- fix number of supported raw devices [#165570] + +------------------------------------------------------------------- +Wed Mar 29 13:54:32 CEST 2006 - olh@suse.de + +- clearify comments about mac disk label handling in fdisk + +------------------------------------------------------------------- +Tue Mar 28 17:53:46 CEST 2006 - hvogel@suse.de + +- more fixes for the fdiskwrap patch [#160822] + +------------------------------------------------------------------- +Tue Mar 21 11:35:26 CET 2006 - okir@suse.de + +- Update nfs(5) manpage to document security flavors [#159368] + +------------------------------------------------------------------- +Mon Mar 20 12:14:18 CET 2006 - hvogel@suse.de + +- fix numbers of supported raw devices to match the kernel + [#158203] +- make NFSv3 client support RPCSEC_GSS [#158401] +- fix that if the user doesn't specify -t + mount.fstype will never be called. [#155147] + +------------------------------------------------------------------- +Fri Mar 10 12:07:10 CET 2006 - hvogel@suse.de + +- Fix init.d/raw script to parse device names with , in them + correctly [#155653] + +------------------------------------------------------------------- +Thu Mar 9 12:28:04 CET 2006 - hare@suse.de + +- Fix potential security hole in libvolume_id (#133256) + +------------------------------------------------------------------- +Mon Mar 6 12:03:35 CET 2006 - hvogel@suse.de + +- patch fdiskmaclabel.h too + +------------------------------------------------------------------- +Thu Mar 2 15:49:06 CET 2006 - hvogel@suse.de + +- axboe made fdisk not wrap at 2TB [#153657] + +------------------------------------------------------------------- +Fri Feb 17 15:25:39 CET 2006 - lmuelle@suse.de + +- Use cifs instead of smbfs if the source starts with // and we do not set a + different fs type. + +------------------------------------------------------------------- +Sun Feb 12 12:40:21 CET 2006 - olh@suse.de + +- cosmetic fix for option_hotplug declaration + fix unininitalized string for unknown filesystems (#148855) + +------------------------------------------------------------------- +Fri Feb 10 14:00:48 CET 2006 - hvogel@suse.de + +- mount should not put / in the mtab twice if mount -f / is called + [#148409] +- fix hostid printf [#149163] + +------------------------------------------------------------------- +Wed Feb 1 03:58:58 CET 2006 - olh@suse.de + +- dont invent our own MS_FLAGS (#147132) + +------------------------------------------------------------------- +Wed Feb 1 02:20:17 CET 2006 - ro@suse.de + +- fix typo in previous change, binary negation is "~" + +------------------------------------------------------------------- +Fri Jan 27 13:02:36 CET 2006 - sscheler@suse.de + +- fixed mount hotplug option (#143352). now we don't send the + MS_HOTPLUG flag to the kernel any longer, because the kernel + doesn't know this option (EINVAL) and actually doesn't need to + know about it. + +------------------------------------------------------------------- +Fri Jan 27 12:55:29 CET 2006 - olh@suse.de + +- remove clock symlink, hwclock exists since 7 years + +------------------------------------------------------------------- +Fri Jan 27 11:46:17 CET 2006 - olh@suse.de + +- lsprop and nvsetenv moved to powerpc-utils [#144758] + +------------------------------------------------------------------- +Thu Jan 26 13:06:51 CET 2006 - hvogel@suse.de + +- Make nfsboot world readable [#145418] + +------------------------------------------------------------------- +Wed Jan 25 21:31:03 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Tue Jan 24 17:06:22 CET 2006 - mmj@suse.de + +- Remove faulty nfs fallback code [#139019] + +------------------------------------------------------------------- +Mon Jan 16 11:25:28 CET 2006 - mmj@suse.de + +- Add patch for nsetenv to fix short reads/short writes [#142546] + +------------------------------------------------------------------- +Wed Jan 11 12:46:28 CET 2006 - mmj@suse.de + +- Update sm-notify [#141542] + +------------------------------------------------------------------- +Wed Jan 4 13:52:31 CET 2006 - mmj@suse.de + +- Update to 2.12r including since 2.12q: + o cfdisk: fix a segfault with ReiserFS partitions + o umount: disallow -r option for non-root users + +------------------------------------------------------------------- +Tue Nov 22 11:49:39 CET 2005 - mmj@suse.de + +- install proper renice manpage [#132470] + +------------------------------------------------------------------- +Tue Nov 15 17:01:34 CET 2005 - uli@suse.de + +- umount2 is not static (only fails on ARM, surprisingly) +- added ARM ionice syscalls + +------------------------------------------------------------------- +Fri Nov 11 10:42:35 CET 2005 - hare@suse.de + +- Fix reverse-mapping of by-UUID and by-LABEL mounts. + +------------------------------------------------------------------- +Thu Nov 10 09:04:17 CET 2005 - hare@suse.de + +- Fix a mishandling of by-UUID mounts. +- Use libvolume_id from udev. + +------------------------------------------------------------------- +Sat Oct 22 17:55:16 CEST 2005 - mmj@suse.de + +- Increase lsprop.c max property size to 4k [#128155] + +------------------------------------------------------------------- +Mon Oct 10 12:44:05 CEST 2005 - mmj@suse.de + +- Add -fno-strict-aliasing to nfsmount_xdr.c + +------------------------------------------------------------------- +Mon Oct 3 09:55:56 CEST 2005 - mmj@suse.de + +- Teach the mount manual page about nodiratime [#118987] + +------------------------------------------------------------------- +Thu Sep 29 12:42:03 CEST 2005 - mmj@suse.de + +- Patch from jakub007@go2.pl to make mount --move update + /etc/mtab correctly [#115129] + +------------------------------------------------------------------- +Tue Sep 13 14:16:58 CEST 2005 - mmj@suse.de + +- Only allow root to pass -r to umount [#116741] + +------------------------------------------------------------------- +Mon Sep 5 13:18:27 CEST 2005 - mmj@suse.de + +- MAC -> Mac [#104081] + +------------------------------------------------------------------- +Fri Sep 2 13:48:17 CEST 2005 - mmj@suse.de + +- Don't package manual executable [#114849] + +------------------------------------------------------------------- +Thu Sep 1 10:56:25 CEST 2005 - mmj@suse.de + +- Add patch for device-mapper mount by label support [#75966] + +------------------------------------------------------------------- +Thu Sep 1 00:12:39 CEST 2005 - ro@suse.de + +- provide and obsolete schedutils + +------------------------------------------------------------------- +Tue Aug 23 18:00:01 CEST 2005 - hvogel@suse.de + +- update ionice patch by axboe so that ionice will complain about + missing sys_ioprio_set support, but it will still + execute the process. + +------------------------------------------------------------------- +Mon Aug 22 17:06:42 CEST 2005 - hvogel@suse.de + +- Fix rpm verify output [#105807] + (ghost entry for /var/lib/nfs/state) + +------------------------------------------------------------------- +Mon Aug 22 16:27:16 CEST 2005 - schwab@suse.de + +- Fix stupid buffer overflow bug in cfdisk [#66020]. + +------------------------------------------------------------------- +Wed Aug 17 12:59:24 CEST 2005 - hare@suse.de + +- Add option 'hotplug' to mount (#104405) + +------------------------------------------------------------------- +Mon Aug 15 16:33:48 CEST 2005 - schwab@suse.de + +- Always build with RPM_OPT_FLAGS. + +------------------------------------------------------------------- +Thu Aug 11 14:41:18 CEST 2005 - mmj@suse.de + +- Patch from Patrick Kirsch to make fdisk detect MAC-fs [#104081] + +------------------------------------------------------------------- +Wed Aug 3 20:50:59 CEST 2005 - mmj@suse.de + +- Merge schedutils to here (it's happened upstream already) + +------------------------------------------------------------------- +Tue Aug 2 08:47:47 CEST 2005 - mmj@suse.de + +- Support for s390 and s390x + +------------------------------------------------------------------- +Mon Aug 1 20:04:13 CEST 2005 - mmj@suse.de + +- It's not __ppc_ and __ppc64__ but __powerpc__ and __powerpc64__ + +------------------------------------------------------------------- +Mon Aug 1 12:17:39 CEST 2005 - mmj@suse.de + +- Add ionice binary from Jens Axboe + +------------------------------------------------------------------- +Wed Jun 29 11:26:31 CEST 2005 - mmj@suse.de + +- Document load and clearly issues about NFS over UDP [#80263] +- Don't compile with -fsigned-char [#93886] + +------------------------------------------------------------------- +Tue May 31 13:26:05 CEST 2005 - okir@suse.de + +- Added NFSv4 support + +------------------------------------------------------------------- +Mon May 9 17:27:59 CEST 2005 - hvogel@suse.de + +- move hashalot and cryptsetup tools to util-linux-crypto + +------------------------------------------------------------------- +Tue Apr 12 16:13:57 CEST 2005 - mmj@suse.de + +- bump TCP timeo to 600 [#76198] + +------------------------------------------------------------------- +Tue Mar 29 13:43:31 CEST 2005 - mmj@suse.de + +- Add awareness of twofishSL92 [#74359] +- Update hashalot to version 0.3 + +------------------------------------------------------------------- +Mon Mar 14 15:30:49 CET 2005 - okir@suse.de + +- Changed sm-notify to recognize host names as well as addresses. + +------------------------------------------------------------------- +Thu Mar 10 11:28:21 CET 2005 - mmj@suse.de + +- Don't strip anything explicitly +- Don't compile with -fno-strict-aliasing [#66020] + +------------------------------------------------------------------- +Fri Feb 4 14:48:27 CET 2005 - schwab@suse.de + +- Fix stupid programmer. + +------------------------------------------------------------------- +Mon Jan 24 17:01:51 CET 2005 - meissner@suse.de + +- implicit strcmp / strerror in setctsid fixed. +- 0 -> NULL in an execl + +------------------------------------------------------------------- +Fri Jan 21 14:37:21 CET 2005 - mmj@suse.de + +- Sleep after inserting the raw module to make sure it's ready [#49807] +- Update to 2.12q including since 2.12p: + o New upstream maintainer - Adrian Bunk + o sfdisk: add -G option + o Updated translations + +------------------------------------------------------------------- +Tue Jan 18 17:04:30 CET 2005 - okir@suse.de + +- Updated sm-notify; try not to stall bootup my moving the NSM + state update after we've backgrounded (#49072). + +------------------------------------------------------------------- +Mon Jan 10 14:45:12 CET 2005 - mmj@suse.de + +- Update adjtimex to 1.20 +- Update to util-linux-2.12p including since 2.12i: + o cfdisk: fix number of new partition when partitions not in disk order + o fdisk: fix Sun label handling in sector mode + o mkfs: never truncate filename (not that that ever happened) + o more: fix redraw flaw + o lomount: revert patch from 2.12j + o lptune.8: -T option is obsolete + o mkswap, mkswap.8, swapon: support labels + o umount: allow user unmounting repeatedly mounted nfs mounts + o cfdisk: recognize JFS, support reiserfs labels + o mount: fix option parsing bug + o mount.8: several updates + o swapon.8: document -v option + o Makefile: remove cat-id-tbl.c upon make clean + o fdisk: fixed a bug that would cause a non-update of a sun disklabel + o fdisk: use sectorsize instead of 512 for SGI + o hwclock: actually use HAVE_tm_gmtoff + o swapon: fix priority handling + o umount: refuse to unmount an empty string + o configure, MCONFIG: detect gcc 3.4.0 and use -mtune option + o configure: do not run ./conftest (for cross compilation) + o fsck.cramfs: try to get correct PAGE_CACHE_SIZE + o losetup: try to give better error messages + o readprofile: default map file is /boot/System.map + o rdev.8: added historical info on ramdisk + o cal: highlight today + o lomount: stop reading passwd at NUL, fix lo_encrypt key_size + o losetup: add -f option to find an unused loop device + o more: code cleanup + o mount: add "group" mount option + o sfdisk: fix 2.6.8 BLKRRPART ioctl damage + o swapon: let swapon -a skip the swapfiles marked "noauto" + o umount: fix problem with empty mtab + o umount: use special umount program if it exists + o new flock binary + o New messages + +------------------------------------------------------------------- +Tue Nov 30 11:02:32 CET 2004 - mmj@suse.de + +- Install ramsize, rdev, rootflags and vidmode on x86-64 [#48633] + +------------------------------------------------------------------- +Fri Nov 12 15:01:36 CET 2004 - schwab@suse.de + +- Don't install *fdisk on ia64. + +------------------------------------------------------------------- +Fri Nov 12 14:50:24 CET 2004 - ro@suse.de + +- correct permissions handling for wall and write + +------------------------------------------------------------------- +Tue Nov 9 16:00:23 CET 2004 - mmj@suse.de + +- Fix segfault with mount -l [#48029] + +------------------------------------------------------------------- +Fri Nov 5 11:36:16 CET 2004 - mmj@suse.de + +- Update to util-linux-2.12i including: + o MCONFIG: fix build conditions + o chfn, chsh: add error checking + o cytune: use local header cyclades.h + o fdisk: fix default SGI volume header size + o fstab.c: use strsignal() instead of sys_siglist[] + o hwclock: use when available on i386 + o hwclock: dont try KDGHWCLK on archs other than __m68k__ + o sfdisk: correct typo in __attribute__used nonsense + o sfdisk: use PACKED on __arm__ + o sfdisk: fix warning printout + +------------------------------------------------------------------- +Thu Nov 4 08:37:19 CET 2004 - mmj@suse.de + +- Update to util-linux-2.12h including: + o cfdisk: avoid crash if no partition table + o elvtune: tell user that this only works on 2.4 kernels + o lomount: clear passwords after use + o mount: accept comments (specified by comment=) in fstab + o mount: support ocfs, ocfs2 + o [u]mount: be more careful with malloc, try to avoid OOM with + many mounts + o sfdisk: __attribute__used nonsense to support gcc 3.4 + o shutdown: do not unmount various virtual filesystems + o mount.8: added recent ext2 mount options + o mount: support jfs mount-by-label, improve reiserfs support + o sfdisk: remove strange "ends in a digit" heuristic + o *fdisk: use common disksize() routine + +------------------------------------------------------------------- +Tue Oct 19 10:24:13 CEST 2004 - mmj@suse.de + +- Add patch from SGI for fdisk label [#47368] + +------------------------------------------------------------------- +Tue Sep 28 11:18:50 CEST 2004 - mmj@suse.de + +- And another one [#46201] + +------------------------------------------------------------------- +Wed Sep 15 23:11:56 CEST 2004 - mmj@suse.de + +- Add patch from Andries to fix cfdisk [#44996] + +------------------------------------------------------------------- +Tue Sep 7 07:32:39 CEST 2004 - mmj@suse.de + +- Update to util-linux-2.12c including: + o mount.8: added recent ext2 mount options + o mount: support jfs mount-by-label, improve reiserfs support + o sfdisk: remove strange "ends in a digit" heuristic + o *fdisk: use common disksize() routine [#44678] + +------------------------------------------------------------------- +Wed Aug 25 12:54:00 CEST 2004 - mmj@suse.de + +- Update to util-linux-2.12b including: + o chsh: improved error message + o dmesg: ask kernel proper buffer size + o losetup: handle 64-bit offsets + o blockdev: also report BLKGETSIZE64 result [#43464] + o blockdev, elvtune, fdisk: handle new kernel _IOR,_IOW defines + o fdisk: remove strange "ends in a digit" heuristic + o fdisk: also list Solaris as possible type for 0x82 + o mount: added --rbind option + o mount: use blkid library + o mount: support reiserfs mount by label + o mount: attempt to use the right definition of dev_t in struct + loopinfo + o mount.8: jfs mount options added + o readprofile: new -s option + o rename.1: added ref to mmv.1 + o replay: renamed to scriptreplay; correct typos + o script: do not use locale for time delay floating point number + format + o sfdisk: error messages to stderr + o New Catalan, Dutch, Finnish, French, German, Spanish, Swedish, + Turkish, Ukrainian messages +- Update the loop-AES patch, thanks to Sumit Bose +- Change the minimum password length to 8 chars + +------------------------------------------------------------------- +Tue Aug 24 08:03:24 CEST 2004 - mmj@suse.de + +- Fix signed/unsigned bug in lsprop [#44048] + +------------------------------------------------------------------- +Wed Aug 18 15:56:01 CEST 2004 - mmj@suse.de + +- Readd patch that got lost to make fdisk -l work better with + RAID controllers [#43485] + +------------------------------------------------------------------- +Mon Aug 9 11:06:34 CEST 2004 - mmj@suse.de + +- Add an improved version of the dmesg bufsize patch. + +------------------------------------------------------------------- +Tue Jun 22 15:50:05 CEST 2004 - mmj@suse.de + +- Add patch to try and guess a filesystem type before blindly + assuming it's nfs because of the colon [#42097] + +------------------------------------------------------------------- +Mon Jun 14 19:21:08 CEST 2004 - agruen@suse.de + +- Formatting error in mount.8 manual page. + +------------------------------------------------------------------- +Wed Jun 9 15:17:47 CEST 2004 - mmj@suse.de + +- Add patch from Olaf Kirch to make protocol selection for mount + independent of protocol selection for NFS, and picks what is + available (preferring TCP over UDP) [#41735] + +------------------------------------------------------------------- +Wed Jun 9 12:10:03 CEST 2004 - mls@suse.de + +- add '-f' option to setctsid + +------------------------------------------------------------------- +Thu May 27 15:07:13 CEST 2004 - okir@suse.de + +- sm-notify now binds to a reserved port + +------------------------------------------------------------------- +Sat May 15 16:15:00 CEST 2004 - mmj@suse.de + +- Add documentation about raw device handling [#39037] + +------------------------------------------------------------------- +Mon May 10 14:40:43 CEST 2004 - mmj@suse.de + +- Make dmesg dump entire buffer. Patch from Andries/odabrunz [#39761] + +------------------------------------------------------------------- +Wed May 6 10:05:16 CEST 2004 - mmj@suse.de + +- Also check if the device is the same when doing swapon. Could be + the same block device with 2 different names [#39436] + +------------------------------------------------------------------- +Wed May 5 11:12:47 CEST 2004 - mmj@suse.de + +- Do a /sbin/modprobe raw when invoking raw devices [#39037] + +------------------------------------------------------------------- +Tue Apr 20 09:28:09 CEST 2004 - mmj@suse.de + +- Update to 2.12a including: + o fdisk: fix for kernels 2.4.15-2.4.17 + o fdisk: fix when all partitions are in use + o hwclock: add a timeout when waiting for a clock update + o ipcs: compilation fix + o ipcs: shminfo.shmall gives pages + o mount: efs support + o partx: bigendian fix + o readprofile: support for 64-bit addresses + o setterm: fix klogctl error message + o setterm.1: clarification + o sfdisk: fix check for is_ide_cdrom_or_tape + o umount: skip proc, devfs, devpts on umount -a + +------------------------------------------------------------------- +Mon Apr 19 11:52:54 CEST 2004 - mmj@suse.de + +- Add patch for unlimited raw devices [#39037] + +------------------------------------------------------------------- +Thu Apr 15 11:08:50 CEST 2004 - mmj@suse.de + +- Make sm-notify be more quiet when nothing wrong, and log to sys- + log when something is. + +------------------------------------------------------------------- +Tue Apr 6 14:45:36 CEST 2004 - mmj@suse.de + +- Don't use startproc for sm-notify [#38481] + +------------------------------------------------------------------- +Mon Apr 5 14:55:39 CEST 2004 - mmj@suse.de + +- Removing elvtune alltogether was a bit drastic, since it of + course works fine with 2.4 kernels. So print a warning in case + the BLKELVGET ioctl returns something indicating 2.6 kernels. + +------------------------------------------------------------------- +Thu Apr 1 19:50:47 CEST 2004 - mmj@suse.de + +- Don't package elvtune anymore since it's obsolete now that io + scheduler can be tuned in /sys/block/hdX/queue/iosched/* [#37869] + +------------------------------------------------------------------- +Wed Mar 31 11:19:28 CEST 2004 - mmj@suse.de + +- Apply util-linux-2.12a fixes for hwclock and readprofile. The + hwclock bit is a timout fix which hopefully fixes [#35877] +- Move sm-notify to here from nfs-utils [#36737] + +------------------------------------------------------------------- +Mon Mar 29 13:26:20 CEST 2004 - mmj@suse.de + +- Adjust warnings about Crypto-API + +------------------------------------------------------------------- +Sun Mar 28 11:00:24 CEST 2004 - mmj@suse.de + +- Add patch to make script allways use the same LC_NUMERIC [#35476] + +------------------------------------------------------------------- +Fri Mar 26 21:38:27 CET 2004 - od@suse.de + +- Add setctsid by Werner Fink [#37177] + +------------------------------------------------------------------- +Fri Mar 26 15:07:00 CET 2004 - mmj@suse.de + +- Mount option "code" is now "codepage" so update /etc/fstab in + postinstall [#36950] + +------------------------------------------------------------------- +Fri Mar 26 11:49:01 CET 2004 - mmj@suse.de + +- Remove false statement in nfs.5 about the linux kernel not + supporting nfs over tcp [#37060] + +------------------------------------------------------------------- +Wed Mar 17 21:41:17 CET 2004 - mmj@suse.de + +- Use correct permissions for README.hashalot [#36303] + +------------------------------------------------------------------- +Mon Mar 8 10:51:46 CET 2004 - mmj@suse.de + +- Enable build of replay [#35434] + +------------------------------------------------------------------- +Wed Feb 25 14:07:15 CET 2004 - mmj@suse.de + +- Use loop-AES-v2.0f-util-linux-2.12.diff instead of losetup patch + added earlier. Thanks Sumit Bose! + +------------------------------------------------------------------- +Thu Feb 19 09:54:03 CET 2004 - mmj@suse.de + +- Add cryptsetup script from Christophe Saout, for usage with the + new dm-crypt. + +------------------------------------------------------------------- +Mon Feb 16 15:32:57 CET 2004 - mmj@suse.de + +- Add losetup patch and hashalot program from Ben Slusky + +------------------------------------------------------------------- +Sun Feb 1 14:11:51 CET 2004 - kukuk@suse.de + +- Remove newgrp again (will use POSIX conform version) + +------------------------------------------------------------------- +Fri Jan 16 13:26:55 CET 2004 - kukuk@suse.de + +- Add pam-devel to neededforbuild + +------------------------------------------------------------------- +Mon Jan 12 11:31:47 CET 2004 - mmj@suse.de + +- Adjust the nfs.5 manual page to reflect we're mounting nfs over + tcp pr. default. +- Collapse two similar patches 2 one. + +------------------------------------------------------------------- +Fri Dec 19 16:43:39 CET 2003 - garloff@suse.de + +- Fix by okir for previous patch. + +------------------------------------------------------------------- +Fri Dec 19 11:19:43 CET 2003 - garloff@suse.de + +- Add patch to fallback to UDP if TCP NFS mount fails. + +------------------------------------------------------------------- +Tue Dec 2 09:03:32 CET 2003 - mmj@suse.de + +- Make patch to guess if a CD is a CD-Extra [#30316] +- Adjust patch that moves ext2/3 in front of vfat +- Regenerate patches (filename still tells when they were added) + +------------------------------------------------------------------- +Tue Nov 18 13:57:28 CET 2003 - mmj@suse.de + +- Mount NFS over TCP pr. default [#33018] + +------------------------------------------------------------------- +Thu Nov 13 14:43:39 CET 2003 - mmj@suse.de + +- Update to util-linux-2.12 including: + o losetup: -p option specifies fd for passphrase + o fdisk: sgi layout fix + o mount: -p option specifies fd for passphrase + o mount: recognize some PCDOS floppies + o umount: in "umount name", first try to interpret "name" as a mount point + o translations updates for several languages + o cfdisk: localize the Y/N answer, improve printing localized messages + o cfdisk: make various variables long long - some disks are close to 2 TB + o cfdisk: use BLKGETSIZE64 + o fdisk: make various variables unsigned to lengthen the life of 32-bit vars + o fdisk: some sgi fixes + o fdisk: k=1000, K=1024 + o fdisk: removed last occurrences of HDIO_REQ + o fdisk: use BLKGETSIZE64 + o hwclock: fix rtc test + o login: set a timeout on printing the timeout message + o md5: x86_64 fix + o more: POSIX fixes + o mount: do not supply MS_MGC_VAL when there are conflicting flags + o mount: ncp and smb are called smbfs and ncpfs - global change + o mount: add support for xvm mount by label + o mount: correct hfs magic recognition + o mount: keep original umask - it influences the mount call + o raw.8: documented unbinding of raw devices + o readprofile: fixed off-by eight error + o script: add -c option + o sfdisk.8: added an example of partitioning with logical partitions + o sfdisk: only add a AA55 signature for DOS-type partition tables + o tailf: new + +------------------------------------------------------------------- +Tue Oct 21 15:49:01 CEST 2003 - mmj@suse.de + +- Correct permissions + +------------------------------------------------------------------- +Tue Oct 21 14:53:54 CEST 2003 - ja@suse.cz + +- added support for cryptoloop in 2.6.x kernels. + +------------------------------------------------------------------- +Wed Oct 15 13:20:54 CEST 2003 - mmj@suse.de + +- Don't build as root + +------------------------------------------------------------------- +Mon Oct 13 21:44:43 CEST 2003 - kukuk@suse.de + +- Enable newgrp + +------------------------------------------------------------------- +Thu Oct 2 11:31:14 CEST 2003 - kukuk@suse.de + +- Fix compiling with kernel 2.6.0-test6 header files + +------------------------------------------------------------------- +Tue Aug 12 15:27:20 CEST 2003 - mmj@suse.de + +- Update to pmac-utils-2.1 sources and only include nvsetenv + +------------------------------------------------------------------- +Tue Aug 12 12:38:18 CEST 2003 - mmj@suse.de + +- Add mount_guessfstype support for PCDOS [#27814] + +------------------------------------------------------------------- +Wed Jun 18 16:16:15 CEST 2003 - ak@suse.de + +- support noreserved option for NFS (#27428) + +------------------------------------------------------------------- +Thu Jun 5 14:06:51 CEST 2003 - mmj@suse.de + +- Rearrange the specfile wrt. archs + +------------------------------------------------------------------- +Tue May 13 11:20:26 CEST 2003 - mmj@suse.de + +- Use %defattr +- Remove files we don't package + +------------------------------------------------------------------- +Wed May 7 15:38:56 CEST 2003 - mmj@suse.de + +- Rearrange the do_guess_fstype() code to look for ext2/3 before + vfat [#26581] + +------------------------------------------------------------------- +Thu Apr 24 12:20:23 CEST 2003 - ro@suse.de + +- fix install_info --delete call and move from preun to postun + +------------------------------------------------------------------- +Mon Apr 14 15:12:27 CEST 2003 - pthomas@suse.de + +- Get rid of the syscall for adjtimex in selective cases and + just call the glibc wrapper. Fixes build on s390. + +------------------------------------------------------------------- +Mon Apr 14 10:35:38 CEST 2003 - pthomas@suse.de + +- Use geteuid instead of getuid in hwclock to enable making + hwclock suid root. + +------------------------------------------------------------------- +Mon Apr 7 15:40:54 CEST 2003 - mmj@suse.de + +- Only delete info entries when removing last version. + +------------------------------------------------------------------- +Thu Mar 13 11:29:54 CET 2003 - mmj@suse.de + +- Apply patch to make sfdisk not destroy BSD slices [#25093] + +------------------------------------------------------------------- +Mon Mar 3 16:19:04 CET 2003 - mmj@suse.de + +- Remove superflous umask(033); calls [#23292] + +------------------------------------------------------------------- +Mon Mar 3 12:27:01 CET 2003 - ro@suse.de + +- add missing info dir entries + +------------------------------------------------------------------- +Tue Feb 18 14:29:45 CET 2003 - agruen@suse.de + +- Add description of the effect of `mount -t nfs -o noacl' on + the use of the GETACL and SETACL remote procedure calls to + the nfs(5) manual page. + +------------------------------------------------------------------- +Mon Feb 17 15:44:28 CET 2003 - mmj@suse.de + +- It's called smbfs not smb [#23697] + +------------------------------------------------------------------- +Thu Feb 13 06:17:02 CET 2003 - mmj@suse.de + +- Readd patch for passphrase timeout that got lost [#23527] + +------------------------------------------------------------------- +Fri Feb 7 12:24:12 CET 2003 - mmj@suse.de + +- The install_info macros need PreReq: %install_info_prereq + +------------------------------------------------------------------- +Fri Feb 7 01:30:53 CET 2003 - ro@suse.de + +- added install_info macros + +------------------------------------------------------------------- +Tue Feb 4 22:34:10 CET 2003 - ro@suse.de + +- don't package /bin/kill (part of coreutils now) + +------------------------------------------------------------------- +Tue Feb 4 12:40:00 CET 2003 - meissner@suse.de + +- Include tarball with pmac-utils manpages, so we do not need + sgmltool and all its dependents. + +------------------------------------------------------------------- +Wed Jan 29 11:52:19 CET 2003 - mmj@suse.de + +- Update to util-linux-2.11z including: + Translation updates + mount: fix LABEL= handling for user umount, don't abort on read + error with photocds and add dmask and fmask vfat mount options + setterm: accept devfs name + simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails + umount: allow user umount after mount by label or uuid + +------------------------------------------------------------------- +Wed Jan 22 15:10:24 CET 2003 - sf@suse.de + +- removed last patch, added new (correct) patch + +------------------------------------------------------------------- +Wed Jan 22 12:48:30 CET 2003 - sf@suse.de + +- removed eliminate_doubles() from mkfs.cramfs.c + for x86_64, as it segfaults. + (makes the images slightly larger, about 10%) + +------------------------------------------------------------------- +Tue Jan 21 14:51:29 CET 2003 - mmj@suse.de + +- Added description of ISO mount options to mount.8 [#22915] + +------------------------------------------------------------------- +Mon Dec 2 12:21:38 CET 2002 - mmj@suse.de + +- Update the ReiserFS patch from Chris Mason + +------------------------------------------------------------------- +Fri Nov 29 10:38:02 CET 2002 - mmj@suse.de + +- Fix missing #include + +------------------------------------------------------------------- +Thu Nov 28 15:03:05 CET 2002 - mmj@suse.de + +- Make readprofile also try to locate the System.map in + /boot/System.map-`uname -r` [#22168] + +------------------------------------------------------------------- +Wed Nov 27 11:01:52 CET 2002 - mmj@suse.de + +- Update to util-linux-2.11y including: + o Translation updates + o fdisk,cfdisk: cosmetic fixes + o mount,umount: fix LABEL= handling for non-root [#17322] + o more: kill external help file + o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC + fails (patch we had, now folded upstream) + +------------------------------------------------------------------- +Wed Nov 20 12:19:33 CET 2002 - mmj@suse.de + +- Update to util-linux-2.11x including: + o Translation updates for several languages + o cfdisk: correct error printout + o fdisk: allow addition of a new partition when logicals all used + but primary free + o hwclock: detect systime jumps backward during setting hwclock + o Merge of the cramfs bloksize patch + o mount: new --rbind flag, for recursive loopback mounts + o mount, umount: new -O option + o setpwnam.c: open temp pw file with O_EXCL + o simpleinit: fix for "spawn too fast" + o swapon: new -e option + +------------------------------------------------------------------- +Tue Nov 19 20:12:02 CET 2002 - mmj@suse.de + +- Fix multistring assignment in adjtimex + +------------------------------------------------------------------- +Mon Nov 11 11:26:14 CET 2002 - ro@suse.de + +- changed neededforbuild to +- changed neededforbuild to <> + +------------------------------------------------------------------- +Thu Oct 31 14:59:11 CET 2002 - mmj@suse.de + +- Add -b option to mkfs.cramfs (needed for biarch architectures) + +------------------------------------------------------------------- +Thu Oct 31 00:40:09 CET 2002 - ro@suse.de + +- hack time to build on alpha + +------------------------------------------------------------------- +Tue Oct 22 16:13:36 CEST 2002 - mmj@suse.de + +- Add correction to the ReiserFS patch that fixes the case where it + was possible but unlikely to detect a logged copy of a super on a + dedicated logging device as the real thing. From Chris Mason. + +------------------------------------------------------------------- +Tue Oct 22 14:13:30 CEST 2002 - mmj@suse.de + +- Update to util-linux-2.11w including: + o fdisk and cfdisk fixes + o more bigendian fix + o translation updates + o > 2GB swapspace + o mount umask, cramfs and ocfs stuff + +------------------------------------------------------------------- +Tue Oct 8 17:13:18 CEST 2002 - mmj@suse.de + +- Only enable below patch on ix86 and x86_64 + +------------------------------------------------------------------- +Mon Oct 7 16:35:24 CEST 2002 - mmj@suse.de + +- Make small bugfix to below patch + +------------------------------------------------------------------- +Sat Oct 5 01:27:51 CEST 2002 - mmj@suse.de + +- Apply patch to enable > 2GB swap (redhat) [#20533] + +------------------------------------------------------------------- +Wed Oct 2 15:27:47 CEST 2002 - mmj@suse.de + +- Add one-liner security fix to mount and umount. + +------------------------------------------------------------------- +Mon Sep 23 09:47:33 CEST 2002 - mmj@suse.de + +- Readd fix for klogconsole that got lost [#19834] + +------------------------------------------------------------------- +Fri Sep 13 12:55:24 CEST 2002 - mmj@suse.de + +- Added patch from Oracle to mount ocfs by label [#19262] + +------------------------------------------------------------------- +Thu Sep 12 18:06:21 CEST 2002 - mmj@suse.de + +- more: Do not cast char * to int and back [#18896] + +------------------------------------------------------------------- +Sat Aug 31 17:58:26 CEST 2002 - olh@suse.de + +- add mount_cramfs_be.diff to allow mount -oloop cramfsfile loopdir + +------------------------------------------------------------------- +Mon Aug 26 16:56:52 CEST 2002 - mmj@suse.de + +- Make mode not 666 when writing /etc/mtab [#18342] + +------------------------------------------------------------------- +Mon Aug 26 13:21:30 CEST 2002 - meissner@suse.de + +- quieten klogconsole if the console does not support TIOCLINUX [#12516] + +------------------------------------------------------------------- +Thu Aug 22 15:05:32 CEST 2002 - mmj@suse.de + +- Added patch from Andreas Gruenbacher for nfs-access-acl [#18183] + +------------------------------------------------------------------- +Wed Aug 21 10:33:05 CEST 2002 - mmj@suse.de + +- Fixed an mtab locking bug with patch from Olaf Kirch [#17637] + +------------------------------------------------------------------- +Mon Aug 19 16:46:54 CEST 2002 - mmj@suse.de + +- Updated reiserfs patch from Chris Mason +- Added patch for mount.8, thanks Andreas Gruenbacher + +------------------------------------------------------------------- +Thu Aug 15 19:56:31 CEST 2002 - mmj@suse.de + +- Correct PreReq: + +------------------------------------------------------------------- +Mon Aug 5 10:45:05 CEST 2002 - mmj@suse.de + +- Update to 2.11u which includes: + o Danish, German, Spanish, Swedish and Turkish updates. + o configure: for fsck.cramfs, mkfs.cramfs: add test for libz + o text-utils/Makefile: pg fix + o agetty: use same test as login does to find utmp entry + o fdisk: fix for fdisk on empty disk + o mount updates + +------------------------------------------------------------------- +Tue Jul 23 21:10:27 CEST 2002 - schwab@suse.de + +- Fix mkfs.cramfs for architectures with non-4k pages. + +------------------------------------------------------------------- +Wed Jul 17 00:34:49 CEST 2002 - mmj@suse.de + +- Merged base into util-linux + +------------------------------------------------------------------- +Mon Jul 15 10:23:51 CEST 2002 - mmj@suse.de + +- Added JFSv2 patch from Christoph Hellwig for volume label. Does + for JFS, what below patch does for ReiserFS. + +------------------------------------------------------------------- +Sun Jul 14 19:04:16 CEST 2002 - adrian@suse.de + +- fix ul-2.10m-sgi-fdisk.diff patch to apply again + +------------------------------------------------------------------- +Thu Jul 11 10:36:16 CEST 2002 - mmj@suse.de + +- Added patch from Chris Mason for volume label on reiserfs + +------------------------------------------------------------------- +Wed Jul 10 15:31:53 CEST 2002 - olh@suse.de + +- add mkfs.cramfs and fsck.cramfs to file list + +------------------------------------------------------------------- +Wed Jul 10 15:12:48 CEST 2002 - mmj@suse.de + +- Fixed nfs.5 to tell nfsver defaults to 3 [#16815] + +------------------------------------------------------------------- +Mon Jul 8 21:16:07 CEST 2002 - mmj@suse.de + +- Update to 2.11t which includes + * fdformat: remove test on major + * fdisk, hwclock and swap polishing + * Lots of translations + * cramfs tools includes from the kernel + * swap{on,off} honours /proc/swaps + * mount small fixups + +------------------------------------------------------------------- +Fri Jul 5 11:10:06 CEST 2002 - kukuk@suse.de + +- Use %ix86 macro + +------------------------------------------------------------------- +Mon Jul 1 14:23:38 CEST 2002 - bk@suse.de + +- get raw built on s390 and s390x +- remove %ifarchs s390 s390x for fdisk(needed for SCSI disks) + +------------------------------------------------------------------- +Mon Jun 17 10:52:49 CEST 2002 - mmj@suse.de + +- Added a fix for simpleinit exploit. + +------------------------------------------------------------------- +Thu Jun 13 17:01:38 CEST 2002 - olh@suse.de + +- disable hwclock ppc patch, maybe obsolete with recent kernels + +------------------------------------------------------------------- +Thu May 16 12:57:53 CEST 2002 - mmj@suse.de + +- Added manpage guessfstype(8) + +------------------------------------------------------------------- +Thu May 9 19:07:21 CEST 2002 - mmj@suse.de + +- Updated to util-linux-2.11r, including translations, x86-64 sup- + port and small bugfixes. + +------------------------------------------------------------------- +Sat Apr 13 14:19:46 CEST 2002 - mmj@suse.de + +- Updated to util-linux-2.11q, includes bugfixes. +- util-linux-mkswap.patch for ia64 was folded into mainline + +------------------------------------------------------------------- +Fri Apr 12 16:49:38 CEST 2002 - stepan@suse.de + +- added x86-64 support. + +------------------------------------------------------------------- +Thu Apr 4 20:06:09 CEST 2002 - ihno@suse.de + +- corrected printf to report shared memories sizes bigger than + 2 GByte correct (Bug #15585). It was reportet on s390x, but + should effect other 64-Bit systems as well. + +------------------------------------------------------------------- +Tue Mar 19 13:41:04 MET 2002 - mmj@suse.de + +- Updated to 2.11o. The hexdump patch have been dropped since it + was folded to mainline util-linux. + +------------------------------------------------------------------- +Fri Mar 15 12:08:15 CET 2002 - schwab@suse.de + +- Fix mkswap for ia64. + +------------------------------------------------------------------- +Mon Mar 4 16:21:41 MET 2002 - draht@suse.de + +- permissions fixes for write(1) and wall(1) + +------------------------------------------------------------------- +Fri Feb 1 14:46:45 CET 2002 - mmj@suse.de + +- Moved /usr/bin/logger to /bin/logger (needed by sysconfig) + +------------------------------------------------------------------- +Mon Jan 28 13:59:26 CET 2002 - mmj@suse.de + +- Added the guessfstype binary from msvec/fehr + +------------------------------------------------------------------- +Thu Jan 24 10:16:37 CET 2002 - ro@suse.de + +- modified fillup_and_insserv call (perl-hack not needed here) + +------------------------------------------------------------------- +Mon Jan 21 17:08:17 CET 2002 - mmj@suse.de + +- Merge NetBSD hexdump changes, fixes bugzilla #12801 + +------------------------------------------------------------------- +Thu Jan 10 14:18:21 CET 2002 - ro@suse.de + +- removed ACTIVATE_RAW_DEV + +------------------------------------------------------------------- +Mon Dec 31 19:05:45 UTC 2001 - adrian@suse.de + +- add patch for mips to create SGI partition tables with fdisk + +------------------------------------------------------------------- +Tue Dec 18 16:50:34 CET 2001 - bjacke@suse.de + +- add adjtimex + +------------------------------------------------------------------- +Mon Dec 10 18:22:06 CET 2001 - mmj@suse.de + +- Update to util-linux-2.11n + +------------------------------------------------------------------- +Tue Nov 20 14:48:25 CET 2001 - mmj@suse.de + +- Added a patch to 'wall' to remove unwanted newline (#12181) + +------------------------------------------------------------------- +Wed Nov 7 14:15:51 CET 2001 - kukuk@suse.de + +- Remove unneeded SPARC patch for hwclock + +------------------------------------------------------------------- +Sat Oct 13 20:59:29 CEST 2001 - kukuk@suse.de + +- Update to util-linux 2.11l + +------------------------------------------------------------------- +Wed Sep 12 00:13:22 MEST 2001 - garloff@suse.de + +- Fixed some dutch translations. (bug #10276) + +------------------------------------------------------------------- +Mon Sep 10 19:31:57 CEST 2001 - olh@suse.de + +- marry fdisk and AIX label again... + add lsprop for ppc + dumps the device tree in a human readable format + +------------------------------------------------------------------- +Mon Sep 3 09:50:11 CEST 2001 - kukuk@suse.de + +- Update to version 2.11i: + - blockdev: corrected ioctl numbers + - cal: fixed for multibyte locales + - line: new + - mount: added vxfs magic + +------------------------------------------------------------------- +Sat Sep 1 19:08:46 CEST 2001 - kukuk@suse.de + +- Let mount follow symlinks again + +------------------------------------------------------------------- +Wed Aug 29 16:00:18 CEST 2001 - kukuk@suse.de + +- Add new option to losetup manual page + +------------------------------------------------------------------- +Tue Aug 28 18:24:14 MEST 2001 - draht@suse.de + +- added timeout support for losetup (-t ) + +------------------------------------------------------------------- +Mon Aug 27 15:24:25 CEST 2001 - kukuk@suse.de + +- Add raw rc scripts, too + +------------------------------------------------------------------- +Sun Aug 26 08:51:29 CEST 2001 - bjacke@suse.de + +- added raw binary and put rawio into obsoletes and provides + +------------------------------------------------------------------- +Sat Aug 25 20:22:58 CEST 2001 - kukuk@suse.de + +- Fix path in getopt.1 manual page to example directory [Bug #9831] + +------------------------------------------------------------------- +Fri Aug 24 16:00:13 CEST 2001 - kukuk@suse.de + +- Small fix for hwclock on newer SPARCs + +------------------------------------------------------------------- +Mon Aug 13 15:51:59 CEST 2001 - ro@suse.de + +- changed neededforbuild to + +------------------------------------------------------------------- +Mon Jul 30 10:59:46 CEST 2001 - kukuk@suse.de + +- Update to util-linux-2.11h +- Add nologin program + +------------------------------------------------------------------- +Tue Jul 10 16:44:35 CEST 2001 - kukuk@suse.de + +- Remove swapdev from filelist + +------------------------------------------------------------------- +Tue Jul 10 13:10:23 CEST 2001 - kukuk@suse.de + +- Update to util-linux-2.11g + +------------------------------------------------------------------- +Wed Jun 6 17:25:33 EDT 2001 - bk@suse.de + +- added s390x to all ifnarch s390 + +------------------------------------------------------------------- +Fri Apr 20 12:09:40 CEST 2001 - kukuk@suse.de + +- Fix wall bug (character 80, 160, 240, are missing) [Bug #6962] + +------------------------------------------------------------------- +Mon Mar 26 10:24:40 CEST 2001 - kukuk@suse.de + +- Add exception for broken i2o disk device numbering scheme, kernel + hacker are not able to fix this and make it right [Bug #5881]. + +------------------------------------------------------------------- +Sat Mar 24 15:27:56 CET 2001 - kukuk@suse.de + +- Update to util-linux 2.11b + +------------------------------------------------------------------- +Thu Mar 15 15:47:34 CET 2001 - kukuk@suse.de + +- Fix changing of partitions with ID 0 on SPARC +- Remove duplicate mount patch + +------------------------------------------------------------------- +Wed Mar 14 21:29:23 CET 2001 - schwab@suse.de + +- Don't use _syscallX on ia64. +- Fix missing includes. + +------------------------------------------------------------------- +Wed Mar 14 11:05:22 CET 2001 - kukuk@suse.de + +- Update to version 2.11a + +------------------------------------------------------------------- +Fri Mar 2 17:05:01 CET 2001 - kukuk@suse.de + +- enable write again + +------------------------------------------------------------------- +Mon Feb 12 15:23:14 CET 2001 - kukuk@suse.de + +- cmos.c: Use sys/io.h, fix PowerPC hack + +------------------------------------------------------------------- +Tue Feb 6 11:54:34 CET 2001 - ro@suse.de + +- wall.c: include time.h + +------------------------------------------------------------------- +Mon Feb 5 11:13:56 CET 2001 - kukuk@suse.de + +- Split hex to extra package +- Update to util-linux-2.10s + +------------------------------------------------------------------- +Fri Feb 2 12:18:56 CET 2001 - werner@suse.de + +- Make swapon/swapoff more handy: + * Ignore swap files on ro mounted file systems + * If -a is given ignore already active devices at swapon + * If -a is given ignore not active devices at swapoff + +------------------------------------------------------------------- +Thu Jan 25 00:37:22 CET 2001 - ro@suse.de + +- added Provides: util + +------------------------------------------------------------------- +Fri Jan 12 10:08:29 MET 2001 - garloff@suse.de + +- Apply patch to lomount to allow all kerneli crypt algos to be + passed and allow to pass passwd with -k. +- losetup seems to support >2GB files just fine (#5433) + +------------------------------------------------------------------- +Tue Jan 2 12:04:33 CET 2001 - kukuk@suse.de + +- Save permissions of /etc/mtab [Bug #5027] + +------------------------------------------------------------------- +Tue Dec 5 15:25:45 CET 2000 - kukuk@suse.de + +- Search first in /etc/filesystems, then in /proc/filesystems + +------------------------------------------------------------------- +Tue Dec 5 11:24:34 CET 2000 - kukuk@suse.de + +- Use AIX/fdisk patch from util-linux-2.10r +- Backport "guess filesystems" from util-linux-2.10r + +------------------------------------------------------------------- +Tue Dec 5 11:10:10 CET 2000 - schwab@suse.de + +- Don't use _syscallX on ia64. + + +------------------------------------------------------------------- +Mon Dec 4 09:27:28 CET 2000 - olh@suse.de + +- fix diff again + +------------------------------------------------------------------- +Sun Dec 3 00:09:16 CET 2000 - olh@suse.de + +- no segfaults with AIX disklabels + +------------------------------------------------------------------- +Wed Nov 29 18:21:25 CET 2000 - uli@suse.de + +- fixed to build on PPC + +------------------------------------------------------------------- +Mon Nov 27 19:03:20 CET 2000 - schwab@suse.de + +- Fix broken casts in hwclock. + +------------------------------------------------------------------- +Thu Nov 23 15:48:35 CET 2000 - bk@suse.de + +- temporary disable pivot_root on s390(2.4 kernel is not yet built) + +------------------------------------------------------------------- +Wed Nov 22 13:28:06 CET 2000 - schwab@suse.de + +- Add pivot_root to file list. + +------------------------------------------------------------------- +Mon Nov 20 11:37:35 CET 2000 - kukuk@suse.de + +- Fix pmac-utils to compile with new kernel + +------------------------------------------------------------------- +Fri Nov 17 19:40:20 CET 2000 - kukuk@suse.de + +- Fix hwclock to compile on PPC + +------------------------------------------------------------------- +Wed Nov 15 12:39:13 CET 2000 - kukuk@suse.de + +- Update util-linux to 2.10q, merge flushb.diff + +------------------------------------------------------------------- +Thu Nov 2 10:21:12 CET 2000 - kukuk@suse.de + +- Remove some of the last specfile changes + +------------------------------------------------------------------- +Wed Nov 1 14:17:07 CET 2000 - olh@suse.de + +- update pmac-utils for new powermacs, cleanup specfile + +------------------------------------------------------------------- +Fri Oct 20 14:58:09 CEST 2000 - kukuk@suse.de + +- Update util-linux to 2.10p +- Rename package from util to util-linux + +------------------------------------------------------------------- +Wed Sep 27 11:30:21 CEST 2000 - kukuk@suse.de + +- Allow NFS v3 with 2.2.17.SuSE + +------------------------------------------------------------------- +Tue Sep 26 17:54:23 CEST 2000 - kukuk@suse.de + +- Fix mount for new NFS kernel patch + +------------------------------------------------------------------- +Sat Sep 9 17:36:24 CEST 2000 - kukuk@suse.de + +- Remove tcsh dependency +- Update to util-linux 2.10o, use of /etc/filesystems is still broken + +------------------------------------------------------------------- +Fri Aug 25 17:05:50 MEST 2000 - pthomas@suse.de + +- use %{_mandir} and %{_infodir} exclusively. This allows building + from source rpm on platforms other than 7.0. + +------------------------------------------------------------------- +Wed Jul 19 00:50:48 CEST 2000 - bk@suse.de + +- s390: removed dasdfmt and silo, %ifnarch s390 for some non-s390 things. + +------------------------------------------------------------------- +Tue May 30 18:45:56 CEST 2000 - bk@suse.de + +- added dasdfmt and silo on s390 + +------------------------------------------------------------------- +Mon May 15 18:15:05 CEST 2000 - kukuk@suse.de + +- util-linux: Update to 2.10m + +------------------------------------------------------------------- +Wed Apr 26 11:22:54 CEST 2000 - kukuk@suse.de + +- flusb: Don't use kernel headers, even if we don't need them! + +------------------------------------------------------------------- +Wed Apr 19 13:56:28 CEST 2000 - kukuk@suse.de + +- util-linux: Update to 2.10l + +------------------------------------------------------------------- +Mon Apr 17 15:06:51 CEST 2000 - kukuk@suse.de + +- util-linux: Update to 2.10k + +------------------------------------------------------------------- +Thu Apr 13 15:57:45 CEST 2000 - kukuk@suse.de + +- Move /sbin/setserial to /bin/setserial, add compat link to + /sbin. This fixes [Bug 1084] and is necessary for FHS 2.1 + +------------------------------------------------------------------- +Wed Apr 12 15:43:05 CEST 2000 - kukuk@suse.de + +- Fix util-linux for Alpha + +------------------------------------------------------------------- +Wed Apr 12 14:36:41 CEST 2000 - kukuk@suse.de + +- util-linux: Update to 2.10j + +------------------------------------------------------------------- +Sun Apr 2 01:08:05 CEST 2000 - bk@suse.de + +- suse s390 team added support for s390 + +------------------------------------------------------------------- +Thu Mar 30 21:31:15 CEST 2000 - uli@suse.de + +- hwclock/PPC: added support for MK48T559 RTC chip used in MTX+ boards + +------------------------------------------------------------------- +Fri Mar 24 11:49:25 CET 2000 - kukuk@suse.de + +- Add Linux LVM partition tag to fdisk +- Fix a lot of more possible buffer overruns +- Fix some fdisk sunlabel bugs +- added BuildRoot fixes from nadvorni@suse.cz + +------------------------------------------------------------------- +Wed Mar 22 14:28:27 CET 2000 - kukuk@suse.de + +- Update util-linux to 2.10h +- Add clock again for non PPC platforms + +------------------------------------------------------------------- +Fri Mar 17 15:10:50 CET 2000 - uli@suse.de + +- now contains both hwclock and clock on PPC (/sbin/init.d/boot + chooses what to run at runtime) + +------------------------------------------------------------------- +Tue Mar 14 19:23:26 CET 2000 - schwab@suse.de + +- Add support for ia64. + +------------------------------------------------------------------- +Thu Mar 9 21:25:15 CET 2000 - kukuk@suse.de + +- fdisk: Fix -l for Mylex RAID controller + +------------------------------------------------------------------- +Tue Mar 7 17:23:57 CET 2000 - kukuk@suse.de + +- etc/filesystems: Add minix and reiserfs + +------------------------------------------------------------------- +Tue Mar 7 11:49:23 CET 2000 - kukuk@suse.de + +- mount: fix endian problem with minix fs + +------------------------------------------------------------------- +Tue Feb 15 12:11:50 CET 2000 - kukuk@suse.de + +- mount: Add hack for PPC/syscall mount problem + +------------------------------------------------------------------- +Sun Feb 13 05:16:13 CET 2000 - bk@suse.de + +- let rdev continue in case it stubles over a bad file in /dev (/dev/snd fix) + +------------------------------------------------------------------- +Fri Feb 4 17:14:07 CET 2000 - kukuk@suse.de + +- Make PPC clock parameter compatible to hwclock + +------------------------------------------------------------------- +Thu Feb 3 14:42:23 CET 2000 - kukuk@suse.de + +- Fix filelist for SPARC + +------------------------------------------------------------------- +Thu Feb 3 11:14:29 CET 2000 - kukuk@suse.de + +- util-linux: Update to 2.10f (mount security fix) + +------------------------------------------------------------------- +Sun Jan 23 15:45:08 CET 2000 - kukuk@suse.de + +- util-linux: Update to 2.10e + +------------------------------------------------------------------- +Tue Jan 18 19:18:08 CET 2000 - kukuk@suse.de + +- mount now looks at first in /etc/filesystems and then in + /proc/filesystems + +------------------------------------------------------------------- +Tue Jan 18 16:32:05 CET 2000 - ro@suse.de + +- fixed pmac-utils to build with 2.3 as well + +------------------------------------------------------------------- +Tue Jan 18 14:56:22 CET 2000 - kukuk@suse.de + +- Fix a lot of fdisk buffer overruns [Bug 1642] + +------------------------------------------------------------------- +Mon Jan 17 18:23:56 CET 2000 - kukuk@suse.de + +- Fix setserial for Linux 2.3.40 +- Remove write, is now in nkitb +- Build minix and bfs tools for SPARC +- Fix some buffer overflows in fdisk + +------------------------------------------------------------------- +Fri Dec 17 15:00:19 MET 1999 - kukuk@suse.de + +- util-linux: Update to 2.10d +- hex: Update to 1.2 +- Move manual pages to /usr/share/man + +------------------------------------------------------------------- +Tue Nov 30 18:28:14 CET 1999 - uli@suse.de + +- re-added hwclock link for PPC (2nd try) + +------------------------------------------------------------------- +Tue Nov 30 17:49:27 MET 1999 - uli@suse.de + +- re-added hwclock link for PPC + +------------------------------------------------------------------- +Mon Nov 15 12:39:41 MET 1999 - kukuk@suse.de + +- util-linux: Update to 2.10b + +------------------------------------------------------------------- +Sat Nov 13 15:36:37 MET 1999 - kukuk@suse.de + +- setserial: Add Patch for Sparc +- Fix filelist for Sparc + +------------------------------------------------------------------- +Wed Oct 27 04:03:42 CEST 1999 - garloff@suse.de + +- added flushb (moved here from ddrescue). +- fix bug in logger (remove trailing newlines). + +------------------------------------------------------------------- +Fri Oct 22 11:29:51 MEST 1999 - kukuk@suse.de + +- util-linux: Remove old patches for mk_loop_h + +------------------------------------------------------------------- +Sat Oct 16 16:40:13 MEST 1999 - kukuk@suse.de + +- util-linux: Update to 2.9z + +------------------------------------------------------------------- +Fri Oct 8 10:58:48 MEST 1999 - kukuk@suse.de + +- Update to util-linux-2.9y (execpt fdisk) + +------------------------------------------------------------------- +Tue Sep 14 18:14:53 CEST 1999 - uli@suse.de + +- added PMac-specific utils for PPC + +------------------------------------------------------------------- +Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de + +- ran old prepare_spec on spec file to switch to new prepare_spec. + +------------------------------------------------------------------- +Thu Aug 26 15:05:03 CEST 1999 - uli@suse.de + +- disabled hayesesp for PPC + +------------------------------------------------------------------- +Wed Aug 25 18:04:35 MEST 1999 - kukuk@suse.de + +- Don?t install tsort, its now in textutils 2.0 + +------------------------------------------------------------------- +Tue Aug 24 10:11:06 MEST 1999 - kukuk@suse.de + +- Update to util-linux-2.9w (execpt fdisk) + +------------------------------------------------------------------- +Mon Aug 9 10:55:48 MEST 1999 - kukuk@suse.de + +- Update to util-linux-2.9v (execpt fdisk) + +------------------------------------------------------------------- +Tue Jul 20 18:01:29 CEST 1999 - garloff@suse.de + +- Added hex from Erich S. Raymond + +------------------------------------------------------------------- +Mon Jul 12 12:11:45 MEST 1999 - kukuk@suse.de + +- Add fdisk patch from Klaus G. Wagner +- Add mount patch from util-linux 2.9u + +------------------------------------------------------------------- +Tue Jul 6 12:23:47 MEST 1999 - kukuk@suse.de + +- update to util-linux-2.9t + +------------------------------------------------------------------- +Fri Jun 25 14:44:30 MEST 1999 - kukuk@suse.de + +- update to util-linux-2.9s + +------------------------------------------------------------------- +Wed Mar 3 11:25:50 MET 1999 - ro@suse.de + +- hwclock.c: always use busywait to get rtctime + (it's hard to find out at runtime if we will get an irq) + +------------------------------------------------------------------- +Tue Mar 2 00:42:15 MET 1999 - ro@suse.de + +- update to util-linux-2.9i +- update to setserial-2.15 +- using diffs from jurix and add-ons from kgw for compaq smart raid + +------------------------------------------------------------------- +Mon Feb 1 10:22:10 MET 1999 - ro@suse.de + +- rdev is not built on alpha + +------------------------------------------------------------------- +Mon Jan 18 21:29:36 MET 1999 - florian@suse.de + +- fixed one broken case to delete a partition in fdisk + +------------------------------------------------------------------- +Sun Dec 13 22:20:16 MET 1998 - bs@suse.de + +- fixed file list + +------------------------------------------------------------------- +Thu Dec 10 16:38:08 MET 1998 - fehr@suse.de + +- fix bug in fdisk + +------------------------------------------------------------------- +Tue Dec 8 15:43:23 MET 1998 - ro@suse.de + +- removed last from filelist +- added link /sbin/clock -> hwclock + +------------------------------------------------------------------- +Wed Nov 4 00:23:02 MET 1998 - ro@suse.de + +- fdisksunlabel: don't include scsi/scsi.h for glibc-2.0 + +------------------------------------------------------------------- +Fri Oct 30 11:46:38 MET 1998 - ro@suse.de + +- update to 2.9 / added hostid from previous diff +- copied some glibc changes from previous diff (strcpy..) + +------------------------------------------------------------------- +Thu Sep 17 13:04:14 MEST 1998 - ro@suse.de + +- define _GNU_SOURCE when using getopt + +------------------------------------------------------------------- +Mon Aug 31 16:12:36 MEST 1998 - ro@suse.de + +- full switch to util-linux 2.8 +-- sync has moved to pkg fileutils +-- chroot has moved to pkg sh_utils (has been there for a while) +-- adopted hostid from previous suse-pkg + +------------------------------------------------------------------- +Mon Aug 24 10:46:33 MEST 1998 - ro@suse.de + +- switched to use mount from util-linux-2.8 + +------------------------------------------------------------------- +Tue Jun 23 10:46:45 MEST 1998 - ro@suse.de + +- added fdisk, sfdisk, cfdisk from util-linux-2.8 + (including man-pages,readmes) + +------------------------------------------------------------------- +Mon Nov 17 14:14:47 MET 1997 - ro@suse.de + +- changed /local/bin/perl5 in chkdupexe to /usr/bin/perl + +------------------------------------------------------------------- +Fri Oct 31 13:38:58 MET 1997 - ro@suse.de + +- temporarily removed mount-hacker + +------------------------------------------------------------------- +Wed Oct 29 23:44:37 MET 1997 - florian@suse.de + +- add changes from ms@suse.de for hostid.c + + +------------------------------------------------------------------- +Tue May 20 14:10:37 MEST 1997 - florian@suse.de + + +- only support kernel 2.0.x for nfs mounts, please use /bin/mount-hacker + for kernel 2.1.x + + +------------------------------------------------------------------- +Wed Apr 30 15:57:14 CEST 1997 - florian@suse.de + + +- update to mount 2.6g + + +------------------------------------------------------------------- +Sun Apr 13 23:04:29 MEST 1997 - florian@suse.de + + +- update to new version util-linux 2.6 + +- update to new version mount 2.6e + + + +------------------------------------------------------------------- +Sat Nov 2 17:35:11 CET 1996 - florian@suse.de + + +- update to mount 2.5p + + +------------------------------------------------------------------- +Thu Oct 17 16:05:09 CEST 1996 - florian@suse.de + + +- Update auf neue Version von mount 2.5o. + + +------------------------------------------------------------------- +Tue Sep 3 17:01:45 MET DST 1996 - florian@suse.de + + +- updated to new version mount 2.5m +- (u)mount now gives much better error messages + + +------------------------------------------------------------------- +Sun Aug 25 19:28:50 MET DST 1996 - bs@suse.de + +compile setterm with libtermcap and not libncurses +use newer mount instead of the old version in util-linux +(security fix) diff --git a/python-libmount.spec b/python-libmount.spec new file mode 100644 index 0000000..d6c54fa --- /dev/null +++ b/python-libmount.spec @@ -0,0 +1,1328 @@ +# +# spec file for package python-libmount +# +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%bcond_without sysvinit_tools +%bcond_without enable_su +%bcond_without enable_eject +%bcond_with enable_last + +Name: python-libmount +%define _name util-linux +# WARNING: After editing this file please call pre_checkin.sh to update spec files: +%define _name util-linux +# To prevent dependency loop in automatic build systems, we want to +# build util-linux in parts. To build all at once, set build_all to 1. +# +# build_util_linux: First stage build builds all except: +# build_util_linux_systemd: Builds util-linux-systemd and uuidd. +# build_python_libmount: Builds python-libmount. +%define build_all 0 +%if "%{name}" == "python-libmount" +%define build_util_linux 0 +%define build_util_linux_systemd 0 +%define build_python_libmount 1 +# To prevent dependency loops, verify signature only in third stage. +%define verify_sig 1 +%else +%if "%{name}" == "util-linux-systemd" +%define build_util_linux 0 +%define build_util_linux_systemd 1 +%define build_python_libmount 0 +%define verify_sig 0 +%else +%if %build_all +%define build_util_linux 1 +%define build_util_linux_systemd 1 +%define build_python_libmount 1 +%define verify_sig 1 +%else +%define build_util_linux 1 +%define build_util_linux_systemd 0 +%define build_python_libmount 0 +%define verify_sig 0 +%endif +%endif +%endif +BuildRequires: audit-devel +BuildRequires: bc +BuildRequires: binutils-devel +BuildRequires: fdupes +BuildRequires: gettext-devel +BuildRequires: libcap-ng-devel +BuildRequires: libselinux-devel +BuildRequires: libsepol-devel +BuildRequires: libtool +BuildRequires: ncurses-devel +BuildRequires: pam-devel +BuildRequires: pkg-config +BuildRequires: readline-devel +BuildRequires: utempter-devel +BuildRequires: zlib-devel +%if %verify_sig +BuildRequires: gpg-offline +%endif +%if %build_util_linux_systemd +%if 0%{?suse_version} <= 1230 +BuildRequires: pkgconfig(systemd) +%else +BuildRequires: systemd-rpm-macros +BuildRequires: pkgconfig(libsystemd-daemon) +BuildRequires: pkgconfig(libsystemd-journal) +%endif +%endif +%if %build_python_libmount +BuildRequires: python-devel +%endif +#BEGIN SECOND STAGE DEPENDENCIES +%if !%build_util_linux +%if %build_util_linux_systemd +BuildRequires: libblkid-devel +BuildRequires: libmount-devel +BuildRequires: libsmartcols-devel +BuildRequires: libuuid-devel +%endif +%if %build_python_libmount +BuildRequires: libmount-devel +%endif +%endif +#END SECOND STAGE DEPENDENCIES +Version: 2.25 +Release: 0 +# util-linux is a base package and uuidd pre-requiring pwdutils pulls +# that into the core build cycle. pwdutils also pulls in the whole +# ldap stack into it. Avoid this whole mess which is done only to +# make the rpm install check of uuidd happy which has support to work without +# these tools as well +#!BuildIgnore: pwdutils +Url: https://www.kernel.org/pub/linux/utils/util-linux/ +#BEGIN UGLY HACK +%if 0 +# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) +Summary: TRAP +License: GPL-2.0+ +Group: System/Filesystems +%endif +# UGLY HACK: License tag is errorneously moved here on every call of format_spec_file. %%include cannot be broken by format_spec_file. +%include %{_sourcedir}/util-linux.preamble +#END UGLY HACK +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.xz +Source1: util-linux-rpmlintrc +Source4: raw.init +Source5: etc.raw +Source6: etc_filesystems +Source7: baselibs.conf +Source8: login.pamd +Source9: remote.pamd +Source10: su.pamd +Source11: su.default +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.sign +Source13: %{_name}.keyring +# TODO: split to separate package +Source40: klogconsole.tar.bz2 +# XXX: Run a program in a new session and with controlling tty +Source22: setctsid.c +Source23: setctsid.8 +# XXX: ppc specific, still needed? +Source28: mkzimage_cmdline.8 +Source29: mkzimage_cmdline.c +Source31: addnote.c +# +Source50: uuidd.rc +Source51: blkid.conf +# detachec parts of spec file +Source100: util-linux.preamble +Source101: util-linux.util-linux +Source102: util-linux.python-libmount +## +## util-linux patches +## +# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path +Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff +# PATCH-FEATURE-SUSE -- Report about disabled encryption to stderr. +Patch12: util-linux-noenc-suse.patch +# PATCH-FIX-UPSTREAM util-linux-bash-completion-blockdev.patch sbrabec@suse.cz -- Fix bash-completion installation. +Patch13: util-linux-bash-completion-blockdev.patch +## +## klogconsole +## +Patch55: klogconsole-quiet.patch +Patch56: klogconsole.diff +BuildRoot: %{_tmppath}/%{name}-%{version}-build +# +%if %build_util_linux +Supplements: filesystem(minix) +Provides: fsck-with-dev-lock = %{version} +# bnc#651598: +Provides: util-linux(fake+no-canonicalize) +PreReq: %install_info_prereq permissions +PreReq: %insserv_prereq %fillup_prereq /bin/sed +Recommends: %{name}-lang = %{version} +#BEGIN UGLY HACK +%if 0 +# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) +Summary: TRAP +Group: System/Filesystems +%endif +# UGLY HACK: Group tag is updated to bad value on every call of format_spec_file. %%include cannot be broken by format_spec_file. +%include %{_sourcedir}/util-linux.util-linux +#END UGLY HACK +%if %{with enable_eject} +Provides: eject = 2.1.0-166.8 +%endif +Provides: login = 4.0-33.7 +%if %{with enable_eject} +# File conflict of eject (up to 12.3 and SLE11). +Obsoletes: eject < 2.1.0-166.8 +%endif +# File conflict of login (up to 12.1 and SLE11). +Obsoletes: login < 4.0-33.7 +%if %{with enable_su} +# File conflict of su and kill (up to 12.3 and SLE11). +# It should be coreutils < 8.21-4, but coreutils provide Release-less symbol. +Conflicts: coreutils < 8.21 +%endif +%if %{with sysvinit_tools} +# File conflict of sulogin and utmpdump (up to 12.3 and SLE11). +Conflicts: sysvinit-tools < 2.88+-87 +%endif +# bnc#805684: +%ifarch s390x +Obsoletes: s390-32 +Provides: s390-32 +%endif +# uuid-runtime appeared in SLE11 SP1 to SLE11 SP3 +Provides: uuid-runtime = %{version}-%{release} +Obsoletes: uuid-runtime < %{version}-%{release} +# +# Using "Requires" here would lend itself to help upgrading, but since +# util-linux is in the initial bootstrap, that is not a good thing to do: +# +Recommends: adjtimex +Recommends: time +Recommends: which +%else +# Exact copy of headers below is needed for spec cleaner that does not support +# if condition across preamble and subsequent sections. +%if %build_python_libmount +# Exact copy of the %%package tag from python-libmount section below: +#BEGIN UGLY HACK +%if 0 +# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) +Summary: TRAP +Group: System/Filesystems +%endif +# UGLY HACK: Group tag is updated to bad value on every call of format_spec_file. %%include cannot be broken by format_spec_file. +%include %{_sourcedir}/util-linux.python-libmount +#END UGLY HACK +%else +%if %build_util_linux_systemd +# Exact copy of the %%package tag from systemd section below: +Summary: A collection of basic systemd utilities +Group: System/Filesystems +Supplements: packageand(util-linux:systemd) +# Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 +Provides: util-linux:/usr/lib/systemd/system/fstrim.service +# Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 +Conflicts: util-linux < 2.25 +%else +# ERROR: No build_* variables are set. +%endif +%endif +%endif + +%if %build_util_linux +%description +This package contains a large variety of low-level system utilities +that are necessary for a Linux system to function. It contains the +mount program, the fdisk configuration tool, and more. + +%package -n libblkid1 +Summary: Filesystem detection library +Group: System/Filesystems + +%description -n libblkid1 +Library for filesystem detection. + +%package -n libblkid-devel +Summary: Development files for the filesystem detection library +Group: Development/Libraries/C and C++ +Requires: libblkid1 = %{version} + +%description -n libblkid-devel +Files needed to develop applications using the library for filesystem +detection. + +%package -n libblkid-devel-static +Summary: Development files for the filesystem detection library +Group: Development/Libraries/C and C++ +Requires: libblkid-devel = %{version} + +%description -n libblkid-devel-static +Files needed to develop applications using the library for filesystem +detection. + +%package -n libuuid1 +Summary: Library to generate UUIDs +Group: System/Filesystems + +%description -n libuuid1 +A library to generate universally unique IDs (UUIDs). + +%package -n libuuid-devel +Summary: Development files for libuuid1 +Group: Development/Libraries/C and C++ +Requires: libuuid1 = %{version} + +%description -n libuuid-devel +Files to develop applications using the library to generate universally +unique IDs (UUIDs). + +%package -n libuuid-devel-static +Summary: Development files for libuuid1 +Group: Development/Libraries/C and C++ +Requires: libuuid-devel = %{version} + +%description -n libuuid-devel-static +Files to develop applications using the library to generate universally +unique IDs (UUIDs). + +%package -n libmount1 +Summary: Device mount library +Group: System/Filesystems + +%description -n libmount1 +Library designed to be used in low-level utils like +mount(8) and /usr/sbin/mount. helpers. + +%package -n libmount-devel +Summary: Development files for libmount1 +Group: Development/Libraries/C and C++ +Requires: libmount1 = %{version} + +%package -n libmount-devel-static +Summary: Development files for libmount1 +Group: Development/Libraries/C and C++ +Requires: libmount-devel = %{version} + +%description -n libmount-devel-static +Files to develop applications using the libmount library. + +%description -n libmount-devel +Files to develop applications using the libmount library. + +%package -n libsmartcols1 +Summary: Column-based text sort engine +Group: System/Libraries + +%description -n libsmartcols1 +Library to sort human readable column-based text output. + +%package -n libsmartcols-devel +Summary: Development files for libsmartcols1 +Group: Development/Libraries/C and C++ +Requires: libsmartcols1 = %{version} + +%description -n libsmartcols-devel +Files to develop applications using the libsmartcols library. + +%package -n libsmartcols-devel-static +Summary: Development files for libsmartcols1 +Group: Development/Libraries/C and C++ +Requires: libsmartcols-devel = %{version} + +%description -n libsmartcols-devel-static +Files to develop applications using the libsmartcols library. + +%lang_package +%endif +%if %build_util_linux_systemd +%if %build_util_linux +%package systemd +# Do not forget to copy duplicate of this section to the preamble: +Summary: A collection of basic systemd utilities +Group: System/Base +Supplements: packageand(util-linux:systemd) +# Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 +Provides: util-linux:/usr/lib/systemd/system/fstrim.service +# Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 +Conflicts: util-linux < 2.25 + +%description systemd +%else +%description +%endif +This package contains low-level util-linux utilities that use systemd. + +%package -n uuidd +Summary: Helper daemon to guarantee uniqueness of time-based UUIDs +Group: System/Filesystems +PreReq: %fillup_prereq +PreReq: %insserv_prereq +PreReq: permissions +PreReq: pwdutils +# uuidd bash-completion moved to a correct package +Conflicts: util-linux < 2.25 + +%description -n uuidd +The uuidd package contains a userspace daemon (uuidd) which guarantees +uniqueness of time-based UUID generation even at very high rates on +SMP systems. + +%endif +%if %build_python_libmount +%if %build_util_linux +%package -n python-libmount +# Do not forget to copy duplicate of this section to the preamble: +Summary: Python bindings for the libmount library +Group: System/Filesystems + +%description -n python-libmount +%else +%description +%endif +This package contains the python bindings for util-linux libmount +library. + +%endif +%prep +%if %verify_sig +xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - +%endif +%setup -q -n %{_name}-%{version} -b 40 +%patch4 -p1 +%patch12 -p1 +%patch13 -p1 +# +# setctsid +cp -p %{S:22} %{S:23} . + +pushd ../klogconsole +%patch55 -p1 +%patch56 -p1 +popd + +%build +%if %build_util_linux +pushd ../klogconsole +# klogconsole build +make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" +popd +# setctsid build +rm -f setctsid +make %{?_smp_mflags} setctsid CFLAGS="%{optflags}" CC="%{__cc}" +# +#BEGIN SYSTEMD SAFETY CHECK +# With systemd, some utilities are built differently. Keep track of these +# sources to prevent building of systemd-less versions. +# +# WARNING: Never edit following line without doing all suggested in the echo below! +UTIL_LINUX_KNOWN_SYSTEMD_DEPS='./login-utils/lslogins.c ./misc-utils/logger.c ./misc-utils/uuidd.c ' +UTIL_LINUX_FOUND_SYSTEMD_DEPS=$(grep -rl 'HAVE_LIBSYSTEMD' . | fgrep '.c' | LC_ALL=C sort | tr '\n' ' ') +if test "$UTIL_LINUX_KNOWN_SYSTEMD_DEPS" != "$UTIL_LINUX_FOUND_SYSTEMD_DEPS" ; then + echo "List of utilities depending on systemd have changed. +Please check the new util-linux-systemd file list, file removal and update of Conflicts for safe update! +Then update configure options to build what needed. +Only then you can safely update following spec file line: +UTIL_LINUX_KNOWN_SYSTEMD_DEPS='$UTIL_LINUX_FOUND_SYSTEMD_DEPS'" + exit 1 +fi +#END SYSTEMD SAFETY CHECK +#BEGIN FIRST STAGE MODIFICATIONS +%if !%build_util_linux_systemd +sed -i 's/BUILD_LSLOGINS/FALSE/ + s/BUILD_LOGGER/FALSE/ + ' misc-utils/Makemodule.am login-utils/Makemodule.am bash-completion/Makemodule.am +autoreconf -f -i +%endif +#END FIRST STAGE MODIFICATIONS +%else +#BEGIN SECOND STAGE MODIFICATIONS +# delete all make modules except wanted ones +sed -i '/^include/{ +%if %build_python_libmount + /libmount\/Makemodule.am/b 1 +%endif +%if %build_util_linux_systemd +# for lslogins + /login-utils/b 1 +# for logger and uuidd + /misc-utils/b 1 +# for fstrim.service and fstrim.timer + /sys-utils/b 1 +# for uninstalled libcommon required by uuidd + / lib\//b 1 +# for bash completions + /bash-completion/b 1 +# we always want tests (they are smart enough to skip irrelevant parts) + /tests/b 1 +%endif +%if %build_python_libmount + /libmount\/python/b 1 +%endif + d + :1 + }' Makefile.am libmount/Makemodule.am +%if %build_python_libmount +# trick: we do not want to build libmount, but include subdirs +# We close prefious if FALSE and open new pairing with endif +sed -i '/^if BUILD_LIBMOUNT/d +/^if ENABLE_GTK_DOC/i \ +if BUILD_LIBMOUNT +' libmount/Makemodule.am +# Do not install terminal-colors.d.5 +sed -i '/dist_man_MANS/d' lib/Makemodule.am +%endif +# disable all make modules except wanted ones +sed -i '/^if BUILD_/{ +%if %build_util_linux_systemd + /LSLOGINS/b 1 + /LOGGER/b 1 + /UUIDD/b 1 + /BASH_COMPLETION/b 1 +%endif + s/BUILD_.*/FALSE/ + :1 + } + ' libmount/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am sys-utils/Makemodule.am bash-completion/Makemodule.am +%if %build_util_linux_systemd +# trick: we do not want to build fstrim, but we want to install fstrim systemd connectors +# We close prefious if FALSE and open new pairing with endif +sed -i '/^if HAVE_SYSTEMD/i \ +endif\ +if TRUE +' sys-utils/Makemodule.am +# Do not install terminal-colors.d.5 +sed -i '/dist_man_MANS/d' lib/Makemodule.am +%endif +# Use installed first stage libraries +sed -i ' +# extra space to not replace pylibmount.la + s/ libmount\.la/ -lmount/g + s/libuuid\.la/-luuid/g + s/libblkid\.la/-lblkid/g + s/libsmartcols\.la/-lsmartcols/g + ' libmount/python/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am +# Ignore dependencies on optional (and not built in second stage) libraries +sed -i ' + /AM_GNU_GETTEXT/d + s/UL_REQUIRES_BUILD(\[.*\], \[libuuid\])/dnl &/ + s/UL_REQUIRES_BUILD(\[.*\], \[libsmartcols\])/dnl &/ + ' configure.ac +sed -i ' + /SUBDIRS =/s/ po// + ' Makefile.am +autoreconf -f -i +#END SECOND STAGE MODIFICATIONS +%endif +# +# util-linux itself +# +# Version check for libutempter +# +uhead=$(find %_includedir -name utempter.h 2>/dev/null) +if test -n "$uhead" && grep -q utempter_add_record "$uhead" +then + uhead=--with-utempter +else + uhead=--without-utempter +fi +export SUID_CFLAGS="-fpie" +export SUID_LDFLAGS="-pie" +# override default localstatedir to /run +# only used for volatile data +# +# SUSE now supports only systemd based system. We do not build +# sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities. +%configure \ + --localstatedir=/run \ + --docdir=%{_docdir}/%{_name} \ + --with-audit \ + --with-gnu-ld \ + --with-ncurses \ + --with-selinux \ + $uhead \ + --with-bashcompletiondir=%{_datadir}/bash-completion \ + --enable-all-programs \ + --disable-reset \ + --disable-use-tty-group \ + --disable-silent-rules \ + --enable-static \ + --disable-rpath \ +%if %{without enable_last} + --disable-last \ +%endif +%if %{without enable_eject} + --disable-eject \ +%endif +%if %{with sysvinit_tools} + --enable-sulogin-emergency-mount \ +%else + --disable-sulogin \ + --disable-mountpoint \ +%endif +%if %{without enable_su} + --disable-su \ + --disable-kill \ +%endif +%if %build_util_linux_systemd + --enable-uuidd \ + --with-systemd \ + --with-systemdsystemunitdir=%{_unitdir} \ +%else + --disable-uuidd \ + --without-systemd \ +%endif +%if %build_python_libmount + --with-python \ +%else + --without-python \ +%endif +# +make %{?_smp_mflags} +# +%if %build_util_linux +%{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29} +%{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31} +%endif + +%check +# mark some tests "known_fail" +%ifarch ppc ppc64 ppc64le s390 s390x +export TS_OPT_fdisk_bsd_known_fail="yes" +%endif +%ifarch %{ix86} +export TS_OPT_misc_setarch_known_fail="yes" +%endif +# +%ifarch armv7l armv7hl aarch64 +%if 0%{?suse_version} > 1310 +export TS_OPT_misc_setarch_known_fail="yes" +%endif +%endif +# +%ifarch armv6l armv6hl aarch64 +export TS_OPT_fdisk_gpt_known_fail="yes" +export TS_OPT_fdisk_oddinput_known_fail="yes" +export TS_OPT_fdisk_sunlabel_known_fail="yes" +export TS_OPT_misc_ionice_known_fail="yes" +export TS_OPT_misc_swaplabel_known_fail="yes" +export TS_OPT_kill_name_to_number_known_fail="yes" +export TS_OPT_kill_print_pid_known_fail="yes" +export TS_OPT_kill_queue_known_fail="yes" +%endif +%ifarch aarch64 s390 s390x +export TS_OPT_utmpdump_known_fail="yes" +%endif +# FIXME: These sometimes fails: +export TS_OPT_libmount_lock_known_fail="yes" +%ifarch x86_64 +# FIXME: Something is wrong here. This test never fails in SLE12: +export TS_OPT_ipcs_limits2_known_fail="yes" +%endif +# +# hacks +export PATH="$PATH:/sbin:/usr/sbin" +# +# do the check but don't abort yet +result="0" +make %{?_smp_mflags} check || result="1" +# +# always show test diffs (inclusive known_fail) and exit result +diffs_files="$(find tests/diff -type f | sort)" +echo "$diffs_files" | xargs -r cat +exit "$result" + +%install +%if %build_util_linux +mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} +install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf +install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login +install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote +%if %{with enable_su} +install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su +install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l +install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su +%endif +mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates +pushd ../klogconsole +# klogconsole install +make install DEST=%{buildroot} +popd +%endif +# +# util-linux install +# +%make_install +rm -f %{buildroot}%{python_sitearch}/libmount/*.*a +%if %build_util_linux +#UsrMerge +%if %{with enable_su} +ln -s %{_bindir}/kill %{buildroot}/bin +ln -s %{_bindir}/su %{buildroot}/bin +%endif +ln -s %{_bindir}/dmesg %{buildroot}/bin +ln -s %{_bindir}/more %{buildroot}/bin +ln -s %{_bindir}/mount %{buildroot}/bin +ln -s %{_bindir}/umount %{buildroot}/bin +ln -s %{_bindir}/findmnt %{buildroot}/bin +ln -s %{_bindir}/lsblk %{buildroot}/bin +ln -s %{_sbindir}/agetty %{buildroot}/sbin +ln -s %{_sbindir}/blockdev %{buildroot}/sbin +ln -s %{_sbindir}/cfdisk %{buildroot}/sbin +ln -s %{_sbindir}/ctrlaltdel %{buildroot}/sbin +ln -s %{_sbindir}/fdisk %{buildroot}/sbin +ln -s %{_sbindir}/fsck.minix %{buildroot}/sbin +ln -s %{_sbindir}/fsck.cramfs %{buildroot}/sbin +ln -s %{_sbindir}/hwclock %{buildroot}/sbin +ln -s %{_sbindir}/losetup %{buildroot}/sbin +ln -s %{_sbindir}/mkfs %{buildroot}/sbin +ln -s %{_sbindir}/mkfs.bfs %{buildroot}/sbin +ln -s %{_sbindir}/mkfs.minix %{buildroot}/sbin +ln -s %{_sbindir}/mkfs.cramfs %{buildroot}/sbin +ln -s %{_sbindir}/mkswap %{buildroot}/sbin +ln -s %{_sbindir}/nologin %{buildroot}/sbin +ln -s %{_sbindir}/pivot_root %{buildroot}/sbin +ln -s %{_sbindir}/raw %{buildroot}/sbin +ln -s %{_sbindir}/sfdisk %{buildroot}/sbin +ln -s %{_sbindir}/swapoff %{buildroot}/sbin +ln -s %{_sbindir}/swapon %{buildroot}/sbin +ln -s %{_sbindir}/blkid %{buildroot}/sbin +ln -s %{_sbindir}/findfs %{buildroot}/sbin +ln -s %{_sbindir}/fsck %{buildroot}/sbin +ln -s %{_sbindir}/switch_root %{buildroot}/sbin +ln -s %{_sbindir}/wipefs %{buildroot}/sbin +ln -s %{_sbindir}/fsfreeze %{buildroot}/sbin +ln -s %{_sbindir}/swaplabel %{buildroot}/sbin +ln -s %{_sbindir}/fstrim %{buildroot}/sbin +ln -s %{_sbindir}/chcpu %{buildroot}/sbin +#EndUsrMerge +install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/filesystems +%ifnarch ppc ppc64 +install -m 755 mkzimage_cmdline %{buildroot}%{_bindir} +install -m 644 %{S:28} %{buildroot}%{_mandir}/man8 +install -m 755 chrp-addnote %{buildroot}%{_bindir} +%endif +# setctsid install +install -m 755 setctsid %{buildroot}%{_sbindir} +install -m 444 setctsid.8 %{buildroot}%{_mandir}/man8/ +echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir}/flushb +chmod 755 %{buildroot}%{_sbindir}/flushb +# Install scripts to configure raw devices at boot time +install -m 644 $RPM_SOURCE_DIR%{_sysconfdir}.raw %{buildroot}%{_sysconfdir}/raw +install -m 755 $RPM_SOURCE_DIR/raw.init %{buildroot}%{_initddir}/raw +ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw +# upstream moved getopt examples from datadir to docdir but we keep +# the old location because we would need to fix the manpage first +mv %{buildroot}%{_docdir}/%{_name}/getopt %{buildroot}%{_datadir}/ +# Stupid hack so we don't have a tcsh dependency +chmod 644 %{buildroot}%{_datadir}/getopt/getopt*.tcsh +# Following files we don't want to package, so remove them +rm -f %{buildroot}%{_bindir}/pg +rm -f %{buildroot}%{_mandir}/man1/pg.1* +# Do not package these files to get rid of the perl dependency +rm -f %{buildroot}%{_bindir}/chkdupexe +rm -f %{buildroot}%{_mandir}/man1/chkdupexe.1 +# we use this tools from pwdutils +rm -f %{buildroot}%{_bindir}/{chfn,chsh,newgrp} +rm -f %{buildroot}%{_sbindir}/{vigr,vipw} +rm -f %{buildroot}%{_mandir}/man1/{chfn.1*,chsh.1*,newgrp.1*} +rm -f %{buildroot}%{_mandir}/man8/{vigr.8*,vipw.8*} +# login is always and only in /bin +mv %{buildroot}%{_bindir}/login %{buildroot}/bin/ +# arch dependent +%ifarch s390 s390x +rm -f %{buildroot}%{_sysconfdir}/fdprm +rm -f %{buildroot}%{_sbindir}/fdformat +rm -f %{buildroot}%{_sbindir}/hwclock +#UsrMerge +rm -f %{buildroot}/sbin/hwclock +#EndUsrMerge +rm -f %{buildroot}%{_sbindir}/klogconsole +rm -f %{buildroot}%{_bindir}/setterm +rm -f %{buildroot}%{_sbindir}/tunelp +rm -f %{buildroot}%{_mandir}/man8/fdformat.8* +rm -f %{buildroot}%{_mandir}/man8/hwclock.8* +rm -f %{buildroot}%{_mandir}/man8/klogconsole.8* +rm -f %{buildroot}%{_mandir}/man8/tunelp.8* +%endif +%ifarch ia64 %sparc m68k +rm -f %{buildroot}%{_mandir}/man8/cfdisk.8* +rm -f %{buildroot}%{_mandir}/man8/sfdisk.8* +rm -f %{buildroot}%{_sbindir}/cfdisk +#UsrMerge +rm -f %{buildroot}/sbin/cfdisk +#EndUsrMerge +rm -f %{buildroot}%{_sbindir}/sfdisk +#UsrMerge +rm -f %{buildroot}/sbin/sfdisk +#EndUsrMerge +%endif +%ifarch ia64 m68k +rm -f %{buildroot}%{_sbindir}/fdisk +#UsrMerge +rm -f %{buildroot}/sbin/fdisk +#EndUsrMerge +rm -f %{buildroot}%{_mandir}/man8/fdisk.8* +%endif +%find_lang %{name} %{name}.lang +# create list of setarch(8) symlinks +find %{buildroot}%{_bindir}/ -regextype posix-egrep -type l \ + -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)$" \ + -printf "%{_bindir}/%f\n" >> %{name}.files +find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ + -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)\.8.*" \ + -printf "%{_mandir}/man8/%f*\n" >> %{name}.files +%else +# install systemd files manually, don't use Makefile that expect build of utilities and its dependencies. +%endif +%if %build_util_linux_systemd +mkdir -p %{buildroot}%{_sysconfdir}/init.d +mkdir -p %{buildroot}/bin +mkdir -p %{buildroot}%{_sbindir} +mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid +mkdir -p %{buildroot}/run/uuidd +install -m 744 %{SOURCE50} %{buildroot}%{_initddir}/uuidd +ln -s %{_bindir}/logger %{buildroot}/bin +# clock.txt from uuidd is a ghost file +touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt +# rcuuidd helper +ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd +%if !%build_util_linux +%make_install +%endif +%endif +# link duplicate manpages and python bindings +%fdupes -s %{buildroot}%{_prefix} + +%if %build_util_linux +%post +%{fillup_and_insserv raw} +%set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount +%if %{with enable_su} +%set_permissions %{_bindir}/su +# Safely migrate PAM files from coreutils to util-linux +# (openSUSE 12.3->13.1, SLE11->SLE12) +# +# coreutils with su were upgraded (and su removed) before util-linux +# with su was installed (see the Conflicts above). If the admin edited +# the PAM file, the seemingly no more used modified file was saved as +# .rpmsave and the new clean file was installed. As we want +# "noreplace" upgrade, and the contents of the clean file contents has +# no changes, we should restore admin modification, and rename the +# clean file to .rpmnew, as it would happen if the file was not moved +# from one package to another. +for PAM_FILE in default/su pam.d/su pam.d/su-l ; do + if test -f %{_sysconfdir}/$PAM_FILE.rpmsave ; then + mv %{_sysconfdir}/$PAM_FILE %{_sysconfdir}/$PAM_FILE.rpmnew + mv %{_sysconfdir}/$PAM_FILE.rpmsave %{_sysconfdir}/$PAM_FILE + fi +done +%endif + +# mount option 'code=' is now called 'codepage=' so change fstab +if [ -f etc/fstab ]; then + sed -i 's:code=:codepage=:' etc/fstab +fi + +%postun +%install_info_delete --info-dir=%{_infodir} %{_infodir}/ipc.info.gz +%{insserv_cleanup} + +%verifyscript +%verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount +%if %{with enable_su} +%verify_permissions -e %{_bindir}/su +%endif + +%post -n libblkid1 -p /sbin/ldconfig + +%postun -n libblkid1 -p /sbin/ldconfig + +%post -n libmount1 -p /sbin/ldconfig + +%postun -n libmount1 -p /sbin/ldconfig + +%post -n libsmartcols1 -p /sbin/ldconfig + +%postun -n libsmartcols1 -p /sbin/ldconfig + +%post -n libuuid1 -p /sbin/ldconfig + +%postun -n libuuid1 -p /sbin/ldconfig + +%files lang -f %{name}.lang +%endif + +%if %build_util_linux_systemd +%pre -n uuidd +%{_sbindir}/groupadd -r uuidd 2>/dev/null || : +%{_sbindir}/useradd -r -g uuidd -c "User for uuidd" \ + -d /var/run/uuidd uuidd 2>/dev/null || : + +%preun -n uuidd +%{stop_on_removal uuidd} + +%post -n uuidd +%{fillup_and_insserv -n uuidd} +%set_permissions %{_sbindir}/uuidd + +%postun -n uuidd +%{restart_on_update uuidd} +%{insserv_cleanup} + +%verifyscript -n uuidd +%verify_permissions -e %{_sbindir}/uuidd +%endif + +%if %build_util_linux +%files -f %{name}.files +# Common files for all archs +%defattr(-,root,root) +# util-linux documentation files +%doc Documentation/blkid.txt +%doc Documentation/cal.txt +%doc Documentation/col.txt +%doc Documentation/deprecated.txt +%doc Documentation/fdisk.txt +%doc Documentation/getopt.txt +%doc Documentation/howto-debug.txt +%doc Documentation/hwclock.txt +%doc Documentation/modems-with-agetty.txt +%doc Documentation/mount.txt +%doc Documentation/pg.txt +%doc Documentation/sfdisk.txt +%config %attr(744,root,root) %{_sysconfdir}/init.d/raw +%config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw +%config(noreplace) %{_sysconfdir}/filesystems +%config(noreplace) %{_sysconfdir}/blkid.conf +%config(noreplace) %{_sysconfdir}/pam.d/login +%config(noreplace) %{_sysconfdir}/pam.d/remote +%if %{with enable_su} +%config(noreplace) %{_sysconfdir}/pam.d/su +%config(noreplace) %{_sysconfdir}/pam.d/su-l +%config(noreplace) %{_sysconfdir}/default/su +%endif +#UsrMerge +%if %{with enable_su} +/bin/kill +/bin/su +%endif +/bin/dmesg +/bin/more +/bin/mount +/bin/umount +/bin/findmnt +/bin/login +/bin/lsblk +/sbin/agetty +/sbin/blockdev +/sbin/ctrlaltdel +/sbin/fsck.minix +/sbin/fsck.cramfs +/sbin/losetup +/sbin/mkfs +/sbin/mkfs.bfs +/sbin/mkfs.minix +/sbin/mkfs.cramfs +/sbin/mkswap +/sbin/nologin +/sbin/pivot_root +/sbin/raw +/sbin/swapoff +/sbin/swapon +/sbin/blkid +/sbin/findfs +/sbin/fsck +/sbin/switch_root +/sbin/wipefs +/sbin/fsfreeze +/sbin/swaplabel +/sbin/fstrim +/sbin/chcpu +#EndUsrMerge +%if %{with enable_su} +%{_bindir}/kill +%{_bindir}/su +%endif +%if %{with enable_eject} +%if 0%{?suse_version} <= 1310 +%verify(not mode) %attr(4750,root,audio) %{_bindir}/eject +%else +%{_bindir}/eject +%endif +%endif +%{_bindir}/cal +%{_bindir}/chrt +%{_bindir}/col +%{_bindir}/colcrt +%{_bindir}/colrm +%{_bindir}/column +%{_bindir}/dmesg +%{_bindir}/fallocate +%{_bindir}/findmnt +%{_bindir}/flock +%{_bindir}/getopt +%{_bindir}/hexdump +%{_bindir}/ionice +%{_bindir}/ipcmk +%{_bindir}/ipcrm +%{_bindir}/ipcs +%{_bindir}/isosize +%if %{with enable_last} +%{_bindir}/last +%{_bindir}/lastb +%endif +%{_bindir}/line +%{_bindir}/look +%{_bindir}/lsblk +%{_bindir}/lscpu +%{_bindir}/lslocks +%{_bindir}/mcookie +%{_bindir}/mesg +%{_bindir}/more +%{_bindir}/mount +%{_bindir}/namei +%{_bindir}/nsenter +%{_bindir}/prlimit +%{_bindir}/rename +%{_bindir}/renice +%{_bindir}/rev +%{_bindir}/script +%{_bindir}/scriptreplay +%{_bindir}/setarch +%{_bindir}/setpriv +%{_bindir}/setsid +%{_bindir}/tailf +%{_bindir}/taskset +%{_bindir}/ul +%{_bindir}/umount +%{_bindir}/unshare +%if %{with sysvinit_tools} +%{_bindir}/mountpoint +%{_bindir}/utmpdump +%endif +%{_bindir}/uuidgen +%{_bindir}/uname26 +%ifnarch ppc ppc64 +%{_bindir}/chrp-addnote +%{_bindir}/mkzimage_cmdline +%endif +%{_bindir}/wdctl +%{_sbindir}/addpart +%{_sbindir}/agetty +%{_sbindir}/blkid +%{_sbindir}/blkdiscard +%{_sbindir}/blockdev +%{_sbindir}/chcpu +%{_sbindir}/ctrlaltdel +%{_sbindir}/delpart +%{_sbindir}/findfs +%{_sbindir}/fsck +%{_sbindir}/fsck.minix +%{_sbindir}/fsck.cramfs +%{_sbindir}/fsfreeze +%{_sbindir}/fstrim +%{_sbindir}/ldattach +%{_sbindir}/losetup +%{_sbindir}/mkfs +%{_sbindir}/mkfs.bfs +%{_sbindir}/mkfs.minix +%{_sbindir}/mkfs.cramfs +%{_sbindir}/mkswap +%{_sbindir}/nologin +%{_sbindir}/partx +%{_sbindir}/pivot_root +%{_sbindir}/raw +%{_sbindir}/rcraw +%{_sbindir}/resizepart +%{_sbindir}/rtcwake +%{_sbindir}/runuser +%{_sbindir}/setctsid +%if %{with sysvinit_tools} +%{_sbindir}/sulogin +%endif +%{_sbindir}/swaplabel +%{_sbindir}/swapoff +%{_sbindir}/swapon +%{_sbindir}/switch_root +%{_sbindir}/wipefs +%verify(not mode) %attr(0755,root,tty) %{_bindir}/wall +%{_bindir}/whereis +%verify(not mode) %attr(0755,root,tty) %{_bindir}/write +%if %{with enable_su} +%{_mandir}/man1/kill.1.gz +%{_mandir}/man1/su.1.gz +%endif +%{_mandir}/man1/cal.1.gz +%{_mandir}/man1/chrt.1.gz +%{_mandir}/man1/col.1.gz +%{_mandir}/man1/colcrt.1.gz +%{_mandir}/man1/colrm.1.gz +%{_mandir}/man1/column.1.gz +%{_mandir}/man1/dmesg.1.gz +%if %{with enable_eject} +%{_mandir}/man1/eject.1.gz +%endif +%{_mandir}/man1/fallocate.1.gz +%{_mandir}/man1/flock.1.gz +%{_mandir}/man1/getopt.1.gz +%{_mandir}/man1/hexdump.1.gz +%{_mandir}/man1/ipcrm.1.gz +%{_mandir}/man1/ipcs.1.gz +%if %{with enable_last} +%{_mandir}/man1/last.1.gz +%{_mandir}/man1/lastb.1.gz +%endif +%{_mandir}/man1/line.1.gz +%{_mandir}/man1/login.1.gz +%{_mandir}/man1/look.1.gz +%{_mandir}/man1/lscpu.1.gz +%{_mandir}/man1/mcookie.1.gz +%{_mandir}/man1/mesg.1.gz +%{_mandir}/man1/more.1.gz +%{_mandir}/man1/namei.1.gz +%{_mandir}/man1/nsenter.1.gz +%{_mandir}/man1/ionice.1.gz +%{_mandir}/man1/prlimit.1.gz +%{_mandir}/man1/rename.1.gz +%{_mandir}/man1/rev.1.gz +%{_mandir}/man1/renice.1.gz +%{_mandir}/man1/setpriv.1.gz +%{_mandir}/man1/setsid.1.gz +%{_mandir}/man1/script.1.gz +%{_mandir}/man1/scriptreplay.1.gz +%{_mandir}/man1/setterm.1.gz +%{_mandir}/man1/tailf.1.gz +%{_mandir}/man1/taskset.1.gz +%{_mandir}/man1/ul.1.gz +%{_mandir}/man1/unshare.1.gz +%{_mandir}/man1/wall.1.gz +%{_mandir}/man1/whereis.1.gz +%{_mandir}/man1/write.1.gz +%{_mandir}/man1/ipcmk.1.gz +%if %{with sysvinit_tools} +%{_mandir}/man1/mountpoint.1.gz +%{_mandir}/man1/utmpdump.1.gz +%endif +%{_mandir}/man1/runuser.1.gz +%{_mandir}/man1/uuidgen.1.gz +%{_mandir}/man5/fstab.5.gz +%{_mandir}/man5/terminal-colors.d.5.gz +%{_mandir}/man8/addpart.8.gz +%{_mandir}/man8/agetty.8.gz +%{_mandir}/man8/blockdev.8.gz +%{_mandir}/man8/delpart.8.gz +%{_mandir}/man8/ctrlaltdel.8.gz +%{_mandir}/man8/blkid.8.gz +%{_mandir}/man8/blkdiscard.8.gz +%{_mandir}/man8/switch_root.8.gz +%{_mandir}/man8/mkfs.bfs.8.gz +%{_mandir}/man8/mkfs.minix.8.gz +%{_mandir}/man8/findfs.8.gz +%{_mandir}/man8/fsck.8.gz +%{_mandir}/man8/fsck.cramfs.8.gz +%{_mandir}/man8/fsck.minix.8.gz +%{_mandir}/man8/isosize.8.gz +%{_mandir}/man8/ldattach.8.gz +%{_mandir}/man8/losetup.8.gz +%{_mandir}/man8/lslocks.8.gz +%{_mandir}/man8/mkfs.8.gz +%{_mandir}/man8/mkfs.cramfs.8.gz +%{_mandir}/man8/mkswap.8.gz +%{_mandir}/man8/mount.8.gz +%{_mandir}/man8/nologin.8.gz +%{_mandir}/man8/findmnt.8.gz +%{_mandir}/man8/fsfreeze.8.gz +%{_mandir}/man8/swaplabel.8.gz +%{_mandir}/man8/readprofile.8.gz +%{_mandir}/man8/chcpu.8.gz +%ifnarch ppc ppc64 +%{_mandir}/man8/mkzimage_cmdline.8.gz +%endif +%{_mandir}/man8/partx.8.gz +%{_mandir}/man8/pivot_root.8.gz +%{_mandir}/man8/raw.8.gz +%{_mandir}/man8/rtcwake.8.gz +%{_mandir}/man8/setarch.8.gz +%{_mandir}/man8/swapoff.8.gz +%{_mandir}/man8/swapon.8.gz +%{_mandir}/man8/umount.8.gz +%{_mandir}/man8/uname26.8.gz +%{_mandir}/man8/setctsid.8.gz +%{_mandir}/man8/wipefs.8.gz +%{_mandir}/man8/fstrim.8.gz +%{_mandir}/man8/lsblk.8.gz +%{_mandir}/man8/resizepart.8.gz +%if %{with sysvinit_tools} +%{_mandir}/man8/sulogin.8.gz +%endif +%{_mandir}/man8/wdctl.8.gz +%{_sbindir}/flushb +%{_sbindir}/readprofile +%dir %{_datadir}/getopt +%attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash +%attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh +# FIXME: Fix directory ownership. +%dir %{_datadir}/bash-completion +%{_datadir}/bash-completion/* +%if %build_util_linux_systemd +%exclude %{_datadir}/bash-completion/logger +%exclude %{_datadir}/bash-completion/uuidd +%endif +%ifnarch ia64 m68k +#XXX: post our patches upstream +#XXX: call fdupes on /usr/share/man +#UsrMerge +/sbin/fdisk +#EndUsrMerge +%{_sbindir}/fdisk +%{_mandir}/man8/fdisk.8.gz +%endif +%ifnarch %sparc ia64 m68k +%{_mandir}/man8/cfdisk.8.gz +%{_mandir}/man8/sfdisk.8.gz +#UsrMerge +/sbin/cfdisk +/sbin/sfdisk +#EndUsrMerge +%{_sbindir}/cfdisk +%{_sbindir}/sfdisk +%endif +%ifnarch s390 s390x +%{_sbindir}/fdformat +#UsrMerge +/sbin/hwclock +#EndUsrMerge +%{_sbindir}/hwclock +%{_sbindir}/klogconsole +%{_bindir}/setterm +%{_sbindir}/tunelp +%{_mandir}/man8/fdformat.8.gz +%{_mandir}/man8/hwclock.8.gz +%{_mandir}/man8/klogconsole.8.gz +%{_mandir}/man8/tunelp.8.gz +%endif + +%files -n libblkid1 +%defattr(-, root, root) +%{_libdir}/libblkid.so.1 +%{_libdir}/libblkid.so.1.* + +%files -n libblkid-devel +%defattr(-, root, root) +%{_libdir}/libblkid.so +%dir %{_includedir}/blkid +%{_includedir}/blkid/blkid.h +%{_libdir}/pkgconfig/blkid.pc +%{_mandir}/man3/libblkid.3.gz + +%files -n libblkid-devel-static +%defattr(-, root, root) +%{_libdir}/libblkid.*a + +%files -n libmount1 +%defattr(-, root, root) +%{_libdir}/libmount.so.1 +%{_libdir}/libmount.so.1.* + +%files -n libmount-devel +%defattr(-, root, root) +%{_libdir}/libmount.so +%dir %{_includedir}/libmount +%{_includedir}/libmount/libmount.h +%{_libdir}/pkgconfig/mount.pc + +%files -n libmount-devel-static +%defattr(-, root, root) +%{_libdir}/libmount.*a + +%files -n libsmartcols1 +%defattr(-, root, root) +%{_libdir}/libsmartcols.so.1 +%{_libdir}/libsmartcols.so.1.* + +%files -n libsmartcols-devel +%defattr(-, root, root) +%{_libdir}/libsmartcols.so +%dir %{_includedir}/libsmartcols +%{_includedir}/libsmartcols/libsmartcols.h +%{_libdir}/pkgconfig/smartcols.pc + +%files -n libsmartcols-devel-static +%defattr(-, root, root) +%{_libdir}/libsmartcols.*a + +%files -n libuuid1 +%defattr(-, root, root) +%{_libdir}/libuuid.so.1 +%{_libdir}/libuuid.so.1.* + +%files -n libuuid-devel +%defattr(-, root, root) +%{_libdir}/libuuid.so +%dir %{_includedir}/uuid +%{_includedir}/uuid/uuid.h +%{_libdir}/pkgconfig/uuid.pc +%{_mandir}/man3/uuid* + +%files -n libuuid-devel-static +%defattr(-, root, root) +%{_libdir}/libuuid.*a +%endif + +%if %build_util_linux_systemd +%if %build_util_linux +%files systemd +%else +%files +%endif +%defattr(-, root, root) +/bin/logger +%{_bindir}/logger +%{_bindir}/lslogins +%{_datadir}/bash-completion/logger +%{_mandir}/man1/logger.1.gz +%{_mandir}/man1/lslogins.1.gz +%{_unitdir}/fstrim.service +%{_unitdir}/fstrim.timer + +%files -n uuidd +%defattr(-, root, root) +%verify(not mode) %attr(0755,root,root) %{_sbindir}/uuidd +%attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid +%ghost %{_localstatedir}/lib/libuuid/clock.txt +%attr(-,uuidd,uuidd) %ghost %dir /run/uuidd +%{_datadir}/bash-completion/uuidd +%{_initddir}/uuidd +%{_mandir}/man8/uuidd.8.gz +%{_sbindir}/rcuuidd +%{_unitdir}/uuidd.service +%{_unitdir}/uuidd.socket +%endif + +%if %build_python_libmount +%if %build_util_linux +%files -n python-libmount +%else +%files +%endif +%defattr(-, root, root) +%{python_sitearch}/libmount +%endif + +%changelog diff --git a/sulogin-does-not-find-any-console.patch b/sulogin-does-not-find-any-console.patch deleted file mode 100644 index 77ed85c..0000000 --- a/sulogin-does-not-find-any-console.patch +++ /dev/null @@ -1,32 +0,0 @@ -Enable sulogin to find a suitable console device even if the first line -in /proc/consoles does not have any major and minor number (bnc#862078) - ---- - sulogin-consoles.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - ---- login-utils/sulogin-consoles.c -+++ login-utils/sulogin-consoles.c 2014-02-07 15:47:14.246235487 +0000 -@@ -319,7 +319,7 @@ static int detect_consoles_from_proc(str - char fbuf[16 + 1]; - DIR *dir = NULL; - FILE *fc = NULL; -- int maj, min, rc = 1; -+ int maj, min, rc = 1, matches; - - DBG(dbgprint("trying /proc")); - -@@ -332,10 +332,12 @@ static int detect_consoles_from_proc(str - if (!dir) - goto done; - -- while (fscanf(fc, "%*s %*s (%16[^)]) %d:%d", fbuf, &maj, &min) == 3) { -+ while ((matches = fscanf(fc, "%*s %*s (%16[^)]) %d:%d", fbuf, &maj, &min)) >= 1) { - char *name; - dev_t comparedev; - -+ if (matches != 3) -+ continue; - if (!strchr(fbuf, 'E')) - continue; - comparedev = makedev(maj, min); diff --git a/sulogin-fooled-on-tty-line-due-plymouth.patch b/sulogin-fooled-on-tty-line-due-plymouth.patch deleted file mode 100644 index cf6ad5f..0000000 --- a/sulogin-fooled-on-tty-line-due-plymouth.patch +++ /dev/null @@ -1,72 +0,0 @@ -Make sure that plymouth does not break sulogin. - ---- - sulogin.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 50 insertions(+), 1 deletion(-) - ---- login-utils/sulogin.c -+++ login-utils/sulogin.c 2014-03-05 17:42:40.442235465 +0000 -@@ -77,13 +77,62 @@ static volatile sig_atomic_t sigchild; - #endif - - /* -+ * For the case plymouth is found on this system -+ */ -+static int plymouth_command(const char* arg) -+{ -+ const char *cmd = "/usr/bin/plymouth"; -+ static int has_plymouth = 1; -+ pid_t pid; -+ -+ if (!has_plymouth) -+ return 127; -+ -+ pid = fork(); -+ if (!pid) { -+ int fd = open("/dev/null", O_RDWR); -+ dup2(fd, 0); -+ dup2(fd, 1); -+ dup2(fd, 2); -+ close(fd); -+ execl(cmd, cmd, arg, (char *) NULL); -+ exit(127); -+ } else if (pid > 0) { -+ int status; -+ waitpid(pid, &status, 0); -+ if (status == 127) -+ has_plymouth = 0; -+ return status; -+ } -+ return 1; -+} -+ -+/* - * Fix the tty modes and set reasonable defaults. - */ - static void tcinit(struct console *con) - { - int mode = 0, flags = 0; - struct termios *tio = &con->tio; -- int fd = con->fd; -+ struct termios lock; -+ int fd = con->fd, i = (plymouth_command("--ping")) ? 20 : 0; -+ -+ while (i-- > 0) { -+ /* -+ * With plymouth the termios flags become changed after this -+ * function had changed the termios. -+ */ -+ memset(&lock, 0, sizeof(struct termios)); -+ if (ioctl(fd, TIOCGLCKTRMIOS, &lock) < 0) -+ break; -+ if (!lock.c_iflag && !lock.c_oflag && !lock.c_cflag && !lock.c_lflag) -+ break; -+ if (i == 15 && plymouth_command("quit") != 0) -+ break; -+ sleep(1); -+ } -+ memset(&lock, 0, sizeof(struct termios)); -+ ioctl(fd, TIOCSLCKTRMIOS, &lock); - - errno = 0; - diff --git a/support-other-tty-lines-not-vconsole.patch b/support-other-tty-lines-not-vconsole.patch deleted file mode 100644 index ce31fd0..0000000 --- a/support-other-tty-lines-not-vconsole.patch +++ /dev/null @@ -1,104 +0,0 @@ ---- - login-utils/sulogin.c | 17 ++++++++++++----- - term-utils/agetty.c | 23 +++++++++++------------ - 2 files changed, 23 insertions(+), 17 deletions(-) - ---- login-utils/sulogin.c -+++ login-utils/sulogin.c 2014-05-08 08:01:13.102622002 +0000 -@@ -49,6 +49,11 @@ - # include - #endif - -+#ifdef __linux__ -+# include -+# include -+#endif -+ - #include "c.h" - #include "closestream.h" - #include "nls.h" -@@ -142,10 +147,14 @@ static void tcinit(struct console *con) - return; - } - -- /* Handle serial lines here */ -- if (ioctl(fd, TIOCMGET, (char *) &mode) == 0) { -+ /* Handle lines other than virtual consoles here */ -+#if defined(KDGKBMODE) -+ if (ioctl(fd, KDGKBMODE, &mode) < 0) -+#endif -+ { - speed_t ispeed, ospeed; - struct winsize ws; -+ errno = 0; - - /* this is a modem line */ - con->flags |= CON_SERIAL; -@@ -191,9 +200,7 @@ static void tcinit(struct console *con) - goto setattr; - } - #if defined(IUTF8) && defined(KDGKBMODE) -- /* Detect mode of current keyboard setup, e.g. for UTF-8 */ -- if (ioctl(fd, KDGKBMODE, &mode) < 0) -- mode = K_RAW; -+ /* Handle mode of current keyboard setup, e.g. for UTF-8 */ - switch(mode) { - case K_UNICODE: - setlocale(LC_CTYPE, "C.UTF-8"); ---- term-utils/agetty.c -+++ term-utils/agetty.c 2014-05-08 08:02:16.786235584 +0000 -@@ -139,6 +139,7 @@ struct options { - int nice; /* Run login with this priority */ - int numspeed; /* number of baud rates to try */ - int clocal; /* CLOCAL_MODE_* */ -+ int kbmode; /* Keyboard mode if virtual console */ - speed_t speeds[MAX_SPEED]; /* baud rates to be tried */ - }; - -@@ -936,7 +937,7 @@ static void update_utmp(struct options * - static void open_tty(char *tty, struct termios *tp, struct options *op) - { - const pid_t pid = getpid(); -- int serial, closed = 0; -+ int closed = 0; - - /* Set up new standard input, unless we are given an already opened port. */ - -@@ -1080,15 +1081,18 @@ static void open_tty(char *tty, struct t - #endif - /* - * Detect if this is a virtual console or serial/modem line. -- * In case of a virtual console the ioctl TIOCMGET fails and -- * the error number will be set to EINVAL. -+ * In case of a virtual console the ioctl KDGKBMODE succeeds -+ * whereas on other lines it will fails. - */ -- if (ioctl(STDIN_FILENO, TIOCMGET, &serial) < 0 && (errno == EINVAL)) { -+ if (ioctl(STDIN_FILENO, KDGKBMODE, &op->kbmode) == 0) { - op->flags |= F_VCONSOLE; - if (!op->term) - op->term = DEFAULT_VCTERM; -- } else if (!op->term) -- op->term = DEFAULT_STERM; -+ } else { -+ op->kbmode = K_RAW; -+ if (!op->term) -+ op->term = DEFAULT_STERM; -+ } - - setenv("TERM", op->term, 1); - } -@@ -1122,12 +1126,7 @@ static void termio_init(struct options * - - if (op->flags & F_VCONSOLE) { - #if defined(IUTF8) && defined(KDGKBMODE) -- int mode; -- -- /* Detect mode of current keyboard setup, e.g. for UTF-8 */ -- if (ioctl(STDIN_FILENO, KDGKBMODE, &mode) < 0) -- mode = K_RAW; -- switch(mode) { -+ switch(op->kbmode) { - case K_UNICODE: - setlocale(LC_CTYPE, "C.UTF-8"); - op->flags |= F_UTF8; diff --git a/util-linux-2.23.1-eject-fpie.patch b/util-linux-2.23.1-eject-fpie.patch deleted file mode 100644 index f997932..0000000 --- a/util-linux-2.23.1-eject-fpie.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- util-linux-2.23.1/sys-utils/Makemodule.am -+++ util-linux-2.23.1/sys-utils/Makemodule.am 2013-06-05 12:55:10.921439066 +0000 -@@ -142,8 +142,8 @@ endif # LINUX - if BUILD_EJECT - usrbin_exec_PROGRAMS += eject - eject_SOURCES = sys-utils/eject.c --eject_LDADD = $(LDADD) libmount.la libcommon.la --eject_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) -+eject_LDADD = $(SUID_LDFLAGS) $(LDADD) libmount.la libcommon.la -+eject_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -I$(ul_libmount_incdir) - dist_man_MANS += sys-utils/eject.1 - endif - diff --git a/util-linux-2.24-fdisk_remove_bogus_warnings.patch b/util-linux-2.24-fdisk_remove_bogus_warnings.patch deleted file mode 100644 index 0a07b8b..0000000 --- a/util-linux-2.24-fdisk_remove_bogus_warnings.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- util-linux-2.24/libfdisk/src/dos.c.orig 2013-10-21 11:22:29.810014709 +0200 -+++ util-linux-2.24/libfdisk/src/dos.c 2013-11-13 23:57:27.535962925 +0100 -@@ -1107,6 +1107,7 @@ - /* compute logical ending (c, h, s) */ - long2chs(cxt, dos_partition_get_start(p) + dos_partition_get_size(p) - 1, &lec, &leh, &les); - -+#if 0 - /* Same physical / logical beginning? */ - if (cxt->geom.cylinders <= 1024 - && (pbc != lbc || pbh != lbh || pbs != lbs)) { -@@ -1117,6 +1118,7 @@ - pbc, pbh, pbs, - lbc, lbh, lbs); - } -+#endif - - /* Same physical / logical ending? */ - if (cxt->geom.cylinders <= 1024 diff --git a/util-linux-2.24.2.tar.sign b/util-linux-2.24.2.tar.sign deleted file mode 100644 index 7185d53..0000000 --- a/util-linux-2.24.2.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQIcBAABAgAGBQJTWOMEAAoJEOS3HV7sOcKENCYP+wbqkV8Oj9rfvgQguiN7hFje -xGshx7s7R4q3ZOK3k7Iw6yln0vT/XWAieEmuy1SIitsQ7GWe81qMloJ85hGKeryQ -G6U/+T5RX3F3bpGBGAMrQ8Z1VM85+6Q84g4LbXK9QclVNpdYuIF68hs5KWjSlx+R -GhH87GpEVIskpTlNE7UmEGoxYm5sdmwb3pIg04SkVFPtvjlRxlTgL5uLjNc1d2tW -XVKgflMD6RLX/OeQTpmqPpfE8yQwwi20hph9ISQ/0cHXsp3Ab6Tx+hSZUlujQPZT -7ljuTioRplp0n7tBbE4Fu0r7BqummGgRTA8q1JakOCxs5UGDvhhILjNxf42jpkL4 -g++J6M2IoiMPbZlXu3NQEwaTkbIRY4THnWj0SSZtc6WVNdcPggwV8sx9fuzVHYjR -+FPRkPLFMsTYg1FZDFFNHVU0DynzHhCvY2idWEFTUFxou71dS1EMlaF7yu8uHN1R -QJZqfl0K1s76uffnzU3ljTg6ZD6PgVSYrJj85Q4UBUjxz3FLlj7XP9n/rNZszmc0 -YGRwmkifdiAh1g5vmax8LRPWs46450XUjd+U+d5NvAfLihtNhwsjlXs+Xqsnk9Do -Aq6IeyoVLO+pi2KRbYEWFzajUhBp5qpcNPjQHXn/1FOTuVFDpMwWhEhHrVb/SYlo -9qhwLq9ab+rI3J7Zgiqh -=JB8F ------END PGP SIGNATURE----- diff --git a/util-linux-2.24.2.tar.xz b/util-linux-2.24.2.tar.xz deleted file mode 100644 index 8f68bee..0000000 --- a/util-linux-2.24.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1243d6c07f1c5b38aa4c3814c81a71c24cba7dafe08942916bf216a90a460ff0 -size 3586580 diff --git a/util-linux-2.25.tar.sign b/util-linux-2.25.tar.sign new file mode 100644 index 0000000..4f51484 --- /dev/null +++ b/util-linux-2.25.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIcBAABAgAGBQJTzjJFAAoJEOS3HV7sOcKEYVcQAKNAIwpaYSNL4H3PYVlj/t6p +z5LrX9wD6c0nmNriaK6sqpRbJt7zRt/e9Vzmgs3TkHHsM7F7jq7Zir2erDyN+XRL +AjdDAjdPEbhWLwIOqCApoXirZTx1iv8GBrp/vWWrnk3DEQi30yuZENx5g6BlXVTr +wGNt0cpk2Pm7Qd2VZXFSl/D8wRxedoP4iI4+oNoIE9Z/Hc339qM8GBnptaYc9xCB +1EZdnMEsAZoS/lG/NWW1JPqoVoQzNG8wzVU97xPdTCdZINTaXNJGo5fvMF37mt/D +bIQagMayt6+FLUUGCvTP843gt/P3R5yQmiBwvuRXfnXHCemWZa6eTP4hjI7xdZYC +sV5CG+EUUxm/2R9nuKFaTImMPf7kGywxbWsMb3o09XJ8iDZogLrIFa7cfcdobJw3 +4sjFZxQ5SeWc7AJU8331b074VyL3w1eZreSZRX0CAXOYd/4p9k/fbIxLMN99iPd2 +3fyWS2WvJ8Y58ZPCeSZw/ZEaXcOpXxd1it3vFoOz5Vhr67IHM4P5CrHB7+WZF4AH +BxsVr2jLKN2GzqOlBn3hKdWW6bDUCwRYEBGdshwtzGy/Sw3lvSXVfeSicYNlmrYD +a5WxujQvjiAf12OA0GydOzR3nBkjcpmwMe9pQypMG8YEIO+3dXYpV3m+WSAMYq1g +eO4GVmg4fthgme1SMXBY +=Et2U +-----END PGP SIGNATURE----- diff --git a/util-linux-2.25.tar.xz b/util-linux-2.25.tar.xz new file mode 100644 index 0000000..ba0562a --- /dev/null +++ b/util-linux-2.25.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47ba5a8bd8cdd55262699078a5612a95db17966c7f20c43e3fe492c90ce7980a +size 3681308 diff --git a/util-linux-HACK-boot.localfs.diff b/util-linux-HACK-boot.localfs.diff deleted file mode 100644 index a5f7844..0000000 --- a/util-linux-HACK-boot.localfs.diff +++ /dev/null @@ -1,27 +0,0 @@ -From 89a0fa3ca57be7440500dd207d96ea1e2908959f Mon Sep 17 00:00:00 2001 -From: Ludwig Nussel -Date: Wed, 20 Jun 2012 10:56:05 +0200 -Subject: [PATCH] UGLY HACK: boot.localfs parses mount ouput and needs source - rather than target - ---- - sys-utils/mount.c | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) - -diff --git a/sys-utils/mount.c b/sys-utils/mount.c -index 8706716..b28d67a 100644 ---- a/sys-utils/mount.c -+++ b/sys-utils/mount.c -@@ -166,6 +166,9 @@ static int mount_all(struct libmnt_context *cxt) - while (mnt_context_next_mount(cxt, itr, &fs, &mntrc, &ignored) == 0) { - - const char *tgt = mnt_fs_get_target(fs); -+ if (getenv("MOUNT_PRINT_SOURCE")) { -+ tgt = mnt_fs_get_srcpath(fs); -+ } - - if (ignored) { - if (mnt_context_is_verbose(cxt)) --- -1.7.7 - diff --git a/util-linux-bash-completion-blockdev.patch b/util-linux-bash-completion-blockdev.patch new file mode 100644 index 0000000..d2f0f0b --- /dev/null +++ b/util-linux-bash-completion-blockdev.patch @@ -0,0 +1,13 @@ +Index: util-linux-2.25/bash-completion/Makemodule.am +=================================================================== +--- util-linux-2.25.orig/bash-completion/Makemodule.am ++++ util-linux-2.25/bash-completion/Makemodule.am +@@ -122,7 +122,7 @@ endif + if BUILD_FDFORMAT + dist_bashcompletion_DATA += bash-completion/fdformat + endif +-if LINUX ++if BUILD_BLOCKDEV + dist_bashcompletion_DATA += bash-completion/blockdev + endif + diff --git a/util-linux-libblkid-ext-probe.patch b/util-linux-libblkid-ext-probe.patch deleted file mode 100644 index 7212335..0000000 --- a/util-linux-libblkid-ext-probe.patch +++ /dev/null @@ -1,274 +0,0 @@ -This is a backport of patch from master branch. - -commit a1ca32fb3862ccac7275d6b342805b6d99f20e39 -Author: Lukas Czerner -Date: Tue Dec 3 16:24:44 2013 +0100 - - libblkid: Identify extN file system properly - - Currently when trying to identify extN file system we're playing games - with searching for kernel modules and parsing /proc/filesystem. All of - this just because ext4 module can be used to mount ext3 and ext2 file - systems on recent kernel and also because of ext4dev. - - However all of this is not necessary. Ext4 module which does support - mounting ext2 and ext3 file system is able to recognize and mount ext2 - and ext3 type so there is no need to disguise it and ext4dev should only - be ever used for testing and not as fallback when other modules are - missing (use -t instead). - - This also introduces a bug when in situation that we only have ext4 - modules with ext2/ext3 support which is not loaded and we try to mount - ext2 file system we will mount it incorrectly as ext4. This will not - happen if the ext4 module is already loaded. - - With this patch we remove all the unnecessary checks and return the real - type of the file system which is on the device. This fixes the issue. - However on the kernel which was not compiled with EXT4_USE_FOR_EXT23 - support one would have to provide file system type (-t) to be able to - mount the file system with ext4 driver. - - Signed-off-by: Lukas Czerner - Signed-off-by: Karel Zak - -Index: util-linux-2.24.1/libblkid/src/superblocks/ext.c -=================================================================== ---- util-linux-2.24.1.orig/libblkid/src/superblocks/ext.c -+++ util-linux-2.24.1/libblkid/src/superblocks/ext.c -@@ -18,7 +18,6 @@ - #endif - #include - --#include "linux_version.h" - #include "superblocks.h" - - struct ext2_super_block { -@@ -132,140 +131,11 @@ struct ext2_super_block { - #define EXT3_FEATURE_RO_COMPAT_UNSUPPORTED ~EXT3_FEATURE_RO_COMPAT_SUPP - - /* -- * Check to see if a filesystem is in /proc/filesystems. -- * Returns 1 if found, 0 if not -- */ --static int fs_proc_check(const char *fs_name) --{ -- FILE *f; -- char buf[80], *cp, *t; -- -- f = fopen("/proc/filesystems", "r" UL_CLOEXECSTR); -- if (!f) -- return 0; -- while (!feof(f)) { -- if (!fgets(buf, sizeof(buf), f)) -- break; -- cp = buf; -- if (!isspace(*cp)) { -- while (*cp && !isspace(*cp)) -- cp++; -- } -- while (*cp && isspace(*cp)) -- cp++; -- if ((t = strchr(cp, '\n')) != NULL) -- *t = 0; -- if ((t = strchr(cp, '\t')) != NULL) -- *t = 0; -- if ((t = strchr(cp, ' ')) != NULL) -- *t = 0; -- if (!strcmp(fs_name, cp)) { -- fclose(f); -- return 1; -- } -- } -- fclose(f); -- return (0); --} -- --/* -- * Check to see if a filesystem is available as a module -- * Returns 1 if found, 0 if not -- */ --static int check_for_modules(const char *fs_name) --{ --#ifdef __linux__ -- struct utsname uts; -- FILE *f; -- char buf[1024], *cp; -- int namesz; -- -- if (uname(&uts)) -- return 0; -- snprintf(buf, sizeof(buf), "/lib/modules/%s/modules.dep", uts.release); -- -- f = fopen(buf, "r" UL_CLOEXECSTR); -- if (!f) -- return 0; -- -- namesz = strlen(fs_name); -- -- while (!feof(f)) { -- if (!fgets(buf, sizeof(buf), f)) -- break; -- if ((cp = strchr(buf, ':')) != NULL) -- *cp = 0; -- else -- continue; -- if ((cp = strrchr(buf, '/')) == NULL) -- continue; -- cp++; -- -- if (!strncmp(cp, fs_name, namesz) && -- (!strcmp(cp + namesz, ".ko") || -- !strcmp(cp + namesz, ".ko.gz"))) { -- fclose(f); -- return 1; -- } -- } -- fclose(f); --#endif /* __linux__ */ -- return 0; --} -- --/* - * Starting in 2.6.29, ext4 can be used to support filesystems - * without a journal. - */ - #define EXT4_SUPPORTS_EXT2 KERNEL_VERSION(2, 6, 29) - --static int system_supports_ext2(void) --{ -- static time_t last_check = 0; -- static int ret = -1; -- time_t now = time(0); -- -- if (ret != -1 || (now - last_check) < 5) -- return ret; -- last_check = now; -- ret = (fs_proc_check("ext2") || check_for_modules("ext2")); -- return ret; --} -- --static int system_supports_ext4(void) --{ -- static time_t last_check = 0; -- static int ret = -1; -- time_t now = time(0); -- -- if (ret != -1 || (now - last_check) < 5) -- return ret; -- last_check = now; -- ret = (fs_proc_check("ext4") || check_for_modules("ext4")); -- return ret; --} -- --static int system_supports_ext4dev(void) --{ -- static time_t last_check = 0; -- static int ret = -1; -- time_t now = time(0); -- -- if (ret != -1 || (now - last_check) < 5) -- return ret; -- last_check = now; -- ret = (fs_proc_check("ext4dev") || check_for_modules("ext4dev")); -- return ret; --} -- --static int system_supports_ext4_ext2(void) --{ --#ifdef __linux__ -- return get_linux_version() >= EXT4_SUPPORTS_EXT2; --#else -- return 0; --#endif --} - /* - * reads superblock and returns: - * fc = feature_compat -@@ -357,15 +227,6 @@ static int probe_ext2(blkid_probe pr, - (fi & EXT2_FEATURE_INCOMPAT_UNSUPPORTED)) - return 1; - -- /* -- * If ext2 is not present, but ext4 or ext4dev are, then -- * disclaim we are ext2 -- */ -- if (!system_supports_ext2() && -- (system_supports_ext4() || system_supports_ext4dev()) && -- system_supports_ext4_ext2()) -- return 1; -- - ext_get_info(pr, 2, es); - return 0; - } -@@ -408,34 +269,9 @@ static int probe_ext4dev(blkid_probe pr, - if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) - return 1; - -- /* -- * If the filesystem does not have a journal and ext2 and ext4 -- * is not present, then force this to be detected as an -- * ext4dev filesystem. -- */ -- if (!(fc & EXT3_FEATURE_COMPAT_HAS_JOURNAL) && -- !system_supports_ext2() && !system_supports_ext4() && -- system_supports_ext4dev() && -- system_supports_ext4_ext2()) -- goto force_ext4dev; -- -- /* -- * If the filesystem is marked as OK for use by in-development -- * filesystem code, but ext4dev is not supported, and ext4 is, -- * then don't call ourselves ext4dev, since we should be -- * detected as ext4 in that case. -- * -- * If the filesystem is marked as in use by production -- * filesystem, then it can only be used by ext4 and NOT by -- * ext4dev, so always disclaim we are ext4dev in that case. -- */ -- if (le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS) { -- if (!system_supports_ext4dev() && system_supports_ext4()) -- return 1; -- } else -+ if (!(le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS)) - return 1; - --force_ext4dev: - ext_get_info(pr, 4, es); - return 0; - } -@@ -454,22 +290,11 @@ static int probe_ext4(blkid_probe pr, - if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) - return 1; - -- /* -- * If the filesystem does not have a journal and ext2 is not -- * present, then force this to be detected as an ext2 -- * filesystem. -- */ -- if (!(fc & EXT3_FEATURE_COMPAT_HAS_JOURNAL) && -- !system_supports_ext2() && system_supports_ext4() && -- system_supports_ext4_ext2()) -- goto force_ext4; -- - /* Ext4 has at least one feature which ext3 doesn't understand */ - if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) && - !(fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) - return 1; - --force_ext4: - /* - * If the filesystem is a OK for use by in-development - * filesystem code, and ext4dev is supported or ext4 is not -@@ -480,10 +305,8 @@ force_ext4: - * filesystem, then it can only be used by ext4 and NOT by - * ext4dev. - */ -- if (le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS) { -- if (system_supports_ext4dev() || !system_supports_ext4()) -- return 1; -- } -+ if (le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS) -+ return 1; - - ext_get_info(pr, 4, es); - return 0; diff --git a/util-linux-lscpu-improve-hypervisor-detection.patch b/util-linux-lscpu-improve-hypervisor-detection.patch deleted file mode 100644 index 2a2f3e6..0000000 --- a/util-linux-lscpu-improve-hypervisor-detection.patch +++ /dev/null @@ -1,206 +0,0 @@ -Index: util-linux-2.24.1/sys-utils/lscpu.c -=================================================================== ---- util-linux-2.24.1.orig/sys-utils/lscpu.c -+++ util-linux-2.24.1/sys-utils/lscpu.c -@@ -32,6 +32,15 @@ - #include - #include - #include -+#include -+#include -+#include -+#include -+#if defined(__x86_64__) || defined(__i386__) -+#ifdef HAVE_sys_io_h -+#include -+#endif -+#endif - - #include "cpuset.h" - #include "nls.h" -@@ -59,6 +68,7 @@ - #define _PATH_PROC_STATUS "/proc/self/status" - #define _PATH_PROC_VZ "/proc/vz" - #define _PATH_PROC_BC "/proc/bc" -+#define _PATH_PROC_DEVICETREE "/proc/device-tree" - #define _PATH_DEV_MEM "/dev/mem" - - /* virtualization types */ -@@ -86,7 +96,28 @@ const char *hv_vendors[] = { - [HYPER_UML] = "User-mode Linux", - [HYPER_INNOTEK] = "Innotek GmbH", - [HYPER_HITACHI] = "Hitachi", -- [HYPER_PARALLELS] = "Parallels" -+ [HYPER_PARALLELS] = "Parallels", -+ [HYPER_VBOX] = "Oracle", -+ [HYPER_OS400] = "OS/400", -+ [HYPER_PHYP] = "pHyp" -+}; -+ -+const int hv_vendor_pci[] = { -+ [HYPER_NONE] = 0x0000, -+ [HYPER_XEN] = 0x5853, -+ [HYPER_KVM] = 0x0000, -+ [HYPER_MSHV] = 0x1414, -+ [HYPER_VMWARE] = 0x15ad, -+ [HYPER_VBOX] = 0x80ee -+}; -+ -+const int hv_graphics_pci[] = { -+ [HYPER_NONE] = 0x0000, -+ [HYPER_XEN] = 0x0001, -+ [HYPER_KVM] = 0x0000, -+ [HYPER_MSHV] = 0x5353, -+ [HYPER_VMWARE] = 0x0710, -+ [HYPER_VBOX] = 0xbeef - }; - - /* CPU modes */ -@@ -550,10 +581,111 @@ read_hypervisor_cpuid(struct lscpu_desc - desc->hyper = HYPER_VMWARE; - } - -+#define VMWARE_BDOOR_MAGIC 0x564D5868 -+#define VMWARE_BDOOR_PORT 0x5658 -+#define VMWARE_BDOOR_CMD_GETVERSION 10 -+ -+#define VMWARE_BDOOR(eax, ebx, ecx, edx) \ -+ __asm__("inl (%%dx)" : \ -+ "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : \ -+ "0"(VMWARE_BDOOR_MAGIC), "1"(VMWARE_BDOOR_CMD_GETVERSION), \ -+ "2"(VMWARE_BDOOR_PORT), "3"(0) : \ -+ "memory"); -+ -+static jmp_buf segv_handler_env; -+ -+static void -+segv_handler(int sig, siginfo_t *info, void *ignored) -+{ -+ siglongjmp(segv_handler_env, 1); -+} -+ -+static int -+is_vmware_platform(void) -+{ -+ uint32_t eax, ebx, ecx, edx; -+ struct sigaction act, oact; -+ -+ /* -+ * The assembly routine for vmware detection works -+ * fine under vmware, even if ran as regular user. But -+ * on real HW or under other hypervisors, it segfaults (which is -+ * expected). So we temporarily install SIGSEGV handler to catch -+ * the signal. All this magic is needed because lscpu -+ * isn't supposed to require root privileges. -+ */ -+ if (sigsetjmp(segv_handler_env, 1)) -+ return 0; -+ -+ bzero(&act, sizeof(act)); -+ act.sa_sigaction = segv_handler; -+ act.sa_flags = SA_SIGINFO; -+ -+ if (sigaction(SIGSEGV, &act, &oact)) -+ err(EXIT_FAILURE, _("error: can not set signal handler")); -+ -+ VMWARE_BDOOR(eax, ebx, ecx, edx); -+ -+ if (sigaction(SIGSEGV, &oact, NULL)) -+ err(EXIT_FAILURE, _("error: can not restore signal handler")); -+ -+ return eax != (uint32_t)-1 && ebx == VMWARE_BDOOR_MAGIC; -+} -+ - #else /* ! __x86_64__ */ - static void - read_hypervisor_cpuid(struct lscpu_desc *desc __attribute__((__unused__))) - { -+#ifdef __powerpc__ -+ /* powerpc: -+ * IBM iSeries: legacy, if /proc/iSeries exists, its para-virtualized on top of OS/400 -+ * IBM pSeries: always has a hypervisor -+ * if partition-name is "full", its kind of "bare-metal": full-system-partition -+ * otherwise its some partition created by Hardware Management Console -+ * in any case, its always some sort of HVM -+ * KVM: "linux,kvm" in /hypervisor/compatible indicates a KVM guest -+ * Xen: not in use, not detected -+ */ -+ if (path_exist("/proc/iSeries")) { -+ desc->hyper = HYPER_OS400; -+ desc->virtype = VIRT_FULL; -+ } else if (path_exist(_PATH_PROC_DEVICETREE "/ibm,partition-name")) { -+ FILE *fd; -+ desc->hyper = HYPER_PHYP; -+ desc->virtype = VIRT_FULL; -+ fd = fopen(_PATH_PROC_DEVICETREE "/ibm,partition-name", "r"); -+ if (fd) { -+ char buf[256]; -+ if (fscanf(fd, "%s", buf) == 1 && !strcmp(buf, "full")) -+ desc->virtype = VIRT_NONE; -+ fclose(fd); -+ } -+ } else if (path_exist(_PATH_PROC_DEVICETREE "/hypervisor/compatible")) { -+ FILE *fd; -+ fd = fopen(_PATH_PROC_DEVICETREE "/hypervisor/compatible", "r"); -+ if (fd) { -+ char buf[256]; -+ int i; -+ memset(buf, 0, sizeof(buf)); -+ fread(buf, sizeof(buf) - 1, 1, fd); -+ fclose(fd); -+ for (i = 0; i < sizeof(buf);) { -+ if (!strcmp(&buf[i], "linux,kvm")) { -+ desc->hyper = HYPER_KVM; -+ desc->virtype = VIRT_FULL; -+ break; -+ } -+ i += strlen(&buf[i]); -+ i++; -+ } -+ } -+ } -+#endif -+} -+ -+static int is_vmware_platform(void) -+{ -+ return 0; - } - #endif - -@@ -588,9 +720,18 @@ read_hypervisor(struct lscpu_desc *desc, - desc->hyper = HYPER_XEN; - - /* Xen full-virt on non-x86_64 */ -- } else if (has_pci_device(0x5853, 0x0001)) { -+ } else if (has_pci_device( hv_vendor_pci[HYPER_XEN], hv_graphics_pci[HYPER_XEN])) { - desc->hyper = HYPER_XEN; - desc->virtype = VIRT_FULL; -+ } else if (is_vmware_platform()) { -+ desc->hyper = HYPER_VMWARE; -+ desc->virtype = VIRT_FULL; -+ } else if (has_pci_device( hv_vendor_pci[HYPER_VMWARE], hv_graphics_pci[HYPER_VMWARE])) { -+ desc->hyper = HYPER_VMWARE; -+ desc->virtype = VIRT_FULL; -+ } else if (has_pci_device( hv_vendor_pci[HYPER_VBOX], hv_graphics_pci[HYPER_VBOX])) { -+ desc->hyper = HYPER_VBOX; -+ desc->virtype = VIRT_FULL; - - /* IBM PR/SM */ - } else if (path_exist(_PATH_PROC_SYSINFO)) { -Index: util-linux-2.24.1/sys-utils/lscpu.h -=================================================================== ---- util-linux-2.24.1.orig/sys-utils/lscpu.h -+++ util-linux-2.24.1/sys-utils/lscpu.h -@@ -13,7 +13,10 @@ enum { - HYPER_UML, - HYPER_INNOTEK, /* VBOX */ - HYPER_HITACHI, -- HYPER_PARALLELS /* OpenVZ/VIrtuozzo */ -+ HYPER_PARALLELS, /* OpenVZ/VIrtuozzo */ -+ HYPER_VBOX, -+ HYPER_OS400, -+ HYPER_PHYP - }; - - extern int read_hypervisor_dmi(void); diff --git a/util-linux-ng-2.16-squashfs3-detect.patch b/util-linux-ng-2.16-squashfs3-detect.patch deleted file mode 100644 index 94caaab..0000000 --- a/util-linux-ng-2.16-squashfs3-detect.patch +++ /dev/null @@ -1,118 +0,0 @@ ---- - shlibs/blkid/src/superblocks/superblocks.c | 1 - shlibs/blkid/src/superblocks/superblocks.h | 1 - shlibs/blkid/src/superblocks/squashfs.c | 63 +++++++++++++++++++++++++++--------- - 3 files changed, 50 insertions(+), 15 deletions(-) - -Index: util-linux-2.19/shlibs/blkid/src/superblocks/superblocks.c -=================================================================== ---- util-linux-2.19.orig/libblkid/src/superblocks/superblocks.c -+++ util-linux-2.19/libblkid/src/superblocks/superblocks.c -@@ -131,6 +131,7 @@ static const struct blkid_idinfo *idinfo - &oracleasm_idinfo, - &vxfs_idinfo, - &squashfs_idinfo, -+ &squashfs3_idinfo, - &netware_idinfo, - &btrfs_idinfo, - &ubifs_idinfo, -Index: util-linux-2.19/shlibs/blkid/src/superblocks/superblocks.h -=================================================================== ---- util-linux-2.19.orig/libblkid/src/superblocks/superblocks.h -+++ util-linux-2.19/libblkid/src/superblocks/superblocks.h -@@ -54,6 +54,7 @@ extern const struct blkid_idinfo luks_id - extern const struct blkid_idinfo highpoint37x_idinfo; - extern const struct blkid_idinfo highpoint45x_idinfo; - extern const struct blkid_idinfo squashfs_idinfo; -+extern const struct blkid_idinfo squashfs3_idinfo; - extern const struct blkid_idinfo netware_idinfo; - extern const struct blkid_idinfo sysv_idinfo; - extern const struct blkid_idinfo xenix_idinfo; -Index: util-linux-2.19/shlibs/blkid/src/superblocks/squashfs.c -=================================================================== ---- util-linux-2.19.orig/libblkid/src/superblocks/squashfs.c -+++ util-linux-2.19/libblkid/src/superblocks/squashfs.c -@@ -31,20 +31,46 @@ struct sqsh_super_block { - static int probe_squashfs(blkid_probe pr, const struct blkid_idmag *mag) - { - struct sqsh_super_block *sq; -+ uint16_t major; -+ uint16_t minor; - - sq = blkid_probe_get_sb(pr, mag, struct sqsh_super_block); - if (!sq) - return -1; - -- if (strcmp(mag->magic, "sqsh") == 0 || -- strcmp(mag->magic, "qshs") == 0) -- blkid_probe_sprintf_version(pr, "%u.%u", -- sq->s_major, -- sq->s_minor); -- else -- blkid_probe_sprintf_version(pr, "%u.%u", -- swab16(sq->s_major), -- swab16(sq->s_minor)); -+ major = le16_to_cpu(sq->s_major); -+ minor = le16_to_cpu(sq->s_minor); -+ if (major < 4) -+ return -1; -+ -+ blkid_probe_sprintf_version(pr, "%u.%u", major, minor); -+ -+ return 0; -+} -+ -+static int probe_squashfs3(blkid_probe pr, const struct blkid_idmag *mag) -+{ -+ struct sqsh_super_block *sq; -+ uint16_t major; -+ uint16_t minor; -+ -+ sq = blkid_probe_get_sb(pr, mag, struct sqsh_super_block); -+ if (!sq) -+ return -1; -+ -+ if (strcmp(mag->magic, "sqsh") == 0) { -+ major = be16_to_cpu(sq->s_major); -+ minor = be16_to_cpu(sq->s_minor); -+ } else { -+ major = le16_to_cpu(sq->s_major); -+ minor = le16_to_cpu(sq->s_minor); -+ } -+ -+ if (major > 3) -+ return -1; -+ -+ blkid_probe_sprintf_version(pr, "%u.%u", major, minor); -+ - return 0; - } - -@@ -55,14 +81,21 @@ const struct blkid_idinfo squashfs_idinf - .probefunc = probe_squashfs, - .magics = - { -- { .magic = "sqsh", .len = 4 }, -- { .magic = "hsqs", .len = 4 }, /* swap */ -- -- /* LZMA version */ -- { .magic = "qshs", .len = 4 }, -- { .magic = "shsq", .len = 4 }, /* swap */ -+ { .magic = "hsqs", .len = 4 }, - { NULL } - } - }; - -+const struct blkid_idinfo squashfs3_idinfo = -+{ -+ .name = "squashfs3", -+ .usage = BLKID_USAGE_FILESYSTEM, -+ .probefunc = probe_squashfs3, -+ .magics = -+ { -+ { .magic = "sqsh", .len = 4 }, /* big endian */ -+ { .magic = "hsqs", .len = 4 }, /* little endian */ -+ { NULL } -+ } -+}; - diff --git a/util-linux-2.23.1-noenc-suse.diff b/util-linux-noenc-suse.patch similarity index 52% rename from util-linux-2.23.1-noenc-suse.diff rename to util-linux-noenc-suse.patch index b2a1a66..77cc2da 100644 --- a/util-linux-2.23.1-noenc-suse.diff +++ b/util-linux-noenc-suse.patch @@ -1,9 +1,11 @@ ---- util-linux-2.23.1/libmount/src/context_loopdev.c -+++ util-linux-2.23.1/libmount/src/context_loopdev.c 2013-06-05 09:44:37.081939564 +0000 -@@ -213,6 +213,9 @@ int mnt_context_setup_loopdev(struct lib +Index: util-linux/libmount/src/context_loopdev.c +=================================================================== +--- util-linux.orig/libmount/src/context_loopdev.c ++++ util-linux/libmount/src/context_loopdev.c +@@ -212,6 +212,9 @@ int mnt_context_setup_loopdev(struct lib if (rc == 0 && (cxt->user_mountflags & MNT_MS_ENCRYPTION) && mnt_optstr_get_option(optstr, "encryption", &val, &len) == 0) { - DBG(CXT, mnt_debug_h(cxt, "encryption no longer supported")); + DBG(CXT, ul_debugobj(cxt, "encryption no longer supported")); + // XXX: nasty for the lib but there's on better way to give a hint atm + fprintf(stderr, "mount: encryption no longer supported.\n" + " Please use /etc/crypttab instead (man 5 crypttab)\n"); diff --git a/util-linux-prevent-excessive-clock-drift-calculations.patch b/util-linux-prevent-excessive-clock-drift-calculations.patch deleted file mode 100644 index 9b7f359..0000000 --- a/util-linux-prevent-excessive-clock-drift-calculations.patch +++ /dev/null @@ -1,162 +0,0 @@ -From 654e902731ea15a3494a3831b78d2b9f1cd1408d Mon Sep 17 00:00:00 2001 -From: Ruediger Meier -Date: Fri, 16 May 2014 17:01:43 +0200 -Subject: [PATCH] Prevent excessive clock drift calculations - -Squashed commit of the following: - -commit f55b4b45126b657fe02f5f0d3d7fde740e6a6247 -Author: Karel Zak -Date: Tue May 6 12:51:42 2014 +0200 - - hwclock: fix typo - - Reported-by: Stanislav Brabec - Signed-off-by: Karel Zak - -commit db8fc5f37728810bdd5b865ac420c31714e35def -Author: Stanislav Brabec -Date: Mon May 5 20:49:49 2014 +0200 - - hwclock: Check drift value in /etc/adjtime - - Due to bug in older versions of hwclock, /etc/adjtime can contain - excessive drift value (up to many years per day). Prevent it - from applying. - - Signed-off-by: Stanislav Brabec - -commit f196fd1a5f8fff63635fd88b5a0f0bbc96978df2 -Author: Stanislav Brabec -Date: Mon May 5 20:49:29 2014 +0200 - - hwclock: Prevent excessive drift values - - Failure of CMOS battery can cause writing of excessive drift - values (up to many years per day). - - This causes excessive hwclock adjustment next time, which may lead - to overflow in calculate_adjustment() (and hang before 4a44a54b). - - Prevent this situation, check drift for limits and reset drift to zero - instead. - - Steps to reproduce: - - mv /etc/adjtime /etc/adjtime.backup - - rm /etc/adjtime - hwclock --set --date 2001-01-01\ 01:00:00 - - changing of /etc/adjtime. - mv /etc/adjtime /etc/adjtime.saved - hwclock --set --date 2001-01-02\ 01:00:01 - mv /etc/adjtime.saved /etc/adjtime - - echo "======= The /etc/adjtime has a \"correct\" look:" - cat /etc/adjtime - - hwclock --debug --systohc --utc - echo "======= The /etc/adjtime now has deeply failed drift value:" - cat /etc/adjtime - - mv /etc/adjtime /etc/adjtime.saved - hwclock --set --date 2015-01-01\ 01:00:00 - mv /etc/adjtime.saved /etc/adjtime - - hwclock --debug --adjust - echo "======= And the last /etc/adjtime:" - cat /etc/adjtime - - mv /etc/adjtime.backup /etc/adjtime - hwclock --systohc --utc - - Signed-off-by: Stanislav Brabec - -Signed-off-by: Ruediger Meier ---- - sys-utils/hwclock.c | 47 ++++++++++++++++++++++++++++++++++------------- - 1 file changed, 34 insertions(+), 13 deletions(-) - -diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c -index 395b5c3..0abf01f 100644 ---- a/sys-utils/hwclock.c -+++ b/sys-utils/hwclock.c -@@ -91,6 +91,11 @@ struct clock_ops *ur; - - #define FLOOR(arg) ((arg >= 0 ? (int) arg : ((int) arg) - 1)); - -+/* Maximal clock adjustment in seconds per day. -+ (adjtime() glibc call has 2145 seconds limit on i386, so it is good enough for us as well, -+ 43219 is a maximal safe value preventing exact_adjustment overflow.) */ -+#define MAX_DRIFT 2145.0 -+ - const char *adj_file_name = NULL; - - struct adjtime { -@@ -1008,6 +1013,7 @@ adjust_drift_factor(struct adjtime *adjtime_p, - double adj_days, cal_days; - double exp_drift, unc_drift; - double factor_adjust; -+ double drift_factor; - - /* Adjusted time units per hardware time unit */ - atime_per_htime = 1.0 + adjtime_p->drift_factor / sec_per_day; -@@ -1033,16 +1039,28 @@ adjust_drift_factor(struct adjtime *adjtime_p, - /* Amount to add to previous drift factor */ - factor_adjust = unc_drift / cal_days; - -- if (debug) -- printf(_("Clock drifted %.1f seconds in the past " -- "%d seconds in spite of a drift factor of " -- "%f seconds/day.\n" -- "Adjusting drift factor by %f seconds/day\n"), -- unc_drift, -- (int)(nowtime - adjtime_p->last_calib_time), -- adjtime_p->drift_factor, factor_adjust); -- -- adjtime_p->drift_factor += factor_adjust; -+ /* New drift factor */ -+ drift_factor = adjtime_p->drift_factor + factor_adjust; -+ -+ if (abs(drift_factor) > MAX_DRIFT) { -+ if (debug) -+ printf(_("Clock drift factor was calculated as " -+ "%f seconds/day.\n" -+ "It is far too much. Resetting to zero.\n"), -+ drift_factor); -+ drift_factor = 0; -+ } else { -+ if (debug) -+ printf(_("Clock drifted %.1f seconds in the past " -+ "%d seconds in spite of a drift factor of " -+ "%f seconds/day.\n" -+ "Adjusting drift factor by %f seconds/day\n"), -+ unc_drift, -+ (int)(nowtime - adjtime_p->last_calib_time), -+ adjtime_p->drift_factor, factor_adjust); -+ } -+ -+ adjtime_p->drift_factor = drift_factor; - } - adjtime_p->last_calib_time = nowtime; - -@@ -1190,9 +1208,12 @@ do_adjustment(struct adjtime *adjtime_p, - adjtime_p->dirty = TRUE; - } else if (adjtime_p->last_adj_time == 0) { - if (debug) -- printf(_ -- ("Not setting clock because last adjustment time is zero, " -- "so history is bad.")); -+ printf(_("Not setting clock because last adjustment time is zero, " -+ "so history is bad.\n")); -+ } else if (abs(adjtime_p->drift_factor) > MAX_DRIFT) { -+ if (debug) -+ printf(_("Not setting clock because drift factor %f is far too high.\n"), -+ adjtime_p->drift_factor); - } else { - int adjustment; - /* Number of seconds we must insert in the Hardware Clock */ --- -1.8.4.5 - diff --git a/util-linux-rpmlintrc b/util-linux-rpmlintrc index 9f6d408..676746b 100644 --- a/util-linux-rpmlintrc +++ b/util-linux-rpmlintrc @@ -10,4 +10,5 @@ addFilter(".*W:.*files-duplicate.*/pam/su.*/pam.d/su-l.*") addFilter(".*W:.*permissions-symlink.*/bin/su.*") addFilter(".*W:.*permissions-symlink.*/bin/umount.*") addFilter(".*W:.*permissions-symlink.*/bin/mount.*") - +# UGLY HACK: rpmlint falsely declares problems with files-attr-not-set +addFilter("W: files-attr-not-set") diff --git a/util-linux-setarch-uname26.patch b/util-linux-setarch-uname26.patch deleted file mode 100644 index eab770f..0000000 --- a/util-linux-setarch-uname26.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: util-linux-2.24/sys-utils/setarch.c -=================================================================== ---- util-linux-2.24.orig/sys-utils/setarch.c -+++ util-linux-2.24/sys-utils/setarch.c -@@ -146,6 +146,7 @@ set_arch(const char *pers, unsigned long - int perval; - const char *target_arch, *result_arch; - } transitions[] = { -+ {UNAME26, "uname26", NULL}, - {PER_LINUX32, "linux32", NULL}, - {PER_LINUX, "linux64", NULL}, - #if defined(__powerpc__) || defined(__powerpc64__) -Index: util-linux-2.24/sys-utils/Makemodule.am -=================================================================== ---- util-linux-2.24.orig/sys-utils/Makemodule.am -+++ util-linux-2.24/sys-utils/Makemodule.am -@@ -89,7 +89,7 @@ usrbin_exec_PROGRAMS += setarch - dist_man_MANS += sys-utils/setarch.8 - setarch_SOURCES = sys-utils/setarch.c - --SETARCH_LINKS = linux32 linux64 -+SETARCH_LINKS = uname26 linux32 linux64 - - if ARCH_S390 - SETARCH_LINKS += s390 s390x diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes new file mode 100644 index 0000000..2eaed7c --- /dev/null +++ b/util-linux-systemd.changes @@ -0,0 +1,3997 @@ +------------------------------------------------------------------- +Fri Aug 8 22:17:29 CEST 2014 - sbrabec@suse.cz + +- Update to version 2.25 + (using work of Ruediger Meier ): + * based on the git master branch of util-linux + * many fixes (including bnc#869355, bnc#871951 and + bnc#871698#c49) + * new Python binding sub-package for libmount: python-libmount + * new library: libsmartcols + * new commands: lslogins, setpriv + * add fstrim systemd timer + * better systemd integration + * DROPPED command: + * cytune: Upstream decided to remove tool untested for years + that supports this old hardware. +- Dropped patches included in the upstream: + (*git) Included with no changes + (+git) Included with improvements + (!git) Included with differences + * support-other-tty-lines-not-vconsole.patch (*b9c7390) + * agetty-fooled-on-serial-line-due-plymouth.patch, + * sulogin-fooled-on-tty-line-due-plymouth.patch (*bb280f7) + * agetty-on-s390-on-dev-3270-tty1-line.patch (*f2bcda5) + * sulogin-does-not-find-any-console.patch (*624b204) + * util-linux-setarch-uname26.patch (*f6eb160) + * util-linux-ng-2.16-squashfs3-detect.patch (*11402f5) + * util-linux-lscpu-improve-hypervisor-detection.patch + (!b774473, b32488c, 5bd31c6, 0f0c558, 96ce475) + WARNING, INCOMPATIBLE CHANGE: "lscpu -p" no more reports + hypervisor, as it breaks standard behavior. Use standard output + instead! (FATE#310255) + * blkid-stop-scanning-on-I-O-error.patch (+296d96e) + * blkid-convert-superblocks-to-new-calling-convention.patch + (+37f4060) + * util-linux-libblkid-ext-probe.patch (*a1ca32f) + * util-linux-hwclock-drift-check.patch (*f196fd1) + * util-linux-hwclock-adjtime-check.patch (*db8fc5f) +- Dropped obsolete patch: + * util-linux-2.23.1-eject-fpie.patch (eject is no more SUID) + * util-linux-2.24-fdisk_remove_bogus_warnings.patch + (upstream fixed it in a different way) + * util-linux-HACK-boot.localfs.diff + (MOUNT_PRINT_SOURCE is no more referenced) +- Ported and renamed: + * util-linux-2.23.1-noenc-suse.diff + -> util-linux-noenc-suse.patch +- Split spec file to three stages: + * util-linux.spec: Everything that do not need python or systemd. + * util-linux-systemd.spec: Stuff that needs systemd: + util-linux-systemd and uuidd + NOTE: Not building systemd-less variants of utilities. + * python-libmount.spec: Just python-libmount +- Move bash-completion files to correct packages. +- Add patch util-linux-bash-completion-blockdev.patch. +- Add hacks to prevent damaging of spec files by format_spec_file + (bnc#891152, also edited util-linux-rpmlintrc). + +------------------------------------------------------------------- +Sat Jul 26 11:44:57 UTC 2014 - dimstar@opensuse.org + +- Really fix devel-static requires (libblkid-devel-static). + +------------------------------------------------------------------- +Sat Jul 26 09:39:30 UTC 2014 - coolo@suse.com + +- fix requires of devel-static packages + +------------------------------------------------------------------- +Thu Jul 24 18:45:53 CEST 2014 - dsterba@suse.cz + +- enable build of libmount-devel-static, libuuid-devel-static and + libblkid-devel-static + +------------------------------------------------------------------- +Tue May 27 21:17:40 UTC 2014 - sweet_f_a@gmx.de + +- use nologin from upstream (was added in 2.24) +- remove unknown configure options +- remove unused and outdated suse READMEs +- require bc for checks + +------------------------------------------------------------------- +Fri May 16 15:10:53 UTC 2014 - sweet_f_a@gmx.de + +- Prevent excessive clock drift calculations (bnc#871698, + util-linux-prevent-excessive-clock-drift-calculations.patch), + committed by sbrabec@suse.cz + +------------------------------------------------------------------- +Thu May 8 08:15:04 UTC 2014 - werner@suse.de + +- Modify patch support-other-tty-lines-not-vconsole.patch to + make it work on virtual console +- Modify patch agetty-on-s390-on-dev-3270-tty1-line.patch + to add the missed 3270 support upstream + +------------------------------------------------------------------- +Wed May 7 14:12:32 UTC 2014 - werner@suse.de + +- Add patch support-other-tty-lines-not-vconsole.patch + to be able to support console lines like xvc and hvc + +------------------------------------------------------------------- +Thu Apr 24 11:33:36 UTC 2014 - sweet_f_a@gmx.de + +- Update to util-linux-2.24.2: + addpart: + * minor man page improvements + blockdev: + * Some minor corrections to the manual + build-sys: + * don't connect _DEPENDENCIES and _LIBADD + * fix .h.in usage in libblkid and libmount + * libmount/python/__init__.py is always a dist file + chcpu: + * cleanup return codes + * cleanup stdout/stderr usage + delpart: + * minor man page improvements + dmesg: + * -w output not line-buffered + * don't report EPIPE + docs: + * update AUTHORS file + fallocate: + * Clarify that space can also be deallocated + fdformat: + * Some minor change to the manual + fdisk: + * don't colorize "foo " prefixes + flock: + * use nfs4 fallback on EBADF too + fsck: + * Some typographical corrections to the manual + fsck.minix: + * A few typographical corrections to the manual + fstrim: + * add hint to man page + getopt: + * getopt.1 The usual doc dir is /usr/share/doc, not .../docs + hwclock: + * fix possible hang and other set_hardware_clock_exact() issues + include/closestream: + * don't wipe errno on EPIPE + ipcs: + * cleanup jumplabel stlyes + * fix ipc_msg_get_info fallback case + * fix ipc_sem_get_info fallback case + * fix ipc_shm_get_info fallback case + * fix memleak in ipc_*_get_info functions + isosize: + * A few typographical changes to the manual + last: + * fix minor typos in the man page + lib/sysfs: + * make dirent d_type usage more robust + libblkid: + * add extra checks to XFS prober + libfdisk: + * fix logical partition reorder command + * make qsort_r() optional + * properly implement read-only mode + libmount: + * FS id and parent ID could be zero + * accept (deleted) path suffix in mountinfo file + * initialize *root to NULL in mnt_table_get_root_fs + login: + * fix minor typos in the man page + losetup: + * wait for udev + lscpu: + * cleanup, use _PATH_SYS_CPU/NODE + * don't abort if cache size is unknown + * don't assume filesystem supports d_type when searching for NUMA nodes + * read_hypervisor_dmi only fallback to memory scan on x86/x86_64 + mkfs: + * Some typographical changes to the manual + mkfs.bfs: + * One typographical correction to the manual + mkfs.cramfs: + * Some typographical corrections to the manual + mkfs.minix: + * Some typographical changes in the manual + mkswap: + * Some minor typographical corrections to the manual + more: + * improve formatting and wording of man page and help text + mount: + * apply "nofail" to MNT_ERR_NOSOURCE libmount error + * fix --all and nofail return code + * mount.8 Some typographical and prefix corrections to the manual + * remove obsolete and confusing statement from mount.8 + * update mount.8 about barrier mount options defaults + nologin: + * minor man page improvements + nsenter: + * fix set{gid,uid} order,drop supplementary groups + partx: + * Improve the typesetting of the manual + * make dirent d_type usage more robust + po: + * merge changes + * update cs.po (from translationproject.org) + * update da.po (from translationproject.org) + * update de.po (from translationproject.org) + raw: + * Improve the typesetting of the manual + renice: + * correct max priority in renice man page + runuser: + * fix minor typos in the man page + script: + * Also flush writes to timing file. + * time from end of read() call partially fixes #58 + scriptreplay: + * no need to skip first time value or last bytes fixes #58 + setarch: + * Fix ppc64le architectures + setpriv: + * Fix --apparmor-profile + su: + * don't use kill(0, ...) when propagate signal + * fix minor typos in the man page + sulogin: + * minor man page improvements + swaplabel: + * Improve the typesetting of the manual + * wrong version number in check + switch_root: + * make dirent d_type usage more robust + * verify initramfs by f_type, not devno + tests: + * add fdisk 'f' command MBR test + * add lscpu dump for ppc cpu with no cache size + * clean up backport + * cleanup, remove unused lscpu output + * update Py parse mountinfo test + * update libmount tabdiff tests + * use old output format + umount: + * fix typo in usage + * more robust success message for --all + unshare: + * include libmount.h to provide missing MS_* defines + utmpdump: + * minor man page improvements + vipw: + * minor man page improvements +- remove tty3270-on-serial-line-of-s390.patch (was already upstream + since 2.24.1) +- remove barrier_documentation.patch (applied upstream) +- rebase blkid-convert-superblocks-to-new-calling-convention.patch + +------------------------------------------------------------------- +Thu Apr 17 22:43:31 CEST 2014 - sbrabec@suse.cz + +- Enable socket activation needed by systemd service (bnc#872807). + +------------------------------------------------------------------- +Fri Apr 11 16:45:03 CEST 2014 - sbrabec@suse.cz + +- libblkid: Drop the broken ext2/ext3/ext4 discrimination logic + (util-linux-libblkid-ext-probe.patch, bnc#864703). + +------------------------------------------------------------------- +Fri Apr 11 16:27:11 CEST 2014 - hare@suse.de + +- Abort blkid probing on I/O errors (bnc#859062, + blkid-stop-scanning-on-I-O-error.patch, + blkid-convert-superblocks-to-new-calling-convention.patch, + http://www.spinics.net/lists/util-linux-ng/msg08976.html) + +------------------------------------------------------------------- +Tue Apr 1 18:49:26 UTC 2014 - sweet_f_a@gmx.de + +- remove unnecessarily added patches from SLE11: + * util-linux-update-default-commit-interval.patch, openSUSE has + never changed the default and neither will SLE12 + * sfdisk-warn-about-2TB-limit.patch, fixed by upstream years ago + * umount-avoid-readlink.patch, this patch only affects unused + code and the used code does not have this bug +- edit util-linux-lscpu-improve-hypervisor-detection.patch to not + change the default behaviour of "lscpu -p" as documented in it's + man page. Now this patch only affects the summary output. + +------------------------------------------------------------------- +Mon Mar 17 22:36:58 CET 2014 - sbrabec@suse.cz + +- Merge fixes and features from SLE11 (bnc#831868): + * Detect squashfs version <= 3 as squashfs3 and version >= 4 as + squashfs. (mszeredi@suse.cz, + util-linux-ng-2.16-squashfs3-detect.patch, bnc#666893) + * add sfdisk-warn-about-2TB-limit.patch (puzel@novell.com, + bnc#495657) + * Document barrier option in mount.8 (jack@suse.cz, + hvogel@suse.de, + util-linux-ng-2.19.1-barrier_documentation.patch, bnc#489740) + * lscpu: improve hypervisor detection (puzel@novell.com, + fate#310255) + - util-linux-lscpu-improve-hypervisor-detection.patch + * umount: avoid calling readlink on mountpoints if not necessary + - add: umount-avoid-readlink.patch (puzel@suse.com, bnc#794529) + * fix file conflict between util-linux and s390-32 + (puzel@suse.com, bnc#805684) + * util-linux-update-default-commit-interval.patch: + mount(8): update default commit interval (puzel@suse.com, + bnc#809480) + * Obsolete no more packaged uuid-runtime. +- Add uname26 (util-linux-setarch-uname26.patch, FATE#313476). + +------------------------------------------------------------------- +Thu Mar 6 09:43:34 UTC 2014 - werner@suse.de + +- Modify the patches + agetty-fooled-on-serial-line-due-plymouth.patch + sulogin-fooled-on-tty-line-due-plymouth.patch + to be able to disable plymouth if not already terminated due to + a hanging network service (bnc#866860) + +------------------------------------------------------------------- +Sun Feb 9 21:20:31 UTC 2014 - andreas.stieger@gmx.de + +- util-linux 2.24.1 +- agetty: + * support the special terminal on first serial line on a S/390 +- blkdiscard: + * BLKSSZGET fills in an int, not a uint64 +- blkid: + * escape quotes in the output + * simple typo +- blockdev: + * don't use HDIO_GETGEO +- build-sys: + * add --with-smack to config-gen.d + * fstrim depends on libmount +- chsh, chfn: + * add info about non-local support to the man pages +- dmesg: + * fix --raw zero timestamp for kmsg +- docs: + * add patching process to howto-contribute.txt + * update AUTHORS file + * update links to http //git.kernel.org/ web repository views + -fdisk: + * don't care about partition type + * fix printf stuff + * fix usage(), -l [] +- flock: + * Change the 'exit status' man page section to make more sense +- fsck: + * add ext4 to list of filesystems with progress bars in fsck man page +- fstrim: + * add --all to discard all filesystem + * cleanup usage() +- lib/path: + * add path_strdup() +- libblkid: + * (nilfs2) check also backup superblock + * detect alone PMBR + * fix memory leak in blkid_parse_tag_string() + * fix swap-area version +- libfdisk: + * (dos) be more verbose when change bootable flag + * (dos) fix free part counter + * (dos) warn on type 0 + * (gpt) add /home GUID + * (gpt) improve and cleanup recovery code + * (gpt) recover from corrupted primary/backup PT + * (sgi) generate partname according to partition position + * (sun) fix end sectors with +1 error +- libmount: + * add efivarfs to the list of pseudo filesystems + * add mnt_tag_is_valid() + * cleanup fix_optstr() regards to selinux and smack + * fix typo in smack path + * remove smackfs* option when SMACK not enabled +- lsblk: + * fix -D segfault +- lscpu: + * sort NUMA nodes to keep output human readable + * support discontinuous NUMA nodes + * support non sequentially numbering of CPUs +- man: + * Syntax and spelling fixes +- mkfs.minix: + * fix fscanf() format string [coverity scan] +- mkswap: + * fix compiler warning [-Wunused-variable] + * remove cruft from the man page +- mount: + * add note about "noauto" to --all description + * correct mount man page default iso9660 permission + * fix man mount page type + * improve -s man mage info + * make NAME=value tags usable for non-root + * mount.8 fix grammar + * update man page ext3/4 mount options +- partx: + * fix --update ranges and out of order tables +- po: + * merge changes + * update da.po (from translationproject.org) + * update de.po (from translationproject.org) + * update pt_BR.po (from translationproject.org) + * update zh_CN.po (from translationproject.org) +- pylibmount: + * correctly import from pylibmount.so + * import directly from pylibmount in tests + * remove unncessary subdirectory +- script: + * don't call TIOCGWINSZ in signal handler + * restore errno in signal handler + * use poll() rather then O_NONBLOCK +- setpriv: + * simplify usage() +- setterm: + * fix -dump man page info +- sulogin: + * use dirent->d_type when scans /dev +- taskset: + * fix PERMISSIONS section of taskset man page +- tests: + * update blkid swap tests + * update build-sys tests + * update lscpu tests +- textual: + * small inprovements to usage and man page of fstrim +- umount: + * fix umount by tag for non-roots +- unshare: + * add more hints about mount namespaces to the man page +- wipefs: + * call BLKRRPART when erase partition table +- removed patches: + * blkdiscard-BLKSSZGET-fills-in-an-int.patch, applied upstream +- modified patches: + * tty3270-on-serial-line-of-s390.patch, one hunk applied + upstream + +------------------------------------------------------------------ +Fri Feb 7 15:59:20 UTC 2014 - werner@suse.de + +- Add patch sulogin-does-not-find-any-console.patch to enable sulogin + to find suitable console device even if first is not usable (bnc#862078) + +------------------------------------------------------------------- +Thu Feb 6 10:03:30 UTC 2014 - werner@suse.de + +- Avoid that hanging plymouth locks terminal lines that is + add patch sulogin-fooled-on-tty-line-due-plymouth.patch and + modify patch agetty-fooled-on-serial-line-due-plymouth.patch + to remove any lock which had been left over. + +------------------------------------------------------------------- +Tue Feb 4 10:24:02 UTC 2014 - werner@suse.de + +- Modify patch agetty-on-s390-on-dev--3270-tty1-line.patch and + patch tty3270-on-serial-line-of-s390.patch to handle 3270 + terminals +- Really do not verify /usr/bin/eject + +------------------------------------------------------------------- +Mon Feb 3 16:16:36 UTC 2014 - werner@suse.de + +- Add patch agetty-on-s390-on-dev--3270-tty1-line.patch + to let agetty detect /dev/3270/tty1 as device not as baud rate + +------------------------------------------------------------------- +Tue Jan 28 09:37:57 UTC 2014 - speilicke@suse.com + +- Don't verify /usr/bin/eject, it lost the SUID bit and was dropped + from /etc/permissions (bnc#824406) + +------------------------------------------------------------------- +Thu Jan 23 12:40:06 UTC 2014 - werner@suse.de + +- Change patch agetty-fooled-on-serial-line-due-plymouth.patch + to sleep instead of sending breaks to terminal (bnc#774126). + +------------------------------------------------------------------- +Mon Jan 13 10:45:54 CET 2014 - fcrozat@suse.com + +- Ensure localstatedir value used by configure is /run (changed to that + value upstream since 2012). + +------------------------------------------------------------------- +Fri Jan 10 13:08:45 UTC 2014 - werner@suse.de + +- Add patch + agetty-fooled-on-serial-line-due-plymouth.patch + even with TTYReset=no it seems with systemd or plymouth the termios + flags become changed from under the first agetty on a serial system + console as the flags are locked (bnc#774126). + +------------------------------------------------------------------- +Tue Dec 10 16:10:27 UTC 2013 - sweet_f_a@gmx.de + +- Update to util-linux-2.24 + + Release highlights (2.24) + fdisk(8): + * the code has been completely refactored and moved to libfdisk + (the library does not have a stable API yet) + * user interface has been unified for all label types and it + supports colors + * GPT disk UUID, partition UUID and partition name modification + is supported now + pylibmount: + * this new library provides PYTHON BINDINGS for libmount; + use --with-python[=2|3] to enable the bindings + last(1) and lastb(1): + * the NEW IMPLEMENTATION has been merged from sysvinit to + util-linux and extended; now it supports command line options + --present, --since, and --time-format + * use --enable-deprecated-last to enable the old util-linux + last(1) implementation + swapon(8): + * the option --discard= and fstab mount option discard= allow + to explicitly specify 'pages' or 'once' discard policy. If no + policy is selected, the default behavior is to enable both. + See swapon.8 man page for more details. + libblkid and blkid(8): + * supports LOGUUID= for external logs (e.g. extN and XFS) + * generates a pseudo PARTUUID= for MBR partitions (based on MBR + Id, Linux kernel supports the same concept for root= command + line option) + agetty(8): + * supportes new issue file \S escape code to read information + from /etc/os-release + * the option -L allows to completely control CLOCAL flag + dmesg(1): + * supports new command line option --time-format to specify + time format + * supports new iso-8601 time format + hexdump(1): + * supports long options now + wall(1): + * the command is compatible with sysvinit implementation now + logger(1): + * supports new command line option --prio-prefix when logging + stdin + lscpu(1): + * allows to detect more hypervisor types and provides info + about Max and Min CPU Mhz + unshare(8): + * supports new command line options --fork and --mount-proc for + pid namespaces + wipefs(8): + * now wipes superblocks with incorrect checksums too + * supports new command line option --backup to backup erased + data to $HOME/wipefs--.bak + nologin(8): + * this command has been merged into util-linux, the command + politely refuses a login. +- Removed following patches now upstream + * eject-scsi-check-host_status-and-driver_status.patch + * more-fix-buffer-overflow.patch + * more-check-for-buffer-size-when-write-multibyte-char.patch + * more-guarantee-space-for-multibyte.patch +- Removed following patch because now pkg-config does that + * fdisk-tinfo.patch +- Refreshed following patches with updating version string + * util-linux-2.23.1-fdisk_remove_bogus_warnings.patch +- Added enable_last condition in case we don't want to use the last + binary from sysvinit-tools in future +- Upstream moved getopt examples from datadir to docdir but we keep + the old location because we would need to fix the manpage first. + +------------------------------------------------------------------- +Fri Nov 29 13:46:21 UTC 2013 - werner@suse.de + +- Add patch + tty3270-on-serial-line-of-s390.patch + to better support the first and second serial line on s390/x + +------------------------------------------------------------------- +Sun Nov 3 12:53:34 UTC 2013 - schwab@linux-m68k.org + +- blkdiscard-BLKSSZGET-fills-in-an-int.patch: Fix type mismatch in + blkdiscard + +------------------------------------------------------------------- +Fri Oct 25 18:52:01 CEST 2013 - sbrabec@suse.cz + +- Drop SUID flag for eject (bnc#824406). + +------------------------------------------------------------------- +Wed Oct 9 10:00:55 UTC 2013 - schwab@suse.de + +- No *fdisk on m68k + +------------------------------------------------------------------- +Wed Oct 2 18:55:22 CEST 2013 - sbrabec@suse.cz + +- Safely migrate su config files from coreutils to util-linux + (bnc#814626#c18). + +------------------------------------------------------------------- +Fri Sep 27 21:58:03 UTC 2013 - mgorse@suse.com + +- Add more-check-for-buffer-size-when-write-multibyte-char.patch and + more-guarantee-space-for-multibyte.patch -- check for buffer space with + multi-byte chars (BNC#829720). + +------------------------------------------------------------------- +Fri Sep 27 16:58:40 UTC 2013 - mgorse@suse.com + +- Add more-fix-buffer-overflow.patch (bnc#829720). + +------------------------------------------------------------------- +Fri Sep 13 07:06:19 UTC 2013 - werner@suse.de + +- Avoid build require gpg-offline twice + +------------------------------------------------------------------- +Wed Sep 11 20:54:24 CEST 2013 - sbrabec@suse.cz + +- Update to version 2.23.2: + nsenter(1): + * this NEW COMMAND provides command line interface to setns() + Linux syscall and allows to run program with namespaces of + other processes + unshare(1): + * supports new PID and USER namespaces + fdisk(8): + * provides experimental support for GUID Partition Table (GPT), + the implementation is still not complete and some (unimportant) + features are missing. + * ~50% of fdisk code has been refactored, this task is going to + be complete in the next release. The goal is to have libfdisk + shared between all fdisks. + partx(8): + * supports new "update" command (implemented by + BLKPG_RESIZE_PARTITION ioctl) + mount(8): + * supports new userspace mount option x-mount.mkdir[=] to + create mountpoints on demand + * the support for propagation flags has been improved, now the + flags could be specified in /etc/fstab and used together with + regular mount options. It's also possible to specify more + propagation flags together. This EXPERIMENTAL feature is + implemented by additional mount(2) syscalls, because Linux does + not allow to use propagation flags with another options or more + flags together. + umount(8): + * supports new command line option --recursive to recursively + unmount all sub-mounts for the specified mountpoint * supports + new command line option --all-targets to unmount all + mountpoints in the current namespace for the specified + filesystem * the options --recursive and --all-targets could be + used together + dmesg(1): + * supports new command line options --color, --human and + --nopager, the --human option enables relative times, colors and + pager support. + su(1): + * supports new command line options --group and --supp-group to + specify primary and supplementary groups + chfn(1) and chsh(1): + * the commands could be linked with libuser to support non-local + accounts modification (e.g. LDAP, etc). + kill(1): + * the command has been improved to be compatible with procps + version, the procps version is deprecated now, the util-linux + version is enabled by default. + blkdiscard(8): + * this NEW COMMAND discard sectors on a device (for example on + SSD disks) + sulogin(8): + * provides multi-console feature from SysVinit + findmnt(8): + * provides new columns FREQ, PASSNO, ID, OPT-FIELDS, PROPAGATION + lslocks(8): + * provides new column BLOCKER and detects blocked locks + lsblk(8): + * supports new command line option --scsi and new columns HCTL, + TRANsport VENDOR and REVision + swapon(8) and losetup(8): + * the commands prints basic overview by default if no option + specified + column(1): + * supports new command line option --output-separator to specify + table output delimiter + rename(1): + * supports new command line option --symlink to rename symlink + target + hwclock(8): + * supports new command line option --compare to periodically + compare the Hardware Clock to the System Time (based on + adjtimex -c) + ipcs(1): + * supports new command line options --bytes and --human + wipefs(1): + * supports new command line option --force to force erase on used + devices +- Removed upstreamed patches (mkfs.bfs_cleanup_64bit.patch-Patch, + mkfs.bfs_cleanup_endian.patch) + +------------------------------------------------------------------- +Mon Jul 1 13:43:23 UTC 2013 - mail@bernhard-voelker.de + +- Correct condition for Conflicts of sysvinit-tools. + +------------------------------------------------------------------- +Mon Jul 1 07:08:46 UTC 2013 - werner@suse.de + +- Correct version in source URL path. + +------------------------------------------------------------------- +Fri Jun 28 17:42:14 CEST 2013 - sbrabec@suse.cz + +- Fix Provides and Obsoletes of eject. +- Conflict with old coreutils and sysvinit-tools with conflicting + files to guarantee seamless upgrade. +- Remove Provides and Obsoletes of packages that do not exist since + SuSE Linux 8. +- Include upstreamed patch from SUSE eject package: + Check eject host_status and driver_status when using SG_IO + (eject-scsi-check-host_status-and-driver_status.patch, + bnc#358033). + +------------------------------------------------------------------- +Wed Jun 19 10:58:17 UTC 2013 - coolo@suse.com + +- rely on systemd-rpm-macros instead of the full thing + +------------------------------------------------------------------- +Wed Jun 12 21:02:28 UTC 2013 - mail@bernhard-voelker.de + +- util-linux.spec: remove previously added "moving-su-trickery" again + as a su-less coreutils packet is in Base:Build and Factory now. + +------------------------------------------------------------------- +Fri Jun 7 00:13:25 UTC 2013 - mail@bernhard-voelker.de + +- util-linux.spec: work around su(1) PAM problems based on su(1) + being provided by both the coreutils and the util-linux package. + Fix macro typo in %post and %verifyscript sections related to su(1): + s/sysvinit_tools/enable_su/ + +------------------------------------------------------------------- +Thu Jun 6 08:27:43 UTC 2013 - werner@suse.de + +- Add make-sure-sbin-resp-usr-sbin-are-in-PATH.diff, that is include + the old "let `su' handle /sbin and /usr/sbin in path" +- Provide the new eject utility to avoid file conflict with old + eject package + +------------------------------------------------------------------- +Wed Jun 5 12:30:45 UTC 2013 - werner@suse.de + +- Update to util-linux-2.23.1 + + Release highlights (2.22) + su(1): + * has been merged from coreutils into util-linux + * utils-linux version uses /etc/pam.d/su-l PAM config file for --login + (e.g. "su -") session. + sulogin(8): + * has been merged from sysvinit into util-linux + utmpdump(1): + * has been merged from sysvinit into util-linux + eject(1): + * has been merged from inactive upstream from sf.net and Fedora into util-linux + * supports new options --manualeject, --force and --no-partitions-unmount + lslocks(1) + * this NEW COMMAND prints local system locks and it's replacement to very + long time unmaintained lslk(1) + wdctl(8): + * this NEW COMMAND shows hardware watchdog status + libuuid: + * does NOT EXECUTE uuidd on demand, the daemon has to be started by + init scripts / systemd + uuidd: + * supports socket activation (for systemd) + * supports new options -no-fork, --no-pid and --socket-activation + + Release highlights (2.23) + blkdiscard(8): + * this NEW COMMAND discard sectors on a device (for example on SSD disks) + sulogin(8): + * provides multi-console feature from SysVinit +- Removed following patches now upstream + * 0001-Test-for-secure_getenv-too.patch + * 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch + * add-canonicalize_path_restricted.patch + * fdiskbsdlabel.patch + * libmount-add-MNT_ERR_LOOPDEV.patch + * libmount-add-special-MNT_ERR-codes.patch + * libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch + * login-close-tty-before-vhangup.patch + * mount-new-add-loopdev-specific-error-message.patch + * mount-new-allow-sloppy-for-non-root.patch + * mount-new-improve-error-messages.patch + * mount-new-use-MNT_ERR-for-error-messages.patch + * mount-sanitize-paths-from-non-root-users.patch + * util-linux-2.21.2-noenc.diff + * umount-sanitize-paths-from-non-root-users.patch +- Removed following patch which otherwise cause to break build + * util-linux-2.20-libmount-deps.patch +- Refreshed following patches with updating version string + * util-linux-2.23.1-fdisk_remove_bogus_warnings.patch + * util-linux-2.23.1-noenc-suse.diff +- Add util-linux-2.23.1-eject-fpie.patch to compile and link eject + with PIE + +------------------------------------------------------------------- +Wed May 29 11:45:04 UTC 2013 - ihno@suse.com + +- fixing mkfs.bfs to make it 64bit and endian clean. + adding the patches mkfs.bfs_cleanup_64bit.patch and + mkfs.bfs_cleanup_endian.patch + +------------------------------------------------------------------- +Sun Mar 17 20:39:47 UTC 2013 - jengelh@inai.de + +- Split "which", "time" and "adjtimex" off util-linux + +------------------------------------------------------------------- +Sat Feb 16 17:48:29 UTC 2013 - schwab@suse.de + +- fdiskbsdlabel.patch: + Fix fdisk compilation on aarch64 + +------------------------------------------------------------------- +Tue Feb 5 14:32:49 UTC 2013 - crrodriguez@opensuse.org + +- 0001-Test-for-secure_getenv-too.patch: + Current glibc in 12.3/factory no longer exports internal + function __secure_getenv() but has secure_getenv() instead. + +------------------------------------------------------------------- +Mon Jan 7 13:26:15 UTC 2013 - puzel@suse.com + +- add-canonicalize_path_restricted.patch, + mount-sanitize-paths-from-non-root-users.patch, + umount-sanitize-paths-from-non-root-users.patch: + prevent leaking information about existence of folders + (bnc#797002, CVE-2013-0157) + +------------------------------------------------------------------- +Fri Dec 28 04:30:58 UTC 2012 - crrodriguez@opensuse.org + +- 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch + Use OS byteswapping macros, this patch is functionally identical + to the version submitted upstream with the exception it excludes + code that target non-linux systems. + +------------------------------------------------------------------- +Wed Sep 19 19:41:10 UTC 2012 - jslaby@suse.com + +- login: close tty before vhangup (bnc#778842) + login-close-tty-before-vhangup.patch + +------------------------------------------------------------------- +Fri Jun 22 09:37:20 CEST 2012 - kukuk@suse.de + +- Remove pam_lastlog from login.pamd, login is doing it itself. + [bnc#768067] + +------------------------------------------------------------------- +Wed Jun 20 09:22:50 UTC 2012 - lnussel@suse.de + +- add a hack for boot.localfs to determine the devices to wait for + +------------------------------------------------------------------- +Fri Jun 15 12:57:06 UTC 2012 - puzel@suse.com + +- improve error messages from new mount (bnc#767208) + - backport patches from upstream git: + - mount-new-add-loopdev-specific-error-message.patch + - mount-new-use-MNT_ERR-for-error-messages.patch + - libmount-add-special-MNT_ERR-codes.patch + - mount-new-improve-error-messages.patch + - libmount-add-MNT_ERR_LOOPDEV.patch + +------------------------------------------------------------------- +Fri Jun 15 10:07:26 UTC 2012 - lnussel@suse.de + +- remove encryption options completely as upstream will do that as + well in the next release (bnc#748879). + +------------------------------------------------------------------- +Thu Jun 14 13:04:40 UTC 2012 - puzel@suse.com + +- fix automount with quota (rh#825836) + - mount-new-allow-sloppy-for-non-root.patch +- fix wrong mount options for CIFS mounts (bnc#766157) + - libmount-don-t-use-nosuid-noexec-nodev-for-cifs-user.patch + +------------------------------------------------------------------- +Thu May 31 10:04:23 UTC 2012 - sweet_f_a@gmx.de + +- require binutils-devel because "which" wants to find libiberty.a +- remove which-lib64.patch because it's broken and couldn't find + libiberty.a whithin /usr/lib64 +- which doesn't need autoreconf anymore + +------------------------------------------------------------------- +Tue May 29 09:28:55 UTC 2012 - puzel@suse.com + +- switch to new libmount-based mount(8) + +------------------------------------------------------------------- +Fri May 25 12:12:09 UTC 2012 - puzel@suse.com + +- update to util-linux-2.21.2 + - bugfix release +- drop sfdisk-fix-calculation-due-to-type-mismatch.patch + (fixed upstream) + +------------------------------------------------------------------- +Fri May 25 12:03:07 UTC 2012 - puzel@suse.com + +- build with RPM_OPT_FLAGS again (removed by mistake) + +------------------------------------------------------------------- +Thu Apr 12 09:09:05 UTC 2012 - puzel@suse.com + +- fix miscalculation in sfdisk on ix86 (bnc#754789) + - add sfdisk-fix-calculation-due-to-type-mismatch.patch + +------------------------------------------------------------------- +Sat Mar 31 11:09:38 UTC 2012 - puzel@suse.com + +- update to util-linux-2.21.1 + - bugfix release + +------------------------------------------------------------------- +Fri Mar 16 09:56:21 UTC 2012 - fcrozat@suse.com + +- Fix Obsoletes / Provides for login. + +------------------------------------------------------------------- +Tue Mar 13 16:38:34 CET 2012 - kukuk@suse.de + +- Enable /bin/login and obsolete old fork now merged back + (not moved to /usr/bin until all problems are solved to + avoid that root is not able to login). + +------------------------------------------------------------------- +Tue Mar 6 21:18:56 UTC 2012 - rschweikert@suse.com + +- keep binaries in /usr tree (UsrMerge project) + +------------------------------------------------------------------- +Tue Feb 21 13:46:25 UTC 2012 - puzel@suse.com + +- update to util-linux-2.21 + chcpu(8): + - new command + prlimit(1): + - new command + losetup(8): + - the command has been rewritten, features: + * supports 64bit ioctls only + * losetup -a does not require root permissions + * uses new /dev/loop-control kernel API + * supports new command line option --partscan to enable + kernel partition table parser + agetty(8): + - supports new command line options --nohints to disable hints + about Num, Caps and Scroll Locks + - supports new command line option --remote to add a hostname + to the login(1) command line + dmesg(1): + - supports new command line options --file to read the log from + a file rather than from kernel buffer + fallocate(8): + - supports new command line options --punch-hole to punch holes + in the file + findmnt(8): + - supports alternative location of the fstab file + ipcrm(8): + - supports new command line option --all to remove all resources + lscpu(1): + - supports new command line options --all, --offline and + --online to list all, offline or online CPUs + - supports s390 topology description (polarization, books, ...) + partx(8): + - supports partitioned loop devices + wipefs(8): + - allows to zap partition tables + - supports new command line option "--type " to wipe only + specified filesystems, RAIDs or partition table types + libblkid: + - provides new function blkid_do_wipe() to remove all + signatures from the given block device. +- disable elvtune (works only with 2.4 kernel) +- drop patches which are upstream now: + - drop fsck-use-FS-blacklist-for-non-all-mode-too.patch + - drop util-linux-dmesg-fix-printing-of-multibyte-characters.patch + - libmount-ignore-tailing-slash-in-netfs-source-paths.patch + - libmount-fix-chdir-to-parent-for-restricted-user-umo.patch +- update to adjtimex-1.29 +- use fdupes to symlink duplicate manpages +- disabled make check for time (noop) +- libraries back to %{_libdir}, /usr merge project (by + crrodriguez@opensuse.org) +- drop cryptoloop support (provided by dm-crypt) + - util-linux-2.17.1-mount_losetup_crypto.patch + +------------------------------------------------------------------- +Tue Feb 7 14:48:23 UTC 2012 - jengelh@medozas.de + +- Remove redundant tags/sections + +------------------------------------------------------------------- +Sun Dec 25 22:19:44 UTC 2011 - coolo@suse.com + +- do not call %suse_update_config + +------------------------------------------------------------------- +Mon Nov 21 15:13:56 UTC 2011 - aj@suse.de + +- add fdisk-tinfo.patch to fix build with newer curses. + +------------------------------------------------------------------- +Tue Nov 15 13:15:19 UTC 2011 - coolo@suse.com + +- add libtool as buildrequire to avoid implicit dependency + +------------------------------------------------------------------- +Wed Nov 9 08:27:17 UTC 2011 - puzel@suse.com + +- add libmount-ignore-tailing-slash-in-netfs-source-paths.patch and + libmount-fix-chdir-to-parent-for-restricted-user-umo.patch: + fix umounting network filesystems as plain user (bnc#728480) + +------------------------------------------------------------------- +Tue Nov 8 09:36:41 UTC 2011 - puzel@suse.com + +- add fsck-use-FS-blacklist-for-non-all-mode-too.patch (bnc#728645) + +------------------------------------------------------------------- +Wed Nov 2 09:37:12 UTC 2011 - puzel@suse.com + +- add util-linux-dmesg-fix-printing-of-multibyte-characters.patch + (bnc#725993) + +------------------------------------------------------------------- +Thu Oct 20 13:01:22 UTC 2011 - puzel@suse.com + +- update to util-linux-2.20.1 + - bugfix release +- drop patches (in upstream): + - util-linux-sfdisk-manpage-fix.patch + - util-linux-lib-sysfs-deinit.patch + - fdisk-dont-shorten-long-path-to-disk.patch + +------------------------------------------------------------------- +Wed Oct 12 09:26:40 UTC 2011 - puzel@suse.com + +- add fdisk-dont-shorten-long-path-to-disk.patch (bnc#722959) + +------------------------------------------------------------------- +Tue Oct 4 11:32:11 UTC 2011 - uli@suse.com + +- cross-build fix: use %__cc, %configure macros +- set bindir explicitly when installing +- (cross-?)build fix: disable build dependency on SELINUX_LIBS + in libmount + +------------------------------------------------------------------- +Tue Sep 13 09:10:43 UTC 2011 - puzel@suse.com + +- add util-linux-lib-sysfs-deinit.patch (bnc#714151) + +------------------------------------------------------------------- +Mon Aug 29 14:57:57 UTC 2011 - puzel@suse.com + +- update to util-linux-2.20 + - cleanups, bugfixes +- build with --enable-ddate +- add util-linux-sfdisk-manpage-fix.patch + +------------------------------------------------------------------- +Thu Aug 25 14:12:15 UTC 2011 - rguenther@novell.com + +- BuildIgnore pwdutils. + +------------------------------------------------------------------- +Wed Aug 17 10:37:20 UTC 2011 - puzel@novell.com + +- update to util-linux-2.20-rc2 + - bugfixes +- drop patches: + - util-linux-fix-manpages.patch + - util-linux-wall-build-with-pie.patch + - util-linux-2.20-rc1-agetty-fixes.patch + - util-linux-2.20-rc1-hexdump-segfault.patch + - util-linux-2.20-rc-fix-dmesg.patch + +------------------------------------------------------------------- +Wed Aug 10 13:42:33 UTC 2011 - puzel@novell.com + +- add util-linux-2.20-rc1-hexdump-segfault.patch (bnc#710877) + +------------------------------------------------------------------- +Wed Aug 10 12:20:41 UTC 2011 - puzel@novell.com + +- add util-linux-2.20-rc-fix-dmesg.patch (bnc#710417) + +------------------------------------------------------------------- +Wed Aug 10 11:06:15 UTC 2011 - puzel@novell.com + +- add util-linux-2.20-rc1-agetty-fixes.patch (bnc#711240) + +------------------------------------------------------------------- +Mon Aug 1 13:44:21 UTC 2011 - puzel@novell.com + +- update to util-linux-2.20-rc1 + - Release highlights + agetty(8): + - mingetty features have been merged to agetty + chrt(1), taskset(1): + - supports new command line option "--all-tasks" to set or + retrieve the scheduling attributes of all the tasks (threads) + for a given PID + dmesg(1): + - supports new command line options: --clear, --console-on, + --console-off, --ctime, --decode, --facility=, + --level=, --show-delta, --notime, --kernel and + --userspace + fdisk(8): + - improved dialogs to be more user-friendly + findmnt(8), partx(8), lsblk(8) + - support new command line option "--pairs" to enable + key="value" output format + findmnt(8): + - supports new command line options "--poll" and "--timeout" to + monitor /proc/self/mountinfo changes + ionice(1): + - supports human-readable scheduling class names, for example: + ionice -c best-effort $PID + kill(1): + - supports new command line option "-q " to use + sigqueue(2) + - supports real-time signals in formats RT, RTMIN+ and + RTMAX- + lsblk(8): + - supports new columns + - supports new command line option "-D" to print device discard + topology + lscpu(8): + - improved support for s390 boxes + mkfs.minix: + - supports minix version 3 + simpleinit: + - this set of deprecated utils has been REMOVED + wall(1): + - support new command line option "--timeout" to specify write + timeout to terminals in seconds. +- add util-linux-fix-manpages.patch +- add util-linux-wall-build-with-pie.patch +- package /sbin/rcuuidd + +------------------------------------------------------------------- +Tue May 3 09:39:37 UTC 2011 - puzel@novell.com + +- update to util-linux-2.19.1 + - numerous bugfixes, including (bnc#690486 and bnc#690488) +- drop umount-by-imgname.patch (merged upstream) +- cleanup: do not register ipc.info.gz (not provided by + this package) + +------------------------------------------------------------------- +Thu Apr 14 16:27:27 UTC 2011 - puzel@novell.com + +- merge util-linux-2.17.1-losetup-honor-documented-c-option and + util-linux-2.17.1-mount_losetup_crypto.patch) + +------------------------------------------------------------------- +Mon Feb 21 16:28:38 UTC 2011 - puzel@novell.com + +- add umount-by-imgname.patch (bnc#666161) + +------------------------------------------------------------------- +Thu Feb 10 11:01:40 UTC 2011 - puzel@novell.com + +- update to util-linux-2.19 + - uuid fixes + - cleanups, documentation and translation updates +- drop util-linux-2.19-rc1-loop-offset.diff (fixed in upstream, by + different patch) + +------------------------------------------------------------------- +Wed Jan 26 11:47:55 UTC 2011 - puzel@novell.com + +- update to util-linux-2.19-rc3 + - bugfixes + +------------------------------------------------------------------- +Tue Jan 25 09:29:15 UTC 2011 - lnussel@suse.de + +- don't mess with /etc/mtab in %post. aaa_base does that for us + already. + +------------------------------------------------------------------- +Fri Jan 21 12:34:35 UTC 2011 - lnussel@suse.de + +- fix parsing offset= followed by more options (bnc#666150) + +------------------------------------------------------------------- +Tue Jan 18 09:47:11 UTC 2011 - bwiedemann@novell.com + +- fix bnc#664873 + +------------------------------------------------------------------- +Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com + +- update to util-linux-2.19-rc1 +- important changes: + * lsblk(8): + - this NEW COMMAND lists information about all or selected block + devices in tree-like format. + * partx(8): + - this command has been rewritten to use libblkid for partition + tables parsing. It supports aix, bsd, dos, gpt, mac, minix, + sgi, solaris_x86, sun, ultrix and unixware now. + - supports new command line option "--show" to list partitions in + new format + - prints UUID and name for GPT and mac partitions + * findmnt(8): + - supports new command line option "--submounts" to list all + submounts for selected mountpoint(s) + * agetty(8): + - supports new command line options "-c" and "-s" to reuse + already initialized tty cflags and existing baud rate + * mount(8), umount(8): + - could be linked with libmount (--enable-libmount-mount) to + manage userspace mount options outside /etc/mtab on systems + where the file is a symlink to /proc/mounts. (EXPERIMENTAL, + enabled in openSUSE package) + * losetup(8), mount(8): + - uses /sys/dev/block//loop/backing_file rather than + loopdev ioctls (requires kernel >= 2.6.37) + * fsck(8): + - supports new command line option "-l" to lock whole-disk device + by exclusive flock(2). This option is recommended when more + fsck(8) instances are executed in the same time. + * rtcwake(8): + - supports new mode "show" to print the current RTC alarm time + * fstrim(8): + - this NEW COMMAND allows to discard unused blocks on a mounted + filesystem (wrapper for FITRIM ioctl) + * swapon(8): + - supports new options "discard" and "nofail" + +- in post, replace /etc/mtab with a symlink to /proc/mounts/self +- drop following patches (in upstream) + - util-linux-swapon-btrfs-limitations + - util-linux-agetty-s-option.patch + - util-linux-fsck-l-option.patch + - util-linux-2.18-no-canonicalize-fix.patch + - util-linux-swapon-canonicalize-swap-device.patch +- fix uuidd Summary and Description +- build with --enable-libmount-mount (new option) +- use set_permissions macros +- run spec-cleaner + +------------------------------------------------------------------- +Tue Dec 14 16:11:34 UTC 2010 - puzel@novell.com + +- add util-linux-swapon-canonicalize-swap-device.patch + (bnc#641142) + +------------------------------------------------------------------- +Thu Dec 2 17:09:08 CET 2010 - mszeredi@suse.cz + +- mount: don't canonicalize "spec" with --no-canonicalize option + [bnc#651598] + +------------------------------------------------------------------- +Thu Dec 2 15:23:36 CET 2010 - mszeredi@suse.cz + +- add Provides: util-linux(fake+no-canonicalize) [bnc#651598] + +------------------------------------------------------------------- +Tue Nov 30 12:19:53 UTC 2010 - puzel@novell.com + +- update util-linux-2.17.1-mount_losetup_crypto.patch (bnc#655804) + +------------------------------------------------------------------- +Fri Nov 26 19:10:27 CET 2010 - kay.sievers@novell.com + +- add Provides: fsck-with-dev-lock + +------------------------------------------------------------------- +Thu Nov 25 13:37:43 CET 2010 - kay.sievers@novell.com + +- add 'fsck -l' option needed for systemd + +------------------------------------------------------------------- +Tue Nov 16 16:08:48 UTC 2010 - cristian.rodriguez@opensuse.org + +- disable silent rules + +------------------------------------------------------------------- +Thu Nov 11 10:36:35 CET 2010 - kay.sievers@novell.com + +- add 'agetty' -s option needed for systemd's serial console setup + +------------------------------------------------------------------- +Tue Sep 28 11:42:46 UTC 2010 - aj@suse.de + +- uuidd rc file already creates /var/run/uuidd, mark it as %ghost + in spec file. + +------------------------------------------------------------------- +Fri Jul 9 06:23:27 UTC 2010 - puzel@novell.com + +- update to util-linux-ng-2.18 + - do not provide rdev, ramsize, vidmode and rootflags commands + anymore + - fdisk does not use cylinders as display units by default + - libmount: new library; its API is still officially unstable + - new commands: findmnt, fsfreeze, swaplabel + - blkid: new option "-i" to print I/O limits + - full release notes: + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes +- update to adjtimex-1.28 +- update to which-2.20 +- drop util-linux-2.14.1-mount_skip_sync.patch (fixed upstream) +- drop util-linux-addpart-use-atoll.patch (fixed upstream) +- drop util-linux-mount-detect-ro-mount.patch (fixed upstream) +- drop adjtimex-1.20-nosyscall.diff (fixed upstream) +- cleanup specfile a bit + +------------------------------------------------------------------- +Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de + +- use %_smp_mflags + +------------------------------------------------------------------- +Thu Jun 24 23:24:41 CEST 2010 - jeffm@suse.de + +- document btrfs limitation with swapfiles (bnc#616617) + +------------------------------------------------------------------- +Tue Jun 22 16:48:29 UTC 2010 - bg@novell.com + +- hppa specific binaries are parisc{,32,64} + +------------------------------------------------------------------- +Tue Jun 1 14:23:23 UTC 2010 - puzel@novell.com + +- do not run uuidd as root, but uuidd:uuidd (bnc#604168) + +------------------------------------------------------------------- +Fri May 28 13:24:43 UTC 2010 - puzel@novell.com + +- add util-linux-mount-detect-ro-mount.patch (bnc#481123) + +------------------------------------------------------------------- +Tue May 11 13:58:49 UTC 2010 - puzel@novell.com + +- add util-linux-addpart-use-atoll.patch (bnc#603328) + +------------------------------------------------------------------- +Tue Apr 6 13:22:37 UTC 2010 - hvogel@novell.com + +- update to version 2.17.2 + - fix small typo in v2.17.1-ReleaseNotes + - fix -b fdisk + - fix typo in ionice + - fix display of device size, fix infinite loop when probe chain + bails out early, more robust minix probing, remove "0x" prefix + from DRBD UUID, reset BLKID_TINY_DEV flag in + blkid_probe_set_device, support alignment_offset=-1 in libblkid + - fix cpuid opcode detection in lscpu + - more explicitly explain fstab usage in mount.8, posix option + of vfat is obsolete, properly ignore comments in + /etc/filesystems in mount + - update ja.po, pl.po, update vi.po + - remove " (deleted)" from filenames from /proc/swaps + - cleanup usage() and man page of wipefs + +------------------------------------------------------------------- +Wed Mar 10 23:11:42 CET 2010 - jeffm@suse.de + +- Properly honor documented -c option (bnc#583677) + +------------------------------------------------------------------- +Tue Mar 2 09:53:04 UTC 2010 - lnussel@suse.de + +- drop freeramdisk (bnc#584565) +- drop hostid (bnc#584562) + +------------------------------------------------------------------- +Tue Feb 23 12:46:07 UTC 2010 - lnussel@suse.de + +- new version 2.17.1 + - new commands: wipefs, unshare, fallocate + - fdisk: DOS-compatible mode marked deprecated + - honor nofail option in fsck + - libblkid overhaul + - lots of bug fixes +- fix self-obsoletes +- compile suid programs using -fpie +- drop -DCONFIG_SMP for s390 as it doesn't seem to be used anyways + +------------------------------------------------------------------- +Sun Dec 13 15:19:16 CET 2009 - jengelh@medozas.de + +- add baselibs.conf as a source + +------------------------------------------------------------------- +Sun Dec 6 15:07:33 CET 2009 - jengelh@medozas.de + +- enabled parallel build + +------------------------------------------------------------------- +Mon Nov 30 17:05:38 CET 2009 - meissner@suse.de + +- exclude sparc correctly -> %sparc bnc#559180 + +------------------------------------------------------------------- +Sun Nov 15 14:04:48 CET 2009 - meissner@suse.de + +- refreshed patches with fuzz=0 + +------------------------------------------------------------------- +Mon Oct 26 17:45:53 UTC 2009 - crrodriguez@opensuse.org + +- fsck during boot up fails with Too many open files [bnc#503008] + +------------------------------------------------------------------- +Tue Oct 20 12:14:24 CEST 2009 - dmueller@suse.de + +- fix typo in baselibs.conf change + +------------------------------------------------------------------- +Tue Oct 13 11:23:07 UTC 2009 - aj@suse.de + +- Fix requires of 32-bit devel packages. + +------------------------------------------------------------------- +Tue Sep 29 12:58:37 UTC 2009 - hvogel@novell.com + +- finaly remove the mount mtab locking patch: + * util-linux-2.14.1-mount_race.patch + It causes too much regressions. + +------------------------------------------------------------------- +Mon Jul 13 14:21:07 CEST 2009 - kay.sievers@novell.com + +- update to final 2.16 release + - fix libdir issues in pkgconfig files + - fix location of uuidd run directory + - improve libuuid handling if uuidd is installed but not setuid +- add blkid.conf file to: + - disable the sequential /dev scanner + - move cache to /dev/.blkid.tab to get file out of /etc + and prevent the cache file to survive a reboot + +------------------------------------------------------------------- +Wed Jul 8 13:14:42 CEST 2009 - meissner@novell.com + +- added baselibs.conf for libblkid* and libuuid* + +------------------------------------------------------------------- +Sun Jun 28 21:36:57 CEST 2009 - kay.sievers@novell.com + +- update to version 2.16 +- switch from libvolume_id to new libblkid +- provide fsck +- provide libblkid +- provide libuuid +- provide setarch +- provide separate uuidd package +- remove patches: + util-linux-2.14.1-lscpu.patch (upstream) + util-linux-2.14.1-lscpu_add_hypervisor_detection.patch (upstream) + util-linux-2.14.1-lscpu_sysroot_option.patch (upstream) + util-linux-2.14.1-sys-utils_lscpu_exit.patch (upstream) + util-linux-2.14.2-schedutils_fix_email.patch (upstream) + util-linux-2.12r-fdisk_cyl.patch (upstream) + util-linux-2.14.1-mount_swap_pagesize.patch (--fixpg option) + util-linux-2.14.2-schedutils_ionice_enosys.patch (-t option) + util-linux-2.14.1-hwclock_adjust_and_hctosys.patch (--systz) + +------------------------------------------------------------------- +Thu Apr 16 14:55:22 CEST 2009 - werner@suse.de + +- Move /usr/sbin/adjtimex to /sbin/adjtimex to be able to check the + kernel time variables even without /usr mounted + +------------------------------------------------------------------- +Mon Feb 16 12:35:00 CET 2009 - mkoenig@suse.de + +- remove util-linux-2.14.1-fdisk_cylinder.patch + fixed upstream + +------------------------------------------------------------------- +Thu Feb 12 17:12:28 CET 2009 - mkoenig@suse.de + +- update to version 2.14.2 + chrt: + * support CFS SCHED_IDLE priority and document it + fdisk: + * cannot create partition with starting beyond 1 TB + * remove obsolete information from man page + hwclock: + * remove "cli" and "sti" from i386 CMOS code + * remove x86_64-specific bogon + losetup: + * add warning about read-only mode + * missing EBUSY error hint message + more: + * minor fixes to magic() + mount: + * add i_version support + * add info about /proc/mounts to mount.1 + * add info about semantics of read-only mount to mount.8 + * add rootcontext= SELinux mount option + * clean up SPEC canonicalization + * create separate section for fs-independent options in mount.8 + * finalize support of quoted LABELs/UUIDs + * mtab created multiple times with -a option + * suggest to use blockdev --setro rather than losetup +- catch ENOSYS in ionice to allow execution in virtualized + environments which don't support ioprio_{get,set} calls [bnc#444637] +- umount: fix suid check for user mounted loop devices [bnc#461732] +- fix doc [bnc#456375] +- remove patches: + util-linux-2.13.1-fdisk_cfdisk_yesno.patch + util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch + util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch + util-linux-2.14.1-fdisk_missing_include.patch + util-linux-2.14.1-mount_loop_ro_fix.patch + +------------------------------------------------------------------- +Sat Feb 7 18:28:58 CET 2009 - schwab@suse.de + +- Fix info dir entry for which. + +------------------------------------------------------------------- +Wed Jan 7 15:42:38 CET 2009 - mkoenig@suse.de + +- fix locking problem for external mount helpers when type + is not given [bnc#459839] + +------------------------------------------------------------------- +Tue Dec 2 12:23:37 CET 2008 - mkoenig@suse.de + +- raw: do not stat the raw devices when binding, since they + are created dynamically [bnc#450675] + +------------------------------------------------------------------- +Thu Nov 27 01:27:19 CET 2008 - dmueller@suse.de + +- mount: fix hang on trying to find a free loop device + if one of them has a stale nfs handle mounted (bnc#449646) + +------------------------------------------------------------------- +Mon Nov 24 15:24:11 CET 2008 - mkoenig@suse.de + +- mount: fix locking patch to not break -n [bnc#447937] + +------------------------------------------------------------------- +Thu Nov 20 18:08:33 CET 2008 - mkoenig@suse.de + +- mount: enhance mount/umount mtab locking and lock the whole + read mtab/syscall/write mtab process to avoid mtab corruption + with highly concurrent mount/umount calls [bnc#444966] +- add arch/powerpc/boot/addnote.c from kernel 2.6.27 + as /usr/bin/chrp-addnote [bnc#443859] +- umount: skip sync() in umount -a if no umount happened [bnc#447036] +- hwclock: allow --adjust and --hctosys simultaneously [bnc#441106] + +------------------------------------------------------------------- +Fri Nov 7 14:50:00 CET 2008 - mkoenig@suse.de + +- fdisk: support +cylinder notation [bnc#441871] +- check for EACCES when using ro fallback when loop mounting + a readonly image +- fix uninitialized variable in swapon pagesize detection + +------------------------------------------------------------------- +Mon Oct 27 17:33:01 CET 2008 - mkoenig@suse.de + +- fdisk: add missing includes [bnc#438670] + +------------------------------------------------------------------- +Thu Oct 23 17:58:28 CEST 2008 - mkoenig@suse.de + +- swapon: add swap pagesize detection [bnc#433028] +- lscpu: fix return code [bnc#437367] +- mkfs.minix: fix device size detection [bnc#437980] +- lscpu: update to most recent version for hypervisor detection + +------------------------------------------------------------------- +Thu Oct 2 11:10:11 CEST 2008 - mkoenig@suse.de + +- add lscpu tool from current util-linux-ng git, + needed for fate#303051 +- replace hypervisor detection tool with the solution blessed by + upstream, which adds hv detection as lscpu feature [fate#303051] + +------------------------------------------------------------------- +Wed Sep 24 11:28:07 CEST 2008 - mkoenig@suse.de + +- add new tool /bin/hypervisor for x86, x86_64 + from Ky Srinivasan + to detect the presence of a hypervisor [fate#303051] + +------------------------------------------------------------------- +Wed Sep 10 15:58:52 CEST 2008 - mkoenig@suse.de + +- update to version 2.14.1 + * fdisk: don't check for GPT when asked for disk size only + * losetup: remove unnecessary minor number check + * rtcwake: prefer RTC_WKALM_SET over RTC_ALM_SET + * scriptreplay: new implementation is out-of-sync + * selinux: is_selinux_enabled() returns 0, 1 and -1 + * umount: improve "-d" option for autoclear loops +- remove patch + util-linux-2.14-loop_autoclear.patch + +------------------------------------------------------------------- +Wed Aug 20 15:20:06 CEST 2008 - mkoenig@suse.de + +- enable SELinux support [fate#303662] + +------------------------------------------------------------------- +Mon Aug 18 18:13:10 CEST 2008 - mrueckert@suse.de + +- remove outdated options in the fillup_and_insserv call + +------------------------------------------------------------------- +Mon Aug 18 12:36:39 CEST 2008 - mkoenig@suse.de + +- raw: fix init script tags + +------------------------------------------------------------------- +Mon Jul 7 15:13:24 CEST 2008 - mkoenig@suse.de + +- update which to version 2.19 + * Upgraded code from bash to version 3.2. This DOES has influence + on how Which behaves under certain circumstances. + * When the environment variable HOME is not set, the home directory + is now read from /etc/passwd or set to '/' if no home directory + could be found (this now matches the tilde lib used in bash) + * Changed the license to GPLv3 + * Add support for shells that output '{' on the same line as the + function name in the output of 'declare -f' (ie zsh). +- fix build + +------------------------------------------------------------------- +Wed Jul 2 15:47:08 CEST 2008 - mkoenig@suse.de + +- replace util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch + with upstream version + util-linux-2.14-loop_autoclear.patch + +------------------------------------------------------------------- +Fri Jun 27 17:05:46 CEST 2008 - schwab@suse.de + +- Fix lib64 check. + +------------------------------------------------------------------- +Wed Jun 25 14:26:49 CEST 2008 - mkoenig@suse.de + +- update to version 2.14 + most important changes: + * new command ldattach + mount: + * support auto-destruction of loop devices + losetup: + * new option -j + * supports unlimited number of loop devices + * new option --sizelimit to set data end + * option -s (short form of --show) now deprecated + mkswap: + * new option -U to set UUID explicitly + fdisk: + * calculate partition size in 2^N [bnc#381270] + hwclock: + * new option --adjfile to override default /etc/adjtime +- readd scriptreplay, implemented now in C +- add retry for mount if ENOMEDIUM is returned [bnc#390204] +- ignore ENXIO in del_loop, because they might have been + auto-destructed +- removed patches: + util-linux-2.13.1-canonicalize_loopfile_name.patch + util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch + util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch + util-linux-2.13.1-mount_getfs_fix.patch + util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch + util-linux-2.13-fdisk_cfdisk_ncursesw.patch + util-linux-mount_opt_nofail.patch + util-linux-ng-2.13-swapon-swsuspend.patch + +------------------------------------------------------------------- +Thu Apr 3 17:11:53 CEST 2008 - mkoenig@suse.de + +- cfdisk: accept english answer [bnc#369043] +- use upstream getfs fix + +------------------------------------------------------------------- +Wed Mar 26 22:05:42 CET 2008 - coolo@suse.de + +- actually require the split out package + +------------------------------------------------------------------- +Sun Mar 23 11:13:13 CET 2008 - coolo@suse.de + +- splitting out 60% of the size of the package: + creating lang subpackage + +------------------------------------------------------------------- +Wed Feb 13 10:21:42 CET 2008 - bg@suse.de + +- don't try to package parisc*.8 manual pages + +------------------------------------------------------------------- +Mon Feb 11 17:49:04 CET 2008 - mkoenig@suse.de + +- update to version 2.13.1 again +- fix broken util-linux-2.13.1-getfs_fix.patch + +------------------------------------------------------------------- +Sun Feb 10 18:11:07 CET 2008 - lrupp@suse.de + +- revert to 2.13.0.1+git20071121 + breaks current 'mount' call in Buildservice + +------------------------------------------------------------------- +Thu Feb 7 12:41:25 CET 2008 - mkoenig@suse.de + +- update to version 2.13.1: + mount: + * -L|-U segfault when label or uuid doesn't exist + * chain of symlinks to fstab causes use of pointer after free + * don't call canonicalize(SPEC) for cifs, smbfs and nfs + * improve error message when helper program not present + losetup: + * fix errno usage + mkswap: + * possible to crash with SELinux relabeling support + sfdisk: + * allow partitioning drives of over 2^31 sectors + hwclock: + * check for ENODEV +- mount: fix problem with device canonicalization when using + persistent name in fstab but call mount with real bd name +- patches merged: + util-linux-2.13-mount_fd_leak.patch + +------------------------------------------------------------------- +Tue Dec 18 15:55:19 CET 2007 - mkoenig@suse.de + +- add temporary workaround for broken RTC update interrupts + [#338419] + +------------------------------------------------------------------- +Mon Dec 3 11:03:57 CET 2007 - ro@suse.de + +- remove "arch", in coreutils now + +------------------------------------------------------------------- +Thu Nov 29 17:51:17 CET 2007 - lnussel@suse.de + +- update crypto patch + * fix mount buffer overflow when reading the passphrase (#332148) + * add loop_fish2 compatability code to losetup/mount again (#332095) + * change default hash size for 128bit keys to sha256 again + + +------------------------------------------------------------------- +Wed Nov 21 13:43:31 CET 2007 - mkoenig@suse.de + +- update to git20071121: + add sector size check for mkfs.minix [#308256] + fix canonicalization for cifs [#338375] +- provide Short-Description for raw init script +- add rpmlintrc + +------------------------------------------------------------------- +Tue Nov 20 17:49:35 CET 2007 - mkoenig@suse.de + +- fix raw path in init script + +------------------------------------------------------------------- +Tue Nov 6 16:11:02 CET 2007 - mkoenig@suse.de + +- update to 2.13.0.1+git20071106 +- prevent loop mounting the same file twice [#240653] +- merged upstream: + util-linux-2.13-mount_helper_fix.patch + util-linux-2.13-hwclock_rtc_option.patch + +------------------------------------------------------------------- +Thu Oct 4 22:24:04 CEST 2007 - bg@suse.de + +- don't use parisc, parisc32 and parisc64. + +------------------------------------------------------------------- +Mon Oct 1 17:08:06 CEST 2007 - mkoenig@suse.de + +- update to version 2.13 + merged upstream: + util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch + util-linux-2.13-loop.patch + util-linux-2.13-mount_create_mtab.patch + util-linux-2.13-schedutils_error_handling.patch + util-linux-2.13-sys_utils_build_rdev_x86_64.patch +- fix hwclock --rtc option [#326106] +- fix setuid/setgid mixup and error checking [#327022] + +------------------------------------------------------------------- +Fri Sep 14 11:24:33 CEST 2007 - mkoenig@suse.de + +- link cfdisk against libncursesw instead libncurses to fix + broken utf-8 characters [#307353] + +------------------------------------------------------------------- +Wed Aug 29 12:22:21 CEST 2007 - mkoenig@suse.de + +- fix fd leaks in previous patch + +------------------------------------------------------------------- +Tue Aug 28 16:42:04 CEST 2007 - lnussel@suse.de + +- add support for specifying the key length and password hash + algorithm [#304861] + +------------------------------------------------------------------- +Fri Aug 24 14:09:19 CEST 2007 - mkoenig@suse.de + +- avoid duplicates of root fs if defined with LABEL in fstab + [#297959] +- fix ionice error handling [#301675] + +------------------------------------------------------------------- +Thu Aug 16 18:34:30 CEST 2007 - ssommer@suse.de + +- free loop devices when mount fails [#297172] + +------------------------------------------------------------------- +Wed Jul 25 18:43:42 CEST 2007 - mkoenig@suse.de + +- update to git20070725 +- removed patches (merged upstream): + util-linux-2.12r-mount_mount.8_xfs_update.patch + util-linux-2.12r-sys_utils_readprofile_mapfile.patch + util-linux-2.12r-disk_utils_mkswap_fix.patch + util-linux-2.13-schedutils_ionice_idle.patch + +------------------------------------------------------------------- +Tue Jul 17 10:44:18 CEST 2007 - mkoenig@suse.de + +- updated to version 2.13-rc2: + * add wakertc +- cleanup ionice usage [#270251] +- enable hwclock audit support [#280113] +- removed patches (merged/fixed upstream) + util-linux-login_utils_wall.patch + util-linux-mount_mount.8-acl.patch + util-linux-2.12r-mount_mtab_update.patch + util-linux-2.13-schedutils_chrt.patch + util-linux-2.13-sys_utils_arch.patch + util-linux-2.12a-mount_mountpointwithcolon.patch + util-linux-2.12a-mount_procswapcheck.patch + util-linux-2.12q-mount_umount2_not_static.patch + +------------------------------------------------------------------- +Fri Jul 13 12:31:56 CEST 2007 - mkoenig@suse.de + +- replace hotplug with nofail option and fix it to not use + syscall reserved values. +- removed patch + util-linux-2.11z-hwclock_geteuid.patch + it is intentional that suid hwclock capabilities are limited +- removed patch (fixed upstream) + util-linux-2.12q-mount_--move.patch + +------------------------------------------------------------------- +Mon Jul 9 11:34:33 CEST 2007 - mkoenig@suse.de + +- add libuuid-devel to BuildRequires to let mkswap use UUIDs + +------------------------------------------------------------------- +Thu Jul 5 16:08:58 CEST 2007 - mkoenig@suse.de + +- use %config(noreplace) for /etc/filesystems +- Keep rdev stuff for x86_64 + util-linux-2.13-sys_utils_build_rdev_x86_64.patch +- removed patches (merged upstream) + util-linux-2.12r-misc_utils_cal_formatting.patch + util-linux-2.12q-sys_utils_ionice.patch + +------------------------------------------------------------------- +Thu Jul 5 11:59:30 CEST 2007 - mkoenig@suse.de + +- update to 2.13-rc1: + * mount fixes + * agetty: add 'O' escape code to display domain name + * blockdev: add BLKFRAGET/BLKFRASET ioctls + * fdisk: many significant improvements and fixes to Sun label handling + * update po files +- removed patches (merged upstream): + util-linux-2.11q-fdisk_fs_mac.patch + util-linux-2.12r-fdisk_fdiskwrap.patch + util-linux-2.12r-mount_racy_loop.patch + util-linux-2.13-misc_utils_cal_ncurses.patch + util-linux-2.13-mount_volumeid_label.patch +- use %find_lang + +------------------------------------------------------------------- +Thu Jun 21 14:50:58 CEST 2007 - mkoenig@suse.de + +- use encoded label names with volume_id [#232929] + util-linux-2.13-mount_volumeid_label.patch + +------------------------------------------------------------------- +Thu Jun 14 10:52:25 CEST 2007 - mkoenig@suse.de + +- mkzimage_cmdline: activate commandline if used with -s [#279935] + +------------------------------------------------------------------- +Wed Jun 13 12:33:59 CEST 2007 - mkoenig@suse.de + +- schedutils: let chrt accept pid 0 for current process and + fix some documentation bugs [#266879] + util-linux-2.13-schedutils_chrt.patch + +------------------------------------------------------------------- +Wed Jun 6 16:15:43 CEST 2007 - mkoenig@suse.de + +- update to git20070530 +- removed patches + util-linux-2.13-mount_volume_id.patch + util-linux-2.12r-mount_by_uuid.patch + util-linux-2.13-build_gnu_source.patch +- fix build with ncurses + +------------------------------------------------------------------- +Tue Jun 5 17:01:48 CEST 2007 - mkoenig@suse.de + +- update to git20070509 + mount: NFS code removed (use mount.nfs{,4} from nfs-utils) +- remove sm-notify (nfs-utils) +- removed patches + util-linux-2.11u-mount_nfs_mount_acl.patch + util-linux-2.12-mount_base_nfsv4.patch + util-linux-2.12-mount_mountfallback.patch + util-linux-2.12-mount_nfs_tcp.patch + util-linux-2.12q-mount_strict_aliasing.patch + util-linux-2.12r-mount_nfs_remount_options.patch + util-linux-2.12r-mount_rpcsec_gss.patch + util-linux-2.12r-mount_sec_manpage.patch + util-linux-2.12r-mount_umount_nosysfs.patch + util-linux-2.13-mount_nfs_timeo.patch + util-linux-mount_nfs.8.patch + util-linux-mount_warn_nfsudp.patch + +------------------------------------------------------------------- +Tue Jun 5 14:34:49 CEST 2007 - pth@suse.de + +- Update to which-2.16, mainly because regenerating configure + with newer autotools works. +- Fix the patch for AC_CHECK_STATICLIB +- Our distribution doesn't install libiberty.a, so pass + --disable-iberty to configure of which to not use a libiberty from + somewhere else. + +------------------------------------------------------------------- +Mon Jun 4 17:06:47 CEST 2007 - pth@suse.de + +- Make configure of which search for static libs in lib64 subdirs. + +------------------------------------------------------------------- +Mon Apr 23 16:49:00 CEST 2007 - mkoenig@suse.de + +- update to git20070412 +- remove chkdupexe and scriptreplay to get rid of the + perl dependency [#265757] + util-linux-2.13-build_no_perl_dependency.patch +- upstream integration of umount helper support [#252089] +- merged patches: + util-linux-2.13-misc_utils_add_man_scriptreplay.patch + util-linux-2.13-tests_missing_include.patch + +------------------------------------------------------------------- +Mon Apr 16 17:20:16 CEST 2007 - mkoenig@suse.de + +- fix initialization of offset in + util-linux-2.12r-mount_racy_loop.patch [#264225] + +------------------------------------------------------------------- +Tue Apr 10 17:25:34 CEST 2007 - mkoenig@suse.de + +- update to version git20070330 of new forked development tree +- removed Suse crypto patches for losetup [FATE#302001] +- removed binaries: + /bin/guessfstype + /sbin/sln + /usr/bin/setfdprm +- removed obsolete patches: + * guessfstype2.patch + * loop-AES-v3.0a-util-linux-2.12p.diff + * mount-nfs-nonreserved + * stupid-programmer.diff + * util-linux-nodiratime.diff + * util-linux-2.12-multipleraw.diff + * util-linux-2.12-enablereplaybuild.diff + * util-linux-2.12-mount_guessfstype.diff + * util-linux-2.12h-mtablock.diff + * util-linux-2.12i-x86_64intel.diff + * util-linux-2.12q-null.diff + * util-linux-2.12r.diff + * util-linux-2.12r-fdisk_llseek.patch + * util-linux-2.12r-mount-doubleslashessourceprefix-cifs.diff + * util-linux-2.12r-mount_external_prog_on_guess.patch + * util-linux-2.12r-nonfsmountfallback.diff + * util-linux-2.12r-pagesize.patch + * util-linux-2.12r-partx_enable.patch + * util-linux-2.12r-partx_gpt_warning.patch +- add patches: + * util-linux-2.13-misc_utils_add_man_scriptreplay.patch + install man page for scriptreplay + * util-linux-2.13-tests_missing_include.patch + fix missing header in tests/mnt_test_sysinfo.c + * util-linux-2.13-sys_utils_arch.patch + keep /bin/arch + * util-linux-2.13-build_gnu_source.patch + build with _GNU_SOURCE + * util-linux-2.13-build_fix_intel_check.patch + detect also x86_64 as INTEL architecture +- rename patches to identify them clearly by subsystem +- schedutils now part of util-linux itself + +------------------------------------------------------------------- +Wed Apr 4 12:55:40 CEST 2007 - mkoenig@suse.de + +- add Supplements line [FATE#301966] + +------------------------------------------------------------------- +Mon Mar 26 15:49:09 CEST 2007 - rguenther@suse.de + +- add ncurses-devel and zlib-devel BuildRequires + +------------------------------------------------------------------- +Thu Mar 15 17:24:34 CET 2007 - mkoenig@suse.de + +- mount: Let swapon automatically reinitialize a suspended + swap partition [#254437] + +------------------------------------------------------------------- +Thu Mar 9 11:00:11 CET 2007 - mkoenig@suse.de + +- mount: fix mtablock patch to avoid mtab corruption [#226783] + +------------------------------------------------------------------- +Thu Mar 8 17:27:22 CET 2007 - mkoenig@suse.de + +- partx: fix warning for too long literal + +------------------------------------------------------------------- +Wed Mar 7 16:58:08 CET 2007 - rguenther@suse.de + +- fix changelog entry order + +------------------------------------------------------------------- +Tue Feb 27 10:58:46 CET 2007 - mkoenig@suse.de + +- fix missing return code in + util-linux-2.12r-losetup_password.patch +- mount: fix race condition in mount -o loop [#242750] + +------------------------------------------------------------------- +Mon Feb 12 17:22:45 CET 2007 - mkoenig@suse.de + +- remove legacy warnings from fdisk [#241372] + +------------------------------------------------------------------- +Fri Feb 2 13:27:31 CET 2007 - mkoenig@suse.de + +- do not use O_EXCL for mkfs.cramfs [#241466] + +------------------------------------------------------------------- +Wed Jan 31 12:06:55 CET 2007 - mkoenig@suse.de + +- let mkfs tools open with O_EXCL [#238687] + +------------------------------------------------------------------- +Tue Dec 12 11:04:07 CET 2006 - mkoenig@suse.de + +- provide different return codes for losetup with encryption + for empty and too short passwords. [#197493] + +------------------------------------------------------------------- +Tue Dec 5 18:13:32 CET 2006 - mkoenig@suse.de + +- default swap to V1 in any case [#205956] + patch: util-linux-2.12r-mkswap_fix.patch +- do not append addr option with each nfs remount [#130625] + patch: util-linux-2.12r-nfs_remount_options.patch +- add README.largedisk about fdisk partition size constraints + [#153657] + +------------------------------------------------------------------- +Tue Nov 7 13:09:45 CET 2006 - mkoenig@suse.de + +- enable partx [#214992] + +------------------------------------------------------------------- +Tue Oct 10 18:17:42 CEST 2006 - mkoenig@suse.de + +- Round up partition end LBA to a cylinder boundary during + add_partition() [#174892] +- Fix readprofile on ppc64 [#179122] +- Fix cal formatting bug [#203469] + +------------------------------------------------------------------- +Mon Oct 9 12:27:33 CEST 2006 - mkoenig@suse.de + +- Fix llseek issues. +- swapon.c: Do not use PAGE_SIZE macro. + +------------------------------------------------------------------- +Mon Aug 21 12:10:01 CEST 2006 - mkoenig@suse.de + +- Added sysfs to list of filesystems not to unmount with + umount -a, resolves #190385 + +------------------------------------------------------------------- +Mon Jun 12 14:08:25 CEST 2006 - kay.sievers@suse.de + +- use libvolume_id from provided as a rpm by udev 094 + +------------------------------------------------------------------- +Wed May 17 23:48:27 CEST 2006 - jeffm@suse.com + +- Fixed support for calling external programs w/o -t , + it would add mtab twice [#176582] + +------------------------------------------------------------------- +Mon Apr 24 14:33:20 CEST 2006 - hvogel@suse.de + +- document xfs dmapi mount options better [#158955] + +------------------------------------------------------------------- +Fri Apr 21 15:48:16 CEST 2006 - olh@suse.de + +- add mkzimage_cmdline to edit CHRP zImage kernel cmdline (168313) + +------------------------------------------------------------------- +Tue Apr 18 16:09:46 CEST 2006 - hvogel@suse.de + +- fix number of supported raw devices [#165570] + +------------------------------------------------------------------- +Wed Mar 29 13:54:32 CEST 2006 - olh@suse.de + +- clearify comments about mac disk label handling in fdisk + +------------------------------------------------------------------- +Tue Mar 28 17:53:46 CEST 2006 - hvogel@suse.de + +- more fixes for the fdiskwrap patch [#160822] + +------------------------------------------------------------------- +Tue Mar 21 11:35:26 CET 2006 - okir@suse.de + +- Update nfs(5) manpage to document security flavors [#159368] + +------------------------------------------------------------------- +Mon Mar 20 12:14:18 CET 2006 - hvogel@suse.de + +- fix numbers of supported raw devices to match the kernel + [#158203] +- make NFSv3 client support RPCSEC_GSS [#158401] +- fix that if the user doesn't specify -t + mount.fstype will never be called. [#155147] + +------------------------------------------------------------------- +Fri Mar 10 12:07:10 CET 2006 - hvogel@suse.de + +- Fix init.d/raw script to parse device names with , in them + correctly [#155653] + +------------------------------------------------------------------- +Thu Mar 9 12:28:04 CET 2006 - hare@suse.de + +- Fix potential security hole in libvolume_id (#133256) + +------------------------------------------------------------------- +Mon Mar 6 12:03:35 CET 2006 - hvogel@suse.de + +- patch fdiskmaclabel.h too + +------------------------------------------------------------------- +Thu Mar 2 15:49:06 CET 2006 - hvogel@suse.de + +- axboe made fdisk not wrap at 2TB [#153657] + +------------------------------------------------------------------- +Fri Feb 17 15:25:39 CET 2006 - lmuelle@suse.de + +- Use cifs instead of smbfs if the source starts with // and we do not set a + different fs type. + +------------------------------------------------------------------- +Sun Feb 12 12:40:21 CET 2006 - olh@suse.de + +- cosmetic fix for option_hotplug declaration + fix unininitalized string for unknown filesystems (#148855) + +------------------------------------------------------------------- +Fri Feb 10 14:00:48 CET 2006 - hvogel@suse.de + +- mount should not put / in the mtab twice if mount -f / is called + [#148409] +- fix hostid printf [#149163] + +------------------------------------------------------------------- +Wed Feb 1 03:58:58 CET 2006 - olh@suse.de + +- dont invent our own MS_FLAGS (#147132) + +------------------------------------------------------------------- +Wed Feb 1 02:20:17 CET 2006 - ro@suse.de + +- fix typo in previous change, binary negation is "~" + +------------------------------------------------------------------- +Fri Jan 27 13:02:36 CET 2006 - sscheler@suse.de + +- fixed mount hotplug option (#143352). now we don't send the + MS_HOTPLUG flag to the kernel any longer, because the kernel + doesn't know this option (EINVAL) and actually doesn't need to + know about it. + +------------------------------------------------------------------- +Fri Jan 27 12:55:29 CET 2006 - olh@suse.de + +- remove clock symlink, hwclock exists since 7 years + +------------------------------------------------------------------- +Fri Jan 27 11:46:17 CET 2006 - olh@suse.de + +- lsprop and nvsetenv moved to powerpc-utils [#144758] + +------------------------------------------------------------------- +Thu Jan 26 13:06:51 CET 2006 - hvogel@suse.de + +- Make nfsboot world readable [#145418] + +------------------------------------------------------------------- +Wed Jan 25 21:31:03 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Tue Jan 24 17:06:22 CET 2006 - mmj@suse.de + +- Remove faulty nfs fallback code [#139019] + +------------------------------------------------------------------- +Mon Jan 16 11:25:28 CET 2006 - mmj@suse.de + +- Add patch for nsetenv to fix short reads/short writes [#142546] + +------------------------------------------------------------------- +Wed Jan 11 12:46:28 CET 2006 - mmj@suse.de + +- Update sm-notify [#141542] + +------------------------------------------------------------------- +Wed Jan 4 13:52:31 CET 2006 - mmj@suse.de + +- Update to 2.12r including since 2.12q: + o cfdisk: fix a segfault with ReiserFS partitions + o umount: disallow -r option for non-root users + +------------------------------------------------------------------- +Tue Nov 22 11:49:39 CET 2005 - mmj@suse.de + +- install proper renice manpage [#132470] + +------------------------------------------------------------------- +Tue Nov 15 17:01:34 CET 2005 - uli@suse.de + +- umount2 is not static (only fails on ARM, surprisingly) +- added ARM ionice syscalls + +------------------------------------------------------------------- +Fri Nov 11 10:42:35 CET 2005 - hare@suse.de + +- Fix reverse-mapping of by-UUID and by-LABEL mounts. + +------------------------------------------------------------------- +Thu Nov 10 09:04:17 CET 2005 - hare@suse.de + +- Fix a mishandling of by-UUID mounts. +- Use libvolume_id from udev. + +------------------------------------------------------------------- +Sat Oct 22 17:55:16 CEST 2005 - mmj@suse.de + +- Increase lsprop.c max property size to 4k [#128155] + +------------------------------------------------------------------- +Mon Oct 10 12:44:05 CEST 2005 - mmj@suse.de + +- Add -fno-strict-aliasing to nfsmount_xdr.c + +------------------------------------------------------------------- +Mon Oct 3 09:55:56 CEST 2005 - mmj@suse.de + +- Teach the mount manual page about nodiratime [#118987] + +------------------------------------------------------------------- +Thu Sep 29 12:42:03 CEST 2005 - mmj@suse.de + +- Patch from jakub007@go2.pl to make mount --move update + /etc/mtab correctly [#115129] + +------------------------------------------------------------------- +Tue Sep 13 14:16:58 CEST 2005 - mmj@suse.de + +- Only allow root to pass -r to umount [#116741] + +------------------------------------------------------------------- +Mon Sep 5 13:18:27 CEST 2005 - mmj@suse.de + +- MAC -> Mac [#104081] + +------------------------------------------------------------------- +Fri Sep 2 13:48:17 CEST 2005 - mmj@suse.de + +- Don't package manual executable [#114849] + +------------------------------------------------------------------- +Thu Sep 1 10:56:25 CEST 2005 - mmj@suse.de + +- Add patch for device-mapper mount by label support [#75966] + +------------------------------------------------------------------- +Thu Sep 1 00:12:39 CEST 2005 - ro@suse.de + +- provide and obsolete schedutils + +------------------------------------------------------------------- +Tue Aug 23 18:00:01 CEST 2005 - hvogel@suse.de + +- update ionice patch by axboe so that ionice will complain about + missing sys_ioprio_set support, but it will still + execute the process. + +------------------------------------------------------------------- +Mon Aug 22 17:06:42 CEST 2005 - hvogel@suse.de + +- Fix rpm verify output [#105807] + (ghost entry for /var/lib/nfs/state) + +------------------------------------------------------------------- +Mon Aug 22 16:27:16 CEST 2005 - schwab@suse.de + +- Fix stupid buffer overflow bug in cfdisk [#66020]. + +------------------------------------------------------------------- +Wed Aug 17 12:59:24 CEST 2005 - hare@suse.de + +- Add option 'hotplug' to mount (#104405) + +------------------------------------------------------------------- +Mon Aug 15 16:33:48 CEST 2005 - schwab@suse.de + +- Always build with RPM_OPT_FLAGS. + +------------------------------------------------------------------- +Thu Aug 11 14:41:18 CEST 2005 - mmj@suse.de + +- Patch from Patrick Kirsch to make fdisk detect MAC-fs [#104081] + +------------------------------------------------------------------- +Wed Aug 3 20:50:59 CEST 2005 - mmj@suse.de + +- Merge schedutils to here (it's happened upstream already) + +------------------------------------------------------------------- +Tue Aug 2 08:47:47 CEST 2005 - mmj@suse.de + +- Support for s390 and s390x + +------------------------------------------------------------------- +Mon Aug 1 20:04:13 CEST 2005 - mmj@suse.de + +- It's not __ppc_ and __ppc64__ but __powerpc__ and __powerpc64__ + +------------------------------------------------------------------- +Mon Aug 1 12:17:39 CEST 2005 - mmj@suse.de + +- Add ionice binary from Jens Axboe + +------------------------------------------------------------------- +Wed Jun 29 11:26:31 CEST 2005 - mmj@suse.de + +- Document load and clearly issues about NFS over UDP [#80263] +- Don't compile with -fsigned-char [#93886] + +------------------------------------------------------------------- +Tue May 31 13:26:05 CEST 2005 - okir@suse.de + +- Added NFSv4 support + +------------------------------------------------------------------- +Mon May 9 17:27:59 CEST 2005 - hvogel@suse.de + +- move hashalot and cryptsetup tools to util-linux-crypto + +------------------------------------------------------------------- +Tue Apr 12 16:13:57 CEST 2005 - mmj@suse.de + +- bump TCP timeo to 600 [#76198] + +------------------------------------------------------------------- +Tue Mar 29 13:43:31 CEST 2005 - mmj@suse.de + +- Add awareness of twofishSL92 [#74359] +- Update hashalot to version 0.3 + +------------------------------------------------------------------- +Mon Mar 14 15:30:49 CET 2005 - okir@suse.de + +- Changed sm-notify to recognize host names as well as addresses. + +------------------------------------------------------------------- +Thu Mar 10 11:28:21 CET 2005 - mmj@suse.de + +- Don't strip anything explicitly +- Don't compile with -fno-strict-aliasing [#66020] + +------------------------------------------------------------------- +Fri Feb 4 14:48:27 CET 2005 - schwab@suse.de + +- Fix stupid programmer. + +------------------------------------------------------------------- +Mon Jan 24 17:01:51 CET 2005 - meissner@suse.de + +- implicit strcmp / strerror in setctsid fixed. +- 0 -> NULL in an execl + +------------------------------------------------------------------- +Fri Jan 21 14:37:21 CET 2005 - mmj@suse.de + +- Sleep after inserting the raw module to make sure it's ready [#49807] +- Update to 2.12q including since 2.12p: + o New upstream maintainer - Adrian Bunk + o sfdisk: add -G option + o Updated translations + +------------------------------------------------------------------- +Tue Jan 18 17:04:30 CET 2005 - okir@suse.de + +- Updated sm-notify; try not to stall bootup my moving the NSM + state update after we've backgrounded (#49072). + +------------------------------------------------------------------- +Mon Jan 10 14:45:12 CET 2005 - mmj@suse.de + +- Update adjtimex to 1.20 +- Update to util-linux-2.12p including since 2.12i: + o cfdisk: fix number of new partition when partitions not in disk order + o fdisk: fix Sun label handling in sector mode + o mkfs: never truncate filename (not that that ever happened) + o more: fix redraw flaw + o lomount: revert patch from 2.12j + o lptune.8: -T option is obsolete + o mkswap, mkswap.8, swapon: support labels + o umount: allow user unmounting repeatedly mounted nfs mounts + o cfdisk: recognize JFS, support reiserfs labels + o mount: fix option parsing bug + o mount.8: several updates + o swapon.8: document -v option + o Makefile: remove cat-id-tbl.c upon make clean + o fdisk: fixed a bug that would cause a non-update of a sun disklabel + o fdisk: use sectorsize instead of 512 for SGI + o hwclock: actually use HAVE_tm_gmtoff + o swapon: fix priority handling + o umount: refuse to unmount an empty string + o configure, MCONFIG: detect gcc 3.4.0 and use -mtune option + o configure: do not run ./conftest (for cross compilation) + o fsck.cramfs: try to get correct PAGE_CACHE_SIZE + o losetup: try to give better error messages + o readprofile: default map file is /boot/System.map + o rdev.8: added historical info on ramdisk + o cal: highlight today + o lomount: stop reading passwd at NUL, fix lo_encrypt key_size + o losetup: add -f option to find an unused loop device + o more: code cleanup + o mount: add "group" mount option + o sfdisk: fix 2.6.8 BLKRRPART ioctl damage + o swapon: let swapon -a skip the swapfiles marked "noauto" + o umount: fix problem with empty mtab + o umount: use special umount program if it exists + o new flock binary + o New messages + +------------------------------------------------------------------- +Tue Nov 30 11:02:32 CET 2004 - mmj@suse.de + +- Install ramsize, rdev, rootflags and vidmode on x86-64 [#48633] + +------------------------------------------------------------------- +Fri Nov 12 15:01:36 CET 2004 - schwab@suse.de + +- Don't install *fdisk on ia64. + +------------------------------------------------------------------- +Fri Nov 12 14:50:24 CET 2004 - ro@suse.de + +- correct permissions handling for wall and write + +------------------------------------------------------------------- +Tue Nov 9 16:00:23 CET 2004 - mmj@suse.de + +- Fix segfault with mount -l [#48029] + +------------------------------------------------------------------- +Fri Nov 5 11:36:16 CET 2004 - mmj@suse.de + +- Update to util-linux-2.12i including: + o MCONFIG: fix build conditions + o chfn, chsh: add error checking + o cytune: use local header cyclades.h + o fdisk: fix default SGI volume header size + o fstab.c: use strsignal() instead of sys_siglist[] + o hwclock: use when available on i386 + o hwclock: dont try KDGHWCLK on archs other than __m68k__ + o sfdisk: correct typo in __attribute__used nonsense + o sfdisk: use PACKED on __arm__ + o sfdisk: fix warning printout + +------------------------------------------------------------------- +Thu Nov 4 08:37:19 CET 2004 - mmj@suse.de + +- Update to util-linux-2.12h including: + o cfdisk: avoid crash if no partition table + o elvtune: tell user that this only works on 2.4 kernels + o lomount: clear passwords after use + o mount: accept comments (specified by comment=) in fstab + o mount: support ocfs, ocfs2 + o [u]mount: be more careful with malloc, try to avoid OOM with + many mounts + o sfdisk: __attribute__used nonsense to support gcc 3.4 + o shutdown: do not unmount various virtual filesystems + o mount.8: added recent ext2 mount options + o mount: support jfs mount-by-label, improve reiserfs support + o sfdisk: remove strange "ends in a digit" heuristic + o *fdisk: use common disksize() routine + +------------------------------------------------------------------- +Tue Oct 19 10:24:13 CEST 2004 - mmj@suse.de + +- Add patch from SGI for fdisk label [#47368] + +------------------------------------------------------------------- +Tue Sep 28 11:18:50 CEST 2004 - mmj@suse.de + +- And another one [#46201] + +------------------------------------------------------------------- +Wed Sep 15 23:11:56 CEST 2004 - mmj@suse.de + +- Add patch from Andries to fix cfdisk [#44996] + +------------------------------------------------------------------- +Tue Sep 7 07:32:39 CEST 2004 - mmj@suse.de + +- Update to util-linux-2.12c including: + o mount.8: added recent ext2 mount options + o mount: support jfs mount-by-label, improve reiserfs support + o sfdisk: remove strange "ends in a digit" heuristic + o *fdisk: use common disksize() routine [#44678] + +------------------------------------------------------------------- +Wed Aug 25 12:54:00 CEST 2004 - mmj@suse.de + +- Update to util-linux-2.12b including: + o chsh: improved error message + o dmesg: ask kernel proper buffer size + o losetup: handle 64-bit offsets + o blockdev: also report BLKGETSIZE64 result [#43464] + o blockdev, elvtune, fdisk: handle new kernel _IOR,_IOW defines + o fdisk: remove strange "ends in a digit" heuristic + o fdisk: also list Solaris as possible type for 0x82 + o mount: added --rbind option + o mount: use blkid library + o mount: support reiserfs mount by label + o mount: attempt to use the right definition of dev_t in struct + loopinfo + o mount.8: jfs mount options added + o readprofile: new -s option + o rename.1: added ref to mmv.1 + o replay: renamed to scriptreplay; correct typos + o script: do not use locale for time delay floating point number + format + o sfdisk: error messages to stderr + o New Catalan, Dutch, Finnish, French, German, Spanish, Swedish, + Turkish, Ukrainian messages +- Update the loop-AES patch, thanks to Sumit Bose +- Change the minimum password length to 8 chars + +------------------------------------------------------------------- +Tue Aug 24 08:03:24 CEST 2004 - mmj@suse.de + +- Fix signed/unsigned bug in lsprop [#44048] + +------------------------------------------------------------------- +Wed Aug 18 15:56:01 CEST 2004 - mmj@suse.de + +- Readd patch that got lost to make fdisk -l work better with + RAID controllers [#43485] + +------------------------------------------------------------------- +Mon Aug 9 11:06:34 CEST 2004 - mmj@suse.de + +- Add an improved version of the dmesg bufsize patch. + +------------------------------------------------------------------- +Tue Jun 22 15:50:05 CEST 2004 - mmj@suse.de + +- Add patch to try and guess a filesystem type before blindly + assuming it's nfs because of the colon [#42097] + +------------------------------------------------------------------- +Mon Jun 14 19:21:08 CEST 2004 - agruen@suse.de + +- Formatting error in mount.8 manual page. + +------------------------------------------------------------------- +Wed Jun 9 15:17:47 CEST 2004 - mmj@suse.de + +- Add patch from Olaf Kirch to make protocol selection for mount + independent of protocol selection for NFS, and picks what is + available (preferring TCP over UDP) [#41735] + +------------------------------------------------------------------- +Wed Jun 9 12:10:03 CEST 2004 - mls@suse.de + +- add '-f' option to setctsid + +------------------------------------------------------------------- +Thu May 27 15:07:13 CEST 2004 - okir@suse.de + +- sm-notify now binds to a reserved port + +------------------------------------------------------------------- +Sat May 15 16:15:00 CEST 2004 - mmj@suse.de + +- Add documentation about raw device handling [#39037] + +------------------------------------------------------------------- +Mon May 10 14:40:43 CEST 2004 - mmj@suse.de + +- Make dmesg dump entire buffer. Patch from Andries/odabrunz [#39761] + +------------------------------------------------------------------- +Wed May 6 10:05:16 CEST 2004 - mmj@suse.de + +- Also check if the device is the same when doing swapon. Could be + the same block device with 2 different names [#39436] + +------------------------------------------------------------------- +Wed May 5 11:12:47 CEST 2004 - mmj@suse.de + +- Do a /sbin/modprobe raw when invoking raw devices [#39037] + +------------------------------------------------------------------- +Tue Apr 20 09:28:09 CEST 2004 - mmj@suse.de + +- Update to 2.12a including: + o fdisk: fix for kernels 2.4.15-2.4.17 + o fdisk: fix when all partitions are in use + o hwclock: add a timeout when waiting for a clock update + o ipcs: compilation fix + o ipcs: shminfo.shmall gives pages + o mount: efs support + o partx: bigendian fix + o readprofile: support for 64-bit addresses + o setterm: fix klogctl error message + o setterm.1: clarification + o sfdisk: fix check for is_ide_cdrom_or_tape + o umount: skip proc, devfs, devpts on umount -a + +------------------------------------------------------------------- +Mon Apr 19 11:52:54 CEST 2004 - mmj@suse.de + +- Add patch for unlimited raw devices [#39037] + +------------------------------------------------------------------- +Thu Apr 15 11:08:50 CEST 2004 - mmj@suse.de + +- Make sm-notify be more quiet when nothing wrong, and log to sys- + log when something is. + +------------------------------------------------------------------- +Tue Apr 6 14:45:36 CEST 2004 - mmj@suse.de + +- Don't use startproc for sm-notify [#38481] + +------------------------------------------------------------------- +Mon Apr 5 14:55:39 CEST 2004 - mmj@suse.de + +- Removing elvtune alltogether was a bit drastic, since it of + course works fine with 2.4 kernels. So print a warning in case + the BLKELVGET ioctl returns something indicating 2.6 kernels. + +------------------------------------------------------------------- +Thu Apr 1 19:50:47 CEST 2004 - mmj@suse.de + +- Don't package elvtune anymore since it's obsolete now that io + scheduler can be tuned in /sys/block/hdX/queue/iosched/* [#37869] + +------------------------------------------------------------------- +Wed Mar 31 11:19:28 CEST 2004 - mmj@suse.de + +- Apply util-linux-2.12a fixes for hwclock and readprofile. The + hwclock bit is a timout fix which hopefully fixes [#35877] +- Move sm-notify to here from nfs-utils [#36737] + +------------------------------------------------------------------- +Mon Mar 29 13:26:20 CEST 2004 - mmj@suse.de + +- Adjust warnings about Crypto-API + +------------------------------------------------------------------- +Sun Mar 28 11:00:24 CEST 2004 - mmj@suse.de + +- Add patch to make script allways use the same LC_NUMERIC [#35476] + +------------------------------------------------------------------- +Fri Mar 26 21:38:27 CET 2004 - od@suse.de + +- Add setctsid by Werner Fink [#37177] + +------------------------------------------------------------------- +Fri Mar 26 15:07:00 CET 2004 - mmj@suse.de + +- Mount option "code" is now "codepage" so update /etc/fstab in + postinstall [#36950] + +------------------------------------------------------------------- +Fri Mar 26 11:49:01 CET 2004 - mmj@suse.de + +- Remove false statement in nfs.5 about the linux kernel not + supporting nfs over tcp [#37060] + +------------------------------------------------------------------- +Wed Mar 17 21:41:17 CET 2004 - mmj@suse.de + +- Use correct permissions for README.hashalot [#36303] + +------------------------------------------------------------------- +Mon Mar 8 10:51:46 CET 2004 - mmj@suse.de + +- Enable build of replay [#35434] + +------------------------------------------------------------------- +Wed Feb 25 14:07:15 CET 2004 - mmj@suse.de + +- Use loop-AES-v2.0f-util-linux-2.12.diff instead of losetup patch + added earlier. Thanks Sumit Bose! + +------------------------------------------------------------------- +Thu Feb 19 09:54:03 CET 2004 - mmj@suse.de + +- Add cryptsetup script from Christophe Saout, for usage with the + new dm-crypt. + +------------------------------------------------------------------- +Mon Feb 16 15:32:57 CET 2004 - mmj@suse.de + +- Add losetup patch and hashalot program from Ben Slusky + +------------------------------------------------------------------- +Sun Feb 1 14:11:51 CET 2004 - kukuk@suse.de + +- Remove newgrp again (will use POSIX conform version) + +------------------------------------------------------------------- +Fri Jan 16 13:26:55 CET 2004 - kukuk@suse.de + +- Add pam-devel to neededforbuild + +------------------------------------------------------------------- +Mon Jan 12 11:31:47 CET 2004 - mmj@suse.de + +- Adjust the nfs.5 manual page to reflect we're mounting nfs over + tcp pr. default. +- Collapse two similar patches 2 one. + +------------------------------------------------------------------- +Fri Dec 19 16:43:39 CET 2003 - garloff@suse.de + +- Fix by okir for previous patch. + +------------------------------------------------------------------- +Fri Dec 19 11:19:43 CET 2003 - garloff@suse.de + +- Add patch to fallback to UDP if TCP NFS mount fails. + +------------------------------------------------------------------- +Tue Dec 2 09:03:32 CET 2003 - mmj@suse.de + +- Make patch to guess if a CD is a CD-Extra [#30316] +- Adjust patch that moves ext2/3 in front of vfat +- Regenerate patches (filename still tells when they were added) + +------------------------------------------------------------------- +Tue Nov 18 13:57:28 CET 2003 - mmj@suse.de + +- Mount NFS over TCP pr. default [#33018] + +------------------------------------------------------------------- +Thu Nov 13 14:43:39 CET 2003 - mmj@suse.de + +- Update to util-linux-2.12 including: + o losetup: -p option specifies fd for passphrase + o fdisk: sgi layout fix + o mount: -p option specifies fd for passphrase + o mount: recognize some PCDOS floppies + o umount: in "umount name", first try to interpret "name" as a mount point + o translations updates for several languages + o cfdisk: localize the Y/N answer, improve printing localized messages + o cfdisk: make various variables long long - some disks are close to 2 TB + o cfdisk: use BLKGETSIZE64 + o fdisk: make various variables unsigned to lengthen the life of 32-bit vars + o fdisk: some sgi fixes + o fdisk: k=1000, K=1024 + o fdisk: removed last occurrences of HDIO_REQ + o fdisk: use BLKGETSIZE64 + o hwclock: fix rtc test + o login: set a timeout on printing the timeout message + o md5: x86_64 fix + o more: POSIX fixes + o mount: do not supply MS_MGC_VAL when there are conflicting flags + o mount: ncp and smb are called smbfs and ncpfs - global change + o mount: add support for xvm mount by label + o mount: correct hfs magic recognition + o mount: keep original umask - it influences the mount call + o raw.8: documented unbinding of raw devices + o readprofile: fixed off-by eight error + o script: add -c option + o sfdisk.8: added an example of partitioning with logical partitions + o sfdisk: only add a AA55 signature for DOS-type partition tables + o tailf: new + +------------------------------------------------------------------- +Tue Oct 21 15:49:01 CEST 2003 - mmj@suse.de + +- Correct permissions + +------------------------------------------------------------------- +Tue Oct 21 14:53:54 CEST 2003 - ja@suse.cz + +- added support for cryptoloop in 2.6.x kernels. + +------------------------------------------------------------------- +Wed Oct 15 13:20:54 CEST 2003 - mmj@suse.de + +- Don't build as root + +------------------------------------------------------------------- +Mon Oct 13 21:44:43 CEST 2003 - kukuk@suse.de + +- Enable newgrp + +------------------------------------------------------------------- +Thu Oct 2 11:31:14 CEST 2003 - kukuk@suse.de + +- Fix compiling with kernel 2.6.0-test6 header files + +------------------------------------------------------------------- +Tue Aug 12 15:27:20 CEST 2003 - mmj@suse.de + +- Update to pmac-utils-2.1 sources and only include nvsetenv + +------------------------------------------------------------------- +Tue Aug 12 12:38:18 CEST 2003 - mmj@suse.de + +- Add mount_guessfstype support for PCDOS [#27814] + +------------------------------------------------------------------- +Wed Jun 18 16:16:15 CEST 2003 - ak@suse.de + +- support noreserved option for NFS (#27428) + +------------------------------------------------------------------- +Thu Jun 5 14:06:51 CEST 2003 - mmj@suse.de + +- Rearrange the specfile wrt. archs + +------------------------------------------------------------------- +Tue May 13 11:20:26 CEST 2003 - mmj@suse.de + +- Use %defattr +- Remove files we don't package + +------------------------------------------------------------------- +Wed May 7 15:38:56 CEST 2003 - mmj@suse.de + +- Rearrange the do_guess_fstype() code to look for ext2/3 before + vfat [#26581] + +------------------------------------------------------------------- +Thu Apr 24 12:20:23 CEST 2003 - ro@suse.de + +- fix install_info --delete call and move from preun to postun + +------------------------------------------------------------------- +Mon Apr 14 15:12:27 CEST 2003 - pthomas@suse.de + +- Get rid of the syscall for adjtimex in selective cases and + just call the glibc wrapper. Fixes build on s390. + +------------------------------------------------------------------- +Mon Apr 14 10:35:38 CEST 2003 - pthomas@suse.de + +- Use geteuid instead of getuid in hwclock to enable making + hwclock suid root. + +------------------------------------------------------------------- +Mon Apr 7 15:40:54 CEST 2003 - mmj@suse.de + +- Only delete info entries when removing last version. + +------------------------------------------------------------------- +Thu Mar 13 11:29:54 CET 2003 - mmj@suse.de + +- Apply patch to make sfdisk not destroy BSD slices [#25093] + +------------------------------------------------------------------- +Mon Mar 3 16:19:04 CET 2003 - mmj@suse.de + +- Remove superflous umask(033); calls [#23292] + +------------------------------------------------------------------- +Mon Mar 3 12:27:01 CET 2003 - ro@suse.de + +- add missing info dir entries + +------------------------------------------------------------------- +Tue Feb 18 14:29:45 CET 2003 - agruen@suse.de + +- Add description of the effect of `mount -t nfs -o noacl' on + the use of the GETACL and SETACL remote procedure calls to + the nfs(5) manual page. + +------------------------------------------------------------------- +Mon Feb 17 15:44:28 CET 2003 - mmj@suse.de + +- It's called smbfs not smb [#23697] + +------------------------------------------------------------------- +Thu Feb 13 06:17:02 CET 2003 - mmj@suse.de + +- Readd patch for passphrase timeout that got lost [#23527] + +------------------------------------------------------------------- +Fri Feb 7 12:24:12 CET 2003 - mmj@suse.de + +- The install_info macros need PreReq: %install_info_prereq + +------------------------------------------------------------------- +Fri Feb 7 01:30:53 CET 2003 - ro@suse.de + +- added install_info macros + +------------------------------------------------------------------- +Tue Feb 4 22:34:10 CET 2003 - ro@suse.de + +- don't package /bin/kill (part of coreutils now) + +------------------------------------------------------------------- +Tue Feb 4 12:40:00 CET 2003 - meissner@suse.de + +- Include tarball with pmac-utils manpages, so we do not need + sgmltool and all its dependents. + +------------------------------------------------------------------- +Wed Jan 29 11:52:19 CET 2003 - mmj@suse.de + +- Update to util-linux-2.11z including: + Translation updates + mount: fix LABEL= handling for user umount, don't abort on read + error with photocds and add dmask and fmask vfat mount options + setterm: accept devfs name + simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails + umount: allow user umount after mount by label or uuid + +------------------------------------------------------------------- +Wed Jan 22 15:10:24 CET 2003 - sf@suse.de + +- removed last patch, added new (correct) patch + +------------------------------------------------------------------- +Wed Jan 22 12:48:30 CET 2003 - sf@suse.de + +- removed eliminate_doubles() from mkfs.cramfs.c + for x86_64, as it segfaults. + (makes the images slightly larger, about 10%) + +------------------------------------------------------------------- +Tue Jan 21 14:51:29 CET 2003 - mmj@suse.de + +- Added description of ISO mount options to mount.8 [#22915] + +------------------------------------------------------------------- +Mon Dec 2 12:21:38 CET 2002 - mmj@suse.de + +- Update the ReiserFS patch from Chris Mason + +------------------------------------------------------------------- +Fri Nov 29 10:38:02 CET 2002 - mmj@suse.de + +- Fix missing #include + +------------------------------------------------------------------- +Thu Nov 28 15:03:05 CET 2002 - mmj@suse.de + +- Make readprofile also try to locate the System.map in + /boot/System.map-`uname -r` [#22168] + +------------------------------------------------------------------- +Wed Nov 27 11:01:52 CET 2002 - mmj@suse.de + +- Update to util-linux-2.11y including: + o Translation updates + o fdisk,cfdisk: cosmetic fixes + o mount,umount: fix LABEL= handling for non-root [#17322] + o more: kill external help file + o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC + fails (patch we had, now folded upstream) + +------------------------------------------------------------------- +Wed Nov 20 12:19:33 CET 2002 - mmj@suse.de + +- Update to util-linux-2.11x including: + o Translation updates for several languages + o cfdisk: correct error printout + o fdisk: allow addition of a new partition when logicals all used + but primary free + o hwclock: detect systime jumps backward during setting hwclock + o Merge of the cramfs bloksize patch + o mount: new --rbind flag, for recursive loopback mounts + o mount, umount: new -O option + o setpwnam.c: open temp pw file with O_EXCL + o simpleinit: fix for "spawn too fast" + o swapon: new -e option + +------------------------------------------------------------------- +Tue Nov 19 20:12:02 CET 2002 - mmj@suse.de + +- Fix multistring assignment in adjtimex + +------------------------------------------------------------------- +Mon Nov 11 11:26:14 CET 2002 - ro@suse.de + +- changed neededforbuild to +- changed neededforbuild to <> + +------------------------------------------------------------------- +Thu Oct 31 14:59:11 CET 2002 - mmj@suse.de + +- Add -b option to mkfs.cramfs (needed for biarch architectures) + +------------------------------------------------------------------- +Thu Oct 31 00:40:09 CET 2002 - ro@suse.de + +- hack time to build on alpha + +------------------------------------------------------------------- +Tue Oct 22 16:13:36 CEST 2002 - mmj@suse.de + +- Add correction to the ReiserFS patch that fixes the case where it + was possible but unlikely to detect a logged copy of a super on a + dedicated logging device as the real thing. From Chris Mason. + +------------------------------------------------------------------- +Tue Oct 22 14:13:30 CEST 2002 - mmj@suse.de + +- Update to util-linux-2.11w including: + o fdisk and cfdisk fixes + o more bigendian fix + o translation updates + o > 2GB swapspace + o mount umask, cramfs and ocfs stuff + +------------------------------------------------------------------- +Tue Oct 8 17:13:18 CEST 2002 - mmj@suse.de + +- Only enable below patch on ix86 and x86_64 + +------------------------------------------------------------------- +Mon Oct 7 16:35:24 CEST 2002 - mmj@suse.de + +- Make small bugfix to below patch + +------------------------------------------------------------------- +Sat Oct 5 01:27:51 CEST 2002 - mmj@suse.de + +- Apply patch to enable > 2GB swap (redhat) [#20533] + +------------------------------------------------------------------- +Wed Oct 2 15:27:47 CEST 2002 - mmj@suse.de + +- Add one-liner security fix to mount and umount. + +------------------------------------------------------------------- +Mon Sep 23 09:47:33 CEST 2002 - mmj@suse.de + +- Readd fix for klogconsole that got lost [#19834] + +------------------------------------------------------------------- +Fri Sep 13 12:55:24 CEST 2002 - mmj@suse.de + +- Added patch from Oracle to mount ocfs by label [#19262] + +------------------------------------------------------------------- +Thu Sep 12 18:06:21 CEST 2002 - mmj@suse.de + +- more: Do not cast char * to int and back [#18896] + +------------------------------------------------------------------- +Sat Aug 31 17:58:26 CEST 2002 - olh@suse.de + +- add mount_cramfs_be.diff to allow mount -oloop cramfsfile loopdir + +------------------------------------------------------------------- +Mon Aug 26 16:56:52 CEST 2002 - mmj@suse.de + +- Make mode not 666 when writing /etc/mtab [#18342] + +------------------------------------------------------------------- +Mon Aug 26 13:21:30 CEST 2002 - meissner@suse.de + +- quieten klogconsole if the console does not support TIOCLINUX [#12516] + +------------------------------------------------------------------- +Thu Aug 22 15:05:32 CEST 2002 - mmj@suse.de + +- Added patch from Andreas Gruenbacher for nfs-access-acl [#18183] + +------------------------------------------------------------------- +Wed Aug 21 10:33:05 CEST 2002 - mmj@suse.de + +- Fixed an mtab locking bug with patch from Olaf Kirch [#17637] + +------------------------------------------------------------------- +Mon Aug 19 16:46:54 CEST 2002 - mmj@suse.de + +- Updated reiserfs patch from Chris Mason +- Added patch for mount.8, thanks Andreas Gruenbacher + +------------------------------------------------------------------- +Thu Aug 15 19:56:31 CEST 2002 - mmj@suse.de + +- Correct PreReq: + +------------------------------------------------------------------- +Mon Aug 5 10:45:05 CEST 2002 - mmj@suse.de + +- Update to 2.11u which includes: + o Danish, German, Spanish, Swedish and Turkish updates. + o configure: for fsck.cramfs, mkfs.cramfs: add test for libz + o text-utils/Makefile: pg fix + o agetty: use same test as login does to find utmp entry + o fdisk: fix for fdisk on empty disk + o mount updates + +------------------------------------------------------------------- +Tue Jul 23 21:10:27 CEST 2002 - schwab@suse.de + +- Fix mkfs.cramfs for architectures with non-4k pages. + +------------------------------------------------------------------- +Wed Jul 17 00:34:49 CEST 2002 - mmj@suse.de + +- Merged base into util-linux + +------------------------------------------------------------------- +Mon Jul 15 10:23:51 CEST 2002 - mmj@suse.de + +- Added JFSv2 patch from Christoph Hellwig for volume label. Does + for JFS, what below patch does for ReiserFS. + +------------------------------------------------------------------- +Sun Jul 14 19:04:16 CEST 2002 - adrian@suse.de + +- fix ul-2.10m-sgi-fdisk.diff patch to apply again + +------------------------------------------------------------------- +Thu Jul 11 10:36:16 CEST 2002 - mmj@suse.de + +- Added patch from Chris Mason for volume label on reiserfs + +------------------------------------------------------------------- +Wed Jul 10 15:31:53 CEST 2002 - olh@suse.de + +- add mkfs.cramfs and fsck.cramfs to file list + +------------------------------------------------------------------- +Wed Jul 10 15:12:48 CEST 2002 - mmj@suse.de + +- Fixed nfs.5 to tell nfsver defaults to 3 [#16815] + +------------------------------------------------------------------- +Mon Jul 8 21:16:07 CEST 2002 - mmj@suse.de + +- Update to 2.11t which includes + * fdformat: remove test on major + * fdisk, hwclock and swap polishing + * Lots of translations + * cramfs tools includes from the kernel + * swap{on,off} honours /proc/swaps + * mount small fixups + +------------------------------------------------------------------- +Fri Jul 5 11:10:06 CEST 2002 - kukuk@suse.de + +- Use %ix86 macro + +------------------------------------------------------------------- +Mon Jul 1 14:23:38 CEST 2002 - bk@suse.de + +- get raw built on s390 and s390x +- remove %ifarchs s390 s390x for fdisk(needed for SCSI disks) + +------------------------------------------------------------------- +Mon Jun 17 10:52:49 CEST 2002 - mmj@suse.de + +- Added a fix for simpleinit exploit. + +------------------------------------------------------------------- +Thu Jun 13 17:01:38 CEST 2002 - olh@suse.de + +- disable hwclock ppc patch, maybe obsolete with recent kernels + +------------------------------------------------------------------- +Thu May 16 12:57:53 CEST 2002 - mmj@suse.de + +- Added manpage guessfstype(8) + +------------------------------------------------------------------- +Thu May 9 19:07:21 CEST 2002 - mmj@suse.de + +- Updated to util-linux-2.11r, including translations, x86-64 sup- + port and small bugfixes. + +------------------------------------------------------------------- +Sat Apr 13 14:19:46 CEST 2002 - mmj@suse.de + +- Updated to util-linux-2.11q, includes bugfixes. +- util-linux-mkswap.patch for ia64 was folded into mainline + +------------------------------------------------------------------- +Fri Apr 12 16:49:38 CEST 2002 - stepan@suse.de + +- added x86-64 support. + +------------------------------------------------------------------- +Thu Apr 4 20:06:09 CEST 2002 - ihno@suse.de + +- corrected printf to report shared memories sizes bigger than + 2 GByte correct (Bug #15585). It was reportet on s390x, but + should effect other 64-Bit systems as well. + +------------------------------------------------------------------- +Tue Mar 19 13:41:04 MET 2002 - mmj@suse.de + +- Updated to 2.11o. The hexdump patch have been dropped since it + was folded to mainline util-linux. + +------------------------------------------------------------------- +Fri Mar 15 12:08:15 CET 2002 - schwab@suse.de + +- Fix mkswap for ia64. + +------------------------------------------------------------------- +Mon Mar 4 16:21:41 MET 2002 - draht@suse.de + +- permissions fixes for write(1) and wall(1) + +------------------------------------------------------------------- +Fri Feb 1 14:46:45 CET 2002 - mmj@suse.de + +- Moved /usr/bin/logger to /bin/logger (needed by sysconfig) + +------------------------------------------------------------------- +Mon Jan 28 13:59:26 CET 2002 - mmj@suse.de + +- Added the guessfstype binary from msvec/fehr + +------------------------------------------------------------------- +Thu Jan 24 10:16:37 CET 2002 - ro@suse.de + +- modified fillup_and_insserv call (perl-hack not needed here) + +------------------------------------------------------------------- +Mon Jan 21 17:08:17 CET 2002 - mmj@suse.de + +- Merge NetBSD hexdump changes, fixes bugzilla #12801 + +------------------------------------------------------------------- +Thu Jan 10 14:18:21 CET 2002 - ro@suse.de + +- removed ACTIVATE_RAW_DEV + +------------------------------------------------------------------- +Mon Dec 31 19:05:45 UTC 2001 - adrian@suse.de + +- add patch for mips to create SGI partition tables with fdisk + +------------------------------------------------------------------- +Tue Dec 18 16:50:34 CET 2001 - bjacke@suse.de + +- add adjtimex + +------------------------------------------------------------------- +Mon Dec 10 18:22:06 CET 2001 - mmj@suse.de + +- Update to util-linux-2.11n + +------------------------------------------------------------------- +Tue Nov 20 14:48:25 CET 2001 - mmj@suse.de + +- Added a patch to 'wall' to remove unwanted newline (#12181) + +------------------------------------------------------------------- +Wed Nov 7 14:15:51 CET 2001 - kukuk@suse.de + +- Remove unneeded SPARC patch for hwclock + +------------------------------------------------------------------- +Sat Oct 13 20:59:29 CEST 2001 - kukuk@suse.de + +- Update to util-linux 2.11l + +------------------------------------------------------------------- +Wed Sep 12 00:13:22 MEST 2001 - garloff@suse.de + +- Fixed some dutch translations. (bug #10276) + +------------------------------------------------------------------- +Mon Sep 10 19:31:57 CEST 2001 - olh@suse.de + +- marry fdisk and AIX label again... + add lsprop for ppc + dumps the device tree in a human readable format + +------------------------------------------------------------------- +Mon Sep 3 09:50:11 CEST 2001 - kukuk@suse.de + +- Update to version 2.11i: + - blockdev: corrected ioctl numbers + - cal: fixed for multibyte locales + - line: new + - mount: added vxfs magic + +------------------------------------------------------------------- +Sat Sep 1 19:08:46 CEST 2001 - kukuk@suse.de + +- Let mount follow symlinks again + +------------------------------------------------------------------- +Wed Aug 29 16:00:18 CEST 2001 - kukuk@suse.de + +- Add new option to losetup manual page + +------------------------------------------------------------------- +Tue Aug 28 18:24:14 MEST 2001 - draht@suse.de + +- added timeout support for losetup (-t ) + +------------------------------------------------------------------- +Mon Aug 27 15:24:25 CEST 2001 - kukuk@suse.de + +- Add raw rc scripts, too + +------------------------------------------------------------------- +Sun Aug 26 08:51:29 CEST 2001 - bjacke@suse.de + +- added raw binary and put rawio into obsoletes and provides + +------------------------------------------------------------------- +Sat Aug 25 20:22:58 CEST 2001 - kukuk@suse.de + +- Fix path in getopt.1 manual page to example directory [Bug #9831] + +------------------------------------------------------------------- +Fri Aug 24 16:00:13 CEST 2001 - kukuk@suse.de + +- Small fix for hwclock on newer SPARCs + +------------------------------------------------------------------- +Mon Aug 13 15:51:59 CEST 2001 - ro@suse.de + +- changed neededforbuild to + +------------------------------------------------------------------- +Mon Jul 30 10:59:46 CEST 2001 - kukuk@suse.de + +- Update to util-linux-2.11h +- Add nologin program + +------------------------------------------------------------------- +Tue Jul 10 16:44:35 CEST 2001 - kukuk@suse.de + +- Remove swapdev from filelist + +------------------------------------------------------------------- +Tue Jul 10 13:10:23 CEST 2001 - kukuk@suse.de + +- Update to util-linux-2.11g + +------------------------------------------------------------------- +Wed Jun 6 17:25:33 EDT 2001 - bk@suse.de + +- added s390x to all ifnarch s390 + +------------------------------------------------------------------- +Fri Apr 20 12:09:40 CEST 2001 - kukuk@suse.de + +- Fix wall bug (character 80, 160, 240, are missing) [Bug #6962] + +------------------------------------------------------------------- +Mon Mar 26 10:24:40 CEST 2001 - kukuk@suse.de + +- Add exception for broken i2o disk device numbering scheme, kernel + hacker are not able to fix this and make it right [Bug #5881]. + +------------------------------------------------------------------- +Sat Mar 24 15:27:56 CET 2001 - kukuk@suse.de + +- Update to util-linux 2.11b + +------------------------------------------------------------------- +Thu Mar 15 15:47:34 CET 2001 - kukuk@suse.de + +- Fix changing of partitions with ID 0 on SPARC +- Remove duplicate mount patch + +------------------------------------------------------------------- +Wed Mar 14 21:29:23 CET 2001 - schwab@suse.de + +- Don't use _syscallX on ia64. +- Fix missing includes. + +------------------------------------------------------------------- +Wed Mar 14 11:05:22 CET 2001 - kukuk@suse.de + +- Update to version 2.11a + +------------------------------------------------------------------- +Fri Mar 2 17:05:01 CET 2001 - kukuk@suse.de + +- enable write again + +------------------------------------------------------------------- +Mon Feb 12 15:23:14 CET 2001 - kukuk@suse.de + +- cmos.c: Use sys/io.h, fix PowerPC hack + +------------------------------------------------------------------- +Tue Feb 6 11:54:34 CET 2001 - ro@suse.de + +- wall.c: include time.h + +------------------------------------------------------------------- +Mon Feb 5 11:13:56 CET 2001 - kukuk@suse.de + +- Split hex to extra package +- Update to util-linux-2.10s + +------------------------------------------------------------------- +Fri Feb 2 12:18:56 CET 2001 - werner@suse.de + +- Make swapon/swapoff more handy: + * Ignore swap files on ro mounted file systems + * If -a is given ignore already active devices at swapon + * If -a is given ignore not active devices at swapoff + +------------------------------------------------------------------- +Thu Jan 25 00:37:22 CET 2001 - ro@suse.de + +- added Provides: util + +------------------------------------------------------------------- +Fri Jan 12 10:08:29 MET 2001 - garloff@suse.de + +- Apply patch to lomount to allow all kerneli crypt algos to be + passed and allow to pass passwd with -k. +- losetup seems to support >2GB files just fine (#5433) + +------------------------------------------------------------------- +Tue Jan 2 12:04:33 CET 2001 - kukuk@suse.de + +- Save permissions of /etc/mtab [Bug #5027] + +------------------------------------------------------------------- +Tue Dec 5 15:25:45 CET 2000 - kukuk@suse.de + +- Search first in /etc/filesystems, then in /proc/filesystems + +------------------------------------------------------------------- +Tue Dec 5 11:24:34 CET 2000 - kukuk@suse.de + +- Use AIX/fdisk patch from util-linux-2.10r +- Backport "guess filesystems" from util-linux-2.10r + +------------------------------------------------------------------- +Tue Dec 5 11:10:10 CET 2000 - schwab@suse.de + +- Don't use _syscallX on ia64. + + +------------------------------------------------------------------- +Mon Dec 4 09:27:28 CET 2000 - olh@suse.de + +- fix diff again + +------------------------------------------------------------------- +Sun Dec 3 00:09:16 CET 2000 - olh@suse.de + +- no segfaults with AIX disklabels + +------------------------------------------------------------------- +Wed Nov 29 18:21:25 CET 2000 - uli@suse.de + +- fixed to build on PPC + +------------------------------------------------------------------- +Mon Nov 27 19:03:20 CET 2000 - schwab@suse.de + +- Fix broken casts in hwclock. + +------------------------------------------------------------------- +Thu Nov 23 15:48:35 CET 2000 - bk@suse.de + +- temporary disable pivot_root on s390(2.4 kernel is not yet built) + +------------------------------------------------------------------- +Wed Nov 22 13:28:06 CET 2000 - schwab@suse.de + +- Add pivot_root to file list. + +------------------------------------------------------------------- +Mon Nov 20 11:37:35 CET 2000 - kukuk@suse.de + +- Fix pmac-utils to compile with new kernel + +------------------------------------------------------------------- +Fri Nov 17 19:40:20 CET 2000 - kukuk@suse.de + +- Fix hwclock to compile on PPC + +------------------------------------------------------------------- +Wed Nov 15 12:39:13 CET 2000 - kukuk@suse.de + +- Update util-linux to 2.10q, merge flushb.diff + +------------------------------------------------------------------- +Thu Nov 2 10:21:12 CET 2000 - kukuk@suse.de + +- Remove some of the last specfile changes + +------------------------------------------------------------------- +Wed Nov 1 14:17:07 CET 2000 - olh@suse.de + +- update pmac-utils for new powermacs, cleanup specfile + +------------------------------------------------------------------- +Fri Oct 20 14:58:09 CEST 2000 - kukuk@suse.de + +- Update util-linux to 2.10p +- Rename package from util to util-linux + +------------------------------------------------------------------- +Wed Sep 27 11:30:21 CEST 2000 - kukuk@suse.de + +- Allow NFS v3 with 2.2.17.SuSE + +------------------------------------------------------------------- +Tue Sep 26 17:54:23 CEST 2000 - kukuk@suse.de + +- Fix mount for new NFS kernel patch + +------------------------------------------------------------------- +Sat Sep 9 17:36:24 CEST 2000 - kukuk@suse.de + +- Remove tcsh dependency +- Update to util-linux 2.10o, use of /etc/filesystems is still broken + +------------------------------------------------------------------- +Fri Aug 25 17:05:50 MEST 2000 - pthomas@suse.de + +- use %{_mandir} and %{_infodir} exclusively. This allows building + from source rpm on platforms other than 7.0. + +------------------------------------------------------------------- +Wed Jul 19 00:50:48 CEST 2000 - bk@suse.de + +- s390: removed dasdfmt and silo, %ifnarch s390 for some non-s390 things. + +------------------------------------------------------------------- +Tue May 30 18:45:56 CEST 2000 - bk@suse.de + +- added dasdfmt and silo on s390 + +------------------------------------------------------------------- +Mon May 15 18:15:05 CEST 2000 - kukuk@suse.de + +- util-linux: Update to 2.10m + +------------------------------------------------------------------- +Wed Apr 26 11:22:54 CEST 2000 - kukuk@suse.de + +- flusb: Don't use kernel headers, even if we don't need them! + +------------------------------------------------------------------- +Wed Apr 19 13:56:28 CEST 2000 - kukuk@suse.de + +- util-linux: Update to 2.10l + +------------------------------------------------------------------- +Mon Apr 17 15:06:51 CEST 2000 - kukuk@suse.de + +- util-linux: Update to 2.10k + +------------------------------------------------------------------- +Thu Apr 13 15:57:45 CEST 2000 - kukuk@suse.de + +- Move /sbin/setserial to /bin/setserial, add compat link to + /sbin. This fixes [Bug 1084] and is necessary for FHS 2.1 + +------------------------------------------------------------------- +Wed Apr 12 15:43:05 CEST 2000 - kukuk@suse.de + +- Fix util-linux for Alpha + +------------------------------------------------------------------- +Wed Apr 12 14:36:41 CEST 2000 - kukuk@suse.de + +- util-linux: Update to 2.10j + +------------------------------------------------------------------- +Sun Apr 2 01:08:05 CEST 2000 - bk@suse.de + +- suse s390 team added support for s390 + +------------------------------------------------------------------- +Thu Mar 30 21:31:15 CEST 2000 - uli@suse.de + +- hwclock/PPC: added support for MK48T559 RTC chip used in MTX+ boards + +------------------------------------------------------------------- +Fri Mar 24 11:49:25 CET 2000 - kukuk@suse.de + +- Add Linux LVM partition tag to fdisk +- Fix a lot of more possible buffer overruns +- Fix some fdisk sunlabel bugs +- added BuildRoot fixes from nadvorni@suse.cz + +------------------------------------------------------------------- +Wed Mar 22 14:28:27 CET 2000 - kukuk@suse.de + +- Update util-linux to 2.10h +- Add clock again for non PPC platforms + +------------------------------------------------------------------- +Fri Mar 17 15:10:50 CET 2000 - uli@suse.de + +- now contains both hwclock and clock on PPC (/sbin/init.d/boot + chooses what to run at runtime) + +------------------------------------------------------------------- +Tue Mar 14 19:23:26 CET 2000 - schwab@suse.de + +- Add support for ia64. + +------------------------------------------------------------------- +Thu Mar 9 21:25:15 CET 2000 - kukuk@suse.de + +- fdisk: Fix -l for Mylex RAID controller + +------------------------------------------------------------------- +Tue Mar 7 17:23:57 CET 2000 - kukuk@suse.de + +- etc/filesystems: Add minix and reiserfs + +------------------------------------------------------------------- +Tue Mar 7 11:49:23 CET 2000 - kukuk@suse.de + +- mount: fix endian problem with minix fs + +------------------------------------------------------------------- +Tue Feb 15 12:11:50 CET 2000 - kukuk@suse.de + +- mount: Add hack for PPC/syscall mount problem + +------------------------------------------------------------------- +Sun Feb 13 05:16:13 CET 2000 - bk@suse.de + +- let rdev continue in case it stubles over a bad file in /dev (/dev/snd fix) + +------------------------------------------------------------------- +Fri Feb 4 17:14:07 CET 2000 - kukuk@suse.de + +- Make PPC clock parameter compatible to hwclock + +------------------------------------------------------------------- +Thu Feb 3 14:42:23 CET 2000 - kukuk@suse.de + +- Fix filelist for SPARC + +------------------------------------------------------------------- +Thu Feb 3 11:14:29 CET 2000 - kukuk@suse.de + +- util-linux: Update to 2.10f (mount security fix) + +------------------------------------------------------------------- +Sun Jan 23 15:45:08 CET 2000 - kukuk@suse.de + +- util-linux: Update to 2.10e + +------------------------------------------------------------------- +Tue Jan 18 19:18:08 CET 2000 - kukuk@suse.de + +- mount now looks at first in /etc/filesystems and then in + /proc/filesystems + +------------------------------------------------------------------- +Tue Jan 18 16:32:05 CET 2000 - ro@suse.de + +- fixed pmac-utils to build with 2.3 as well + +------------------------------------------------------------------- +Tue Jan 18 14:56:22 CET 2000 - kukuk@suse.de + +- Fix a lot of fdisk buffer overruns [Bug 1642] + +------------------------------------------------------------------- +Mon Jan 17 18:23:56 CET 2000 - kukuk@suse.de + +- Fix setserial for Linux 2.3.40 +- Remove write, is now in nkitb +- Build minix and bfs tools for SPARC +- Fix some buffer overflows in fdisk + +------------------------------------------------------------------- +Fri Dec 17 15:00:19 MET 1999 - kukuk@suse.de + +- util-linux: Update to 2.10d +- hex: Update to 1.2 +- Move manual pages to /usr/share/man + +------------------------------------------------------------------- +Tue Nov 30 18:28:14 CET 1999 - uli@suse.de + +- re-added hwclock link for PPC (2nd try) + +------------------------------------------------------------------- +Tue Nov 30 17:49:27 MET 1999 - uli@suse.de + +- re-added hwclock link for PPC + +------------------------------------------------------------------- +Mon Nov 15 12:39:41 MET 1999 - kukuk@suse.de + +- util-linux: Update to 2.10b + +------------------------------------------------------------------- +Sat Nov 13 15:36:37 MET 1999 - kukuk@suse.de + +- setserial: Add Patch for Sparc +- Fix filelist for Sparc + +------------------------------------------------------------------- +Wed Oct 27 04:03:42 CEST 1999 - garloff@suse.de + +- added flushb (moved here from ddrescue). +- fix bug in logger (remove trailing newlines). + +------------------------------------------------------------------- +Fri Oct 22 11:29:51 MEST 1999 - kukuk@suse.de + +- util-linux: Remove old patches for mk_loop_h + +------------------------------------------------------------------- +Sat Oct 16 16:40:13 MEST 1999 - kukuk@suse.de + +- util-linux: Update to 2.9z + +------------------------------------------------------------------- +Fri Oct 8 10:58:48 MEST 1999 - kukuk@suse.de + +- Update to util-linux-2.9y (execpt fdisk) + +------------------------------------------------------------------- +Tue Sep 14 18:14:53 CEST 1999 - uli@suse.de + +- added PMac-specific utils for PPC + +------------------------------------------------------------------- +Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de + +- ran old prepare_spec on spec file to switch to new prepare_spec. + +------------------------------------------------------------------- +Thu Aug 26 15:05:03 CEST 1999 - uli@suse.de + +- disabled hayesesp for PPC + +------------------------------------------------------------------- +Wed Aug 25 18:04:35 MEST 1999 - kukuk@suse.de + +- Don?t install tsort, its now in textutils 2.0 + +------------------------------------------------------------------- +Tue Aug 24 10:11:06 MEST 1999 - kukuk@suse.de + +- Update to util-linux-2.9w (execpt fdisk) + +------------------------------------------------------------------- +Mon Aug 9 10:55:48 MEST 1999 - kukuk@suse.de + +- Update to util-linux-2.9v (execpt fdisk) + +------------------------------------------------------------------- +Tue Jul 20 18:01:29 CEST 1999 - garloff@suse.de + +- Added hex from Erich S. Raymond + +------------------------------------------------------------------- +Mon Jul 12 12:11:45 MEST 1999 - kukuk@suse.de + +- Add fdisk patch from Klaus G. Wagner +- Add mount patch from util-linux 2.9u + +------------------------------------------------------------------- +Tue Jul 6 12:23:47 MEST 1999 - kukuk@suse.de + +- update to util-linux-2.9t + +------------------------------------------------------------------- +Fri Jun 25 14:44:30 MEST 1999 - kukuk@suse.de + +- update to util-linux-2.9s + +------------------------------------------------------------------- +Wed Mar 3 11:25:50 MET 1999 - ro@suse.de + +- hwclock.c: always use busywait to get rtctime + (it's hard to find out at runtime if we will get an irq) + +------------------------------------------------------------------- +Tue Mar 2 00:42:15 MET 1999 - ro@suse.de + +- update to util-linux-2.9i +- update to setserial-2.15 +- using diffs from jurix and add-ons from kgw for compaq smart raid + +------------------------------------------------------------------- +Mon Feb 1 10:22:10 MET 1999 - ro@suse.de + +- rdev is not built on alpha + +------------------------------------------------------------------- +Mon Jan 18 21:29:36 MET 1999 - florian@suse.de + +- fixed one broken case to delete a partition in fdisk + +------------------------------------------------------------------- +Sun Dec 13 22:20:16 MET 1998 - bs@suse.de + +- fixed file list + +------------------------------------------------------------------- +Thu Dec 10 16:38:08 MET 1998 - fehr@suse.de + +- fix bug in fdisk + +------------------------------------------------------------------- +Tue Dec 8 15:43:23 MET 1998 - ro@suse.de + +- removed last from filelist +- added link /sbin/clock -> hwclock + +------------------------------------------------------------------- +Wed Nov 4 00:23:02 MET 1998 - ro@suse.de + +- fdisksunlabel: don't include scsi/scsi.h for glibc-2.0 + +------------------------------------------------------------------- +Fri Oct 30 11:46:38 MET 1998 - ro@suse.de + +- update to 2.9 / added hostid from previous diff +- copied some glibc changes from previous diff (strcpy..) + +------------------------------------------------------------------- +Thu Sep 17 13:04:14 MEST 1998 - ro@suse.de + +- define _GNU_SOURCE when using getopt + +------------------------------------------------------------------- +Mon Aug 31 16:12:36 MEST 1998 - ro@suse.de + +- full switch to util-linux 2.8 +-- sync has moved to pkg fileutils +-- chroot has moved to pkg sh_utils (has been there for a while) +-- adopted hostid from previous suse-pkg + +------------------------------------------------------------------- +Mon Aug 24 10:46:33 MEST 1998 - ro@suse.de + +- switched to use mount from util-linux-2.8 + +------------------------------------------------------------------- +Tue Jun 23 10:46:45 MEST 1998 - ro@suse.de + +- added fdisk, sfdisk, cfdisk from util-linux-2.8 + (including man-pages,readmes) + +------------------------------------------------------------------- +Mon Nov 17 14:14:47 MET 1997 - ro@suse.de + +- changed /local/bin/perl5 in chkdupexe to /usr/bin/perl + +------------------------------------------------------------------- +Fri Oct 31 13:38:58 MET 1997 - ro@suse.de + +- temporarily removed mount-hacker + +------------------------------------------------------------------- +Wed Oct 29 23:44:37 MET 1997 - florian@suse.de + +- add changes from ms@suse.de for hostid.c + + +------------------------------------------------------------------- +Tue May 20 14:10:37 MEST 1997 - florian@suse.de + + +- only support kernel 2.0.x for nfs mounts, please use /bin/mount-hacker + for kernel 2.1.x + + +------------------------------------------------------------------- +Wed Apr 30 15:57:14 CEST 1997 - florian@suse.de + + +- update to mount 2.6g + + +------------------------------------------------------------------- +Sun Apr 13 23:04:29 MEST 1997 - florian@suse.de + + +- update to new version util-linux 2.6 + +- update to new version mount 2.6e + + + +------------------------------------------------------------------- +Sat Nov 2 17:35:11 CET 1996 - florian@suse.de + + +- update to mount 2.5p + + +------------------------------------------------------------------- +Thu Oct 17 16:05:09 CEST 1996 - florian@suse.de + + +- Update auf neue Version von mount 2.5o. + + +------------------------------------------------------------------- +Tue Sep 3 17:01:45 MET DST 1996 - florian@suse.de + + +- updated to new version mount 2.5m +- (u)mount now gives much better error messages + + +------------------------------------------------------------------- +Sun Aug 25 19:28:50 MET DST 1996 - bs@suse.de + +compile setterm with libtermcap and not libncurses +use newer mount instead of the old version in util-linux +(security fix) diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec new file mode 100644 index 0000000..5dbc183 --- /dev/null +++ b/util-linux-systemd.spec @@ -0,0 +1,1328 @@ +# +# spec file for package util-linux-systemd +# +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%bcond_without sysvinit_tools +%bcond_without enable_su +%bcond_without enable_eject +%bcond_with enable_last + +Name: util-linux-systemd +%define _name util-linux +# WARNING: After editing this file please call pre_checkin.sh to update spec files: +%define _name util-linux +# To prevent dependency loop in automatic build systems, we want to +# build util-linux in parts. To build all at once, set build_all to 1. +# +# build_util_linux: First stage build builds all except: +# build_util_linux_systemd: Builds util-linux-systemd and uuidd. +# build_python_libmount: Builds python-libmount. +%define build_all 0 +%if "%{name}" == "python-libmount" +%define build_util_linux 0 +%define build_util_linux_systemd 0 +%define build_python_libmount 1 +# To prevent dependency loops, verify signature only in third stage. +%define verify_sig 1 +%else +%if "%{name}" == "util-linux-systemd" +%define build_util_linux 0 +%define build_util_linux_systemd 1 +%define build_python_libmount 0 +%define verify_sig 0 +%else +%if %build_all +%define build_util_linux 1 +%define build_util_linux_systemd 1 +%define build_python_libmount 1 +%define verify_sig 1 +%else +%define build_util_linux 1 +%define build_util_linux_systemd 0 +%define build_python_libmount 0 +%define verify_sig 0 +%endif +%endif +%endif +BuildRequires: audit-devel +BuildRequires: bc +BuildRequires: binutils-devel +BuildRequires: fdupes +BuildRequires: gettext-devel +BuildRequires: libcap-ng-devel +BuildRequires: libselinux-devel +BuildRequires: libsepol-devel +BuildRequires: libtool +BuildRequires: ncurses-devel +BuildRequires: pam-devel +BuildRequires: pkg-config +BuildRequires: readline-devel +BuildRequires: utempter-devel +BuildRequires: zlib-devel +%if %verify_sig +BuildRequires: gpg-offline +%endif +%if %build_util_linux_systemd +%if 0%{?suse_version} <= 1230 +BuildRequires: pkgconfig(systemd) +%else +BuildRequires: systemd-rpm-macros +BuildRequires: pkgconfig(libsystemd-daemon) +BuildRequires: pkgconfig(libsystemd-journal) +%endif +%endif +%if %build_python_libmount +BuildRequires: python-devel +%endif +#BEGIN SECOND STAGE DEPENDENCIES +%if !%build_util_linux +%if %build_util_linux_systemd +BuildRequires: libblkid-devel +BuildRequires: libmount-devel +BuildRequires: libsmartcols-devel +BuildRequires: libuuid-devel +%endif +%if %build_python_libmount +BuildRequires: libmount-devel +%endif +%endif +#END SECOND STAGE DEPENDENCIES +Version: 2.25 +Release: 0 +# util-linux is a base package and uuidd pre-requiring pwdutils pulls +# that into the core build cycle. pwdutils also pulls in the whole +# ldap stack into it. Avoid this whole mess which is done only to +# make the rpm install check of uuidd happy which has support to work without +# these tools as well +#!BuildIgnore: pwdutils +Url: https://www.kernel.org/pub/linux/utils/util-linux/ +#BEGIN UGLY HACK +%if 0 +# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) +Summary: TRAP +License: GPL-2.0+ +Group: System/Base +%endif +# UGLY HACK: License tag is errorneously moved here on every call of format_spec_file. %%include cannot be broken by format_spec_file. +%include %{_sourcedir}/util-linux.preamble +#END UGLY HACK +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.xz +Source1: util-linux-rpmlintrc +Source4: raw.init +Source5: etc.raw +Source6: etc_filesystems +Source7: baselibs.conf +Source8: login.pamd +Source9: remote.pamd +Source10: su.pamd +Source11: su.default +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.sign +Source13: %{_name}.keyring +# TODO: split to separate package +Source40: klogconsole.tar.bz2 +# XXX: Run a program in a new session and with controlling tty +Source22: setctsid.c +Source23: setctsid.8 +# XXX: ppc specific, still needed? +Source28: mkzimage_cmdline.8 +Source29: mkzimage_cmdline.c +Source31: addnote.c +# +Source50: uuidd.rc +Source51: blkid.conf +# detachec parts of spec file +Source100: util-linux.preamble +Source101: util-linux.util-linux +Source102: util-linux.python-libmount +## +## util-linux patches +## +# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path +Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff +# PATCH-FEATURE-SUSE -- Report about disabled encryption to stderr. +Patch12: util-linux-noenc-suse.patch +# PATCH-FIX-UPSTREAM util-linux-bash-completion-blockdev.patch sbrabec@suse.cz -- Fix bash-completion installation. +Patch13: util-linux-bash-completion-blockdev.patch +## +## klogconsole +## +Patch55: klogconsole-quiet.patch +Patch56: klogconsole.diff +BuildRoot: %{_tmppath}/%{name}-%{version}-build +# +%if %build_util_linux +Supplements: filesystem(minix) +Provides: fsck-with-dev-lock = %{version} +# bnc#651598: +Provides: util-linux(fake+no-canonicalize) +PreReq: %install_info_prereq permissions +PreReq: %insserv_prereq %fillup_prereq /bin/sed +Recommends: %{name}-lang = %{version} +#BEGIN UGLY HACK +%if 0 +# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) +Summary: TRAP +Group: System/Base +%endif +# UGLY HACK: Group tag is updated to bad value on every call of format_spec_file. %%include cannot be broken by format_spec_file. +%include %{_sourcedir}/util-linux.util-linux +#END UGLY HACK +%if %{with enable_eject} +Provides: eject = 2.1.0-166.8 +%endif +Provides: login = 4.0-33.7 +%if %{with enable_eject} +# File conflict of eject (up to 12.3 and SLE11). +Obsoletes: eject < 2.1.0-166.8 +%endif +# File conflict of login (up to 12.1 and SLE11). +Obsoletes: login < 4.0-33.7 +%if %{with enable_su} +# File conflict of su and kill (up to 12.3 and SLE11). +# It should be coreutils < 8.21-4, but coreutils provide Release-less symbol. +Conflicts: coreutils < 8.21 +%endif +%if %{with sysvinit_tools} +# File conflict of sulogin and utmpdump (up to 12.3 and SLE11). +Conflicts: sysvinit-tools < 2.88+-87 +%endif +# bnc#805684: +%ifarch s390x +Obsoletes: s390-32 +Provides: s390-32 +%endif +# uuid-runtime appeared in SLE11 SP1 to SLE11 SP3 +Provides: uuid-runtime = %{version}-%{release} +Obsoletes: uuid-runtime < %{version}-%{release} +# +# Using "Requires" here would lend itself to help upgrading, but since +# util-linux is in the initial bootstrap, that is not a good thing to do: +# +Recommends: adjtimex +Recommends: time +Recommends: which +%else +# Exact copy of headers below is needed for spec cleaner that does not support +# if condition across preamble and subsequent sections. +%if %build_python_libmount +# Exact copy of the %%package tag from python-libmount section below: +#BEGIN UGLY HACK +%if 0 +# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) +Summary: TRAP +Group: System/Base +%endif +# UGLY HACK: Group tag is updated to bad value on every call of format_spec_file. %%include cannot be broken by format_spec_file. +%include %{_sourcedir}/util-linux.python-libmount +#END UGLY HACK +%else +%if %build_util_linux_systemd +# Exact copy of the %%package tag from systemd section below: +Summary: A collection of basic systemd utilities +Group: System/Base +Supplements: packageand(util-linux:systemd) +# Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 +Provides: util-linux:/usr/lib/systemd/system/fstrim.service +# Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 +Conflicts: util-linux < 2.25 +%else +# ERROR: No build_* variables are set. +%endif +%endif +%endif + +%if %build_util_linux +%description +This package contains a large variety of low-level system utilities +that are necessary for a Linux system to function. It contains the +mount program, the fdisk configuration tool, and more. + +%package -n libblkid1 +Summary: Filesystem detection library +Group: System/Filesystems + +%description -n libblkid1 +Library for filesystem detection. + +%package -n libblkid-devel +Summary: Development files for the filesystem detection library +Group: Development/Libraries/C and C++ +Requires: libblkid1 = %{version} + +%description -n libblkid-devel +Files needed to develop applications using the library for filesystem +detection. + +%package -n libblkid-devel-static +Summary: Development files for the filesystem detection library +Group: Development/Libraries/C and C++ +Requires: libblkid-devel = %{version} + +%description -n libblkid-devel-static +Files needed to develop applications using the library for filesystem +detection. + +%package -n libuuid1 +Summary: Library to generate UUIDs +Group: System/Filesystems + +%description -n libuuid1 +A library to generate universally unique IDs (UUIDs). + +%package -n libuuid-devel +Summary: Development files for libuuid1 +Group: Development/Libraries/C and C++ +Requires: libuuid1 = %{version} + +%description -n libuuid-devel +Files to develop applications using the library to generate universally +unique IDs (UUIDs). + +%package -n libuuid-devel-static +Summary: Development files for libuuid1 +Group: Development/Libraries/C and C++ +Requires: libuuid-devel = %{version} + +%description -n libuuid-devel-static +Files to develop applications using the library to generate universally +unique IDs (UUIDs). + +%package -n libmount1 +Summary: Device mount library +Group: System/Filesystems + +%description -n libmount1 +Library designed to be used in low-level utils like +mount(8) and /usr/sbin/mount. helpers. + +%package -n libmount-devel +Summary: Development files for libmount1 +Group: Development/Libraries/C and C++ +Requires: libmount1 = %{version} + +%package -n libmount-devel-static +Summary: Development files for libmount1 +Group: Development/Libraries/C and C++ +Requires: libmount-devel = %{version} + +%description -n libmount-devel-static +Files to develop applications using the libmount library. + +%description -n libmount-devel +Files to develop applications using the libmount library. + +%package -n libsmartcols1 +Summary: Column-based text sort engine +Group: System/Libraries + +%description -n libsmartcols1 +Library to sort human readable column-based text output. + +%package -n libsmartcols-devel +Summary: Development files for libsmartcols1 +Group: Development/Libraries/C and C++ +Requires: libsmartcols1 = %{version} + +%description -n libsmartcols-devel +Files to develop applications using the libsmartcols library. + +%package -n libsmartcols-devel-static +Summary: Development files for libsmartcols1 +Group: Development/Libraries/C and C++ +Requires: libsmartcols-devel = %{version} + +%description -n libsmartcols-devel-static +Files to develop applications using the libsmartcols library. + +%lang_package +%endif +%if %build_util_linux_systemd +%if %build_util_linux +%package systemd +# Do not forget to copy duplicate of this section to the preamble: +Summary: A collection of basic systemd utilities +Group: System/Base +Supplements: packageand(util-linux:systemd) +# Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 +Provides: util-linux:/usr/lib/systemd/system/fstrim.service +# Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 +Conflicts: util-linux < 2.25 + +%description systemd +%else +%description +%endif +This package contains low-level util-linux utilities that use systemd. + +%package -n uuidd +Summary: Helper daemon to guarantee uniqueness of time-based UUIDs +Group: System/Filesystems +PreReq: %fillup_prereq +PreReq: %insserv_prereq +PreReq: permissions +PreReq: pwdutils +# uuidd bash-completion moved to a correct package +Conflicts: util-linux < 2.25 + +%description -n uuidd +The uuidd package contains a userspace daemon (uuidd) which guarantees +uniqueness of time-based UUID generation even at very high rates on +SMP systems. + +%endif +%if %build_python_libmount +%if %build_util_linux +%package -n python-libmount +# Do not forget to copy duplicate of this section to the preamble: +Summary: Python bindings for the libmount library +Group: System/Filesystems + +%description -n python-libmount +%else +%description +%endif +This package contains the python bindings for util-linux libmount +library. + +%endif +%prep +%if %verify_sig +xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - +%endif +%setup -q -n %{_name}-%{version} -b 40 +%patch4 -p1 +%patch12 -p1 +%patch13 -p1 +# +# setctsid +cp -p %{S:22} %{S:23} . + +pushd ../klogconsole +%patch55 -p1 +%patch56 -p1 +popd + +%build +%if %build_util_linux +pushd ../klogconsole +# klogconsole build +make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" +popd +# setctsid build +rm -f setctsid +make %{?_smp_mflags} setctsid CFLAGS="%{optflags}" CC="%{__cc}" +# +#BEGIN SYSTEMD SAFETY CHECK +# With systemd, some utilities are built differently. Keep track of these +# sources to prevent building of systemd-less versions. +# +# WARNING: Never edit following line without doing all suggested in the echo below! +UTIL_LINUX_KNOWN_SYSTEMD_DEPS='./login-utils/lslogins.c ./misc-utils/logger.c ./misc-utils/uuidd.c ' +UTIL_LINUX_FOUND_SYSTEMD_DEPS=$(grep -rl 'HAVE_LIBSYSTEMD' . | fgrep '.c' | LC_ALL=C sort | tr '\n' ' ') +if test "$UTIL_LINUX_KNOWN_SYSTEMD_DEPS" != "$UTIL_LINUX_FOUND_SYSTEMD_DEPS" ; then + echo "List of utilities depending on systemd have changed. +Please check the new util-linux-systemd file list, file removal and update of Conflicts for safe update! +Then update configure options to build what needed. +Only then you can safely update following spec file line: +UTIL_LINUX_KNOWN_SYSTEMD_DEPS='$UTIL_LINUX_FOUND_SYSTEMD_DEPS'" + exit 1 +fi +#END SYSTEMD SAFETY CHECK +#BEGIN FIRST STAGE MODIFICATIONS +%if !%build_util_linux_systemd +sed -i 's/BUILD_LSLOGINS/FALSE/ + s/BUILD_LOGGER/FALSE/ + ' misc-utils/Makemodule.am login-utils/Makemodule.am bash-completion/Makemodule.am +autoreconf -f -i +%endif +#END FIRST STAGE MODIFICATIONS +%else +#BEGIN SECOND STAGE MODIFICATIONS +# delete all make modules except wanted ones +sed -i '/^include/{ +%if %build_python_libmount + /libmount\/Makemodule.am/b 1 +%endif +%if %build_util_linux_systemd +# for lslogins + /login-utils/b 1 +# for logger and uuidd + /misc-utils/b 1 +# for fstrim.service and fstrim.timer + /sys-utils/b 1 +# for uninstalled libcommon required by uuidd + / lib\//b 1 +# for bash completions + /bash-completion/b 1 +# we always want tests (they are smart enough to skip irrelevant parts) + /tests/b 1 +%endif +%if %build_python_libmount + /libmount\/python/b 1 +%endif + d + :1 + }' Makefile.am libmount/Makemodule.am +%if %build_python_libmount +# trick: we do not want to build libmount, but include subdirs +# We close prefious if FALSE and open new pairing with endif +sed -i '/^if BUILD_LIBMOUNT/d +/^if ENABLE_GTK_DOC/i \ +if BUILD_LIBMOUNT +' libmount/Makemodule.am +# Do not install terminal-colors.d.5 +sed -i '/dist_man_MANS/d' lib/Makemodule.am +%endif +# disable all make modules except wanted ones +sed -i '/^if BUILD_/{ +%if %build_util_linux_systemd + /LSLOGINS/b 1 + /LOGGER/b 1 + /UUIDD/b 1 + /BASH_COMPLETION/b 1 +%endif + s/BUILD_.*/FALSE/ + :1 + } + ' libmount/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am sys-utils/Makemodule.am bash-completion/Makemodule.am +%if %build_util_linux_systemd +# trick: we do not want to build fstrim, but we want to install fstrim systemd connectors +# We close prefious if FALSE and open new pairing with endif +sed -i '/^if HAVE_SYSTEMD/i \ +endif\ +if TRUE +' sys-utils/Makemodule.am +# Do not install terminal-colors.d.5 +sed -i '/dist_man_MANS/d' lib/Makemodule.am +%endif +# Use installed first stage libraries +sed -i ' +# extra space to not replace pylibmount.la + s/ libmount\.la/ -lmount/g + s/libuuid\.la/-luuid/g + s/libblkid\.la/-lblkid/g + s/libsmartcols\.la/-lsmartcols/g + ' libmount/python/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am +# Ignore dependencies on optional (and not built in second stage) libraries +sed -i ' + /AM_GNU_GETTEXT/d + s/UL_REQUIRES_BUILD(\[.*\], \[libuuid\])/dnl &/ + s/UL_REQUIRES_BUILD(\[.*\], \[libsmartcols\])/dnl &/ + ' configure.ac +sed -i ' + /SUBDIRS =/s/ po// + ' Makefile.am +autoreconf -f -i +#END SECOND STAGE MODIFICATIONS +%endif +# +# util-linux itself +# +# Version check for libutempter +# +uhead=$(find %_includedir -name utempter.h 2>/dev/null) +if test -n "$uhead" && grep -q utempter_add_record "$uhead" +then + uhead=--with-utempter +else + uhead=--without-utempter +fi +export SUID_CFLAGS="-fpie" +export SUID_LDFLAGS="-pie" +# override default localstatedir to /run +# only used for volatile data +# +# SUSE now supports only systemd based system. We do not build +# sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities. +%configure \ + --localstatedir=/run \ + --docdir=%{_docdir}/%{_name} \ + --with-audit \ + --with-gnu-ld \ + --with-ncurses \ + --with-selinux \ + $uhead \ + --with-bashcompletiondir=%{_datadir}/bash-completion \ + --enable-all-programs \ + --disable-reset \ + --disable-use-tty-group \ + --disable-silent-rules \ + --enable-static \ + --disable-rpath \ +%if %{without enable_last} + --disable-last \ +%endif +%if %{without enable_eject} + --disable-eject \ +%endif +%if %{with sysvinit_tools} + --enable-sulogin-emergency-mount \ +%else + --disable-sulogin \ + --disable-mountpoint \ +%endif +%if %{without enable_su} + --disable-su \ + --disable-kill \ +%endif +%if %build_util_linux_systemd + --enable-uuidd \ + --with-systemd \ + --with-systemdsystemunitdir=%{_unitdir} \ +%else + --disable-uuidd \ + --without-systemd \ +%endif +%if %build_python_libmount + --with-python \ +%else + --without-python \ +%endif +# +make %{?_smp_mflags} +# +%if %build_util_linux +%{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29} +%{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31} +%endif + +%check +# mark some tests "known_fail" +%ifarch ppc ppc64 ppc64le s390 s390x +export TS_OPT_fdisk_bsd_known_fail="yes" +%endif +%ifarch %{ix86} +export TS_OPT_misc_setarch_known_fail="yes" +%endif +# +%ifarch armv7l armv7hl aarch64 +%if 0%{?suse_version} > 1310 +export TS_OPT_misc_setarch_known_fail="yes" +%endif +%endif +# +%ifarch armv6l armv6hl aarch64 +export TS_OPT_fdisk_gpt_known_fail="yes" +export TS_OPT_fdisk_oddinput_known_fail="yes" +export TS_OPT_fdisk_sunlabel_known_fail="yes" +export TS_OPT_misc_ionice_known_fail="yes" +export TS_OPT_misc_swaplabel_known_fail="yes" +export TS_OPT_kill_name_to_number_known_fail="yes" +export TS_OPT_kill_print_pid_known_fail="yes" +export TS_OPT_kill_queue_known_fail="yes" +%endif +%ifarch aarch64 s390 s390x +export TS_OPT_utmpdump_known_fail="yes" +%endif +# FIXME: These sometimes fails: +export TS_OPT_libmount_lock_known_fail="yes" +%ifarch x86_64 +# FIXME: Something is wrong here. This test never fails in SLE12: +export TS_OPT_ipcs_limits2_known_fail="yes" +%endif +# +# hacks +export PATH="$PATH:/sbin:/usr/sbin" +# +# do the check but don't abort yet +result="0" +make %{?_smp_mflags} check || result="1" +# +# always show test diffs (inclusive known_fail) and exit result +diffs_files="$(find tests/diff -type f | sort)" +echo "$diffs_files" | xargs -r cat +exit "$result" + +%install +%if %build_util_linux +mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} +install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf +install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login +install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote +%if %{with enable_su} +install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su +install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l +install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su +%endif +mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates +pushd ../klogconsole +# klogconsole install +make install DEST=%{buildroot} +popd +%endif +# +# util-linux install +# +%make_install +rm -f %{buildroot}%{python_sitearch}/libmount/*.*a +%if %build_util_linux +#UsrMerge +%if %{with enable_su} +ln -s %{_bindir}/kill %{buildroot}/bin +ln -s %{_bindir}/su %{buildroot}/bin +%endif +ln -s %{_bindir}/dmesg %{buildroot}/bin +ln -s %{_bindir}/more %{buildroot}/bin +ln -s %{_bindir}/mount %{buildroot}/bin +ln -s %{_bindir}/umount %{buildroot}/bin +ln -s %{_bindir}/findmnt %{buildroot}/bin +ln -s %{_bindir}/lsblk %{buildroot}/bin +ln -s %{_sbindir}/agetty %{buildroot}/sbin +ln -s %{_sbindir}/blockdev %{buildroot}/sbin +ln -s %{_sbindir}/cfdisk %{buildroot}/sbin +ln -s %{_sbindir}/ctrlaltdel %{buildroot}/sbin +ln -s %{_sbindir}/fdisk %{buildroot}/sbin +ln -s %{_sbindir}/fsck.minix %{buildroot}/sbin +ln -s %{_sbindir}/fsck.cramfs %{buildroot}/sbin +ln -s %{_sbindir}/hwclock %{buildroot}/sbin +ln -s %{_sbindir}/losetup %{buildroot}/sbin +ln -s %{_sbindir}/mkfs %{buildroot}/sbin +ln -s %{_sbindir}/mkfs.bfs %{buildroot}/sbin +ln -s %{_sbindir}/mkfs.minix %{buildroot}/sbin +ln -s %{_sbindir}/mkfs.cramfs %{buildroot}/sbin +ln -s %{_sbindir}/mkswap %{buildroot}/sbin +ln -s %{_sbindir}/nologin %{buildroot}/sbin +ln -s %{_sbindir}/pivot_root %{buildroot}/sbin +ln -s %{_sbindir}/raw %{buildroot}/sbin +ln -s %{_sbindir}/sfdisk %{buildroot}/sbin +ln -s %{_sbindir}/swapoff %{buildroot}/sbin +ln -s %{_sbindir}/swapon %{buildroot}/sbin +ln -s %{_sbindir}/blkid %{buildroot}/sbin +ln -s %{_sbindir}/findfs %{buildroot}/sbin +ln -s %{_sbindir}/fsck %{buildroot}/sbin +ln -s %{_sbindir}/switch_root %{buildroot}/sbin +ln -s %{_sbindir}/wipefs %{buildroot}/sbin +ln -s %{_sbindir}/fsfreeze %{buildroot}/sbin +ln -s %{_sbindir}/swaplabel %{buildroot}/sbin +ln -s %{_sbindir}/fstrim %{buildroot}/sbin +ln -s %{_sbindir}/chcpu %{buildroot}/sbin +#EndUsrMerge +install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/filesystems +%ifnarch ppc ppc64 +install -m 755 mkzimage_cmdline %{buildroot}%{_bindir} +install -m 644 %{S:28} %{buildroot}%{_mandir}/man8 +install -m 755 chrp-addnote %{buildroot}%{_bindir} +%endif +# setctsid install +install -m 755 setctsid %{buildroot}%{_sbindir} +install -m 444 setctsid.8 %{buildroot}%{_mandir}/man8/ +echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir}/flushb +chmod 755 %{buildroot}%{_sbindir}/flushb +# Install scripts to configure raw devices at boot time +install -m 644 $RPM_SOURCE_DIR%{_sysconfdir}.raw %{buildroot}%{_sysconfdir}/raw +install -m 755 $RPM_SOURCE_DIR/raw.init %{buildroot}%{_initddir}/raw +ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw +# upstream moved getopt examples from datadir to docdir but we keep +# the old location because we would need to fix the manpage first +mv %{buildroot}%{_docdir}/%{_name}/getopt %{buildroot}%{_datadir}/ +# Stupid hack so we don't have a tcsh dependency +chmod 644 %{buildroot}%{_datadir}/getopt/getopt*.tcsh +# Following files we don't want to package, so remove them +rm -f %{buildroot}%{_bindir}/pg +rm -f %{buildroot}%{_mandir}/man1/pg.1* +# Do not package these files to get rid of the perl dependency +rm -f %{buildroot}%{_bindir}/chkdupexe +rm -f %{buildroot}%{_mandir}/man1/chkdupexe.1 +# we use this tools from pwdutils +rm -f %{buildroot}%{_bindir}/{chfn,chsh,newgrp} +rm -f %{buildroot}%{_sbindir}/{vigr,vipw} +rm -f %{buildroot}%{_mandir}/man1/{chfn.1*,chsh.1*,newgrp.1*} +rm -f %{buildroot}%{_mandir}/man8/{vigr.8*,vipw.8*} +# login is always and only in /bin +mv %{buildroot}%{_bindir}/login %{buildroot}/bin/ +# arch dependent +%ifarch s390 s390x +rm -f %{buildroot}%{_sysconfdir}/fdprm +rm -f %{buildroot}%{_sbindir}/fdformat +rm -f %{buildroot}%{_sbindir}/hwclock +#UsrMerge +rm -f %{buildroot}/sbin/hwclock +#EndUsrMerge +rm -f %{buildroot}%{_sbindir}/klogconsole +rm -f %{buildroot}%{_bindir}/setterm +rm -f %{buildroot}%{_sbindir}/tunelp +rm -f %{buildroot}%{_mandir}/man8/fdformat.8* +rm -f %{buildroot}%{_mandir}/man8/hwclock.8* +rm -f %{buildroot}%{_mandir}/man8/klogconsole.8* +rm -f %{buildroot}%{_mandir}/man8/tunelp.8* +%endif +%ifarch ia64 %sparc m68k +rm -f %{buildroot}%{_mandir}/man8/cfdisk.8* +rm -f %{buildroot}%{_mandir}/man8/sfdisk.8* +rm -f %{buildroot}%{_sbindir}/cfdisk +#UsrMerge +rm -f %{buildroot}/sbin/cfdisk +#EndUsrMerge +rm -f %{buildroot}%{_sbindir}/sfdisk +#UsrMerge +rm -f %{buildroot}/sbin/sfdisk +#EndUsrMerge +%endif +%ifarch ia64 m68k +rm -f %{buildroot}%{_sbindir}/fdisk +#UsrMerge +rm -f %{buildroot}/sbin/fdisk +#EndUsrMerge +rm -f %{buildroot}%{_mandir}/man8/fdisk.8* +%endif +%find_lang %{name} %{name}.lang +# create list of setarch(8) symlinks +find %{buildroot}%{_bindir}/ -regextype posix-egrep -type l \ + -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)$" \ + -printf "%{_bindir}/%f\n" >> %{name}.files +find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ + -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)\.8.*" \ + -printf "%{_mandir}/man8/%f*\n" >> %{name}.files +%else +# install systemd files manually, don't use Makefile that expect build of utilities and its dependencies. +%endif +%if %build_util_linux_systemd +mkdir -p %{buildroot}%{_sysconfdir}/init.d +mkdir -p %{buildroot}/bin +mkdir -p %{buildroot}%{_sbindir} +mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid +mkdir -p %{buildroot}/run/uuidd +install -m 744 %{SOURCE50} %{buildroot}%{_initddir}/uuidd +ln -s %{_bindir}/logger %{buildroot}/bin +# clock.txt from uuidd is a ghost file +touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt +# rcuuidd helper +ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd +%if !%build_util_linux +%make_install +%endif +%endif +# link duplicate manpages and python bindings +%fdupes -s %{buildroot}%{_prefix} + +%if %build_util_linux +%post +%{fillup_and_insserv raw} +%set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount +%if %{with enable_su} +%set_permissions %{_bindir}/su +# Safely migrate PAM files from coreutils to util-linux +# (openSUSE 12.3->13.1, SLE11->SLE12) +# +# coreutils with su were upgraded (and su removed) before util-linux +# with su was installed (see the Conflicts above). If the admin edited +# the PAM file, the seemingly no more used modified file was saved as +# .rpmsave and the new clean file was installed. As we want +# "noreplace" upgrade, and the contents of the clean file contents has +# no changes, we should restore admin modification, and rename the +# clean file to .rpmnew, as it would happen if the file was not moved +# from one package to another. +for PAM_FILE in default/su pam.d/su pam.d/su-l ; do + if test -f %{_sysconfdir}/$PAM_FILE.rpmsave ; then + mv %{_sysconfdir}/$PAM_FILE %{_sysconfdir}/$PAM_FILE.rpmnew + mv %{_sysconfdir}/$PAM_FILE.rpmsave %{_sysconfdir}/$PAM_FILE + fi +done +%endif + +# mount option 'code=' is now called 'codepage=' so change fstab +if [ -f etc/fstab ]; then + sed -i 's:code=:codepage=:' etc/fstab +fi + +%postun +%install_info_delete --info-dir=%{_infodir} %{_infodir}/ipc.info.gz +%{insserv_cleanup} + +%verifyscript +%verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount +%if %{with enable_su} +%verify_permissions -e %{_bindir}/su +%endif + +%post -n libblkid1 -p /sbin/ldconfig + +%postun -n libblkid1 -p /sbin/ldconfig + +%post -n libmount1 -p /sbin/ldconfig + +%postun -n libmount1 -p /sbin/ldconfig + +%post -n libsmartcols1 -p /sbin/ldconfig + +%postun -n libsmartcols1 -p /sbin/ldconfig + +%post -n libuuid1 -p /sbin/ldconfig + +%postun -n libuuid1 -p /sbin/ldconfig + +%files lang -f %{name}.lang +%endif + +%if %build_util_linux_systemd +%pre -n uuidd +%{_sbindir}/groupadd -r uuidd 2>/dev/null || : +%{_sbindir}/useradd -r -g uuidd -c "User for uuidd" \ + -d /var/run/uuidd uuidd 2>/dev/null || : + +%preun -n uuidd +%{stop_on_removal uuidd} + +%post -n uuidd +%{fillup_and_insserv -n uuidd} +%set_permissions %{_sbindir}/uuidd + +%postun -n uuidd +%{restart_on_update uuidd} +%{insserv_cleanup} + +%verifyscript -n uuidd +%verify_permissions -e %{_sbindir}/uuidd +%endif + +%if %build_util_linux +%files -f %{name}.files +# Common files for all archs +%defattr(-,root,root) +# util-linux documentation files +%doc Documentation/blkid.txt +%doc Documentation/cal.txt +%doc Documentation/col.txt +%doc Documentation/deprecated.txt +%doc Documentation/fdisk.txt +%doc Documentation/getopt.txt +%doc Documentation/howto-debug.txt +%doc Documentation/hwclock.txt +%doc Documentation/modems-with-agetty.txt +%doc Documentation/mount.txt +%doc Documentation/pg.txt +%doc Documentation/sfdisk.txt +%config %attr(744,root,root) %{_sysconfdir}/init.d/raw +%config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw +%config(noreplace) %{_sysconfdir}/filesystems +%config(noreplace) %{_sysconfdir}/blkid.conf +%config(noreplace) %{_sysconfdir}/pam.d/login +%config(noreplace) %{_sysconfdir}/pam.d/remote +%if %{with enable_su} +%config(noreplace) %{_sysconfdir}/pam.d/su +%config(noreplace) %{_sysconfdir}/pam.d/su-l +%config(noreplace) %{_sysconfdir}/default/su +%endif +#UsrMerge +%if %{with enable_su} +/bin/kill +/bin/su +%endif +/bin/dmesg +/bin/more +/bin/mount +/bin/umount +/bin/findmnt +/bin/login +/bin/lsblk +/sbin/agetty +/sbin/blockdev +/sbin/ctrlaltdel +/sbin/fsck.minix +/sbin/fsck.cramfs +/sbin/losetup +/sbin/mkfs +/sbin/mkfs.bfs +/sbin/mkfs.minix +/sbin/mkfs.cramfs +/sbin/mkswap +/sbin/nologin +/sbin/pivot_root +/sbin/raw +/sbin/swapoff +/sbin/swapon +/sbin/blkid +/sbin/findfs +/sbin/fsck +/sbin/switch_root +/sbin/wipefs +/sbin/fsfreeze +/sbin/swaplabel +/sbin/fstrim +/sbin/chcpu +#EndUsrMerge +%if %{with enable_su} +%{_bindir}/kill +%{_bindir}/su +%endif +%if %{with enable_eject} +%if 0%{?suse_version} <= 1310 +%verify(not mode) %attr(4750,root,audio) %{_bindir}/eject +%else +%{_bindir}/eject +%endif +%endif +%{_bindir}/cal +%{_bindir}/chrt +%{_bindir}/col +%{_bindir}/colcrt +%{_bindir}/colrm +%{_bindir}/column +%{_bindir}/dmesg +%{_bindir}/fallocate +%{_bindir}/findmnt +%{_bindir}/flock +%{_bindir}/getopt +%{_bindir}/hexdump +%{_bindir}/ionice +%{_bindir}/ipcmk +%{_bindir}/ipcrm +%{_bindir}/ipcs +%{_bindir}/isosize +%if %{with enable_last} +%{_bindir}/last +%{_bindir}/lastb +%endif +%{_bindir}/line +%{_bindir}/look +%{_bindir}/lsblk +%{_bindir}/lscpu +%{_bindir}/lslocks +%{_bindir}/mcookie +%{_bindir}/mesg +%{_bindir}/more +%{_bindir}/mount +%{_bindir}/namei +%{_bindir}/nsenter +%{_bindir}/prlimit +%{_bindir}/rename +%{_bindir}/renice +%{_bindir}/rev +%{_bindir}/script +%{_bindir}/scriptreplay +%{_bindir}/setarch +%{_bindir}/setpriv +%{_bindir}/setsid +%{_bindir}/tailf +%{_bindir}/taskset +%{_bindir}/ul +%{_bindir}/umount +%{_bindir}/unshare +%if %{with sysvinit_tools} +%{_bindir}/mountpoint +%{_bindir}/utmpdump +%endif +%{_bindir}/uuidgen +%{_bindir}/uname26 +%ifnarch ppc ppc64 +%{_bindir}/chrp-addnote +%{_bindir}/mkzimage_cmdline +%endif +%{_bindir}/wdctl +%{_sbindir}/addpart +%{_sbindir}/agetty +%{_sbindir}/blkid +%{_sbindir}/blkdiscard +%{_sbindir}/blockdev +%{_sbindir}/chcpu +%{_sbindir}/ctrlaltdel +%{_sbindir}/delpart +%{_sbindir}/findfs +%{_sbindir}/fsck +%{_sbindir}/fsck.minix +%{_sbindir}/fsck.cramfs +%{_sbindir}/fsfreeze +%{_sbindir}/fstrim +%{_sbindir}/ldattach +%{_sbindir}/losetup +%{_sbindir}/mkfs +%{_sbindir}/mkfs.bfs +%{_sbindir}/mkfs.minix +%{_sbindir}/mkfs.cramfs +%{_sbindir}/mkswap +%{_sbindir}/nologin +%{_sbindir}/partx +%{_sbindir}/pivot_root +%{_sbindir}/raw +%{_sbindir}/rcraw +%{_sbindir}/resizepart +%{_sbindir}/rtcwake +%{_sbindir}/runuser +%{_sbindir}/setctsid +%if %{with sysvinit_tools} +%{_sbindir}/sulogin +%endif +%{_sbindir}/swaplabel +%{_sbindir}/swapoff +%{_sbindir}/swapon +%{_sbindir}/switch_root +%{_sbindir}/wipefs +%verify(not mode) %attr(0755,root,tty) %{_bindir}/wall +%{_bindir}/whereis +%verify(not mode) %attr(0755,root,tty) %{_bindir}/write +%if %{with enable_su} +%{_mandir}/man1/kill.1.gz +%{_mandir}/man1/su.1.gz +%endif +%{_mandir}/man1/cal.1.gz +%{_mandir}/man1/chrt.1.gz +%{_mandir}/man1/col.1.gz +%{_mandir}/man1/colcrt.1.gz +%{_mandir}/man1/colrm.1.gz +%{_mandir}/man1/column.1.gz +%{_mandir}/man1/dmesg.1.gz +%if %{with enable_eject} +%{_mandir}/man1/eject.1.gz +%endif +%{_mandir}/man1/fallocate.1.gz +%{_mandir}/man1/flock.1.gz +%{_mandir}/man1/getopt.1.gz +%{_mandir}/man1/hexdump.1.gz +%{_mandir}/man1/ipcrm.1.gz +%{_mandir}/man1/ipcs.1.gz +%if %{with enable_last} +%{_mandir}/man1/last.1.gz +%{_mandir}/man1/lastb.1.gz +%endif +%{_mandir}/man1/line.1.gz +%{_mandir}/man1/login.1.gz +%{_mandir}/man1/look.1.gz +%{_mandir}/man1/lscpu.1.gz +%{_mandir}/man1/mcookie.1.gz +%{_mandir}/man1/mesg.1.gz +%{_mandir}/man1/more.1.gz +%{_mandir}/man1/namei.1.gz +%{_mandir}/man1/nsenter.1.gz +%{_mandir}/man1/ionice.1.gz +%{_mandir}/man1/prlimit.1.gz +%{_mandir}/man1/rename.1.gz +%{_mandir}/man1/rev.1.gz +%{_mandir}/man1/renice.1.gz +%{_mandir}/man1/setpriv.1.gz +%{_mandir}/man1/setsid.1.gz +%{_mandir}/man1/script.1.gz +%{_mandir}/man1/scriptreplay.1.gz +%{_mandir}/man1/setterm.1.gz +%{_mandir}/man1/tailf.1.gz +%{_mandir}/man1/taskset.1.gz +%{_mandir}/man1/ul.1.gz +%{_mandir}/man1/unshare.1.gz +%{_mandir}/man1/wall.1.gz +%{_mandir}/man1/whereis.1.gz +%{_mandir}/man1/write.1.gz +%{_mandir}/man1/ipcmk.1.gz +%if %{with sysvinit_tools} +%{_mandir}/man1/mountpoint.1.gz +%{_mandir}/man1/utmpdump.1.gz +%endif +%{_mandir}/man1/runuser.1.gz +%{_mandir}/man1/uuidgen.1.gz +%{_mandir}/man5/fstab.5.gz +%{_mandir}/man5/terminal-colors.d.5.gz +%{_mandir}/man8/addpart.8.gz +%{_mandir}/man8/agetty.8.gz +%{_mandir}/man8/blockdev.8.gz +%{_mandir}/man8/delpart.8.gz +%{_mandir}/man8/ctrlaltdel.8.gz +%{_mandir}/man8/blkid.8.gz +%{_mandir}/man8/blkdiscard.8.gz +%{_mandir}/man8/switch_root.8.gz +%{_mandir}/man8/mkfs.bfs.8.gz +%{_mandir}/man8/mkfs.minix.8.gz +%{_mandir}/man8/findfs.8.gz +%{_mandir}/man8/fsck.8.gz +%{_mandir}/man8/fsck.cramfs.8.gz +%{_mandir}/man8/fsck.minix.8.gz +%{_mandir}/man8/isosize.8.gz +%{_mandir}/man8/ldattach.8.gz +%{_mandir}/man8/losetup.8.gz +%{_mandir}/man8/lslocks.8.gz +%{_mandir}/man8/mkfs.8.gz +%{_mandir}/man8/mkfs.cramfs.8.gz +%{_mandir}/man8/mkswap.8.gz +%{_mandir}/man8/mount.8.gz +%{_mandir}/man8/nologin.8.gz +%{_mandir}/man8/findmnt.8.gz +%{_mandir}/man8/fsfreeze.8.gz +%{_mandir}/man8/swaplabel.8.gz +%{_mandir}/man8/readprofile.8.gz +%{_mandir}/man8/chcpu.8.gz +%ifnarch ppc ppc64 +%{_mandir}/man8/mkzimage_cmdline.8.gz +%endif +%{_mandir}/man8/partx.8.gz +%{_mandir}/man8/pivot_root.8.gz +%{_mandir}/man8/raw.8.gz +%{_mandir}/man8/rtcwake.8.gz +%{_mandir}/man8/setarch.8.gz +%{_mandir}/man8/swapoff.8.gz +%{_mandir}/man8/swapon.8.gz +%{_mandir}/man8/umount.8.gz +%{_mandir}/man8/uname26.8.gz +%{_mandir}/man8/setctsid.8.gz +%{_mandir}/man8/wipefs.8.gz +%{_mandir}/man8/fstrim.8.gz +%{_mandir}/man8/lsblk.8.gz +%{_mandir}/man8/resizepart.8.gz +%if %{with sysvinit_tools} +%{_mandir}/man8/sulogin.8.gz +%endif +%{_mandir}/man8/wdctl.8.gz +%{_sbindir}/flushb +%{_sbindir}/readprofile +%dir %{_datadir}/getopt +%attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash +%attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh +# FIXME: Fix directory ownership. +%dir %{_datadir}/bash-completion +%{_datadir}/bash-completion/* +%if %build_util_linux_systemd +%exclude %{_datadir}/bash-completion/logger +%exclude %{_datadir}/bash-completion/uuidd +%endif +%ifnarch ia64 m68k +#XXX: post our patches upstream +#XXX: call fdupes on /usr/share/man +#UsrMerge +/sbin/fdisk +#EndUsrMerge +%{_sbindir}/fdisk +%{_mandir}/man8/fdisk.8.gz +%endif +%ifnarch %sparc ia64 m68k +%{_mandir}/man8/cfdisk.8.gz +%{_mandir}/man8/sfdisk.8.gz +#UsrMerge +/sbin/cfdisk +/sbin/sfdisk +#EndUsrMerge +%{_sbindir}/cfdisk +%{_sbindir}/sfdisk +%endif +%ifnarch s390 s390x +%{_sbindir}/fdformat +#UsrMerge +/sbin/hwclock +#EndUsrMerge +%{_sbindir}/hwclock +%{_sbindir}/klogconsole +%{_bindir}/setterm +%{_sbindir}/tunelp +%{_mandir}/man8/fdformat.8.gz +%{_mandir}/man8/hwclock.8.gz +%{_mandir}/man8/klogconsole.8.gz +%{_mandir}/man8/tunelp.8.gz +%endif + +%files -n libblkid1 +%defattr(-, root, root) +%{_libdir}/libblkid.so.1 +%{_libdir}/libblkid.so.1.* + +%files -n libblkid-devel +%defattr(-, root, root) +%{_libdir}/libblkid.so +%dir %{_includedir}/blkid +%{_includedir}/blkid/blkid.h +%{_libdir}/pkgconfig/blkid.pc +%{_mandir}/man3/libblkid.3.gz + +%files -n libblkid-devel-static +%defattr(-, root, root) +%{_libdir}/libblkid.*a + +%files -n libmount1 +%defattr(-, root, root) +%{_libdir}/libmount.so.1 +%{_libdir}/libmount.so.1.* + +%files -n libmount-devel +%defattr(-, root, root) +%{_libdir}/libmount.so +%dir %{_includedir}/libmount +%{_includedir}/libmount/libmount.h +%{_libdir}/pkgconfig/mount.pc + +%files -n libmount-devel-static +%defattr(-, root, root) +%{_libdir}/libmount.*a + +%files -n libsmartcols1 +%defattr(-, root, root) +%{_libdir}/libsmartcols.so.1 +%{_libdir}/libsmartcols.so.1.* + +%files -n libsmartcols-devel +%defattr(-, root, root) +%{_libdir}/libsmartcols.so +%dir %{_includedir}/libsmartcols +%{_includedir}/libsmartcols/libsmartcols.h +%{_libdir}/pkgconfig/smartcols.pc + +%files -n libsmartcols-devel-static +%defattr(-, root, root) +%{_libdir}/libsmartcols.*a + +%files -n libuuid1 +%defattr(-, root, root) +%{_libdir}/libuuid.so.1 +%{_libdir}/libuuid.so.1.* + +%files -n libuuid-devel +%defattr(-, root, root) +%{_libdir}/libuuid.so +%dir %{_includedir}/uuid +%{_includedir}/uuid/uuid.h +%{_libdir}/pkgconfig/uuid.pc +%{_mandir}/man3/uuid* + +%files -n libuuid-devel-static +%defattr(-, root, root) +%{_libdir}/libuuid.*a +%endif + +%if %build_util_linux_systemd +%if %build_util_linux +%files systemd +%else +%files +%endif +%defattr(-, root, root) +/bin/logger +%{_bindir}/logger +%{_bindir}/lslogins +%{_datadir}/bash-completion/logger +%{_mandir}/man1/logger.1.gz +%{_mandir}/man1/lslogins.1.gz +%{_unitdir}/fstrim.service +%{_unitdir}/fstrim.timer + +%files -n uuidd +%defattr(-, root, root) +%verify(not mode) %attr(0755,root,root) %{_sbindir}/uuidd +%attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid +%ghost %{_localstatedir}/lib/libuuid/clock.txt +%attr(-,uuidd,uuidd) %ghost %dir /run/uuidd +%{_datadir}/bash-completion/uuidd +%{_initddir}/uuidd +%{_mandir}/man8/uuidd.8.gz +%{_sbindir}/rcuuidd +%{_unitdir}/uuidd.service +%{_unitdir}/uuidd.socket +%endif + +%if %build_python_libmount +%if %build_util_linux +%files -n python-libmount +%else +%files +%endif +%defattr(-, root, root) +%{python_sitearch}/libmount +%endif + +%changelog diff --git a/util-linux.changes b/util-linux.changes index 2936f09..2eaed7c 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,61 @@ +------------------------------------------------------------------- +Fri Aug 8 22:17:29 CEST 2014 - sbrabec@suse.cz + +- Update to version 2.25 + (using work of Ruediger Meier ): + * based on the git master branch of util-linux + * many fixes (including bnc#869355, bnc#871951 and + bnc#871698#c49) + * new Python binding sub-package for libmount: python-libmount + * new library: libsmartcols + * new commands: lslogins, setpriv + * add fstrim systemd timer + * better systemd integration + * DROPPED command: + * cytune: Upstream decided to remove tool untested for years + that supports this old hardware. +- Dropped patches included in the upstream: + (*git) Included with no changes + (+git) Included with improvements + (!git) Included with differences + * support-other-tty-lines-not-vconsole.patch (*b9c7390) + * agetty-fooled-on-serial-line-due-plymouth.patch, + * sulogin-fooled-on-tty-line-due-plymouth.patch (*bb280f7) + * agetty-on-s390-on-dev-3270-tty1-line.patch (*f2bcda5) + * sulogin-does-not-find-any-console.patch (*624b204) + * util-linux-setarch-uname26.patch (*f6eb160) + * util-linux-ng-2.16-squashfs3-detect.patch (*11402f5) + * util-linux-lscpu-improve-hypervisor-detection.patch + (!b774473, b32488c, 5bd31c6, 0f0c558, 96ce475) + WARNING, INCOMPATIBLE CHANGE: "lscpu -p" no more reports + hypervisor, as it breaks standard behavior. Use standard output + instead! (FATE#310255) + * blkid-stop-scanning-on-I-O-error.patch (+296d96e) + * blkid-convert-superblocks-to-new-calling-convention.patch + (+37f4060) + * util-linux-libblkid-ext-probe.patch (*a1ca32f) + * util-linux-hwclock-drift-check.patch (*f196fd1) + * util-linux-hwclock-adjtime-check.patch (*db8fc5f) +- Dropped obsolete patch: + * util-linux-2.23.1-eject-fpie.patch (eject is no more SUID) + * util-linux-2.24-fdisk_remove_bogus_warnings.patch + (upstream fixed it in a different way) + * util-linux-HACK-boot.localfs.diff + (MOUNT_PRINT_SOURCE is no more referenced) +- Ported and renamed: + * util-linux-2.23.1-noenc-suse.diff + -> util-linux-noenc-suse.patch +- Split spec file to three stages: + * util-linux.spec: Everything that do not need python or systemd. + * util-linux-systemd.spec: Stuff that needs systemd: + util-linux-systemd and uuidd + NOTE: Not building systemd-less variants of utilities. + * python-libmount.spec: Just python-libmount +- Move bash-completion files to correct packages. +- Add patch util-linux-bash-completion-blockdev.patch. +- Add hacks to prevent damaging of spec files by format_spec_file + (bnc#891152, also edited util-linux-rpmlintrc). + ------------------------------------------------------------------- Sat Jul 26 11:44:57 UTC 2014 - dimstar@opensuse.org @@ -17,7 +75,7 @@ Thu Jul 24 18:45:53 CEST 2014 - dsterba@suse.cz ------------------------------------------------------------------- Tue May 27 21:17:40 UTC 2014 - sweet_f_a@gmx.de -- use nologin from upstream (was added in 2.24) +- use nologin from upstream (was added in 2.24) - remove unknown configure options - remove unused and outdated suse READMEs - require bc for checks diff --git a/util-linux.preamble b/util-linux.preamble new file mode 100644 index 0000000..4360fb4 --- /dev/null +++ b/util-linux.preamble @@ -0,0 +1 @@ +License: GPL-2.0+ diff --git a/util-linux.python-libmount b/util-linux.python-libmount new file mode 100644 index 0000000..495db08 --- /dev/null +++ b/util-linux.python-libmount @@ -0,0 +1,2 @@ +Summary: Python bindings for the libmount library +Group: System/Filesystems diff --git a/util-linux.spec b/util-linux.spec index d42cffa..da3f510 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -17,23 +17,53 @@ %bcond_without sysvinit_tools -%bcond_without enable_su -%bcond_without enable_eject +%bcond_without enable_su +%bcond_without enable_eject %bcond_with enable_last Name: util-linux +%define _name util-linux +# WARNING: After editing this file please call pre_checkin.sh to update spec files: +%define _name util-linux +# To prevent dependency loop in automatic build systems, we want to +# build util-linux in parts. To build all at once, set build_all to 1. +# +# build_util_linux: First stage build builds all except: +# build_util_linux_systemd: Builds util-linux-systemd and uuidd. +# build_python_libmount: Builds python-libmount. +%define build_all 0 +%if "%{name}" == "python-libmount" +%define build_util_linux 0 +%define build_util_linux_systemd 0 +%define build_python_libmount 1 +# To prevent dependency loops, verify signature only in third stage. +%define verify_sig 1 +%else +%if "%{name}" == "util-linux-systemd" +%define build_util_linux 0 +%define build_util_linux_systemd 1 +%define build_python_libmount 0 +%define verify_sig 0 +%else +%if %build_all +%define build_util_linux 1 +%define build_util_linux_systemd 1 +%define build_python_libmount 1 +%define verify_sig 1 +%else +%define build_util_linux 1 +%define build_util_linux_systemd 0 +%define build_python_libmount 0 +%define verify_sig 0 +%endif +%endif +%endif BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel BuildRequires: fdupes BuildRequires: gettext-devel -# Use rpmbuild -D 'VERIFY_SIG 1' to verify signature during build or run -# one-shot check by -# xzcat util-linux-*.tar.xz | \ -# sh -x gpg-offline --verify --package=util-linux *.tar.sign - -%if 0%{?VERIFY_SIG} -BuildRequires: gpg-offline -%endif +BuildRequires: libcap-ng-devel BuildRequires: libselinux-devel BuildRequires: libsepol-devel BuildRequires: libtool @@ -41,14 +71,37 @@ BuildRequires: ncurses-devel BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel +BuildRequires: utempter-devel +BuildRequires: zlib-devel +%if %verify_sig +BuildRequires: gpg-offline +%endif +%if %build_util_linux_systemd %if 0%{?suse_version} <= 1230 BuildRequires: pkgconfig(systemd) %else BuildRequires: systemd-rpm-macros +BuildRequires: pkgconfig(libsystemd-daemon) +BuildRequires: pkgconfig(libsystemd-journal) %endif -BuildRequires: utempter-devel -BuildRequires: zlib-devel -Version: 2.24.2 +%endif +%if %build_python_libmount +BuildRequires: python-devel +%endif +#BEGIN SECOND STAGE DEPENDENCIES +%if !%build_util_linux +%if %build_util_linux_systemd +BuildRequires: libblkid-devel +BuildRequires: libmount-devel +BuildRequires: libsmartcols-devel +BuildRequires: libuuid-devel +%endif +%if %build_python_libmount +BuildRequires: libmount-devel +%endif +%endif +#END SECOND STAGE DEPENDENCIES +Version: 2.25 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -57,16 +110,17 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Supplements: filesystem(minix) -Provides: fsck-with-dev-lock = %{version} -# bnc#651598: -Provides: util-linux(fake+no-canonicalize) -PreReq: %install_info_prereq permissions -Recommends: %{name}-lang = %{version} -Summary: A collection of basic system utilities +#BEGIN UGLY HACK +%if 0 +# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) +Summary: TRAP License: GPL-2.0+ Group: System/Base -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/%{name}-%{version}.tar.xz +%endif +# UGLY HACK: License tag is errorneously moved here on every call of format_spec_file. %%include cannot be broken by format_spec_file. +%include %{_sourcedir}/util-linux.preamble +#END UGLY HACK +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -76,8 +130,8 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/%{name}-%{version}.tar.sign -Source13: %{name}.keyring +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.sign +Source13: %{_name}.keyring # TODO: split to separate package Source40: klogconsole.tar.bz2 # XXX: Run a program in a new session and with controlling tty @@ -90,52 +144,43 @@ Source31: addnote.c # Source50: uuidd.rc Source51: blkid.conf +# detachec parts of spec file +Source100: util-linux.preamble +Source101: util-linux.util-linux +Source102: util-linux.python-libmount ## ## util-linux patches ## -# 241372 - remove legacy warnings from fdisk -Patch1: util-linux-2.24-fdisk_remove_bogus_warnings.patch -Patch2: util-linux-2.23.1-eject-fpie.patch # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff -# disable encryption -Patch12: util-linux-2.23.1-noenc-suse.diff -# PATCH-FIX-SUSE Be aware that there are e.g. xvc/hvc -Patch14: support-other-tty-lines-not-vconsole.patch -# PATCH-FIX-SUSE -- Let agetty not be fooled by locked termios srtucture -Patch15: agetty-fooled-on-serial-line-due-plymouth.patch -# PATCH-FIX-SUSE -- Let agetty detect /dev/3270/tty1 as device not as baud rate -Patch16: agetty-on-s390-on-dev-3270-tty1-line.patch -# PATCH-FIX-SUSE -- Make sure that plymouth does not break sulogin -Patch17: sulogin-fooled-on-tty-line-due-plymouth.patch -# PATCH-FIX-SUSE -- sulogin: find suitable console device even if first is not usable -Patch18: sulogin-does-not-find-any-console.patch -# PATCH-FEATURE-SLES util-linux-setarch-uname26.patch fate313476 sbrabec@suse.cz -- Support for uname26 binary. -Patch19: util-linux-setarch-uname26.patch -# hack for boot.localfs -Patch20: util-linux-HACK-boot.localfs.diff -# PATCH-FEATURE-SLES util-linux-ng-2.16-squashfs3-detect.patch bnc666893 mszeredi@suse.cz -- Detect squashfs version <= 3 as squashfs3 and version >= 4 as squashfs. -Patch21: util-linux-ng-2.16-squashfs3-detect.patch -# PATCH-FEATURE-SLES util-linux-lscpu-improve-hypervisor-detection.patch fate310255 puzel@novell.com -- Improve hypervisor detection. -Patch24: util-linux-lscpu-improve-hypervisor-detection.patch -# PATH-FIX-SLES blkid-stop-scanning-on-I-O-error.patch bnc859062 hare@suse.de -- Abort blkid probing on I/O errors -Patch30: blkid-stop-scanning-on-I-O-error.patch -# PATH-FIX-SLES lkid-convert-superblocks-to-new-calling-convention.patch bnc859062 hare@suse.de -- convert blkid probing functions to new calling sequence -Patch31: blkid-convert-superblocks-to-new-calling-convention.patch -# PATH-FIX-UPSTREAM util-linux-libblkid-ext-probe.patch bnc864703 sbrabec@suse.cz -- libblkid: Drop the broken ext2/ext3/ext4 discrimination logic. -Patch32: util-linux-libblkid-ext-probe.patch -# PATCH-FIX-UPSTREAM bnc871698 sbrabec@suse.cz -Patch33: util-linux-prevent-excessive-clock-drift-calculations.patch - +# PATCH-FEATURE-SUSE -- Report about disabled encryption to stderr. +Patch12: util-linux-noenc-suse.patch +# PATCH-FIX-UPSTREAM util-linux-bash-completion-blockdev.patch sbrabec@suse.cz -- Fix bash-completion installation. +Patch13: util-linux-bash-completion-blockdev.patch ## ## klogconsole ## Patch55: klogconsole-quiet.patch Patch56: klogconsole.diff - BuildRoot: %{_tmppath}/%{name}-%{version}-build -PreReq: %insserv_prereq %fillup_prereq /bin/sed # +%if %build_util_linux +Supplements: filesystem(minix) +Provides: fsck-with-dev-lock = %{version} +# bnc#651598: +Provides: util-linux(fake+no-canonicalize) +PreReq: %install_info_prereq permissions +PreReq: %insserv_prereq %fillup_prereq /bin/sed +Recommends: %{name}-lang = %{version} +#BEGIN UGLY HACK +%if 0 +# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) +Summary: TRAP +Group: System/Base +%endif +# UGLY HACK: Group tag is updated to bad value on every call of format_spec_file. %%include cannot be broken by format_spec_file. +%include %{_sourcedir}/util-linux.util-linux +#END UGLY HACK %if %{with enable_eject} Provides: eject = 2.1.0-166.8 %endif @@ -170,7 +215,37 @@ Obsoletes: uuid-runtime < %{version}-%{release} Recommends: adjtimex Recommends: time Recommends: which +%else +# Exact copy of headers below is needed for spec cleaner that does not support +# if condition across preamble and subsequent sections. +%if %build_python_libmount +# Exact copy of the %%package tag from python-libmount section below: +#BEGIN UGLY HACK +%if 0 +# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) +Summary: TRAP +Group: System/Base +%endif +# UGLY HACK: Group tag is updated to bad value on every call of format_spec_file. %%include cannot be broken by format_spec_file. +%include %{_sourcedir}/util-linux.python-libmount +#END UGLY HACK +%else +%if %build_util_linux_systemd +# Exact copy of the %%package tag from systemd section below: +Summary: A collection of basic systemd utilities +Group: System/Base +Supplements: packageand(util-linux:systemd) +# Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 +Provides: util-linux:/usr/lib/systemd/system/fstrim.service +# Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 +Conflicts: util-linux < 2.25 +%else +# ERROR: No build_* variables are set. +%endif +%endif +%endif +%if %build_util_linux %description This package contains a large variety of low-level system utilities that are necessary for a Linux system to function. It contains the @@ -201,19 +276,6 @@ Requires: libblkid-devel = %{version} Files needed to develop applications using the library for filesystem detection. -%package -n uuidd -Summary: Helper daemon to guarantee uniqueness of time-based UUIDs -Group: System/Filesystems -PreReq: %fillup_prereq -PreReq: %insserv_prereq -PreReq: permissions -PreReq: pwdutils - -%description -n uuidd -The uuidd package contains a userspace daemon (uuidd) which guarantees -uniqueness of time-based UUID generation even at very high rates on -SMP systems. - %package -n libuuid1 Summary: Library to generate UUIDs Group: System/Filesystems @@ -252,9 +314,6 @@ Summary: Development files for libmount1 Group: Development/Libraries/C and C++ Requires: libmount1 = %{version} -%description -n libmount-devel -Files to develop applications using the libmount library. - %package -n libmount-devel-static Summary: Development files for libmount1 Group: Development/Libraries/C and C++ @@ -263,31 +322,91 @@ Requires: libmount-devel = %{version} %description -n libmount-devel-static Files to develop applications using the libmount library. +%description -n libmount-devel +Files to develop applications using the libmount library. + +%package -n libsmartcols1 +Summary: Column-based text sort engine +Group: System/Libraries + +%description -n libsmartcols1 +Library to sort human readable column-based text output. + +%package -n libsmartcols-devel +Summary: Development files for libsmartcols1 +Group: Development/Libraries/C and C++ +Requires: libsmartcols1 = %{version} + +%description -n libsmartcols-devel +Files to develop applications using the libsmartcols library. + +%package -n libsmartcols-devel-static +Summary: Development files for libsmartcols1 +Group: Development/Libraries/C and C++ +Requires: libsmartcols-devel = %{version} + +%description -n libsmartcols-devel-static +Files to develop applications using the libsmartcols library. + %lang_package -%prep -%if 0%{?VERIFY_SIG} -xzcat %{S:0} | %gpg_verify %{S:12} - %endif -%setup -q -n %{name}-%{version} -b 40 -%patch1 -p1 -%patch2 -p1 +%if %build_util_linux_systemd +%if %build_util_linux +%package systemd +# Do not forget to copy duplicate of this section to the preamble: +Summary: A collection of basic systemd utilities +Group: System/Base +Supplements: packageand(util-linux:systemd) +# Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 +Provides: util-linux:/usr/lib/systemd/system/fstrim.service +# Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 +Conflicts: util-linux < 2.25 + +%description systemd +%else +%description +%endif +This package contains low-level util-linux utilities that use systemd. + +%package -n uuidd +Summary: Helper daemon to guarantee uniqueness of time-based UUIDs +Group: System/Filesystems +PreReq: %fillup_prereq +PreReq: %insserv_prereq +PreReq: permissions +PreReq: pwdutils +# uuidd bash-completion moved to a correct package +Conflicts: util-linux < 2.25 + +%description -n uuidd +The uuidd package contains a userspace daemon (uuidd) which guarantees +uniqueness of time-based UUID generation even at very high rates on +SMP systems. + +%endif +%if %build_python_libmount +%if %build_util_linux +%package -n python-libmount +# Do not forget to copy duplicate of this section to the preamble: +Summary: Python bindings for the libmount library +Group: System/Filesystems + +%description -n python-libmount +%else +%description +%endif +This package contains the python bindings for util-linux libmount +library. + +%endif +%prep +%if %verify_sig +xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - +%endif +%setup -q -n %{_name}-%{version} -b 40 %patch4 -p1 %patch12 -p1 -%patch14 -p0 -%patch15 -p0 -%patch16 -p0 -%patch17 -p0 -%patch18 -p0 -%patch19 -p1 -# -%patch20 -p1 -# -%patch21 -p1 -%patch24 -p1 -%patch30 -p1 -%patch31 -p1 -%patch32 -p1 -%patch33 -p1 +%patch13 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -298,6 +417,7 @@ pushd ../klogconsole popd %build +%if %build_util_linux pushd ../klogconsole # klogconsole build make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" @@ -306,6 +426,112 @@ popd rm -f setctsid make %{?_smp_mflags} setctsid CFLAGS="%{optflags}" CC="%{__cc}" # +#BEGIN SYSTEMD SAFETY CHECK +# With systemd, some utilities are built differently. Keep track of these +# sources to prevent building of systemd-less versions. +# +# WARNING: Never edit following line without doing all suggested in the echo below! +UTIL_LINUX_KNOWN_SYSTEMD_DEPS='./login-utils/lslogins.c ./misc-utils/logger.c ./misc-utils/uuidd.c ' +UTIL_LINUX_FOUND_SYSTEMD_DEPS=$(grep -rl 'HAVE_LIBSYSTEMD' . | fgrep '.c' | LC_ALL=C sort | tr '\n' ' ') +if test "$UTIL_LINUX_KNOWN_SYSTEMD_DEPS" != "$UTIL_LINUX_FOUND_SYSTEMD_DEPS" ; then + echo "List of utilities depending on systemd have changed. +Please check the new util-linux-systemd file list, file removal and update of Conflicts for safe update! +Then update configure options to build what needed. +Only then you can safely update following spec file line: +UTIL_LINUX_KNOWN_SYSTEMD_DEPS='$UTIL_LINUX_FOUND_SYSTEMD_DEPS'" + exit 1 +fi +#END SYSTEMD SAFETY CHECK +#BEGIN FIRST STAGE MODIFICATIONS +%if !%build_util_linux_systemd +sed -i 's/BUILD_LSLOGINS/FALSE/ + s/BUILD_LOGGER/FALSE/ + ' misc-utils/Makemodule.am login-utils/Makemodule.am bash-completion/Makemodule.am +autoreconf -f -i +%endif +#END FIRST STAGE MODIFICATIONS +%else +#BEGIN SECOND STAGE MODIFICATIONS +# delete all make modules except wanted ones +sed -i '/^include/{ +%if %build_python_libmount + /libmount\/Makemodule.am/b 1 +%endif +%if %build_util_linux_systemd +# for lslogins + /login-utils/b 1 +# for logger and uuidd + /misc-utils/b 1 +# for fstrim.service and fstrim.timer + /sys-utils/b 1 +# for uninstalled libcommon required by uuidd + / lib\//b 1 +# for bash completions + /bash-completion/b 1 +# we always want tests (they are smart enough to skip irrelevant parts) + /tests/b 1 +%endif +%if %build_python_libmount + /libmount\/python/b 1 +%endif + d + :1 + }' Makefile.am libmount/Makemodule.am +%if %build_python_libmount +# trick: we do not want to build libmount, but include subdirs +# We close prefious if FALSE and open new pairing with endif +sed -i '/^if BUILD_LIBMOUNT/d +/^if ENABLE_GTK_DOC/i \ +if BUILD_LIBMOUNT +' libmount/Makemodule.am +# Do not install terminal-colors.d.5 +sed -i '/dist_man_MANS/d' lib/Makemodule.am +%endif +# disable all make modules except wanted ones +sed -i '/^if BUILD_/{ +%if %build_util_linux_systemd + /LSLOGINS/b 1 + /LOGGER/b 1 + /UUIDD/b 1 + /BASH_COMPLETION/b 1 +%endif + s/BUILD_.*/FALSE/ + :1 + } + ' libmount/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am sys-utils/Makemodule.am bash-completion/Makemodule.am +%if %build_util_linux_systemd +# trick: we do not want to build fstrim, but we want to install fstrim systemd connectors +# We close prefious if FALSE and open new pairing with endif +sed -i '/^if HAVE_SYSTEMD/i \ +endif\ +if TRUE +' sys-utils/Makemodule.am +# Do not install terminal-colors.d.5 +sed -i '/dist_man_MANS/d' lib/Makemodule.am +%endif +# Use installed first stage libraries +sed -i ' +# extra space to not replace pylibmount.la + s/ libmount\.la/ -lmount/g + s/libuuid\.la/-luuid/g + s/libblkid\.la/-lblkid/g + s/libsmartcols\.la/-lsmartcols/g + ' libmount/python/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am +# Ignore dependencies on optional (and not built in second stage) libraries +sed -i ' + /AM_GNU_GETTEXT/d + s/UL_REQUIRES_BUILD(\[.*\], \[libuuid\])/dnl &/ + s/UL_REQUIRES_BUILD(\[.*\], \[libsmartcols\])/dnl &/ + ' configure.ac +sed -i ' + /SUBDIRS =/s/ po// + ' Makefile.am +autoreconf -f -i +#END SECOND STAGE MODIFICATIONS +%endif +# +# util-linux itself +# # Version check for libutempter # uhead=$(find %_includedir -name utempter.h 2>/dev/null) @@ -315,78 +541,115 @@ then else uhead=--without-utempter fi -# -# util-linux itself -# -autoreconf -fi export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" # override default localstatedir to /run # only used for volatile data +# +# SUSE now supports only systemd based system. We do not build +# sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities. %configure \ --localstatedir=/run \ - --docdir=%{_docdir}/%{name} \ + --docdir=%{_docdir}/%{_name} \ --with-audit \ --with-gnu-ld \ --with-ncurses \ --with-selinux \ $uhead \ - --with-systemdsystemunitdir=%_unitdir \ --with-bashcompletiondir=%{_datadir}/bash-completion \ - --enable-mesg \ - --enable-partx \ - --enable-raw \ - --enable-write \ - --enable-line \ - --enable-tunelp \ - --enable-socket-activation \ -%if %{with enable_last} - --enable-last \ -%else + --enable-all-programs \ + --disable-reset \ + --disable-use-tty-group \ + --disable-silent-rules \ + --enable-static \ + --disable-rpath \ +%if %{without enable_last} --disable-last \ %endif -%if %{with enable_eject} - --enable-eject \ -%else +%if %{without enable_eject} --disable-eject \ %endif %if %{with sysvinit_tools} - --enable-sulogin \ --enable-sulogin-emergency-mount \ - --enable-mountpoint \ %else --disable-sulogin \ --disable-mountpoint \ %endif -%if %{with enable_su} - --enable-kill \ - --enable-su \ -%else +%if %{without enable_su} --disable-su \ --disable-kill \ %endif - --disable-use-tty-group \ - --enable-static \ - --disable-silent-rules \ - --disable-rpath +%if %build_util_linux_systemd + --enable-uuidd \ + --with-systemd \ + --with-systemdsystemunitdir=%{_unitdir} \ +%else + --disable-uuidd \ + --without-systemd \ +%endif +%if %build_python_libmount + --with-python \ +%else + --without-python \ +%endif # make %{?_smp_mflags} # +%if %build_util_linux %{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29} %{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31} +%endif %check -if ! make check; then - echo "cat test diffs:" - find tests/diff -type f | xargs -r cat - #exit 1 -fi +# mark some tests "known_fail" +%ifarch ppc ppc64 ppc64le s390 s390x +export TS_OPT_fdisk_bsd_known_fail="yes" +%endif +%ifarch %{ix86} +export TS_OPT_misc_setarch_known_fail="yes" +%endif +# +%ifarch armv7l armv7hl aarch64 +%if 0%{?suse_version} > 1310 +export TS_OPT_misc_setarch_known_fail="yes" +%endif +%endif +# +%ifarch armv6l armv6hl aarch64 +export TS_OPT_fdisk_gpt_known_fail="yes" +export TS_OPT_fdisk_oddinput_known_fail="yes" +export TS_OPT_fdisk_sunlabel_known_fail="yes" +export TS_OPT_misc_ionice_known_fail="yes" +export TS_OPT_misc_swaplabel_known_fail="yes" +export TS_OPT_kill_name_to_number_known_fail="yes" +export TS_OPT_kill_print_pid_known_fail="yes" +export TS_OPT_kill_queue_known_fail="yes" +%endif +%ifarch aarch64 s390 s390x +export TS_OPT_utmpdump_known_fail="yes" +%endif +# FIXME: These sometimes fails: +export TS_OPT_libmount_lock_known_fail="yes" +%ifarch x86_64 +# FIXME: Something is wrong here. This test never fails in SLE12: +export TS_OPT_ipcs_limits2_known_fail="yes" +%endif +# +# hacks +export PATH="$PATH:/sbin:/usr/sbin" +# +# do the check but don't abort yet +result="0" +make %{?_smp_mflags} check || result="1" +# +# always show test diffs (inclusive known_fail) and exit result +diffs_files="$(find tests/diff -type f | sort)" +echo "$diffs_files" | xargs -r cat +exit "$result" %install +%if %build_util_linux mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} -mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid/ -mkdir -p %{buildroot}/run/uuidd/ -install -m 744 %{SOURCE50} %{buildroot}%{_initddir}/uuidd install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote @@ -400,17 +663,18 @@ pushd ../klogconsole # klogconsole install make install DEST=%{buildroot} popd +%endif # # util-linux install # %make_install -rm -f %{buildroot}/%{_libdir}/lib*.la +rm -f %{buildroot}%{python_sitearch}/libmount/*.*a +%if %build_util_linux #UsrMerge %if %{with enable_su} ln -s %{_bindir}/kill %{buildroot}/bin ln -s %{_bindir}/su %{buildroot}/bin %endif -ln -s %{_bindir}/logger %{buildroot}/bin ln -s %{_bindir}/dmesg %{buildroot}/bin ln -s %{_bindir}/more %{buildroot}/bin ln -s %{_bindir}/mount %{buildroot}/bin @@ -446,15 +710,15 @@ ln -s %{_sbindir}/fsfreeze %{buildroot}/sbin ln -s %{_sbindir}/swaplabel %{buildroot}/sbin ln -s %{_sbindir}/fstrim %{buildroot}/sbin ln -s %{_sbindir}/chcpu %{buildroot}/sbin -#EndUsrMerge +#EndUsrMerge install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/filesystems %ifnarch ppc ppc64 -install -m 755 mkzimage_cmdline %{buildroot}/%{_bindir} +install -m 755 mkzimage_cmdline %{buildroot}%{_bindir} install -m 644 %{S:28} %{buildroot}%{_mandir}/man8 -install -m 755 chrp-addnote %{buildroot}/%{_bindir} +install -m 755 chrp-addnote %{buildroot}%{_bindir} %endif # setctsid install -install -m 755 setctsid %{buildroot}/%{_sbindir} +install -m 755 setctsid %{buildroot}%{_sbindir} install -m 444 setctsid.8 %{buildroot}%{_mandir}/man8/ echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir}/flushb chmod 755 %{buildroot}%{_sbindir}/flushb @@ -464,7 +728,7 @@ install -m 755 $RPM_SOURCE_DIR/raw.init %{buildroot}%{_initddir}/raw ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw # upstream moved getopt examples from datadir to docdir but we keep # the old location because we would need to fix the manpage first -mv %{buildroot}%{_docdir}/%{name}/getopt %{buildroot}%{_datadir}/ +mv %{buildroot}%{_docdir}/%{_name}/getopt %{buildroot}%{_datadir}/ # Stupid hack so we don't have a tcsh dependency chmod 644 %{buildroot}%{_datadir}/getopt/getopt*.tcsh # Following files we don't want to package, so remove them @@ -474,41 +738,39 @@ rm -f %{buildroot}%{_mandir}/man1/pg.1* rm -f %{buildroot}%{_bindir}/chkdupexe rm -f %{buildroot}%{_mandir}/man1/chkdupexe.1 # we use this tools from pwdutils -rm -f %{buildroot}/%{_bindir}/{chfn,chsh,newgrp} -rm -f %{buildroot}/%{_sbindir}/{vigr,vipw} -rm -f %{buildroot}/%{_mandir}/man1/{chfn.1*,chsh.1*,newgrp.1*} -rm -f %{buildroot}/%{_mandir}/man8/{vigr.8*,vipw.8*} +rm -f %{buildroot}%{_bindir}/{chfn,chsh,newgrp} +rm -f %{buildroot}%{_sbindir}/{vigr,vipw} +rm -f %{buildroot}%{_mandir}/man1/{chfn.1*,chsh.1*,newgrp.1*} +rm -f %{buildroot}%{_mandir}/man8/{vigr.8*,vipw.8*} # login is always and only in /bin -mv %{buildroot}/%{_bindir}/login %{buildroot}/bin/ +mv %{buildroot}%{_bindir}/login %{buildroot}/bin/ # arch dependent %ifarch s390 s390x rm -f %{buildroot}%{_sysconfdir}/fdprm -rm -f %{buildroot}%{_bindir}/cytune rm -f %{buildroot}%{_sbindir}/fdformat rm -f %{buildroot}%{_sbindir}/hwclock #UsrMerge rm -f %{buildroot}/sbin/hwclock -#EndUsrMerge +#EndUsrMerge rm -f %{buildroot}%{_sbindir}/klogconsole rm -f %{buildroot}%{_bindir}/setterm rm -f %{buildroot}%{_sbindir}/tunelp -rm -f %{buildroot}/%{_mandir}/man8/cytune.8* -rm -f %{buildroot}/%{_mandir}/man8/fdformat.8* -rm -f %{buildroot}/%{_mandir}/man8/hwclock.8* -rm -f %{buildroot}/%{_mandir}/man8/klogconsole.8* -rm -f %{buildroot}/%{_mandir}/man8/tunelp.8* +rm -f %{buildroot}%{_mandir}/man8/fdformat.8* +rm -f %{buildroot}%{_mandir}/man8/hwclock.8* +rm -f %{buildroot}%{_mandir}/man8/klogconsole.8* +rm -f %{buildroot}%{_mandir}/man8/tunelp.8* %endif %ifarch ia64 %sparc m68k -rm -f %{buildroot}/%{_mandir}/man8/cfdisk.8* -rm -f %{buildroot}/%{_mandir}/man8/sfdisk.8* +rm -f %{buildroot}%{_mandir}/man8/cfdisk.8* +rm -f %{buildroot}%{_mandir}/man8/sfdisk.8* rm -f %{buildroot}%{_sbindir}/cfdisk #UsrMerge rm -f %{buildroot}/sbin/cfdisk -#EndUsrMerge +#EndUsrMerge rm -f %{buildroot}%{_sbindir}/sfdisk #UsrMerge rm -f %{buildroot}/sbin/sfdisk -#EndUsrMerge +#EndUsrMerge %endif %ifarch ia64 m68k rm -f %{buildroot}%{_sbindir}/fdisk @@ -525,13 +787,29 @@ find %{buildroot}%{_bindir}/ -regextype posix-egrep -type l \ find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|parisc|parisc32|parisc64)\.8.*" \ -printf "%{_mandir}/man8/%f*\n" >> %{name}.files +%else +# install systemd files manually, don't use Makefile that expect build of utilities and its dependencies. +%endif +%if %build_util_linux_systemd +mkdir -p %{buildroot}%{_sysconfdir}/init.d +mkdir -p %{buildroot}/bin +mkdir -p %{buildroot}%{_sbindir} +mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid +mkdir -p %{buildroot}/run/uuidd +install -m 744 %{SOURCE50} %{buildroot}%{_initddir}/uuidd +ln -s %{_bindir}/logger %{buildroot}/bin # clock.txt from uuidd is a ghost file touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt # rcuuidd helper ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd -# remove duplicate manpages -%fdupes -s %{buildroot}/%{_mandir} +%if !%build_util_linux +%make_install +%endif +%endif +# link duplicate manpages and python bindings +%fdupes -s %{buildroot}%{_prefix} +%if %build_util_linux %post %{fillup_and_insserv raw} %set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount @@ -579,6 +857,18 @@ fi %postun -n libmount1 -p /sbin/ldconfig +%post -n libsmartcols1 -p /sbin/ldconfig + +%postun -n libsmartcols1 -p /sbin/ldconfig + +%post -n libuuid1 -p /sbin/ldconfig + +%postun -n libuuid1 -p /sbin/ldconfig + +%files lang -f %{name}.lang +%endif + +%if %build_util_linux_systemd %pre -n uuidd %{_sbindir}/groupadd -r uuidd 2>/dev/null || : %{_sbindir}/useradd -r -g uuidd -c "User for uuidd" \ @@ -595,22 +885,17 @@ fi %{restart_on_update uuidd} %{insserv_cleanup} -%post -n libuuid1 -p /sbin/ldconfig - -%postun -n libuuid1 -p /sbin/ldconfig - %verifyscript -n uuidd %verify_permissions -e %{_sbindir}/uuidd +%endif -%files lang -f %{name}.lang - +%if %build_util_linux %files -f %{name}.files # Common files for all archs %defattr(-,root,root) # util-linux documentation files %doc Documentation/blkid.txt %doc Documentation/cal.txt -%doc Documentation/cfdisk.txt %doc Documentation/col.txt %doc Documentation/deprecated.txt %doc Documentation/fdisk.txt @@ -642,7 +927,6 @@ fi /bin/mount /bin/umount /bin/findmnt -/bin/logger /bin/login /bin/lsblk /sbin/agetty @@ -704,7 +988,6 @@ fi %{_bindir}/lastb %endif %{_bindir}/line -%{_bindir}/logger %{_bindir}/look %{_bindir}/lsblk %{_bindir}/lscpu @@ -722,6 +1005,7 @@ fi %{_bindir}/script %{_bindir}/scriptreplay %{_bindir}/setarch +%{_bindir}/setpriv %{_bindir}/setsid %{_bindir}/tailf %{_bindir}/taskset @@ -805,7 +1089,6 @@ fi %{_mandir}/man1/lastb.1.gz %endif %{_mandir}/man1/line.1.gz -%{_mandir}/man1/logger.1.gz %{_mandir}/man1/login.1.gz %{_mandir}/man1/look.1.gz %{_mandir}/man1/lscpu.1.gz @@ -819,6 +1102,7 @@ fi %{_mandir}/man1/rename.1.gz %{_mandir}/man1/rev.1.gz %{_mandir}/man1/renice.1.gz +%{_mandir}/man1/setpriv.1.gz %{_mandir}/man1/setsid.1.gz %{_mandir}/man1/script.1.gz %{_mandir}/man1/scriptreplay.1.gz @@ -838,6 +1122,7 @@ fi %{_mandir}/man1/runuser.1.gz %{_mandir}/man1/uuidgen.1.gz %{_mandir}/man5/fstab.5.gz +%{_mandir}/man5/terminal-colors.d.5.gz %{_mandir}/man8/addpart.8.gz %{_mandir}/man8/agetty.8.gz %{_mandir}/man8/blockdev.8.gz @@ -893,7 +1178,12 @@ fi %attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh # FIXME: Fix directory ownership. -%{_datadir}/bash-completion +%dir %{_datadir}/bash-completion +%{_datadir}/bash-completion/* +%if %build_util_linux_systemd +%exclude %{_datadir}/bash-completion/logger +%exclude %{_datadir}/bash-completion/uuidd +%endif %ifnarch ia64 m68k #XXX: post our patches upstream #XXX: call fdupes on /usr/share/man @@ -914,7 +1204,6 @@ fi %{_sbindir}/sfdisk %endif %ifnarch s390 s390x -%{_bindir}/cytune %{_sbindir}/fdformat #UsrMerge /sbin/hwclock @@ -923,7 +1212,6 @@ fi %{_sbindir}/klogconsole %{_bindir}/setterm %{_sbindir}/tunelp -%{_mandir}/man8/cytune.8.gz %{_mandir}/man8/fdformat.8.gz %{_mandir}/man8/hwclock.8.gz %{_mandir}/man8/klogconsole.8.gz @@ -932,8 +1220,8 @@ fi %files -n libblkid1 %defattr(-, root, root) -/%{_libdir}/libblkid.so.1 -/%{_libdir}/libblkid.so.1.* +%{_libdir}/libblkid.so.1 +%{_libdir}/libblkid.so.1.* %files -n libblkid-devel %defattr(-, root, root) @@ -945,12 +1233,12 @@ fi %files -n libblkid-devel-static %defattr(-, root, root) -%{_libdir}/libblkid.a +%{_libdir}/libblkid.*a %files -n libmount1 %defattr(-, root, root) -/%{_libdir}/libmount.so.1 -/%{_libdir}/libmount.so.1.* +%{_libdir}/libmount.so.1 +%{_libdir}/libmount.so.1.* %files -n libmount-devel %defattr(-, root, root) @@ -961,24 +1249,28 @@ fi %files -n libmount-devel-static %defattr(-, root, root) -%{_libdir}/libmount.a +%{_libdir}/libmount.*a -%files -n uuidd +%files -n libsmartcols1 %defattr(-, root, root) -%verify(not mode) %attr(0755,root,root) %{_sbindir}/uuidd -%attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid -%ghost %{_localstatedir}/lib/libuuid/clock.txt -%attr(-,uuidd,uuidd) %ghost %dir /run/uuidd -%{_initddir}/uuidd -%{_mandir}/man8/uuidd.8.gz -%{_sbindir}/rcuuidd -%{_unitdir}/uuidd.service -%{_unitdir}/uuidd.socket +%{_libdir}/libsmartcols.so.1 +%{_libdir}/libsmartcols.so.1.* + +%files -n libsmartcols-devel +%defattr(-, root, root) +%{_libdir}/libsmartcols.so +%dir %{_includedir}/libsmartcols +%{_includedir}/libsmartcols/libsmartcols.h +%{_libdir}/pkgconfig/smartcols.pc + +%files -n libsmartcols-devel-static +%defattr(-, root, root) +%{_libdir}/libsmartcols.*a %files -n libuuid1 %defattr(-, root, root) -/%{_libdir}/libuuid.so.1 -/%{_libdir}/libuuid.so.1.* +%{_libdir}/libuuid.so.1 +%{_libdir}/libuuid.so.1.* %files -n libuuid-devel %defattr(-, root, root) @@ -990,6 +1282,47 @@ fi %files -n libuuid-devel-static %defattr(-, root, root) -%{_libdir}/libuuid.a +%{_libdir}/libuuid.*a +%endif + +%if %build_util_linux_systemd +%if %build_util_linux +%files systemd +%else +%files +%endif +%defattr(-, root, root) +/bin/logger +%{_bindir}/logger +%{_bindir}/lslogins +%{_datadir}/bash-completion/logger +%{_mandir}/man1/logger.1.gz +%{_mandir}/man1/lslogins.1.gz +%{_unitdir}/fstrim.service +%{_unitdir}/fstrim.timer + +%files -n uuidd +%defattr(-, root, root) +%verify(not mode) %attr(0755,root,root) %{_sbindir}/uuidd +%attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid +%ghost %{_localstatedir}/lib/libuuid/clock.txt +%attr(-,uuidd,uuidd) %ghost %dir /run/uuidd +%{_datadir}/bash-completion/uuidd +%{_initddir}/uuidd +%{_mandir}/man8/uuidd.8.gz +%{_sbindir}/rcuuidd +%{_unitdir}/uuidd.service +%{_unitdir}/uuidd.socket +%endif + +%if %build_python_libmount +%if %build_util_linux +%files -n python-libmount +%else +%files +%endif +%defattr(-, root, root) +%{python_sitearch}/libmount +%endif %changelog diff --git a/util-linux.util-linux b/util-linux.util-linux new file mode 100644 index 0000000..8a98094 --- /dev/null +++ b/util-linux.util-linux @@ -0,0 +1,2 @@ +Summary: A collection of basic system utilities +Group: System/Base From fe6c6a03512596f38e9272553a23e7ff91e88a58fe00b05c89e7c6ecfdf7e260 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 29 Aug 2014 15:42:19 +0000 Subject: [PATCH 182/211] Accepting request 246534 from Base:System - Always mark ipcs/limits and misc/setarch as known failure - fix parsing of slash in the format string [bnc#889934] (internal) - added patches: * util-linux-slash-in-format-string.patch - Remove hacks for format_spec_file and source_validator (bnc#891152, bnc#891829). - Use macro defined summary that passes both SLE and openSUSE check-in QA scripts (invented by Ruediger Oertel). - Always mark ipcs/limits and misc/setarch as known failure - fix parsing of slash in the format string [bnc#889934] (internal) - added patches: * util-linux-slash-in-format-string.patch - Remove hacks for format_spec_file and source_validator (bnc#891152, bnc#891829). - Use macro defined summary that passes both SLE and openSUSE check-in QA scripts (invented by Ruediger Oertel). - Always mark ipcs/limits and misc/setarch as known failure - fix parsing of slash in the format string [bnc#889934] (internal) - added patches: * util-linux-slash-in-format-string.patch - Remove hacks for format_spec_file and source_validator (bnc#891152, bnc#891829). OBS-URL: https://build.opensuse.org/request/show/246534 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=191 --- python-libmount.changes | 20 +++++++ python-libmount.spec | 76 +++++++++---------------- util-linux-slash-in-format-string.patch | 27 +++++++++ util-linux-systemd.changes | 20 +++++++ util-linux-systemd.spec | 76 +++++++++---------------- util-linux.changes | 20 +++++++ util-linux.preamble | 1 - util-linux.python-libmount | 2 - util-linux.spec | 76 +++++++++---------------- util-linux.util-linux | 2 - 10 files changed, 168 insertions(+), 152 deletions(-) create mode 100644 util-linux-slash-in-format-string.patch delete mode 100644 util-linux.preamble delete mode 100644 util-linux.python-libmount delete mode 100644 util-linux.util-linux diff --git a/python-libmount.changes b/python-libmount.changes index 2eaed7c..0ba302d 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Tue Aug 26 12:15:02 UTC 2014 - schwab@suse.de + +- Always mark ipcs/limits and misc/setarch as known failure + +------------------------------------------------------------------- +Tue Aug 26 07:43:16 UTC 2014 - pgajdos@suse.com + +- fix parsing of slash in the format string [bnc#889934] (internal) +- added patches: + * util-linux-slash-in-format-string.patch + +------------------------------------------------------------------- +Thu Aug 21 18:34:59 CEST 2014 - sbrabec@suse.cz + +- Remove hacks for format_spec_file and source_validator + (bnc#891152, bnc#891829). +- Use macro defined summary that passes both SLE and openSUSE + check-in QA scripts (invented by Ruediger Oertel). + ------------------------------------------------------------------- Fri Aug 8 22:17:29 CEST 2014 - sbrabec@suse.cz diff --git a/python-libmount.spec b/python-libmount.spec index d6c54fa..7b60de9 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -32,19 +32,35 @@ Name: python-libmount # build_util_linux_systemd: Builds util-linux-systemd and uuidd. # build_python_libmount: Builds python-libmount. %define build_all 0 +# definitions for the main packages +# This two level indirect definition of Summary and Group is needed to +# simplify parsing of spec file by format_spec_file, +# source_validator and check-in QA scripts). +%define summary_ul A collection of basic system utilities +%define summary_uls A collection of basic system utilities +%define summary_pl Python bindings for the libmount library +%define group_ul System/Base +%define group_uls System/Base +%define group_pl System/Filesystems %if "%{name}" == "python-libmount" %define build_util_linux 0 %define build_util_linux_systemd 0 %define build_python_libmount 1 # To prevent dependency loops, verify signature only in third stage. %define verify_sig 1 +%define main_summary %summary_pl +%define main_group %group_pl %else %if "%{name}" == "util-linux-systemd" %define build_util_linux 0 %define build_util_linux_systemd 1 %define build_python_libmount 0 %define verify_sig 0 +%define main_summary %summary_uls +%define main_group %group_uls %else +%define main_summary %summary_ul +%define main_group %group_ul %if %build_all %define build_util_linux 1 %define build_util_linux_systemd 1 @@ -58,6 +74,9 @@ Name: python-libmount %endif %endif %endif +Summary: %main_summary +License: GPL-2.0+ +Group: %group_pl BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel @@ -110,16 +129,6 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -#BEGIN UGLY HACK -%if 0 -# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) -Summary: TRAP -License: GPL-2.0+ -Group: System/Filesystems -%endif -# UGLY HACK: License tag is errorneously moved here on every call of format_spec_file. %%include cannot be broken by format_spec_file. -%include %{_sourcedir}/util-linux.preamble -#END UGLY HACK Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init @@ -144,10 +153,6 @@ Source31: addnote.c # Source50: uuidd.rc Source51: blkid.conf -# detachec parts of spec file -Source100: util-linux.preamble -Source101: util-linux.util-linux -Source102: util-linux.python-libmount ## ## util-linux patches ## @@ -157,6 +162,7 @@ Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff Patch12: util-linux-noenc-suse.patch # PATCH-FIX-UPSTREAM util-linux-bash-completion-blockdev.patch sbrabec@suse.cz -- Fix bash-completion installation. Patch13: util-linux-bash-completion-blockdev.patch +Patch14: util-linux-slash-in-format-string.patch ## ## klogconsole ## @@ -172,15 +178,6 @@ Provides: util-linux(fake+no-canonicalize) PreReq: %install_info_prereq permissions PreReq: %insserv_prereq %fillup_prereq /bin/sed Recommends: %{name}-lang = %{version} -#BEGIN UGLY HACK -%if 0 -# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) -Summary: TRAP -Group: System/Filesystems -%endif -# UGLY HACK: Group tag is updated to bad value on every call of format_spec_file. %%include cannot be broken by format_spec_file. -%include %{_sourcedir}/util-linux.util-linux -#END UGLY HACK %if %{with enable_eject} Provides: eject = 2.1.0-166.8 %endif @@ -216,24 +213,9 @@ Recommends: adjtimex Recommends: time Recommends: which %else -# Exact copy of headers below is needed for spec cleaner that does not support -# if condition across preamble and subsequent sections. %if %build_python_libmount -# Exact copy of the %%package tag from python-libmount section below: -#BEGIN UGLY HACK -%if 0 -# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) -Summary: TRAP -Group: System/Filesystems -%endif -# UGLY HACK: Group tag is updated to bad value on every call of format_spec_file. %%include cannot be broken by format_spec_file. -%include %{_sourcedir}/util-linux.python-libmount -#END UGLY HACK %else %if %build_util_linux_systemd -# Exact copy of the %%package tag from systemd section below: -Summary: A collection of basic systemd utilities -Group: System/Filesystems Supplements: packageand(util-linux:systemd) # Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 Provides: util-linux:/usr/lib/systemd/system/fstrim.service @@ -353,9 +335,8 @@ Files to develop applications using the libsmartcols library. %if %build_util_linux_systemd %if %build_util_linux %package systemd -# Do not forget to copy duplicate of this section to the preamble: -Summary: A collection of basic systemd utilities -Group: System/Base +Summary: %summary_uls +Group: %group_uls Supplements: packageand(util-linux:systemd) # Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 Provides: util-linux:/usr/lib/systemd/system/fstrim.service @@ -387,9 +368,8 @@ SMP systems. %if %build_python_libmount %if %build_util_linux %package -n python-libmount -# Do not forget to copy duplicate of this section to the preamble: -Summary: Python bindings for the libmount library -Group: System/Filesystems +Summary: %summary_pl +Group: %group_pl %description -n python-libmount %else @@ -407,6 +387,7 @@ xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %patch4 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -609,11 +590,10 @@ export TS_OPT_fdisk_bsd_known_fail="yes" export TS_OPT_misc_setarch_known_fail="yes" %endif # -%ifarch armv7l armv7hl aarch64 %if 0%{?suse_version} > 1310 +# glibc requires kernel >= 3.0, thus setarch --uname-2.6 fails on platforms without VDSO export TS_OPT_misc_setarch_known_fail="yes" %endif -%endif # %ifarch armv6l armv6hl aarch64 export TS_OPT_fdisk_gpt_known_fail="yes" @@ -630,10 +610,8 @@ export TS_OPT_utmpdump_known_fail="yes" %endif # FIXME: These sometimes fails: export TS_OPT_libmount_lock_known_fail="yes" -%ifarch x86_64 -# FIXME: Something is wrong here. This test never fails in SLE12: +# integer overflow (https://github.com/karelzak/util-linux/commit/3a9ec12d6664527fad9c56347c88f3447d6c0856) export TS_OPT_ipcs_limits2_known_fail="yes" -%endif # # hacks export PATH="$PATH:/sbin:/usr/sbin" diff --git a/util-linux-slash-in-format-string.patch b/util-linux-slash-in-format-string.patch new file mode 100644 index 0000000..49b7a05 --- /dev/null +++ b/util-linux-slash-in-format-string.patch @@ -0,0 +1,27 @@ +From 82233c2a0a4cce89307061bdc7ffdb58c4936d4f Mon Sep 17 00:00:00 2001 +From: HUANG Wei +Date: Wed, 6 Aug 2014 12:20:18 +0800 +Subject: [PATCH] hexdump: Fix parse format of "byte count without repetition + count" + +--- + text-utils/hexdump-parse.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/text-utils/hexdump-parse.c b/text-utils/hexdump-parse.c +index 37e7086..8d14c5b 100644 +--- a/text-utils/hexdump-parse.c ++++ b/text-utils/hexdump-parse.c +@@ -141,7 +141,7 @@ void add_fmt(const char *fmt, struct hexdump *hex) + + /* Skip slash and trailing white space. */ + if (*p == '/') +- p = skip_space(p); ++ p = skip_space(++p); + + /* byte count */ + if (isdigit(*p)) { +-- +2.0.4 + + diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 2eaed7c..0ba302d 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Tue Aug 26 12:15:02 UTC 2014 - schwab@suse.de + +- Always mark ipcs/limits and misc/setarch as known failure + +------------------------------------------------------------------- +Tue Aug 26 07:43:16 UTC 2014 - pgajdos@suse.com + +- fix parsing of slash in the format string [bnc#889934] (internal) +- added patches: + * util-linux-slash-in-format-string.patch + +------------------------------------------------------------------- +Thu Aug 21 18:34:59 CEST 2014 - sbrabec@suse.cz + +- Remove hacks for format_spec_file and source_validator + (bnc#891152, bnc#891829). +- Use macro defined summary that passes both SLE and openSUSE + check-in QA scripts (invented by Ruediger Oertel). + ------------------------------------------------------------------- Fri Aug 8 22:17:29 CEST 2014 - sbrabec@suse.cz diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 5dbc183..93a7f36 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -32,19 +32,35 @@ Name: util-linux-systemd # build_util_linux_systemd: Builds util-linux-systemd and uuidd. # build_python_libmount: Builds python-libmount. %define build_all 0 +# definitions for the main packages +# This two level indirect definition of Summary and Group is needed to +# simplify parsing of spec file by format_spec_file, +# source_validator and check-in QA scripts). +%define summary_ul A collection of basic system utilities +%define summary_uls A collection of basic system utilities +%define summary_pl Python bindings for the libmount library +%define group_ul System/Base +%define group_uls System/Base +%define group_pl System/Filesystems %if "%{name}" == "python-libmount" %define build_util_linux 0 %define build_util_linux_systemd 0 %define build_python_libmount 1 # To prevent dependency loops, verify signature only in third stage. %define verify_sig 1 +%define main_summary %summary_pl +%define main_group %group_pl %else %if "%{name}" == "util-linux-systemd" %define build_util_linux 0 %define build_util_linux_systemd 1 %define build_python_libmount 0 %define verify_sig 0 +%define main_summary %summary_uls +%define main_group %group_uls %else +%define main_summary %summary_ul +%define main_group %group_ul %if %build_all %define build_util_linux 1 %define build_util_linux_systemd 1 @@ -58,6 +74,9 @@ Name: util-linux-systemd %endif %endif %endif +Summary: %main_summary +License: GPL-2.0+ +Group: %main_group BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel @@ -110,16 +129,6 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -#BEGIN UGLY HACK -%if 0 -# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) -Summary: TRAP -License: GPL-2.0+ -Group: System/Base -%endif -# UGLY HACK: License tag is errorneously moved here on every call of format_spec_file. %%include cannot be broken by format_spec_file. -%include %{_sourcedir}/util-linux.preamble -#END UGLY HACK Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init @@ -144,10 +153,6 @@ Source31: addnote.c # Source50: uuidd.rc Source51: blkid.conf -# detachec parts of spec file -Source100: util-linux.preamble -Source101: util-linux.util-linux -Source102: util-linux.python-libmount ## ## util-linux patches ## @@ -157,6 +162,7 @@ Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff Patch12: util-linux-noenc-suse.patch # PATCH-FIX-UPSTREAM util-linux-bash-completion-blockdev.patch sbrabec@suse.cz -- Fix bash-completion installation. Patch13: util-linux-bash-completion-blockdev.patch +Patch14: util-linux-slash-in-format-string.patch ## ## klogconsole ## @@ -172,15 +178,6 @@ Provides: util-linux(fake+no-canonicalize) PreReq: %install_info_prereq permissions PreReq: %insserv_prereq %fillup_prereq /bin/sed Recommends: %{name}-lang = %{version} -#BEGIN UGLY HACK -%if 0 -# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) -Summary: TRAP -Group: System/Base -%endif -# UGLY HACK: Group tag is updated to bad value on every call of format_spec_file. %%include cannot be broken by format_spec_file. -%include %{_sourcedir}/util-linux.util-linux -#END UGLY HACK %if %{with enable_eject} Provides: eject = 2.1.0-166.8 %endif @@ -216,24 +213,9 @@ Recommends: adjtimex Recommends: time Recommends: which %else -# Exact copy of headers below is needed for spec cleaner that does not support -# if condition across preamble and subsequent sections. %if %build_python_libmount -# Exact copy of the %%package tag from python-libmount section below: -#BEGIN UGLY HACK -%if 0 -# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) -Summary: TRAP -Group: System/Base -%endif -# UGLY HACK: Group tag is updated to bad value on every call of format_spec_file. %%include cannot be broken by format_spec_file. -%include %{_sourcedir}/util-linux.python-libmount -#END UGLY HACK %else %if %build_util_linux_systemd -# Exact copy of the %%package tag from systemd section below: -Summary: A collection of basic systemd utilities -Group: System/Base Supplements: packageand(util-linux:systemd) # Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 Provides: util-linux:/usr/lib/systemd/system/fstrim.service @@ -353,9 +335,8 @@ Files to develop applications using the libsmartcols library. %if %build_util_linux_systemd %if %build_util_linux %package systemd -# Do not forget to copy duplicate of this section to the preamble: -Summary: A collection of basic systemd utilities -Group: System/Base +Summary: %summary_uls +Group: %group_uls Supplements: packageand(util-linux:systemd) # Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 Provides: util-linux:/usr/lib/systemd/system/fstrim.service @@ -387,9 +368,8 @@ SMP systems. %if %build_python_libmount %if %build_util_linux %package -n python-libmount -# Do not forget to copy duplicate of this section to the preamble: -Summary: Python bindings for the libmount library -Group: System/Filesystems +Summary: %summary_pl +Group: %group_pl %description -n python-libmount %else @@ -407,6 +387,7 @@ xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %patch4 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -609,11 +590,10 @@ export TS_OPT_fdisk_bsd_known_fail="yes" export TS_OPT_misc_setarch_known_fail="yes" %endif # -%ifarch armv7l armv7hl aarch64 %if 0%{?suse_version} > 1310 +# glibc requires kernel >= 3.0, thus setarch --uname-2.6 fails on platforms without VDSO export TS_OPT_misc_setarch_known_fail="yes" %endif -%endif # %ifarch armv6l armv6hl aarch64 export TS_OPT_fdisk_gpt_known_fail="yes" @@ -630,10 +610,8 @@ export TS_OPT_utmpdump_known_fail="yes" %endif # FIXME: These sometimes fails: export TS_OPT_libmount_lock_known_fail="yes" -%ifarch x86_64 -# FIXME: Something is wrong here. This test never fails in SLE12: +# integer overflow (https://github.com/karelzak/util-linux/commit/3a9ec12d6664527fad9c56347c88f3447d6c0856) export TS_OPT_ipcs_limits2_known_fail="yes" -%endif # # hacks export PATH="$PATH:/sbin:/usr/sbin" diff --git a/util-linux.changes b/util-linux.changes index 2eaed7c..0ba302d 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Tue Aug 26 12:15:02 UTC 2014 - schwab@suse.de + +- Always mark ipcs/limits and misc/setarch as known failure + +------------------------------------------------------------------- +Tue Aug 26 07:43:16 UTC 2014 - pgajdos@suse.com + +- fix parsing of slash in the format string [bnc#889934] (internal) +- added patches: + * util-linux-slash-in-format-string.patch + +------------------------------------------------------------------- +Thu Aug 21 18:34:59 CEST 2014 - sbrabec@suse.cz + +- Remove hacks for format_spec_file and source_validator + (bnc#891152, bnc#891829). +- Use macro defined summary that passes both SLE and openSUSE + check-in QA scripts (invented by Ruediger Oertel). + ------------------------------------------------------------------- Fri Aug 8 22:17:29 CEST 2014 - sbrabec@suse.cz diff --git a/util-linux.preamble b/util-linux.preamble deleted file mode 100644 index 4360fb4..0000000 --- a/util-linux.preamble +++ /dev/null @@ -1 +0,0 @@ -License: GPL-2.0+ diff --git a/util-linux.python-libmount b/util-linux.python-libmount deleted file mode 100644 index 495db08..0000000 --- a/util-linux.python-libmount +++ /dev/null @@ -1,2 +0,0 @@ -Summary: Python bindings for the libmount library -Group: System/Filesystems diff --git a/util-linux.spec b/util-linux.spec index da3f510..539e1b0 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -32,19 +32,35 @@ Name: util-linux # build_util_linux_systemd: Builds util-linux-systemd and uuidd. # build_python_libmount: Builds python-libmount. %define build_all 0 +# definitions for the main packages +# This two level indirect definition of Summary and Group is needed to +# simplify parsing of spec file by format_spec_file, +# source_validator and check-in QA scripts). +%define summary_ul A collection of basic system utilities +%define summary_uls A collection of basic system utilities +%define summary_pl Python bindings for the libmount library +%define group_ul System/Base +%define group_uls System/Base +%define group_pl System/Filesystems %if "%{name}" == "python-libmount" %define build_util_linux 0 %define build_util_linux_systemd 0 %define build_python_libmount 1 # To prevent dependency loops, verify signature only in third stage. %define verify_sig 1 +%define main_summary %summary_pl +%define main_group %group_pl %else %if "%{name}" == "util-linux-systemd" %define build_util_linux 0 %define build_util_linux_systemd 1 %define build_python_libmount 0 %define verify_sig 0 +%define main_summary %summary_uls +%define main_group %group_uls %else +%define main_summary %summary_ul +%define main_group %group_ul %if %build_all %define build_util_linux 1 %define build_util_linux_systemd 1 @@ -58,6 +74,9 @@ Name: util-linux %endif %endif %endif +Summary: %main_summary +License: GPL-2.0+ +Group: %main_group BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel @@ -110,16 +129,6 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -#BEGIN UGLY HACK -%if 0 -# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) -Summary: TRAP -License: GPL-2.0+ -Group: System/Base -%endif -# UGLY HACK: License tag is errorneously moved here on every call of format_spec_file. %%include cannot be broken by format_spec_file. -%include %{_sourcedir}/util-linux.preamble -#END UGLY HACK Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init @@ -144,10 +153,6 @@ Source31: addnote.c # Source50: uuidd.rc Source51: blkid.conf -# detachec parts of spec file -Source100: util-linux.preamble -Source101: util-linux.util-linux -Source102: util-linux.python-libmount ## ## util-linux patches ## @@ -157,6 +162,7 @@ Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff Patch12: util-linux-noenc-suse.patch # PATCH-FIX-UPSTREAM util-linux-bash-completion-blockdev.patch sbrabec@suse.cz -- Fix bash-completion installation. Patch13: util-linux-bash-completion-blockdev.patch +Patch14: util-linux-slash-in-format-string.patch ## ## klogconsole ## @@ -172,15 +178,6 @@ Provides: util-linux(fake+no-canonicalize) PreReq: %install_info_prereq permissions PreReq: %insserv_prereq %fillup_prereq /bin/sed Recommends: %{name}-lang = %{version} -#BEGIN UGLY HACK -%if 0 -# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) -Summary: TRAP -Group: System/Base -%endif -# UGLY HACK: Group tag is updated to bad value on every call of format_spec_file. %%include cannot be broken by format_spec_file. -%include %{_sourcedir}/util-linux.util-linux -#END UGLY HACK %if %{with enable_eject} Provides: eject = 2.1.0-166.8 %endif @@ -216,24 +213,9 @@ Recommends: adjtimex Recommends: time Recommends: which %else -# Exact copy of headers below is needed for spec cleaner that does not support -# if condition across preamble and subsequent sections. %if %build_python_libmount -# Exact copy of the %%package tag from python-libmount section below: -#BEGIN UGLY HACK -%if 0 -# UGLY HACK: Real tags are moved to include file to prevent damage done by format_spec_file. This is just a trap for format_spec_file. (bnc#891152) -Summary: TRAP -Group: System/Base -%endif -# UGLY HACK: Group tag is updated to bad value on every call of format_spec_file. %%include cannot be broken by format_spec_file. -%include %{_sourcedir}/util-linux.python-libmount -#END UGLY HACK %else %if %build_util_linux_systemd -# Exact copy of the %%package tag from systemd section below: -Summary: A collection of basic systemd utilities -Group: System/Base Supplements: packageand(util-linux:systemd) # Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 Provides: util-linux:/usr/lib/systemd/system/fstrim.service @@ -353,9 +335,8 @@ Files to develop applications using the libsmartcols library. %if %build_util_linux_systemd %if %build_util_linux %package systemd -# Do not forget to copy duplicate of this section to the preamble: -Summary: A collection of basic systemd utilities -Group: System/Base +Summary: %summary_uls +Group: %group_uls Supplements: packageand(util-linux:systemd) # Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 Provides: util-linux:/usr/lib/systemd/system/fstrim.service @@ -387,9 +368,8 @@ SMP systems. %if %build_python_libmount %if %build_util_linux %package -n python-libmount -# Do not forget to copy duplicate of this section to the preamble: -Summary: Python bindings for the libmount library -Group: System/Filesystems +Summary: %summary_pl +Group: %group_pl %description -n python-libmount %else @@ -407,6 +387,7 @@ xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %patch4 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -609,11 +590,10 @@ export TS_OPT_fdisk_bsd_known_fail="yes" export TS_OPT_misc_setarch_known_fail="yes" %endif # -%ifarch armv7l armv7hl aarch64 %if 0%{?suse_version} > 1310 +# glibc requires kernel >= 3.0, thus setarch --uname-2.6 fails on platforms without VDSO export TS_OPT_misc_setarch_known_fail="yes" %endif -%endif # %ifarch armv6l armv6hl aarch64 export TS_OPT_fdisk_gpt_known_fail="yes" @@ -630,10 +610,8 @@ export TS_OPT_utmpdump_known_fail="yes" %endif # FIXME: These sometimes fails: export TS_OPT_libmount_lock_known_fail="yes" -%ifarch x86_64 -# FIXME: Something is wrong here. This test never fails in SLE12: +# integer overflow (https://github.com/karelzak/util-linux/commit/3a9ec12d6664527fad9c56347c88f3447d6c0856) export TS_OPT_ipcs_limits2_known_fail="yes" -%endif # # hacks export PATH="$PATH:/sbin:/usr/sbin" diff --git a/util-linux.util-linux b/util-linux.util-linux deleted file mode 100644 index 8a98094..0000000 --- a/util-linux.util-linux +++ /dev/null @@ -1,2 +0,0 @@ -Summary: A collection of basic system utilities -Group: System/Base From fe06e27bbe9c6fe61d05c0545d44ffecd9db037a0a272780743ec47472e54d72 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sun, 7 Sep 2014 09:11:46 +0000 Subject: [PATCH 183/211] Accepting request 247686 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/247686 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=192 --- pre_checkin.sh | 2 ++ python-libmount.changes | 13 +++++++++++ python-libmount.spec | 13 ++++------- util-linux-2.25.1.tar.sign | 17 ++++++++++++++ util-linux-2.25.1.tar.xz | 3 +++ util-linux-2.25.tar.sign | 17 -------------- util-linux-2.25.tar.xz | 3 --- util-linux-bash-completion-blockdev.patch | 13 ----------- util-linux-slash-in-format-string.patch | 27 ----------------------- util-linux-systemd.changes | 13 +++++++++++ util-linux-systemd.spec | 11 +++------ util-linux.changes | 13 +++++++++++ util-linux.spec | 9 ++------ 13 files changed, 70 insertions(+), 84 deletions(-) create mode 100644 util-linux-2.25.1.tar.sign create mode 100644 util-linux-2.25.1.tar.xz delete mode 100644 util-linux-2.25.tar.sign delete mode 100644 util-linux-2.25.tar.xz delete mode 100644 util-linux-bash-completion-blockdev.patch delete mode 100644 util-linux-slash-in-format-string.patch diff --git a/pre_checkin.sh b/pre_checkin.sh index 4ed7c53..5cd0052 100644 --- a/pre_checkin.sh +++ b/pre_checkin.sh @@ -21,11 +21,13 @@ fi sed ' s/spec file for package util-linux/spec file for package python-libmount/; /^Name:/s/util-linux/python-libmount/; + s/WARNING: After editing this file please/WARNING: Never edit this file!!! Edit util-linux.spec and/ ' python-libmount.spec sed ' s/spec file for package util-linux/spec file for package util-linux-systemd/; /^Name:/s/util-linux/util-linux-systemd/; + s/WARNING: After editing this file please/WARNING: Never edit this file!!! Edit util-linux.spec and/ ' util-linux-systemd.spec cp -a util-linux.changes python-libmount.changes diff --git a/python-libmount.changes b/python-libmount.changes index 0ba302d..f388bb8 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Sep 3 16:21:57 CEST 2014 - sbrabec@suse.cz + +- Update to version 2.25.1: + * bug fixes (removed util-linux-bash-completion-blockdev.patch, + util-linux-slash-in-format-string.patch) + * translation updates + * correct support for plurals + * gpt: use real sector size to set PTMAGIC_OFFSET + * gpt: add Microsoft Storage Spaces GUID + * libmount: use -t for type.subtype in helpers API + * erase all traces of the long-obsolete xiafs + ------------------------------------------------------------------- Tue Aug 26 12:15:02 UTC 2014 - schwab@suse.de diff --git a/python-libmount.spec b/python-libmount.spec index 7b60de9..f67afdd 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -23,7 +23,7 @@ Name: python-libmount %define _name util-linux -# WARNING: After editing this file please call pre_checkin.sh to update spec files: +# WARNING: Never edit this file!!! Edit util-linux.spec and call pre_checkin.sh to update spec files: %define _name util-linux # To prevent dependency loop in automatic build systems, we want to # build util-linux in parts. To build all at once, set build_all to 1. @@ -76,7 +76,7 @@ Name: python-libmount %endif Summary: %main_summary License: GPL-2.0+ -Group: %group_pl +Group: %main_group BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel @@ -120,7 +120,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.25 +Version: 2.25.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -160,9 +160,6 @@ Source51: blkid.conf Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FEATURE-SUSE -- Report about disabled encryption to stderr. Patch12: util-linux-noenc-suse.patch -# PATCH-FIX-UPSTREAM util-linux-bash-completion-blockdev.patch sbrabec@suse.cz -- Fix bash-completion installation. -Patch13: util-linux-bash-completion-blockdev.patch -Patch14: util-linux-slash-in-format-string.patch ## ## klogconsole ## @@ -386,8 +383,6 @@ xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %setup -q -n %{_name}-%{version} -b 40 %patch4 -p1 %patch12 -p1 -%patch13 -p1 -%patch14 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -610,7 +605,7 @@ export TS_OPT_utmpdump_known_fail="yes" %endif # FIXME: These sometimes fails: export TS_OPT_libmount_lock_known_fail="yes" -# integer overflow (https://github.com/karelzak/util-linux/commit/3a9ec12d6664527fad9c56347c88f3447d6c0856) +# FIXME: It still fails with 3a9ec12: export TS_OPT_ipcs_limits2_known_fail="yes" # # hacks diff --git a/util-linux-2.25.1.tar.sign b/util-linux-2.25.1.tar.sign new file mode 100644 index 0000000..75ede4f --- /dev/null +++ b/util-linux-2.25.1.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIcBAABAgAGBQJUBu2tAAoJEOS3HV7sOcKEkGoP/18DDxNf35S8AQeXlI8fxGNL ++3udU3DWmYLHepRx3fF4swiQiyVE44YdOyTQsqVNr87dPmh2HeO8ewy1dRqaalJi ++FdU7BXYLz9pKOZpiSdD3DmzqTAMeBUC0m1zkCdO0aYHExMckVFRkDot26n4geEQ +vb0zN67bNK8J0Pif5XDmA0xMlwuvBSe2Epmjhf5snNXOqjArRmwbSEwhk77TfH0F +NrBoyQryKwhUio8P4z1U4Gu1SaNBolemgItDV9VqpNl38rY4U7EejGcEUQGseImt +q49SBYBZ3jSxO0urfT8Nlw9gbrVOd8fHQkaHfJrROJePGckDo+sDDCKTGZGqx45q ++Q6L7Uik+UNFVeBhhe22ctfi3oytNheNjPMx2hYs/jslqluMxmggm39Y8PBS/ZwT +zp951T0XMx/kwBizD8NSvGHkALNcbFP1HCUVb5IsgOtZba3LusKi23W4mplCnmfD +0RiwBoPkcFWwJb3Ih5mK0ahZLEDjMpyt/GLVdAh6SFdEDvdIcfjDUNRuXTDtg28/ +80XyBFe+hqGtutHRLF0K1lOqt5pNyXsnKiS6UdH/Detl8g7F/BUmBFRnxfpNqLab +AvKW+TLryi1Ilrtpj1Va6KzdmFzK84KIxrmPmWpcyt16HDVnlcqrvdhLjD/Wx2Wt +VGUYi2GOUXFBCIJrZ50d +=tkds +-----END PGP SIGNATURE----- diff --git a/util-linux-2.25.1.tar.xz b/util-linux-2.25.1.tar.xz new file mode 100644 index 0000000..9f1af75 --- /dev/null +++ b/util-linux-2.25.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4701305ae22790c3a92ce48e50794fa05b7ee01f4227f419a171c100d08986e8 +size 3695172 diff --git a/util-linux-2.25.tar.sign b/util-linux-2.25.tar.sign deleted file mode 100644 index 4f51484..0000000 --- a/util-linux-2.25.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQIcBAABAgAGBQJTzjJFAAoJEOS3HV7sOcKEYVcQAKNAIwpaYSNL4H3PYVlj/t6p -z5LrX9wD6c0nmNriaK6sqpRbJt7zRt/e9Vzmgs3TkHHsM7F7jq7Zir2erDyN+XRL -AjdDAjdPEbhWLwIOqCApoXirZTx1iv8GBrp/vWWrnk3DEQi30yuZENx5g6BlXVTr -wGNt0cpk2Pm7Qd2VZXFSl/D8wRxedoP4iI4+oNoIE9Z/Hc339qM8GBnptaYc9xCB -1EZdnMEsAZoS/lG/NWW1JPqoVoQzNG8wzVU97xPdTCdZINTaXNJGo5fvMF37mt/D -bIQagMayt6+FLUUGCvTP843gt/P3R5yQmiBwvuRXfnXHCemWZa6eTP4hjI7xdZYC -sV5CG+EUUxm/2R9nuKFaTImMPf7kGywxbWsMb3o09XJ8iDZogLrIFa7cfcdobJw3 -4sjFZxQ5SeWc7AJU8331b074VyL3w1eZreSZRX0CAXOYd/4p9k/fbIxLMN99iPd2 -3fyWS2WvJ8Y58ZPCeSZw/ZEaXcOpXxd1it3vFoOz5Vhr67IHM4P5CrHB7+WZF4AH -BxsVr2jLKN2GzqOlBn3hKdWW6bDUCwRYEBGdshwtzGy/Sw3lvSXVfeSicYNlmrYD -a5WxujQvjiAf12OA0GydOzR3nBkjcpmwMe9pQypMG8YEIO+3dXYpV3m+WSAMYq1g -eO4GVmg4fthgme1SMXBY -=Et2U ------END PGP SIGNATURE----- diff --git a/util-linux-2.25.tar.xz b/util-linux-2.25.tar.xz deleted file mode 100644 index ba0562a..0000000 --- a/util-linux-2.25.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:47ba5a8bd8cdd55262699078a5612a95db17966c7f20c43e3fe492c90ce7980a -size 3681308 diff --git a/util-linux-bash-completion-blockdev.patch b/util-linux-bash-completion-blockdev.patch deleted file mode 100644 index d2f0f0b..0000000 --- a/util-linux-bash-completion-blockdev.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-2.25/bash-completion/Makemodule.am -=================================================================== ---- util-linux-2.25.orig/bash-completion/Makemodule.am -+++ util-linux-2.25/bash-completion/Makemodule.am -@@ -122,7 +122,7 @@ endif - if BUILD_FDFORMAT - dist_bashcompletion_DATA += bash-completion/fdformat - endif --if LINUX -+if BUILD_BLOCKDEV - dist_bashcompletion_DATA += bash-completion/blockdev - endif - diff --git a/util-linux-slash-in-format-string.patch b/util-linux-slash-in-format-string.patch deleted file mode 100644 index 49b7a05..0000000 --- a/util-linux-slash-in-format-string.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 82233c2a0a4cce89307061bdc7ffdb58c4936d4f Mon Sep 17 00:00:00 2001 -From: HUANG Wei -Date: Wed, 6 Aug 2014 12:20:18 +0800 -Subject: [PATCH] hexdump: Fix parse format of "byte count without repetition - count" - ---- - text-utils/hexdump-parse.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/text-utils/hexdump-parse.c b/text-utils/hexdump-parse.c -index 37e7086..8d14c5b 100644 ---- a/text-utils/hexdump-parse.c -+++ b/text-utils/hexdump-parse.c -@@ -141,7 +141,7 @@ void add_fmt(const char *fmt, struct hexdump *hex) - - /* Skip slash and trailing white space. */ - if (*p == '/') -- p = skip_space(p); -+ p = skip_space(++p); - - /* byte count */ - if (isdigit(*p)) { --- -2.0.4 - - diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 0ba302d..f388bb8 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Sep 3 16:21:57 CEST 2014 - sbrabec@suse.cz + +- Update to version 2.25.1: + * bug fixes (removed util-linux-bash-completion-blockdev.patch, + util-linux-slash-in-format-string.patch) + * translation updates + * correct support for plurals + * gpt: use real sector size to set PTMAGIC_OFFSET + * gpt: add Microsoft Storage Spaces GUID + * libmount: use -t for type.subtype in helpers API + * erase all traces of the long-obsolete xiafs + ------------------------------------------------------------------- Tue Aug 26 12:15:02 UTC 2014 - schwab@suse.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 93a7f36..c7e7a82 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -23,7 +23,7 @@ Name: util-linux-systemd %define _name util-linux -# WARNING: After editing this file please call pre_checkin.sh to update spec files: +# WARNING: Never edit this file!!! Edit util-linux.spec and call pre_checkin.sh to update spec files: %define _name util-linux # To prevent dependency loop in automatic build systems, we want to # build util-linux in parts. To build all at once, set build_all to 1. @@ -120,7 +120,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.25 +Version: 2.25.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -160,9 +160,6 @@ Source51: blkid.conf Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FEATURE-SUSE -- Report about disabled encryption to stderr. Patch12: util-linux-noenc-suse.patch -# PATCH-FIX-UPSTREAM util-linux-bash-completion-blockdev.patch sbrabec@suse.cz -- Fix bash-completion installation. -Patch13: util-linux-bash-completion-blockdev.patch -Patch14: util-linux-slash-in-format-string.patch ## ## klogconsole ## @@ -386,8 +383,6 @@ xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %setup -q -n %{_name}-%{version} -b 40 %patch4 -p1 %patch12 -p1 -%patch13 -p1 -%patch14 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -610,7 +605,7 @@ export TS_OPT_utmpdump_known_fail="yes" %endif # FIXME: These sometimes fails: export TS_OPT_libmount_lock_known_fail="yes" -# integer overflow (https://github.com/karelzak/util-linux/commit/3a9ec12d6664527fad9c56347c88f3447d6c0856) +# FIXME: It still fails with 3a9ec12: export TS_OPT_ipcs_limits2_known_fail="yes" # # hacks diff --git a/util-linux.changes b/util-linux.changes index 0ba302d..f388bb8 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Sep 3 16:21:57 CEST 2014 - sbrabec@suse.cz + +- Update to version 2.25.1: + * bug fixes (removed util-linux-bash-completion-blockdev.patch, + util-linux-slash-in-format-string.patch) + * translation updates + * correct support for plurals + * gpt: use real sector size to set PTMAGIC_OFFSET + * gpt: add Microsoft Storage Spaces GUID + * libmount: use -t for type.subtype in helpers API + * erase all traces of the long-obsolete xiafs + ------------------------------------------------------------------- Tue Aug 26 12:15:02 UTC 2014 - schwab@suse.de diff --git a/util-linux.spec b/util-linux.spec index 539e1b0..4bf720a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -120,7 +120,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.25 +Version: 2.25.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -160,9 +160,6 @@ Source51: blkid.conf Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FEATURE-SUSE -- Report about disabled encryption to stderr. Patch12: util-linux-noenc-suse.patch -# PATCH-FIX-UPSTREAM util-linux-bash-completion-blockdev.patch sbrabec@suse.cz -- Fix bash-completion installation. -Patch13: util-linux-bash-completion-blockdev.patch -Patch14: util-linux-slash-in-format-string.patch ## ## klogconsole ## @@ -386,8 +383,6 @@ xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %setup -q -n %{_name}-%{version} -b 40 %patch4 -p1 %patch12 -p1 -%patch13 -p1 -%patch14 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -610,7 +605,7 @@ export TS_OPT_utmpdump_known_fail="yes" %endif # FIXME: These sometimes fails: export TS_OPT_libmount_lock_known_fail="yes" -# integer overflow (https://github.com/karelzak/util-linux/commit/3a9ec12d6664527fad9c56347c88f3447d6c0856) +# FIXME: It still fails with 3a9ec12: export TS_OPT_ipcs_limits2_known_fail="yes" # # hacks From 1ac446d94caf17eeb2b7e59b4ea686a0d9b51aa1794dca4ee98405e9935a0255 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sun, 28 Sep 2014 17:53:30 +0000 Subject: [PATCH 184/211] Accepting request 249014 from Base:System - Install runuser and runuser-l PAM file (runuser.pamd, bnc#892079). (forwarded request 248084 from sbrabec) OBS-URL: https://build.opensuse.org/request/show/249014 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=193 --- python-libmount.changes | 6 ++++++ python-libmount.spec | 5 +++++ runuser.pamd | 5 +++++ util-linux-systemd.changes | 6 ++++++ util-linux-systemd.spec | 5 +++++ util-linux.changes | 6 ++++++ util-linux.spec | 5 +++++ 7 files changed, 38 insertions(+) create mode 100644 runuser.pamd diff --git a/python-libmount.changes b/python-libmount.changes index f388bb8..0afc358 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 8 21:04:34 CEST 2014 - sbrabec@suse.cz + +- Install runuser and runuser-l PAM file + (runuser.pamd, bnc#892079). + ------------------------------------------------------------------- Wed Sep 3 16:21:57 CEST 2014 - sbrabec@suse.cz diff --git a/python-libmount.spec b/python-libmount.spec index f67afdd..cb38091 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -141,6 +141,7 @@ Source10: su.pamd Source11: su.default Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring +Source14: runuser.pamd # TODO: split to separate package Source40: klogconsole.tar.bz2 # XXX: Run a program in a new session and with controlling tty @@ -626,6 +627,8 @@ mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8}, install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote +install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser +install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l %if %{with enable_su} install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l @@ -885,6 +888,8 @@ fi %config(noreplace) %{_sysconfdir}/blkid.conf %config(noreplace) %{_sysconfdir}/pam.d/login %config(noreplace) %{_sysconfdir}/pam.d/remote +%config(noreplace) %{_sysconfdir}/pam.d/runuser +%config(noreplace) %{_sysconfdir}/pam.d/runuser-l %if %{with enable_su} %config(noreplace) %{_sysconfdir}/pam.d/su %config(noreplace) %{_sysconfdir}/pam.d/su-l diff --git a/runuser.pamd b/runuser.pamd new file mode 100644 index 0000000..15d79c9 --- /dev/null +++ b/runuser.pamd @@ -0,0 +1,5 @@ +#%PAM-1.0 +# Note that runuser requires only "session" setting (and for example "auth sufficient pam_rootok.so" dummy line). +auth sufficient pam_rootok.so +session include common-session +session optional pam_xauth.so diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index f388bb8..0afc358 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 8 21:04:34 CEST 2014 - sbrabec@suse.cz + +- Install runuser and runuser-l PAM file + (runuser.pamd, bnc#892079). + ------------------------------------------------------------------- Wed Sep 3 16:21:57 CEST 2014 - sbrabec@suse.cz diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index c7e7a82..f65182a 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -141,6 +141,7 @@ Source10: su.pamd Source11: su.default Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring +Source14: runuser.pamd # TODO: split to separate package Source40: klogconsole.tar.bz2 # XXX: Run a program in a new session and with controlling tty @@ -626,6 +627,8 @@ mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8}, install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote +install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser +install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l %if %{with enable_su} install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l @@ -885,6 +888,8 @@ fi %config(noreplace) %{_sysconfdir}/blkid.conf %config(noreplace) %{_sysconfdir}/pam.d/login %config(noreplace) %{_sysconfdir}/pam.d/remote +%config(noreplace) %{_sysconfdir}/pam.d/runuser +%config(noreplace) %{_sysconfdir}/pam.d/runuser-l %if %{with enable_su} %config(noreplace) %{_sysconfdir}/pam.d/su %config(noreplace) %{_sysconfdir}/pam.d/su-l diff --git a/util-linux.changes b/util-linux.changes index f388bb8..0afc358 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 8 21:04:34 CEST 2014 - sbrabec@suse.cz + +- Install runuser and runuser-l PAM file + (runuser.pamd, bnc#892079). + ------------------------------------------------------------------- Wed Sep 3 16:21:57 CEST 2014 - sbrabec@suse.cz diff --git a/util-linux.spec b/util-linux.spec index 4bf720a..9406d50 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -141,6 +141,7 @@ Source10: su.pamd Source11: su.default Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring +Source14: runuser.pamd # TODO: split to separate package Source40: klogconsole.tar.bz2 # XXX: Run a program in a new session and with controlling tty @@ -626,6 +627,8 @@ mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8}, install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote +install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser +install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l %if %{with enable_su} install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l @@ -885,6 +888,8 @@ fi %config(noreplace) %{_sysconfdir}/blkid.conf %config(noreplace) %{_sysconfdir}/pam.d/login %config(noreplace) %{_sysconfdir}/pam.d/remote +%config(noreplace) %{_sysconfdir}/pam.d/runuser +%config(noreplace) %{_sysconfdir}/pam.d/runuser-l %if %{with enable_su} %config(noreplace) %{_sysconfdir}/pam.d/su %config(noreplace) %{_sysconfdir}/pam.d/su-l From 59d6aa33484bbb22baafa88852ceecd50d2d8c6efe2aaad032c275e1efb63069 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 7 Nov 2014 13:07:04 +0000 Subject: [PATCH 185/211] Accepting request 259170 from Base:System - Fix mis-compilation of libuuid without uuidd support (bnc#900935). - Fix uuidd socket activation (bnc#900935). - Remove obsolete sysvinit script for uuidd. - Remove no more needed uuidd permissions stuff. - Replace PreReq for obsolete pwdutils by names of binaries. - Add fstrim service scripts and rcfstrim helper. OBS-URL: https://build.opensuse.org/request/show/259170 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=194 --- python-libmount.changes | 11 ++++++ python-libmount.spec | 76 +++++++++++++++++++++++++------------ util-linux-systemd.changes | 11 ++++++ util-linux-systemd.spec | 76 +++++++++++++++++++++++++------------ util-linux.changes | 11 ++++++ util-linux.spec | 76 +++++++++++++++++++++++++------------ uuidd.rc | 77 -------------------------------------- 7 files changed, 189 insertions(+), 149 deletions(-) delete mode 100644 uuidd.rc diff --git a/python-libmount.changes b/python-libmount.changes index 0afc358..af3bd47 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Oct 17 21:18:43 CEST 2014 - sbrabec@suse.cz + +- Fix mis-compilation of libuuid without uuidd support + (bnc#900935). +- Fix uuidd socket activation (bnc#900935). +- Remove obsolete sysvinit script for uuidd. +- Remove no more needed uuidd permissions stuff. +- Replace PreReq for obsolete pwdutils by names of binaries. +- Add fstrim service scripts and rcfstrim helper. + ------------------------------------------------------------------- Mon Sep 8 21:04:34 CEST 2014 - sbrabec@suse.cz diff --git a/python-libmount.spec b/python-libmount.spec index cb38091..eb049da 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -152,7 +152,6 @@ Source28: mkzimage_cmdline.8 Source29: mkzimage_cmdline.c Source31: addnote.c # -Source50: uuidd.rc Source51: blkid.conf ## ## util-linux patches @@ -219,6 +218,7 @@ Supplements: packageand(util-linux:systemd) Provides: util-linux:/usr/lib/systemd/system/fstrim.service # Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 Conflicts: util-linux < 2.25 +%systemd_requires %else # ERROR: No build_* variables are set. %endif @@ -350,12 +350,11 @@ This package contains low-level util-linux utilities that use systemd. %package -n uuidd Summary: Helper daemon to guarantee uniqueness of time-based UUIDs Group: System/Filesystems -PreReq: %fillup_prereq -PreReq: %insserv_prereq -PreReq: permissions -PreReq: pwdutils +Requires(pre): /usr/sbin/groupadd +Requires(pre): /usr/sbin/useradd # uuidd bash-completion moved to a correct package Conflicts: util-linux < 2.25 +%systemd_requires %description -n uuidd The uuidd package contains a userspace daemon (uuidd) which guarantees @@ -394,6 +393,13 @@ pushd ../klogconsole popd %build +#BEGIN CONFIG ALTER +%if !%build_util_linux_systemd +# We are not building util_linux_systemd => we are not building uuidd +# But we want libuuid with support of uuidd. The default configure disables it as well. +sed -i '/^AM_CONDITIONAL.*BUILD_UUIDD/a AC_DEFINE([HAVE_UUIDD], [1], [Define to 1 if you want to use uuid daemon.])' configure.ac +%endif +#END CONFIG ALTER %if %build_util_linux pushd ../klogconsole # klogconsole build @@ -570,6 +576,8 @@ export SUID_LDFLAGS="-pie" --without-python \ %endif # +# Safety check: HAVE_UUIDD should be always 1: +grep -q 'HAVE_UUIDD 1' config.h make %{?_smp_mflags} # %if %build_util_linux @@ -767,17 +775,18 @@ find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ # install systemd files manually, don't use Makefile that expect build of utilities and its dependencies. %endif %if %build_util_linux_systemd -mkdir -p %{buildroot}%{_sysconfdir}/init.d mkdir -p %{buildroot}/bin mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid mkdir -p %{buildroot}/run/uuidd -install -m 744 %{SOURCE50} %{buildroot}%{_initddir}/uuidd +mkdir -p %{buildroot}/usr/lib/systemd/system-preset ln -s %{_bindir}/logger %{buildroot}/bin # clock.txt from uuidd is a ghost file touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt -# rcuuidd helper -ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd +ln -sf /sbin/service %{buildroot}/usr/sbin/rcuuidd +ln -sf /sbin/service %{buildroot}/usr/sbin/rcfstrim +# Use socket activated uuidd by default. +echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/systemd/system-preset/50-uuidd.preset %if !%build_util_linux %make_install %endif @@ -845,24 +854,42 @@ fi %endif %if %build_util_linux_systemd -%pre -n uuidd -%{_sbindir}/groupadd -r uuidd 2>/dev/null || : -%{_sbindir}/useradd -r -g uuidd -c "User for uuidd" \ - -d /var/run/uuidd uuidd 2>/dev/null || : +# Note: This is not a perfect solution: fstrim is part of util-linux, fstrim services are part of util-linux-systemd (for build loop prevention reasons). +# If only util-linux is updated, restart of fstrim service does not happen. +# Maybe we should move fstrim to util-linux-systemd in the next version. +%pre -n util-linux-systemd +%{service_add_pre fstrim.service fstrim.timer} -%preun -n uuidd -%{stop_on_removal uuidd} +%post -n util-linux-systemd +%{service_add_post fstrim.service fstrim.timer} + +%preun -n util-linux-systemd +%{service_del_preun fstrim.service fstrim.timer} + +%postun -n util-linux-systemd +%{service_del_postun fstrim.service fstrim.timer} + +%pre -n uuidd +/usr/sbin/groupadd -r uuidd 2>/dev/null || : +/usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ + -d /var/run/uuidd uuidd 2>/dev/null || : +%{service_add_pre uuidd.socket uuidd.service} +# trick: service existed before, but it had no preset before 13.2 and in SLE12. Force %%service_add_post to run preset. +if [ $1 -gt 1 ] ; then + if ! test -f /usr/lib/systemd/system-preset/50-uuidd.preset ; then + echo -n "" >/run/rpm-%{name}-update-uuidd.socket-new-in-upgrade + echo -n "" >/run/rpm-%{name}-update-uuidd.service-new-in-upgrade + fi +fi %post -n uuidd -%{fillup_and_insserv -n uuidd} -%set_permissions %{_sbindir}/uuidd +%{service_add_post uuidd.socket uuidd.service} + +%preun -n uuidd +%{service_del_preun uuidd.socket uuidd.service} %postun -n uuidd -%{restart_on_update uuidd} -%{insserv_cleanup} - -%verifyscript -n uuidd -%verify_permissions -e %{_sbindir}/uuidd +%{service_del_postun uuidd.socket uuidd.service} %endif %if %build_util_linux @@ -1276,21 +1303,22 @@ fi %{_datadir}/bash-completion/logger %{_mandir}/man1/logger.1.gz %{_mandir}/man1/lslogins.1.gz +%{_sbindir}/rcfstrim %{_unitdir}/fstrim.service %{_unitdir}/fstrim.timer %files -n uuidd %defattr(-, root, root) -%verify(not mode) %attr(0755,root,root) %{_sbindir}/uuidd +%{_sbindir}/uuidd %attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid %ghost %{_localstatedir}/lib/libuuid/clock.txt %attr(-,uuidd,uuidd) %ghost %dir /run/uuidd %{_datadir}/bash-completion/uuidd -%{_initddir}/uuidd %{_mandir}/man8/uuidd.8.gz %{_sbindir}/rcuuidd %{_unitdir}/uuidd.service %{_unitdir}/uuidd.socket +/usr/lib/systemd/system-preset/50-uuidd.preset %endif %if %build_python_libmount diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 0afc358..af3bd47 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Oct 17 21:18:43 CEST 2014 - sbrabec@suse.cz + +- Fix mis-compilation of libuuid without uuidd support + (bnc#900935). +- Fix uuidd socket activation (bnc#900935). +- Remove obsolete sysvinit script for uuidd. +- Remove no more needed uuidd permissions stuff. +- Replace PreReq for obsolete pwdutils by names of binaries. +- Add fstrim service scripts and rcfstrim helper. + ------------------------------------------------------------------- Mon Sep 8 21:04:34 CEST 2014 - sbrabec@suse.cz diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index f65182a..d2fc486 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -152,7 +152,6 @@ Source28: mkzimage_cmdline.8 Source29: mkzimage_cmdline.c Source31: addnote.c # -Source50: uuidd.rc Source51: blkid.conf ## ## util-linux patches @@ -219,6 +218,7 @@ Supplements: packageand(util-linux:systemd) Provides: util-linux:/usr/lib/systemd/system/fstrim.service # Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 Conflicts: util-linux < 2.25 +%systemd_requires %else # ERROR: No build_* variables are set. %endif @@ -350,12 +350,11 @@ This package contains low-level util-linux utilities that use systemd. %package -n uuidd Summary: Helper daemon to guarantee uniqueness of time-based UUIDs Group: System/Filesystems -PreReq: %fillup_prereq -PreReq: %insserv_prereq -PreReq: permissions -PreReq: pwdutils +Requires(pre): /usr/sbin/groupadd +Requires(pre): /usr/sbin/useradd # uuidd bash-completion moved to a correct package Conflicts: util-linux < 2.25 +%systemd_requires %description -n uuidd The uuidd package contains a userspace daemon (uuidd) which guarantees @@ -394,6 +393,13 @@ pushd ../klogconsole popd %build +#BEGIN CONFIG ALTER +%if !%build_util_linux_systemd +# We are not building util_linux_systemd => we are not building uuidd +# But we want libuuid with support of uuidd. The default configure disables it as well. +sed -i '/^AM_CONDITIONAL.*BUILD_UUIDD/a AC_DEFINE([HAVE_UUIDD], [1], [Define to 1 if you want to use uuid daemon.])' configure.ac +%endif +#END CONFIG ALTER %if %build_util_linux pushd ../klogconsole # klogconsole build @@ -570,6 +576,8 @@ export SUID_LDFLAGS="-pie" --without-python \ %endif # +# Safety check: HAVE_UUIDD should be always 1: +grep -q 'HAVE_UUIDD 1' config.h make %{?_smp_mflags} # %if %build_util_linux @@ -767,17 +775,18 @@ find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ # install systemd files manually, don't use Makefile that expect build of utilities and its dependencies. %endif %if %build_util_linux_systemd -mkdir -p %{buildroot}%{_sysconfdir}/init.d mkdir -p %{buildroot}/bin mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid mkdir -p %{buildroot}/run/uuidd -install -m 744 %{SOURCE50} %{buildroot}%{_initddir}/uuidd +mkdir -p %{buildroot}/usr/lib/systemd/system-preset ln -s %{_bindir}/logger %{buildroot}/bin # clock.txt from uuidd is a ghost file touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt -# rcuuidd helper -ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd +ln -sf /sbin/service %{buildroot}/usr/sbin/rcuuidd +ln -sf /sbin/service %{buildroot}/usr/sbin/rcfstrim +# Use socket activated uuidd by default. +echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/systemd/system-preset/50-uuidd.preset %if !%build_util_linux %make_install %endif @@ -845,24 +854,42 @@ fi %endif %if %build_util_linux_systemd -%pre -n uuidd -%{_sbindir}/groupadd -r uuidd 2>/dev/null || : -%{_sbindir}/useradd -r -g uuidd -c "User for uuidd" \ - -d /var/run/uuidd uuidd 2>/dev/null || : +# Note: This is not a perfect solution: fstrim is part of util-linux, fstrim services are part of util-linux-systemd (for build loop prevention reasons). +# If only util-linux is updated, restart of fstrim service does not happen. +# Maybe we should move fstrim to util-linux-systemd in the next version. +%pre -n util-linux-systemd +%{service_add_pre fstrim.service fstrim.timer} -%preun -n uuidd -%{stop_on_removal uuidd} +%post -n util-linux-systemd +%{service_add_post fstrim.service fstrim.timer} + +%preun -n util-linux-systemd +%{service_del_preun fstrim.service fstrim.timer} + +%postun -n util-linux-systemd +%{service_del_postun fstrim.service fstrim.timer} + +%pre -n uuidd +/usr/sbin/groupadd -r uuidd 2>/dev/null || : +/usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ + -d /var/run/uuidd uuidd 2>/dev/null || : +%{service_add_pre uuidd.socket uuidd.service} +# trick: service existed before, but it had no preset before 13.2 and in SLE12. Force %%service_add_post to run preset. +if [ $1 -gt 1 ] ; then + if ! test -f /usr/lib/systemd/system-preset/50-uuidd.preset ; then + echo -n "" >/run/rpm-%{name}-update-uuidd.socket-new-in-upgrade + echo -n "" >/run/rpm-%{name}-update-uuidd.service-new-in-upgrade + fi +fi %post -n uuidd -%{fillup_and_insserv -n uuidd} -%set_permissions %{_sbindir}/uuidd +%{service_add_post uuidd.socket uuidd.service} + +%preun -n uuidd +%{service_del_preun uuidd.socket uuidd.service} %postun -n uuidd -%{restart_on_update uuidd} -%{insserv_cleanup} - -%verifyscript -n uuidd -%verify_permissions -e %{_sbindir}/uuidd +%{service_del_postun uuidd.socket uuidd.service} %endif %if %build_util_linux @@ -1276,21 +1303,22 @@ fi %{_datadir}/bash-completion/logger %{_mandir}/man1/logger.1.gz %{_mandir}/man1/lslogins.1.gz +%{_sbindir}/rcfstrim %{_unitdir}/fstrim.service %{_unitdir}/fstrim.timer %files -n uuidd %defattr(-, root, root) -%verify(not mode) %attr(0755,root,root) %{_sbindir}/uuidd +%{_sbindir}/uuidd %attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid %ghost %{_localstatedir}/lib/libuuid/clock.txt %attr(-,uuidd,uuidd) %ghost %dir /run/uuidd %{_datadir}/bash-completion/uuidd -%{_initddir}/uuidd %{_mandir}/man8/uuidd.8.gz %{_sbindir}/rcuuidd %{_unitdir}/uuidd.service %{_unitdir}/uuidd.socket +/usr/lib/systemd/system-preset/50-uuidd.preset %endif %if %build_python_libmount diff --git a/util-linux.changes b/util-linux.changes index 0afc358..af3bd47 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Oct 17 21:18:43 CEST 2014 - sbrabec@suse.cz + +- Fix mis-compilation of libuuid without uuidd support + (bnc#900935). +- Fix uuidd socket activation (bnc#900935). +- Remove obsolete sysvinit script for uuidd. +- Remove no more needed uuidd permissions stuff. +- Replace PreReq for obsolete pwdutils by names of binaries. +- Add fstrim service scripts and rcfstrim helper. + ------------------------------------------------------------------- Mon Sep 8 21:04:34 CEST 2014 - sbrabec@suse.cz diff --git a/util-linux.spec b/util-linux.spec index 9406d50..3c37cb8 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -152,7 +152,6 @@ Source28: mkzimage_cmdline.8 Source29: mkzimage_cmdline.c Source31: addnote.c # -Source50: uuidd.rc Source51: blkid.conf ## ## util-linux patches @@ -219,6 +218,7 @@ Supplements: packageand(util-linux:systemd) Provides: util-linux:/usr/lib/systemd/system/fstrim.service # Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 Conflicts: util-linux < 2.25 +%systemd_requires %else # ERROR: No build_* variables are set. %endif @@ -350,12 +350,11 @@ This package contains low-level util-linux utilities that use systemd. %package -n uuidd Summary: Helper daemon to guarantee uniqueness of time-based UUIDs Group: System/Filesystems -PreReq: %fillup_prereq -PreReq: %insserv_prereq -PreReq: permissions -PreReq: pwdutils +Requires(pre): /usr/sbin/groupadd +Requires(pre): /usr/sbin/useradd # uuidd bash-completion moved to a correct package Conflicts: util-linux < 2.25 +%systemd_requires %description -n uuidd The uuidd package contains a userspace daemon (uuidd) which guarantees @@ -394,6 +393,13 @@ pushd ../klogconsole popd %build +#BEGIN CONFIG ALTER +%if !%build_util_linux_systemd +# We are not building util_linux_systemd => we are not building uuidd +# But we want libuuid with support of uuidd. The default configure disables it as well. +sed -i '/^AM_CONDITIONAL.*BUILD_UUIDD/a AC_DEFINE([HAVE_UUIDD], [1], [Define to 1 if you want to use uuid daemon.])' configure.ac +%endif +#END CONFIG ALTER %if %build_util_linux pushd ../klogconsole # klogconsole build @@ -570,6 +576,8 @@ export SUID_LDFLAGS="-pie" --without-python \ %endif # +# Safety check: HAVE_UUIDD should be always 1: +grep -q 'HAVE_UUIDD 1' config.h make %{?_smp_mflags} # %if %build_util_linux @@ -767,17 +775,18 @@ find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ # install systemd files manually, don't use Makefile that expect build of utilities and its dependencies. %endif %if %build_util_linux_systemd -mkdir -p %{buildroot}%{_sysconfdir}/init.d mkdir -p %{buildroot}/bin mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid mkdir -p %{buildroot}/run/uuidd -install -m 744 %{SOURCE50} %{buildroot}%{_initddir}/uuidd +mkdir -p %{buildroot}/usr/lib/systemd/system-preset ln -s %{_bindir}/logger %{buildroot}/bin # clock.txt from uuidd is a ghost file touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt -# rcuuidd helper -ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd +ln -sf /sbin/service %{buildroot}/usr/sbin/rcuuidd +ln -sf /sbin/service %{buildroot}/usr/sbin/rcfstrim +# Use socket activated uuidd by default. +echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/systemd/system-preset/50-uuidd.preset %if !%build_util_linux %make_install %endif @@ -845,24 +854,42 @@ fi %endif %if %build_util_linux_systemd -%pre -n uuidd -%{_sbindir}/groupadd -r uuidd 2>/dev/null || : -%{_sbindir}/useradd -r -g uuidd -c "User for uuidd" \ - -d /var/run/uuidd uuidd 2>/dev/null || : +# Note: This is not a perfect solution: fstrim is part of util-linux, fstrim services are part of util-linux-systemd (for build loop prevention reasons). +# If only util-linux is updated, restart of fstrim service does not happen. +# Maybe we should move fstrim to util-linux-systemd in the next version. +%pre -n util-linux-systemd +%{service_add_pre fstrim.service fstrim.timer} -%preun -n uuidd -%{stop_on_removal uuidd} +%post -n util-linux-systemd +%{service_add_post fstrim.service fstrim.timer} + +%preun -n util-linux-systemd +%{service_del_preun fstrim.service fstrim.timer} + +%postun -n util-linux-systemd +%{service_del_postun fstrim.service fstrim.timer} + +%pre -n uuidd +/usr/sbin/groupadd -r uuidd 2>/dev/null || : +/usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ + -d /var/run/uuidd uuidd 2>/dev/null || : +%{service_add_pre uuidd.socket uuidd.service} +# trick: service existed before, but it had no preset before 13.2 and in SLE12. Force %%service_add_post to run preset. +if [ $1 -gt 1 ] ; then + if ! test -f /usr/lib/systemd/system-preset/50-uuidd.preset ; then + echo -n "" >/run/rpm-%{name}-update-uuidd.socket-new-in-upgrade + echo -n "" >/run/rpm-%{name}-update-uuidd.service-new-in-upgrade + fi +fi %post -n uuidd -%{fillup_and_insserv -n uuidd} -%set_permissions %{_sbindir}/uuidd +%{service_add_post uuidd.socket uuidd.service} + +%preun -n uuidd +%{service_del_preun uuidd.socket uuidd.service} %postun -n uuidd -%{restart_on_update uuidd} -%{insserv_cleanup} - -%verifyscript -n uuidd -%verify_permissions -e %{_sbindir}/uuidd +%{service_del_postun uuidd.socket uuidd.service} %endif %if %build_util_linux @@ -1276,21 +1303,22 @@ fi %{_datadir}/bash-completion/logger %{_mandir}/man1/logger.1.gz %{_mandir}/man1/lslogins.1.gz +%{_sbindir}/rcfstrim %{_unitdir}/fstrim.service %{_unitdir}/fstrim.timer %files -n uuidd %defattr(-, root, root) -%verify(not mode) %attr(0755,root,root) %{_sbindir}/uuidd +%{_sbindir}/uuidd %attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid %ghost %{_localstatedir}/lib/libuuid/clock.txt %attr(-,uuidd,uuidd) %ghost %dir /run/uuidd %{_datadir}/bash-completion/uuidd -%{_initddir}/uuidd %{_mandir}/man8/uuidd.8.gz %{_sbindir}/rcuuidd %{_unitdir}/uuidd.service %{_unitdir}/uuidd.socket +/usr/lib/systemd/system-preset/50-uuidd.preset %endif %if %build_python_libmount diff --git a/uuidd.rc b/uuidd.rc deleted file mode 100644 index 271a0d2..0000000 --- a/uuidd.rc +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: uuidd -# Required-Start: $time $local_fs $remote_fs -# Should-Start: -# Required-Stop: $time $local_fs $remote_fs -# Should-Stop: -# Default-Start: 2 3 5 -# Default-Stop: 0 1 2 6 -# Short-Description: UUID generating daemon -# Description: UUID generating daemon -### END INIT INFO -# - - -UUIDD_BIN=/usr/sbin/uuidd -UUIDD_PID_PATH=/var/run/uuidd -UUIDD_OPTIONS="-q -T 0" - -test -x $UUIDD_BIN || { echo "$UUIDD_BIN not installed"; - if [ "$1" = "stop" ]; then exit 0; - else exit 5; fi; } - -. /etc/rc.status - -# Reset status of this service -rc_reset - -case "$1" in - start) - echo -n "Starting uuidd " - mkdir -p $UUIDD_PID_PATH - chown uuidd:uuidd $UUIDD_PID_PATH - /sbin/startproc -u uuidd -g uuidd $UUIDD_BIN $UUIDD_OPTIONS - rc_status -v - ;; - stop) - echo -n "Shutting down uuidd " - /sbin/killproc -TERM $UUIDD_BIN - rc_status -v - ;; - try-restart|condrestart|force-reload) - ## Do a restart only if the service was active before. - ## Note: try-restart is now part of LSB (as of 1.9). - ## RH has a similar command named condrestart. - if test "$1" = "condrestart"; then - echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}" - fi - $0 status - if test $? = 0; then - $0 restart - else - rc_reset # Not running is not a failure. - fi - # Remember status and be quiet - rc_status - ;; - restart) - $0 stop - $0 start - rc_status - ;; - reload) - rc_failed 3 - rc_status -v - ;; - status) - echo -n "Checking for service uuidd " - /sbin/checkproc $UUIDD_BIN - rc_status -v - ;; - *) - echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" - exit 1 - ;; -esac -rc_exit From 3da04ee48a7c62489bfc32afcb7109246d76b579d4b6639ecc3eef8d098c9fd4 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Tue, 18 Nov 2014 21:53:10 +0000 Subject: [PATCH 186/211] Accepting request 261333 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/261333 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=195 --- python-libmount.changes | 5 +++++ python-libmount.spec | 5 +++-- util-linux-systemd.changes | 5 +++++ util-linux-systemd.spec | 2 +- util-linux.changes | 5 +++++ util-linux.spec | 2 +- 6 files changed, 20 insertions(+), 4 deletions(-) diff --git a/python-libmount.changes b/python-libmount.changes index af3bd47..8189eb9 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 11 10:57:12 UTC 2014 - schwab@suse.de + +- Remove known fail marker for fdisk/bsd on ppc, ppc64, s390, s390x + ------------------------------------------------------------------- Fri Oct 17 21:18:43 CEST 2014 - sbrabec@suse.cz diff --git a/python-libmount.spec b/python-libmount.spec index eb049da..a9f3c16 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -76,7 +76,7 @@ Name: python-libmount %endif Summary: %main_summary License: GPL-2.0+ -Group: %main_group +Group: %group_pl BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel @@ -366,6 +366,7 @@ SMP systems. %if %build_util_linux %package -n python-libmount Summary: %summary_pl +License: GPL-2.0+ Group: %group_pl %description -n python-libmount @@ -587,7 +588,7 @@ make %{?_smp_mflags} %check # mark some tests "known_fail" -%ifarch ppc ppc64 ppc64le s390 s390x +%ifarch ppc64le export TS_OPT_fdisk_bsd_known_fail="yes" %endif %ifarch %{ix86} diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index af3bd47..8189eb9 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 11 10:57:12 UTC 2014 - schwab@suse.de + +- Remove known fail marker for fdisk/bsd on ppc, ppc64, s390, s390x + ------------------------------------------------------------------- Fri Oct 17 21:18:43 CEST 2014 - sbrabec@suse.cz diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index d2fc486..ce65f8b 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -587,7 +587,7 @@ make %{?_smp_mflags} %check # mark some tests "known_fail" -%ifarch ppc ppc64 ppc64le s390 s390x +%ifarch ppc64le export TS_OPT_fdisk_bsd_known_fail="yes" %endif %ifarch %{ix86} diff --git a/util-linux.changes b/util-linux.changes index af3bd47..8189eb9 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 11 10:57:12 UTC 2014 - schwab@suse.de + +- Remove known fail marker for fdisk/bsd on ppc, ppc64, s390, s390x + ------------------------------------------------------------------- Fri Oct 17 21:18:43 CEST 2014 - sbrabec@suse.cz diff --git a/util-linux.spec b/util-linux.spec index 3c37cb8..4368b74 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -587,7 +587,7 @@ make %{?_smp_mflags} %check # mark some tests "known_fail" -%ifarch ppc ppc64 ppc64le s390 s390x +%ifarch ppc64le export TS_OPT_fdisk_bsd_known_fail="yes" %endif %ifarch %{ix86} From 5a74f9155bc9e4ff0329ee60186115be88872acc8f4f8016c7609d7cc0344045 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 30 Jan 2015 05:00:58 +0000 Subject: [PATCH 187/211] Accepting request 281410 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/281410 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=196 --- login.pamd | 1 - python-libmount.changes | 10 ++++++++++ python-libmount.spec | 2 +- util-linux-systemd.changes | 10 ++++++++++ util-linux-systemd.spec | 2 +- util-linux.changes | 10 ++++++++++ util-linux.spec | 2 +- 7 files changed, 33 insertions(+), 4 deletions(-) diff --git a/login.pamd b/login.pamd index 13df590..93fc60e 100644 --- a/login.pamd +++ b/login.pamd @@ -1,6 +1,5 @@ #%PAM-1.0 auth requisite pam_nologin.so -auth [user_unknown=ignore success=ok ignore=ignore auth_err=die default=bad] pam_securetty.so auth include common-auth account include common-account password include common-password diff --git a/python-libmount.changes b/python-libmount.changes index 8189eb9..aefa97f 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sat Jan 10 02:24:25 UTC 2015 - jengelh@inai.de + +- Remove pam_securetty.so from /etc/pam.d/login. By definition, + local logins are always secure. Remote logins actually use + /etc/pam.d/remote by way of `/bin/login -h` (such as rlogind). + This solves the problem that root logins are erroneously rejected + when using kmscon(8) or `machinectl login`, because they use + ptys. + ------------------------------------------------------------------- Tue Nov 11 10:57:12 UTC 2014 - schwab@suse.de diff --git a/python-libmount.spec b/python-libmount.spec index a9f3c16..08b1d77 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -1,7 +1,7 @@ # # spec file for package python-libmount # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 8189eb9..aefa97f 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sat Jan 10 02:24:25 UTC 2015 - jengelh@inai.de + +- Remove pam_securetty.so from /etc/pam.d/login. By definition, + local logins are always secure. Remote logins actually use + /etc/pam.d/remote by way of `/bin/login -h` (such as rlogind). + This solves the problem that root logins are erroneously rejected + when using kmscon(8) or `machinectl login`, because they use + ptys. + ------------------------------------------------------------------- Tue Nov 11 10:57:12 UTC 2014 - schwab@suse.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index ce65f8b..7fb79f5 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux-systemd # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/util-linux.changes b/util-linux.changes index 8189eb9..aefa97f 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sat Jan 10 02:24:25 UTC 2015 - jengelh@inai.de + +- Remove pam_securetty.so from /etc/pam.d/login. By definition, + local logins are always secure. Remote logins actually use + /etc/pam.d/remote by way of `/bin/login -h` (such as rlogind). + This solves the problem that root logins are erroneously rejected + when using kmscon(8) or `machinectl login`, because they use + ptys. + ------------------------------------------------------------------- Tue Nov 11 10:57:12 UTC 2014 - schwab@suse.de diff --git a/util-linux.spec b/util-linux.spec index 4368b74..802815b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed From 80e621960ba7323317959a5b3602ab9ba808983924a864a31e76c347b6baa28c Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 16 Feb 2015 14:02:47 +0000 Subject: [PATCH 188/211] Accepting request 285829 from Base:System - Do not try to unregister an info file (ipc.info.gz) which we do not own. Already in May 2011, we stopped registering it: "do not register ipc.info.gz (not provided by this package)". - libblkid: care about unsafe chars and possible buffer overflow in cache (CVE-2014-9114, util-linux-libblkid-unsafe-chars.patch, util-linux-libblkid-overflow.patch, bsc#907434) - Update to version 2.25.2: mostly minor fixes (including boo#908742) - re-enable utmpdump and ipcs tests for all archs - Use util-linux:/bin/logger as split-provide, /usr/lib/systemd/system/fstrim.service didn't exist in 13.1 - Do not try to unregister an info file (ipc.info.gz) which we do not own. Already in May 2011, we stopped registering it: "do not register ipc.info.gz (not provided by this package)". - libblkid: care about unsafe chars and possible buffer overflow in cache (CVE-2014-9114, util-linux-libblkid-unsafe-chars.patch, util-linux-libblkid-overflow.patch, bsc#907434) - Update to version 2.25.2: mostly minor fixes (including boo#908742) - re-enable utmpdump and ipcs tests for all archs - Use util-linux:/bin/logger as split-provide, /usr/lib/systemd/system/fstrim.service didn't exist in 13.1 OBS-URL: https://build.opensuse.org/request/show/285829 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=197 --- python-libmount.changes | 27 ++++ python-libmount.spec | 20 ++- util-linux-2.25.1.tar.sign | 17 --- util-linux-2.25.1.tar.xz | 3 - util-linux-2.25.2.tar.sign | 17 +++ util-linux-2.25.2.tar.xz | 3 + util-linux-libblkid-overflow.patch | 101 +++++++++++++++ util-linux-libblkid-unsafe-chars.patch | 167 +++++++++++++++++++++++++ util-linux-systemd.changes | 27 ++++ util-linux-systemd.spec | 20 ++- util-linux.changes | 27 ++++ util-linux.spec | 20 ++- 12 files changed, 396 insertions(+), 53 deletions(-) delete mode 100644 util-linux-2.25.1.tar.sign delete mode 100644 util-linux-2.25.1.tar.xz create mode 100644 util-linux-2.25.2.tar.sign create mode 100644 util-linux-2.25.2.tar.xz create mode 100644 util-linux-libblkid-overflow.patch create mode 100644 util-linux-libblkid-unsafe-chars.patch diff --git a/python-libmount.changes b/python-libmount.changes index aefa97f..50f9cc0 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,30 @@ +------------------------------------------------------------------- +Fri Feb 6 17:01:02 UTC 2015 - dimstar@opensuse.org + +- Do not try to unregister an info file (ipc.info.gz) which we do + not own. Already in May 2011, we stopped registering it: "do not + register ipc.info.gz (not provided by this package)". + +------------------------------------------------------------------- +Wed Feb 4 19:08:43 CET 2015 - sbrabec@suse.cz + +- libblkid: care about unsafe chars and possible buffer overflow + in cache (CVE-2014-9114, util-linux-libblkid-unsafe-chars.patch, + util-linux-libblkid-overflow.patch, bsc#907434) + +------------------------------------------------------------------- +Thu Jan 29 14:13:41 UTC 2015 - sweet_f_a@gmx.de + +- Update to version 2.25.2: mostly minor fixes + (including boo#908742) +- re-enable utmpdump and ipcs tests for all archs + +------------------------------------------------------------------- +Thu Jan 15 17:15:47 UTC 2015 - schwab@linux-m68k.org + +- Use util-linux:/bin/logger as split-provide, + /usr/lib/systemd/system/fstrim.service didn't exist in 13.1 + ------------------------------------------------------------------- Sat Jan 10 02:24:25 UTC 2015 - jengelh@inai.de diff --git a/python-libmount.spec b/python-libmount.spec index 08b1d77..f98583f 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -1,7 +1,7 @@ # # spec file for package python-libmount # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -120,7 +120,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.25.1 +Version: 2.25.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -160,6 +160,10 @@ Source51: blkid.conf Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FEATURE-SUSE -- Report about disabled encryption to stderr. Patch12: util-linux-noenc-suse.patch +# PATCH-FIX-SECURITY util-linux-libblkid-unsafe-chars.patch bsc907434 CVE-2014-9114 sbrabec@suse.cz -- libblkid: care about unsafe chars in cache +Patch13: util-linux-libblkid-unsafe-chars.patch +# PATCH-FIX-SECURITY util-linux-libblkid-overflow.patch bsc907434 CVE-2014-9114 sbrabec@suse.cz -- libblkid: fix possible buffer overflow +Patch14: util-linux-libblkid-overflow.patch ## ## klogconsole ## @@ -215,7 +219,7 @@ Recommends: which %if %build_util_linux_systemd Supplements: packageand(util-linux:systemd) # Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 -Provides: util-linux:/usr/lib/systemd/system/fstrim.service +Provides: util-linux:/bin/logger # Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 Conflicts: util-linux < 2.25 %systemd_requires @@ -384,6 +388,8 @@ xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %setup -q -n %{_name}-%{version} -b 40 %patch4 -p1 %patch12 -p1 +%patch13 -p1 +%patch14 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -610,13 +616,8 @@ export TS_OPT_kill_name_to_number_known_fail="yes" export TS_OPT_kill_print_pid_known_fail="yes" export TS_OPT_kill_queue_known_fail="yes" %endif -%ifarch aarch64 s390 s390x -export TS_OPT_utmpdump_known_fail="yes" -%endif # FIXME: These sometimes fails: export TS_OPT_libmount_lock_known_fail="yes" -# FIXME: It still fails with 3a9ec12: -export TS_OPT_ipcs_limits2_known_fail="yes" # # hacks export PATH="$PATH:/sbin:/usr/sbin" @@ -826,7 +827,6 @@ if [ -f etc/fstab ]; then fi %postun -%install_info_delete --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %{insserv_cleanup} %verifyscript @@ -902,14 +902,12 @@ fi %doc Documentation/cal.txt %doc Documentation/col.txt %doc Documentation/deprecated.txt -%doc Documentation/fdisk.txt %doc Documentation/getopt.txt %doc Documentation/howto-debug.txt %doc Documentation/hwclock.txt %doc Documentation/modems-with-agetty.txt %doc Documentation/mount.txt %doc Documentation/pg.txt -%doc Documentation/sfdisk.txt %config %attr(744,root,root) %{_sysconfdir}/init.d/raw %config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw %config(noreplace) %{_sysconfdir}/filesystems diff --git a/util-linux-2.25.1.tar.sign b/util-linux-2.25.1.tar.sign deleted file mode 100644 index 75ede4f..0000000 --- a/util-linux-2.25.1.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQIcBAABAgAGBQJUBu2tAAoJEOS3HV7sOcKEkGoP/18DDxNf35S8AQeXlI8fxGNL -+3udU3DWmYLHepRx3fF4swiQiyVE44YdOyTQsqVNr87dPmh2HeO8ewy1dRqaalJi -+FdU7BXYLz9pKOZpiSdD3DmzqTAMeBUC0m1zkCdO0aYHExMckVFRkDot26n4geEQ -vb0zN67bNK8J0Pif5XDmA0xMlwuvBSe2Epmjhf5snNXOqjArRmwbSEwhk77TfH0F -NrBoyQryKwhUio8P4z1U4Gu1SaNBolemgItDV9VqpNl38rY4U7EejGcEUQGseImt -q49SBYBZ3jSxO0urfT8Nlw9gbrVOd8fHQkaHfJrROJePGckDo+sDDCKTGZGqx45q -+Q6L7Uik+UNFVeBhhe22ctfi3oytNheNjPMx2hYs/jslqluMxmggm39Y8PBS/ZwT -zp951T0XMx/kwBizD8NSvGHkALNcbFP1HCUVb5IsgOtZba3LusKi23W4mplCnmfD -0RiwBoPkcFWwJb3Ih5mK0ahZLEDjMpyt/GLVdAh6SFdEDvdIcfjDUNRuXTDtg28/ -80XyBFe+hqGtutHRLF0K1lOqt5pNyXsnKiS6UdH/Detl8g7F/BUmBFRnxfpNqLab -AvKW+TLryi1Ilrtpj1Va6KzdmFzK84KIxrmPmWpcyt16HDVnlcqrvdhLjD/Wx2Wt -VGUYi2GOUXFBCIJrZ50d -=tkds ------END PGP SIGNATURE----- diff --git a/util-linux-2.25.1.tar.xz b/util-linux-2.25.1.tar.xz deleted file mode 100644 index 9f1af75..0000000 --- a/util-linux-2.25.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4701305ae22790c3a92ce48e50794fa05b7ee01f4227f419a171c100d08986e8 -size 3695172 diff --git a/util-linux-2.25.2.tar.sign b/util-linux-2.25.2.tar.sign new file mode 100644 index 0000000..f5cdfad --- /dev/null +++ b/util-linux-2.25.2.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIcBAABAgAGBQJUSk3GAAoJEOS3HV7sOcKEsrcQAIRmU5klSM7Q+JWzvvvdoKhb +wVqB5VbYCZEH8L5NMRQwzWbZcMtIsFAD6T7tH6hX/jjYxMB5FdJfWrCdaYsevY6k +hpUkEAK6FWzGGJE/s5sq90zgoDQHCBG2VRxLiKj4WfO8zKfBiJTrA43NQPCSj6pN +fT/t1fzpTQj5BRrhjH/e3ghz+CvSw9LH5RZqB8gURBly+1zuTxDw3zfVEqA44/Y7 +Dl+G+r6DzuiUTjGhXlEeG+NfImGhWAiw+r7ScTBEYmF5lQ1VUWlNCg3cX8/JIU/o +U9TQL3mBdcLc0kVBsQ0XcroCpEyYBNDbyjGUEQ8PIVMCdqg114Jphdp7j+9tecSs +ofBo/P99U43jFtozow+ECHYX6j9LiTyynPZAmMnD+bvtIL/tBDaP4/x0qeqtmJyF ++I+V7fARGqMmyt+3xRD3euN16X15HAOW7tchAfhj7T35WfXfV5jHTiz9RA58EgJ5 +7MKAkezEpMbeWUXkVe2nm9Lcki2pU+iuGC36L6hi1Jlxe58gdF1bE2UXW3eXb6mc +1E3uC3jCJ+5gG8mJBYpf4nt+sXA7Elv9QahTsXABbUyNxR43E47rQgsmPqTZgU8O +TxRUz/ZI1ytVFTeledsWb35mItxiP9g8HgCZF7idcZkqx1p41DMkjj7GCkSHxDju +H19vNbkWYnuK8AoqPAQy +=RONJ +-----END PGP SIGNATURE----- diff --git a/util-linux-2.25.2.tar.xz b/util-linux-2.25.2.tar.xz new file mode 100644 index 0000000..044440d --- /dev/null +++ b/util-linux-2.25.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0457f715b73f4a349e1acb08cb410bf0edc9a74a3f75c357070f31f70e33cd6 +size 3703644 diff --git a/util-linux-libblkid-overflow.patch b/util-linux-libblkid-overflow.patch new file mode 100644 index 0000000..0f8e763 --- /dev/null +++ b/util-linux-libblkid-overflow.patch @@ -0,0 +1,101 @@ +From 109df14fad4e9570e26950913ebace6c79289400 Mon Sep 17 00:00:00 2001 +From: Sebastian Krahmer +Date: Fri, 5 Dec 2014 10:06:42 +0100 +Subject: [PATCH] libblkid: fix potential bufer overflows + +While digging deeper into libblk probing, I found that some +computations might wrap and allocate too few buffer space which then +overflows. In particular on 32bit systems (chromebook) where size_t is +32bit, this is problematic (for 64bit the result fits into the calloc +size_t). + +Signed-off-by: Karel Zak +--- + libblkid/src/partitions/gpt.c | 12 ++++++++---- + libblkid/src/probe.c | 7 +++++++ + libblkid/src/superblocks/zfs.c | 3 +++ + 3 files changed, 18 insertions(+), 4 deletions(-) + +diff --git a/libblkid/src/partitions/gpt.c b/libblkid/src/partitions/gpt.c +index 6ab4f71..665577f 100644 +--- a/libblkid/src/partitions/gpt.c ++++ b/libblkid/src/partitions/gpt.c +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + #include "partitions.h" + #include "crc32.h" +@@ -263,14 +264,17 @@ static struct gpt_header *get_gpt_header( + return NULL; + } + +- /* Size of blocks with GPT entries */ +- esz = le32_to_cpu(h->num_partition_entries) * +- le32_to_cpu(h->sizeof_partition_entry); +- if (!esz) { ++ if (le32_to_cpu(h->num_partition_entries) == 0 || ++ le32_to_cpu(h->sizeof_partition_entry) == 0 || ++ ULONG_MAX / le32_to_cpu(h->num_partition_entries) < le32_to_cpu(h->sizeof_partition_entry)) { + DBG(LOWPROBE, ul_debug("GPT entries undefined")); + return NULL; + } + ++ /* Size of blocks with GPT entries */ ++ esz = le32_to_cpu(h->num_partition_entries) * ++ le32_to_cpu(h->sizeof_partition_entry); ++ + /* The header seems valid, save it + * (we don't care about zeros in hdr->reserved2 area) */ + memcpy(hdr, h, sizeof(*h)); +diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c +index 3f7e43b..70e882a 100644 +--- a/libblkid/src/probe.c ++++ b/libblkid/src/probe.c +@@ -103,6 +103,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_LIBUUID + # include +@@ -578,6 +579,12 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr, + return NULL; + } + ++ /* someone trying to overflow some buffers? */ ++ if (len > ULONG_MAX - sizeof(struct blkid_bufinfo)) { ++ errno = ENOMEM; ++ return NULL; ++ } ++ + /* allocate info and space for data by why call */ + bf = calloc(1, sizeof(struct blkid_bufinfo) + len); + if (!bf) { +diff --git a/libblkid/src/superblocks/zfs.c b/libblkid/src/superblocks/zfs.c +index 6ffa24d..86da59d 100644 +--- a/libblkid/src/superblocks/zfs.c ++++ b/libblkid/src/superblocks/zfs.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + + #include "superblocks.h" + +@@ -108,6 +109,8 @@ static void zfs_extract_guid_name(blkid_probe pr, loff_t offset) + + nvs->nvs_type = be32_to_cpu(nvs->nvs_type); + nvs->nvs_strlen = be32_to_cpu(nvs->nvs_strlen); ++ if (nvs->nvs_strlen > UINT_MAX - sizeof(*nvs)) ++ break; + avail -= nvs->nvs_strlen + sizeof(*nvs); + nvdebug("nvstring: type %u string %*s\n", nvs->nvs_type, + nvs->nvs_strlen, nvs->nvs_string); +-- +2.2.2 + diff --git a/util-linux-libblkid-unsafe-chars.patch b/util-linux-libblkid-unsafe-chars.patch new file mode 100644 index 0000000..833f603 --- /dev/null +++ b/util-linux-libblkid-unsafe-chars.patch @@ -0,0 +1,167 @@ +From 89e90ae7b2826110ea28c1c0eb8e7c56c3907bdc Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Nov 2014 13:39:35 +0100 +Subject: [PATCH] libblkid: care about unsafe chars in cache + +The high-level libblkid API uses /run/blkid/blkid.tab cache to +store probing results. The cache format is + + devname + +and unfortunately the cache code does not escape quotation marks: + + # mkfs.ext4 -L 'AAA"BBB' + + # cat /run/blkid/blkid.tab + ... + /dev/sdb1 + +such string is later incorrectly parsed and blkid(8) returns +nonsenses. And for use-cases like + + # eval $(blkid -o export /dev/sdb1) + +it's also insecure. + +Note that mount, udevd and blkid -p are based on low-level libblkid +API, it bypass the cache and directly read data from the devices. + +The current udevd upstream does not depend on blkid(8) output at all, +it's directly linked with the library and all unsafe chars are encoded by +\x notation. + + # mkfs.ext4 -L 'X"`/tmp/foo` "' /dev/sdb1 + # udevadm info --export-db | grep LABEL + ... + E: ID_FS_LABEL=X__/tmp/foo___ + E: ID_FS_LABEL_ENC=X\x22\x60\x2ftmp\x2ffoo\x60\x20\x22 + +Signed-off-by: Karel Zak +--- + libblkid/src/read.c | 21 ++++++++++++++++++--- + libblkid/src/save.c | 22 +++++++++++++++++++++- + misc-utils/blkid.8 | 5 ++++- + misc-utils/blkid.c | 4 ++-- + 4 files changed, 45 insertions(+), 7 deletions(-) + +diff --git a/libblkid/src/read.c b/libblkid/src/read.c +index 0e91c9c..81ab0df 100644 +--- a/libblkid/src/read.c ++++ b/libblkid/src/read.c +@@ -252,15 +252,30 @@ static int parse_token(char **name, char **value, char **cp) + *value = skip_over_blank(*value + 1); + + if (**value == '"') { +- end = strchr(*value + 1, '"'); +- if (!end) { ++ char *p = end = *value + 1; ++ ++ /* convert 'foo\"bar' to 'foo"bar' */ ++ while (*p) { ++ if (*p == '\\') { ++ p++; ++ *end = *p; ++ } else { ++ *end = *p; ++ if (*p == '"') ++ break; ++ } ++ p++; ++ end++; ++ } ++ ++ if (*end != '"') { + DBG(READ, ul_debug("unbalanced quotes at: %s", *value)); + *cp = *value; + return -BLKID_ERR_CACHE; + } + (*value)++; + *end = '\0'; +- end++; ++ end = ++p; + } else { + end = skip_over_word(*value); + if (*end) { +diff --git a/libblkid/src/save.c b/libblkid/src/save.c +index 8216f09..5e8bbee 100644 +--- a/libblkid/src/save.c ++++ b/libblkid/src/save.c +@@ -26,6 +26,21 @@ + + #include "blkidP.h" + ++ ++static void save_quoted(const char *data, FILE *file) ++{ ++ const char *p; ++ ++ fputc('"', file); ++ for (p = data; p && *p; p++) { ++ if ((unsigned char) *p == 0x22 || /* " */ ++ (unsigned char) *p == 0x5c) /* \ */ ++ fputc('\\', file); ++ ++ fputc(*p, file); ++ } ++ fputc('"', file); ++} + static int save_dev(blkid_dev dev, FILE *file) + { + struct list_head *p; +@@ -43,9 +58,14 @@ static int save_dev(blkid_dev dev, FILE *file) + + if (dev->bid_pri) + fprintf(file, " PRI=\"%d\"", dev->bid_pri); ++ + list_for_each(p, &dev->bid_tags) { + blkid_tag tag = list_entry(p, struct blkid_struct_tag, bit_tags); +- fprintf(file, " %s=\"%s\"", tag->bit_name,tag->bit_val); ++ ++ fputc(' ', file); /* space between tags */ ++ fputs(tag->bit_name, file); /* tag NAME */ ++ fputc('=', file); /* separator between NAME and VALUE */ ++ save_quoted(tag->bit_val, file); /* tag "VALUE" */ + } + fprintf(file, ">%s\n", dev->bid_name); + +diff --git a/misc-utils/blkid.8 b/misc-utils/blkid.8 +index 156a14b..c95b833 100644 +--- a/misc-utils/blkid.8 ++++ b/misc-utils/blkid.8 +@@ -200,7 +200,10 @@ partitions. This output format is \fBDEPRECATED\fR. + .TP + .B export + print key=value pairs for easy import into the environment; this output format +-is automatically enabled when I/O Limits (\fB-i\fR option) are requested ++is automatically enabled when I/O Limits (\fB-i\fR option) are requested. ++ ++The non-printing characters are encoded by ^ and M- notation and all ++potentially unsafe characters are escaped. + .RE + .TP + .BI \-O " offset" +diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c +index a6ca660..1bd8646 100644 +--- a/misc-utils/blkid.c ++++ b/misc-utils/blkid.c +@@ -306,7 +306,7 @@ static void print_value(int output, int num, const char *devname, + printf("DEVNAME=%s\n", devname); + fputs(name, stdout); + fputs("=", stdout); +- safe_print(value, valsz, NULL); ++ safe_print(value, valsz, " \\\"'$`<>"); + fputs("\n", stdout); + + } else { +@@ -315,7 +315,7 @@ static void print_value(int output, int num, const char *devname, + fputs(" ", stdout); + fputs(name, stdout); + fputs("=\"", stdout); +- safe_print(value, valsz, "\""); ++ safe_print(value, valsz, "\"\\"); + fputs("\"", stdout); + } + } +-- +2.2.2 + diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index aefa97f..50f9cc0 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,30 @@ +------------------------------------------------------------------- +Fri Feb 6 17:01:02 UTC 2015 - dimstar@opensuse.org + +- Do not try to unregister an info file (ipc.info.gz) which we do + not own. Already in May 2011, we stopped registering it: "do not + register ipc.info.gz (not provided by this package)". + +------------------------------------------------------------------- +Wed Feb 4 19:08:43 CET 2015 - sbrabec@suse.cz + +- libblkid: care about unsafe chars and possible buffer overflow + in cache (CVE-2014-9114, util-linux-libblkid-unsafe-chars.patch, + util-linux-libblkid-overflow.patch, bsc#907434) + +------------------------------------------------------------------- +Thu Jan 29 14:13:41 UTC 2015 - sweet_f_a@gmx.de + +- Update to version 2.25.2: mostly minor fixes + (including boo#908742) +- re-enable utmpdump and ipcs tests for all archs + +------------------------------------------------------------------- +Thu Jan 15 17:15:47 UTC 2015 - schwab@linux-m68k.org + +- Use util-linux:/bin/logger as split-provide, + /usr/lib/systemd/system/fstrim.service didn't exist in 13.1 + ------------------------------------------------------------------- Sat Jan 10 02:24:25 UTC 2015 - jengelh@inai.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 7fb79f5..9e00e0b 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux-systemd # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -120,7 +120,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.25.1 +Version: 2.25.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -160,6 +160,10 @@ Source51: blkid.conf Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FEATURE-SUSE -- Report about disabled encryption to stderr. Patch12: util-linux-noenc-suse.patch +# PATCH-FIX-SECURITY util-linux-libblkid-unsafe-chars.patch bsc907434 CVE-2014-9114 sbrabec@suse.cz -- libblkid: care about unsafe chars in cache +Patch13: util-linux-libblkid-unsafe-chars.patch +# PATCH-FIX-SECURITY util-linux-libblkid-overflow.patch bsc907434 CVE-2014-9114 sbrabec@suse.cz -- libblkid: fix possible buffer overflow +Patch14: util-linux-libblkid-overflow.patch ## ## klogconsole ## @@ -215,7 +219,7 @@ Recommends: which %if %build_util_linux_systemd Supplements: packageand(util-linux:systemd) # Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 -Provides: util-linux:/usr/lib/systemd/system/fstrim.service +Provides: util-linux:/bin/logger # Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 Conflicts: util-linux < 2.25 %systemd_requires @@ -383,6 +387,8 @@ xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %setup -q -n %{_name}-%{version} -b 40 %patch4 -p1 %patch12 -p1 +%patch13 -p1 +%patch14 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -609,13 +615,8 @@ export TS_OPT_kill_name_to_number_known_fail="yes" export TS_OPT_kill_print_pid_known_fail="yes" export TS_OPT_kill_queue_known_fail="yes" %endif -%ifarch aarch64 s390 s390x -export TS_OPT_utmpdump_known_fail="yes" -%endif # FIXME: These sometimes fails: export TS_OPT_libmount_lock_known_fail="yes" -# FIXME: It still fails with 3a9ec12: -export TS_OPT_ipcs_limits2_known_fail="yes" # # hacks export PATH="$PATH:/sbin:/usr/sbin" @@ -825,7 +826,6 @@ if [ -f etc/fstab ]; then fi %postun -%install_info_delete --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %{insserv_cleanup} %verifyscript @@ -901,14 +901,12 @@ fi %doc Documentation/cal.txt %doc Documentation/col.txt %doc Documentation/deprecated.txt -%doc Documentation/fdisk.txt %doc Documentation/getopt.txt %doc Documentation/howto-debug.txt %doc Documentation/hwclock.txt %doc Documentation/modems-with-agetty.txt %doc Documentation/mount.txt %doc Documentation/pg.txt -%doc Documentation/sfdisk.txt %config %attr(744,root,root) %{_sysconfdir}/init.d/raw %config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw %config(noreplace) %{_sysconfdir}/filesystems diff --git a/util-linux.changes b/util-linux.changes index aefa97f..50f9cc0 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,30 @@ +------------------------------------------------------------------- +Fri Feb 6 17:01:02 UTC 2015 - dimstar@opensuse.org + +- Do not try to unregister an info file (ipc.info.gz) which we do + not own. Already in May 2011, we stopped registering it: "do not + register ipc.info.gz (not provided by this package)". + +------------------------------------------------------------------- +Wed Feb 4 19:08:43 CET 2015 - sbrabec@suse.cz + +- libblkid: care about unsafe chars and possible buffer overflow + in cache (CVE-2014-9114, util-linux-libblkid-unsafe-chars.patch, + util-linux-libblkid-overflow.patch, bsc#907434) + +------------------------------------------------------------------- +Thu Jan 29 14:13:41 UTC 2015 - sweet_f_a@gmx.de + +- Update to version 2.25.2: mostly minor fixes + (including boo#908742) +- re-enable utmpdump and ipcs tests for all archs + +------------------------------------------------------------------- +Thu Jan 15 17:15:47 UTC 2015 - schwab@linux-m68k.org + +- Use util-linux:/bin/logger as split-provide, + /usr/lib/systemd/system/fstrim.service didn't exist in 13.1 + ------------------------------------------------------------------- Sat Jan 10 02:24:25 UTC 2015 - jengelh@inai.de diff --git a/util-linux.spec b/util-linux.spec index 802815b..e36154d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -120,7 +120,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.25.1 +Version: 2.25.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -160,6 +160,10 @@ Source51: blkid.conf Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FEATURE-SUSE -- Report about disabled encryption to stderr. Patch12: util-linux-noenc-suse.patch +# PATCH-FIX-SECURITY util-linux-libblkid-unsafe-chars.patch bsc907434 CVE-2014-9114 sbrabec@suse.cz -- libblkid: care about unsafe chars in cache +Patch13: util-linux-libblkid-unsafe-chars.patch +# PATCH-FIX-SECURITY util-linux-libblkid-overflow.patch bsc907434 CVE-2014-9114 sbrabec@suse.cz -- libblkid: fix possible buffer overflow +Patch14: util-linux-libblkid-overflow.patch ## ## klogconsole ## @@ -215,7 +219,7 @@ Recommends: which %if %build_util_linux_systemd Supplements: packageand(util-linux:systemd) # Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 -Provides: util-linux:/usr/lib/systemd/system/fstrim.service +Provides: util-linux:/bin/logger # Service files are being migrated during the update from SLE < 12 and openSUSE <= 13.1 Conflicts: util-linux < 2.25 %systemd_requires @@ -383,6 +387,8 @@ xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %setup -q -n %{_name}-%{version} -b 40 %patch4 -p1 %patch12 -p1 +%patch13 -p1 +%patch14 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -609,13 +615,8 @@ export TS_OPT_kill_name_to_number_known_fail="yes" export TS_OPT_kill_print_pid_known_fail="yes" export TS_OPT_kill_queue_known_fail="yes" %endif -%ifarch aarch64 s390 s390x -export TS_OPT_utmpdump_known_fail="yes" -%endif # FIXME: These sometimes fails: export TS_OPT_libmount_lock_known_fail="yes" -# FIXME: It still fails with 3a9ec12: -export TS_OPT_ipcs_limits2_known_fail="yes" # # hacks export PATH="$PATH:/sbin:/usr/sbin" @@ -825,7 +826,6 @@ if [ -f etc/fstab ]; then fi %postun -%install_info_delete --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %{insserv_cleanup} %verifyscript @@ -901,14 +901,12 @@ fi %doc Documentation/cal.txt %doc Documentation/col.txt %doc Documentation/deprecated.txt -%doc Documentation/fdisk.txt %doc Documentation/getopt.txt %doc Documentation/howto-debug.txt %doc Documentation/hwclock.txt %doc Documentation/modems-with-agetty.txt %doc Documentation/mount.txt %doc Documentation/pg.txt -%doc Documentation/sfdisk.txt %config %attr(744,root,root) %{_sysconfdir}/init.d/raw %config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw %config(noreplace) %{_sysconfdir}/filesystems From 6850c8ad0535a08a12b2c92fdca884a02c587e3cebd45c69a201d15050d7baf0 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 5 Mar 2015 16:04:31 +0000 Subject: [PATCH 189/211] Accepting request 287963 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/287963 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=198 --- klogconsole-quiet.patch | 11 -- klogconsole.diff | 27 ---- klogconsole.tar.bz2 | 3 - klogconsole.tar.xz | 3 + python-libmount.changes | 57 +++++++++ python-libmount.spec | 87 ++++++++----- util-linux-2.25.2.tar.sign | 17 --- util-linux-2.25.2.tar.xz | 3 - util-linux-2.26.tar.sign | 17 +++ util-linux-2.26.tar.xz | 3 + util-linux-libblkid-overflow.patch | 101 --------------- util-linux-libblkid-unsafe-chars.patch | 167 ------------------------- util-linux-systemd.changes | 57 +++++++++ util-linux-systemd.spec | 84 ++++++++----- util-linux.changes | 57 +++++++++ util-linux.spec | 84 ++++++++----- 16 files changed, 360 insertions(+), 418 deletions(-) delete mode 100644 klogconsole-quiet.patch delete mode 100644 klogconsole.diff delete mode 100644 klogconsole.tar.bz2 create mode 100644 klogconsole.tar.xz delete mode 100644 util-linux-2.25.2.tar.sign delete mode 100644 util-linux-2.25.2.tar.xz create mode 100644 util-linux-2.26.tar.sign create mode 100644 util-linux-2.26.tar.xz delete mode 100644 util-linux-libblkid-overflow.patch delete mode 100644 util-linux-libblkid-unsafe-chars.patch diff --git a/klogconsole-quiet.patch b/klogconsole-quiet.patch deleted file mode 100644 index 4e62e88..0000000 --- a/klogconsole-quiet.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- klogconsole/klogconsole.c -+++ klogconsole/klogconsole.c -@@ -59,7 +59,7 @@ - exit(1); - } - if( ioctl( vt, TIOCLINUX, &newvt ) ) { -- perror("ioctl(TIOCLINUX)"); -+ /* shut up perror("ioctl(TIOCLINUX)"); */ - exit(1); - } - close(vt); diff --git a/klogconsole.diff b/klogconsole.diff deleted file mode 100644 index 392dff8..0000000 --- a/klogconsole.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- klogconsole/Makefile -+++ klogconsole/Makefile -@@ -15,11 +15,11 @@ - all: klogconsole - - klogconsole: klogconsole.c -- $(CC) $(CFLAGS) -s -o $@ $< -+ $(CC) $(CFLAGS) -o $@ $< - - clean: - $(RM) klogconsole - - install: klogconsole klogconsole.man -- $(INSTALL) -s -m 0700 klogconsole $(DEST)/usr/sbin/ -+ $(INSTALL) -m 0700 klogconsole $(DEST)/usr/sbin/ - $(INSTALL) -c -m 0444 klogconsole.man $(DEST)/usr/share/man/man8/klogconsole.8 ---- klogconsole/klogconsole.c -+++ klogconsole/klogconsole.c -@@ -46,7 +46,7 @@ - char newvt[2]; - int vt; - -- if ((new_console < 1) || (new_console > MAX_CONSOLE)) { -+ if ((new_console < 0) || (new_console > MAX_CONSOLE)) { - fprintf(stderr,"wrong console number\n"); - exit(1); - } diff --git a/klogconsole.tar.bz2 b/klogconsole.tar.bz2 deleted file mode 100644 index 7d6e606..0000000 --- a/klogconsole.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a1efa9f001c8a92fb91a544d62a3f43356f31955dd5125364300827c239ee611 -size 1942 diff --git a/klogconsole.tar.xz b/klogconsole.tar.xz new file mode 100644 index 0000000..801770c --- /dev/null +++ b/klogconsole.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4cd7c96ea647ad6ede62f93675acf3fa3c21ce225f9b771b82618fb2e676e4e +size 2060 diff --git a/python-libmount.changes b/python-libmount.changes index 50f9cc0..93c7ab9 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,60 @@ +------------------------------------------------------------------- +Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz + +- Update to util-linux-2.26: + * based on the git master branch of util-linux, remove backported + patches (util-linux-libblkid-unsafe-chars.patch, + util-linux-libblkid-overflow.patch) + * zramctl(8): this NEW COMMAND allows to control /dev/zramN + devices + * agetty(8): supports new option --reload to force already + running agetty processes to reprint the /etc/issue file + * cfdisk(8), sfdisk(8) and fdisk(8): support sfdisk-compatible + scripts; it's possible to save your partitioning layout to text + files and (re)use it in all fdisks + * fdisk(8), sfdisk(8): support new command-line option "--output + " to specify output columns for --list or print commands + * nsenter(1): has been updated to work with the latest kernel + changes in user namespaces supports new command-line option + --preserve-credentials + * unshare(1): has been updated to work with the latest kernel + changes in user namespaces supports new command-line option + "--setgroups=" + * swapon(8): supports new command-line option "-o " with + the same semantics as -o for mount(8); it's now possible to + specify swap options on the command line by the same string as + in fstab + * fdformat(8): supports new command-line options --from and --to + to specify tracks and --repair for broken floppies + * getopt(1): has been updated to the latest version (originally + maintained outside of util-linux) and refactored + * ldattach(8): has been improved to support GSM0710 and intro + modem commands + * logger(1): supports new command-line option --id= to specify + PID (or another ID) allows to specify --rfc3164 or --rfc5424 + syslog protocols + * libfdisk: the library is distributed as a shared library with a + stable API and a standard header file + * libmount: provides a new simple API to monitor mount-table + changes (including changes in userspace mount options) +- Fix lack of I18N support in util-linux-systemd (mis-compilation). + +------------------------------------------------------------------- +Sun Feb 22 17:15:41 UTC 2015 - crrodriguez@opensuse.org + +- Build with FULL RELRO. + +------------------------------------------------------------------- +Tue Feb 10 15:26:55 UTC 2015 - sweet_f_a@gmx.de + +- define upstream source for klogconsole to remove patches + * klogconsole-quiet.patch + * klogconsole.diff +- remove openSUSE 13.1 specific eject permissions, did not worked + anyway since eject-fpie.patch was removed +- always call autoreconf, not only for splitted packages, skip + autopoint (gettext) + ------------------------------------------------------------------- Fri Feb 6 17:01:02 UTC 2015 - dimstar@opensuse.org diff --git a/python-libmount.spec b/python-libmount.spec index f98583f..83d7ba5 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -76,7 +76,7 @@ Name: python-libmount %endif Summary: %main_summary License: GPL-2.0+ -Group: %group_pl +Group: %main_group BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel @@ -120,7 +120,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.25.2 +Version: 2.26 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -129,7 +129,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -139,11 +139,12 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd +# klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 # TODO: split to separate package -Source40: klogconsole.tar.bz2 +Source40: klogconsole.tar.xz # XXX: Run a program in a new session and with controlling tty Source22: setctsid.c Source23: setctsid.8 @@ -160,15 +161,6 @@ Source51: blkid.conf Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FEATURE-SUSE -- Report about disabled encryption to stderr. Patch12: util-linux-noenc-suse.patch -# PATCH-FIX-SECURITY util-linux-libblkid-unsafe-chars.patch bsc907434 CVE-2014-9114 sbrabec@suse.cz -- libblkid: care about unsafe chars in cache -Patch13: util-linux-libblkid-unsafe-chars.patch -# PATCH-FIX-SECURITY util-linux-libblkid-overflow.patch bsc907434 CVE-2014-9114 sbrabec@suse.cz -- libblkid: fix possible buffer overflow -Patch14: util-linux-libblkid-overflow.patch -## -## klogconsole -## -Patch55: klogconsole-quiet.patch -Patch56: klogconsole.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -332,6 +324,31 @@ Requires: libsmartcols-devel = %{version} %description -n libsmartcols-devel-static Files to develop applications using the libsmartcols library. +%package -n libfdisk1 +Summary: Filesystem detection library +Group: System/Filesystems + +%description -n libfdisk1 +Library for filesystem detection. + +%package -n libfdisk-devel +Summary: Development files for the filesystem detection library +Group: Development/Libraries/C and C++ +Requires: libfdisk1 = %{version} + +%description -n libfdisk-devel +Files needed to develop applications using the library for filesystem +detection. + +%package -n libfdisk-devel-static +Summary: Development files for the filesystem detection library +Group: Development/Libraries/C and C++ +Requires: libfdisk-devel = %{version} + +%description -n libfdisk-devel-static +Files needed to develop applications using the library for filesystem +detection. + %lang_package %endif %if %build_util_linux_systemd @@ -370,7 +387,6 @@ SMP systems. %if %build_util_linux %package -n python-libmount Summary: %summary_pl -License: GPL-2.0+ Group: %group_pl %description -n python-libmount @@ -388,17 +404,10 @@ xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %setup -q -n %{_name}-%{version} -b 40 %patch4 -p1 %patch12 -p1 -%patch13 -p1 -%patch14 -p1 # # setctsid cp -p %{S:22} %{S:23} . -pushd ../klogconsole -%patch55 -p1 -%patch56 -p1 -popd - %build #BEGIN CONFIG ALTER %if !%build_util_linux_systemd @@ -437,7 +446,6 @@ fi sed -i 's/BUILD_LSLOGINS/FALSE/ s/BUILD_LOGGER/FALSE/ ' misc-utils/Makemodule.am login-utils/Makemodule.am bash-completion/Makemodule.am -autoreconf -f -i %endif #END FIRST STAGE MODIFICATIONS %else @@ -509,14 +517,12 @@ sed -i ' ' libmount/python/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am # Ignore dependencies on optional (and not built in second stage) libraries sed -i ' - /AM_GNU_GETTEXT/d s/UL_REQUIRES_BUILD(\[.*\], \[libuuid\])/dnl &/ s/UL_REQUIRES_BUILD(\[.*\], \[libsmartcols\])/dnl &/ ' configure.ac sed -i ' /SUBDIRS =/s/ po// ' Makefile.am -autoreconf -f -i #END SECOND STAGE MODIFICATIONS %endif # @@ -533,11 +539,13 @@ else fi export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" +export LDFLAGS="-Wl,-z,relro,-z,now" # override default localstatedir to /run # only used for volatile data # # SUSE now supports only systemd based system. We do not build # sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities. +AUTOPOINT=true autoreconf -vfi %configure \ --localstatedir=/run \ --docdir=%{_docdir}/%{_name} \ @@ -601,10 +609,8 @@ export TS_OPT_fdisk_bsd_known_fail="yes" export TS_OPT_misc_setarch_known_fail="yes" %endif # -%if 0%{?suse_version} > 1310 # glibc requires kernel >= 3.0, thus setarch --uname-2.6 fails on platforms without VDSO export TS_OPT_misc_setarch_known_fail="yes" -%endif # %ifarch armv6l armv6hl aarch64 export TS_OPT_fdisk_gpt_known_fail="yes" @@ -851,6 +857,10 @@ fi %postun -n libuuid1 -p /sbin/ldconfig +%post -n libfdisk1 -p /sbin/ldconfig + +%postun -n libfdisk1 -p /sbin/ldconfig + %files lang -f %{name}.lang %endif @@ -964,12 +974,8 @@ fi %{_bindir}/su %endif %if %{with enable_eject} -%if 0%{?suse_version} <= 1310 -%verify(not mode) %attr(4750,root,audio) %{_bindir}/eject -%else %{_bindir}/eject %endif -%endif %{_bindir}/cal %{_bindir}/chrt %{_bindir}/col @@ -1068,6 +1074,7 @@ fi %verify(not mode) %attr(0755,root,tty) %{_bindir}/wall %{_bindir}/whereis %verify(not mode) %attr(0755,root,tty) %{_bindir}/write +%{_sbindir}/zramctl %if %{with enable_su} %{_mandir}/man1/kill.1.gz %{_mandir}/man1/su.1.gz @@ -1169,6 +1176,7 @@ fi %{_mandir}/man8/uname26.8.gz %{_mandir}/man8/setctsid.8.gz %{_mandir}/man8/wipefs.8.gz +%{_mandir}/man8/zramctl.8.gz %{_mandir}/man8/fstrim.8.gz %{_mandir}/man8/lsblk.8.gz %{_mandir}/man8/resizepart.8.gz @@ -1287,6 +1295,23 @@ fi %files -n libuuid-devel-static %defattr(-, root, root) %{_libdir}/libuuid.*a + +%files -n libfdisk1 +%defattr(-, root, root) +%{_libdir}/libfdisk.so.1 +%{_libdir}/libfdisk.so.1.* + +%files -n libfdisk-devel +%defattr(-, root, root) +%{_libdir}/libfdisk.so +%dir %{_includedir}/libfdisk +%{_includedir}/libfdisk/libfdisk.h +%{_libdir}/pkgconfig/fdisk.pc + +%files -n libfdisk-devel-static +%defattr(-, root, root) +%{_libdir}/libfdisk.*a + %endif %if %build_util_linux_systemd diff --git a/util-linux-2.25.2.tar.sign b/util-linux-2.25.2.tar.sign deleted file mode 100644 index f5cdfad..0000000 --- a/util-linux-2.25.2.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQIcBAABAgAGBQJUSk3GAAoJEOS3HV7sOcKEsrcQAIRmU5klSM7Q+JWzvvvdoKhb -wVqB5VbYCZEH8L5NMRQwzWbZcMtIsFAD6T7tH6hX/jjYxMB5FdJfWrCdaYsevY6k -hpUkEAK6FWzGGJE/s5sq90zgoDQHCBG2VRxLiKj4WfO8zKfBiJTrA43NQPCSj6pN -fT/t1fzpTQj5BRrhjH/e3ghz+CvSw9LH5RZqB8gURBly+1zuTxDw3zfVEqA44/Y7 -Dl+G+r6DzuiUTjGhXlEeG+NfImGhWAiw+r7ScTBEYmF5lQ1VUWlNCg3cX8/JIU/o -U9TQL3mBdcLc0kVBsQ0XcroCpEyYBNDbyjGUEQ8PIVMCdqg114Jphdp7j+9tecSs -ofBo/P99U43jFtozow+ECHYX6j9LiTyynPZAmMnD+bvtIL/tBDaP4/x0qeqtmJyF -+I+V7fARGqMmyt+3xRD3euN16X15HAOW7tchAfhj7T35WfXfV5jHTiz9RA58EgJ5 -7MKAkezEpMbeWUXkVe2nm9Lcki2pU+iuGC36L6hi1Jlxe58gdF1bE2UXW3eXb6mc -1E3uC3jCJ+5gG8mJBYpf4nt+sXA7Elv9QahTsXABbUyNxR43E47rQgsmPqTZgU8O -TxRUz/ZI1ytVFTeledsWb35mItxiP9g8HgCZF7idcZkqx1p41DMkjj7GCkSHxDju -H19vNbkWYnuK8AoqPAQy -=RONJ ------END PGP SIGNATURE----- diff --git a/util-linux-2.25.2.tar.xz b/util-linux-2.25.2.tar.xz deleted file mode 100644 index 044440d..0000000 --- a/util-linux-2.25.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e0457f715b73f4a349e1acb08cb410bf0edc9a74a3f75c357070f31f70e33cd6 -size 3703644 diff --git a/util-linux-2.26.tar.sign b/util-linux-2.26.tar.sign new file mode 100644 index 0000000..1b2e1f0 --- /dev/null +++ b/util-linux-2.26.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIcBAABAgAGBQJU5dYmAAoJEOS3HV7sOcKE/kwP/2IxeHdT91RtWcNvTVhKaFe5 +KItv6vf1790aogocDmnOzxQGhKu/A6BMok4rck2tWkgbH9cPVeG9s3ThN8+cr4Jd +e0pLW+0AgmMFKHRcsmdzSJsOKwoIwrJFkmbGcBQbjJgX74N3RPUX8j+J9JB3VRdf +ampyz6wtbsQ0sK4JkE7GCPhC8VEOcWP/Aousx4+nVf/TGgow4s5aBuP0pdDI3liS +3VAoABPDwUSb3llNw6rfM40PfGU9FObofPiPnD3kNTqEJclxDlbBW4CzcMX5yPca +gMDYoMv35t2lQULeyl/t3C7QzVZtCUyomYIRKta1U0vpwN9dHZSd6aUly2ad/2ci +9bO71M3MTcDzayNz/WiHg1UiadsqmcrfUFvOsFwbxaRrJp0yG5Ymo0wCpYIiR5SN +snevV8tgPWOfUqkhApA7rdWf/lNTz26D9gioKnMpU+BXkPk6LzPvVF4/BoRT1PFr +yiF4g/HaNfjdiZSOYTpC8LbjhCE+H1MPx8ljp5LPR8DtUh3Rl8o0edNK6WcK6USO +s7N4QsXpWNHk71OTvYYHGSJLhk2nmABQXKOKNHUxKqbHAgta/Wuc9yNB+7+qxrYp +xR28xtXwHzMrGf6dL9ZEQbMhuhlRTfhe+4AM5SCKY3JZJcahvn2ocEuZSAphoJhl +FWmJ6n5biUK+N5VnDvMX +=bnK5 +-----END PGP SIGNATURE----- diff --git a/util-linux-2.26.tar.xz b/util-linux-2.26.tar.xz new file mode 100644 index 0000000..dbeecd9 --- /dev/null +++ b/util-linux-2.26.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a23c6f39dea0ed215ccd589509ffc7bb6f706f6e1a04760f493fb0fd7e93c489 +size 3847960 diff --git a/util-linux-libblkid-overflow.patch b/util-linux-libblkid-overflow.patch deleted file mode 100644 index 0f8e763..0000000 --- a/util-linux-libblkid-overflow.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 109df14fad4e9570e26950913ebace6c79289400 Mon Sep 17 00:00:00 2001 -From: Sebastian Krahmer -Date: Fri, 5 Dec 2014 10:06:42 +0100 -Subject: [PATCH] libblkid: fix potential bufer overflows - -While digging deeper into libblk probing, I found that some -computations might wrap and allocate too few buffer space which then -overflows. In particular on 32bit systems (chromebook) where size_t is -32bit, this is problematic (for 64bit the result fits into the calloc -size_t). - -Signed-off-by: Karel Zak ---- - libblkid/src/partitions/gpt.c | 12 ++++++++---- - libblkid/src/probe.c | 7 +++++++ - libblkid/src/superblocks/zfs.c | 3 +++ - 3 files changed, 18 insertions(+), 4 deletions(-) - -diff --git a/libblkid/src/partitions/gpt.c b/libblkid/src/partitions/gpt.c -index 6ab4f71..665577f 100644 ---- a/libblkid/src/partitions/gpt.c -+++ b/libblkid/src/partitions/gpt.c -@@ -17,6 +17,7 @@ - #include - #include - #include -+#include - - #include "partitions.h" - #include "crc32.h" -@@ -263,14 +264,17 @@ static struct gpt_header *get_gpt_header( - return NULL; - } - -- /* Size of blocks with GPT entries */ -- esz = le32_to_cpu(h->num_partition_entries) * -- le32_to_cpu(h->sizeof_partition_entry); -- if (!esz) { -+ if (le32_to_cpu(h->num_partition_entries) == 0 || -+ le32_to_cpu(h->sizeof_partition_entry) == 0 || -+ ULONG_MAX / le32_to_cpu(h->num_partition_entries) < le32_to_cpu(h->sizeof_partition_entry)) { - DBG(LOWPROBE, ul_debug("GPT entries undefined")); - return NULL; - } - -+ /* Size of blocks with GPT entries */ -+ esz = le32_to_cpu(h->num_partition_entries) * -+ le32_to_cpu(h->sizeof_partition_entry); -+ - /* The header seems valid, save it - * (we don't care about zeros in hdr->reserved2 area) */ - memcpy(hdr, h, sizeof(*h)); -diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c -index 3f7e43b..70e882a 100644 ---- a/libblkid/src/probe.c -+++ b/libblkid/src/probe.c -@@ -103,6 +103,7 @@ - #include - #include - #include -+#include - - #ifdef HAVE_LIBUUID - # include -@@ -578,6 +579,12 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr, - return NULL; - } - -+ /* someone trying to overflow some buffers? */ -+ if (len > ULONG_MAX - sizeof(struct blkid_bufinfo)) { -+ errno = ENOMEM; -+ return NULL; -+ } -+ - /* allocate info and space for data by why call */ - bf = calloc(1, sizeof(struct blkid_bufinfo) + len); - if (!bf) { -diff --git a/libblkid/src/superblocks/zfs.c b/libblkid/src/superblocks/zfs.c -index 6ffa24d..86da59d 100644 ---- a/libblkid/src/superblocks/zfs.c -+++ b/libblkid/src/superblocks/zfs.c -@@ -12,6 +12,7 @@ - #include - #include - #include -+#include - - #include "superblocks.h" - -@@ -108,6 +109,8 @@ static void zfs_extract_guid_name(blkid_probe pr, loff_t offset) - - nvs->nvs_type = be32_to_cpu(nvs->nvs_type); - nvs->nvs_strlen = be32_to_cpu(nvs->nvs_strlen); -+ if (nvs->nvs_strlen > UINT_MAX - sizeof(*nvs)) -+ break; - avail -= nvs->nvs_strlen + sizeof(*nvs); - nvdebug("nvstring: type %u string %*s\n", nvs->nvs_type, - nvs->nvs_strlen, nvs->nvs_string); --- -2.2.2 - diff --git a/util-linux-libblkid-unsafe-chars.patch b/util-linux-libblkid-unsafe-chars.patch deleted file mode 100644 index 833f603..0000000 --- a/util-linux-libblkid-unsafe-chars.patch +++ /dev/null @@ -1,167 +0,0 @@ -From 89e90ae7b2826110ea28c1c0eb8e7c56c3907bdc Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Nov 2014 13:39:35 +0100 -Subject: [PATCH] libblkid: care about unsafe chars in cache - -The high-level libblkid API uses /run/blkid/blkid.tab cache to -store probing results. The cache format is - - devname - -and unfortunately the cache code does not escape quotation marks: - - # mkfs.ext4 -L 'AAA"BBB' - - # cat /run/blkid/blkid.tab - ... - /dev/sdb1 - -such string is later incorrectly parsed and blkid(8) returns -nonsenses. And for use-cases like - - # eval $(blkid -o export /dev/sdb1) - -it's also insecure. - -Note that mount, udevd and blkid -p are based on low-level libblkid -API, it bypass the cache and directly read data from the devices. - -The current udevd upstream does not depend on blkid(8) output at all, -it's directly linked with the library and all unsafe chars are encoded by -\x notation. - - # mkfs.ext4 -L 'X"`/tmp/foo` "' /dev/sdb1 - # udevadm info --export-db | grep LABEL - ... - E: ID_FS_LABEL=X__/tmp/foo___ - E: ID_FS_LABEL_ENC=X\x22\x60\x2ftmp\x2ffoo\x60\x20\x22 - -Signed-off-by: Karel Zak ---- - libblkid/src/read.c | 21 ++++++++++++++++++--- - libblkid/src/save.c | 22 +++++++++++++++++++++- - misc-utils/blkid.8 | 5 ++++- - misc-utils/blkid.c | 4 ++-- - 4 files changed, 45 insertions(+), 7 deletions(-) - -diff --git a/libblkid/src/read.c b/libblkid/src/read.c -index 0e91c9c..81ab0df 100644 ---- a/libblkid/src/read.c -+++ b/libblkid/src/read.c -@@ -252,15 +252,30 @@ static int parse_token(char **name, char **value, char **cp) - *value = skip_over_blank(*value + 1); - - if (**value == '"') { -- end = strchr(*value + 1, '"'); -- if (!end) { -+ char *p = end = *value + 1; -+ -+ /* convert 'foo\"bar' to 'foo"bar' */ -+ while (*p) { -+ if (*p == '\\') { -+ p++; -+ *end = *p; -+ } else { -+ *end = *p; -+ if (*p == '"') -+ break; -+ } -+ p++; -+ end++; -+ } -+ -+ if (*end != '"') { - DBG(READ, ul_debug("unbalanced quotes at: %s", *value)); - *cp = *value; - return -BLKID_ERR_CACHE; - } - (*value)++; - *end = '\0'; -- end++; -+ end = ++p; - } else { - end = skip_over_word(*value); - if (*end) { -diff --git a/libblkid/src/save.c b/libblkid/src/save.c -index 8216f09..5e8bbee 100644 ---- a/libblkid/src/save.c -+++ b/libblkid/src/save.c -@@ -26,6 +26,21 @@ - - #include "blkidP.h" - -+ -+static void save_quoted(const char *data, FILE *file) -+{ -+ const char *p; -+ -+ fputc('"', file); -+ for (p = data; p && *p; p++) { -+ if ((unsigned char) *p == 0x22 || /* " */ -+ (unsigned char) *p == 0x5c) /* \ */ -+ fputc('\\', file); -+ -+ fputc(*p, file); -+ } -+ fputc('"', file); -+} - static int save_dev(blkid_dev dev, FILE *file) - { - struct list_head *p; -@@ -43,9 +58,14 @@ static int save_dev(blkid_dev dev, FILE *file) - - if (dev->bid_pri) - fprintf(file, " PRI=\"%d\"", dev->bid_pri); -+ - list_for_each(p, &dev->bid_tags) { - blkid_tag tag = list_entry(p, struct blkid_struct_tag, bit_tags); -- fprintf(file, " %s=\"%s\"", tag->bit_name,tag->bit_val); -+ -+ fputc(' ', file); /* space between tags */ -+ fputs(tag->bit_name, file); /* tag NAME */ -+ fputc('=', file); /* separator between NAME and VALUE */ -+ save_quoted(tag->bit_val, file); /* tag "VALUE" */ - } - fprintf(file, ">%s\n", dev->bid_name); - -diff --git a/misc-utils/blkid.8 b/misc-utils/blkid.8 -index 156a14b..c95b833 100644 ---- a/misc-utils/blkid.8 -+++ b/misc-utils/blkid.8 -@@ -200,7 +200,10 @@ partitions. This output format is \fBDEPRECATED\fR. - .TP - .B export - print key=value pairs for easy import into the environment; this output format --is automatically enabled when I/O Limits (\fB-i\fR option) are requested -+is automatically enabled when I/O Limits (\fB-i\fR option) are requested. -+ -+The non-printing characters are encoded by ^ and M- notation and all -+potentially unsafe characters are escaped. - .RE - .TP - .BI \-O " offset" -diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c -index a6ca660..1bd8646 100644 ---- a/misc-utils/blkid.c -+++ b/misc-utils/blkid.c -@@ -306,7 +306,7 @@ static void print_value(int output, int num, const char *devname, - printf("DEVNAME=%s\n", devname); - fputs(name, stdout); - fputs("=", stdout); -- safe_print(value, valsz, NULL); -+ safe_print(value, valsz, " \\\"'$`<>"); - fputs("\n", stdout); - - } else { -@@ -315,7 +315,7 @@ static void print_value(int output, int num, const char *devname, - fputs(" ", stdout); - fputs(name, stdout); - fputs("=\"", stdout); -- safe_print(value, valsz, "\""); -+ safe_print(value, valsz, "\"\\"); - fputs("\"", stdout); - } - } --- -2.2.2 - diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 50f9cc0..93c7ab9 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,60 @@ +------------------------------------------------------------------- +Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz + +- Update to util-linux-2.26: + * based on the git master branch of util-linux, remove backported + patches (util-linux-libblkid-unsafe-chars.patch, + util-linux-libblkid-overflow.patch) + * zramctl(8): this NEW COMMAND allows to control /dev/zramN + devices + * agetty(8): supports new option --reload to force already + running agetty processes to reprint the /etc/issue file + * cfdisk(8), sfdisk(8) and fdisk(8): support sfdisk-compatible + scripts; it's possible to save your partitioning layout to text + files and (re)use it in all fdisks + * fdisk(8), sfdisk(8): support new command-line option "--output + " to specify output columns for --list or print commands + * nsenter(1): has been updated to work with the latest kernel + changes in user namespaces supports new command-line option + --preserve-credentials + * unshare(1): has been updated to work with the latest kernel + changes in user namespaces supports new command-line option + "--setgroups=" + * swapon(8): supports new command-line option "-o " with + the same semantics as -o for mount(8); it's now possible to + specify swap options on the command line by the same string as + in fstab + * fdformat(8): supports new command-line options --from and --to + to specify tracks and --repair for broken floppies + * getopt(1): has been updated to the latest version (originally + maintained outside of util-linux) and refactored + * ldattach(8): has been improved to support GSM0710 and intro + modem commands + * logger(1): supports new command-line option --id= to specify + PID (or another ID) allows to specify --rfc3164 or --rfc5424 + syslog protocols + * libfdisk: the library is distributed as a shared library with a + stable API and a standard header file + * libmount: provides a new simple API to monitor mount-table + changes (including changes in userspace mount options) +- Fix lack of I18N support in util-linux-systemd (mis-compilation). + +------------------------------------------------------------------- +Sun Feb 22 17:15:41 UTC 2015 - crrodriguez@opensuse.org + +- Build with FULL RELRO. + +------------------------------------------------------------------- +Tue Feb 10 15:26:55 UTC 2015 - sweet_f_a@gmx.de + +- define upstream source for klogconsole to remove patches + * klogconsole-quiet.patch + * klogconsole.diff +- remove openSUSE 13.1 specific eject permissions, did not worked + anyway since eject-fpie.patch was removed +- always call autoreconf, not only for splitted packages, skip + autopoint (gettext) + ------------------------------------------------------------------- Fri Feb 6 17:01:02 UTC 2015 - dimstar@opensuse.org diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 9e00e0b..9938646 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -120,7 +120,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.25.2 +Version: 2.26 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -129,7 +129,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -139,11 +139,12 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd +# klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 # TODO: split to separate package -Source40: klogconsole.tar.bz2 +Source40: klogconsole.tar.xz # XXX: Run a program in a new session and with controlling tty Source22: setctsid.c Source23: setctsid.8 @@ -160,15 +161,6 @@ Source51: blkid.conf Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FEATURE-SUSE -- Report about disabled encryption to stderr. Patch12: util-linux-noenc-suse.patch -# PATCH-FIX-SECURITY util-linux-libblkid-unsafe-chars.patch bsc907434 CVE-2014-9114 sbrabec@suse.cz -- libblkid: care about unsafe chars in cache -Patch13: util-linux-libblkid-unsafe-chars.patch -# PATCH-FIX-SECURITY util-linux-libblkid-overflow.patch bsc907434 CVE-2014-9114 sbrabec@suse.cz -- libblkid: fix possible buffer overflow -Patch14: util-linux-libblkid-overflow.patch -## -## klogconsole -## -Patch55: klogconsole-quiet.patch -Patch56: klogconsole.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -332,6 +324,31 @@ Requires: libsmartcols-devel = %{version} %description -n libsmartcols-devel-static Files to develop applications using the libsmartcols library. +%package -n libfdisk1 +Summary: Filesystem detection library +Group: System/Filesystems + +%description -n libfdisk1 +Library for filesystem detection. + +%package -n libfdisk-devel +Summary: Development files for the filesystem detection library +Group: Development/Libraries/C and C++ +Requires: libfdisk1 = %{version} + +%description -n libfdisk-devel +Files needed to develop applications using the library for filesystem +detection. + +%package -n libfdisk-devel-static +Summary: Development files for the filesystem detection library +Group: Development/Libraries/C and C++ +Requires: libfdisk-devel = %{version} + +%description -n libfdisk-devel-static +Files needed to develop applications using the library for filesystem +detection. + %lang_package %endif %if %build_util_linux_systemd @@ -387,17 +404,10 @@ xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %setup -q -n %{_name}-%{version} -b 40 %patch4 -p1 %patch12 -p1 -%patch13 -p1 -%patch14 -p1 # # setctsid cp -p %{S:22} %{S:23} . -pushd ../klogconsole -%patch55 -p1 -%patch56 -p1 -popd - %build #BEGIN CONFIG ALTER %if !%build_util_linux_systemd @@ -436,7 +446,6 @@ fi sed -i 's/BUILD_LSLOGINS/FALSE/ s/BUILD_LOGGER/FALSE/ ' misc-utils/Makemodule.am login-utils/Makemodule.am bash-completion/Makemodule.am -autoreconf -f -i %endif #END FIRST STAGE MODIFICATIONS %else @@ -508,14 +517,12 @@ sed -i ' ' libmount/python/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am # Ignore dependencies on optional (and not built in second stage) libraries sed -i ' - /AM_GNU_GETTEXT/d s/UL_REQUIRES_BUILD(\[.*\], \[libuuid\])/dnl &/ s/UL_REQUIRES_BUILD(\[.*\], \[libsmartcols\])/dnl &/ ' configure.ac sed -i ' /SUBDIRS =/s/ po// ' Makefile.am -autoreconf -f -i #END SECOND STAGE MODIFICATIONS %endif # @@ -532,11 +539,13 @@ else fi export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" +export LDFLAGS="-Wl,-z,relro,-z,now" # override default localstatedir to /run # only used for volatile data # # SUSE now supports only systemd based system. We do not build # sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities. +AUTOPOINT=true autoreconf -vfi %configure \ --localstatedir=/run \ --docdir=%{_docdir}/%{_name} \ @@ -600,10 +609,8 @@ export TS_OPT_fdisk_bsd_known_fail="yes" export TS_OPT_misc_setarch_known_fail="yes" %endif # -%if 0%{?suse_version} > 1310 # glibc requires kernel >= 3.0, thus setarch --uname-2.6 fails on platforms without VDSO export TS_OPT_misc_setarch_known_fail="yes" -%endif # %ifarch armv6l armv6hl aarch64 export TS_OPT_fdisk_gpt_known_fail="yes" @@ -850,6 +857,10 @@ fi %postun -n libuuid1 -p /sbin/ldconfig +%post -n libfdisk1 -p /sbin/ldconfig + +%postun -n libfdisk1 -p /sbin/ldconfig + %files lang -f %{name}.lang %endif @@ -963,12 +974,8 @@ fi %{_bindir}/su %endif %if %{with enable_eject} -%if 0%{?suse_version} <= 1310 -%verify(not mode) %attr(4750,root,audio) %{_bindir}/eject -%else %{_bindir}/eject %endif -%endif %{_bindir}/cal %{_bindir}/chrt %{_bindir}/col @@ -1067,6 +1074,7 @@ fi %verify(not mode) %attr(0755,root,tty) %{_bindir}/wall %{_bindir}/whereis %verify(not mode) %attr(0755,root,tty) %{_bindir}/write +%{_sbindir}/zramctl %if %{with enable_su} %{_mandir}/man1/kill.1.gz %{_mandir}/man1/su.1.gz @@ -1168,6 +1176,7 @@ fi %{_mandir}/man8/uname26.8.gz %{_mandir}/man8/setctsid.8.gz %{_mandir}/man8/wipefs.8.gz +%{_mandir}/man8/zramctl.8.gz %{_mandir}/man8/fstrim.8.gz %{_mandir}/man8/lsblk.8.gz %{_mandir}/man8/resizepart.8.gz @@ -1286,6 +1295,23 @@ fi %files -n libuuid-devel-static %defattr(-, root, root) %{_libdir}/libuuid.*a + +%files -n libfdisk1 +%defattr(-, root, root) +%{_libdir}/libfdisk.so.1 +%{_libdir}/libfdisk.so.1.* + +%files -n libfdisk-devel +%defattr(-, root, root) +%{_libdir}/libfdisk.so +%dir %{_includedir}/libfdisk +%{_includedir}/libfdisk/libfdisk.h +%{_libdir}/pkgconfig/fdisk.pc + +%files -n libfdisk-devel-static +%defattr(-, root, root) +%{_libdir}/libfdisk.*a + %endif %if %build_util_linux_systemd diff --git a/util-linux.changes b/util-linux.changes index 50f9cc0..93c7ab9 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,60 @@ +------------------------------------------------------------------- +Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz + +- Update to util-linux-2.26: + * based on the git master branch of util-linux, remove backported + patches (util-linux-libblkid-unsafe-chars.patch, + util-linux-libblkid-overflow.patch) + * zramctl(8): this NEW COMMAND allows to control /dev/zramN + devices + * agetty(8): supports new option --reload to force already + running agetty processes to reprint the /etc/issue file + * cfdisk(8), sfdisk(8) and fdisk(8): support sfdisk-compatible + scripts; it's possible to save your partitioning layout to text + files and (re)use it in all fdisks + * fdisk(8), sfdisk(8): support new command-line option "--output + " to specify output columns for --list or print commands + * nsenter(1): has been updated to work with the latest kernel + changes in user namespaces supports new command-line option + --preserve-credentials + * unshare(1): has been updated to work with the latest kernel + changes in user namespaces supports new command-line option + "--setgroups=" + * swapon(8): supports new command-line option "-o " with + the same semantics as -o for mount(8); it's now possible to + specify swap options on the command line by the same string as + in fstab + * fdformat(8): supports new command-line options --from and --to + to specify tracks and --repair for broken floppies + * getopt(1): has been updated to the latest version (originally + maintained outside of util-linux) and refactored + * ldattach(8): has been improved to support GSM0710 and intro + modem commands + * logger(1): supports new command-line option --id= to specify + PID (or another ID) allows to specify --rfc3164 or --rfc5424 + syslog protocols + * libfdisk: the library is distributed as a shared library with a + stable API and a standard header file + * libmount: provides a new simple API to monitor mount-table + changes (including changes in userspace mount options) +- Fix lack of I18N support in util-linux-systemd (mis-compilation). + +------------------------------------------------------------------- +Sun Feb 22 17:15:41 UTC 2015 - crrodriguez@opensuse.org + +- Build with FULL RELRO. + +------------------------------------------------------------------- +Tue Feb 10 15:26:55 UTC 2015 - sweet_f_a@gmx.de + +- define upstream source for klogconsole to remove patches + * klogconsole-quiet.patch + * klogconsole.diff +- remove openSUSE 13.1 specific eject permissions, did not worked + anyway since eject-fpie.patch was removed +- always call autoreconf, not only for splitted packages, skip + autopoint (gettext) + ------------------------------------------------------------------- Fri Feb 6 17:01:02 UTC 2015 - dimstar@opensuse.org diff --git a/util-linux.spec b/util-linux.spec index e36154d..e065519 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -120,7 +120,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.25.2 +Version: 2.26 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -129,7 +129,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -139,11 +139,12 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd +# klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 # TODO: split to separate package -Source40: klogconsole.tar.bz2 +Source40: klogconsole.tar.xz # XXX: Run a program in a new session and with controlling tty Source22: setctsid.c Source23: setctsid.8 @@ -160,15 +161,6 @@ Source51: blkid.conf Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FEATURE-SUSE -- Report about disabled encryption to stderr. Patch12: util-linux-noenc-suse.patch -# PATCH-FIX-SECURITY util-linux-libblkid-unsafe-chars.patch bsc907434 CVE-2014-9114 sbrabec@suse.cz -- libblkid: care about unsafe chars in cache -Patch13: util-linux-libblkid-unsafe-chars.patch -# PATCH-FIX-SECURITY util-linux-libblkid-overflow.patch bsc907434 CVE-2014-9114 sbrabec@suse.cz -- libblkid: fix possible buffer overflow -Patch14: util-linux-libblkid-overflow.patch -## -## klogconsole -## -Patch55: klogconsole-quiet.patch -Patch56: klogconsole.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -332,6 +324,31 @@ Requires: libsmartcols-devel = %{version} %description -n libsmartcols-devel-static Files to develop applications using the libsmartcols library. +%package -n libfdisk1 +Summary: Filesystem detection library +Group: System/Filesystems + +%description -n libfdisk1 +Library for filesystem detection. + +%package -n libfdisk-devel +Summary: Development files for the filesystem detection library +Group: Development/Libraries/C and C++ +Requires: libfdisk1 = %{version} + +%description -n libfdisk-devel +Files needed to develop applications using the library for filesystem +detection. + +%package -n libfdisk-devel-static +Summary: Development files for the filesystem detection library +Group: Development/Libraries/C and C++ +Requires: libfdisk-devel = %{version} + +%description -n libfdisk-devel-static +Files needed to develop applications using the library for filesystem +detection. + %lang_package %endif %if %build_util_linux_systemd @@ -387,17 +404,10 @@ xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %setup -q -n %{_name}-%{version} -b 40 %patch4 -p1 %patch12 -p1 -%patch13 -p1 -%patch14 -p1 # # setctsid cp -p %{S:22} %{S:23} . -pushd ../klogconsole -%patch55 -p1 -%patch56 -p1 -popd - %build #BEGIN CONFIG ALTER %if !%build_util_linux_systemd @@ -436,7 +446,6 @@ fi sed -i 's/BUILD_LSLOGINS/FALSE/ s/BUILD_LOGGER/FALSE/ ' misc-utils/Makemodule.am login-utils/Makemodule.am bash-completion/Makemodule.am -autoreconf -f -i %endif #END FIRST STAGE MODIFICATIONS %else @@ -508,14 +517,12 @@ sed -i ' ' libmount/python/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am # Ignore dependencies on optional (and not built in second stage) libraries sed -i ' - /AM_GNU_GETTEXT/d s/UL_REQUIRES_BUILD(\[.*\], \[libuuid\])/dnl &/ s/UL_REQUIRES_BUILD(\[.*\], \[libsmartcols\])/dnl &/ ' configure.ac sed -i ' /SUBDIRS =/s/ po// ' Makefile.am -autoreconf -f -i #END SECOND STAGE MODIFICATIONS %endif # @@ -532,11 +539,13 @@ else fi export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" +export LDFLAGS="-Wl,-z,relro,-z,now" # override default localstatedir to /run # only used for volatile data # # SUSE now supports only systemd based system. We do not build # sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities. +AUTOPOINT=true autoreconf -vfi %configure \ --localstatedir=/run \ --docdir=%{_docdir}/%{_name} \ @@ -600,10 +609,8 @@ export TS_OPT_fdisk_bsd_known_fail="yes" export TS_OPT_misc_setarch_known_fail="yes" %endif # -%if 0%{?suse_version} > 1310 # glibc requires kernel >= 3.0, thus setarch --uname-2.6 fails on platforms without VDSO export TS_OPT_misc_setarch_known_fail="yes" -%endif # %ifarch armv6l armv6hl aarch64 export TS_OPT_fdisk_gpt_known_fail="yes" @@ -850,6 +857,10 @@ fi %postun -n libuuid1 -p /sbin/ldconfig +%post -n libfdisk1 -p /sbin/ldconfig + +%postun -n libfdisk1 -p /sbin/ldconfig + %files lang -f %{name}.lang %endif @@ -963,12 +974,8 @@ fi %{_bindir}/su %endif %if %{with enable_eject} -%if 0%{?suse_version} <= 1310 -%verify(not mode) %attr(4750,root,audio) %{_bindir}/eject -%else %{_bindir}/eject %endif -%endif %{_bindir}/cal %{_bindir}/chrt %{_bindir}/col @@ -1067,6 +1074,7 @@ fi %verify(not mode) %attr(0755,root,tty) %{_bindir}/wall %{_bindir}/whereis %verify(not mode) %attr(0755,root,tty) %{_bindir}/write +%{_sbindir}/zramctl %if %{with enable_su} %{_mandir}/man1/kill.1.gz %{_mandir}/man1/su.1.gz @@ -1168,6 +1176,7 @@ fi %{_mandir}/man8/uname26.8.gz %{_mandir}/man8/setctsid.8.gz %{_mandir}/man8/wipefs.8.gz +%{_mandir}/man8/zramctl.8.gz %{_mandir}/man8/fstrim.8.gz %{_mandir}/man8/lsblk.8.gz %{_mandir}/man8/resizepart.8.gz @@ -1286,6 +1295,23 @@ fi %files -n libuuid-devel-static %defattr(-, root, root) %{_libdir}/libuuid.*a + +%files -n libfdisk1 +%defattr(-, root, root) +%{_libdir}/libfdisk.so.1 +%{_libdir}/libfdisk.so.1.* + +%files -n libfdisk-devel +%defattr(-, root, root) +%{_libdir}/libfdisk.so +%dir %{_includedir}/libfdisk +%{_includedir}/libfdisk/libfdisk.h +%{_libdir}/pkgconfig/fdisk.pc + +%files -n libfdisk-devel-static +%defattr(-, root, root) +%{_libdir}/libfdisk.*a + %endif %if %build_util_linux_systemd From f12741800141a63060a0c666b63d21d4743371c8d7ae2d8a2f0655ce09d27865 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 23 Mar 2015 11:10:38 +0000 Subject: [PATCH 190/211] Accepting request 290679 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/290679 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=199 --- python-libmount.changes | 11 +++++++++++ python-libmount.spec | 5 +---- util-linux-2.26.1.tar.sign | 17 +++++++++++++++++ util-linux-2.26.1.tar.xz | 3 +++ util-linux-2.26.tar.sign | 17 ----------------- util-linux-2.26.tar.xz | 3 --- util-linux-systemd.changes | 11 +++++++++++ util-linux-systemd.spec | 5 +---- util-linux.changes | 11 +++++++++++ util-linux.spec | 5 +---- 10 files changed, 56 insertions(+), 32 deletions(-) create mode 100644 util-linux-2.26.1.tar.sign create mode 100644 util-linux-2.26.1.tar.xz delete mode 100644 util-linux-2.26.tar.sign delete mode 100644 util-linux-2.26.tar.xz diff --git a/python-libmount.changes b/python-libmount.changes index 93c7ab9..01bd72a 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Mar 13 15:57:56 UTC 2015 - sweet_f_a@gmx.de + +- Update to util-linux-2.26.1: + * cal(1): do not segfault when TERM is not defined or wrong + (bnc#903440) + * logger(1): major fixes and enhancements + * agetty(8): support /usr/lib/os-release too + * some more fixes, mostly minor ones, see ReleaseNotes +- re-enable fixed tests (fdisk/bsd, ppc64le) + ------------------------------------------------------------------- Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz diff --git a/python-libmount.spec b/python-libmount.spec index 83d7ba5..2d025d8 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -120,7 +120,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.26 +Version: 2.26.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -602,9 +602,6 @@ make %{?_smp_mflags} %check # mark some tests "known_fail" -%ifarch ppc64le -export TS_OPT_fdisk_bsd_known_fail="yes" -%endif %ifarch %{ix86} export TS_OPT_misc_setarch_known_fail="yes" %endif diff --git a/util-linux-2.26.1.tar.sign b/util-linux-2.26.1.tar.sign new file mode 100644 index 0000000..e98f2b3 --- /dev/null +++ b/util-linux-2.26.1.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIcBAABAgAGBQJVAuqIAAoJEOS3HV7sOcKEPuoP/1PLjnst8mpiCv30V/xR0xes +o7vPYCrsf2frXo7vV7OKCSyZGzsaGTDqxbBtUIhNfYymOa2MAsJTTJpoFxzWkhPz +Il3omaIfsbeNZNXbhGkgUG+sNKWCONm+odUuPRdfRnMyP4M03xTmxf6FFT89KcnT ++Rhv9/QqtY7tEIfjmudIfpxnm+PFK8KoqXKbjnwkKpx3zIG1fMzzyLvhpAfZsPIF +DdVXQ45MVeTjToYC0XNbrBWte0JOgSB7/NIjE/JlLjFCuFOHVtmSldiTcgweUlNU +doyh8pJTOtww69GLDajhLKZgJ0u7rcWuDs1fLqeWNeMQ/88L3OimDi700TeDeS8Z +m14OjQzPGsBg+0SzBIX6WVueavV2cm1CMtcffKnuuQ/SgOUBYxb+inLOdfN65Fr5 +b2nsHb9/aw4PLOAINjECKf0qEkusTvCUvdBiamZlSiJaDknc3LPYfH9OXvlq3EGZ +NdXhmQRbyPT+t/E8exN883tKTMTK6kjP+ySdXGxxlFRrr6HQvtueiFlNI4KYTfQG +xBkSNLLat3yoscJk8V8pFJnmcQ2D+B7OJKUsnS71pekz9U+d9BHlSPoovZwbG+Wz +wxHqQfl1mmfBcB0g/xrchAjDK16qJlcBjsadKNiHfyPuFP7zojOCtQMTq1q/CNxA +Eutqwip6I0Fov/Ne2782 +=CP+j +-----END PGP SIGNATURE----- diff --git a/util-linux-2.26.1.tar.xz b/util-linux-2.26.1.tar.xz new file mode 100644 index 0000000..c1c8cd9 --- /dev/null +++ b/util-linux-2.26.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22dc1c957262e2cbdfb4d524a63d5cd4f219d3ac9b5eab570fc771076799bb6e +size 3859740 diff --git a/util-linux-2.26.tar.sign b/util-linux-2.26.tar.sign deleted file mode 100644 index 1b2e1f0..0000000 --- a/util-linux-2.26.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQIcBAABAgAGBQJU5dYmAAoJEOS3HV7sOcKE/kwP/2IxeHdT91RtWcNvTVhKaFe5 -KItv6vf1790aogocDmnOzxQGhKu/A6BMok4rck2tWkgbH9cPVeG9s3ThN8+cr4Jd -e0pLW+0AgmMFKHRcsmdzSJsOKwoIwrJFkmbGcBQbjJgX74N3RPUX8j+J9JB3VRdf -ampyz6wtbsQ0sK4JkE7GCPhC8VEOcWP/Aousx4+nVf/TGgow4s5aBuP0pdDI3liS -3VAoABPDwUSb3llNw6rfM40PfGU9FObofPiPnD3kNTqEJclxDlbBW4CzcMX5yPca -gMDYoMv35t2lQULeyl/t3C7QzVZtCUyomYIRKta1U0vpwN9dHZSd6aUly2ad/2ci -9bO71M3MTcDzayNz/WiHg1UiadsqmcrfUFvOsFwbxaRrJp0yG5Ymo0wCpYIiR5SN -snevV8tgPWOfUqkhApA7rdWf/lNTz26D9gioKnMpU+BXkPk6LzPvVF4/BoRT1PFr -yiF4g/HaNfjdiZSOYTpC8LbjhCE+H1MPx8ljp5LPR8DtUh3Rl8o0edNK6WcK6USO -s7N4QsXpWNHk71OTvYYHGSJLhk2nmABQXKOKNHUxKqbHAgta/Wuc9yNB+7+qxrYp -xR28xtXwHzMrGf6dL9ZEQbMhuhlRTfhe+4AM5SCKY3JZJcahvn2ocEuZSAphoJhl -FWmJ6n5biUK+N5VnDvMX -=bnK5 ------END PGP SIGNATURE----- diff --git a/util-linux-2.26.tar.xz b/util-linux-2.26.tar.xz deleted file mode 100644 index dbeecd9..0000000 --- a/util-linux-2.26.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a23c6f39dea0ed215ccd589509ffc7bb6f706f6e1a04760f493fb0fd7e93c489 -size 3847960 diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 93c7ab9..01bd72a 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Mar 13 15:57:56 UTC 2015 - sweet_f_a@gmx.de + +- Update to util-linux-2.26.1: + * cal(1): do not segfault when TERM is not defined or wrong + (bnc#903440) + * logger(1): major fixes and enhancements + * agetty(8): support /usr/lib/os-release too + * some more fixes, mostly minor ones, see ReleaseNotes +- re-enable fixed tests (fdisk/bsd, ppc64le) + ------------------------------------------------------------------- Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 9938646..5fc1ce7 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -120,7 +120,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.26 +Version: 2.26.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -602,9 +602,6 @@ make %{?_smp_mflags} %check # mark some tests "known_fail" -%ifarch ppc64le -export TS_OPT_fdisk_bsd_known_fail="yes" -%endif %ifarch %{ix86} export TS_OPT_misc_setarch_known_fail="yes" %endif diff --git a/util-linux.changes b/util-linux.changes index 93c7ab9..01bd72a 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Mar 13 15:57:56 UTC 2015 - sweet_f_a@gmx.de + +- Update to util-linux-2.26.1: + * cal(1): do not segfault when TERM is not defined or wrong + (bnc#903440) + * logger(1): major fixes and enhancements + * agetty(8): support /usr/lib/os-release too + * some more fixes, mostly minor ones, see ReleaseNotes +- re-enable fixed tests (fdisk/bsd, ppc64le) + ------------------------------------------------------------------- Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz diff --git a/util-linux.spec b/util-linux.spec index e065519..fe00f19 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -120,7 +120,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.26 +Version: 2.26.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -602,9 +602,6 @@ make %{?_smp_mflags} %check # mark some tests "known_fail" -%ifarch ppc64le -export TS_OPT_fdisk_bsd_known_fail="yes" -%endif %ifarch %{ix86} export TS_OPT_misc_setarch_known_fail="yes" %endif From 25b46f706556d395854f2705ea59ea089e6deed8da4ba4c4299227c0009b3437 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sun, 10 May 2015 08:43:49 +0000 Subject: [PATCH 191/211] Accepting request 305842 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/305842 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=200 --- python-libmount.changes | 9 +++++++++ python-libmount.spec | 8 +++----- util-linux-2.26.1.tar.sign | 17 ----------------- util-linux-2.26.1.tar.xz | 3 --- util-linux-2.26.2.tar.sign | 17 +++++++++++++++++ util-linux-2.26.2.tar.xz | 3 +++ util-linux-systemd.changes | 9 +++++++++ util-linux-systemd.spec | 8 +++----- util-linux.changes | 9 +++++++++ util-linux.spec | 8 +++----- 10 files changed, 56 insertions(+), 35 deletions(-) delete mode 100644 util-linux-2.26.1.tar.sign delete mode 100644 util-linux-2.26.1.tar.xz create mode 100644 util-linux-2.26.2.tar.sign create mode 100644 util-linux-2.26.2.tar.xz diff --git a/python-libmount.changes b/python-libmount.changes index 01bd72a..7e8945b 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri May 1 11:30:09 UTC 2015 - sweet_f_a@gmx.de + +- Update to util-linux-2.26.2: + * many fixes, most notable for logger, *fdisks and mount + * (lib)mount, add support for MS_LAZYTIME +- disable libmount/lock test to avoid random timeouts +- socat is needed for logger tests + ------------------------------------------------------------------- Fri Mar 13 15:57:56 UTC 2015 - sweet_f_a@gmx.de diff --git a/python-libmount.spec b/python-libmount.spec index 2d025d8..6267c05 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -96,6 +96,7 @@ BuildRequires: zlib-devel BuildRequires: gpg-offline %endif %if %build_util_linux_systemd +BuildRequires: socat %if 0%{?suse_version} <= 1230 BuildRequires: pkgconfig(systemd) %else @@ -120,7 +121,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.26.1 +Version: 2.26.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -602,9 +603,6 @@ make %{?_smp_mflags} %check # mark some tests "known_fail" -%ifarch %{ix86} -export TS_OPT_misc_setarch_known_fail="yes" -%endif # # glibc requires kernel >= 3.0, thus setarch --uname-2.6 fails on platforms without VDSO export TS_OPT_misc_setarch_known_fail="yes" @@ -620,7 +618,7 @@ export TS_OPT_kill_print_pid_known_fail="yes" export TS_OPT_kill_queue_known_fail="yes" %endif # FIXME: These sometimes fails: -export TS_OPT_libmount_lock_known_fail="yes" +export TS_OPT_libmount_lock_fake="yes" # # hacks export PATH="$PATH:/sbin:/usr/sbin" diff --git a/util-linux-2.26.1.tar.sign b/util-linux-2.26.1.tar.sign deleted file mode 100644 index e98f2b3..0000000 --- a/util-linux-2.26.1.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQIcBAABAgAGBQJVAuqIAAoJEOS3HV7sOcKEPuoP/1PLjnst8mpiCv30V/xR0xes -o7vPYCrsf2frXo7vV7OKCSyZGzsaGTDqxbBtUIhNfYymOa2MAsJTTJpoFxzWkhPz -Il3omaIfsbeNZNXbhGkgUG+sNKWCONm+odUuPRdfRnMyP4M03xTmxf6FFT89KcnT -+Rhv9/QqtY7tEIfjmudIfpxnm+PFK8KoqXKbjnwkKpx3zIG1fMzzyLvhpAfZsPIF -DdVXQ45MVeTjToYC0XNbrBWte0JOgSB7/NIjE/JlLjFCuFOHVtmSldiTcgweUlNU -doyh8pJTOtww69GLDajhLKZgJ0u7rcWuDs1fLqeWNeMQ/88L3OimDi700TeDeS8Z -m14OjQzPGsBg+0SzBIX6WVueavV2cm1CMtcffKnuuQ/SgOUBYxb+inLOdfN65Fr5 -b2nsHb9/aw4PLOAINjECKf0qEkusTvCUvdBiamZlSiJaDknc3LPYfH9OXvlq3EGZ -NdXhmQRbyPT+t/E8exN883tKTMTK6kjP+ySdXGxxlFRrr6HQvtueiFlNI4KYTfQG -xBkSNLLat3yoscJk8V8pFJnmcQ2D+B7OJKUsnS71pekz9U+d9BHlSPoovZwbG+Wz -wxHqQfl1mmfBcB0g/xrchAjDK16qJlcBjsadKNiHfyPuFP7zojOCtQMTq1q/CNxA -Eutqwip6I0Fov/Ne2782 -=CP+j ------END PGP SIGNATURE----- diff --git a/util-linux-2.26.1.tar.xz b/util-linux-2.26.1.tar.xz deleted file mode 100644 index c1c8cd9..0000000 --- a/util-linux-2.26.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:22dc1c957262e2cbdfb4d524a63d5cd4f219d3ac9b5eab570fc771076799bb6e -size 3859740 diff --git a/util-linux-2.26.2.tar.sign b/util-linux-2.26.2.tar.sign new file mode 100644 index 0000000..5e6d30e --- /dev/null +++ b/util-linux-2.26.2.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIcBAABAgAGBQJVQgNZAAoJEOS3HV7sOcKE/n8P/RvS8t27ynKMJ/rA42pB9yON +miCVGCwNm2JV7eE06iTekuycackuea5d3gnzSoKx7KJNidCSkjQqjo11pS4eaYpN +DB9Poi8X+Xn6yFOYm2GMFKSDjnh9cJdZlbrvqiPokhgpsDCHJhbvVZiNrNl8oPaj +pbg0u3dA2+/w8axM8MepR5u+17BGQxj4M6dzJX1M0rJYFbnRNpemRPz4OsRKIgHY +0GbpK2hvqzX0fGayI4NlkIpYwfI2Yyvd9UMLbwLWKH38tIEvSAEFfCmwQh70YA6R +SX63n/KKdfEg+irnwljzW038dXv+MdHFZQtIRryVBTpdVWjMwyq71cFc4Nz2kGyP +iFgxxcBsTrOFNjBZWvGlMSJNc7yll6GKGWAJsxcfo31ykuy54GTWAkiDmpNUrUSR +Jic6+Bb24HVGTW7qz0guVRnQdRznDir6Wvt8dLCbU/8Um6yf66YCSUwyWACNTAkP +QtIExV/gd3aityEqT3d0sSt/yB1GQR8/AUGVd9xQPe81DK54bD+5db3klyOKVs7s +Prqje/ARjeHMsDqLPAYQ+LkfXt0VETcB6tWbgklUvqTsqxSnFXPgOF9E7iKw5+0p +Z3aHxhxlxtJHtjBm88rBPjsnQStDnXQ1Y6Qcm1OndpKnaeBGjlpO5YBqO2/I5sUa +dInyRccybgBxGeG+VuUr +=Zgg5 +-----END PGP SIGNATURE----- diff --git a/util-linux-2.26.2.tar.xz b/util-linux-2.26.2.tar.xz new file mode 100644 index 0000000..c11c20a --- /dev/null +++ b/util-linux-2.26.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e29bda142528a48a0a953c39ff63093651a4809042e1790fbd6aa8663fd9666 +size 3863868 diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 01bd72a..7e8945b 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri May 1 11:30:09 UTC 2015 - sweet_f_a@gmx.de + +- Update to util-linux-2.26.2: + * many fixes, most notable for logger, *fdisks and mount + * (lib)mount, add support for MS_LAZYTIME +- disable libmount/lock test to avoid random timeouts +- socat is needed for logger tests + ------------------------------------------------------------------- Fri Mar 13 15:57:56 UTC 2015 - sweet_f_a@gmx.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 5fc1ce7..269ae43 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -96,6 +96,7 @@ BuildRequires: zlib-devel BuildRequires: gpg-offline %endif %if %build_util_linux_systemd +BuildRequires: socat %if 0%{?suse_version} <= 1230 BuildRequires: pkgconfig(systemd) %else @@ -120,7 +121,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.26.1 +Version: 2.26.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -602,9 +603,6 @@ make %{?_smp_mflags} %check # mark some tests "known_fail" -%ifarch %{ix86} -export TS_OPT_misc_setarch_known_fail="yes" -%endif # # glibc requires kernel >= 3.0, thus setarch --uname-2.6 fails on platforms without VDSO export TS_OPT_misc_setarch_known_fail="yes" @@ -620,7 +618,7 @@ export TS_OPT_kill_print_pid_known_fail="yes" export TS_OPT_kill_queue_known_fail="yes" %endif # FIXME: These sometimes fails: -export TS_OPT_libmount_lock_known_fail="yes" +export TS_OPT_libmount_lock_fake="yes" # # hacks export PATH="$PATH:/sbin:/usr/sbin" diff --git a/util-linux.changes b/util-linux.changes index 01bd72a..7e8945b 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri May 1 11:30:09 UTC 2015 - sweet_f_a@gmx.de + +- Update to util-linux-2.26.2: + * many fixes, most notable for logger, *fdisks and mount + * (lib)mount, add support for MS_LAZYTIME +- disable libmount/lock test to avoid random timeouts +- socat is needed for logger tests + ------------------------------------------------------------------- Fri Mar 13 15:57:56 UTC 2015 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index fe00f19..ec56bbe 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -96,6 +96,7 @@ BuildRequires: zlib-devel BuildRequires: gpg-offline %endif %if %build_util_linux_systemd +BuildRequires: socat %if 0%{?suse_version} <= 1230 BuildRequires: pkgconfig(systemd) %else @@ -120,7 +121,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.26.1 +Version: 2.26.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -602,9 +603,6 @@ make %{?_smp_mflags} %check # mark some tests "known_fail" -%ifarch %{ix86} -export TS_OPT_misc_setarch_known_fail="yes" -%endif # # glibc requires kernel >= 3.0, thus setarch --uname-2.6 fails on platforms without VDSO export TS_OPT_misc_setarch_known_fail="yes" @@ -620,7 +618,7 @@ export TS_OPT_kill_print_pid_known_fail="yes" export TS_OPT_kill_queue_known_fail="yes" %endif # FIXME: These sometimes fails: -export TS_OPT_libmount_lock_known_fail="yes" +export TS_OPT_libmount_lock_fake="yes" # # hacks export PATH="$PATH:/sbin:/usr/sbin" From 4717d9c5f9c209997c0bfef3a39d702ce9820604d28411d84dbd385b3dd59e7c Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 1 Jun 2015 07:26:15 +0000 Subject: [PATCH 192/211] Accepting request 309343 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/309343 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=201 --- python-libmount.changes | 8 ++++++++ python-libmount.spec | 5 ++++- util-linux-systemd.changes | 8 ++++++++ util-linux-systemd.spec | 2 ++ util-linux.changes | 8 ++++++++ util-linux.spec | 2 ++ 6 files changed, 32 insertions(+), 1 deletion(-) diff --git a/python-libmount.changes b/python-libmount.changes index 7e8945b..199d619 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon May 25 16:26:01 UTC 2015 - crrodriguez@opensuse.org + +- Build with --enable-libmount-force-mountinfo the rationale is + identical to the following commit message --> http://bit.ly/1eqf5GO + The default behaviour is undesirable and fragile when using + systemd. + ------------------------------------------------------------------- Fri May 1 11:30:09 UTC 2015 - sweet_f_a@gmx.de diff --git a/python-libmount.spec b/python-libmount.spec index 6267c05..d63e3b3 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -76,7 +76,7 @@ Name: python-libmount %endif Summary: %main_summary License: GPL-2.0+ -Group: %main_group +Group: %group_pl BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel @@ -388,6 +388,7 @@ SMP systems. %if %build_util_linux %package -n python-libmount Summary: %summary_pl +License: GPL-2.0+ Group: %group_pl %description -n python-libmount @@ -591,6 +592,8 @@ AUTOPOINT=true autoreconf -vfi %else --without-python \ %endif + --enable-libmount-force-mountinfo \ + # # Safety check: HAVE_UUIDD should be always 1: grep -q 'HAVE_UUIDD 1' config.h diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 7e8945b..199d619 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon May 25 16:26:01 UTC 2015 - crrodriguez@opensuse.org + +- Build with --enable-libmount-force-mountinfo the rationale is + identical to the following commit message --> http://bit.ly/1eqf5GO + The default behaviour is undesirable and fragile when using + systemd. + ------------------------------------------------------------------- Fri May 1 11:30:09 UTC 2015 - sweet_f_a@gmx.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 269ae43..bd53430 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -591,6 +591,8 @@ AUTOPOINT=true autoreconf -vfi %else --without-python \ %endif + --enable-libmount-force-mountinfo \ + # # Safety check: HAVE_UUIDD should be always 1: grep -q 'HAVE_UUIDD 1' config.h diff --git a/util-linux.changes b/util-linux.changes index 7e8945b..199d619 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon May 25 16:26:01 UTC 2015 - crrodriguez@opensuse.org + +- Build with --enable-libmount-force-mountinfo the rationale is + identical to the following commit message --> http://bit.ly/1eqf5GO + The default behaviour is undesirable and fragile when using + systemd. + ------------------------------------------------------------------- Fri May 1 11:30:09 UTC 2015 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index ec56bbe..8b60102 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -591,6 +591,8 @@ AUTOPOINT=true autoreconf -vfi %else --without-python \ %endif + --enable-libmount-force-mountinfo \ + # # Safety check: HAVE_UUIDD should be always 1: grep -q 'HAVE_UUIDD 1' config.h From 56c752d4f173e5ab05c001d45f2890739b3b8b45cc545439414b1510b87325a2 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sun, 5 Jul 2015 15:50:07 +0000 Subject: [PATCH 193/211] Accepting request 312146 from Base:System Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/312146 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=202 --- python-libmount.changes | 12 ++++++------ python-libmount.spec | 3 +-- util-linux-systemd.changes | 12 ++++++------ util-linux.changes | 12 ++++++------ 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/python-libmount.changes b/python-libmount.changes index 199d619..b0d44b9 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -3163,12 +3163,12 @@ Tue Feb 4 12:40:00 CET 2003 - meissner@suse.de Wed Jan 29 11:52:19 CET 2003 - mmj@suse.de - Update to util-linux-2.11z including: - Translation updates - mount: fix LABEL= handling for user umount, don't abort on read + * Translation updates + * mount: fix LABEL= handling for user umount, don't abort on read error with photocds and add dmask and fmask vfat mount options - setterm: accept devfs name - simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails - umount: allow user umount after mount by label or uuid + * setterm: accept devfs name + * simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails + * umount: allow user umount after mount by label or uuid ------------------------------------------------------------------- Wed Jan 22 15:10:24 CET 2003 - sf@suse.de @@ -3996,7 +3996,7 @@ Thu Aug 26 15:05:03 CEST 1999 - uli@suse.de ------------------------------------------------------------------- Wed Aug 25 18:04:35 MEST 1999 - kukuk@suse.de -- Don?t install tsort, its now in textutils 2.0 +- Don't install tsort, its now in textutils 2.0 ------------------------------------------------------------------- Tue Aug 24 10:11:06 MEST 1999 - kukuk@suse.de diff --git a/python-libmount.spec b/python-libmount.spec index d63e3b3..8b0c14a 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -76,7 +76,7 @@ Name: python-libmount %endif Summary: %main_summary License: GPL-2.0+ -Group: %group_pl +Group: %main_group BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel @@ -388,7 +388,6 @@ SMP systems. %if %build_util_linux %package -n python-libmount Summary: %summary_pl -License: GPL-2.0+ Group: %group_pl %description -n python-libmount diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 199d619..b0d44b9 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -3163,12 +3163,12 @@ Tue Feb 4 12:40:00 CET 2003 - meissner@suse.de Wed Jan 29 11:52:19 CET 2003 - mmj@suse.de - Update to util-linux-2.11z including: - Translation updates - mount: fix LABEL= handling for user umount, don't abort on read + * Translation updates + * mount: fix LABEL= handling for user umount, don't abort on read error with photocds and add dmask and fmask vfat mount options - setterm: accept devfs name - simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails - umount: allow user umount after mount by label or uuid + * setterm: accept devfs name + * simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails + * umount: allow user umount after mount by label or uuid ------------------------------------------------------------------- Wed Jan 22 15:10:24 CET 2003 - sf@suse.de @@ -3996,7 +3996,7 @@ Thu Aug 26 15:05:03 CEST 1999 - uli@suse.de ------------------------------------------------------------------- Wed Aug 25 18:04:35 MEST 1999 - kukuk@suse.de -- Don?t install tsort, its now in textutils 2.0 +- Don't install tsort, its now in textutils 2.0 ------------------------------------------------------------------- Tue Aug 24 10:11:06 MEST 1999 - kukuk@suse.de diff --git a/util-linux.changes b/util-linux.changes index 199d619..b0d44b9 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -3163,12 +3163,12 @@ Tue Feb 4 12:40:00 CET 2003 - meissner@suse.de Wed Jan 29 11:52:19 CET 2003 - mmj@suse.de - Update to util-linux-2.11z including: - Translation updates - mount: fix LABEL= handling for user umount, don't abort on read + * Translation updates + * mount: fix LABEL= handling for user umount, don't abort on read error with photocds and add dmask and fmask vfat mount options - setterm: accept devfs name - simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails - umount: allow user umount after mount by label or uuid + * setterm: accept devfs name + * simpleinit: security: refuse initctl_fd if FD_CLOEXEC fails + * umount: allow user umount after mount by label or uuid ------------------------------------------------------------------- Wed Jan 22 15:10:24 CET 2003 - sf@suse.de @@ -3996,7 +3996,7 @@ Thu Aug 26 15:05:03 CEST 1999 - uli@suse.de ------------------------------------------------------------------- Wed Aug 25 18:04:35 MEST 1999 - kukuk@suse.de -- Don?t install tsort, its now in textutils 2.0 +- Don't install tsort, its now in textutils 2.0 ------------------------------------------------------------------- Tue Aug 24 10:11:06 MEST 1999 - kukuk@suse.de From 23acdf291f7807cc17ba3ffc6586dc0aa85d47a771b4be49425f7478b79bafdb Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 14 Oct 2015 14:34:35 +0000 Subject: [PATCH 194/211] Accepting request 334018 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/334018 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=203 --- python-libmount.changes | 43 ++++++++++++++++++++++++++++++++++++++ python-libmount.spec | 28 ++++++++++++++----------- util-linux-2.26.2.tar.sign | 17 --------------- util-linux-2.26.2.tar.xz | 3 --- util-linux-2.27.tar.sign | 17 +++++++++++++++ util-linux-2.27.tar.xz | 3 +++ util-linux-systemd.changes | 43 ++++++++++++++++++++++++++++++++++++++ util-linux-systemd.spec | 28 ++++++++++++++----------- util-linux.changes | 43 ++++++++++++++++++++++++++++++++++++++ util-linux.spec | 28 ++++++++++++++----------- 10 files changed, 197 insertions(+), 56 deletions(-) delete mode 100644 util-linux-2.26.2.tar.sign delete mode 100644 util-linux-2.26.2.tar.xz create mode 100644 util-linux-2.27.tar.sign create mode 100644 util-linux-2.27.tar.xz diff --git a/python-libmount.changes b/python-libmount.changes index b0d44b9..9d08fa2 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,46 @@ +------------------------------------------------------------------- +Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com + +- Update to version 2.27: + * Many changes and improvements, most notably: + * lsipc: new command + * unshare provides a new option --propagation= + * mount(8) supports read-only binds in one (not atomic) step by + "bind,ro". + * GNU readline support in fdisk and sfdisk. + * JSON support in libsmartcols and findmnt, losetup, lsblk, + lslocks, sfdisk and lsipc. + * script has been massively improved to be more robust and less + complex (bsc#888678, bsc#930236). + * sulogin supports locked root accounts by --force. + * colors support by default. It is possible to change this + with --disable-colors-default. + * more information in cfdisk + * fdisk provides new commands 'F' and 'i' + * cal supports the new options --twelve and --months + * rtcwake supports a news option --list-modes and --date, no + support RTC_ALM_READ and RTC_ALM_SET fallbacks any more. + * Many fixes, most notably: + * fsck: now supports -r {fd} (bsc#903738) + * better handling of multi-path devices + (bsc#880468, bsc#924994) + * flock: improve timeout handling (bsc#926945) + * lsblk: display mountpoint even for top-level device + (bsc#943415) + +------------------------------------------------------------------- +Wed Aug 19 21:18:11 CEST 2015 - sbrabec@suse.com + +- Add licenses. + +------------------------------------------------------------------- +Tue Aug 4 20:31:55 CEST 2015 - sbrabec@suse.com + +- Add %systemd_preset_pre and %systemd_preset_posttrans that will + do one shot presetting of uuidd.service on upgrade. + (bnc#900935#c46, FATE#318949). +- Remove one shot presetting hacks. + ------------------------------------------------------------------- Mon May 25 16:26:01 UTC 2015 - crrodriguez@opensuse.org diff --git a/python-libmount.spec b/python-libmount.spec index 8b0c14a..a7923ba 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -121,7 +121,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.26.2 +Version: 2.27 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -130,7 +130,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -140,7 +140,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -515,7 +515,7 @@ sed -i ' s/libuuid\.la/-luuid/g s/libblkid\.la/-lblkid/g s/libsmartcols\.la/-lsmartcols/g - ' libmount/python/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am + ' libmount/python/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am tests/helpers/Makemodule.am # Ignore dependencies on optional (and not built in second stage) libraries sed -i ' s/UL_REQUIRES_BUILD(\[.*\], \[libuuid\])/dnl &/ @@ -877,18 +877,12 @@ fi %postun -n util-linux-systemd %{service_del_postun fstrim.service fstrim.timer} -%pre -n uuidd +%pre -p /bin/bash -n uuidd /usr/sbin/groupadd -r uuidd 2>/dev/null || : /usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ -d /var/run/uuidd uuidd 2>/dev/null || : %{service_add_pre uuidd.socket uuidd.service} -# trick: service existed before, but it had no preset before 13.2 and in SLE12. Force %%service_add_post to run preset. -if [ $1 -gt 1 ] ; then - if ! test -f /usr/lib/systemd/system-preset/50-uuidd.preset ; then - echo -n "" >/run/rpm-%{name}-update-uuidd.socket-new-in-upgrade - echo -n "" >/run/rpm-%{name}-update-uuidd.service-new-in-upgrade - fi -fi +%systemd_preset_pre %post -n uuidd %{service_add_post uuidd.socket uuidd.service} @@ -898,6 +892,9 @@ fi %postun -n uuidd %{service_del_postun uuidd.socket uuidd.service} + +%posttrans -p /bin/bash -n uuidd +%systemd_preset_posttrans %endif %if %build_util_linux @@ -905,6 +902,11 @@ fi # Common files for all archs %defattr(-,root,root) # util-linux documentation files +%doc README.licensing +%doc COPYING +%doc Documentation/licenses/COPYING.BSD-3 +%doc Documentation/licenses/COPYING.LGPLv2.1 +%doc Documentation/licenses/COPYING.UCB %doc Documentation/blkid.txt %doc Documentation/cal.txt %doc Documentation/col.txt @@ -998,6 +1000,7 @@ fi %{_bindir}/look %{_bindir}/lsblk %{_bindir}/lscpu +%{_bindir}/lsipc %{_bindir}/lslocks %{_bindir}/mcookie %{_bindir}/mesg @@ -1100,6 +1103,7 @@ fi %{_mandir}/man1/login.1.gz %{_mandir}/man1/look.1.gz %{_mandir}/man1/lscpu.1.gz +%{_mandir}/man1/lsipc.1.gz %{_mandir}/man1/mcookie.1.gz %{_mandir}/man1/mesg.1.gz %{_mandir}/man1/more.1.gz diff --git a/util-linux-2.26.2.tar.sign b/util-linux-2.26.2.tar.sign deleted file mode 100644 index 5e6d30e..0000000 --- a/util-linux-2.26.2.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQIcBAABAgAGBQJVQgNZAAoJEOS3HV7sOcKE/n8P/RvS8t27ynKMJ/rA42pB9yON -miCVGCwNm2JV7eE06iTekuycackuea5d3gnzSoKx7KJNidCSkjQqjo11pS4eaYpN -DB9Poi8X+Xn6yFOYm2GMFKSDjnh9cJdZlbrvqiPokhgpsDCHJhbvVZiNrNl8oPaj -pbg0u3dA2+/w8axM8MepR5u+17BGQxj4M6dzJX1M0rJYFbnRNpemRPz4OsRKIgHY -0GbpK2hvqzX0fGayI4NlkIpYwfI2Yyvd9UMLbwLWKH38tIEvSAEFfCmwQh70YA6R -SX63n/KKdfEg+irnwljzW038dXv+MdHFZQtIRryVBTpdVWjMwyq71cFc4Nz2kGyP -iFgxxcBsTrOFNjBZWvGlMSJNc7yll6GKGWAJsxcfo31ykuy54GTWAkiDmpNUrUSR -Jic6+Bb24HVGTW7qz0guVRnQdRznDir6Wvt8dLCbU/8Um6yf66YCSUwyWACNTAkP -QtIExV/gd3aityEqT3d0sSt/yB1GQR8/AUGVd9xQPe81DK54bD+5db3klyOKVs7s -Prqje/ARjeHMsDqLPAYQ+LkfXt0VETcB6tWbgklUvqTsqxSnFXPgOF9E7iKw5+0p -Z3aHxhxlxtJHtjBm88rBPjsnQStDnXQ1Y6Qcm1OndpKnaeBGjlpO5YBqO2/I5sUa -dInyRccybgBxGeG+VuUr -=Zgg5 ------END PGP SIGNATURE----- diff --git a/util-linux-2.26.2.tar.xz b/util-linux-2.26.2.tar.xz deleted file mode 100644 index c11c20a..0000000 --- a/util-linux-2.26.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0e29bda142528a48a0a953c39ff63093651a4809042e1790fbd6aa8663fd9666 -size 3863868 diff --git a/util-linux-2.27.tar.sign b/util-linux-2.27.tar.sign new file mode 100644 index 0000000..6310765 --- /dev/null +++ b/util-linux-2.27.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIcBAABAgAGBQJV7UZMAAoJEOS3HV7sOcKEWr8QAI0MEaXcmHvqIkPiRj6m0qOj +LdbXTWrw8W8UUdCyyNenn7xWrGfp7C4E24ywoNqb7uslvzPEEm1Xpfa2FHA28hJW +QrCRAEvpAJt42NlTIoPoxHIoPhU9B5YkcBR5Pc0lpKx+T6s2YSqWlM+lNX+27HRC +My9m3uX+ob4Zr/Z9SEhcdVGhdrWWo82EHVu8AC2KpJAZHUhjFZUP3zjGda2PE0GU +6Q9Qyi+RSk6km+J1YVYuzENwwliNU2GnMvOn2ZmRe4jgZTaYbkuEagfq998Khbfb +XS/dQra4pjSoFxRAX5zZ3aHZWy4joClgBg+1NEqFvI4TFA245MpYSfh9eXXXqzIu +G6HQpswBeIuqyE0STagpAmv1/xPNR8o4sw/cPmLIWI2IGpTa+NkIs8BTc3gIDn6G +yWxVuWVOIBnbigzkk/UbfC22ZuQNLMxL13F40QDPoL4zfOkxDkMldhTxTrabvs0K +jelSgLYXJbjwgJOHAgdvN38iECxBnoSUcJAgq8JysT13FiaYwlpXsK3pJyDRzQ4m +Ejnv/xgvJS3Dz0tSAUdSHC+C+joI6ut/zy/M/eQOldtYvutcwyeCwBgUvn6V5/Bw +CfNb2oXDVoW7iU2rkuu9H49BId1CiypZDvKK1qWVzd/gFcLyu5a5rKqBSPLCD17t +A7EuS7l/eg3/1dxKANDB +=JnxE +-----END PGP SIGNATURE----- diff --git a/util-linux-2.27.tar.xz b/util-linux-2.27.tar.xz new file mode 100644 index 0000000..fb0a59e --- /dev/null +++ b/util-linux-2.27.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fcbf04e3ef8377fc8369af7f9afee341c5eef9b02dd5a7ce71532d0957e86dc7 +size 3968872 diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index b0d44b9..9d08fa2 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,46 @@ +------------------------------------------------------------------- +Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com + +- Update to version 2.27: + * Many changes and improvements, most notably: + * lsipc: new command + * unshare provides a new option --propagation= + * mount(8) supports read-only binds in one (not atomic) step by + "bind,ro". + * GNU readline support in fdisk and sfdisk. + * JSON support in libsmartcols and findmnt, losetup, lsblk, + lslocks, sfdisk and lsipc. + * script has been massively improved to be more robust and less + complex (bsc#888678, bsc#930236). + * sulogin supports locked root accounts by --force. + * colors support by default. It is possible to change this + with --disable-colors-default. + * more information in cfdisk + * fdisk provides new commands 'F' and 'i' + * cal supports the new options --twelve and --months + * rtcwake supports a news option --list-modes and --date, no + support RTC_ALM_READ and RTC_ALM_SET fallbacks any more. + * Many fixes, most notably: + * fsck: now supports -r {fd} (bsc#903738) + * better handling of multi-path devices + (bsc#880468, bsc#924994) + * flock: improve timeout handling (bsc#926945) + * lsblk: display mountpoint even for top-level device + (bsc#943415) + +------------------------------------------------------------------- +Wed Aug 19 21:18:11 CEST 2015 - sbrabec@suse.com + +- Add licenses. + +------------------------------------------------------------------- +Tue Aug 4 20:31:55 CEST 2015 - sbrabec@suse.com + +- Add %systemd_preset_pre and %systemd_preset_posttrans that will + do one shot presetting of uuidd.service on upgrade. + (bnc#900935#c46, FATE#318949). +- Remove one shot presetting hacks. + ------------------------------------------------------------------- Mon May 25 16:26:01 UTC 2015 - crrodriguez@opensuse.org diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index bd53430..b5a1a13 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -121,7 +121,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.26.2 +Version: 2.27 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -130,7 +130,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -140,7 +140,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -515,7 +515,7 @@ sed -i ' s/libuuid\.la/-luuid/g s/libblkid\.la/-lblkid/g s/libsmartcols\.la/-lsmartcols/g - ' libmount/python/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am + ' libmount/python/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am tests/helpers/Makemodule.am # Ignore dependencies on optional (and not built in second stage) libraries sed -i ' s/UL_REQUIRES_BUILD(\[.*\], \[libuuid\])/dnl &/ @@ -877,18 +877,12 @@ fi %postun -n util-linux-systemd %{service_del_postun fstrim.service fstrim.timer} -%pre -n uuidd +%pre -p /bin/bash -n uuidd /usr/sbin/groupadd -r uuidd 2>/dev/null || : /usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ -d /var/run/uuidd uuidd 2>/dev/null || : %{service_add_pre uuidd.socket uuidd.service} -# trick: service existed before, but it had no preset before 13.2 and in SLE12. Force %%service_add_post to run preset. -if [ $1 -gt 1 ] ; then - if ! test -f /usr/lib/systemd/system-preset/50-uuidd.preset ; then - echo -n "" >/run/rpm-%{name}-update-uuidd.socket-new-in-upgrade - echo -n "" >/run/rpm-%{name}-update-uuidd.service-new-in-upgrade - fi -fi +%systemd_preset_pre %post -n uuidd %{service_add_post uuidd.socket uuidd.service} @@ -898,6 +892,9 @@ fi %postun -n uuidd %{service_del_postun uuidd.socket uuidd.service} + +%posttrans -p /bin/bash -n uuidd +%systemd_preset_posttrans %endif %if %build_util_linux @@ -905,6 +902,11 @@ fi # Common files for all archs %defattr(-,root,root) # util-linux documentation files +%doc README.licensing +%doc COPYING +%doc Documentation/licenses/COPYING.BSD-3 +%doc Documentation/licenses/COPYING.LGPLv2.1 +%doc Documentation/licenses/COPYING.UCB %doc Documentation/blkid.txt %doc Documentation/cal.txt %doc Documentation/col.txt @@ -998,6 +1000,7 @@ fi %{_bindir}/look %{_bindir}/lsblk %{_bindir}/lscpu +%{_bindir}/lsipc %{_bindir}/lslocks %{_bindir}/mcookie %{_bindir}/mesg @@ -1100,6 +1103,7 @@ fi %{_mandir}/man1/login.1.gz %{_mandir}/man1/look.1.gz %{_mandir}/man1/lscpu.1.gz +%{_mandir}/man1/lsipc.1.gz %{_mandir}/man1/mcookie.1.gz %{_mandir}/man1/mesg.1.gz %{_mandir}/man1/more.1.gz diff --git a/util-linux.changes b/util-linux.changes index b0d44b9..9d08fa2 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,46 @@ +------------------------------------------------------------------- +Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com + +- Update to version 2.27: + * Many changes and improvements, most notably: + * lsipc: new command + * unshare provides a new option --propagation= + * mount(8) supports read-only binds in one (not atomic) step by + "bind,ro". + * GNU readline support in fdisk and sfdisk. + * JSON support in libsmartcols and findmnt, losetup, lsblk, + lslocks, sfdisk and lsipc. + * script has been massively improved to be more robust and less + complex (bsc#888678, bsc#930236). + * sulogin supports locked root accounts by --force. + * colors support by default. It is possible to change this + with --disable-colors-default. + * more information in cfdisk + * fdisk provides new commands 'F' and 'i' + * cal supports the new options --twelve and --months + * rtcwake supports a news option --list-modes and --date, no + support RTC_ALM_READ and RTC_ALM_SET fallbacks any more. + * Many fixes, most notably: + * fsck: now supports -r {fd} (bsc#903738) + * better handling of multi-path devices + (bsc#880468, bsc#924994) + * flock: improve timeout handling (bsc#926945) + * lsblk: display mountpoint even for top-level device + (bsc#943415) + +------------------------------------------------------------------- +Wed Aug 19 21:18:11 CEST 2015 - sbrabec@suse.com + +- Add licenses. + +------------------------------------------------------------------- +Tue Aug 4 20:31:55 CEST 2015 - sbrabec@suse.com + +- Add %systemd_preset_pre and %systemd_preset_posttrans that will + do one shot presetting of uuidd.service on upgrade. + (bnc#900935#c46, FATE#318949). +- Remove one shot presetting hacks. + ------------------------------------------------------------------- Mon May 25 16:26:01 UTC 2015 - crrodriguez@opensuse.org diff --git a/util-linux.spec b/util-linux.spec index 8b60102..ff19d05 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -121,7 +121,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.26.2 +Version: 2.27 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -130,7 +130,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -140,7 +140,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -515,7 +515,7 @@ sed -i ' s/libuuid\.la/-luuid/g s/libblkid\.la/-lblkid/g s/libsmartcols\.la/-lsmartcols/g - ' libmount/python/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am + ' libmount/python/Makemodule.am misc-utils/Makemodule.am login-utils/Makemodule.am tests/helpers/Makemodule.am # Ignore dependencies on optional (and not built in second stage) libraries sed -i ' s/UL_REQUIRES_BUILD(\[.*\], \[libuuid\])/dnl &/ @@ -877,18 +877,12 @@ fi %postun -n util-linux-systemd %{service_del_postun fstrim.service fstrim.timer} -%pre -n uuidd +%pre -p /bin/bash -n uuidd /usr/sbin/groupadd -r uuidd 2>/dev/null || : /usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ -d /var/run/uuidd uuidd 2>/dev/null || : %{service_add_pre uuidd.socket uuidd.service} -# trick: service existed before, but it had no preset before 13.2 and in SLE12. Force %%service_add_post to run preset. -if [ $1 -gt 1 ] ; then - if ! test -f /usr/lib/systemd/system-preset/50-uuidd.preset ; then - echo -n "" >/run/rpm-%{name}-update-uuidd.socket-new-in-upgrade - echo -n "" >/run/rpm-%{name}-update-uuidd.service-new-in-upgrade - fi -fi +%systemd_preset_pre %post -n uuidd %{service_add_post uuidd.socket uuidd.service} @@ -898,6 +892,9 @@ fi %postun -n uuidd %{service_del_postun uuidd.socket uuidd.service} + +%posttrans -p /bin/bash -n uuidd +%systemd_preset_posttrans %endif %if %build_util_linux @@ -905,6 +902,11 @@ fi # Common files for all archs %defattr(-,root,root) # util-linux documentation files +%doc README.licensing +%doc COPYING +%doc Documentation/licenses/COPYING.BSD-3 +%doc Documentation/licenses/COPYING.LGPLv2.1 +%doc Documentation/licenses/COPYING.UCB %doc Documentation/blkid.txt %doc Documentation/cal.txt %doc Documentation/col.txt @@ -998,6 +1000,7 @@ fi %{_bindir}/look %{_bindir}/lsblk %{_bindir}/lscpu +%{_bindir}/lsipc %{_bindir}/lslocks %{_bindir}/mcookie %{_bindir}/mesg @@ -1100,6 +1103,7 @@ fi %{_mandir}/man1/login.1.gz %{_mandir}/man1/look.1.gz %{_mandir}/man1/lscpu.1.gz +%{_mandir}/man1/lsipc.1.gz %{_mandir}/man1/mcookie.1.gz %{_mandir}/man1/mesg.1.gz %{_mandir}/man1/more.1.gz From 6dfb4ff4c8230b421a79b557920301286a791bfadd9a91fcab9987aa254a5ea6 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 2 Nov 2015 11:53:59 +0000 Subject: [PATCH 195/211] Accepting request 341342 from Base:System Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/341342 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=204 --- python-libmount.changes | 1 + util-linux-systemd.changes | 1 + util-linux.changes | 1 + 3 files changed, 3 insertions(+) diff --git a/python-libmount.changes b/python-libmount.changes index 9d08fa2..9213653 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -27,6 +27,7 @@ Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com * flock: improve timeout handling (bsc#926945) * lsblk: display mountpoint even for top-level device (bsc#943415) + * colcrt: fix buffer overflow (bsc#949754, CVE-2015-5218) ------------------------------------------------------------------- Wed Aug 19 21:18:11 CEST 2015 - sbrabec@suse.com diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 9d08fa2..9213653 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -27,6 +27,7 @@ Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com * flock: improve timeout handling (bsc#926945) * lsblk: display mountpoint even for top-level device (bsc#943415) + * colcrt: fix buffer overflow (bsc#949754, CVE-2015-5218) ------------------------------------------------------------------- Wed Aug 19 21:18:11 CEST 2015 - sbrabec@suse.com diff --git a/util-linux.changes b/util-linux.changes index 9d08fa2..9213653 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -27,6 +27,7 @@ Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com * flock: improve timeout handling (bsc#926945) * lsblk: display mountpoint even for top-level device (bsc#943415) + * colcrt: fix buffer overflow (bsc#949754, CVE-2015-5218) ------------------------------------------------------------------- Wed Aug 19 21:18:11 CEST 2015 - sbrabec@suse.com From aae1c90ca685bdaf7ee21d4967de64f0562ce3ee9f113bd762a485e047b7fa3c Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sun, 22 Nov 2015 09:57:49 +0000 Subject: [PATCH 196/211] Accepting request 345050 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/345050 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=205 --- python-libmount.changes | 12 ++++++++++++ python-libmount.spec | 4 ++-- util-linux-2.27.1.tar.sign | 17 +++++++++++++++++ util-linux-2.27.1.tar.xz | 3 +++ util-linux-2.27.tar.sign | 17 ----------------- util-linux-2.27.tar.xz | 3 --- util-linux-systemd.changes | 12 ++++++++++++ util-linux-systemd.spec | 4 ++-- util-linux.changes | 12 ++++++++++++ util-linux.spec | 7 +++++-- 10 files changed, 65 insertions(+), 26 deletions(-) create mode 100644 util-linux-2.27.1.tar.sign create mode 100644 util-linux-2.27.1.tar.xz delete mode 100644 util-linux-2.27.tar.sign delete mode 100644 util-linux-2.27.tar.xz diff --git a/python-libmount.changes b/python-libmount.changes index 9213653..d6fb114 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Nov 11 15:46:46 UTC 2015 - sweet_f_a@gmx.de + +- Update to version 2.27.1, bugfix release, see + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes + +------------------------------------------------------------------- +Wed Nov 11 11:25:25 UTC 2015 - schwab@suse.de + +- Change condition for known fail markers from test for armv6 and aarch64 + architecture to test for qemu user-space build + ------------------------------------------------------------------- Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com diff --git a/python-libmount.spec b/python-libmount.spec index a7923ba..7aa2f30 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -121,7 +121,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.27 +Version: 2.27.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -609,7 +609,7 @@ make %{?_smp_mflags} # glibc requires kernel >= 3.0, thus setarch --uname-2.6 fails on platforms without VDSO export TS_OPT_misc_setarch_known_fail="yes" # -%ifarch armv6l armv6hl aarch64 +%if 0%{?qemu_user_space_build} export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" diff --git a/util-linux-2.27.1.tar.sign b/util-linux-2.27.1.tar.sign new file mode 100644 index 0000000..527a3d4 --- /dev/null +++ b/util-linux-2.27.1.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIcBAABAgAGBQJWN0FGAAoJEOS3HV7sOcKEwYIP/0eA52LeAeSVAb3hATWA0TMg +N0zfKyRECDxRuwdQW3yyjtypd4Cir6QlgyBrqLyXSskVuIj0dq7S1mlI/Xa94IFU +Fa2lmzyAcxvl33Bv/Fljh/GeVSqqmUHk8q1ecRh7DYR1Lda6xzfCFs2Dl3Q5JXK/ +k2tTgNug0+f8E6LT/5qrrXeDS+O7/hAtRqqA6yHkAHGqYV2RgBJ9NDAanaGYXDeB +abrduP2xRIvJ9oYOrayG5WH/wAY/sKT433zx20J9ZZvtutTV4VF2ML9zfeQiYitY +hoQOGt5tJW/CfvU2DUaBlTlrXW/MnMQE8KDWn64NbokA3HOxrW+7wJ/gJCp+7e7v +gLELeLLTnMq3NX++SR5I2I2fvqBejYykcaOQMHi9DK+UZed/CBJKR+6SF1WKOndI +GRYJSs9DAXL3dJCSCp6V4fqf+Lfr2Vv4z+Jo8EzIIIlfly1cZx2Blx7C0Y6CNETA +fYPYYKW7qKHsdS5J2Axf8vNIHQsRhkpiUltjQHQ+rIAmx1hl/10a7Fd9KkqFEJV2 +R0zLPaJK8d9gEWHRdzQNozABZVeR8PV3WXuDD2XjC2T30ldlFNlbzyWhDiPf6DNk +tIEi3f+RTTltIvCobChq+Ri2dKM0+wAV/FwwR31E/YgJIpUWfJNKRwWT8Ja887JN +j5aNV18qjet7TUosKYqm +=BMBT +-----END PGP SIGNATURE----- diff --git a/util-linux-2.27.1.tar.xz b/util-linux-2.27.1.tar.xz new file mode 100644 index 0000000..92acf98 --- /dev/null +++ b/util-linux-2.27.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a818fcdede99aec43ffe6ca5b5388bff80d162f2f7bd4541dca94fecb87a290 +size 3964512 diff --git a/util-linux-2.27.tar.sign b/util-linux-2.27.tar.sign deleted file mode 100644 index 6310765..0000000 --- a/util-linux-2.27.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQIcBAABAgAGBQJV7UZMAAoJEOS3HV7sOcKEWr8QAI0MEaXcmHvqIkPiRj6m0qOj -LdbXTWrw8W8UUdCyyNenn7xWrGfp7C4E24ywoNqb7uslvzPEEm1Xpfa2FHA28hJW -QrCRAEvpAJt42NlTIoPoxHIoPhU9B5YkcBR5Pc0lpKx+T6s2YSqWlM+lNX+27HRC -My9m3uX+ob4Zr/Z9SEhcdVGhdrWWo82EHVu8AC2KpJAZHUhjFZUP3zjGda2PE0GU -6Q9Qyi+RSk6km+J1YVYuzENwwliNU2GnMvOn2ZmRe4jgZTaYbkuEagfq998Khbfb -XS/dQra4pjSoFxRAX5zZ3aHZWy4joClgBg+1NEqFvI4TFA245MpYSfh9eXXXqzIu -G6HQpswBeIuqyE0STagpAmv1/xPNR8o4sw/cPmLIWI2IGpTa+NkIs8BTc3gIDn6G -yWxVuWVOIBnbigzkk/UbfC22ZuQNLMxL13F40QDPoL4zfOkxDkMldhTxTrabvs0K -jelSgLYXJbjwgJOHAgdvN38iECxBnoSUcJAgq8JysT13FiaYwlpXsK3pJyDRzQ4m -Ejnv/xgvJS3Dz0tSAUdSHC+C+joI6ut/zy/M/eQOldtYvutcwyeCwBgUvn6V5/Bw -CfNb2oXDVoW7iU2rkuu9H49BId1CiypZDvKK1qWVzd/gFcLyu5a5rKqBSPLCD17t -A7EuS7l/eg3/1dxKANDB -=JnxE ------END PGP SIGNATURE----- diff --git a/util-linux-2.27.tar.xz b/util-linux-2.27.tar.xz deleted file mode 100644 index fb0a59e..0000000 --- a/util-linux-2.27.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fcbf04e3ef8377fc8369af7f9afee341c5eef9b02dd5a7ce71532d0957e86dc7 -size 3968872 diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 9213653..d6fb114 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Nov 11 15:46:46 UTC 2015 - sweet_f_a@gmx.de + +- Update to version 2.27.1, bugfix release, see + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes + +------------------------------------------------------------------- +Wed Nov 11 11:25:25 UTC 2015 - schwab@suse.de + +- Change condition for known fail markers from test for armv6 and aarch64 + architecture to test for qemu user-space build + ------------------------------------------------------------------- Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index b5a1a13..48135c5 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -121,7 +121,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.27 +Version: 2.27.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -609,7 +609,7 @@ make %{?_smp_mflags} # glibc requires kernel >= 3.0, thus setarch --uname-2.6 fails on platforms without VDSO export TS_OPT_misc_setarch_known_fail="yes" # -%ifarch armv6l armv6hl aarch64 +%if 0%{?qemu_user_space_build} export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" diff --git a/util-linux.changes b/util-linux.changes index 9213653..d6fb114 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Nov 11 15:46:46 UTC 2015 - sweet_f_a@gmx.de + +- Update to version 2.27.1, bugfix release, see + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes + +------------------------------------------------------------------- +Wed Nov 11 11:25:25 UTC 2015 - schwab@suse.de + +- Change condition for known fail markers from test for armv6 and aarch64 + architecture to test for qemu user-space build + ------------------------------------------------------------------- Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com diff --git a/util-linux.spec b/util-linux.spec index ff19d05..e126553 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -121,7 +121,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.27 +Version: 2.27.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -609,15 +609,18 @@ make %{?_smp_mflags} # glibc requires kernel >= 3.0, thus setarch --uname-2.6 fails on platforms without VDSO export TS_OPT_misc_setarch_known_fail="yes" # -%ifarch armv6l armv6hl aarch64 +%if 0%{?qemu_user_space_build} export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" +export TS_OPT_libfdisk_gpt_known_fail="yes" export TS_OPT_misc_ionice_known_fail="yes" export TS_OPT_misc_swaplabel_known_fail="yes" export TS_OPT_kill_name_to_number_known_fail="yes" export TS_OPT_kill_print_pid_known_fail="yes" export TS_OPT_kill_queue_known_fail="yes" +# unsupported syscall in script(1) ... might be fixed in qemu +export TS_OPT_script_known_fail="yes" %endif # FIXME: These sometimes fails: export TS_OPT_libmount_lock_fake="yes" From e1de14ff1784a7fb2da66a73ac1319327a2e9ee42a4b9933422837245480affa Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sun, 13 Dec 2015 08:33:56 +0000 Subject: [PATCH 197/211] Accepting request 347194 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/347194 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=206 --- python-libmount.changes | 5 +++++ python-libmount.spec | 5 ++++- util-linux-systemd.changes | 5 +++++ util-linux-systemd.spec | 5 ++++- util-linux.changes | 5 +++++ util-linux.spec | 2 +- 6 files changed, 24 insertions(+), 3 deletions(-) diff --git a/python-libmount.changes b/python-libmount.changes index d6fb114..a707344 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Dec 1 10:27:17 UTC 2015 - sweet_f_a@gmx.de + +- enable last binary + ------------------------------------------------------------------- Wed Nov 11 15:46:46 UTC 2015 - sweet_f_a@gmx.de diff --git a/python-libmount.spec b/python-libmount.spec index 7aa2f30..da6adbd 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -19,7 +19,7 @@ %bcond_without sysvinit_tools %bcond_without enable_su %bcond_without enable_eject -%bcond_with enable_last +%bcond_without enable_last Name: python-libmount %define _name util-linux @@ -613,11 +613,14 @@ export TS_OPT_misc_setarch_known_fail="yes" export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" +export TS_OPT_libfdisk_gpt_known_fail="yes" export TS_OPT_misc_ionice_known_fail="yes" export TS_OPT_misc_swaplabel_known_fail="yes" export TS_OPT_kill_name_to_number_known_fail="yes" export TS_OPT_kill_print_pid_known_fail="yes" export TS_OPT_kill_queue_known_fail="yes" +# unsupported syscall in script(1) ... might be fixed in qemu +export TS_OPT_script_known_fail="yes" %endif # FIXME: These sometimes fails: export TS_OPT_libmount_lock_fake="yes" diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index d6fb114..a707344 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Dec 1 10:27:17 UTC 2015 - sweet_f_a@gmx.de + +- enable last binary + ------------------------------------------------------------------- Wed Nov 11 15:46:46 UTC 2015 - sweet_f_a@gmx.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 48135c5..bdab576 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -19,7 +19,7 @@ %bcond_without sysvinit_tools %bcond_without enable_su %bcond_without enable_eject -%bcond_with enable_last +%bcond_without enable_last Name: util-linux-systemd %define _name util-linux @@ -613,11 +613,14 @@ export TS_OPT_misc_setarch_known_fail="yes" export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" +export TS_OPT_libfdisk_gpt_known_fail="yes" export TS_OPT_misc_ionice_known_fail="yes" export TS_OPT_misc_swaplabel_known_fail="yes" export TS_OPT_kill_name_to_number_known_fail="yes" export TS_OPT_kill_print_pid_known_fail="yes" export TS_OPT_kill_queue_known_fail="yes" +# unsupported syscall in script(1) ... might be fixed in qemu +export TS_OPT_script_known_fail="yes" %endif # FIXME: These sometimes fails: export TS_OPT_libmount_lock_fake="yes" diff --git a/util-linux.changes b/util-linux.changes index d6fb114..a707344 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Dec 1 10:27:17 UTC 2015 - sweet_f_a@gmx.de + +- enable last binary + ------------------------------------------------------------------- Wed Nov 11 15:46:46 UTC 2015 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index e126553..349695e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -19,7 +19,7 @@ %bcond_without sysvinit_tools %bcond_without enable_su %bcond_without enable_eject -%bcond_with enable_last +%bcond_without enable_last Name: util-linux %define _name util-linux From d99f4cb47e83630dd8a66262185c0b7e3268309041ac51f2d18eb8575b64cfa7 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sun, 17 Apr 2016 20:15:06 +0000 Subject: [PATCH 198/211] Accepting request 389567 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/389567 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=207 --- python-libmount.changes | 41 +++++++++++++++++++++++++++++++++++++ python-libmount.spec | 34 ++++++++++++++---------------- util-linux-2.27.1.tar.sign | 17 --------------- util-linux-2.27.1.tar.xz | 3 --- util-linux-2.28.tar.sign | 17 +++++++++++++++ util-linux-2.28.tar.xz | 3 +++ util-linux-noenc-suse.patch | 14 ------------- util-linux-systemd.changes | 41 +++++++++++++++++++++++++++++++++++++ util-linux-systemd.spec | 34 ++++++++++++++---------------- util-linux.changes | 41 +++++++++++++++++++++++++++++++++++++ util-linux.spec | 34 ++++++++++++++---------------- 11 files changed, 188 insertions(+), 91 deletions(-) delete mode 100644 util-linux-2.27.1.tar.sign delete mode 100644 util-linux-2.27.1.tar.xz create mode 100644 util-linux-2.28.tar.sign create mode 100644 util-linux-2.28.tar.xz delete mode 100644 util-linux-noenc-suse.patch diff --git a/python-libmount.changes b/python-libmount.changes index a707344..96bd473 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,44 @@ +------------------------------------------------------------------- +Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de + +- Update to version 2.28: + * Many changes and improvements, most notably: + * Now cfdisk, sfdisk and fdisk wipe all filesystem and RAID + signatures when creating a new disk label in interactive + mode. See --wipe[=auto|never|always]. + * lsns -- this NEW COMMAND lists information about all + currently accessible namespaces or about the given namespace. + * The command sfdisk supports new operations --delete, + --move-data and --reorder. + * The command blkdiscard supports a new option --zeroout to + zero-fill rather than discard a specified area. + * The command cal supports a new option --span to span the date + when displaying multiple months. + * The command chrt supports the DEADLINE scheduling class and + the new options --sched-runtime --sched-period and + --sched-deadline. + * The command logger supports RFC 5424 structured data through + the new options --sd-id and --sd-param. + * The command losetup supports a new option --direct-io. + * The command lsblk allows to sort output by unprinted columns. + * The command mount applies the nofail mount option to + ENOMEDIUM errors. + * The commands nsenter and unshare support a new option + --cgroup for work with cgroups namespaces (CLONE_NEWCGROUP). + * The library libmount has been improved to properly detect + already mounted btrfs subvolumes. + * The library libsmartcols has been massively improved to print + table ranges, multi-line cells, table titles and to support + continuous printing. + * The package build system and code have been improved to be + more portable to non-Linux systems (BSD, OSX). + * The package does not provide fallback solutions for + openat-family functions anymore. + * The python binding for libsmartcols is available in separate + project at https://github.com/ignatenkobrain/python-smartcols + * Security issue: CVE-2016-2779 is NOT FIXED yet. +- Remove old util-linux-noenc-suse.patch + ------------------------------------------------------------------- Tue Dec 1 10:27:17 UTC 2015 - sweet_f_a@gmx.de diff --git a/python-libmount.spec b/python-libmount.spec index da6adbd..4ace376 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -1,7 +1,7 @@ # # spec file for package python-libmount # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -121,7 +121,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.27.1 +Version: 2.28 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -130,7 +130,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -140,7 +140,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -160,8 +160,6 @@ Source51: blkid.conf ## # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff -# PATCH-FEATURE-SUSE -- Report about disabled encryption to stderr. -Patch12: util-linux-noenc-suse.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -404,7 +402,6 @@ xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %endif %setup -q -n %{_name}-%{version} -b 40 %patch4 -p1 -%patch12 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -442,13 +439,6 @@ UTIL_LINUX_KNOWN_SYSTEMD_DEPS='$UTIL_LINUX_FOUND_SYSTEMD_DEPS'" exit 1 fi #END SYSTEMD SAFETY CHECK -#BEGIN FIRST STAGE MODIFICATIONS -%if !%build_util_linux_systemd -sed -i 's/BUILD_LSLOGINS/FALSE/ - s/BUILD_LOGGER/FALSE/ - ' misc-utils/Makemodule.am login-utils/Makemodule.am bash-completion/Makemodule.am -%endif -#END FIRST STAGE MODIFICATIONS %else #BEGIN SECOND STAGE MODIFICATIONS # delete all make modules except wanted ones @@ -579,10 +569,14 @@ AUTOPOINT=true autoreconf -vfi --disable-kill \ %endif %if %build_util_linux_systemd + --enable-logger \ + --enable-lslogins \ --enable-uuidd \ --with-systemd \ --with-systemdsystemunitdir=%{_unitdir} \ %else + --disable-logger \ + --disable-lslogins \ --disable-uuidd \ --without-systemd \ %endif @@ -606,9 +600,6 @@ make %{?_smp_mflags} %check # mark some tests "known_fail" # -# glibc requires kernel >= 3.0, thus setarch --uname-2.6 fails on platforms without VDSO -export TS_OPT_misc_setarch_known_fail="yes" -# %if 0%{?qemu_user_space_build} export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" @@ -619,11 +610,12 @@ export TS_OPT_misc_swaplabel_known_fail="yes" export TS_OPT_kill_name_to_number_known_fail="yes" export TS_OPT_kill_print_pid_known_fail="yes" export TS_OPT_kill_queue_known_fail="yes" +export TS_OPT_uuid_uuidd_known_fail="yes" # unsupported syscall in script(1) ... might be fixed in qemu export TS_OPT_script_known_fail="yes" +# may segfault on qemu-user-space +export TS_OPT_misc_setarch_known_fail="yes" %endif -# FIXME: These sometimes fails: -export TS_OPT_libmount_lock_fake="yes" # # hacks export PATH="$PATH:/sbin:/usr/sbin" @@ -1005,6 +997,7 @@ fi %{_bindir}/lscpu %{_bindir}/lsipc %{_bindir}/lslocks +%{_bindir}/lsns %{_bindir}/mcookie %{_bindir}/mesg %{_bindir}/more @@ -1156,6 +1149,7 @@ fi %{_mandir}/man8/ldattach.8.gz %{_mandir}/man8/losetup.8.gz %{_mandir}/man8/lslocks.8.gz +%{_mandir}/man8/lsns.8.gz %{_mandir}/man8/mkfs.8.gz %{_mandir}/man8/mkfs.cramfs.8.gz %{_mandir}/man8/mkswap.8.gz @@ -1198,6 +1192,7 @@ fi %{_datadir}/bash-completion/* %if %build_util_linux_systemd %exclude %{_datadir}/bash-completion/logger +%exclude %{_datadir}/bash-completion/lslogins %exclude %{_datadir}/bash-completion/uuidd %endif %ifnarch ia64 m68k @@ -1329,6 +1324,7 @@ fi %{_bindir}/logger %{_bindir}/lslogins %{_datadir}/bash-completion/logger +%{_datadir}/bash-completion/lslogins %{_mandir}/man1/logger.1.gz %{_mandir}/man1/lslogins.1.gz %{_sbindir}/rcfstrim diff --git a/util-linux-2.27.1.tar.sign b/util-linux-2.27.1.tar.sign deleted file mode 100644 index 527a3d4..0000000 --- a/util-linux-2.27.1.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQIcBAABAgAGBQJWN0FGAAoJEOS3HV7sOcKEwYIP/0eA52LeAeSVAb3hATWA0TMg -N0zfKyRECDxRuwdQW3yyjtypd4Cir6QlgyBrqLyXSskVuIj0dq7S1mlI/Xa94IFU -Fa2lmzyAcxvl33Bv/Fljh/GeVSqqmUHk8q1ecRh7DYR1Lda6xzfCFs2Dl3Q5JXK/ -k2tTgNug0+f8E6LT/5qrrXeDS+O7/hAtRqqA6yHkAHGqYV2RgBJ9NDAanaGYXDeB -abrduP2xRIvJ9oYOrayG5WH/wAY/sKT433zx20J9ZZvtutTV4VF2ML9zfeQiYitY -hoQOGt5tJW/CfvU2DUaBlTlrXW/MnMQE8KDWn64NbokA3HOxrW+7wJ/gJCp+7e7v -gLELeLLTnMq3NX++SR5I2I2fvqBejYykcaOQMHi9DK+UZed/CBJKR+6SF1WKOndI -GRYJSs9DAXL3dJCSCp6V4fqf+Lfr2Vv4z+Jo8EzIIIlfly1cZx2Blx7C0Y6CNETA -fYPYYKW7qKHsdS5J2Axf8vNIHQsRhkpiUltjQHQ+rIAmx1hl/10a7Fd9KkqFEJV2 -R0zLPaJK8d9gEWHRdzQNozABZVeR8PV3WXuDD2XjC2T30ldlFNlbzyWhDiPf6DNk -tIEi3f+RTTltIvCobChq+Ri2dKM0+wAV/FwwR31E/YgJIpUWfJNKRwWT8Ja887JN -j5aNV18qjet7TUosKYqm -=BMBT ------END PGP SIGNATURE----- diff --git a/util-linux-2.27.1.tar.xz b/util-linux-2.27.1.tar.xz deleted file mode 100644 index 92acf98..0000000 --- a/util-linux-2.27.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a818fcdede99aec43ffe6ca5b5388bff80d162f2f7bd4541dca94fecb87a290 -size 3964512 diff --git a/util-linux-2.28.tar.sign b/util-linux-2.28.tar.sign new file mode 100644 index 0000000..b1d7e49 --- /dev/null +++ b/util-linux-2.28.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIcBAABAgAGBQJXDNKPAAoJEOS3HV7sOcKEHo0P/RpIujRPSYGgh6kYObPjAoNY +fO/TJ6NeWMb5QcXbITH4dl9C+LoF9HXXZMG4lNsSckqT0OKoIjblFMs3QpqxLIVT +WOJbMktrrop5faJwixeEnWqtfRHBBtjdiTcLj5PMzajwijeYNIOyDx6uIr7UnGtF +v8DbxXFCZByTQvNRvibrXPk9FB/yushqOKakUrrNmrlwokDWHK5Ds8ZtqfSkNrMS +RZxRpAkpE4C3RYjttVJCkOqaH2B7Utxa03jxQN8UDxSvsXikvHFi5GDa1RZxRdOg +jwpZm8aUxSlb5EITSoioWqikVUQRCpErBZr+yFAt6VGAo8460rlTVb1OjqkTixHR +2QVRFLCATeUfHaWBi5Gnz29JUWnMykbsmOW8ZiLpEOL3KHr+0/s6N5e9x4xiFiE+ +fywoo+NlvbarM53cSXW6GZjazGQOqtGuEijyn29hoMwxuOyzF83pvFnZonbgessF +2UB+edl9Ppz4PCt2xqDaP55fXwk9rtO7Vqbd8xOImbrVjQF3+9EoY3H4I0QxnhV3 +XbozEYyc/9IyCapW7KBMyYD+dkWWu8bTVMK4JATWSR3F33Sl3a4e4GMmWB89n8Bs +fA/nj3lGvnApbvESR45os9gLx701Pbatvv4PITWKMuMsPi/FSBRlAYkc/Uznf2Fc +9BS4IkThuR4m+oIKyTNL +=VNvh +-----END PGP SIGNATURE----- diff --git a/util-linux-2.28.tar.xz b/util-linux-2.28.tar.xz new file mode 100644 index 0000000..bc5c003 --- /dev/null +++ b/util-linux-2.28.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:395847e2a18a2c317170f238892751e73a57104565344f8644090c8b091014bb +size 4119560 diff --git a/util-linux-noenc-suse.patch b/util-linux-noenc-suse.patch deleted file mode 100644 index 77cc2da..0000000 --- a/util-linux-noenc-suse.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: util-linux/libmount/src/context_loopdev.c -=================================================================== ---- util-linux.orig/libmount/src/context_loopdev.c -+++ util-linux/libmount/src/context_loopdev.c -@@ -212,6 +212,9 @@ int mnt_context_setup_loopdev(struct lib - if (rc == 0 && (cxt->user_mountflags & MNT_MS_ENCRYPTION) && - mnt_optstr_get_option(optstr, "encryption", &val, &len) == 0) { - DBG(CXT, ul_debugobj(cxt, "encryption no longer supported")); -+ // XXX: nasty for the lib but there's on better way to give a hint atm -+ fprintf(stderr, "mount: encryption no longer supported.\n" -+ " Please use /etc/crypttab instead (man 5 crypttab)\n"); - rc = -MNT_ERR_MOUNTOPT; - } - diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index a707344..96bd473 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,44 @@ +------------------------------------------------------------------- +Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de + +- Update to version 2.28: + * Many changes and improvements, most notably: + * Now cfdisk, sfdisk and fdisk wipe all filesystem and RAID + signatures when creating a new disk label in interactive + mode. See --wipe[=auto|never|always]. + * lsns -- this NEW COMMAND lists information about all + currently accessible namespaces or about the given namespace. + * The command sfdisk supports new operations --delete, + --move-data and --reorder. + * The command blkdiscard supports a new option --zeroout to + zero-fill rather than discard a specified area. + * The command cal supports a new option --span to span the date + when displaying multiple months. + * The command chrt supports the DEADLINE scheduling class and + the new options --sched-runtime --sched-period and + --sched-deadline. + * The command logger supports RFC 5424 structured data through + the new options --sd-id and --sd-param. + * The command losetup supports a new option --direct-io. + * The command lsblk allows to sort output by unprinted columns. + * The command mount applies the nofail mount option to + ENOMEDIUM errors. + * The commands nsenter and unshare support a new option + --cgroup for work with cgroups namespaces (CLONE_NEWCGROUP). + * The library libmount has been improved to properly detect + already mounted btrfs subvolumes. + * The library libsmartcols has been massively improved to print + table ranges, multi-line cells, table titles and to support + continuous printing. + * The package build system and code have been improved to be + more portable to non-Linux systems (BSD, OSX). + * The package does not provide fallback solutions for + openat-family functions anymore. + * The python binding for libsmartcols is available in separate + project at https://github.com/ignatenkobrain/python-smartcols + * Security issue: CVE-2016-2779 is NOT FIXED yet. +- Remove old util-linux-noenc-suse.patch + ------------------------------------------------------------------- Tue Dec 1 10:27:17 UTC 2015 - sweet_f_a@gmx.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index bdab576..cce4ec2 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux-systemd # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -121,7 +121,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.27.1 +Version: 2.28 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -130,7 +130,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -140,7 +140,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -160,8 +160,6 @@ Source51: blkid.conf ## # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff -# PATCH-FEATURE-SUSE -- Report about disabled encryption to stderr. -Patch12: util-linux-noenc-suse.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -404,7 +402,6 @@ xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %endif %setup -q -n %{_name}-%{version} -b 40 %patch4 -p1 -%patch12 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -442,13 +439,6 @@ UTIL_LINUX_KNOWN_SYSTEMD_DEPS='$UTIL_LINUX_FOUND_SYSTEMD_DEPS'" exit 1 fi #END SYSTEMD SAFETY CHECK -#BEGIN FIRST STAGE MODIFICATIONS -%if !%build_util_linux_systemd -sed -i 's/BUILD_LSLOGINS/FALSE/ - s/BUILD_LOGGER/FALSE/ - ' misc-utils/Makemodule.am login-utils/Makemodule.am bash-completion/Makemodule.am -%endif -#END FIRST STAGE MODIFICATIONS %else #BEGIN SECOND STAGE MODIFICATIONS # delete all make modules except wanted ones @@ -579,10 +569,14 @@ AUTOPOINT=true autoreconf -vfi --disable-kill \ %endif %if %build_util_linux_systemd + --enable-logger \ + --enable-lslogins \ --enable-uuidd \ --with-systemd \ --with-systemdsystemunitdir=%{_unitdir} \ %else + --disable-logger \ + --disable-lslogins \ --disable-uuidd \ --without-systemd \ %endif @@ -606,9 +600,6 @@ make %{?_smp_mflags} %check # mark some tests "known_fail" # -# glibc requires kernel >= 3.0, thus setarch --uname-2.6 fails on platforms without VDSO -export TS_OPT_misc_setarch_known_fail="yes" -# %if 0%{?qemu_user_space_build} export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" @@ -619,11 +610,12 @@ export TS_OPT_misc_swaplabel_known_fail="yes" export TS_OPT_kill_name_to_number_known_fail="yes" export TS_OPT_kill_print_pid_known_fail="yes" export TS_OPT_kill_queue_known_fail="yes" +export TS_OPT_uuid_uuidd_known_fail="yes" # unsupported syscall in script(1) ... might be fixed in qemu export TS_OPT_script_known_fail="yes" +# may segfault on qemu-user-space +export TS_OPT_misc_setarch_known_fail="yes" %endif -# FIXME: These sometimes fails: -export TS_OPT_libmount_lock_fake="yes" # # hacks export PATH="$PATH:/sbin:/usr/sbin" @@ -1005,6 +997,7 @@ fi %{_bindir}/lscpu %{_bindir}/lsipc %{_bindir}/lslocks +%{_bindir}/lsns %{_bindir}/mcookie %{_bindir}/mesg %{_bindir}/more @@ -1156,6 +1149,7 @@ fi %{_mandir}/man8/ldattach.8.gz %{_mandir}/man8/losetup.8.gz %{_mandir}/man8/lslocks.8.gz +%{_mandir}/man8/lsns.8.gz %{_mandir}/man8/mkfs.8.gz %{_mandir}/man8/mkfs.cramfs.8.gz %{_mandir}/man8/mkswap.8.gz @@ -1198,6 +1192,7 @@ fi %{_datadir}/bash-completion/* %if %build_util_linux_systemd %exclude %{_datadir}/bash-completion/logger +%exclude %{_datadir}/bash-completion/lslogins %exclude %{_datadir}/bash-completion/uuidd %endif %ifnarch ia64 m68k @@ -1329,6 +1324,7 @@ fi %{_bindir}/logger %{_bindir}/lslogins %{_datadir}/bash-completion/logger +%{_datadir}/bash-completion/lslogins %{_mandir}/man1/logger.1.gz %{_mandir}/man1/lslogins.1.gz %{_sbindir}/rcfstrim diff --git a/util-linux.changes b/util-linux.changes index a707344..96bd473 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,44 @@ +------------------------------------------------------------------- +Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de + +- Update to version 2.28: + * Many changes and improvements, most notably: + * Now cfdisk, sfdisk and fdisk wipe all filesystem and RAID + signatures when creating a new disk label in interactive + mode. See --wipe[=auto|never|always]. + * lsns -- this NEW COMMAND lists information about all + currently accessible namespaces or about the given namespace. + * The command sfdisk supports new operations --delete, + --move-data and --reorder. + * The command blkdiscard supports a new option --zeroout to + zero-fill rather than discard a specified area. + * The command cal supports a new option --span to span the date + when displaying multiple months. + * The command chrt supports the DEADLINE scheduling class and + the new options --sched-runtime --sched-period and + --sched-deadline. + * The command logger supports RFC 5424 structured data through + the new options --sd-id and --sd-param. + * The command losetup supports a new option --direct-io. + * The command lsblk allows to sort output by unprinted columns. + * The command mount applies the nofail mount option to + ENOMEDIUM errors. + * The commands nsenter and unshare support a new option + --cgroup for work with cgroups namespaces (CLONE_NEWCGROUP). + * The library libmount has been improved to properly detect + already mounted btrfs subvolumes. + * The library libsmartcols has been massively improved to print + table ranges, multi-line cells, table titles and to support + continuous printing. + * The package build system and code have been improved to be + more portable to non-Linux systems (BSD, OSX). + * The package does not provide fallback solutions for + openat-family functions anymore. + * The python binding for libsmartcols is available in separate + project at https://github.com/ignatenkobrain/python-smartcols + * Security issue: CVE-2016-2779 is NOT FIXED yet. +- Remove old util-linux-noenc-suse.patch + ------------------------------------------------------------------- Tue Dec 1 10:27:17 UTC 2015 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index 349695e..5c687aa 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -121,7 +121,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.27.1 +Version: 2.28 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -130,7 +130,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -140,7 +140,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -160,8 +160,6 @@ Source51: blkid.conf ## # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff -# PATCH-FEATURE-SUSE -- Report about disabled encryption to stderr. -Patch12: util-linux-noenc-suse.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -404,7 +402,6 @@ xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %endif %setup -q -n %{_name}-%{version} -b 40 %patch4 -p1 -%patch12 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -442,13 +439,6 @@ UTIL_LINUX_KNOWN_SYSTEMD_DEPS='$UTIL_LINUX_FOUND_SYSTEMD_DEPS'" exit 1 fi #END SYSTEMD SAFETY CHECK -#BEGIN FIRST STAGE MODIFICATIONS -%if !%build_util_linux_systemd -sed -i 's/BUILD_LSLOGINS/FALSE/ - s/BUILD_LOGGER/FALSE/ - ' misc-utils/Makemodule.am login-utils/Makemodule.am bash-completion/Makemodule.am -%endif -#END FIRST STAGE MODIFICATIONS %else #BEGIN SECOND STAGE MODIFICATIONS # delete all make modules except wanted ones @@ -579,10 +569,14 @@ AUTOPOINT=true autoreconf -vfi --disable-kill \ %endif %if %build_util_linux_systemd + --enable-logger \ + --enable-lslogins \ --enable-uuidd \ --with-systemd \ --with-systemdsystemunitdir=%{_unitdir} \ %else + --disable-logger \ + --disable-lslogins \ --disable-uuidd \ --without-systemd \ %endif @@ -606,9 +600,6 @@ make %{?_smp_mflags} %check # mark some tests "known_fail" # -# glibc requires kernel >= 3.0, thus setarch --uname-2.6 fails on platforms without VDSO -export TS_OPT_misc_setarch_known_fail="yes" -# %if 0%{?qemu_user_space_build} export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" @@ -619,11 +610,12 @@ export TS_OPT_misc_swaplabel_known_fail="yes" export TS_OPT_kill_name_to_number_known_fail="yes" export TS_OPT_kill_print_pid_known_fail="yes" export TS_OPT_kill_queue_known_fail="yes" +export TS_OPT_uuid_uuidd_known_fail="yes" # unsupported syscall in script(1) ... might be fixed in qemu export TS_OPT_script_known_fail="yes" +# may segfault on qemu-user-space +export TS_OPT_misc_setarch_known_fail="yes" %endif -# FIXME: These sometimes fails: -export TS_OPT_libmount_lock_fake="yes" # # hacks export PATH="$PATH:/sbin:/usr/sbin" @@ -1005,6 +997,7 @@ fi %{_bindir}/lscpu %{_bindir}/lsipc %{_bindir}/lslocks +%{_bindir}/lsns %{_bindir}/mcookie %{_bindir}/mesg %{_bindir}/more @@ -1156,6 +1149,7 @@ fi %{_mandir}/man8/ldattach.8.gz %{_mandir}/man8/losetup.8.gz %{_mandir}/man8/lslocks.8.gz +%{_mandir}/man8/lsns.8.gz %{_mandir}/man8/mkfs.8.gz %{_mandir}/man8/mkfs.cramfs.8.gz %{_mandir}/man8/mkswap.8.gz @@ -1198,6 +1192,7 @@ fi %{_datadir}/bash-completion/* %if %build_util_linux_systemd %exclude %{_datadir}/bash-completion/logger +%exclude %{_datadir}/bash-completion/lslogins %exclude %{_datadir}/bash-completion/uuidd %endif %ifnarch ia64 m68k @@ -1329,6 +1324,7 @@ fi %{_bindir}/logger %{_bindir}/lslogins %{_datadir}/bash-completion/logger +%{_datadir}/bash-completion/lslogins %{_mandir}/man1/logger.1.gz %{_mandir}/man1/lslogins.1.gz %{_sbindir}/rcfstrim From 8f8f70a3a00eafd110be80d6ef5857ebc0e7ff079ac71e0c17f23c4f702b2fc7 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sun, 12 Jun 2016 16:50:05 +0000 Subject: [PATCH 199/211] Accepting request 397533 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/397533 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=208 --- python-libmount.changes | 28 +++++++ python-libmount.spec | 106 +++++++------------------- util-linux-libblkid-wipe-offset.patch | 100 ++++++++++++++++++++++++ util-linux-systemd.changes | 28 +++++++ util-linux-systemd.spec | 106 +++++++------------------- util-linux.changes | 28 +++++++ util-linux.spec | 106 +++++++------------------- 7 files changed, 268 insertions(+), 234 deletions(-) create mode 100644 util-linux-libblkid-wipe-offset.patch diff --git a/python-libmount.changes b/python-libmount.changes index 96bd473..e0a1faf 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Thu May 19 14:29:27 CEST 2016 - sbrabec@suse.com + +- blkid: Wipe corect area for probes with offset (bsc#976141, + util-linux-libblkid-wipe-offset.patch). + +------------------------------------------------------------------- +Tue Apr 26 18:24:40 CEST 2016 - sbrabec@suse.com + +- Remove incorrect --with-bashcompletiondir that breaks + bash-completion, use path in bash-completion.pc instead + (boo#977259). + +------------------------------------------------------------------- +Fri Apr 22 16:41:34 CEST 2016 - sbrabec@suse.com + +- Add librtas-devel to BuildRequires on Power platforms. Needed for + proper function of lscpu (bsc#975082). + +------------------------------------------------------------------- +Wed Apr 13 21:29:00 UTC 2016 - sweet_f_a@gmx.de + +- fix build for openSUSE >= 13.1 (inclusive SLE 12) +- drop build for openSUSE < 13.1 +- remove old build conditions: sysvinit_tools, enable_su and + enable_eject +- cosmetics: reorder configure options + ------------------------------------------------------------------- Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de diff --git a/python-libmount.spec b/python-libmount.spec index 4ace376..c48bcda 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -16,9 +16,6 @@ # -%bcond_without sysvinit_tools -%bcond_without enable_su -%bcond_without enable_eject %bcond_without enable_last Name: python-libmount @@ -78,6 +75,7 @@ Summary: %main_summary License: GPL-2.0+ Group: %main_group BuildRequires: audit-devel +BuildRequires: bash-completion BuildRequires: bc BuildRequires: binutils-devel BuildRequires: fdupes @@ -92,19 +90,18 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: utempter-devel BuildRequires: zlib-devel +%ifarch ppc ppc64 ppc64le +BuildRequires: librtas-devel +%endif %if %verify_sig BuildRequires: gpg-offline %endif %if %build_util_linux_systemd BuildRequires: socat -%if 0%{?suse_version} <= 1230 -BuildRequires: pkgconfig(systemd) -%else BuildRequires: systemd-rpm-macros BuildRequires: pkgconfig(libsystemd-daemon) BuildRequires: pkgconfig(libsystemd-journal) %endif -%endif %if %build_python_libmount BuildRequires: python-devel %endif @@ -158,6 +155,8 @@ Source51: blkid.conf ## ## util-linux patches ## +# PATCH-FIX-UPSTREAM util-linux-libblkid-wipe-offset.patch bsc976141 sbrabec@suse.com -- blkid: Wipe corect area for probes with offset +Patch: util-linux-libblkid-wipe-offset.patch # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -170,25 +169,19 @@ Provides: util-linux(fake+no-canonicalize) PreReq: %install_info_prereq permissions PreReq: %insserv_prereq %fillup_prereq /bin/sed Recommends: %{name}-lang = %{version} -%if %{with enable_eject} Provides: eject = 2.1.0-166.8 -%endif Provides: login = 4.0-33.7 -%if %{with enable_eject} # File conflict of eject (up to 12.3 and SLE11). Obsoletes: eject < 2.1.0-166.8 -%endif # File conflict of login (up to 12.1 and SLE11). Obsoletes: login < 4.0-33.7 -%if %{with enable_su} # File conflict of su and kill (up to 12.3 and SLE11). # It should be coreutils < 8.21-4, but coreutils provide Release-less symbol. Conflicts: coreutils < 8.21 -%endif -%if %{with sysvinit_tools} # File conflict of sulogin and utmpdump (up to 12.3 and SLE11). Conflicts: sysvinit-tools < 2.88+-87 -%endif +# File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3). +Conflicts: bash-completion <= 2.1-13.1 # bnc#805684: %ifarch s390x Obsoletes: s390-32 @@ -401,6 +394,7 @@ library. xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %endif %setup -q -n %{_name}-%{version} -b 40 +%patch -p1 %patch4 -p1 # # setctsid @@ -538,6 +532,7 @@ export LDFLAGS="-Wl,-z,relro,-z,now" # sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities. AUTOPOINT=true autoreconf -vfi %configure \ + --disable-silent-rules \ --localstatedir=/run \ --docdir=%{_docdir}/%{_name} \ --with-audit \ @@ -545,47 +540,33 @@ AUTOPOINT=true autoreconf -vfi --with-ncurses \ --with-selinux \ $uhead \ - --with-bashcompletiondir=%{_datadir}/bash-completion \ - --enable-all-programs \ - --disable-reset \ + --with-systemdsystemunitdir=%{_unitdir} \ + --enable-libmount-force-mountinfo \ + --enable-sulogin-emergency-mount \ --disable-use-tty-group \ - --disable-silent-rules \ --enable-static \ --disable-rpath \ + --enable-all-programs \ + --disable-reset \ %if %{without enable_last} --disable-last \ %endif -%if %{without enable_eject} - --disable-eject \ -%endif -%if %{with sysvinit_tools} - --enable-sulogin-emergency-mount \ -%else - --disable-sulogin \ - --disable-mountpoint \ -%endif -%if %{without enable_su} - --disable-su \ - --disable-kill \ -%endif %if %build_util_linux_systemd + --with-systemd \ --enable-logger \ --enable-lslogins \ --enable-uuidd \ - --with-systemd \ - --with-systemdsystemunitdir=%{_unitdir} \ %else + --without-systemd \ --disable-logger \ --disable-lslogins \ --disable-uuidd \ - --without-systemd \ %endif %if %build_python_libmount --with-python \ %else --without-python \ %endif - --enable-libmount-force-mountinfo \ # # Safety check: HAVE_UUIDD should be always 1: @@ -637,11 +618,9 @@ install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l -%if %{with enable_su} install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su -%endif mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates pushd ../klogconsole # klogconsole install @@ -655,10 +634,8 @@ popd rm -f %{buildroot}%{python_sitearch}/libmount/*.*a %if %build_util_linux #UsrMerge -%if %{with enable_su} ln -s %{_bindir}/kill %{buildroot}/bin ln -s %{_bindir}/su %{buildroot}/bin -%endif ln -s %{_bindir}/dmesg %{buildroot}/bin ln -s %{_bindir}/more %{buildroot}/bin ln -s %{_bindir}/mount %{buildroot}/bin @@ -798,7 +775,6 @@ echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/system %post %{fillup_and_insserv raw} %set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount -%if %{with enable_su} %set_permissions %{_bindir}/su # Safely migrate PAM files from coreutils to util-linux # (openSUSE 12.3->13.1, SLE11->SLE12) @@ -817,7 +793,6 @@ for PAM_FILE in default/su pam.d/su pam.d/su-l ; do mv %{_sysconfdir}/$PAM_FILE.rpmsave %{_sysconfdir}/$PAM_FILE fi done -%endif # mount option 'code=' is now called 'codepage=' so change fstab if [ -f etc/fstab ]; then @@ -829,9 +804,7 @@ fi %verifyscript %verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount -%if %{with enable_su} %verify_permissions -e %{_bindir}/su -%endif %post -n libblkid1 -p /sbin/ldconfig @@ -857,9 +830,8 @@ fi %endif %if %build_util_linux_systemd -# Note: This is not a perfect solution: fstrim is part of util-linux, fstrim services are part of util-linux-systemd (for build loop prevention reasons). -# If only util-linux is updated, restart of fstrim service does not happen. -# Maybe we should move fstrim to util-linux-systemd in the next version. +# fstrim(8) and fstrim.service are from different packages. But it's a oneshot +# service (timer), no restart needed on binary updates (unless path is changed). %pre -n util-linux-systemd %{service_add_pre fstrim.service fstrim.timer} @@ -877,7 +849,7 @@ fi /usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ -d /var/run/uuidd uuidd 2>/dev/null || : %{service_add_pre uuidd.socket uuidd.service} -%systemd_preset_pre +%{?systemd_preset_pre} %post -n uuidd %{service_add_post uuidd.socket uuidd.service} @@ -889,7 +861,7 @@ fi %{service_del_postun uuidd.socket uuidd.service} %posttrans -p /bin/bash -n uuidd -%systemd_preset_posttrans +%{?systemd_preset_posttrans} %endif %if %build_util_linux @@ -920,16 +892,12 @@ fi %config(noreplace) %{_sysconfdir}/pam.d/remote %config(noreplace) %{_sysconfdir}/pam.d/runuser %config(noreplace) %{_sysconfdir}/pam.d/runuser-l -%if %{with enable_su} %config(noreplace) %{_sysconfdir}/pam.d/su %config(noreplace) %{_sysconfdir}/pam.d/su-l %config(noreplace) %{_sysconfdir}/default/su -%endif #UsrMerge -%if %{with enable_su} /bin/kill /bin/su -%endif /bin/dmesg /bin/more /bin/mount @@ -963,13 +931,9 @@ fi /sbin/fstrim /sbin/chcpu #EndUsrMerge -%if %{with enable_su} %{_bindir}/kill %{_bindir}/su -%endif -%if %{with enable_eject} %{_bindir}/eject -%endif %{_bindir}/cal %{_bindir}/chrt %{_bindir}/col @@ -1018,10 +982,8 @@ fi %{_bindir}/ul %{_bindir}/umount %{_bindir}/unshare -%if %{with sysvinit_tools} %{_bindir}/mountpoint %{_bindir}/utmpdump -%endif %{_bindir}/uuidgen %{_bindir}/uname26 %ifnarch ppc ppc64 @@ -1059,9 +1021,7 @@ fi %{_sbindir}/rtcwake %{_sbindir}/runuser %{_sbindir}/setctsid -%if %{with sysvinit_tools} %{_sbindir}/sulogin -%endif %{_sbindir}/swaplabel %{_sbindir}/swapoff %{_sbindir}/swapon @@ -1071,10 +1031,8 @@ fi %{_bindir}/whereis %verify(not mode) %attr(0755,root,tty) %{_bindir}/write %{_sbindir}/zramctl -%if %{with enable_su} %{_mandir}/man1/kill.1.gz %{_mandir}/man1/su.1.gz -%endif %{_mandir}/man1/cal.1.gz %{_mandir}/man1/chrt.1.gz %{_mandir}/man1/col.1.gz @@ -1082,9 +1040,7 @@ fi %{_mandir}/man1/colrm.1.gz %{_mandir}/man1/column.1.gz %{_mandir}/man1/dmesg.1.gz -%if %{with enable_eject} %{_mandir}/man1/eject.1.gz -%endif %{_mandir}/man1/fallocate.1.gz %{_mandir}/man1/flock.1.gz %{_mandir}/man1/getopt.1.gz @@ -1123,10 +1079,8 @@ fi %{_mandir}/man1/whereis.1.gz %{_mandir}/man1/write.1.gz %{_mandir}/man1/ipcmk.1.gz -%if %{with sysvinit_tools} %{_mandir}/man1/mountpoint.1.gz %{_mandir}/man1/utmpdump.1.gz -%endif %{_mandir}/man1/runuser.1.gz %{_mandir}/man1/uuidgen.1.gz %{_mandir}/man5/fstab.5.gz @@ -1178,22 +1132,18 @@ fi %{_mandir}/man8/fstrim.8.gz %{_mandir}/man8/lsblk.8.gz %{_mandir}/man8/resizepart.8.gz -%if %{with sysvinit_tools} %{_mandir}/man8/sulogin.8.gz -%endif %{_mandir}/man8/wdctl.8.gz %{_sbindir}/flushb %{_sbindir}/readprofile %dir %{_datadir}/getopt %attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh -# FIXME: Fix directory ownership. -%dir %{_datadir}/bash-completion -%{_datadir}/bash-completion/* +%{_datadir}/bash-completion/completions/* %if %build_util_linux_systemd -%exclude %{_datadir}/bash-completion/logger -%exclude %{_datadir}/bash-completion/lslogins -%exclude %{_datadir}/bash-completion/uuidd +%exclude %{_datadir}/bash-completion/completions/logger +%exclude %{_datadir}/bash-completion/completions/lslogins +%exclude %{_datadir}/bash-completion/completions/uuidd %endif %ifnarch ia64 m68k #XXX: post our patches upstream @@ -1323,8 +1273,8 @@ fi /bin/logger %{_bindir}/logger %{_bindir}/lslogins -%{_datadir}/bash-completion/logger -%{_datadir}/bash-completion/lslogins +%{_datadir}/bash-completion/completions/logger +%{_datadir}/bash-completion/completions/lslogins %{_mandir}/man1/logger.1.gz %{_mandir}/man1/lslogins.1.gz %{_sbindir}/rcfstrim @@ -1337,7 +1287,7 @@ fi %attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid %ghost %{_localstatedir}/lib/libuuid/clock.txt %attr(-,uuidd,uuidd) %ghost %dir /run/uuidd -%{_datadir}/bash-completion/uuidd +%{_datadir}/bash-completion/completions/uuidd %{_mandir}/man8/uuidd.8.gz %{_sbindir}/rcuuidd %{_unitdir}/uuidd.service diff --git a/util-linux-libblkid-wipe-offset.patch b/util-linux-libblkid-wipe-offset.patch new file mode 100644 index 0000000..e2b82d7 --- /dev/null +++ b/util-linux-libblkid-wipe-offset.patch @@ -0,0 +1,100 @@ +From 445e6b1ec82642a298419bdd18a81110593bfbaa Mon Sep 17 00:00:00 2001 +From: Petr Uzel +Date: Mon, 18 Apr 2016 16:22:05 +0200 +Subject: [PATCH] libblkid: make blkid_do_wipe() work with probes with offset + +When a probe is created with an offset, e.g. via +blkid_probe_set_device(), this offset is correctly used when looking for +the signatures, but is not respected by blkid_do_wipe() function. +Therefore the signature is removed from an invalid location. + +Usecase: Wiping signatures from an area on the block device where +partition is to be created (but as it does not exist yet, there's no +device node for it and probe on the whole block device has to be used +with correct offset and length). + +Reproducer: +======================== wiper.c =========================== + +const char *dev; +unsigned long offset; +unsigned long size; + +int main(int argc, char** argv) { + + if (argc != 4) { + printf("usage: wiper dev offset size\n"); + exit(1); + } + + dev = argv[1]; + offset = strtoull(argv[2], NULL, 10); + size = strtoull(argv[3], NULL, 10); + + printf("dev=%s, off=%llu, size=%llu\n", dev, offset, size); + + int fd = open (dev, O_RDWR); + if (fd == -1) { + perror("open"); + exit(1); + } + + blkid_loff_t wipe_offset = offset * SECTOR_SIZE; + blkid_loff_t wipe_size = size * SECTOR_SIZE; + + int ret; + + blkid_probe pr; + pr = blkid_new_probe(); + if (!pr) + return 0; + ret = blkid_probe_set_device(pr, fd, wipe_offset, wipe_size); + ret = blkid_probe_enable_superblocks(pr, 1); + ret = blkid_probe_set_superblocks_flags(pr, BLKID_SUBLKS_MAGIC); + + while (blkid_do_probe(pr) == 0) { + ret = blkid_do_wipe(pr, 0); + } + + blkid_free_probe(pr); + close(fd); +} +======================== wiper.c =========================== + +Steps to reproduce: +modprobe scsi_debug +parted -s /dev/sdX mklabel gpt +parted -s /dev/sdX mkpart first 2048s 4095s +mkfs.ext2 /dev/sdX1 + +wipefs -np /dev/sdX1 + +./wiper /dev/sdX1 2048 2048 + +Actual result: wiper gets into endless loop, because +blkid_do_wipe() wipes at wrong location (1080), leaving the signature +on /dev/sdc1. So it is again found by blkid_do_probe(), and so on. + +Expected result: wiper clears the ext2 signature at offset 1049656(=1080+2048*512). + +Signed-off-by: Petr Uzel +--- + libblkid/src/probe.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c +index 34d97b8..0c8625c 100644 +--- a/libblkid/src/probe.c ++++ b/libblkid/src/probe.c +@@ -1121,7 +1121,7 @@ int blkid_do_wipe(blkid_probe pr, int dryrun) + if (rc || len == 0 || off == NULL) + return 0; + +- offset = strtoumax(off, NULL, 10); ++ offset = strtoumax(off, NULL, 10) + pr->off; + fd = blkid_probe_get_fd(pr); + if (fd < 0) + return -1; +-- +2.8.1 + diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 96bd473..e0a1faf 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Thu May 19 14:29:27 CEST 2016 - sbrabec@suse.com + +- blkid: Wipe corect area for probes with offset (bsc#976141, + util-linux-libblkid-wipe-offset.patch). + +------------------------------------------------------------------- +Tue Apr 26 18:24:40 CEST 2016 - sbrabec@suse.com + +- Remove incorrect --with-bashcompletiondir that breaks + bash-completion, use path in bash-completion.pc instead + (boo#977259). + +------------------------------------------------------------------- +Fri Apr 22 16:41:34 CEST 2016 - sbrabec@suse.com + +- Add librtas-devel to BuildRequires on Power platforms. Needed for + proper function of lscpu (bsc#975082). + +------------------------------------------------------------------- +Wed Apr 13 21:29:00 UTC 2016 - sweet_f_a@gmx.de + +- fix build for openSUSE >= 13.1 (inclusive SLE 12) +- drop build for openSUSE < 13.1 +- remove old build conditions: sysvinit_tools, enable_su and + enable_eject +- cosmetics: reorder configure options + ------------------------------------------------------------------- Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index cce4ec2..1564473 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -16,9 +16,6 @@ # -%bcond_without sysvinit_tools -%bcond_without enable_su -%bcond_without enable_eject %bcond_without enable_last Name: util-linux-systemd @@ -78,6 +75,7 @@ Summary: %main_summary License: GPL-2.0+ Group: %main_group BuildRequires: audit-devel +BuildRequires: bash-completion BuildRequires: bc BuildRequires: binutils-devel BuildRequires: fdupes @@ -92,19 +90,18 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: utempter-devel BuildRequires: zlib-devel +%ifarch ppc ppc64 ppc64le +BuildRequires: librtas-devel +%endif %if %verify_sig BuildRequires: gpg-offline %endif %if %build_util_linux_systemd BuildRequires: socat -%if 0%{?suse_version} <= 1230 -BuildRequires: pkgconfig(systemd) -%else BuildRequires: systemd-rpm-macros BuildRequires: pkgconfig(libsystemd-daemon) BuildRequires: pkgconfig(libsystemd-journal) %endif -%endif %if %build_python_libmount BuildRequires: python-devel %endif @@ -158,6 +155,8 @@ Source51: blkid.conf ## ## util-linux patches ## +# PATCH-FIX-UPSTREAM util-linux-libblkid-wipe-offset.patch bsc976141 sbrabec@suse.com -- blkid: Wipe corect area for probes with offset +Patch: util-linux-libblkid-wipe-offset.patch # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -170,25 +169,19 @@ Provides: util-linux(fake+no-canonicalize) PreReq: %install_info_prereq permissions PreReq: %insserv_prereq %fillup_prereq /bin/sed Recommends: %{name}-lang = %{version} -%if %{with enable_eject} Provides: eject = 2.1.0-166.8 -%endif Provides: login = 4.0-33.7 -%if %{with enable_eject} # File conflict of eject (up to 12.3 and SLE11). Obsoletes: eject < 2.1.0-166.8 -%endif # File conflict of login (up to 12.1 and SLE11). Obsoletes: login < 4.0-33.7 -%if %{with enable_su} # File conflict of su and kill (up to 12.3 and SLE11). # It should be coreutils < 8.21-4, but coreutils provide Release-less symbol. Conflicts: coreutils < 8.21 -%endif -%if %{with sysvinit_tools} # File conflict of sulogin and utmpdump (up to 12.3 and SLE11). Conflicts: sysvinit-tools < 2.88+-87 -%endif +# File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3). +Conflicts: bash-completion <= 2.1-13.1 # bnc#805684: %ifarch s390x Obsoletes: s390-32 @@ -401,6 +394,7 @@ library. xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %endif %setup -q -n %{_name}-%{version} -b 40 +%patch -p1 %patch4 -p1 # # setctsid @@ -538,6 +532,7 @@ export LDFLAGS="-Wl,-z,relro,-z,now" # sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities. AUTOPOINT=true autoreconf -vfi %configure \ + --disable-silent-rules \ --localstatedir=/run \ --docdir=%{_docdir}/%{_name} \ --with-audit \ @@ -545,47 +540,33 @@ AUTOPOINT=true autoreconf -vfi --with-ncurses \ --with-selinux \ $uhead \ - --with-bashcompletiondir=%{_datadir}/bash-completion \ - --enable-all-programs \ - --disable-reset \ + --with-systemdsystemunitdir=%{_unitdir} \ + --enable-libmount-force-mountinfo \ + --enable-sulogin-emergency-mount \ --disable-use-tty-group \ - --disable-silent-rules \ --enable-static \ --disable-rpath \ + --enable-all-programs \ + --disable-reset \ %if %{without enable_last} --disable-last \ %endif -%if %{without enable_eject} - --disable-eject \ -%endif -%if %{with sysvinit_tools} - --enable-sulogin-emergency-mount \ -%else - --disable-sulogin \ - --disable-mountpoint \ -%endif -%if %{without enable_su} - --disable-su \ - --disable-kill \ -%endif %if %build_util_linux_systemd + --with-systemd \ --enable-logger \ --enable-lslogins \ --enable-uuidd \ - --with-systemd \ - --with-systemdsystemunitdir=%{_unitdir} \ %else + --without-systemd \ --disable-logger \ --disable-lslogins \ --disable-uuidd \ - --without-systemd \ %endif %if %build_python_libmount --with-python \ %else --without-python \ %endif - --enable-libmount-force-mountinfo \ # # Safety check: HAVE_UUIDD should be always 1: @@ -637,11 +618,9 @@ install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l -%if %{with enable_su} install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su -%endif mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates pushd ../klogconsole # klogconsole install @@ -655,10 +634,8 @@ popd rm -f %{buildroot}%{python_sitearch}/libmount/*.*a %if %build_util_linux #UsrMerge -%if %{with enable_su} ln -s %{_bindir}/kill %{buildroot}/bin ln -s %{_bindir}/su %{buildroot}/bin -%endif ln -s %{_bindir}/dmesg %{buildroot}/bin ln -s %{_bindir}/more %{buildroot}/bin ln -s %{_bindir}/mount %{buildroot}/bin @@ -798,7 +775,6 @@ echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/system %post %{fillup_and_insserv raw} %set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount -%if %{with enable_su} %set_permissions %{_bindir}/su # Safely migrate PAM files from coreutils to util-linux # (openSUSE 12.3->13.1, SLE11->SLE12) @@ -817,7 +793,6 @@ for PAM_FILE in default/su pam.d/su pam.d/su-l ; do mv %{_sysconfdir}/$PAM_FILE.rpmsave %{_sysconfdir}/$PAM_FILE fi done -%endif # mount option 'code=' is now called 'codepage=' so change fstab if [ -f etc/fstab ]; then @@ -829,9 +804,7 @@ fi %verifyscript %verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount -%if %{with enable_su} %verify_permissions -e %{_bindir}/su -%endif %post -n libblkid1 -p /sbin/ldconfig @@ -857,9 +830,8 @@ fi %endif %if %build_util_linux_systemd -# Note: This is not a perfect solution: fstrim is part of util-linux, fstrim services are part of util-linux-systemd (for build loop prevention reasons). -# If only util-linux is updated, restart of fstrim service does not happen. -# Maybe we should move fstrim to util-linux-systemd in the next version. +# fstrim(8) and fstrim.service are from different packages. But it's a oneshot +# service (timer), no restart needed on binary updates (unless path is changed). %pre -n util-linux-systemd %{service_add_pre fstrim.service fstrim.timer} @@ -877,7 +849,7 @@ fi /usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ -d /var/run/uuidd uuidd 2>/dev/null || : %{service_add_pre uuidd.socket uuidd.service} -%systemd_preset_pre +%{?systemd_preset_pre} %post -n uuidd %{service_add_post uuidd.socket uuidd.service} @@ -889,7 +861,7 @@ fi %{service_del_postun uuidd.socket uuidd.service} %posttrans -p /bin/bash -n uuidd -%systemd_preset_posttrans +%{?systemd_preset_posttrans} %endif %if %build_util_linux @@ -920,16 +892,12 @@ fi %config(noreplace) %{_sysconfdir}/pam.d/remote %config(noreplace) %{_sysconfdir}/pam.d/runuser %config(noreplace) %{_sysconfdir}/pam.d/runuser-l -%if %{with enable_su} %config(noreplace) %{_sysconfdir}/pam.d/su %config(noreplace) %{_sysconfdir}/pam.d/su-l %config(noreplace) %{_sysconfdir}/default/su -%endif #UsrMerge -%if %{with enable_su} /bin/kill /bin/su -%endif /bin/dmesg /bin/more /bin/mount @@ -963,13 +931,9 @@ fi /sbin/fstrim /sbin/chcpu #EndUsrMerge -%if %{with enable_su} %{_bindir}/kill %{_bindir}/su -%endif -%if %{with enable_eject} %{_bindir}/eject -%endif %{_bindir}/cal %{_bindir}/chrt %{_bindir}/col @@ -1018,10 +982,8 @@ fi %{_bindir}/ul %{_bindir}/umount %{_bindir}/unshare -%if %{with sysvinit_tools} %{_bindir}/mountpoint %{_bindir}/utmpdump -%endif %{_bindir}/uuidgen %{_bindir}/uname26 %ifnarch ppc ppc64 @@ -1059,9 +1021,7 @@ fi %{_sbindir}/rtcwake %{_sbindir}/runuser %{_sbindir}/setctsid -%if %{with sysvinit_tools} %{_sbindir}/sulogin -%endif %{_sbindir}/swaplabel %{_sbindir}/swapoff %{_sbindir}/swapon @@ -1071,10 +1031,8 @@ fi %{_bindir}/whereis %verify(not mode) %attr(0755,root,tty) %{_bindir}/write %{_sbindir}/zramctl -%if %{with enable_su} %{_mandir}/man1/kill.1.gz %{_mandir}/man1/su.1.gz -%endif %{_mandir}/man1/cal.1.gz %{_mandir}/man1/chrt.1.gz %{_mandir}/man1/col.1.gz @@ -1082,9 +1040,7 @@ fi %{_mandir}/man1/colrm.1.gz %{_mandir}/man1/column.1.gz %{_mandir}/man1/dmesg.1.gz -%if %{with enable_eject} %{_mandir}/man1/eject.1.gz -%endif %{_mandir}/man1/fallocate.1.gz %{_mandir}/man1/flock.1.gz %{_mandir}/man1/getopt.1.gz @@ -1123,10 +1079,8 @@ fi %{_mandir}/man1/whereis.1.gz %{_mandir}/man1/write.1.gz %{_mandir}/man1/ipcmk.1.gz -%if %{with sysvinit_tools} %{_mandir}/man1/mountpoint.1.gz %{_mandir}/man1/utmpdump.1.gz -%endif %{_mandir}/man1/runuser.1.gz %{_mandir}/man1/uuidgen.1.gz %{_mandir}/man5/fstab.5.gz @@ -1178,22 +1132,18 @@ fi %{_mandir}/man8/fstrim.8.gz %{_mandir}/man8/lsblk.8.gz %{_mandir}/man8/resizepart.8.gz -%if %{with sysvinit_tools} %{_mandir}/man8/sulogin.8.gz -%endif %{_mandir}/man8/wdctl.8.gz %{_sbindir}/flushb %{_sbindir}/readprofile %dir %{_datadir}/getopt %attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh -# FIXME: Fix directory ownership. -%dir %{_datadir}/bash-completion -%{_datadir}/bash-completion/* +%{_datadir}/bash-completion/completions/* %if %build_util_linux_systemd -%exclude %{_datadir}/bash-completion/logger -%exclude %{_datadir}/bash-completion/lslogins -%exclude %{_datadir}/bash-completion/uuidd +%exclude %{_datadir}/bash-completion/completions/logger +%exclude %{_datadir}/bash-completion/completions/lslogins +%exclude %{_datadir}/bash-completion/completions/uuidd %endif %ifnarch ia64 m68k #XXX: post our patches upstream @@ -1323,8 +1273,8 @@ fi /bin/logger %{_bindir}/logger %{_bindir}/lslogins -%{_datadir}/bash-completion/logger -%{_datadir}/bash-completion/lslogins +%{_datadir}/bash-completion/completions/logger +%{_datadir}/bash-completion/completions/lslogins %{_mandir}/man1/logger.1.gz %{_mandir}/man1/lslogins.1.gz %{_sbindir}/rcfstrim @@ -1337,7 +1287,7 @@ fi %attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid %ghost %{_localstatedir}/lib/libuuid/clock.txt %attr(-,uuidd,uuidd) %ghost %dir /run/uuidd -%{_datadir}/bash-completion/uuidd +%{_datadir}/bash-completion/completions/uuidd %{_mandir}/man8/uuidd.8.gz %{_sbindir}/rcuuidd %{_unitdir}/uuidd.service diff --git a/util-linux.changes b/util-linux.changes index 96bd473..e0a1faf 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Thu May 19 14:29:27 CEST 2016 - sbrabec@suse.com + +- blkid: Wipe corect area for probes with offset (bsc#976141, + util-linux-libblkid-wipe-offset.patch). + +------------------------------------------------------------------- +Tue Apr 26 18:24:40 CEST 2016 - sbrabec@suse.com + +- Remove incorrect --with-bashcompletiondir that breaks + bash-completion, use path in bash-completion.pc instead + (boo#977259). + +------------------------------------------------------------------- +Fri Apr 22 16:41:34 CEST 2016 - sbrabec@suse.com + +- Add librtas-devel to BuildRequires on Power platforms. Needed for + proper function of lscpu (bsc#975082). + +------------------------------------------------------------------- +Wed Apr 13 21:29:00 UTC 2016 - sweet_f_a@gmx.de + +- fix build for openSUSE >= 13.1 (inclusive SLE 12) +- drop build for openSUSE < 13.1 +- remove old build conditions: sysvinit_tools, enable_su and + enable_eject +- cosmetics: reorder configure options + ------------------------------------------------------------------- Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index 5c687aa..6ca47c7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -16,9 +16,6 @@ # -%bcond_without sysvinit_tools -%bcond_without enable_su -%bcond_without enable_eject %bcond_without enable_last Name: util-linux @@ -78,6 +75,7 @@ Summary: %main_summary License: GPL-2.0+ Group: %main_group BuildRequires: audit-devel +BuildRequires: bash-completion BuildRequires: bc BuildRequires: binutils-devel BuildRequires: fdupes @@ -92,19 +90,18 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: utempter-devel BuildRequires: zlib-devel +%ifarch ppc ppc64 ppc64le +BuildRequires: librtas-devel +%endif %if %verify_sig BuildRequires: gpg-offline %endif %if %build_util_linux_systemd BuildRequires: socat -%if 0%{?suse_version} <= 1230 -BuildRequires: pkgconfig(systemd) -%else BuildRequires: systemd-rpm-macros BuildRequires: pkgconfig(libsystemd-daemon) BuildRequires: pkgconfig(libsystemd-journal) %endif -%endif %if %build_python_libmount BuildRequires: python-devel %endif @@ -158,6 +155,8 @@ Source51: blkid.conf ## ## util-linux patches ## +# PATCH-FIX-UPSTREAM util-linux-libblkid-wipe-offset.patch bsc976141 sbrabec@suse.com -- blkid: Wipe corect area for probes with offset +Patch: util-linux-libblkid-wipe-offset.patch # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -170,25 +169,19 @@ Provides: util-linux(fake+no-canonicalize) PreReq: %install_info_prereq permissions PreReq: %insserv_prereq %fillup_prereq /bin/sed Recommends: %{name}-lang = %{version} -%if %{with enable_eject} Provides: eject = 2.1.0-166.8 -%endif Provides: login = 4.0-33.7 -%if %{with enable_eject} # File conflict of eject (up to 12.3 and SLE11). Obsoletes: eject < 2.1.0-166.8 -%endif # File conflict of login (up to 12.1 and SLE11). Obsoletes: login < 4.0-33.7 -%if %{with enable_su} # File conflict of su and kill (up to 12.3 and SLE11). # It should be coreutils < 8.21-4, but coreutils provide Release-less symbol. Conflicts: coreutils < 8.21 -%endif -%if %{with sysvinit_tools} # File conflict of sulogin and utmpdump (up to 12.3 and SLE11). Conflicts: sysvinit-tools < 2.88+-87 -%endif +# File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3). +Conflicts: bash-completion <= 2.1-13.1 # bnc#805684: %ifarch s390x Obsoletes: s390-32 @@ -401,6 +394,7 @@ library. xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - %endif %setup -q -n %{_name}-%{version} -b 40 +%patch -p1 %patch4 -p1 # # setctsid @@ -538,6 +532,7 @@ export LDFLAGS="-Wl,-z,relro,-z,now" # sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities. AUTOPOINT=true autoreconf -vfi %configure \ + --disable-silent-rules \ --localstatedir=/run \ --docdir=%{_docdir}/%{_name} \ --with-audit \ @@ -545,47 +540,33 @@ AUTOPOINT=true autoreconf -vfi --with-ncurses \ --with-selinux \ $uhead \ - --with-bashcompletiondir=%{_datadir}/bash-completion \ - --enable-all-programs \ - --disable-reset \ + --with-systemdsystemunitdir=%{_unitdir} \ + --enable-libmount-force-mountinfo \ + --enable-sulogin-emergency-mount \ --disable-use-tty-group \ - --disable-silent-rules \ --enable-static \ --disable-rpath \ + --enable-all-programs \ + --disable-reset \ %if %{without enable_last} --disable-last \ %endif -%if %{without enable_eject} - --disable-eject \ -%endif -%if %{with sysvinit_tools} - --enable-sulogin-emergency-mount \ -%else - --disable-sulogin \ - --disable-mountpoint \ -%endif -%if %{without enable_su} - --disable-su \ - --disable-kill \ -%endif %if %build_util_linux_systemd + --with-systemd \ --enable-logger \ --enable-lslogins \ --enable-uuidd \ - --with-systemd \ - --with-systemdsystemunitdir=%{_unitdir} \ %else + --without-systemd \ --disable-logger \ --disable-lslogins \ --disable-uuidd \ - --without-systemd \ %endif %if %build_python_libmount --with-python \ %else --without-python \ %endif - --enable-libmount-force-mountinfo \ # # Safety check: HAVE_UUIDD should be always 1: @@ -637,11 +618,9 @@ install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l -%if %{with enable_su} install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su -%endif mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates pushd ../klogconsole # klogconsole install @@ -655,10 +634,8 @@ popd rm -f %{buildroot}%{python_sitearch}/libmount/*.*a %if %build_util_linux #UsrMerge -%if %{with enable_su} ln -s %{_bindir}/kill %{buildroot}/bin ln -s %{_bindir}/su %{buildroot}/bin -%endif ln -s %{_bindir}/dmesg %{buildroot}/bin ln -s %{_bindir}/more %{buildroot}/bin ln -s %{_bindir}/mount %{buildroot}/bin @@ -798,7 +775,6 @@ echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/system %post %{fillup_and_insserv raw} %set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount -%if %{with enable_su} %set_permissions %{_bindir}/su # Safely migrate PAM files from coreutils to util-linux # (openSUSE 12.3->13.1, SLE11->SLE12) @@ -817,7 +793,6 @@ for PAM_FILE in default/su pam.d/su pam.d/su-l ; do mv %{_sysconfdir}/$PAM_FILE.rpmsave %{_sysconfdir}/$PAM_FILE fi done -%endif # mount option 'code=' is now called 'codepage=' so change fstab if [ -f etc/fstab ]; then @@ -829,9 +804,7 @@ fi %verifyscript %verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount -%if %{with enable_su} %verify_permissions -e %{_bindir}/su -%endif %post -n libblkid1 -p /sbin/ldconfig @@ -857,9 +830,8 @@ fi %endif %if %build_util_linux_systemd -# Note: This is not a perfect solution: fstrim is part of util-linux, fstrim services are part of util-linux-systemd (for build loop prevention reasons). -# If only util-linux is updated, restart of fstrim service does not happen. -# Maybe we should move fstrim to util-linux-systemd in the next version. +# fstrim(8) and fstrim.service are from different packages. But it's a oneshot +# service (timer), no restart needed on binary updates (unless path is changed). %pre -n util-linux-systemd %{service_add_pre fstrim.service fstrim.timer} @@ -877,7 +849,7 @@ fi /usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ -d /var/run/uuidd uuidd 2>/dev/null || : %{service_add_pre uuidd.socket uuidd.service} -%systemd_preset_pre +%{?systemd_preset_pre} %post -n uuidd %{service_add_post uuidd.socket uuidd.service} @@ -889,7 +861,7 @@ fi %{service_del_postun uuidd.socket uuidd.service} %posttrans -p /bin/bash -n uuidd -%systemd_preset_posttrans +%{?systemd_preset_posttrans} %endif %if %build_util_linux @@ -920,16 +892,12 @@ fi %config(noreplace) %{_sysconfdir}/pam.d/remote %config(noreplace) %{_sysconfdir}/pam.d/runuser %config(noreplace) %{_sysconfdir}/pam.d/runuser-l -%if %{with enable_su} %config(noreplace) %{_sysconfdir}/pam.d/su %config(noreplace) %{_sysconfdir}/pam.d/su-l %config(noreplace) %{_sysconfdir}/default/su -%endif #UsrMerge -%if %{with enable_su} /bin/kill /bin/su -%endif /bin/dmesg /bin/more /bin/mount @@ -963,13 +931,9 @@ fi /sbin/fstrim /sbin/chcpu #EndUsrMerge -%if %{with enable_su} %{_bindir}/kill %{_bindir}/su -%endif -%if %{with enable_eject} %{_bindir}/eject -%endif %{_bindir}/cal %{_bindir}/chrt %{_bindir}/col @@ -1018,10 +982,8 @@ fi %{_bindir}/ul %{_bindir}/umount %{_bindir}/unshare -%if %{with sysvinit_tools} %{_bindir}/mountpoint %{_bindir}/utmpdump -%endif %{_bindir}/uuidgen %{_bindir}/uname26 %ifnarch ppc ppc64 @@ -1059,9 +1021,7 @@ fi %{_sbindir}/rtcwake %{_sbindir}/runuser %{_sbindir}/setctsid -%if %{with sysvinit_tools} %{_sbindir}/sulogin -%endif %{_sbindir}/swaplabel %{_sbindir}/swapoff %{_sbindir}/swapon @@ -1071,10 +1031,8 @@ fi %{_bindir}/whereis %verify(not mode) %attr(0755,root,tty) %{_bindir}/write %{_sbindir}/zramctl -%if %{with enable_su} %{_mandir}/man1/kill.1.gz %{_mandir}/man1/su.1.gz -%endif %{_mandir}/man1/cal.1.gz %{_mandir}/man1/chrt.1.gz %{_mandir}/man1/col.1.gz @@ -1082,9 +1040,7 @@ fi %{_mandir}/man1/colrm.1.gz %{_mandir}/man1/column.1.gz %{_mandir}/man1/dmesg.1.gz -%if %{with enable_eject} %{_mandir}/man1/eject.1.gz -%endif %{_mandir}/man1/fallocate.1.gz %{_mandir}/man1/flock.1.gz %{_mandir}/man1/getopt.1.gz @@ -1123,10 +1079,8 @@ fi %{_mandir}/man1/whereis.1.gz %{_mandir}/man1/write.1.gz %{_mandir}/man1/ipcmk.1.gz -%if %{with sysvinit_tools} %{_mandir}/man1/mountpoint.1.gz %{_mandir}/man1/utmpdump.1.gz -%endif %{_mandir}/man1/runuser.1.gz %{_mandir}/man1/uuidgen.1.gz %{_mandir}/man5/fstab.5.gz @@ -1178,22 +1132,18 @@ fi %{_mandir}/man8/fstrim.8.gz %{_mandir}/man8/lsblk.8.gz %{_mandir}/man8/resizepart.8.gz -%if %{with sysvinit_tools} %{_mandir}/man8/sulogin.8.gz -%endif %{_mandir}/man8/wdctl.8.gz %{_sbindir}/flushb %{_sbindir}/readprofile %dir %{_datadir}/getopt %attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh -# FIXME: Fix directory ownership. -%dir %{_datadir}/bash-completion -%{_datadir}/bash-completion/* +%{_datadir}/bash-completion/completions/* %if %build_util_linux_systemd -%exclude %{_datadir}/bash-completion/logger -%exclude %{_datadir}/bash-completion/lslogins -%exclude %{_datadir}/bash-completion/uuidd +%exclude %{_datadir}/bash-completion/completions/logger +%exclude %{_datadir}/bash-completion/completions/lslogins +%exclude %{_datadir}/bash-completion/completions/uuidd %endif %ifnarch ia64 m68k #XXX: post our patches upstream @@ -1323,8 +1273,8 @@ fi /bin/logger %{_bindir}/logger %{_bindir}/lslogins -%{_datadir}/bash-completion/logger -%{_datadir}/bash-completion/lslogins +%{_datadir}/bash-completion/completions/logger +%{_datadir}/bash-completion/completions/lslogins %{_mandir}/man1/logger.1.gz %{_mandir}/man1/lslogins.1.gz %{_sbindir}/rcfstrim @@ -1337,7 +1287,7 @@ fi %attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid %ghost %{_localstatedir}/lib/libuuid/clock.txt %attr(-,uuidd,uuidd) %ghost %dir /run/uuidd -%{_datadir}/bash-completion/uuidd +%{_datadir}/bash-completion/completions/uuidd %{_mandir}/man8/uuidd.8.gz %{_sbindir}/rcuuidd %{_unitdir}/uuidd.service From a4f6619c47cc62466f4b0811042603864b89ce9d6640d364ad3f672e6e197601 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 29 Jun 2016 07:40:22 +0000 Subject: [PATCH 200/211] Accepting request 401944 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/401944 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=209 --- python-libmount.changes | 17 ++++++++++++++--- python-libmount.spec | 7 +++++-- util-linux-systemd.changes | 17 ++++++++++++++--- util-linux-systemd.spec | 4 +++- util-linux.changes | 17 ++++++++++++++--- util-linux.spec | 4 +++- 6 files changed, 53 insertions(+), 13 deletions(-) diff --git a/python-libmount.changes b/python-libmount.changes index e0a1faf..b98970d 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Jun 13 11:37:33 UTC 2016 - dimstar@opensuse.org + +- Do not BuildRequires bash-completion: this is tempting, but it + pulls bash-completion and its entire dependency stack into Ring0, + which is inacceptable. Pass the correct path + (%{_datdir}/bash-completion/completions) via + --with-bashcompletiondir to configure. + ------------------------------------------------------------------- Thu May 19 14:29:27 CEST 2016 - sbrabec@suse.com @@ -29,7 +38,7 @@ Wed Apr 13 21:29:00 UTC 2016 - sweet_f_a@gmx.de ------------------------------------------------------------------- Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de -- Update to version 2.28: +- Update to version 2.28 (bsc#974301): * Many changes and improvements, most notably: * Now cfdisk, sfdisk and fdisk wipe all filesystem and RAID signatures when creating a new disk label in interactive @@ -54,7 +63,7 @@ Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de * The commands nsenter and unshare support a new option --cgroup for work with cgroups namespaces (CLONE_NEWCGROUP). * The library libmount has been improved to properly detect - already mounted btrfs subvolumes. + already mounted btrfs subvolumes (bsc#947494, bsc#972684). * The library libsmartcols has been massively improved to print table ranges, multi-line cells, table titles and to support continuous printing. @@ -64,6 +73,7 @@ Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de openat-family functions anymore. * The python binding for libsmartcols is available in separate project at https://github.com/ignatenkobrain/python-smartcols + * Other bug fixes (bsc#970404, bsc#975082). * Security issue: CVE-2016-2779 is NOT FIXED yet. - Remove old util-linux-noenc-suse.patch @@ -98,7 +108,8 @@ Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com lslocks, sfdisk and lsipc. * script has been massively improved to be more robust and less complex (bsc#888678, bsc#930236). - * sulogin supports locked root accounts by --force. + * sulogin supports locked root accounts by --force + (bsc#968733, bsc#963399). * colors support by default. It is possible to change this with --disable-colors-default. * more information in cfdisk diff --git a/python-libmount.spec b/python-libmount.spec index c48bcda..406f70a 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -73,9 +73,8 @@ Name: python-libmount %endif Summary: %main_summary License: GPL-2.0+ -Group: %main_group +Group: %group_pl BuildRequires: audit-devel -BuildRequires: bash-completion BuildRequires: bc BuildRequires: binutils-devel BuildRequires: fdupes @@ -379,6 +378,7 @@ SMP systems. %if %build_util_linux %package -n python-libmount Summary: %summary_pl +License: GPL-2.0+ Group: %group_pl %description -n python-libmount @@ -540,6 +540,7 @@ AUTOPOINT=true autoreconf -vfi --with-ncurses \ --with-selinux \ $uhead \ + --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ --with-systemdsystemunitdir=%{_unitdir} \ --enable-libmount-force-mountinfo \ --enable-sulogin-emergency-mount \ @@ -1139,6 +1140,8 @@ fi %dir %{_datadir}/getopt %attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/* %if %build_util_linux_systemd %exclude %{_datadir}/bash-completion/completions/logger diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index e0a1faf..b98970d 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Jun 13 11:37:33 UTC 2016 - dimstar@opensuse.org + +- Do not BuildRequires bash-completion: this is tempting, but it + pulls bash-completion and its entire dependency stack into Ring0, + which is inacceptable. Pass the correct path + (%{_datdir}/bash-completion/completions) via + --with-bashcompletiondir to configure. + ------------------------------------------------------------------- Thu May 19 14:29:27 CEST 2016 - sbrabec@suse.com @@ -29,7 +38,7 @@ Wed Apr 13 21:29:00 UTC 2016 - sweet_f_a@gmx.de ------------------------------------------------------------------- Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de -- Update to version 2.28: +- Update to version 2.28 (bsc#974301): * Many changes and improvements, most notably: * Now cfdisk, sfdisk and fdisk wipe all filesystem and RAID signatures when creating a new disk label in interactive @@ -54,7 +63,7 @@ Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de * The commands nsenter and unshare support a new option --cgroup for work with cgroups namespaces (CLONE_NEWCGROUP). * The library libmount has been improved to properly detect - already mounted btrfs subvolumes. + already mounted btrfs subvolumes (bsc#947494, bsc#972684). * The library libsmartcols has been massively improved to print table ranges, multi-line cells, table titles and to support continuous printing. @@ -64,6 +73,7 @@ Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de openat-family functions anymore. * The python binding for libsmartcols is available in separate project at https://github.com/ignatenkobrain/python-smartcols + * Other bug fixes (bsc#970404, bsc#975082). * Security issue: CVE-2016-2779 is NOT FIXED yet. - Remove old util-linux-noenc-suse.patch @@ -98,7 +108,8 @@ Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com lslocks, sfdisk and lsipc. * script has been massively improved to be more robust and less complex (bsc#888678, bsc#930236). - * sulogin supports locked root accounts by --force. + * sulogin supports locked root accounts by --force + (bsc#968733, bsc#963399). * colors support by default. It is possible to change this with --disable-colors-default. * more information in cfdisk diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 1564473..d7fffed 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -75,7 +75,6 @@ Summary: %main_summary License: GPL-2.0+ Group: %main_group BuildRequires: audit-devel -BuildRequires: bash-completion BuildRequires: bc BuildRequires: binutils-devel BuildRequires: fdupes @@ -540,6 +539,7 @@ AUTOPOINT=true autoreconf -vfi --with-ncurses \ --with-selinux \ $uhead \ + --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ --with-systemdsystemunitdir=%{_unitdir} \ --enable-libmount-force-mountinfo \ --enable-sulogin-emergency-mount \ @@ -1139,6 +1139,8 @@ fi %dir %{_datadir}/getopt %attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/* %if %build_util_linux_systemd %exclude %{_datadir}/bash-completion/completions/logger diff --git a/util-linux.changes b/util-linux.changes index e0a1faf..b98970d 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Jun 13 11:37:33 UTC 2016 - dimstar@opensuse.org + +- Do not BuildRequires bash-completion: this is tempting, but it + pulls bash-completion and its entire dependency stack into Ring0, + which is inacceptable. Pass the correct path + (%{_datdir}/bash-completion/completions) via + --with-bashcompletiondir to configure. + ------------------------------------------------------------------- Thu May 19 14:29:27 CEST 2016 - sbrabec@suse.com @@ -29,7 +38,7 @@ Wed Apr 13 21:29:00 UTC 2016 - sweet_f_a@gmx.de ------------------------------------------------------------------- Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de -- Update to version 2.28: +- Update to version 2.28 (bsc#974301): * Many changes and improvements, most notably: * Now cfdisk, sfdisk and fdisk wipe all filesystem and RAID signatures when creating a new disk label in interactive @@ -54,7 +63,7 @@ Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de * The commands nsenter and unshare support a new option --cgroup for work with cgroups namespaces (CLONE_NEWCGROUP). * The library libmount has been improved to properly detect - already mounted btrfs subvolumes. + already mounted btrfs subvolumes (bsc#947494, bsc#972684). * The library libsmartcols has been massively improved to print table ranges, multi-line cells, table titles and to support continuous printing. @@ -64,6 +73,7 @@ Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de openat-family functions anymore. * The python binding for libsmartcols is available in separate project at https://github.com/ignatenkobrain/python-smartcols + * Other bug fixes (bsc#970404, bsc#975082). * Security issue: CVE-2016-2779 is NOT FIXED yet. - Remove old util-linux-noenc-suse.patch @@ -98,7 +108,8 @@ Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com lslocks, sfdisk and lsipc. * script has been massively improved to be more robust and less complex (bsc#888678, bsc#930236). - * sulogin supports locked root accounts by --force. + * sulogin supports locked root accounts by --force + (bsc#968733, bsc#963399). * colors support by default. It is possible to change this with --disable-colors-default. * more information in cfdisk diff --git a/util-linux.spec b/util-linux.spec index 6ca47c7..8ad1021 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -75,7 +75,6 @@ Summary: %main_summary License: GPL-2.0+ Group: %main_group BuildRequires: audit-devel -BuildRequires: bash-completion BuildRequires: bc BuildRequires: binutils-devel BuildRequires: fdupes @@ -540,6 +539,7 @@ AUTOPOINT=true autoreconf -vfi --with-ncurses \ --with-selinux \ $uhead \ + --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ --with-systemdsystemunitdir=%{_unitdir} \ --enable-libmount-force-mountinfo \ --enable-sulogin-emergency-mount \ @@ -1139,6 +1139,8 @@ fi %dir %{_datadir}/getopt %attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/* %if %build_util_linux_systemd %exclude %{_datadir}/bash-completion/completions/logger From bb2d671521dce849433d41131ce7550f77a1e475dde8ffecf0ff8c21f681fa15 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 18 Jul 2016 19:16:31 +0000 Subject: [PATCH 201/211] Accepting request 408335 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/408335 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=210 --- python-libmount.changes | 11 +++++++++++ python-libmount.spec | 13 +++---------- util-linux-systemd.changes | 11 +++++++++++ util-linux-systemd.spec | 13 +++---------- util-linux.changes | 11 +++++++++++ util-linux.spec | 13 +++---------- 6 files changed, 42 insertions(+), 30 deletions(-) diff --git a/python-libmount.changes b/python-libmount.changes index b98970d..b4f40fb 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Jul 11 07:29:18 UTC 2016 - dimstar@opensuse.org + +- BuildIgnore util-linux: it's part of VMInstall, hence part of + every package build. util-linux itself can be built without its + own presence though. Helps with some rare bootstrap issues (when + librtas changes soname for example). +- Drop usage of gpg-offline: this has long been migrated to a + source service that checks signatures on checkin already (osc + service lr source_validatory). + ------------------------------------------------------------------- Mon Jun 13 11:37:33 UTC 2016 - dimstar@opensuse.org diff --git a/python-libmount.spec b/python-libmount.spec index 406f70a..9b5a6fd 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -44,7 +44,6 @@ Name: python-libmount %define build_util_linux_systemd 0 %define build_python_libmount 1 # To prevent dependency loops, verify signature only in third stage. -%define verify_sig 1 %define main_summary %summary_pl %define main_group %group_pl %else @@ -52,7 +51,6 @@ Name: python-libmount %define build_util_linux 0 %define build_util_linux_systemd 1 %define build_python_libmount 0 -%define verify_sig 0 %define main_summary %summary_uls %define main_group %group_uls %else @@ -62,12 +60,10 @@ Name: python-libmount %define build_util_linux 1 %define build_util_linux_systemd 1 %define build_python_libmount 1 -%define verify_sig 1 %else %define build_util_linux 1 %define build_util_linux_systemd 0 %define build_python_libmount 0 -%define verify_sig 0 %endif %endif %endif @@ -89,12 +85,12 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: utempter-devel BuildRequires: zlib-devel +# util-linux is part of VMInstall, but we can well build without it +# Helps shorten a cycle and eliminate a bootstrap issue +#!BuildIgnore: util-linux %ifarch ppc ppc64 ppc64le BuildRequires: librtas-devel %endif -%if %verify_sig -BuildRequires: gpg-offline -%endif %if %build_util_linux_systemd BuildRequires: socat BuildRequires: systemd-rpm-macros @@ -390,9 +386,6 @@ library. %endif %prep -%if %verify_sig -xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - -%endif %setup -q -n %{_name}-%{version} -b 40 %patch -p1 %patch4 -p1 diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index b98970d..b4f40fb 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Jul 11 07:29:18 UTC 2016 - dimstar@opensuse.org + +- BuildIgnore util-linux: it's part of VMInstall, hence part of + every package build. util-linux itself can be built without its + own presence though. Helps with some rare bootstrap issues (when + librtas changes soname for example). +- Drop usage of gpg-offline: this has long been migrated to a + source service that checks signatures on checkin already (osc + service lr source_validatory). + ------------------------------------------------------------------- Mon Jun 13 11:37:33 UTC 2016 - dimstar@opensuse.org diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index d7fffed..ec91bf3 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -44,7 +44,6 @@ Name: util-linux-systemd %define build_util_linux_systemd 0 %define build_python_libmount 1 # To prevent dependency loops, verify signature only in third stage. -%define verify_sig 1 %define main_summary %summary_pl %define main_group %group_pl %else @@ -52,7 +51,6 @@ Name: util-linux-systemd %define build_util_linux 0 %define build_util_linux_systemd 1 %define build_python_libmount 0 -%define verify_sig 0 %define main_summary %summary_uls %define main_group %group_uls %else @@ -62,12 +60,10 @@ Name: util-linux-systemd %define build_util_linux 1 %define build_util_linux_systemd 1 %define build_python_libmount 1 -%define verify_sig 1 %else %define build_util_linux 1 %define build_util_linux_systemd 0 %define build_python_libmount 0 -%define verify_sig 0 %endif %endif %endif @@ -89,12 +85,12 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: utempter-devel BuildRequires: zlib-devel +# util-linux is part of VMInstall, but we can well build without it +# Helps shorten a cycle and eliminate a bootstrap issue +#!BuildIgnore: util-linux %ifarch ppc ppc64 ppc64le BuildRequires: librtas-devel %endif -%if %verify_sig -BuildRequires: gpg-offline -%endif %if %build_util_linux_systemd BuildRequires: socat BuildRequires: systemd-rpm-macros @@ -389,9 +385,6 @@ library. %endif %prep -%if %verify_sig -xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - -%endif %setup -q -n %{_name}-%{version} -b 40 %patch -p1 %patch4 -p1 diff --git a/util-linux.changes b/util-linux.changes index b98970d..b4f40fb 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Jul 11 07:29:18 UTC 2016 - dimstar@opensuse.org + +- BuildIgnore util-linux: it's part of VMInstall, hence part of + every package build. util-linux itself can be built without its + own presence though. Helps with some rare bootstrap issues (when + librtas changes soname for example). +- Drop usage of gpg-offline: this has long been migrated to a + source service that checks signatures on checkin already (osc + service lr source_validatory). + ------------------------------------------------------------------- Mon Jun 13 11:37:33 UTC 2016 - dimstar@opensuse.org diff --git a/util-linux.spec b/util-linux.spec index 8ad1021..f93e1ae 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -44,7 +44,6 @@ Name: util-linux %define build_util_linux_systemd 0 %define build_python_libmount 1 # To prevent dependency loops, verify signature only in third stage. -%define verify_sig 1 %define main_summary %summary_pl %define main_group %group_pl %else @@ -52,7 +51,6 @@ Name: util-linux %define build_util_linux 0 %define build_util_linux_systemd 1 %define build_python_libmount 0 -%define verify_sig 0 %define main_summary %summary_uls %define main_group %group_uls %else @@ -62,12 +60,10 @@ Name: util-linux %define build_util_linux 1 %define build_util_linux_systemd 1 %define build_python_libmount 1 -%define verify_sig 1 %else %define build_util_linux 1 %define build_util_linux_systemd 0 %define build_python_libmount 0 -%define verify_sig 0 %endif %endif %endif @@ -89,12 +85,12 @@ BuildRequires: pkg-config BuildRequires: readline-devel BuildRequires: utempter-devel BuildRequires: zlib-devel +# util-linux is part of VMInstall, but we can well build without it +# Helps shorten a cycle and eliminate a bootstrap issue +#!BuildIgnore: util-linux %ifarch ppc ppc64 ppc64le BuildRequires: librtas-devel %endif -%if %verify_sig -BuildRequires: gpg-offline -%endif %if %build_util_linux_systemd BuildRequires: socat BuildRequires: systemd-rpm-macros @@ -389,9 +385,6 @@ library. %endif %prep -%if %verify_sig -xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} - -%endif %setup -q -n %{_name}-%{version} -b 40 %patch -p1 %patch4 -p1 From fa803efda4bf8d33c0a99d8106f499161edf2d997018f01ba11ad9292f49b484 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 25 Aug 2016 07:49:40 +0000 Subject: [PATCH 202/211] Accepting request 421062 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/421062 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=211 --- python-libmount.changes | 14 ++++ python-libmount.spec | 18 ++--- util-linux-2.28.1.tar.sign | 17 +++++ util-linux-2.28.1.tar.xz | 3 + util-linux-2.28.tar.sign | 17 ----- util-linux-2.28.tar.xz | 3 - util-linux-libblkid-wipe-offset.patch | 100 -------------------------- util-linux-systemd.changes | 14 ++++ util-linux-systemd.spec | 15 +--- util-linux.changes | 14 ++++ util-linux.spec | 15 +--- 11 files changed, 72 insertions(+), 158 deletions(-) create mode 100644 util-linux-2.28.1.tar.sign create mode 100644 util-linux-2.28.1.tar.xz delete mode 100644 util-linux-2.28.tar.sign delete mode 100644 util-linux-2.28.tar.xz delete mode 100644 util-linux-libblkid-wipe-offset.patch diff --git a/python-libmount.changes b/python-libmount.changes index b4f40fb..9ef044a 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Thu Aug 11 13:24:34 UTC 2016 - sweet_f_a@gmx.de + +- Update to version 2.28.1, bugfix release, see + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes +- Remove util-linux-libblkid-wipe-offset.patch (upstream) +- use the new configure option --enable-libuuid-force-uuidd + instead of sed'ing configure.ac + +------------------------------------------------------------------- +Thu Aug 11 10:21:35 UTC 2016 - olaf@aepfle.de + +- Install klogconsole with read permissions (bnc#990837) + ------------------------------------------------------------------- Mon Jul 11 07:29:18 UTC 2016 - dimstar@opensuse.org diff --git a/python-libmount.spec b/python-libmount.spec index 9b5a6fd..a12c63d 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -69,7 +69,7 @@ Name: python-libmount %endif Summary: %main_summary License: GPL-2.0+ -Group: %group_pl +Group: %main_group BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel @@ -113,7 +113,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.28 +Version: 2.28.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -150,8 +150,6 @@ Source51: blkid.conf ## ## util-linux patches ## -# PATCH-FIX-UPSTREAM util-linux-libblkid-wipe-offset.patch bsc976141 sbrabec@suse.com -- blkid: Wipe corect area for probes with offset -Patch: util-linux-libblkid-wipe-offset.patch # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -374,7 +372,6 @@ SMP systems. %if %build_util_linux %package -n python-libmount Summary: %summary_pl -License: GPL-2.0+ Group: %group_pl %description -n python-libmount @@ -387,20 +384,12 @@ library. %endif %prep %setup -q -n %{_name}-%{version} -b 40 -%patch -p1 %patch4 -p1 # # setctsid cp -p %{S:22} %{S:23} . %build -#BEGIN CONFIG ALTER -%if !%build_util_linux_systemd -# We are not building util_linux_systemd => we are not building uuidd -# But we want libuuid with support of uuidd. The default configure disables it as well. -sed -i '/^AM_CONDITIONAL.*BUILD_UUIDD/a AC_DEFINE([HAVE_UUIDD], [1], [Define to 1 if you want to use uuid daemon.])' configure.ac -%endif -#END CONFIG ALTER %if %build_util_linux pushd ../klogconsole # klogconsole build @@ -536,6 +525,7 @@ AUTOPOINT=true autoreconf -vfi --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ --with-systemdsystemunitdir=%{_unitdir} \ --enable-libmount-force-mountinfo \ + --enable-libuuid-force-uuidd \ --enable-sulogin-emergency-mount \ --disable-use-tty-group \ --enable-static \ @@ -1166,7 +1156,7 @@ fi /sbin/hwclock #EndUsrMerge %{_sbindir}/hwclock -%{_sbindir}/klogconsole +%attr(744,root,root) %{_sbindir}/klogconsole %{_bindir}/setterm %{_sbindir}/tunelp %{_mandir}/man8/fdformat.8.gz diff --git a/util-linux-2.28.1.tar.sign b/util-linux-2.28.1.tar.sign new file mode 100644 index 0000000..30dbccf --- /dev/null +++ b/util-linux-2.28.1.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCAAGBQJXrEyGAAoJEOS3HV7sOcKEe/wP/2TjUsaBeKZ9IMJlhQdLYzE3 +8SlTmPM4t9vxTaHEVhTitPq/inXqW2PnjiCaDKl8okJFgcgbZzYK8lnWflbUMthb +is5fIACqctMbYmK+iGVeksiRBgxpow6Voe/aqMDtpUxPB9sl09GOn8EP3Oc4Plnj +YPyx/XYrA83xDPa6AljJT1KlPYiPZltldEhxRFSLSEYtO/CMANhmi/uCuSnwrpFb +H5CeJcWw0EqrxNphNrP8J8mfb4q8+YATsW/kHKxOgJNDXI+ELNbgltMmM11ySazA +ifxvX4M5zdoJH/DUqmKwH4XLmbVThbswJ1IJ+jKCjNbTzMyfFg/ox/aNjMXC88sk +9aRazTMN1rBbWUzuWlSr7wu+G2ZgKmwOpPZUgPWCg61b2TAPaGxbgc6JSym5arJP +vN47bsKIX/k18TGrILSV96FB4SF5s8ULDUxBHzb5+y3MSbI6VeZLEGAQGz1ZLYlG +hyQrkzzdqK4jzpib5QecdW/EfSgHxefEIvNBrKvd49oRR3DqNW97qKI/FkeQY2iF +KRKseiXKOZZRTu/kJU+6ON4gNzb4/+MaAWeHgFcnEpjsaUEFjh/UkOnvMaKCu63X +KZLDe5PgdtBbefGFTcgqfPA+qil/L9loBlw1JuisXW7pKivlnagyunaOxI41uvog +Uvy0L6lQChHdCK3mRzQU +=o4w8 +-----END PGP SIGNATURE----- diff --git a/util-linux-2.28.1.tar.xz b/util-linux-2.28.1.tar.xz new file mode 100644 index 0000000..f2a0f96 --- /dev/null +++ b/util-linux-2.28.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ece4ea4a34ef786b68f5c415e848390424232abd1ee00f7ee5bddc30657b60f +size 4157892 diff --git a/util-linux-2.28.tar.sign b/util-linux-2.28.tar.sign deleted file mode 100644 index b1d7e49..0000000 --- a/util-linux-2.28.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQIcBAABAgAGBQJXDNKPAAoJEOS3HV7sOcKEHo0P/RpIujRPSYGgh6kYObPjAoNY -fO/TJ6NeWMb5QcXbITH4dl9C+LoF9HXXZMG4lNsSckqT0OKoIjblFMs3QpqxLIVT -WOJbMktrrop5faJwixeEnWqtfRHBBtjdiTcLj5PMzajwijeYNIOyDx6uIr7UnGtF -v8DbxXFCZByTQvNRvibrXPk9FB/yushqOKakUrrNmrlwokDWHK5Ds8ZtqfSkNrMS -RZxRpAkpE4C3RYjttVJCkOqaH2B7Utxa03jxQN8UDxSvsXikvHFi5GDa1RZxRdOg -jwpZm8aUxSlb5EITSoioWqikVUQRCpErBZr+yFAt6VGAo8460rlTVb1OjqkTixHR -2QVRFLCATeUfHaWBi5Gnz29JUWnMykbsmOW8ZiLpEOL3KHr+0/s6N5e9x4xiFiE+ -fywoo+NlvbarM53cSXW6GZjazGQOqtGuEijyn29hoMwxuOyzF83pvFnZonbgessF -2UB+edl9Ppz4PCt2xqDaP55fXwk9rtO7Vqbd8xOImbrVjQF3+9EoY3H4I0QxnhV3 -XbozEYyc/9IyCapW7KBMyYD+dkWWu8bTVMK4JATWSR3F33Sl3a4e4GMmWB89n8Bs -fA/nj3lGvnApbvESR45os9gLx701Pbatvv4PITWKMuMsPi/FSBRlAYkc/Uznf2Fc -9BS4IkThuR4m+oIKyTNL -=VNvh ------END PGP SIGNATURE----- diff --git a/util-linux-2.28.tar.xz b/util-linux-2.28.tar.xz deleted file mode 100644 index bc5c003..0000000 --- a/util-linux-2.28.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:395847e2a18a2c317170f238892751e73a57104565344f8644090c8b091014bb -size 4119560 diff --git a/util-linux-libblkid-wipe-offset.patch b/util-linux-libblkid-wipe-offset.patch deleted file mode 100644 index e2b82d7..0000000 --- a/util-linux-libblkid-wipe-offset.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 445e6b1ec82642a298419bdd18a81110593bfbaa Mon Sep 17 00:00:00 2001 -From: Petr Uzel -Date: Mon, 18 Apr 2016 16:22:05 +0200 -Subject: [PATCH] libblkid: make blkid_do_wipe() work with probes with offset - -When a probe is created with an offset, e.g. via -blkid_probe_set_device(), this offset is correctly used when looking for -the signatures, but is not respected by blkid_do_wipe() function. -Therefore the signature is removed from an invalid location. - -Usecase: Wiping signatures from an area on the block device where -partition is to be created (but as it does not exist yet, there's no -device node for it and probe on the whole block device has to be used -with correct offset and length). - -Reproducer: -======================== wiper.c =========================== - -const char *dev; -unsigned long offset; -unsigned long size; - -int main(int argc, char** argv) { - - if (argc != 4) { - printf("usage: wiper dev offset size\n"); - exit(1); - } - - dev = argv[1]; - offset = strtoull(argv[2], NULL, 10); - size = strtoull(argv[3], NULL, 10); - - printf("dev=%s, off=%llu, size=%llu\n", dev, offset, size); - - int fd = open (dev, O_RDWR); - if (fd == -1) { - perror("open"); - exit(1); - } - - blkid_loff_t wipe_offset = offset * SECTOR_SIZE; - blkid_loff_t wipe_size = size * SECTOR_SIZE; - - int ret; - - blkid_probe pr; - pr = blkid_new_probe(); - if (!pr) - return 0; - ret = blkid_probe_set_device(pr, fd, wipe_offset, wipe_size); - ret = blkid_probe_enable_superblocks(pr, 1); - ret = blkid_probe_set_superblocks_flags(pr, BLKID_SUBLKS_MAGIC); - - while (blkid_do_probe(pr) == 0) { - ret = blkid_do_wipe(pr, 0); - } - - blkid_free_probe(pr); - close(fd); -} -======================== wiper.c =========================== - -Steps to reproduce: -modprobe scsi_debug -parted -s /dev/sdX mklabel gpt -parted -s /dev/sdX mkpart first 2048s 4095s -mkfs.ext2 /dev/sdX1 - -wipefs -np /dev/sdX1 - -./wiper /dev/sdX1 2048 2048 - -Actual result: wiper gets into endless loop, because -blkid_do_wipe() wipes at wrong location (1080), leaving the signature -on /dev/sdc1. So it is again found by blkid_do_probe(), and so on. - -Expected result: wiper clears the ext2 signature at offset 1049656(=1080+2048*512). - -Signed-off-by: Petr Uzel ---- - libblkid/src/probe.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c -index 34d97b8..0c8625c 100644 ---- a/libblkid/src/probe.c -+++ b/libblkid/src/probe.c -@@ -1121,7 +1121,7 @@ int blkid_do_wipe(blkid_probe pr, int dryrun) - if (rc || len == 0 || off == NULL) - return 0; - -- offset = strtoumax(off, NULL, 10); -+ offset = strtoumax(off, NULL, 10) + pr->off; - fd = blkid_probe_get_fd(pr); - if (fd < 0) - return -1; --- -2.8.1 - diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index b4f40fb..9ef044a 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Thu Aug 11 13:24:34 UTC 2016 - sweet_f_a@gmx.de + +- Update to version 2.28.1, bugfix release, see + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes +- Remove util-linux-libblkid-wipe-offset.patch (upstream) +- use the new configure option --enable-libuuid-force-uuidd + instead of sed'ing configure.ac + +------------------------------------------------------------------- +Thu Aug 11 10:21:35 UTC 2016 - olaf@aepfle.de + +- Install klogconsole with read permissions (bnc#990837) + ------------------------------------------------------------------- Mon Jul 11 07:29:18 UTC 2016 - dimstar@opensuse.org diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index ec91bf3..4d13a1b 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -113,7 +113,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.28 +Version: 2.28.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -150,8 +150,6 @@ Source51: blkid.conf ## ## util-linux patches ## -# PATCH-FIX-UPSTREAM util-linux-libblkid-wipe-offset.patch bsc976141 sbrabec@suse.com -- blkid: Wipe corect area for probes with offset -Patch: util-linux-libblkid-wipe-offset.patch # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -386,20 +384,12 @@ library. %endif %prep %setup -q -n %{_name}-%{version} -b 40 -%patch -p1 %patch4 -p1 # # setctsid cp -p %{S:22} %{S:23} . %build -#BEGIN CONFIG ALTER -%if !%build_util_linux_systemd -# We are not building util_linux_systemd => we are not building uuidd -# But we want libuuid with support of uuidd. The default configure disables it as well. -sed -i '/^AM_CONDITIONAL.*BUILD_UUIDD/a AC_DEFINE([HAVE_UUIDD], [1], [Define to 1 if you want to use uuid daemon.])' configure.ac -%endif -#END CONFIG ALTER %if %build_util_linux pushd ../klogconsole # klogconsole build @@ -535,6 +525,7 @@ AUTOPOINT=true autoreconf -vfi --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ --with-systemdsystemunitdir=%{_unitdir} \ --enable-libmount-force-mountinfo \ + --enable-libuuid-force-uuidd \ --enable-sulogin-emergency-mount \ --disable-use-tty-group \ --enable-static \ @@ -1165,7 +1156,7 @@ fi /sbin/hwclock #EndUsrMerge %{_sbindir}/hwclock -%{_sbindir}/klogconsole +%attr(744,root,root) %{_sbindir}/klogconsole %{_bindir}/setterm %{_sbindir}/tunelp %{_mandir}/man8/fdformat.8.gz diff --git a/util-linux.changes b/util-linux.changes index b4f40fb..9ef044a 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Thu Aug 11 13:24:34 UTC 2016 - sweet_f_a@gmx.de + +- Update to version 2.28.1, bugfix release, see + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes +- Remove util-linux-libblkid-wipe-offset.patch (upstream) +- use the new configure option --enable-libuuid-force-uuidd + instead of sed'ing configure.ac + +------------------------------------------------------------------- +Thu Aug 11 10:21:35 UTC 2016 - olaf@aepfle.de + +- Install klogconsole with read permissions (bnc#990837) + ------------------------------------------------------------------- Mon Jul 11 07:29:18 UTC 2016 - dimstar@opensuse.org diff --git a/util-linux.spec b/util-linux.spec index f93e1ae..9042331 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -113,7 +113,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.28 +Version: 2.28.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -150,8 +150,6 @@ Source51: blkid.conf ## ## util-linux patches ## -# PATCH-FIX-UPSTREAM util-linux-libblkid-wipe-offset.patch bsc976141 sbrabec@suse.com -- blkid: Wipe corect area for probes with offset -Patch: util-linux-libblkid-wipe-offset.patch # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -386,20 +384,12 @@ library. %endif %prep %setup -q -n %{_name}-%{version} -b 40 -%patch -p1 %patch4 -p1 # # setctsid cp -p %{S:22} %{S:23} . %build -#BEGIN CONFIG ALTER -%if !%build_util_linux_systemd -# We are not building util_linux_systemd => we are not building uuidd -# But we want libuuid with support of uuidd. The default configure disables it as well. -sed -i '/^AM_CONDITIONAL.*BUILD_UUIDD/a AC_DEFINE([HAVE_UUIDD], [1], [Define to 1 if you want to use uuid daemon.])' configure.ac -%endif -#END CONFIG ALTER %if %build_util_linux pushd ../klogconsole # klogconsole build @@ -535,6 +525,7 @@ AUTOPOINT=true autoreconf -vfi --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ --with-systemdsystemunitdir=%{_unitdir} \ --enable-libmount-force-mountinfo \ + --enable-libuuid-force-uuidd \ --enable-sulogin-emergency-mount \ --disable-use-tty-group \ --enable-static \ @@ -1165,7 +1156,7 @@ fi /sbin/hwclock #EndUsrMerge %{_sbindir}/hwclock -%{_sbindir}/klogconsole +%attr(744,root,root) %{_sbindir}/klogconsole %{_bindir}/setterm %{_sbindir}/tunelp %{_mandir}/man8/fdformat.8.gz From 0416b0700f841bcf6f21afa90cf9d615ffe1a1ce772f28f382a084cc85655320 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 12 Sep 2016 11:21:32 +0000 Subject: [PATCH 203/211] Accepting request 425668 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/425668 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=212 --- python-libmount.changes | 6 ++++++ python-libmount.spec | 2 +- util-linux-2.28.1.tar.sign | 17 ----------------- util-linux-2.28.1.tar.xz | 3 --- util-linux-2.28.2.tar.sign | 17 +++++++++++++++++ util-linux-2.28.2.tar.xz | 3 +++ util-linux-systemd.changes | 6 ++++++ util-linux-systemd.spec | 2 +- util-linux.changes | 6 ++++++ util-linux.spec | 2 +- 10 files changed, 41 insertions(+), 23 deletions(-) delete mode 100644 util-linux-2.28.1.tar.sign delete mode 100644 util-linux-2.28.1.tar.xz create mode 100644 util-linux-2.28.2.tar.sign create mode 100644 util-linux-2.28.2.tar.xz diff --git a/python-libmount.changes b/python-libmount.changes index 9ef044a..71bcb84 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de + +- Update to version 2.28.2, bugfix release, see + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes + ------------------------------------------------------------------- Thu Aug 11 13:24:34 UTC 2016 - sweet_f_a@gmx.de diff --git a/python-libmount.spec b/python-libmount.spec index a12c63d..6d8e837 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -113,7 +113,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.28.1 +Version: 2.28.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole diff --git a/util-linux-2.28.1.tar.sign b/util-linux-2.28.1.tar.sign deleted file mode 100644 index 30dbccf..0000000 --- a/util-linux-2.28.1.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQIcBAABCAAGBQJXrEyGAAoJEOS3HV7sOcKEe/wP/2TjUsaBeKZ9IMJlhQdLYzE3 -8SlTmPM4t9vxTaHEVhTitPq/inXqW2PnjiCaDKl8okJFgcgbZzYK8lnWflbUMthb -is5fIACqctMbYmK+iGVeksiRBgxpow6Voe/aqMDtpUxPB9sl09GOn8EP3Oc4Plnj -YPyx/XYrA83xDPa6AljJT1KlPYiPZltldEhxRFSLSEYtO/CMANhmi/uCuSnwrpFb -H5CeJcWw0EqrxNphNrP8J8mfb4q8+YATsW/kHKxOgJNDXI+ELNbgltMmM11ySazA -ifxvX4M5zdoJH/DUqmKwH4XLmbVThbswJ1IJ+jKCjNbTzMyfFg/ox/aNjMXC88sk -9aRazTMN1rBbWUzuWlSr7wu+G2ZgKmwOpPZUgPWCg61b2TAPaGxbgc6JSym5arJP -vN47bsKIX/k18TGrILSV96FB4SF5s8ULDUxBHzb5+y3MSbI6VeZLEGAQGz1ZLYlG -hyQrkzzdqK4jzpib5QecdW/EfSgHxefEIvNBrKvd49oRR3DqNW97qKI/FkeQY2iF -KRKseiXKOZZRTu/kJU+6ON4gNzb4/+MaAWeHgFcnEpjsaUEFjh/UkOnvMaKCu63X -KZLDe5PgdtBbefGFTcgqfPA+qil/L9loBlw1JuisXW7pKivlnagyunaOxI41uvog -Uvy0L6lQChHdCK3mRzQU -=o4w8 ------END PGP SIGNATURE----- diff --git a/util-linux-2.28.1.tar.xz b/util-linux-2.28.1.tar.xz deleted file mode 100644 index f2a0f96..0000000 --- a/util-linux-2.28.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3ece4ea4a34ef786b68f5c415e848390424232abd1ee00f7ee5bddc30657b60f -size 4157892 diff --git a/util-linux-2.28.2.tar.sign b/util-linux-2.28.2.tar.sign new file mode 100644 index 0000000..816da3d --- /dev/null +++ b/util-linux-2.28.2.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCAAGBQJX0ACaAAoJEOS3HV7sOcKEkCMP/2TEulMSidpCzZm/AxHcsshN +nhOZygZtjmjvVgOrPfQjNyuOOpd/lJn39hB9j3amq7fDkWZXcjYcKjYG5v1ex3ok +4Xgn0eH9uW3fIskldiFl0agYrIvkov75G8bEhLkluY8b66OwKmzRvd8CV5nQPfQk +9RNCdluw+0Qy5044+QX24Bro3QIGHyXHe5soRe5LYbqKsuEj48iCgi10ClkmkfAv +TnelecI4Ck0OcmLqq4jygDBgufR32XnHvBdjHyA7TqFE7fHdOAUZqhJ27OyDdg1b +ABfGPBjL/nLtLjjW5BDrrFaRB/5iJyRrAke7UH0N/Si+2xm2aP2yqhy3+vDTnzfA +gP/1HMg42w62JA3sF7Z/vbMF/qhLVS3jhR0mCNMr2IY9ClnDQfrh5y+XaBTsXPvS +aIv6aEHt02JFPOoKoImdaq2sq9krKkR2cabqd3kxfKLSo/6yw/K8ZZiOEMlNSWc0 +/tfYuk84hcGFwmHv+ESx3x/JG9XoUsxWmvW/1l6eLHKnJ2Q1CP+/uLml4BHQZTrH +LKSU37B/7l9UMWCq/sq9Wfbm6wDI0x8h637iCiSquCv/fzFFmYBtNqZaR4RVjyK9 +KJgqzv9OJCDk89VhvfbhfpAU2unF3UAE0ho6eOSNMDrubeEQNiEj4vDKo0HccMZo +2ulDt0G0OBm6U7aIYHRn +=15U5 +-----END PGP SIGNATURE----- diff --git a/util-linux-2.28.2.tar.xz b/util-linux-2.28.2.tar.xz new file mode 100644 index 0000000..7b131bd --- /dev/null +++ b/util-linux-2.28.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b89d37146f20bede93a42c847bce881a17e6dbd8066ff2db2bee733fa409f0cd +size 4149700 diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 9ef044a..71bcb84 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de + +- Update to version 2.28.2, bugfix release, see + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes + ------------------------------------------------------------------- Thu Aug 11 13:24:34 UTC 2016 - sweet_f_a@gmx.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 4d13a1b..31510b4 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -113,7 +113,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.28.1 +Version: 2.28.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole diff --git a/util-linux.changes b/util-linux.changes index 9ef044a..71bcb84 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de + +- Update to version 2.28.2, bugfix release, see + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes + ------------------------------------------------------------------- Thu Aug 11 13:24:34 UTC 2016 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index 9042331..5e5f95e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -113,7 +113,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.28.1 +Version: 2.28.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole From 7b372b4b47e60e2a500fcdbfe661c727c20303459e97e9f7ba47d90564265a9e Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sat, 19 Nov 2016 11:48:26 +0000 Subject: [PATCH 204/211] Accepting request 440452 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/440452 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=213 --- make-sure-sbin-resp-usr-sbin-are-in-PATH.diff | 10 +++++----- python-libmount.changes | 7 +++++++ python-libmount.spec | 10 ++++++---- util-linux-2.28.2.tar.sign | 17 ----------------- util-linux-2.28.2.tar.xz | 3 --- util-linux-2.29.tar.sign | 17 +++++++++++++++++ util-linux-2.29.tar.xz | 3 +++ util-linux-systemd.changes | 7 +++++++ util-linux-systemd.spec | 10 ++++++---- util-linux.changes | 7 +++++++ util-linux.spec | 10 ++++++---- 11 files changed, 64 insertions(+), 37 deletions(-) delete mode 100644 util-linux-2.28.2.tar.sign delete mode 100644 util-linux-2.28.2.tar.xz create mode 100644 util-linux-2.29.tar.sign create mode 100644 util-linux-2.29.tar.xz diff --git a/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff b/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff index 249c5f6..3fb223c 100644 --- a/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff +++ b/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff @@ -1,7 +1,7 @@ ---- util-linux-2.23.1/login-utils/su-common.c -+++ util-linux-2.23.1/login-utils/su-common.c 2013-06-06 08:46:59.575872090 +0000 -@@ -473,6 +473,117 @@ set_path(const struct passwd* pw) - err (EXIT_FAILURE, _("failed to set PATH")); +--- a/login-utils/su-common.c ++++ b/login-utils/su-common.c +@@ -523,6 +523,117 @@ set_path(const struct passwd* pw) + err (EXIT_FAILURE, _("failed to set the %s environment variable"), "PATH"); } +/* Add or clear /sbin and /usr/sbin for the su command @@ -118,7 +118,7 @@ /* Update `environ' for the new shell based on PW, with SHELL being the value for the SHELL environment variable. */ -@@ -508,6 +619,22 @@ modify_environment (const struct passwd +@@ -560,6 +671,22 @@ modify_environment (const struct passwd *pw, const char *shell) xsetenv ("SHELL", shell, 1); if (getlogindefs_bool ("ALWAYS_SET_PATH", 0)) set_path(pw); diff --git a/python-libmount.changes b/python-libmount.changes index 71bcb84..45046e2 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de + +- Update to version 2.29, see + https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes +- refresh make-sure-sbin-resp-usr-sbin-are-in-PATH.diff + ------------------------------------------------------------------- Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de diff --git a/python-libmount.spec b/python-libmount.spec index 6d8e837..3c62b76 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -82,6 +82,7 @@ BuildRequires: libtool BuildRequires: ncurses-devel BuildRequires: pam-devel BuildRequires: pkg-config +BuildRequires: procps BuildRequires: readline-devel BuildRequires: utempter-devel BuildRequires: zlib-devel @@ -113,7 +114,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.28.2 +Version: 2.29 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -122,7 +123,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -132,7 +133,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -519,7 +520,7 @@ AUTOPOINT=true autoreconf -vfi --docdir=%{_docdir}/%{_name} \ --with-audit \ --with-gnu-ld \ - --with-ncurses \ + --with-ncursesw \ --with-selinux \ $uhead \ --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ @@ -570,6 +571,7 @@ export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" export TS_OPT_libfdisk_gpt_known_fail="yes" +export TS_OPT_misc_flock_known_fail="yes" export TS_OPT_misc_ionice_known_fail="yes" export TS_OPT_misc_swaplabel_known_fail="yes" export TS_OPT_kill_name_to_number_known_fail="yes" diff --git a/util-linux-2.28.2.tar.sign b/util-linux-2.28.2.tar.sign deleted file mode 100644 index 816da3d..0000000 --- a/util-linux-2.28.2.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQIcBAABCAAGBQJX0ACaAAoJEOS3HV7sOcKEkCMP/2TEulMSidpCzZm/AxHcsshN -nhOZygZtjmjvVgOrPfQjNyuOOpd/lJn39hB9j3amq7fDkWZXcjYcKjYG5v1ex3ok -4Xgn0eH9uW3fIskldiFl0agYrIvkov75G8bEhLkluY8b66OwKmzRvd8CV5nQPfQk -9RNCdluw+0Qy5044+QX24Bro3QIGHyXHe5soRe5LYbqKsuEj48iCgi10ClkmkfAv -TnelecI4Ck0OcmLqq4jygDBgufR32XnHvBdjHyA7TqFE7fHdOAUZqhJ27OyDdg1b -ABfGPBjL/nLtLjjW5BDrrFaRB/5iJyRrAke7UH0N/Si+2xm2aP2yqhy3+vDTnzfA -gP/1HMg42w62JA3sF7Z/vbMF/qhLVS3jhR0mCNMr2IY9ClnDQfrh5y+XaBTsXPvS -aIv6aEHt02JFPOoKoImdaq2sq9krKkR2cabqd3kxfKLSo/6yw/K8ZZiOEMlNSWc0 -/tfYuk84hcGFwmHv+ESx3x/JG9XoUsxWmvW/1l6eLHKnJ2Q1CP+/uLml4BHQZTrH -LKSU37B/7l9UMWCq/sq9Wfbm6wDI0x8h637iCiSquCv/fzFFmYBtNqZaR4RVjyK9 -KJgqzv9OJCDk89VhvfbhfpAU2unF3UAE0ho6eOSNMDrubeEQNiEj4vDKo0HccMZo -2ulDt0G0OBm6U7aIYHRn -=15U5 ------END PGP SIGNATURE----- diff --git a/util-linux-2.28.2.tar.xz b/util-linux-2.28.2.tar.xz deleted file mode 100644 index 7b131bd..0000000 --- a/util-linux-2.28.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b89d37146f20bede93a42c847bce881a17e6dbd8066ff2db2bee733fa409f0cd -size 4149700 diff --git a/util-linux-2.29.tar.sign b/util-linux-2.29.tar.sign new file mode 100644 index 0000000..b17a572 --- /dev/null +++ b/util-linux-2.29.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCAAGBQJYIa+yAAoJEOS3HV7sOcKEkPEQAJ6qcx836hUP93e+q8lH7Anf +6odYlxYWC5Pgb8Qopn1KDMh5c3GAbPrnbSoVRKS3jvc24uZuhlCCwYnJbcmEt/+L +am+/zQyIF9T5ZwTadnGD2bkYXI5N9eS4R5O0N/OdBTgsVr9rjZ318zHg+8YCUZN0 +hCh4e1UlUC8uL7C/WgeLW/+kN+D+/1KJISDerkw+u5FFPZGWcPcYPh7ofi4ZyV/h +OPgvaEHt3/IxsZnuUNtIEVhFBpabjdwLkXm1LQ26XLnkdipBuuadVB8jaSLUz29J +rkNVI0iiH9vq5abE0wDIzQ2Lt4Lv65fQM7dmw/Ek188tZn9MyX8vT+C5Vyu+EFtU +K+1BwMVNqfW5hZHPM2z7izO/ml77wnydEFGy9GZZpLqQAzUGgsQDC3JbiczC7Qfq +bTFGhz32sHp/2gyOqciwhLPzWxD6jOLVG84vC9Obvtm+xQEfvLa71FnHdcLU3uZA +uZHt50WSuusZJtCWDhhLgfV6NV7c+YB1tELfrStlXAHyZT3Ws0pNPv+5Sue81dGt +uYVOOlXd+5qVpcgJRs5ai86yzv65kCeqmDsSAiHMIwPfFYBOeYessiRmWpqJXTt2 +S38j00fHFbNh5qqgDyso6myan4ZNLVIpihZLT2JLJqxEnf4ILZVV7krNW9p09teq +afEkNizqGL/NF2I7ltpe +=5e/s +-----END PGP SIGNATURE----- diff --git a/util-linux-2.29.tar.xz b/util-linux-2.29.tar.xz new file mode 100644 index 0000000..1107cb6 --- /dev/null +++ b/util-linux-2.29.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c59ea67cc7b564104f60532f6e0a95fe17a91acb870ba8fd7e986f273abf9e7 +size 4249020 diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 71bcb84..45046e2 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de + +- Update to version 2.29, see + https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes +- refresh make-sure-sbin-resp-usr-sbin-are-in-PATH.diff + ------------------------------------------------------------------- Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 31510b4..ca6076d 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -82,6 +82,7 @@ BuildRequires: libtool BuildRequires: ncurses-devel BuildRequires: pam-devel BuildRequires: pkg-config +BuildRequires: procps BuildRequires: readline-devel BuildRequires: utempter-devel BuildRequires: zlib-devel @@ -113,7 +114,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.28.2 +Version: 2.29 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -122,7 +123,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -132,7 +133,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -519,7 +520,7 @@ AUTOPOINT=true autoreconf -vfi --docdir=%{_docdir}/%{_name} \ --with-audit \ --with-gnu-ld \ - --with-ncurses \ + --with-ncursesw \ --with-selinux \ $uhead \ --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ @@ -570,6 +571,7 @@ export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" export TS_OPT_libfdisk_gpt_known_fail="yes" +export TS_OPT_misc_flock_known_fail="yes" export TS_OPT_misc_ionice_known_fail="yes" export TS_OPT_misc_swaplabel_known_fail="yes" export TS_OPT_kill_name_to_number_known_fail="yes" diff --git a/util-linux.changes b/util-linux.changes index 71bcb84..45046e2 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de + +- Update to version 2.29, see + https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes +- refresh make-sure-sbin-resp-usr-sbin-are-in-PATH.diff + ------------------------------------------------------------------- Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index 5e5f95e..8ef98e3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -82,6 +82,7 @@ BuildRequires: libtool BuildRequires: ncurses-devel BuildRequires: pam-devel BuildRequires: pkg-config +BuildRequires: procps BuildRequires: readline-devel BuildRequires: utempter-devel BuildRequires: zlib-devel @@ -113,7 +114,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.28.2 +Version: 2.29 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -122,7 +123,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -132,7 +133,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -519,7 +520,7 @@ AUTOPOINT=true autoreconf -vfi --docdir=%{_docdir}/%{_name} \ --with-audit \ --with-gnu-ld \ - --with-ncurses \ + --with-ncursesw \ --with-selinux \ $uhead \ --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ @@ -570,6 +571,7 @@ export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" export TS_OPT_libfdisk_gpt_known_fail="yes" +export TS_OPT_misc_flock_known_fail="yes" export TS_OPT_misc_ionice_known_fail="yes" export TS_OPT_misc_swaplabel_known_fail="yes" export TS_OPT_kill_name_to_number_known_fail="yes" From 61aa9e4f91e2a4b0230bc2090d2050bff7b54e5d009711c737a11f44d34d212a Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sat, 19 Nov 2016 11:57:29 +0000 Subject: [PATCH 205/211] Revert to previous rev - procps pulls systemd into ring0 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=214 --- make-sure-sbin-resp-usr-sbin-are-in-PATH.diff | 10 +++++----- python-libmount.changes | 7 ------- python-libmount.spec | 10 ++++------ util-linux-2.28.2.tar.sign | 17 +++++++++++++++++ util-linux-2.28.2.tar.xz | 3 +++ util-linux-2.29.tar.sign | 17 ----------------- util-linux-2.29.tar.xz | 3 --- util-linux-systemd.changes | 7 ------- util-linux-systemd.spec | 10 ++++------ util-linux.changes | 7 ------- util-linux.spec | 10 ++++------ 11 files changed, 37 insertions(+), 64 deletions(-) create mode 100644 util-linux-2.28.2.tar.sign create mode 100644 util-linux-2.28.2.tar.xz delete mode 100644 util-linux-2.29.tar.sign delete mode 100644 util-linux-2.29.tar.xz diff --git a/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff b/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff index 3fb223c..249c5f6 100644 --- a/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff +++ b/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff @@ -1,7 +1,7 @@ ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -523,6 +523,117 @@ set_path(const struct passwd* pw) - err (EXIT_FAILURE, _("failed to set the %s environment variable"), "PATH"); +--- util-linux-2.23.1/login-utils/su-common.c ++++ util-linux-2.23.1/login-utils/su-common.c 2013-06-06 08:46:59.575872090 +0000 +@@ -473,6 +473,117 @@ set_path(const struct passwd* pw) + err (EXIT_FAILURE, _("failed to set PATH")); } +/* Add or clear /sbin and /usr/sbin for the su command @@ -118,7 +118,7 @@ /* Update `environ' for the new shell based on PW, with SHELL being the value for the SHELL environment variable. */ -@@ -560,6 +671,22 @@ modify_environment (const struct passwd *pw, const char *shell) +@@ -508,6 +619,22 @@ modify_environment (const struct passwd xsetenv ("SHELL", shell, 1); if (getlogindefs_bool ("ALWAYS_SET_PATH", 0)) set_path(pw); diff --git a/python-libmount.changes b/python-libmount.changes index 45046e2..71bcb84 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,10 +1,3 @@ -------------------------------------------------------------------- -Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de - -- Update to version 2.29, see - https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes -- refresh make-sure-sbin-resp-usr-sbin-are-in-PATH.diff - ------------------------------------------------------------------- Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de diff --git a/python-libmount.spec b/python-libmount.spec index 3c62b76..6d8e837 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -82,7 +82,6 @@ BuildRequires: libtool BuildRequires: ncurses-devel BuildRequires: pam-devel BuildRequires: pkg-config -BuildRequires: procps BuildRequires: readline-devel BuildRequires: utempter-devel BuildRequires: zlib-devel @@ -114,7 +113,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.29 +Version: 2.28.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -123,7 +122,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -133,7 +132,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -520,7 +519,7 @@ AUTOPOINT=true autoreconf -vfi --docdir=%{_docdir}/%{_name} \ --with-audit \ --with-gnu-ld \ - --with-ncursesw \ + --with-ncurses \ --with-selinux \ $uhead \ --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ @@ -571,7 +570,6 @@ export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" export TS_OPT_libfdisk_gpt_known_fail="yes" -export TS_OPT_misc_flock_known_fail="yes" export TS_OPT_misc_ionice_known_fail="yes" export TS_OPT_misc_swaplabel_known_fail="yes" export TS_OPT_kill_name_to_number_known_fail="yes" diff --git a/util-linux-2.28.2.tar.sign b/util-linux-2.28.2.tar.sign new file mode 100644 index 0000000..816da3d --- /dev/null +++ b/util-linux-2.28.2.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCAAGBQJX0ACaAAoJEOS3HV7sOcKEkCMP/2TEulMSidpCzZm/AxHcsshN +nhOZygZtjmjvVgOrPfQjNyuOOpd/lJn39hB9j3amq7fDkWZXcjYcKjYG5v1ex3ok +4Xgn0eH9uW3fIskldiFl0agYrIvkov75G8bEhLkluY8b66OwKmzRvd8CV5nQPfQk +9RNCdluw+0Qy5044+QX24Bro3QIGHyXHe5soRe5LYbqKsuEj48iCgi10ClkmkfAv +TnelecI4Ck0OcmLqq4jygDBgufR32XnHvBdjHyA7TqFE7fHdOAUZqhJ27OyDdg1b +ABfGPBjL/nLtLjjW5BDrrFaRB/5iJyRrAke7UH0N/Si+2xm2aP2yqhy3+vDTnzfA +gP/1HMg42w62JA3sF7Z/vbMF/qhLVS3jhR0mCNMr2IY9ClnDQfrh5y+XaBTsXPvS +aIv6aEHt02JFPOoKoImdaq2sq9krKkR2cabqd3kxfKLSo/6yw/K8ZZiOEMlNSWc0 +/tfYuk84hcGFwmHv+ESx3x/JG9XoUsxWmvW/1l6eLHKnJ2Q1CP+/uLml4BHQZTrH +LKSU37B/7l9UMWCq/sq9Wfbm6wDI0x8h637iCiSquCv/fzFFmYBtNqZaR4RVjyK9 +KJgqzv9OJCDk89VhvfbhfpAU2unF3UAE0ho6eOSNMDrubeEQNiEj4vDKo0HccMZo +2ulDt0G0OBm6U7aIYHRn +=15U5 +-----END PGP SIGNATURE----- diff --git a/util-linux-2.28.2.tar.xz b/util-linux-2.28.2.tar.xz new file mode 100644 index 0000000..7b131bd --- /dev/null +++ b/util-linux-2.28.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b89d37146f20bede93a42c847bce881a17e6dbd8066ff2db2bee733fa409f0cd +size 4149700 diff --git a/util-linux-2.29.tar.sign b/util-linux-2.29.tar.sign deleted file mode 100644 index b17a572..0000000 --- a/util-linux-2.29.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQIcBAABCAAGBQJYIa+yAAoJEOS3HV7sOcKEkPEQAJ6qcx836hUP93e+q8lH7Anf -6odYlxYWC5Pgb8Qopn1KDMh5c3GAbPrnbSoVRKS3jvc24uZuhlCCwYnJbcmEt/+L -am+/zQyIF9T5ZwTadnGD2bkYXI5N9eS4R5O0N/OdBTgsVr9rjZ318zHg+8YCUZN0 -hCh4e1UlUC8uL7C/WgeLW/+kN+D+/1KJISDerkw+u5FFPZGWcPcYPh7ofi4ZyV/h -OPgvaEHt3/IxsZnuUNtIEVhFBpabjdwLkXm1LQ26XLnkdipBuuadVB8jaSLUz29J -rkNVI0iiH9vq5abE0wDIzQ2Lt4Lv65fQM7dmw/Ek188tZn9MyX8vT+C5Vyu+EFtU -K+1BwMVNqfW5hZHPM2z7izO/ml77wnydEFGy9GZZpLqQAzUGgsQDC3JbiczC7Qfq -bTFGhz32sHp/2gyOqciwhLPzWxD6jOLVG84vC9Obvtm+xQEfvLa71FnHdcLU3uZA -uZHt50WSuusZJtCWDhhLgfV6NV7c+YB1tELfrStlXAHyZT3Ws0pNPv+5Sue81dGt -uYVOOlXd+5qVpcgJRs5ai86yzv65kCeqmDsSAiHMIwPfFYBOeYessiRmWpqJXTt2 -S38j00fHFbNh5qqgDyso6myan4ZNLVIpihZLT2JLJqxEnf4ILZVV7krNW9p09teq -afEkNizqGL/NF2I7ltpe -=5e/s ------END PGP SIGNATURE----- diff --git a/util-linux-2.29.tar.xz b/util-linux-2.29.tar.xz deleted file mode 100644 index 1107cb6..0000000 --- a/util-linux-2.29.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2c59ea67cc7b564104f60532f6e0a95fe17a91acb870ba8fd7e986f273abf9e7 -size 4249020 diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 45046e2..71bcb84 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,10 +1,3 @@ -------------------------------------------------------------------- -Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de - -- Update to version 2.29, see - https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes -- refresh make-sure-sbin-resp-usr-sbin-are-in-PATH.diff - ------------------------------------------------------------------- Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index ca6076d..31510b4 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -82,7 +82,6 @@ BuildRequires: libtool BuildRequires: ncurses-devel BuildRequires: pam-devel BuildRequires: pkg-config -BuildRequires: procps BuildRequires: readline-devel BuildRequires: utempter-devel BuildRequires: zlib-devel @@ -114,7 +113,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.29 +Version: 2.28.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -123,7 +122,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -133,7 +132,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -520,7 +519,7 @@ AUTOPOINT=true autoreconf -vfi --docdir=%{_docdir}/%{_name} \ --with-audit \ --with-gnu-ld \ - --with-ncursesw \ + --with-ncurses \ --with-selinux \ $uhead \ --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ @@ -571,7 +570,6 @@ export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" export TS_OPT_libfdisk_gpt_known_fail="yes" -export TS_OPT_misc_flock_known_fail="yes" export TS_OPT_misc_ionice_known_fail="yes" export TS_OPT_misc_swaplabel_known_fail="yes" export TS_OPT_kill_name_to_number_known_fail="yes" diff --git a/util-linux.changes b/util-linux.changes index 45046e2..71bcb84 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,10 +1,3 @@ -------------------------------------------------------------------- -Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de - -- Update to version 2.29, see - https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes -- refresh make-sure-sbin-resp-usr-sbin-are-in-PATH.diff - ------------------------------------------------------------------- Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index 8ef98e3..5e5f95e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -82,7 +82,6 @@ BuildRequires: libtool BuildRequires: ncurses-devel BuildRequires: pam-devel BuildRequires: pkg-config -BuildRequires: procps BuildRequires: readline-devel BuildRequires: utempter-devel BuildRequires: zlib-devel @@ -114,7 +113,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.29 +Version: 2.28.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -123,7 +122,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -133,7 +132,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -520,7 +519,7 @@ AUTOPOINT=true autoreconf -vfi --docdir=%{_docdir}/%{_name} \ --with-audit \ --with-gnu-ld \ - --with-ncursesw \ + --with-ncurses \ --with-selinux \ $uhead \ --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ @@ -571,7 +570,6 @@ export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" export TS_OPT_libfdisk_gpt_known_fail="yes" -export TS_OPT_misc_flock_known_fail="yes" export TS_OPT_misc_ionice_known_fail="yes" export TS_OPT_misc_swaplabel_known_fail="yes" export TS_OPT_kill_name_to_number_known_fail="yes" From c4babe9b0b94893ee5fde0f1dce15a45217143b2dc24b9d2224cd1cd87c371a3 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sun, 15 Jan 2017 09:56:24 +0000 Subject: [PATCH 206/211] Accepting request 448913 from Base:System - don't install bash-completions for uninstalled binaries (chfn, chsh, newgrp, pg) - for now remove procps dependency which is only needed for tests because it pulls systemd Note the util-linux bash completions are incompatible to the installed binaries from the shadow package. We could use the completions from bash-completion package or we could switch to the binaries from util-linux. They seem to have more features and being backward compatible. I've reverted the previous procps fix. It was not mwerged to Factory yet. (forwarded request 448848 from rudi_m) OBS-URL: https://build.opensuse.org/request/show/448913 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=215 --- make-sure-sbin-resp-usr-sbin-are-in-PATH.diff | 10 +- python-libmount.changes | 297 ++++++++++-------- python-libmount.spec | 30 +- util-linux-2.28.2.tar.sign | 17 - util-linux-2.28.2.tar.xz | 3 - util-linux-2.29.tar.sign | 17 + util-linux-2.29.tar.xz | 3 + util-linux-systemd.changes | 297 ++++++++++-------- util-linux-systemd.spec | 30 +- util-linux.changes | 297 ++++++++++-------- util-linux.spec | 30 +- 11 files changed, 574 insertions(+), 457 deletions(-) delete mode 100644 util-linux-2.28.2.tar.sign delete mode 100644 util-linux-2.28.2.tar.xz create mode 100644 util-linux-2.29.tar.sign create mode 100644 util-linux-2.29.tar.xz diff --git a/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff b/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff index 249c5f6..3fb223c 100644 --- a/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff +++ b/make-sure-sbin-resp-usr-sbin-are-in-PATH.diff @@ -1,7 +1,7 @@ ---- util-linux-2.23.1/login-utils/su-common.c -+++ util-linux-2.23.1/login-utils/su-common.c 2013-06-06 08:46:59.575872090 +0000 -@@ -473,6 +473,117 @@ set_path(const struct passwd* pw) - err (EXIT_FAILURE, _("failed to set PATH")); +--- a/login-utils/su-common.c ++++ b/login-utils/su-common.c +@@ -523,6 +523,117 @@ set_path(const struct passwd* pw) + err (EXIT_FAILURE, _("failed to set the %s environment variable"), "PATH"); } +/* Add or clear /sbin and /usr/sbin for the su command @@ -118,7 +118,7 @@ /* Update `environ' for the new shell based on PW, with SHELL being the value for the SHELL environment variable. */ -@@ -508,6 +619,22 @@ modify_environment (const struct passwd +@@ -560,6 +671,22 @@ modify_environment (const struct passwd *pw, const char *shell) xsetenv ("SHELL", shell, 1); if (getlogindefs_bool ("ALWAYS_SET_PATH", 0)) set_path(pw); diff --git a/python-libmount.changes b/python-libmount.changes index 71bcb84..ea48eb4 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,50 @@ +------------------------------------------------------------------- +Thu Jan 5 12:34:33 UTC 2017 - sweet_f_a@gmx.de + +- don't install bash-completions for uninstalled binaries (chfn, + chsh, newgrp, pg) +- for now remove procps dependency which is only needed for tests + because it pulls systemd + +------------------------------------------------------------------- +Thu Dec 15 09:26:01 UTC 2016 - fbui@suse.com + +- Replace pkgconfig(libsystemd-*) with pkgconfig(libsystemd) + + libsystemd-* libs were deprecated and are gone now. + +------------------------------------------------------------------- +Wed Dec 7 16:12:55 CET 2016 - sbrabec@suse.com + +- Remove no more supported --enable-libmount-force-mountinfo. + There is --enable-libmount-support-mtab, disabled by default, + exactly as we need. + +------------------------------------------------------------------- +Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de + +- Update to version 2.29 + * cal: possible to specify month by name (e.g. "cal January + 2017") and use relative placeholders (cal "+1 month") + * fdisk(8) allows to wipe newly created partitions; the feature + is possible to control by new command line option + --wipe-partitions[==auto|never|default]. + * findmnt --verify: the command scans /etc/fstab and tries to + verify the configuration. + * mount(8) now rejects requests to create another device and + mount filesystem for the same backing file. The command + `losetup --nooverlap` reuses loop device if already exists + for the same backing file. All the functionality calculate + with offset and sizelimit options of course, so it's fine to + have multiple regions (partitions) in the same image file and + mount all of them in the same time. The restriction is that + the regions should not overlap. + * lscpu supports the "drawer" topology for IBM S/390. + * More details at: + http://karelzak.blogspot.de/2016/10/util-linux-v229-whats-new.html + https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes +- refresh make-sure-sbin-resp-usr-sbin-are-in-PATH.diff + ------------------------------------------------------------------- Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de @@ -62,7 +109,7 @@ Wed Apr 13 21:29:00 UTC 2016 - sweet_f_a@gmx.de - fix build for openSUSE >= 13.1 (inclusive SLE 12) - drop build for openSUSE < 13.1 -- remove old build conditions: sysvinit_tools, enable_su and +- remove old build conditions: sysvinit_tools, enable_su and enable_eject - cosmetics: reorder configure options @@ -194,7 +241,7 @@ Fri Mar 13 15:57:56 UTC 2015 - sweet_f_a@gmx.de * cal(1): do not segfault when TERM is not defined or wrong (bnc#903440) * logger(1): major fixes and enhancements - * agetty(8): support /usr/lib/os-release too + * agetty(8): support /usr/lib/os-release too * some more fixes, mostly minor ones, see ReleaseNotes - re-enable fixed tests (fdisk/bsd, ppc64le) @@ -242,7 +289,7 @@ Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz ------------------------------------------------------------------- Sun Feb 22 17:15:41 UTC 2015 - crrodriguez@opensuse.org -- Build with FULL RELRO. +- Build with FULL RELRO. ------------------------------------------------------------------- Tue Feb 10 15:26:55 UTC 2015 - sweet_f_a@gmx.de @@ -440,7 +487,7 @@ Fri May 16 15:10:53 UTC 2014 - sweet_f_a@gmx.de Thu May 8 08:15:04 UTC 2014 - werner@suse.de - Modify patch support-other-tty-lines-not-vconsole.patch to - make it work on virtual console + make it work on virtual console - Modify patch agetty-on-s390-on-dev-3270-tty1-line.patch to add the missed 3270 support upstream @@ -448,7 +495,7 @@ Thu May 8 08:15:04 UTC 2014 - werner@suse.de Wed May 7 14:12:32 UTC 2014 - werner@suse.de - Add patch support-other-tty-lines-not-vconsole.patch - to be able to support console lines like xvc and hvc + to be able to support console lines like xvc and hvc ------------------------------------------------------------------- Thu Apr 24 11:33:36 UTC 2014 - sweet_f_a@gmx.de @@ -661,7 +708,7 @@ Mon Mar 17 22:36:58 CET 2014 - sbrabec@suse.cz ------------------------------------------------------------------- Thu Mar 6 09:43:34 UTC 2014 - werner@suse.de -- Modify the patches +- Modify the patches agetty-fooled-on-serial-line-due-plymouth.patch sulogin-fooled-on-tty-line-due-plymouth.patch to be able to disable plymouth if not already terminated due to @@ -672,7 +719,7 @@ Sun Feb 9 21:20:31 UTC 2014 - andreas.stieger@gmx.de - util-linux 2.24.1 - agetty: - * support the special terminal on first serial line on a S/390 + * support the special terminal on first serial line on a S/390 - blkdiscard: * BLKSSZGET fills in an int, not a uint64 - blkid: @@ -806,14 +853,14 @@ Tue Feb 4 10:24:02 UTC 2014 - werner@suse.de - Modify patch agetty-on-s390-on-dev--3270-tty1-line.patch and patch tty3270-on-serial-line-of-s390.patch to handle 3270 - terminals + terminals - Really do not verify /usr/bin/eject ------------------------------------------------------------------- Mon Feb 3 16:16:36 UTC 2014 - werner@suse.de - Add patch agetty-on-s390-on-dev--3270-tty1-line.patch - to let agetty detect /dev/3270/tty1 as device not as baud rate + to let agetty detect /dev/3270/tty1 as device not as baud rate ------------------------------------------------------------------- Tue Jan 28 09:37:57 UTC 2014 - speilicke@suse.com @@ -918,7 +965,7 @@ Tue Dec 10 16:10:27 UTC 2013 - sweet_f_a@gmx.de ------------------------------------------------------------------- Fri Nov 29 13:46:21 UTC 2013 - werner@suse.de -- Add patch +- Add patch tty3270-on-serial-line-of-s390.patch to better support the first and second serial line on s390/x @@ -959,7 +1006,7 @@ Fri Sep 27 16:58:40 UTC 2013 - mgorse@suse.com ------------------------------------------------------------------- Fri Sep 13 07:06:19 UTC 2013 - werner@suse.de -- Avoid build require gpg-offline twice +- Avoid build require gpg-offline twice ------------------------------------------------------------------- Wed Sep 11 20:54:24 CEST 2013 - sbrabec@suse.cz @@ -1102,7 +1149,7 @@ Wed Jun 5 12:30:45 UTC 2013 - werner@suse.de + Release highlights (2.22) su(1): * has been merged from coreutils into util-linux - * utils-linux version uses /etc/pam.d/su-l PAM config file for --login + * utils-linux version uses /etc/pam.d/su-l PAM config file for --login (e.g. "su -") session. sulogin(8): * has been merged from sysvinit into util-linux @@ -1112,12 +1159,12 @@ Wed Jun 5 12:30:45 UTC 2013 - werner@suse.de * has been merged from inactive upstream from sf.net and Fedora into util-linux * supports new options --manualeject, --force and --no-partitions-unmount lslocks(1) - * this NEW COMMAND prints local system locks and it's replacement to very + * this NEW COMMAND prints local system locks and it's replacement to very long time unmaintained lslk(1) wdctl(8): * this NEW COMMAND shows hardware watchdog status libuuid: - * does NOT EXECUTE uuidd on demand, the daemon has to be started by + * does NOT EXECUTE uuidd on demand, the daemon has to be started by init scripts / systemd uuidd: * supports socket activation (for systemd) @@ -1173,7 +1220,7 @@ Sat Feb 16 17:48:29 UTC 2013 - schwab@suse.de Tue Feb 5 14:32:49 UTC 2013 - crrodriguez@opensuse.org - 0001-Test-for-secure_getenv-too.patch: - Current glibc in 12.3/factory no longer exports internal + Current glibc in 12.3/factory no longer exports internal function __secure_getenv() but has secure_getenv() instead. ------------------------------------------------------------------- @@ -1188,7 +1235,7 @@ Mon Jan 7 13:26:15 UTC 2013 - puzel@suse.com ------------------------------------------------------------------- Fri Dec 28 04:30:58 UTC 2012 - crrodriguez@opensuse.org -- 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch +- 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch Use OS byteswapping macros, this patch is functionally identical to the version submitted upstream with the exception it excludes code that target non-linux systems. @@ -1203,7 +1250,7 @@ Wed Sep 19 19:41:10 UTC 2012 - jslaby@suse.com Fri Jun 22 09:37:20 CEST 2012 - kukuk@suse.de - Remove pam_lastlog from login.pamd, login is doing it itself. - [bnc#768067] + [bnc#768067] ------------------------------------------------------------------- Wed Jun 20 09:22:50 UTC 2012 - lnussel@suse.de @@ -1240,13 +1287,13 @@ Thu May 31 10:04:23 UTC 2012 - sweet_f_a@gmx.de - require binutils-devel because "which" wants to find libiberty.a - remove which-lib64.patch because it's broken and couldn't find - libiberty.a whithin /usr/lib64 + libiberty.a whithin /usr/lib64 - which doesn't need autoreconf anymore ------------------------------------------------------------------- Tue May 29 09:28:55 UTC 2012 - puzel@suse.com -- switch to new libmount-based mount(8) +- switch to new libmount-based mount(8) ------------------------------------------------------------------- Fri May 25 12:12:09 UTC 2012 - puzel@suse.com @@ -1259,7 +1306,7 @@ Fri May 25 12:12:09 UTC 2012 - puzel@suse.com ------------------------------------------------------------------- Fri May 25 12:03:07 UTC 2012 - puzel@suse.com -- build with RPM_OPT_FLAGS again (removed by mistake) +- build with RPM_OPT_FLAGS again (removed by mistake) ------------------------------------------------------------------- Thu Apr 12 09:09:05 UTC 2012 - puzel@suse.com @@ -1325,7 +1372,7 @@ Tue Feb 21 13:46:25 UTC 2012 - puzel@suse.com --online to list all, offline or online CPUs - supports s390 topology description (polarization, books, ...) partx(8): - - supports partitioned loop devices + - supports partitioned loop devices wipefs(8): - allows to zap partition tables - supports new command line option "--type " to wipe only @@ -1377,7 +1424,7 @@ Wed Nov 9 08:27:17 UTC 2011 - puzel@suse.com ------------------------------------------------------------------- Tue Nov 8 09:36:41 UTC 2011 - puzel@suse.com -- add fsck-use-FS-blacklist-for-non-all-mode-too.patch (bnc#728645) +- add fsck-use-FS-blacklist-for-non-all-mode-too.patch (bnc#728645) ------------------------------------------------------------------- Wed Nov 2 09:37:12 UTC 2011 - puzel@suse.com @@ -1388,7 +1435,7 @@ Wed Nov 2 09:37:12 UTC 2011 - puzel@suse.com ------------------------------------------------------------------- Thu Oct 20 13:01:22 UTC 2011 - puzel@suse.com -- update to util-linux-2.20.1 +- update to util-linux-2.20.1 - bugfix release - drop patches (in upstream): - util-linux-sfdisk-manpage-fix.patch @@ -1398,7 +1445,7 @@ Thu Oct 20 13:01:22 UTC 2011 - puzel@suse.com ------------------------------------------------------------------- Wed Oct 12 09:26:40 UTC 2011 - puzel@suse.com -- add fdisk-dont-shorten-long-path-to-disk.patch (bnc#722959) +- add fdisk-dont-shorten-long-path-to-disk.patch (bnc#722959) ------------------------------------------------------------------- Tue Oct 4 11:32:11 UTC 2011 - uli@suse.com @@ -1411,12 +1458,12 @@ Tue Oct 4 11:32:11 UTC 2011 - uli@suse.com ------------------------------------------------------------------- Tue Sep 13 09:10:43 UTC 2011 - puzel@suse.com -- add util-linux-lib-sysfs-deinit.patch (bnc#714151) +- add util-linux-lib-sysfs-deinit.patch (bnc#714151) ------------------------------------------------------------------- Mon Aug 29 14:57:57 UTC 2011 - puzel@suse.com -- update to util-linux-2.20 +- update to util-linux-2.20 - cleanups, bugfixes - build with --enable-ddate - add util-linux-sfdisk-manpage-fix.patch @@ -1429,7 +1476,7 @@ Thu Aug 25 14:12:15 UTC 2011 - rguenther@novell.com ------------------------------------------------------------------- Wed Aug 17 10:37:20 UTC 2011 - puzel@novell.com -- update to util-linux-2.20-rc2 +- update to util-linux-2.20-rc2 - bugfixes - drop patches: - util-linux-fix-manpages.patch @@ -1441,22 +1488,22 @@ Wed Aug 17 10:37:20 UTC 2011 - puzel@novell.com ------------------------------------------------------------------- Wed Aug 10 13:42:33 UTC 2011 - puzel@novell.com -- add util-linux-2.20-rc1-hexdump-segfault.patch (bnc#710877) +- add util-linux-2.20-rc1-hexdump-segfault.patch (bnc#710877) ------------------------------------------------------------------- Wed Aug 10 12:20:41 UTC 2011 - puzel@novell.com -- add util-linux-2.20-rc-fix-dmesg.patch (bnc#710417) +- add util-linux-2.20-rc-fix-dmesg.patch (bnc#710417) ------------------------------------------------------------------- Wed Aug 10 11:06:15 UTC 2011 - puzel@novell.com -- add util-linux-2.20-rc1-agetty-fixes.patch (bnc#711240) +- add util-linux-2.20-rc1-agetty-fixes.patch (bnc#711240) ------------------------------------------------------------------- Mon Aug 1 13:44:21 UTC 2011 - puzel@novell.com -- update to util-linux-2.20-rc1 +- update to util-linux-2.20-rc1 - Release highlights agetty(8): - mingetty features have been merged to agetty @@ -1486,7 +1533,7 @@ Mon Aug 1 13:44:21 UTC 2011 - puzel@novell.com - supports real-time signals in formats RT, RTMIN+ and RTMAX- lsblk(8): - - supports new columns + - supports new columns - supports new command line option "-D" to print device discard topology lscpu(8): @@ -1508,7 +1555,7 @@ Tue May 3 09:39:37 UTC 2011 - puzel@novell.com - update to util-linux-2.19.1 - numerous bugfixes, including (bnc#690486 and bnc#690488) - drop umount-by-imgname.patch (merged upstream) -- cleanup: do not register ipc.info.gz (not provided by +- cleanup: do not register ipc.info.gz (not provided by this package) ------------------------------------------------------------------- @@ -1520,12 +1567,12 @@ Thu Apr 14 16:27:27 UTC 2011 - puzel@novell.com ------------------------------------------------------------------- Mon Feb 21 16:28:38 UTC 2011 - puzel@novell.com -- add umount-by-imgname.patch (bnc#666161) +- add umount-by-imgname.patch (bnc#666161) ------------------------------------------------------------------- Thu Feb 10 11:01:40 UTC 2011 - puzel@novell.com -- update to util-linux-2.19 +- update to util-linux-2.19 - uuid fixes - cleanups, documentation and translation updates - drop util-linux-2.19-rc1-loop-offset.diff (fixed in upstream, by @@ -1556,7 +1603,7 @@ Tue Jan 18 09:47:11 UTC 2011 - bwiedemann@novell.com ------------------------------------------------------------------- Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com -- update to util-linux-2.19-rc1 +- update to util-linux-2.19-rc1 - important changes: * lsblk(8): - this NEW COMMAND lists information about all or selected block @@ -1585,7 +1632,7 @@ Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com * fsck(8): - supports new command line option "-l" to lock whole-disk device by exclusive flock(2). This option is recommended when more - fsck(8) instances are executed in the same time. + fsck(8) instances are executed in the same time. * rtcwake(8): - supports new mode "show" to print the current RTC alarm time * fstrim(8): @@ -1600,7 +1647,7 @@ Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com - util-linux-agetty-s-option.patch - util-linux-fsck-l-option.patch - util-linux-2.18-no-canonicalize-fix.patch - - util-linux-swapon-canonicalize-swap-device.patch + - util-linux-swapon-canonicalize-swap-device.patch - fix uuidd Summary and Description - build with --enable-libmount-mount (new option) - use set_permissions macros @@ -1626,12 +1673,12 @@ Thu Dec 2 15:23:36 CET 2010 - mszeredi@suse.cz ------------------------------------------------------------------- Tue Nov 30 12:19:53 UTC 2010 - puzel@novell.com -- update util-linux-2.17.1-mount_losetup_crypto.patch (bnc#655804) +- update util-linux-2.17.1-mount_losetup_crypto.patch (bnc#655804) ------------------------------------------------------------------- Fri Nov 26 19:10:27 CET 2010 - kay.sievers@novell.com -- add Provides: fsck-with-dev-lock +- add Provides: fsck-with-dev-lock ------------------------------------------------------------------- Thu Nov 25 13:37:43 CET 2010 - kay.sievers@novell.com @@ -1641,7 +1688,7 @@ Thu Nov 25 13:37:43 CET 2010 - kay.sievers@novell.com ------------------------------------------------------------------- Tue Nov 16 16:08:48 UTC 2010 - cristian.rodriguez@opensuse.org -- disable silent rules +- disable silent rules ------------------------------------------------------------------- Thu Nov 11 10:36:35 CET 2010 - kay.sievers@novell.com @@ -1667,7 +1714,7 @@ Fri Jul 9 06:23:27 UTC 2010 - puzel@novell.com - full release notes: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes - update to adjtimex-1.28 -- update to which-2.20 +- update to which-2.20 - drop util-linux-2.14.1-mount_skip_sync.patch (fixed upstream) - drop util-linux-addpart-use-atoll.patch (fixed upstream) - drop util-linux-mount-detect-ro-mount.patch (fixed upstream) @@ -1692,24 +1739,24 @@ Tue Jun 22 16:48:29 UTC 2010 - bg@novell.com ------------------------------------------------------------------- Tue Jun 1 14:23:23 UTC 2010 - puzel@novell.com -- do not run uuidd as root, but uuidd:uuidd (bnc#604168) +- do not run uuidd as root, but uuidd:uuidd (bnc#604168) ------------------------------------------------------------------- Fri May 28 13:24:43 UTC 2010 - puzel@novell.com -- add util-linux-mount-detect-ro-mount.patch (bnc#481123) +- add util-linux-mount-detect-ro-mount.patch (bnc#481123) ------------------------------------------------------------------- Tue May 11 13:58:49 UTC 2010 - puzel@novell.com -- add util-linux-addpart-use-atoll.patch (bnc#603328) +- add util-linux-addpart-use-atoll.patch (bnc#603328) ------------------------------------------------------------------- Tue Apr 6 13:22:37 UTC 2010 - hvogel@novell.com - update to version 2.17.2 - fix small typo in v2.17.1-ReleaseNotes - - fix -b fdisk + - fix -b fdisk - fix typo in ionice - fix display of device size, fix infinite loop when probe chain bails out early, more robust minix probing, remove "0x" prefix @@ -1721,7 +1768,7 @@ Tue Apr 6 13:22:37 UTC 2010 - hvogel@novell.com /etc/filesystems in mount - update ja.po, pl.po, update vi.po - remove " (deleted)" from filenames from /proc/swaps - - cleanup usage() and man page of wipefs + - cleanup usage() and man page of wipefs ------------------------------------------------------------------- Wed Mar 10 23:11:42 CET 2010 - jeffm@suse.de @@ -1770,7 +1817,7 @@ Sun Nov 15 14:04:48 CET 2009 - meissner@suse.de ------------------------------------------------------------------- Mon Oct 26 17:45:53 UTC 2009 - crrodriguez@opensuse.org -- fsck during boot up fails with Too many open files [bnc#503008] +- fsck during boot up fails with Too many open files [bnc#503008] ------------------------------------------------------------------- Tue Oct 20 12:14:24 CEST 2009 - dmueller@suse.de @@ -1787,7 +1834,7 @@ Tue Sep 29 12:58:37 UTC 2009 - hvogel@novell.com - finaly remove the mount mtab locking patch: * util-linux-2.14.1-mount_race.patch - It causes too much regressions. + It causes too much regressions. ------------------------------------------------------------------- Mon Jul 13 14:21:07 CEST 2009 - kay.sievers@novell.com @@ -1837,7 +1884,7 @@ Thu Apr 16 14:55:22 CEST 2009 - werner@suse.de Mon Feb 16 12:35:00 CET 2009 - mkoenig@suse.de - remove util-linux-2.14.1-fdisk_cylinder.patch - fixed upstream + fixed upstream ------------------------------------------------------------------- Thu Feb 12 17:12:28 CET 2009 - mkoenig@suse.de @@ -1886,13 +1933,13 @@ Sat Feb 7 18:28:58 CET 2009 - schwab@suse.de Wed Jan 7 15:42:38 CET 2009 - mkoenig@suse.de - fix locking problem for external mount helpers when type - is not given [bnc#459839] + is not given [bnc#459839] ------------------------------------------------------------------- Tue Dec 2 12:23:37 CET 2008 - mkoenig@suse.de - raw: do not stat the raw devices when binding, since they - are created dynamically [bnc#450675] + are created dynamically [bnc#450675] ------------------------------------------------------------------- Thu Nov 27 01:27:19 CET 2008 - dmueller@suse.de @@ -1903,7 +1950,7 @@ Thu Nov 27 01:27:19 CET 2008 - dmueller@suse.de ------------------------------------------------------------------- Mon Nov 24 15:24:11 CET 2008 - mkoenig@suse.de -- mount: fix locking patch to not break -n [bnc#447937] +- mount: fix locking patch to not break -n [bnc#447937] ------------------------------------------------------------------- Thu Nov 20 18:08:33 CET 2008 - mkoenig@suse.de @@ -1921,7 +1968,7 @@ Fri Nov 7 14:50:00 CET 2008 - mkoenig@suse.de - fdisk: support +cylinder notation [bnc#441871] - check for EACCES when using ro fallback when loop mounting - a readonly image + a readonly image - fix uninitialized variable in swapon pagesize detection ------------------------------------------------------------------- @@ -1950,7 +1997,7 @@ Wed Sep 24 11:28:07 CEST 2008 - mkoenig@suse.de - add new tool /bin/hypervisor for x86, x86_64 from Ky Srinivasan - to detect the presence of a hypervisor [fate#303051] + to detect the presence of a hypervisor [fate#303051] ------------------------------------------------------------------- Wed Sep 10 15:58:52 CEST 2008 - mkoenig@suse.de @@ -1968,7 +2015,7 @@ Wed Sep 10 15:58:52 CEST 2008 - mkoenig@suse.de ------------------------------------------------------------------- Wed Aug 20 15:20:06 CEST 2008 - mkoenig@suse.de -- enable SELinux support [fate#303662] +- enable SELinux support [fate#303662] ------------------------------------------------------------------- Mon Aug 18 18:13:10 CEST 2008 - mrueckert@suse.de @@ -1978,7 +2025,7 @@ Mon Aug 18 18:13:10 CEST 2008 - mrueckert@suse.de ------------------------------------------------------------------- Mon Aug 18 12:36:39 CEST 2008 - mkoenig@suse.de -- raw: fix init script tags +- raw: fix init script tags ------------------------------------------------------------------- Mon Jul 7 15:13:24 CEST 2008 - mkoenig@suse.de @@ -1987,7 +2034,7 @@ Mon Jul 7 15:13:24 CEST 2008 - mkoenig@suse.de * Upgraded code from bash to version 3.2. This DOES has influence on how Which behaves under certain circumstances. * When the environment variable HOME is not set, the home directory - is now read from /etc/passwd or set to '/' if no home directory + is now read from /etc/passwd or set to '/' if no home directory could be found (this now matches the tilde lib used in bash) * Changed the license to GPLv3 * Add support for shells that output '{' on the same line as the @@ -1999,7 +2046,7 @@ Wed Jul 2 15:47:08 CEST 2008 - mkoenig@suse.de - replace util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch with upstream version - util-linux-2.14-loop_autoclear.patch + util-linux-2.14-loop_autoclear.patch ------------------------------------------------------------------- Fri Jun 27 17:05:46 CEST 2008 - schwab@suse.de @@ -2009,7 +2056,7 @@ Fri Jun 27 17:05:46 CEST 2008 - schwab@suse.de ------------------------------------------------------------------- Wed Jun 25 14:26:49 CEST 2008 - mkoenig@suse.de -- update to version 2.14 +- update to version 2.14 most important changes: * new command ldattach mount: @@ -2059,18 +2106,18 @@ Sun Mar 23 11:13:13 CET 2008 - coolo@suse.de ------------------------------------------------------------------- Wed Feb 13 10:21:42 CET 2008 - bg@suse.de -- don't try to package parisc*.8 manual pages +- don't try to package parisc*.8 manual pages ------------------------------------------------------------------- Mon Feb 11 17:49:04 CET 2008 - mkoenig@suse.de - update to version 2.13.1 again -- fix broken util-linux-2.13.1-getfs_fix.patch +- fix broken util-linux-2.13.1-getfs_fix.patch ------------------------------------------------------------------- Sun Feb 10 18:11:07 CET 2008 - lrupp@suse.de -- revert to 2.13.0.1+git20071121 +- revert to 2.13.0.1+git20071121 breaks current 'mount' call in Buildservice ------------------------------------------------------------------- @@ -2093,7 +2140,7 @@ Thu Feb 7 12:41:25 CET 2008 - mkoenig@suse.de - mount: fix problem with device canonicalization when using persistent name in fstab but call mount with real bd name - patches merged: - util-linux-2.13-mount_fd_leak.patch + util-linux-2.13-mount_fd_leak.patch ------------------------------------------------------------------- Tue Dec 18 15:55:19 CET 2007 - mkoenig@suse.de @@ -2104,7 +2151,7 @@ Tue Dec 18 15:55:19 CET 2007 - mkoenig@suse.de ------------------------------------------------------------------- Mon Dec 3 11:03:57 CET 2007 - ro@suse.de -- remove "arch", in coreutils now +- remove "arch", in coreutils now ------------------------------------------------------------------- Thu Nov 29 17:51:17 CET 2007 - lnussel@suse.de @@ -2127,16 +2174,16 @@ Wed Nov 21 13:43:31 CET 2007 - mkoenig@suse.de ------------------------------------------------------------------- Tue Nov 20 17:49:35 CET 2007 - mkoenig@suse.de -- fix raw path in init script +- fix raw path in init script ------------------------------------------------------------------- Tue Nov 6 16:11:02 CET 2007 - mkoenig@suse.de - update to 2.13.0.1+git20071106 -- prevent loop mounting the same file twice [#240653] +- prevent loop mounting the same file twice [#240653] - merged upstream: util-linux-2.13-mount_helper_fix.patch - util-linux-2.13-hwclock_rtc_option.patch + util-linux-2.13-hwclock_rtc_option.patch ------------------------------------------------------------------- Thu Oct 4 22:24:04 CEST 2007 - bg@suse.de @@ -2152,7 +2199,7 @@ Mon Oct 1 17:08:06 CEST 2007 - mkoenig@suse.de util-linux-2.13-loop.patch util-linux-2.13-mount_create_mtab.patch util-linux-2.13-schedutils_error_handling.patch - util-linux-2.13-sys_utils_build_rdev_x86_64.patch + util-linux-2.13-sys_utils_build_rdev_x86_64.patch - fix hwclock --rtc option [#326106] - fix setuid/setgid mixup and error checking [#327022] @@ -2160,12 +2207,12 @@ Mon Oct 1 17:08:06 CEST 2007 - mkoenig@suse.de Fri Sep 14 11:24:33 CEST 2007 - mkoenig@suse.de - link cfdisk against libncursesw instead libncurses to fix - broken utf-8 characters [#307353] + broken utf-8 characters [#307353] ------------------------------------------------------------------- Wed Aug 29 12:22:21 CEST 2007 - mkoenig@suse.de -- fix fd leaks in previous patch +- fix fd leaks in previous patch ------------------------------------------------------------------- Tue Aug 28 16:42:04 CEST 2007 - lnussel@suse.de @@ -2177,20 +2224,20 @@ Tue Aug 28 16:42:04 CEST 2007 - lnussel@suse.de Fri Aug 24 14:09:19 CEST 2007 - mkoenig@suse.de - avoid duplicates of root fs if defined with LABEL in fstab - [#297959] + [#297959] - fix ionice error handling [#301675] ------------------------------------------------------------------- Thu Aug 16 18:34:30 CEST 2007 - ssommer@suse.de -- free loop devices when mount fails [#297172] +- free loop devices when mount fails [#297172] ------------------------------------------------------------------- Wed Jul 25 18:43:42 CEST 2007 - mkoenig@suse.de - update to git20070725 - removed patches (merged upstream): - util-linux-2.12r-mount_mount.8_xfs_update.patch + util-linux-2.12r-mount_mount.8_xfs_update.patch util-linux-2.12r-sys_utils_readprofile_mapfile.patch util-linux-2.12r-disk_utils_mkswap_fix.patch util-linux-2.13-schedutils_ionice_idle.patch @@ -2199,8 +2246,8 @@ Wed Jul 25 18:43:42 CEST 2007 - mkoenig@suse.de Tue Jul 17 10:44:18 CEST 2007 - mkoenig@suse.de - updated to version 2.13-rc2: - * add wakertc -- cleanup ionice usage [#270251] + * add wakertc +- cleanup ionice usage [#270251] - enable hwclock audit support [#280113] - removed patches (merged/fixed upstream) util-linux-login_utils_wall.patch @@ -2221,17 +2268,17 @@ Fri Jul 13 12:31:56 CEST 2007 - mkoenig@suse.de util-linux-2.11z-hwclock_geteuid.patch it is intentional that suid hwclock capabilities are limited - removed patch (fixed upstream) - util-linux-2.12q-mount_--move.patch + util-linux-2.12q-mount_--move.patch ------------------------------------------------------------------- Mon Jul 9 11:34:33 CEST 2007 - mkoenig@suse.de -- add libuuid-devel to BuildRequires to let mkswap use UUIDs +- add libuuid-devel to BuildRequires to let mkswap use UUIDs ------------------------------------------------------------------- Thu Jul 5 16:08:58 CEST 2007 - mkoenig@suse.de -- use %config(noreplace) for /etc/filesystems +- use %config(noreplace) for /etc/filesystems - Keep rdev stuff for x86_64 util-linux-2.13-sys_utils_build_rdev_x86_64.patch - removed patches (merged upstream) @@ -2264,21 +2311,21 @@ Thu Jun 21 14:50:58 CEST 2007 - mkoenig@suse.de ------------------------------------------------------------------- Thu Jun 14 10:52:25 CEST 2007 - mkoenig@suse.de -- mkzimage_cmdline: activate commandline if used with -s [#279935] +- mkzimage_cmdline: activate commandline if used with -s [#279935] ------------------------------------------------------------------- Wed Jun 13 12:33:59 CEST 2007 - mkoenig@suse.de - schedutils: let chrt accept pid 0 for current process and fix some documentation bugs [#266879] - util-linux-2.13-schedutils_chrt.patch + util-linux-2.13-schedutils_chrt.patch ------------------------------------------------------------------- Wed Jun 6 16:15:43 CEST 2007 - mkoenig@suse.de - update to git20070530 - removed patches - util-linux-2.13-mount_volume_id.patch + util-linux-2.13-mount_volume_id.patch util-linux-2.12r-mount_by_uuid.patch util-linux-2.13-build_gnu_source.patch - fix build with ncurses @@ -2323,7 +2370,7 @@ Mon Apr 23 16:49:00 CEST 2007 - mkoenig@suse.de - update to git20070412 - remove chkdupexe and scriptreplay to get rid of the - perl dependency [#265757] + perl dependency [#265757] util-linux-2.13-build_no_perl_dependency.patch - upstream integration of umount helper support [#252089] - merged patches: @@ -2341,9 +2388,9 @@ Tue Apr 10 17:25:34 CEST 2007 - mkoenig@suse.de - update to version git20070330 of new forked development tree - removed Suse crypto patches for losetup [FATE#302001] -- removed binaries: +- removed binaries: /bin/guessfstype - /sbin/sln + /sbin/sln /usr/bin/setfdprm - removed obsolete patches: * guessfstype2.patch @@ -2382,7 +2429,7 @@ Tue Apr 10 17:25:34 CEST 2007 - mkoenig@suse.de ------------------------------------------------------------------- Wed Apr 4 12:55:40 CEST 2007 - mkoenig@suse.de -- add Supplements line [FATE#301966] +- add Supplements line [FATE#301966] ------------------------------------------------------------------- Mon Mar 26 15:49:09 CEST 2007 - rguenther@suse.de @@ -2392,13 +2439,13 @@ Mon Mar 26 15:49:09 CEST 2007 - rguenther@suse.de ------------------------------------------------------------------- Thu Mar 15 17:24:34 CET 2007 - mkoenig@suse.de -- mount: Let swapon automatically reinitialize a suspended - swap partition [#254437] +- mount: Let swapon automatically reinitialize a suspended + swap partition [#254437] ------------------------------------------------------------------- Thu Mar 9 11:00:11 CET 2007 - mkoenig@suse.de -- mount: fix mtablock patch to avoid mtab corruption [#226783] +- mount: fix mtablock patch to avoid mtab corruption [#226783] ------------------------------------------------------------------- Thu Mar 8 17:27:22 CET 2007 - mkoenig@suse.de @@ -2413,8 +2460,8 @@ Wed Mar 7 16:58:08 CET 2007 - rguenther@suse.de ------------------------------------------------------------------- Tue Feb 27 10:58:46 CET 2007 - mkoenig@suse.de -- fix missing return code in - util-linux-2.12r-losetup_password.patch +- fix missing return code in + util-linux-2.12r-losetup_password.patch - mount: fix race condition in mount -o loop [#242750] ------------------------------------------------------------------- @@ -2430,7 +2477,7 @@ Fri Feb 2 13:27:31 CET 2007 - mkoenig@suse.de ------------------------------------------------------------------- Wed Jan 31 12:06:55 CET 2007 - mkoenig@suse.de -- let mkfs tools open with O_EXCL [#238687] +- let mkfs tools open with O_EXCL [#238687] ------------------------------------------------------------------- Tue Dec 12 11:04:07 CET 2006 - mkoenig@suse.de @@ -2451,14 +2498,14 @@ Tue Dec 5 18:13:32 CET 2006 - mkoenig@suse.de ------------------------------------------------------------------- Tue Nov 7 13:09:45 CET 2006 - mkoenig@suse.de -- enable partx [#214992] +- enable partx [#214992] ------------------------------------------------------------------- Tue Oct 10 18:17:42 CEST 2006 - mkoenig@suse.de - Round up partition end LBA to a cylinder boundary during add_partition() [#174892] -- Fix readprofile on ppc64 [#179122] +- Fix readprofile on ppc64 [#179122] - Fix cal formatting bug [#203469] ------------------------------------------------------------------- @@ -2470,7 +2517,7 @@ Mon Oct 9 12:27:33 CEST 2006 - mkoenig@suse.de ------------------------------------------------------------------- Mon Aug 21 12:10:01 CEST 2006 - mkoenig@suse.de -- Added sysfs to list of filesystems not to unmount with +- Added sysfs to list of filesystems not to unmount with umount -a, resolves #190385 ------------------------------------------------------------------- @@ -2571,14 +2618,14 @@ Wed Feb 1 03:58:58 CET 2006 - olh@suse.de ------------------------------------------------------------------- Wed Feb 1 02:20:17 CET 2006 - ro@suse.de -- fix typo in previous change, binary negation is "~" +- fix typo in previous change, binary negation is "~" ------------------------------------------------------------------- Fri Jan 27 13:02:36 CET 2006 - sscheler@suse.de -- fixed mount hotplug option (#143352). now we don't send the - MS_HOTPLUG flag to the kernel any longer, because the kernel - doesn't know this option (EINVAL) and actually doesn't need to +- fixed mount hotplug option (#143352). now we don't send the + MS_HOTPLUG flag to the kernel any longer, because the kernel + doesn't know this option (EINVAL) and actually doesn't need to know about it. ------------------------------------------------------------------- @@ -3222,7 +3269,7 @@ Mon Oct 13 21:44:43 CEST 2003 - kukuk@suse.de ------------------------------------------------------------------- Thu Oct 2 11:31:14 CEST 2003 - kukuk@suse.de -- Fix compiling with kernel 2.6.0-test6 header files +- Fix compiling with kernel 2.6.0-test6 header files ------------------------------------------------------------------- Tue Aug 12 15:27:20 CEST 2003 - mmj@suse.de @@ -3291,7 +3338,7 @@ Mon Mar 3 16:19:04 CET 2003 - mmj@suse.de ------------------------------------------------------------------- Mon Mar 3 12:27:01 CET 2003 - ro@suse.de -- add missing info dir entries +- add missing info dir entries ------------------------------------------------------------------- Tue Feb 18 14:29:45 CET 2003 - agruen@suse.de @@ -3323,7 +3370,7 @@ Fri Feb 7 01:30:53 CET 2003 - ro@suse.de ------------------------------------------------------------------- Tue Feb 4 22:34:10 CET 2003 - ro@suse.de -- don't package /bin/kill (part of coreutils now) +- don't package /bin/kill (part of coreutils now) ------------------------------------------------------------------- Tue Feb 4 12:40:00 CET 2003 - meissner@suse.de @@ -3383,7 +3430,7 @@ Wed Nov 27 11:01:52 CET 2002 - mmj@suse.de o fdisk,cfdisk: cosmetic fixes o mount,umount: fix LABEL= handling for non-root [#17322] o more: kill external help file - o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC + o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC fails (patch we had, now folded upstream) ------------------------------------------------------------------- @@ -3421,7 +3468,7 @@ Thu Oct 31 14:59:11 CET 2002 - mmj@suse.de ------------------------------------------------------------------- Thu Oct 31 00:40:09 CET 2002 - ro@suse.de -- hack time to build on alpha +- hack time to build on alpha ------------------------------------------------------------------- Tue Oct 22 16:13:36 CEST 2002 - mmj@suse.de @@ -3565,7 +3612,7 @@ Mon Jul 8 21:16:07 CEST 2002 - mmj@suse.de * fdformat: remove test on major * fdisk, hwclock and swap polishing * Lots of translations - * cramfs tools includes from the kernel + * cramfs tools includes from the kernel * swap{on,off} honours /proc/swaps * mount small fixups @@ -3648,7 +3695,7 @@ Mon Jan 28 13:59:26 CET 2002 - mmj@suse.de ------------------------------------------------------------------- Thu Jan 24 10:16:37 CET 2002 - ro@suse.de -- modified fillup_and_insserv call (perl-hack not needed here) +- modified fillup_and_insserv call (perl-hack not needed here) ------------------------------------------------------------------- Mon Jan 21 17:08:17 CET 2002 - mmj@suse.de @@ -3658,7 +3705,7 @@ Mon Jan 21 17:08:17 CET 2002 - mmj@suse.de ------------------------------------------------------------------- Thu Jan 10 14:18:21 CET 2002 - ro@suse.de -- removed ACTIVATE_RAW_DEV +- removed ACTIVATE_RAW_DEV ------------------------------------------------------------------- Mon Dec 31 19:05:45 UTC 2001 - adrian@suse.de @@ -3818,7 +3865,7 @@ Mon Feb 12 15:23:14 CET 2001 - kukuk@suse.de ------------------------------------------------------------------- Tue Feb 6 11:54:34 CET 2001 - ro@suse.de -- wall.c: include time.h +- wall.c: include time.h ------------------------------------------------------------------- Mon Feb 5 11:13:56 CET 2001 - kukuk@suse.de @@ -3837,14 +3884,14 @@ Fri Feb 2 12:18:56 CET 2001 - werner@suse.de ------------------------------------------------------------------- Thu Jan 25 00:37:22 CET 2001 - ro@suse.de -- added Provides: util +- added Provides: util ------------------------------------------------------------------- Fri Jan 12 10:08:29 MET 2001 - garloff@suse.de - Apply patch to lomount to allow all kerneli crypt algos to be passed and allow to pass passwd with -k. -- losetup seems to support >2GB files just fine (#5433) +- losetup seems to support >2GB files just fine (#5433) ------------------------------------------------------------------- Tue Jan 2 12:04:33 CET 2001 - kukuk@suse.de @@ -3864,9 +3911,9 @@ Tue Dec 5 11:24:34 CET 2000 - kukuk@suse.de ------------------------------------------------------------------- Tue Dec 5 11:10:10 CET 2000 - schwab@suse.de - + - Don't use _syscallX on ia64. - + ------------------------------------------------------------------- Mon Dec 4 09:27:28 CET 2000 - olh@suse.de @@ -3876,7 +3923,7 @@ Mon Dec 4 09:27:28 CET 2000 - olh@suse.de ------------------------------------------------------------------- Sun Dec 3 00:09:16 CET 2000 - olh@suse.de -- no segfaults with AIX disklabels +- no segfaults with AIX disklabels ------------------------------------------------------------------- Wed Nov 29 18:21:25 CET 2000 - uli@suse.de @@ -3937,7 +3984,7 @@ Wed Sep 27 11:30:21 CEST 2000 - kukuk@suse.de ------------------------------------------------------------------- Tue Sep 26 17:54:23 CEST 2000 - kukuk@suse.de -- Fix mount for new NFS kernel patch +- Fix mount for new NFS kernel patch ------------------------------------------------------------------- Sat Sep 9 17:36:24 CEST 2000 - kukuk@suse.de @@ -4040,7 +4087,7 @@ Thu Mar 9 21:25:15 CET 2000 - kukuk@suse.de ------------------------------------------------------------------- Tue Mar 7 17:23:57 CET 2000 - kukuk@suse.de -- etc/filesystems: Add minix and reiserfs +- etc/filesystems: Add minix and reiserfs ------------------------------------------------------------------- Tue Mar 7 11:49:23 CET 2000 - kukuk@suse.de @@ -4070,23 +4117,23 @@ Thu Feb 3 14:42:23 CET 2000 - kukuk@suse.de ------------------------------------------------------------------- Thu Feb 3 11:14:29 CET 2000 - kukuk@suse.de -- util-linux: Update to 2.10f (mount security fix) +- util-linux: Update to 2.10f (mount security fix) ------------------------------------------------------------------- Sun Jan 23 15:45:08 CET 2000 - kukuk@suse.de -- util-linux: Update to 2.10e +- util-linux: Update to 2.10e ------------------------------------------------------------------- Tue Jan 18 19:18:08 CET 2000 - kukuk@suse.de - mount now looks at first in /etc/filesystems and then in - /proc/filesystems + /proc/filesystems ------------------------------------------------------------------- Tue Jan 18 16:32:05 CET 2000 - ro@suse.de -- fixed pmac-utils to build with 2.3 as well +- fixed pmac-utils to build with 2.3 as well ------------------------------------------------------------------- Tue Jan 18 14:56:22 CET 2000 - kukuk@suse.de @@ -4099,7 +4146,7 @@ Mon Jan 17 18:23:56 CET 2000 - kukuk@suse.de - Fix setserial for Linux 2.3.40 - Remove write, is now in nkitb - Build minix and bfs tools for SPARC -- Fix some buffer overflows in fdisk +- Fix some buffer overflows in fdisk ------------------------------------------------------------------- Fri Dec 17 15:00:19 MET 1999 - kukuk@suse.de @@ -4121,7 +4168,7 @@ Tue Nov 30 17:49:27 MET 1999 - uli@suse.de ------------------------------------------------------------------- Mon Nov 15 12:39:41 MET 1999 - kukuk@suse.de -- util-linux: Update to 2.10b +- util-linux: Update to 2.10b ------------------------------------------------------------------- Sat Nov 13 15:36:37 MET 1999 - kukuk@suse.de @@ -4148,7 +4195,7 @@ Sat Oct 16 16:40:13 MEST 1999 - kukuk@suse.de ------------------------------------------------------------------- Fri Oct 8 10:58:48 MEST 1999 - kukuk@suse.de -- Update to util-linux-2.9y (execpt fdisk) +- Update to util-linux-2.9y (execpt fdisk) ------------------------------------------------------------------- Tue Sep 14 18:14:53 CEST 1999 - uli@suse.de @@ -4163,12 +4210,12 @@ Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de ------------------------------------------------------------------- Thu Aug 26 15:05:03 CEST 1999 - uli@suse.de -- disabled hayesesp for PPC +- disabled hayesesp for PPC ------------------------------------------------------------------- Wed Aug 25 18:04:35 MEST 1999 - kukuk@suse.de -- Don't install tsort, its now in textutils 2.0 +- Don't install tsort, its now in textutils 2.0 ------------------------------------------------------------------- Tue Aug 24 10:11:06 MEST 1999 - kukuk@suse.de @@ -4194,7 +4241,7 @@ Mon Jul 12 12:11:45 MEST 1999 - kukuk@suse.de ------------------------------------------------------------------- Tue Jul 6 12:23:47 MEST 1999 - kukuk@suse.de -- update to util-linux-2.9t +- update to util-linux-2.9t ------------------------------------------------------------------- Fri Jun 25 14:44:30 MEST 1999 - kukuk@suse.de diff --git a/python-libmount.spec b/python-libmount.spec index 6d8e837..e21be5f 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -1,7 +1,7 @@ # # spec file for package python-libmount # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -94,8 +94,7 @@ BuildRequires: librtas-devel %if %build_util_linux_systemd BuildRequires: socat BuildRequires: systemd-rpm-macros -BuildRequires: pkgconfig(libsystemd-daemon) -BuildRequires: pkgconfig(libsystemd-journal) +BuildRequires: pkgconfig(libsystemd) %endif %if %build_python_libmount BuildRequires: python-devel @@ -113,7 +112,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.28.2 +Version: 2.29 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -122,7 +121,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -132,7 +131,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -519,12 +518,11 @@ AUTOPOINT=true autoreconf -vfi --docdir=%{_docdir}/%{_name} \ --with-audit \ --with-gnu-ld \ - --with-ncurses \ + --with-ncursesw \ --with-selinux \ $uhead \ --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ --with-systemdsystemunitdir=%{_unitdir} \ - --enable-libmount-force-mountinfo \ --enable-libuuid-force-uuidd \ --enable-sulogin-emergency-mount \ --disable-use-tty-group \ @@ -532,6 +530,10 @@ AUTOPOINT=true autoreconf -vfi --disable-rpath \ --enable-all-programs \ --disable-reset \ + --disable-chfn-chsh \ + --disable-newgrp \ + --disable-vipw \ + --disable-pg \ %if %{without enable_last} --disable-last \ %endif @@ -570,6 +572,7 @@ export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" export TS_OPT_libfdisk_gpt_known_fail="yes" +export TS_OPT_misc_flock_known_fail="yes" export TS_OPT_misc_ionice_known_fail="yes" export TS_OPT_misc_swaplabel_known_fail="yes" export TS_OPT_kill_name_to_number_known_fail="yes" @@ -676,17 +679,6 @@ ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw mv %{buildroot}%{_docdir}/%{_name}/getopt %{buildroot}%{_datadir}/ # Stupid hack so we don't have a tcsh dependency chmod 644 %{buildroot}%{_datadir}/getopt/getopt*.tcsh -# Following files we don't want to package, so remove them -rm -f %{buildroot}%{_bindir}/pg -rm -f %{buildroot}%{_mandir}/man1/pg.1* -# Do not package these files to get rid of the perl dependency -rm -f %{buildroot}%{_bindir}/chkdupexe -rm -f %{buildroot}%{_mandir}/man1/chkdupexe.1 -# we use this tools from pwdutils -rm -f %{buildroot}%{_bindir}/{chfn,chsh,newgrp} -rm -f %{buildroot}%{_sbindir}/{vigr,vipw} -rm -f %{buildroot}%{_mandir}/man1/{chfn.1*,chsh.1*,newgrp.1*} -rm -f %{buildroot}%{_mandir}/man8/{vigr.8*,vipw.8*} # login is always and only in /bin mv %{buildroot}%{_bindir}/login %{buildroot}/bin/ # arch dependent diff --git a/util-linux-2.28.2.tar.sign b/util-linux-2.28.2.tar.sign deleted file mode 100644 index 816da3d..0000000 --- a/util-linux-2.28.2.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQIcBAABCAAGBQJX0ACaAAoJEOS3HV7sOcKEkCMP/2TEulMSidpCzZm/AxHcsshN -nhOZygZtjmjvVgOrPfQjNyuOOpd/lJn39hB9j3amq7fDkWZXcjYcKjYG5v1ex3ok -4Xgn0eH9uW3fIskldiFl0agYrIvkov75G8bEhLkluY8b66OwKmzRvd8CV5nQPfQk -9RNCdluw+0Qy5044+QX24Bro3QIGHyXHe5soRe5LYbqKsuEj48iCgi10ClkmkfAv -TnelecI4Ck0OcmLqq4jygDBgufR32XnHvBdjHyA7TqFE7fHdOAUZqhJ27OyDdg1b -ABfGPBjL/nLtLjjW5BDrrFaRB/5iJyRrAke7UH0N/Si+2xm2aP2yqhy3+vDTnzfA -gP/1HMg42w62JA3sF7Z/vbMF/qhLVS3jhR0mCNMr2IY9ClnDQfrh5y+XaBTsXPvS -aIv6aEHt02JFPOoKoImdaq2sq9krKkR2cabqd3kxfKLSo/6yw/K8ZZiOEMlNSWc0 -/tfYuk84hcGFwmHv+ESx3x/JG9XoUsxWmvW/1l6eLHKnJ2Q1CP+/uLml4BHQZTrH -LKSU37B/7l9UMWCq/sq9Wfbm6wDI0x8h637iCiSquCv/fzFFmYBtNqZaR4RVjyK9 -KJgqzv9OJCDk89VhvfbhfpAU2unF3UAE0ho6eOSNMDrubeEQNiEj4vDKo0HccMZo -2ulDt0G0OBm6U7aIYHRn -=15U5 ------END PGP SIGNATURE----- diff --git a/util-linux-2.28.2.tar.xz b/util-linux-2.28.2.tar.xz deleted file mode 100644 index 7b131bd..0000000 --- a/util-linux-2.28.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b89d37146f20bede93a42c847bce881a17e6dbd8066ff2db2bee733fa409f0cd -size 4149700 diff --git a/util-linux-2.29.tar.sign b/util-linux-2.29.tar.sign new file mode 100644 index 0000000..b17a572 --- /dev/null +++ b/util-linux-2.29.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCAAGBQJYIa+yAAoJEOS3HV7sOcKEkPEQAJ6qcx836hUP93e+q8lH7Anf +6odYlxYWC5Pgb8Qopn1KDMh5c3GAbPrnbSoVRKS3jvc24uZuhlCCwYnJbcmEt/+L +am+/zQyIF9T5ZwTadnGD2bkYXI5N9eS4R5O0N/OdBTgsVr9rjZ318zHg+8YCUZN0 +hCh4e1UlUC8uL7C/WgeLW/+kN+D+/1KJISDerkw+u5FFPZGWcPcYPh7ofi4ZyV/h +OPgvaEHt3/IxsZnuUNtIEVhFBpabjdwLkXm1LQ26XLnkdipBuuadVB8jaSLUz29J +rkNVI0iiH9vq5abE0wDIzQ2Lt4Lv65fQM7dmw/Ek188tZn9MyX8vT+C5Vyu+EFtU +K+1BwMVNqfW5hZHPM2z7izO/ml77wnydEFGy9GZZpLqQAzUGgsQDC3JbiczC7Qfq +bTFGhz32sHp/2gyOqciwhLPzWxD6jOLVG84vC9Obvtm+xQEfvLa71FnHdcLU3uZA +uZHt50WSuusZJtCWDhhLgfV6NV7c+YB1tELfrStlXAHyZT3Ws0pNPv+5Sue81dGt +uYVOOlXd+5qVpcgJRs5ai86yzv65kCeqmDsSAiHMIwPfFYBOeYessiRmWpqJXTt2 +S38j00fHFbNh5qqgDyso6myan4ZNLVIpihZLT2JLJqxEnf4ILZVV7krNW9p09teq +afEkNizqGL/NF2I7ltpe +=5e/s +-----END PGP SIGNATURE----- diff --git a/util-linux-2.29.tar.xz b/util-linux-2.29.tar.xz new file mode 100644 index 0000000..1107cb6 --- /dev/null +++ b/util-linux-2.29.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c59ea67cc7b564104f60532f6e0a95fe17a91acb870ba8fd7e986f273abf9e7 +size 4249020 diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 71bcb84..ea48eb4 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,50 @@ +------------------------------------------------------------------- +Thu Jan 5 12:34:33 UTC 2017 - sweet_f_a@gmx.de + +- don't install bash-completions for uninstalled binaries (chfn, + chsh, newgrp, pg) +- for now remove procps dependency which is only needed for tests + because it pulls systemd + +------------------------------------------------------------------- +Thu Dec 15 09:26:01 UTC 2016 - fbui@suse.com + +- Replace pkgconfig(libsystemd-*) with pkgconfig(libsystemd) + + libsystemd-* libs were deprecated and are gone now. + +------------------------------------------------------------------- +Wed Dec 7 16:12:55 CET 2016 - sbrabec@suse.com + +- Remove no more supported --enable-libmount-force-mountinfo. + There is --enable-libmount-support-mtab, disabled by default, + exactly as we need. + +------------------------------------------------------------------- +Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de + +- Update to version 2.29 + * cal: possible to specify month by name (e.g. "cal January + 2017") and use relative placeholders (cal "+1 month") + * fdisk(8) allows to wipe newly created partitions; the feature + is possible to control by new command line option + --wipe-partitions[==auto|never|default]. + * findmnt --verify: the command scans /etc/fstab and tries to + verify the configuration. + * mount(8) now rejects requests to create another device and + mount filesystem for the same backing file. The command + `losetup --nooverlap` reuses loop device if already exists + for the same backing file. All the functionality calculate + with offset and sizelimit options of course, so it's fine to + have multiple regions (partitions) in the same image file and + mount all of them in the same time. The restriction is that + the regions should not overlap. + * lscpu supports the "drawer" topology for IBM S/390. + * More details at: + http://karelzak.blogspot.de/2016/10/util-linux-v229-whats-new.html + https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes +- refresh make-sure-sbin-resp-usr-sbin-are-in-PATH.diff + ------------------------------------------------------------------- Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de @@ -62,7 +109,7 @@ Wed Apr 13 21:29:00 UTC 2016 - sweet_f_a@gmx.de - fix build for openSUSE >= 13.1 (inclusive SLE 12) - drop build for openSUSE < 13.1 -- remove old build conditions: sysvinit_tools, enable_su and +- remove old build conditions: sysvinit_tools, enable_su and enable_eject - cosmetics: reorder configure options @@ -194,7 +241,7 @@ Fri Mar 13 15:57:56 UTC 2015 - sweet_f_a@gmx.de * cal(1): do not segfault when TERM is not defined or wrong (bnc#903440) * logger(1): major fixes and enhancements - * agetty(8): support /usr/lib/os-release too + * agetty(8): support /usr/lib/os-release too * some more fixes, mostly minor ones, see ReleaseNotes - re-enable fixed tests (fdisk/bsd, ppc64le) @@ -242,7 +289,7 @@ Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz ------------------------------------------------------------------- Sun Feb 22 17:15:41 UTC 2015 - crrodriguez@opensuse.org -- Build with FULL RELRO. +- Build with FULL RELRO. ------------------------------------------------------------------- Tue Feb 10 15:26:55 UTC 2015 - sweet_f_a@gmx.de @@ -440,7 +487,7 @@ Fri May 16 15:10:53 UTC 2014 - sweet_f_a@gmx.de Thu May 8 08:15:04 UTC 2014 - werner@suse.de - Modify patch support-other-tty-lines-not-vconsole.patch to - make it work on virtual console + make it work on virtual console - Modify patch agetty-on-s390-on-dev-3270-tty1-line.patch to add the missed 3270 support upstream @@ -448,7 +495,7 @@ Thu May 8 08:15:04 UTC 2014 - werner@suse.de Wed May 7 14:12:32 UTC 2014 - werner@suse.de - Add patch support-other-tty-lines-not-vconsole.patch - to be able to support console lines like xvc and hvc + to be able to support console lines like xvc and hvc ------------------------------------------------------------------- Thu Apr 24 11:33:36 UTC 2014 - sweet_f_a@gmx.de @@ -661,7 +708,7 @@ Mon Mar 17 22:36:58 CET 2014 - sbrabec@suse.cz ------------------------------------------------------------------- Thu Mar 6 09:43:34 UTC 2014 - werner@suse.de -- Modify the patches +- Modify the patches agetty-fooled-on-serial-line-due-plymouth.patch sulogin-fooled-on-tty-line-due-plymouth.patch to be able to disable plymouth if not already terminated due to @@ -672,7 +719,7 @@ Sun Feb 9 21:20:31 UTC 2014 - andreas.stieger@gmx.de - util-linux 2.24.1 - agetty: - * support the special terminal on first serial line on a S/390 + * support the special terminal on first serial line on a S/390 - blkdiscard: * BLKSSZGET fills in an int, not a uint64 - blkid: @@ -806,14 +853,14 @@ Tue Feb 4 10:24:02 UTC 2014 - werner@suse.de - Modify patch agetty-on-s390-on-dev--3270-tty1-line.patch and patch tty3270-on-serial-line-of-s390.patch to handle 3270 - terminals + terminals - Really do not verify /usr/bin/eject ------------------------------------------------------------------- Mon Feb 3 16:16:36 UTC 2014 - werner@suse.de - Add patch agetty-on-s390-on-dev--3270-tty1-line.patch - to let agetty detect /dev/3270/tty1 as device not as baud rate + to let agetty detect /dev/3270/tty1 as device not as baud rate ------------------------------------------------------------------- Tue Jan 28 09:37:57 UTC 2014 - speilicke@suse.com @@ -918,7 +965,7 @@ Tue Dec 10 16:10:27 UTC 2013 - sweet_f_a@gmx.de ------------------------------------------------------------------- Fri Nov 29 13:46:21 UTC 2013 - werner@suse.de -- Add patch +- Add patch tty3270-on-serial-line-of-s390.patch to better support the first and second serial line on s390/x @@ -959,7 +1006,7 @@ Fri Sep 27 16:58:40 UTC 2013 - mgorse@suse.com ------------------------------------------------------------------- Fri Sep 13 07:06:19 UTC 2013 - werner@suse.de -- Avoid build require gpg-offline twice +- Avoid build require gpg-offline twice ------------------------------------------------------------------- Wed Sep 11 20:54:24 CEST 2013 - sbrabec@suse.cz @@ -1102,7 +1149,7 @@ Wed Jun 5 12:30:45 UTC 2013 - werner@suse.de + Release highlights (2.22) su(1): * has been merged from coreutils into util-linux - * utils-linux version uses /etc/pam.d/su-l PAM config file for --login + * utils-linux version uses /etc/pam.d/su-l PAM config file for --login (e.g. "su -") session. sulogin(8): * has been merged from sysvinit into util-linux @@ -1112,12 +1159,12 @@ Wed Jun 5 12:30:45 UTC 2013 - werner@suse.de * has been merged from inactive upstream from sf.net and Fedora into util-linux * supports new options --manualeject, --force and --no-partitions-unmount lslocks(1) - * this NEW COMMAND prints local system locks and it's replacement to very + * this NEW COMMAND prints local system locks and it's replacement to very long time unmaintained lslk(1) wdctl(8): * this NEW COMMAND shows hardware watchdog status libuuid: - * does NOT EXECUTE uuidd on demand, the daemon has to be started by + * does NOT EXECUTE uuidd on demand, the daemon has to be started by init scripts / systemd uuidd: * supports socket activation (for systemd) @@ -1173,7 +1220,7 @@ Sat Feb 16 17:48:29 UTC 2013 - schwab@suse.de Tue Feb 5 14:32:49 UTC 2013 - crrodriguez@opensuse.org - 0001-Test-for-secure_getenv-too.patch: - Current glibc in 12.3/factory no longer exports internal + Current glibc in 12.3/factory no longer exports internal function __secure_getenv() but has secure_getenv() instead. ------------------------------------------------------------------- @@ -1188,7 +1235,7 @@ Mon Jan 7 13:26:15 UTC 2013 - puzel@suse.com ------------------------------------------------------------------- Fri Dec 28 04:30:58 UTC 2012 - crrodriguez@opensuse.org -- 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch +- 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch Use OS byteswapping macros, this patch is functionally identical to the version submitted upstream with the exception it excludes code that target non-linux systems. @@ -1203,7 +1250,7 @@ Wed Sep 19 19:41:10 UTC 2012 - jslaby@suse.com Fri Jun 22 09:37:20 CEST 2012 - kukuk@suse.de - Remove pam_lastlog from login.pamd, login is doing it itself. - [bnc#768067] + [bnc#768067] ------------------------------------------------------------------- Wed Jun 20 09:22:50 UTC 2012 - lnussel@suse.de @@ -1240,13 +1287,13 @@ Thu May 31 10:04:23 UTC 2012 - sweet_f_a@gmx.de - require binutils-devel because "which" wants to find libiberty.a - remove which-lib64.patch because it's broken and couldn't find - libiberty.a whithin /usr/lib64 + libiberty.a whithin /usr/lib64 - which doesn't need autoreconf anymore ------------------------------------------------------------------- Tue May 29 09:28:55 UTC 2012 - puzel@suse.com -- switch to new libmount-based mount(8) +- switch to new libmount-based mount(8) ------------------------------------------------------------------- Fri May 25 12:12:09 UTC 2012 - puzel@suse.com @@ -1259,7 +1306,7 @@ Fri May 25 12:12:09 UTC 2012 - puzel@suse.com ------------------------------------------------------------------- Fri May 25 12:03:07 UTC 2012 - puzel@suse.com -- build with RPM_OPT_FLAGS again (removed by mistake) +- build with RPM_OPT_FLAGS again (removed by mistake) ------------------------------------------------------------------- Thu Apr 12 09:09:05 UTC 2012 - puzel@suse.com @@ -1325,7 +1372,7 @@ Tue Feb 21 13:46:25 UTC 2012 - puzel@suse.com --online to list all, offline or online CPUs - supports s390 topology description (polarization, books, ...) partx(8): - - supports partitioned loop devices + - supports partitioned loop devices wipefs(8): - allows to zap partition tables - supports new command line option "--type " to wipe only @@ -1377,7 +1424,7 @@ Wed Nov 9 08:27:17 UTC 2011 - puzel@suse.com ------------------------------------------------------------------- Tue Nov 8 09:36:41 UTC 2011 - puzel@suse.com -- add fsck-use-FS-blacklist-for-non-all-mode-too.patch (bnc#728645) +- add fsck-use-FS-blacklist-for-non-all-mode-too.patch (bnc#728645) ------------------------------------------------------------------- Wed Nov 2 09:37:12 UTC 2011 - puzel@suse.com @@ -1388,7 +1435,7 @@ Wed Nov 2 09:37:12 UTC 2011 - puzel@suse.com ------------------------------------------------------------------- Thu Oct 20 13:01:22 UTC 2011 - puzel@suse.com -- update to util-linux-2.20.1 +- update to util-linux-2.20.1 - bugfix release - drop patches (in upstream): - util-linux-sfdisk-manpage-fix.patch @@ -1398,7 +1445,7 @@ Thu Oct 20 13:01:22 UTC 2011 - puzel@suse.com ------------------------------------------------------------------- Wed Oct 12 09:26:40 UTC 2011 - puzel@suse.com -- add fdisk-dont-shorten-long-path-to-disk.patch (bnc#722959) +- add fdisk-dont-shorten-long-path-to-disk.patch (bnc#722959) ------------------------------------------------------------------- Tue Oct 4 11:32:11 UTC 2011 - uli@suse.com @@ -1411,12 +1458,12 @@ Tue Oct 4 11:32:11 UTC 2011 - uli@suse.com ------------------------------------------------------------------- Tue Sep 13 09:10:43 UTC 2011 - puzel@suse.com -- add util-linux-lib-sysfs-deinit.patch (bnc#714151) +- add util-linux-lib-sysfs-deinit.patch (bnc#714151) ------------------------------------------------------------------- Mon Aug 29 14:57:57 UTC 2011 - puzel@suse.com -- update to util-linux-2.20 +- update to util-linux-2.20 - cleanups, bugfixes - build with --enable-ddate - add util-linux-sfdisk-manpage-fix.patch @@ -1429,7 +1476,7 @@ Thu Aug 25 14:12:15 UTC 2011 - rguenther@novell.com ------------------------------------------------------------------- Wed Aug 17 10:37:20 UTC 2011 - puzel@novell.com -- update to util-linux-2.20-rc2 +- update to util-linux-2.20-rc2 - bugfixes - drop patches: - util-linux-fix-manpages.patch @@ -1441,22 +1488,22 @@ Wed Aug 17 10:37:20 UTC 2011 - puzel@novell.com ------------------------------------------------------------------- Wed Aug 10 13:42:33 UTC 2011 - puzel@novell.com -- add util-linux-2.20-rc1-hexdump-segfault.patch (bnc#710877) +- add util-linux-2.20-rc1-hexdump-segfault.patch (bnc#710877) ------------------------------------------------------------------- Wed Aug 10 12:20:41 UTC 2011 - puzel@novell.com -- add util-linux-2.20-rc-fix-dmesg.patch (bnc#710417) +- add util-linux-2.20-rc-fix-dmesg.patch (bnc#710417) ------------------------------------------------------------------- Wed Aug 10 11:06:15 UTC 2011 - puzel@novell.com -- add util-linux-2.20-rc1-agetty-fixes.patch (bnc#711240) +- add util-linux-2.20-rc1-agetty-fixes.patch (bnc#711240) ------------------------------------------------------------------- Mon Aug 1 13:44:21 UTC 2011 - puzel@novell.com -- update to util-linux-2.20-rc1 +- update to util-linux-2.20-rc1 - Release highlights agetty(8): - mingetty features have been merged to agetty @@ -1486,7 +1533,7 @@ Mon Aug 1 13:44:21 UTC 2011 - puzel@novell.com - supports real-time signals in formats RT, RTMIN+ and RTMAX- lsblk(8): - - supports new columns + - supports new columns - supports new command line option "-D" to print device discard topology lscpu(8): @@ -1508,7 +1555,7 @@ Tue May 3 09:39:37 UTC 2011 - puzel@novell.com - update to util-linux-2.19.1 - numerous bugfixes, including (bnc#690486 and bnc#690488) - drop umount-by-imgname.patch (merged upstream) -- cleanup: do not register ipc.info.gz (not provided by +- cleanup: do not register ipc.info.gz (not provided by this package) ------------------------------------------------------------------- @@ -1520,12 +1567,12 @@ Thu Apr 14 16:27:27 UTC 2011 - puzel@novell.com ------------------------------------------------------------------- Mon Feb 21 16:28:38 UTC 2011 - puzel@novell.com -- add umount-by-imgname.patch (bnc#666161) +- add umount-by-imgname.patch (bnc#666161) ------------------------------------------------------------------- Thu Feb 10 11:01:40 UTC 2011 - puzel@novell.com -- update to util-linux-2.19 +- update to util-linux-2.19 - uuid fixes - cleanups, documentation and translation updates - drop util-linux-2.19-rc1-loop-offset.diff (fixed in upstream, by @@ -1556,7 +1603,7 @@ Tue Jan 18 09:47:11 UTC 2011 - bwiedemann@novell.com ------------------------------------------------------------------- Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com -- update to util-linux-2.19-rc1 +- update to util-linux-2.19-rc1 - important changes: * lsblk(8): - this NEW COMMAND lists information about all or selected block @@ -1585,7 +1632,7 @@ Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com * fsck(8): - supports new command line option "-l" to lock whole-disk device by exclusive flock(2). This option is recommended when more - fsck(8) instances are executed in the same time. + fsck(8) instances are executed in the same time. * rtcwake(8): - supports new mode "show" to print the current RTC alarm time * fstrim(8): @@ -1600,7 +1647,7 @@ Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com - util-linux-agetty-s-option.patch - util-linux-fsck-l-option.patch - util-linux-2.18-no-canonicalize-fix.patch - - util-linux-swapon-canonicalize-swap-device.patch + - util-linux-swapon-canonicalize-swap-device.patch - fix uuidd Summary and Description - build with --enable-libmount-mount (new option) - use set_permissions macros @@ -1626,12 +1673,12 @@ Thu Dec 2 15:23:36 CET 2010 - mszeredi@suse.cz ------------------------------------------------------------------- Tue Nov 30 12:19:53 UTC 2010 - puzel@novell.com -- update util-linux-2.17.1-mount_losetup_crypto.patch (bnc#655804) +- update util-linux-2.17.1-mount_losetup_crypto.patch (bnc#655804) ------------------------------------------------------------------- Fri Nov 26 19:10:27 CET 2010 - kay.sievers@novell.com -- add Provides: fsck-with-dev-lock +- add Provides: fsck-with-dev-lock ------------------------------------------------------------------- Thu Nov 25 13:37:43 CET 2010 - kay.sievers@novell.com @@ -1641,7 +1688,7 @@ Thu Nov 25 13:37:43 CET 2010 - kay.sievers@novell.com ------------------------------------------------------------------- Tue Nov 16 16:08:48 UTC 2010 - cristian.rodriguez@opensuse.org -- disable silent rules +- disable silent rules ------------------------------------------------------------------- Thu Nov 11 10:36:35 CET 2010 - kay.sievers@novell.com @@ -1667,7 +1714,7 @@ Fri Jul 9 06:23:27 UTC 2010 - puzel@novell.com - full release notes: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes - update to adjtimex-1.28 -- update to which-2.20 +- update to which-2.20 - drop util-linux-2.14.1-mount_skip_sync.patch (fixed upstream) - drop util-linux-addpart-use-atoll.patch (fixed upstream) - drop util-linux-mount-detect-ro-mount.patch (fixed upstream) @@ -1692,24 +1739,24 @@ Tue Jun 22 16:48:29 UTC 2010 - bg@novell.com ------------------------------------------------------------------- Tue Jun 1 14:23:23 UTC 2010 - puzel@novell.com -- do not run uuidd as root, but uuidd:uuidd (bnc#604168) +- do not run uuidd as root, but uuidd:uuidd (bnc#604168) ------------------------------------------------------------------- Fri May 28 13:24:43 UTC 2010 - puzel@novell.com -- add util-linux-mount-detect-ro-mount.patch (bnc#481123) +- add util-linux-mount-detect-ro-mount.patch (bnc#481123) ------------------------------------------------------------------- Tue May 11 13:58:49 UTC 2010 - puzel@novell.com -- add util-linux-addpart-use-atoll.patch (bnc#603328) +- add util-linux-addpart-use-atoll.patch (bnc#603328) ------------------------------------------------------------------- Tue Apr 6 13:22:37 UTC 2010 - hvogel@novell.com - update to version 2.17.2 - fix small typo in v2.17.1-ReleaseNotes - - fix -b fdisk + - fix -b fdisk - fix typo in ionice - fix display of device size, fix infinite loop when probe chain bails out early, more robust minix probing, remove "0x" prefix @@ -1721,7 +1768,7 @@ Tue Apr 6 13:22:37 UTC 2010 - hvogel@novell.com /etc/filesystems in mount - update ja.po, pl.po, update vi.po - remove " (deleted)" from filenames from /proc/swaps - - cleanup usage() and man page of wipefs + - cleanup usage() and man page of wipefs ------------------------------------------------------------------- Wed Mar 10 23:11:42 CET 2010 - jeffm@suse.de @@ -1770,7 +1817,7 @@ Sun Nov 15 14:04:48 CET 2009 - meissner@suse.de ------------------------------------------------------------------- Mon Oct 26 17:45:53 UTC 2009 - crrodriguez@opensuse.org -- fsck during boot up fails with Too many open files [bnc#503008] +- fsck during boot up fails with Too many open files [bnc#503008] ------------------------------------------------------------------- Tue Oct 20 12:14:24 CEST 2009 - dmueller@suse.de @@ -1787,7 +1834,7 @@ Tue Sep 29 12:58:37 UTC 2009 - hvogel@novell.com - finaly remove the mount mtab locking patch: * util-linux-2.14.1-mount_race.patch - It causes too much regressions. + It causes too much regressions. ------------------------------------------------------------------- Mon Jul 13 14:21:07 CEST 2009 - kay.sievers@novell.com @@ -1837,7 +1884,7 @@ Thu Apr 16 14:55:22 CEST 2009 - werner@suse.de Mon Feb 16 12:35:00 CET 2009 - mkoenig@suse.de - remove util-linux-2.14.1-fdisk_cylinder.patch - fixed upstream + fixed upstream ------------------------------------------------------------------- Thu Feb 12 17:12:28 CET 2009 - mkoenig@suse.de @@ -1886,13 +1933,13 @@ Sat Feb 7 18:28:58 CET 2009 - schwab@suse.de Wed Jan 7 15:42:38 CET 2009 - mkoenig@suse.de - fix locking problem for external mount helpers when type - is not given [bnc#459839] + is not given [bnc#459839] ------------------------------------------------------------------- Tue Dec 2 12:23:37 CET 2008 - mkoenig@suse.de - raw: do not stat the raw devices when binding, since they - are created dynamically [bnc#450675] + are created dynamically [bnc#450675] ------------------------------------------------------------------- Thu Nov 27 01:27:19 CET 2008 - dmueller@suse.de @@ -1903,7 +1950,7 @@ Thu Nov 27 01:27:19 CET 2008 - dmueller@suse.de ------------------------------------------------------------------- Mon Nov 24 15:24:11 CET 2008 - mkoenig@suse.de -- mount: fix locking patch to not break -n [bnc#447937] +- mount: fix locking patch to not break -n [bnc#447937] ------------------------------------------------------------------- Thu Nov 20 18:08:33 CET 2008 - mkoenig@suse.de @@ -1921,7 +1968,7 @@ Fri Nov 7 14:50:00 CET 2008 - mkoenig@suse.de - fdisk: support +cylinder notation [bnc#441871] - check for EACCES when using ro fallback when loop mounting - a readonly image + a readonly image - fix uninitialized variable in swapon pagesize detection ------------------------------------------------------------------- @@ -1950,7 +1997,7 @@ Wed Sep 24 11:28:07 CEST 2008 - mkoenig@suse.de - add new tool /bin/hypervisor for x86, x86_64 from Ky Srinivasan - to detect the presence of a hypervisor [fate#303051] + to detect the presence of a hypervisor [fate#303051] ------------------------------------------------------------------- Wed Sep 10 15:58:52 CEST 2008 - mkoenig@suse.de @@ -1968,7 +2015,7 @@ Wed Sep 10 15:58:52 CEST 2008 - mkoenig@suse.de ------------------------------------------------------------------- Wed Aug 20 15:20:06 CEST 2008 - mkoenig@suse.de -- enable SELinux support [fate#303662] +- enable SELinux support [fate#303662] ------------------------------------------------------------------- Mon Aug 18 18:13:10 CEST 2008 - mrueckert@suse.de @@ -1978,7 +2025,7 @@ Mon Aug 18 18:13:10 CEST 2008 - mrueckert@suse.de ------------------------------------------------------------------- Mon Aug 18 12:36:39 CEST 2008 - mkoenig@suse.de -- raw: fix init script tags +- raw: fix init script tags ------------------------------------------------------------------- Mon Jul 7 15:13:24 CEST 2008 - mkoenig@suse.de @@ -1987,7 +2034,7 @@ Mon Jul 7 15:13:24 CEST 2008 - mkoenig@suse.de * Upgraded code from bash to version 3.2. This DOES has influence on how Which behaves under certain circumstances. * When the environment variable HOME is not set, the home directory - is now read from /etc/passwd or set to '/' if no home directory + is now read from /etc/passwd or set to '/' if no home directory could be found (this now matches the tilde lib used in bash) * Changed the license to GPLv3 * Add support for shells that output '{' on the same line as the @@ -1999,7 +2046,7 @@ Wed Jul 2 15:47:08 CEST 2008 - mkoenig@suse.de - replace util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch with upstream version - util-linux-2.14-loop_autoclear.patch + util-linux-2.14-loop_autoclear.patch ------------------------------------------------------------------- Fri Jun 27 17:05:46 CEST 2008 - schwab@suse.de @@ -2009,7 +2056,7 @@ Fri Jun 27 17:05:46 CEST 2008 - schwab@suse.de ------------------------------------------------------------------- Wed Jun 25 14:26:49 CEST 2008 - mkoenig@suse.de -- update to version 2.14 +- update to version 2.14 most important changes: * new command ldattach mount: @@ -2059,18 +2106,18 @@ Sun Mar 23 11:13:13 CET 2008 - coolo@suse.de ------------------------------------------------------------------- Wed Feb 13 10:21:42 CET 2008 - bg@suse.de -- don't try to package parisc*.8 manual pages +- don't try to package parisc*.8 manual pages ------------------------------------------------------------------- Mon Feb 11 17:49:04 CET 2008 - mkoenig@suse.de - update to version 2.13.1 again -- fix broken util-linux-2.13.1-getfs_fix.patch +- fix broken util-linux-2.13.1-getfs_fix.patch ------------------------------------------------------------------- Sun Feb 10 18:11:07 CET 2008 - lrupp@suse.de -- revert to 2.13.0.1+git20071121 +- revert to 2.13.0.1+git20071121 breaks current 'mount' call in Buildservice ------------------------------------------------------------------- @@ -2093,7 +2140,7 @@ Thu Feb 7 12:41:25 CET 2008 - mkoenig@suse.de - mount: fix problem with device canonicalization when using persistent name in fstab but call mount with real bd name - patches merged: - util-linux-2.13-mount_fd_leak.patch + util-linux-2.13-mount_fd_leak.patch ------------------------------------------------------------------- Tue Dec 18 15:55:19 CET 2007 - mkoenig@suse.de @@ -2104,7 +2151,7 @@ Tue Dec 18 15:55:19 CET 2007 - mkoenig@suse.de ------------------------------------------------------------------- Mon Dec 3 11:03:57 CET 2007 - ro@suse.de -- remove "arch", in coreutils now +- remove "arch", in coreutils now ------------------------------------------------------------------- Thu Nov 29 17:51:17 CET 2007 - lnussel@suse.de @@ -2127,16 +2174,16 @@ Wed Nov 21 13:43:31 CET 2007 - mkoenig@suse.de ------------------------------------------------------------------- Tue Nov 20 17:49:35 CET 2007 - mkoenig@suse.de -- fix raw path in init script +- fix raw path in init script ------------------------------------------------------------------- Tue Nov 6 16:11:02 CET 2007 - mkoenig@suse.de - update to 2.13.0.1+git20071106 -- prevent loop mounting the same file twice [#240653] +- prevent loop mounting the same file twice [#240653] - merged upstream: util-linux-2.13-mount_helper_fix.patch - util-linux-2.13-hwclock_rtc_option.patch + util-linux-2.13-hwclock_rtc_option.patch ------------------------------------------------------------------- Thu Oct 4 22:24:04 CEST 2007 - bg@suse.de @@ -2152,7 +2199,7 @@ Mon Oct 1 17:08:06 CEST 2007 - mkoenig@suse.de util-linux-2.13-loop.patch util-linux-2.13-mount_create_mtab.patch util-linux-2.13-schedutils_error_handling.patch - util-linux-2.13-sys_utils_build_rdev_x86_64.patch + util-linux-2.13-sys_utils_build_rdev_x86_64.patch - fix hwclock --rtc option [#326106] - fix setuid/setgid mixup and error checking [#327022] @@ -2160,12 +2207,12 @@ Mon Oct 1 17:08:06 CEST 2007 - mkoenig@suse.de Fri Sep 14 11:24:33 CEST 2007 - mkoenig@suse.de - link cfdisk against libncursesw instead libncurses to fix - broken utf-8 characters [#307353] + broken utf-8 characters [#307353] ------------------------------------------------------------------- Wed Aug 29 12:22:21 CEST 2007 - mkoenig@suse.de -- fix fd leaks in previous patch +- fix fd leaks in previous patch ------------------------------------------------------------------- Tue Aug 28 16:42:04 CEST 2007 - lnussel@suse.de @@ -2177,20 +2224,20 @@ Tue Aug 28 16:42:04 CEST 2007 - lnussel@suse.de Fri Aug 24 14:09:19 CEST 2007 - mkoenig@suse.de - avoid duplicates of root fs if defined with LABEL in fstab - [#297959] + [#297959] - fix ionice error handling [#301675] ------------------------------------------------------------------- Thu Aug 16 18:34:30 CEST 2007 - ssommer@suse.de -- free loop devices when mount fails [#297172] +- free loop devices when mount fails [#297172] ------------------------------------------------------------------- Wed Jul 25 18:43:42 CEST 2007 - mkoenig@suse.de - update to git20070725 - removed patches (merged upstream): - util-linux-2.12r-mount_mount.8_xfs_update.patch + util-linux-2.12r-mount_mount.8_xfs_update.patch util-linux-2.12r-sys_utils_readprofile_mapfile.patch util-linux-2.12r-disk_utils_mkswap_fix.patch util-linux-2.13-schedutils_ionice_idle.patch @@ -2199,8 +2246,8 @@ Wed Jul 25 18:43:42 CEST 2007 - mkoenig@suse.de Tue Jul 17 10:44:18 CEST 2007 - mkoenig@suse.de - updated to version 2.13-rc2: - * add wakertc -- cleanup ionice usage [#270251] + * add wakertc +- cleanup ionice usage [#270251] - enable hwclock audit support [#280113] - removed patches (merged/fixed upstream) util-linux-login_utils_wall.patch @@ -2221,17 +2268,17 @@ Fri Jul 13 12:31:56 CEST 2007 - mkoenig@suse.de util-linux-2.11z-hwclock_geteuid.patch it is intentional that suid hwclock capabilities are limited - removed patch (fixed upstream) - util-linux-2.12q-mount_--move.patch + util-linux-2.12q-mount_--move.patch ------------------------------------------------------------------- Mon Jul 9 11:34:33 CEST 2007 - mkoenig@suse.de -- add libuuid-devel to BuildRequires to let mkswap use UUIDs +- add libuuid-devel to BuildRequires to let mkswap use UUIDs ------------------------------------------------------------------- Thu Jul 5 16:08:58 CEST 2007 - mkoenig@suse.de -- use %config(noreplace) for /etc/filesystems +- use %config(noreplace) for /etc/filesystems - Keep rdev stuff for x86_64 util-linux-2.13-sys_utils_build_rdev_x86_64.patch - removed patches (merged upstream) @@ -2264,21 +2311,21 @@ Thu Jun 21 14:50:58 CEST 2007 - mkoenig@suse.de ------------------------------------------------------------------- Thu Jun 14 10:52:25 CEST 2007 - mkoenig@suse.de -- mkzimage_cmdline: activate commandline if used with -s [#279935] +- mkzimage_cmdline: activate commandline if used with -s [#279935] ------------------------------------------------------------------- Wed Jun 13 12:33:59 CEST 2007 - mkoenig@suse.de - schedutils: let chrt accept pid 0 for current process and fix some documentation bugs [#266879] - util-linux-2.13-schedutils_chrt.patch + util-linux-2.13-schedutils_chrt.patch ------------------------------------------------------------------- Wed Jun 6 16:15:43 CEST 2007 - mkoenig@suse.de - update to git20070530 - removed patches - util-linux-2.13-mount_volume_id.patch + util-linux-2.13-mount_volume_id.patch util-linux-2.12r-mount_by_uuid.patch util-linux-2.13-build_gnu_source.patch - fix build with ncurses @@ -2323,7 +2370,7 @@ Mon Apr 23 16:49:00 CEST 2007 - mkoenig@suse.de - update to git20070412 - remove chkdupexe and scriptreplay to get rid of the - perl dependency [#265757] + perl dependency [#265757] util-linux-2.13-build_no_perl_dependency.patch - upstream integration of umount helper support [#252089] - merged patches: @@ -2341,9 +2388,9 @@ Tue Apr 10 17:25:34 CEST 2007 - mkoenig@suse.de - update to version git20070330 of new forked development tree - removed Suse crypto patches for losetup [FATE#302001] -- removed binaries: +- removed binaries: /bin/guessfstype - /sbin/sln + /sbin/sln /usr/bin/setfdprm - removed obsolete patches: * guessfstype2.patch @@ -2382,7 +2429,7 @@ Tue Apr 10 17:25:34 CEST 2007 - mkoenig@suse.de ------------------------------------------------------------------- Wed Apr 4 12:55:40 CEST 2007 - mkoenig@suse.de -- add Supplements line [FATE#301966] +- add Supplements line [FATE#301966] ------------------------------------------------------------------- Mon Mar 26 15:49:09 CEST 2007 - rguenther@suse.de @@ -2392,13 +2439,13 @@ Mon Mar 26 15:49:09 CEST 2007 - rguenther@suse.de ------------------------------------------------------------------- Thu Mar 15 17:24:34 CET 2007 - mkoenig@suse.de -- mount: Let swapon automatically reinitialize a suspended - swap partition [#254437] +- mount: Let swapon automatically reinitialize a suspended + swap partition [#254437] ------------------------------------------------------------------- Thu Mar 9 11:00:11 CET 2007 - mkoenig@suse.de -- mount: fix mtablock patch to avoid mtab corruption [#226783] +- mount: fix mtablock patch to avoid mtab corruption [#226783] ------------------------------------------------------------------- Thu Mar 8 17:27:22 CET 2007 - mkoenig@suse.de @@ -2413,8 +2460,8 @@ Wed Mar 7 16:58:08 CET 2007 - rguenther@suse.de ------------------------------------------------------------------- Tue Feb 27 10:58:46 CET 2007 - mkoenig@suse.de -- fix missing return code in - util-linux-2.12r-losetup_password.patch +- fix missing return code in + util-linux-2.12r-losetup_password.patch - mount: fix race condition in mount -o loop [#242750] ------------------------------------------------------------------- @@ -2430,7 +2477,7 @@ Fri Feb 2 13:27:31 CET 2007 - mkoenig@suse.de ------------------------------------------------------------------- Wed Jan 31 12:06:55 CET 2007 - mkoenig@suse.de -- let mkfs tools open with O_EXCL [#238687] +- let mkfs tools open with O_EXCL [#238687] ------------------------------------------------------------------- Tue Dec 12 11:04:07 CET 2006 - mkoenig@suse.de @@ -2451,14 +2498,14 @@ Tue Dec 5 18:13:32 CET 2006 - mkoenig@suse.de ------------------------------------------------------------------- Tue Nov 7 13:09:45 CET 2006 - mkoenig@suse.de -- enable partx [#214992] +- enable partx [#214992] ------------------------------------------------------------------- Tue Oct 10 18:17:42 CEST 2006 - mkoenig@suse.de - Round up partition end LBA to a cylinder boundary during add_partition() [#174892] -- Fix readprofile on ppc64 [#179122] +- Fix readprofile on ppc64 [#179122] - Fix cal formatting bug [#203469] ------------------------------------------------------------------- @@ -2470,7 +2517,7 @@ Mon Oct 9 12:27:33 CEST 2006 - mkoenig@suse.de ------------------------------------------------------------------- Mon Aug 21 12:10:01 CEST 2006 - mkoenig@suse.de -- Added sysfs to list of filesystems not to unmount with +- Added sysfs to list of filesystems not to unmount with umount -a, resolves #190385 ------------------------------------------------------------------- @@ -2571,14 +2618,14 @@ Wed Feb 1 03:58:58 CET 2006 - olh@suse.de ------------------------------------------------------------------- Wed Feb 1 02:20:17 CET 2006 - ro@suse.de -- fix typo in previous change, binary negation is "~" +- fix typo in previous change, binary negation is "~" ------------------------------------------------------------------- Fri Jan 27 13:02:36 CET 2006 - sscheler@suse.de -- fixed mount hotplug option (#143352). now we don't send the - MS_HOTPLUG flag to the kernel any longer, because the kernel - doesn't know this option (EINVAL) and actually doesn't need to +- fixed mount hotplug option (#143352). now we don't send the + MS_HOTPLUG flag to the kernel any longer, because the kernel + doesn't know this option (EINVAL) and actually doesn't need to know about it. ------------------------------------------------------------------- @@ -3222,7 +3269,7 @@ Mon Oct 13 21:44:43 CEST 2003 - kukuk@suse.de ------------------------------------------------------------------- Thu Oct 2 11:31:14 CEST 2003 - kukuk@suse.de -- Fix compiling with kernel 2.6.0-test6 header files +- Fix compiling with kernel 2.6.0-test6 header files ------------------------------------------------------------------- Tue Aug 12 15:27:20 CEST 2003 - mmj@suse.de @@ -3291,7 +3338,7 @@ Mon Mar 3 16:19:04 CET 2003 - mmj@suse.de ------------------------------------------------------------------- Mon Mar 3 12:27:01 CET 2003 - ro@suse.de -- add missing info dir entries +- add missing info dir entries ------------------------------------------------------------------- Tue Feb 18 14:29:45 CET 2003 - agruen@suse.de @@ -3323,7 +3370,7 @@ Fri Feb 7 01:30:53 CET 2003 - ro@suse.de ------------------------------------------------------------------- Tue Feb 4 22:34:10 CET 2003 - ro@suse.de -- don't package /bin/kill (part of coreutils now) +- don't package /bin/kill (part of coreutils now) ------------------------------------------------------------------- Tue Feb 4 12:40:00 CET 2003 - meissner@suse.de @@ -3383,7 +3430,7 @@ Wed Nov 27 11:01:52 CET 2002 - mmj@suse.de o fdisk,cfdisk: cosmetic fixes o mount,umount: fix LABEL= handling for non-root [#17322] o more: kill external help file - o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC + o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC fails (patch we had, now folded upstream) ------------------------------------------------------------------- @@ -3421,7 +3468,7 @@ Thu Oct 31 14:59:11 CET 2002 - mmj@suse.de ------------------------------------------------------------------- Thu Oct 31 00:40:09 CET 2002 - ro@suse.de -- hack time to build on alpha +- hack time to build on alpha ------------------------------------------------------------------- Tue Oct 22 16:13:36 CEST 2002 - mmj@suse.de @@ -3565,7 +3612,7 @@ Mon Jul 8 21:16:07 CEST 2002 - mmj@suse.de * fdformat: remove test on major * fdisk, hwclock and swap polishing * Lots of translations - * cramfs tools includes from the kernel + * cramfs tools includes from the kernel * swap{on,off} honours /proc/swaps * mount small fixups @@ -3648,7 +3695,7 @@ Mon Jan 28 13:59:26 CET 2002 - mmj@suse.de ------------------------------------------------------------------- Thu Jan 24 10:16:37 CET 2002 - ro@suse.de -- modified fillup_and_insserv call (perl-hack not needed here) +- modified fillup_and_insserv call (perl-hack not needed here) ------------------------------------------------------------------- Mon Jan 21 17:08:17 CET 2002 - mmj@suse.de @@ -3658,7 +3705,7 @@ Mon Jan 21 17:08:17 CET 2002 - mmj@suse.de ------------------------------------------------------------------- Thu Jan 10 14:18:21 CET 2002 - ro@suse.de -- removed ACTIVATE_RAW_DEV +- removed ACTIVATE_RAW_DEV ------------------------------------------------------------------- Mon Dec 31 19:05:45 UTC 2001 - adrian@suse.de @@ -3818,7 +3865,7 @@ Mon Feb 12 15:23:14 CET 2001 - kukuk@suse.de ------------------------------------------------------------------- Tue Feb 6 11:54:34 CET 2001 - ro@suse.de -- wall.c: include time.h +- wall.c: include time.h ------------------------------------------------------------------- Mon Feb 5 11:13:56 CET 2001 - kukuk@suse.de @@ -3837,14 +3884,14 @@ Fri Feb 2 12:18:56 CET 2001 - werner@suse.de ------------------------------------------------------------------- Thu Jan 25 00:37:22 CET 2001 - ro@suse.de -- added Provides: util +- added Provides: util ------------------------------------------------------------------- Fri Jan 12 10:08:29 MET 2001 - garloff@suse.de - Apply patch to lomount to allow all kerneli crypt algos to be passed and allow to pass passwd with -k. -- losetup seems to support >2GB files just fine (#5433) +- losetup seems to support >2GB files just fine (#5433) ------------------------------------------------------------------- Tue Jan 2 12:04:33 CET 2001 - kukuk@suse.de @@ -3864,9 +3911,9 @@ Tue Dec 5 11:24:34 CET 2000 - kukuk@suse.de ------------------------------------------------------------------- Tue Dec 5 11:10:10 CET 2000 - schwab@suse.de - + - Don't use _syscallX on ia64. - + ------------------------------------------------------------------- Mon Dec 4 09:27:28 CET 2000 - olh@suse.de @@ -3876,7 +3923,7 @@ Mon Dec 4 09:27:28 CET 2000 - olh@suse.de ------------------------------------------------------------------- Sun Dec 3 00:09:16 CET 2000 - olh@suse.de -- no segfaults with AIX disklabels +- no segfaults with AIX disklabels ------------------------------------------------------------------- Wed Nov 29 18:21:25 CET 2000 - uli@suse.de @@ -3937,7 +3984,7 @@ Wed Sep 27 11:30:21 CEST 2000 - kukuk@suse.de ------------------------------------------------------------------- Tue Sep 26 17:54:23 CEST 2000 - kukuk@suse.de -- Fix mount for new NFS kernel patch +- Fix mount for new NFS kernel patch ------------------------------------------------------------------- Sat Sep 9 17:36:24 CEST 2000 - kukuk@suse.de @@ -4040,7 +4087,7 @@ Thu Mar 9 21:25:15 CET 2000 - kukuk@suse.de ------------------------------------------------------------------- Tue Mar 7 17:23:57 CET 2000 - kukuk@suse.de -- etc/filesystems: Add minix and reiserfs +- etc/filesystems: Add minix and reiserfs ------------------------------------------------------------------- Tue Mar 7 11:49:23 CET 2000 - kukuk@suse.de @@ -4070,23 +4117,23 @@ Thu Feb 3 14:42:23 CET 2000 - kukuk@suse.de ------------------------------------------------------------------- Thu Feb 3 11:14:29 CET 2000 - kukuk@suse.de -- util-linux: Update to 2.10f (mount security fix) +- util-linux: Update to 2.10f (mount security fix) ------------------------------------------------------------------- Sun Jan 23 15:45:08 CET 2000 - kukuk@suse.de -- util-linux: Update to 2.10e +- util-linux: Update to 2.10e ------------------------------------------------------------------- Tue Jan 18 19:18:08 CET 2000 - kukuk@suse.de - mount now looks at first in /etc/filesystems and then in - /proc/filesystems + /proc/filesystems ------------------------------------------------------------------- Tue Jan 18 16:32:05 CET 2000 - ro@suse.de -- fixed pmac-utils to build with 2.3 as well +- fixed pmac-utils to build with 2.3 as well ------------------------------------------------------------------- Tue Jan 18 14:56:22 CET 2000 - kukuk@suse.de @@ -4099,7 +4146,7 @@ Mon Jan 17 18:23:56 CET 2000 - kukuk@suse.de - Fix setserial for Linux 2.3.40 - Remove write, is now in nkitb - Build minix and bfs tools for SPARC -- Fix some buffer overflows in fdisk +- Fix some buffer overflows in fdisk ------------------------------------------------------------------- Fri Dec 17 15:00:19 MET 1999 - kukuk@suse.de @@ -4121,7 +4168,7 @@ Tue Nov 30 17:49:27 MET 1999 - uli@suse.de ------------------------------------------------------------------- Mon Nov 15 12:39:41 MET 1999 - kukuk@suse.de -- util-linux: Update to 2.10b +- util-linux: Update to 2.10b ------------------------------------------------------------------- Sat Nov 13 15:36:37 MET 1999 - kukuk@suse.de @@ -4148,7 +4195,7 @@ Sat Oct 16 16:40:13 MEST 1999 - kukuk@suse.de ------------------------------------------------------------------- Fri Oct 8 10:58:48 MEST 1999 - kukuk@suse.de -- Update to util-linux-2.9y (execpt fdisk) +- Update to util-linux-2.9y (execpt fdisk) ------------------------------------------------------------------- Tue Sep 14 18:14:53 CEST 1999 - uli@suse.de @@ -4163,12 +4210,12 @@ Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de ------------------------------------------------------------------- Thu Aug 26 15:05:03 CEST 1999 - uli@suse.de -- disabled hayesesp for PPC +- disabled hayesesp for PPC ------------------------------------------------------------------- Wed Aug 25 18:04:35 MEST 1999 - kukuk@suse.de -- Don't install tsort, its now in textutils 2.0 +- Don't install tsort, its now in textutils 2.0 ------------------------------------------------------------------- Tue Aug 24 10:11:06 MEST 1999 - kukuk@suse.de @@ -4194,7 +4241,7 @@ Mon Jul 12 12:11:45 MEST 1999 - kukuk@suse.de ------------------------------------------------------------------- Tue Jul 6 12:23:47 MEST 1999 - kukuk@suse.de -- update to util-linux-2.9t +- update to util-linux-2.9t ------------------------------------------------------------------- Fri Jun 25 14:44:30 MEST 1999 - kukuk@suse.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 31510b4..baa5501 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux-systemd # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -94,8 +94,7 @@ BuildRequires: librtas-devel %if %build_util_linux_systemd BuildRequires: socat BuildRequires: systemd-rpm-macros -BuildRequires: pkgconfig(libsystemd-daemon) -BuildRequires: pkgconfig(libsystemd-journal) +BuildRequires: pkgconfig(libsystemd) %endif %if %build_python_libmount BuildRequires: python-devel @@ -113,7 +112,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.28.2 +Version: 2.29 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -122,7 +121,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -132,7 +131,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -519,12 +518,11 @@ AUTOPOINT=true autoreconf -vfi --docdir=%{_docdir}/%{_name} \ --with-audit \ --with-gnu-ld \ - --with-ncurses \ + --with-ncursesw \ --with-selinux \ $uhead \ --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ --with-systemdsystemunitdir=%{_unitdir} \ - --enable-libmount-force-mountinfo \ --enable-libuuid-force-uuidd \ --enable-sulogin-emergency-mount \ --disable-use-tty-group \ @@ -532,6 +530,10 @@ AUTOPOINT=true autoreconf -vfi --disable-rpath \ --enable-all-programs \ --disable-reset \ + --disable-chfn-chsh \ + --disable-newgrp \ + --disable-vipw \ + --disable-pg \ %if %{without enable_last} --disable-last \ %endif @@ -570,6 +572,7 @@ export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" export TS_OPT_libfdisk_gpt_known_fail="yes" +export TS_OPT_misc_flock_known_fail="yes" export TS_OPT_misc_ionice_known_fail="yes" export TS_OPT_misc_swaplabel_known_fail="yes" export TS_OPT_kill_name_to_number_known_fail="yes" @@ -676,17 +679,6 @@ ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw mv %{buildroot}%{_docdir}/%{_name}/getopt %{buildroot}%{_datadir}/ # Stupid hack so we don't have a tcsh dependency chmod 644 %{buildroot}%{_datadir}/getopt/getopt*.tcsh -# Following files we don't want to package, so remove them -rm -f %{buildroot}%{_bindir}/pg -rm -f %{buildroot}%{_mandir}/man1/pg.1* -# Do not package these files to get rid of the perl dependency -rm -f %{buildroot}%{_bindir}/chkdupexe -rm -f %{buildroot}%{_mandir}/man1/chkdupexe.1 -# we use this tools from pwdutils -rm -f %{buildroot}%{_bindir}/{chfn,chsh,newgrp} -rm -f %{buildroot}%{_sbindir}/{vigr,vipw} -rm -f %{buildroot}%{_mandir}/man1/{chfn.1*,chsh.1*,newgrp.1*} -rm -f %{buildroot}%{_mandir}/man8/{vigr.8*,vipw.8*} # login is always and only in /bin mv %{buildroot}%{_bindir}/login %{buildroot}/bin/ # arch dependent diff --git a/util-linux.changes b/util-linux.changes index 71bcb84..ea48eb4 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,50 @@ +------------------------------------------------------------------- +Thu Jan 5 12:34:33 UTC 2017 - sweet_f_a@gmx.de + +- don't install bash-completions for uninstalled binaries (chfn, + chsh, newgrp, pg) +- for now remove procps dependency which is only needed for tests + because it pulls systemd + +------------------------------------------------------------------- +Thu Dec 15 09:26:01 UTC 2016 - fbui@suse.com + +- Replace pkgconfig(libsystemd-*) with pkgconfig(libsystemd) + + libsystemd-* libs were deprecated and are gone now. + +------------------------------------------------------------------- +Wed Dec 7 16:12:55 CET 2016 - sbrabec@suse.com + +- Remove no more supported --enable-libmount-force-mountinfo. + There is --enable-libmount-support-mtab, disabled by default, + exactly as we need. + +------------------------------------------------------------------- +Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de + +- Update to version 2.29 + * cal: possible to specify month by name (e.g. "cal January + 2017") and use relative placeholders (cal "+1 month") + * fdisk(8) allows to wipe newly created partitions; the feature + is possible to control by new command line option + --wipe-partitions[==auto|never|default]. + * findmnt --verify: the command scans /etc/fstab and tries to + verify the configuration. + * mount(8) now rejects requests to create another device and + mount filesystem for the same backing file. The command + `losetup --nooverlap` reuses loop device if already exists + for the same backing file. All the functionality calculate + with offset and sizelimit options of course, so it's fine to + have multiple regions (partitions) in the same image file and + mount all of them in the same time. The restriction is that + the regions should not overlap. + * lscpu supports the "drawer" topology for IBM S/390. + * More details at: + http://karelzak.blogspot.de/2016/10/util-linux-v229-whats-new.html + https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes +- refresh make-sure-sbin-resp-usr-sbin-are-in-PATH.diff + ------------------------------------------------------------------- Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de @@ -62,7 +109,7 @@ Wed Apr 13 21:29:00 UTC 2016 - sweet_f_a@gmx.de - fix build for openSUSE >= 13.1 (inclusive SLE 12) - drop build for openSUSE < 13.1 -- remove old build conditions: sysvinit_tools, enable_su and +- remove old build conditions: sysvinit_tools, enable_su and enable_eject - cosmetics: reorder configure options @@ -194,7 +241,7 @@ Fri Mar 13 15:57:56 UTC 2015 - sweet_f_a@gmx.de * cal(1): do not segfault when TERM is not defined or wrong (bnc#903440) * logger(1): major fixes and enhancements - * agetty(8): support /usr/lib/os-release too + * agetty(8): support /usr/lib/os-release too * some more fixes, mostly minor ones, see ReleaseNotes - re-enable fixed tests (fdisk/bsd, ppc64le) @@ -242,7 +289,7 @@ Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz ------------------------------------------------------------------- Sun Feb 22 17:15:41 UTC 2015 - crrodriguez@opensuse.org -- Build with FULL RELRO. +- Build with FULL RELRO. ------------------------------------------------------------------- Tue Feb 10 15:26:55 UTC 2015 - sweet_f_a@gmx.de @@ -440,7 +487,7 @@ Fri May 16 15:10:53 UTC 2014 - sweet_f_a@gmx.de Thu May 8 08:15:04 UTC 2014 - werner@suse.de - Modify patch support-other-tty-lines-not-vconsole.patch to - make it work on virtual console + make it work on virtual console - Modify patch agetty-on-s390-on-dev-3270-tty1-line.patch to add the missed 3270 support upstream @@ -448,7 +495,7 @@ Thu May 8 08:15:04 UTC 2014 - werner@suse.de Wed May 7 14:12:32 UTC 2014 - werner@suse.de - Add patch support-other-tty-lines-not-vconsole.patch - to be able to support console lines like xvc and hvc + to be able to support console lines like xvc and hvc ------------------------------------------------------------------- Thu Apr 24 11:33:36 UTC 2014 - sweet_f_a@gmx.de @@ -661,7 +708,7 @@ Mon Mar 17 22:36:58 CET 2014 - sbrabec@suse.cz ------------------------------------------------------------------- Thu Mar 6 09:43:34 UTC 2014 - werner@suse.de -- Modify the patches +- Modify the patches agetty-fooled-on-serial-line-due-plymouth.patch sulogin-fooled-on-tty-line-due-plymouth.patch to be able to disable plymouth if not already terminated due to @@ -672,7 +719,7 @@ Sun Feb 9 21:20:31 UTC 2014 - andreas.stieger@gmx.de - util-linux 2.24.1 - agetty: - * support the special terminal on first serial line on a S/390 + * support the special terminal on first serial line on a S/390 - blkdiscard: * BLKSSZGET fills in an int, not a uint64 - blkid: @@ -806,14 +853,14 @@ Tue Feb 4 10:24:02 UTC 2014 - werner@suse.de - Modify patch agetty-on-s390-on-dev--3270-tty1-line.patch and patch tty3270-on-serial-line-of-s390.patch to handle 3270 - terminals + terminals - Really do not verify /usr/bin/eject ------------------------------------------------------------------- Mon Feb 3 16:16:36 UTC 2014 - werner@suse.de - Add patch agetty-on-s390-on-dev--3270-tty1-line.patch - to let agetty detect /dev/3270/tty1 as device not as baud rate + to let agetty detect /dev/3270/tty1 as device not as baud rate ------------------------------------------------------------------- Tue Jan 28 09:37:57 UTC 2014 - speilicke@suse.com @@ -918,7 +965,7 @@ Tue Dec 10 16:10:27 UTC 2013 - sweet_f_a@gmx.de ------------------------------------------------------------------- Fri Nov 29 13:46:21 UTC 2013 - werner@suse.de -- Add patch +- Add patch tty3270-on-serial-line-of-s390.patch to better support the first and second serial line on s390/x @@ -959,7 +1006,7 @@ Fri Sep 27 16:58:40 UTC 2013 - mgorse@suse.com ------------------------------------------------------------------- Fri Sep 13 07:06:19 UTC 2013 - werner@suse.de -- Avoid build require gpg-offline twice +- Avoid build require gpg-offline twice ------------------------------------------------------------------- Wed Sep 11 20:54:24 CEST 2013 - sbrabec@suse.cz @@ -1102,7 +1149,7 @@ Wed Jun 5 12:30:45 UTC 2013 - werner@suse.de + Release highlights (2.22) su(1): * has been merged from coreutils into util-linux - * utils-linux version uses /etc/pam.d/su-l PAM config file for --login + * utils-linux version uses /etc/pam.d/su-l PAM config file for --login (e.g. "su -") session. sulogin(8): * has been merged from sysvinit into util-linux @@ -1112,12 +1159,12 @@ Wed Jun 5 12:30:45 UTC 2013 - werner@suse.de * has been merged from inactive upstream from sf.net and Fedora into util-linux * supports new options --manualeject, --force and --no-partitions-unmount lslocks(1) - * this NEW COMMAND prints local system locks and it's replacement to very + * this NEW COMMAND prints local system locks and it's replacement to very long time unmaintained lslk(1) wdctl(8): * this NEW COMMAND shows hardware watchdog status libuuid: - * does NOT EXECUTE uuidd on demand, the daemon has to be started by + * does NOT EXECUTE uuidd on demand, the daemon has to be started by init scripts / systemd uuidd: * supports socket activation (for systemd) @@ -1173,7 +1220,7 @@ Sat Feb 16 17:48:29 UTC 2013 - schwab@suse.de Tue Feb 5 14:32:49 UTC 2013 - crrodriguez@opensuse.org - 0001-Test-for-secure_getenv-too.patch: - Current glibc in 12.3/factory no longer exports internal + Current glibc in 12.3/factory no longer exports internal function __secure_getenv() but has secure_getenv() instead. ------------------------------------------------------------------- @@ -1188,7 +1235,7 @@ Mon Jan 7 13:26:15 UTC 2013 - puzel@suse.com ------------------------------------------------------------------- Fri Dec 28 04:30:58 UTC 2012 - crrodriguez@opensuse.org -- 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch +- 0001-include-bitops.h-Use-the-operating-system-byteswappi.patch Use OS byteswapping macros, this patch is functionally identical to the version submitted upstream with the exception it excludes code that target non-linux systems. @@ -1203,7 +1250,7 @@ Wed Sep 19 19:41:10 UTC 2012 - jslaby@suse.com Fri Jun 22 09:37:20 CEST 2012 - kukuk@suse.de - Remove pam_lastlog from login.pamd, login is doing it itself. - [bnc#768067] + [bnc#768067] ------------------------------------------------------------------- Wed Jun 20 09:22:50 UTC 2012 - lnussel@suse.de @@ -1240,13 +1287,13 @@ Thu May 31 10:04:23 UTC 2012 - sweet_f_a@gmx.de - require binutils-devel because "which" wants to find libiberty.a - remove which-lib64.patch because it's broken and couldn't find - libiberty.a whithin /usr/lib64 + libiberty.a whithin /usr/lib64 - which doesn't need autoreconf anymore ------------------------------------------------------------------- Tue May 29 09:28:55 UTC 2012 - puzel@suse.com -- switch to new libmount-based mount(8) +- switch to new libmount-based mount(8) ------------------------------------------------------------------- Fri May 25 12:12:09 UTC 2012 - puzel@suse.com @@ -1259,7 +1306,7 @@ Fri May 25 12:12:09 UTC 2012 - puzel@suse.com ------------------------------------------------------------------- Fri May 25 12:03:07 UTC 2012 - puzel@suse.com -- build with RPM_OPT_FLAGS again (removed by mistake) +- build with RPM_OPT_FLAGS again (removed by mistake) ------------------------------------------------------------------- Thu Apr 12 09:09:05 UTC 2012 - puzel@suse.com @@ -1325,7 +1372,7 @@ Tue Feb 21 13:46:25 UTC 2012 - puzel@suse.com --online to list all, offline or online CPUs - supports s390 topology description (polarization, books, ...) partx(8): - - supports partitioned loop devices + - supports partitioned loop devices wipefs(8): - allows to zap partition tables - supports new command line option "--type " to wipe only @@ -1377,7 +1424,7 @@ Wed Nov 9 08:27:17 UTC 2011 - puzel@suse.com ------------------------------------------------------------------- Tue Nov 8 09:36:41 UTC 2011 - puzel@suse.com -- add fsck-use-FS-blacklist-for-non-all-mode-too.patch (bnc#728645) +- add fsck-use-FS-blacklist-for-non-all-mode-too.patch (bnc#728645) ------------------------------------------------------------------- Wed Nov 2 09:37:12 UTC 2011 - puzel@suse.com @@ -1388,7 +1435,7 @@ Wed Nov 2 09:37:12 UTC 2011 - puzel@suse.com ------------------------------------------------------------------- Thu Oct 20 13:01:22 UTC 2011 - puzel@suse.com -- update to util-linux-2.20.1 +- update to util-linux-2.20.1 - bugfix release - drop patches (in upstream): - util-linux-sfdisk-manpage-fix.patch @@ -1398,7 +1445,7 @@ Thu Oct 20 13:01:22 UTC 2011 - puzel@suse.com ------------------------------------------------------------------- Wed Oct 12 09:26:40 UTC 2011 - puzel@suse.com -- add fdisk-dont-shorten-long-path-to-disk.patch (bnc#722959) +- add fdisk-dont-shorten-long-path-to-disk.patch (bnc#722959) ------------------------------------------------------------------- Tue Oct 4 11:32:11 UTC 2011 - uli@suse.com @@ -1411,12 +1458,12 @@ Tue Oct 4 11:32:11 UTC 2011 - uli@suse.com ------------------------------------------------------------------- Tue Sep 13 09:10:43 UTC 2011 - puzel@suse.com -- add util-linux-lib-sysfs-deinit.patch (bnc#714151) +- add util-linux-lib-sysfs-deinit.patch (bnc#714151) ------------------------------------------------------------------- Mon Aug 29 14:57:57 UTC 2011 - puzel@suse.com -- update to util-linux-2.20 +- update to util-linux-2.20 - cleanups, bugfixes - build with --enable-ddate - add util-linux-sfdisk-manpage-fix.patch @@ -1429,7 +1476,7 @@ Thu Aug 25 14:12:15 UTC 2011 - rguenther@novell.com ------------------------------------------------------------------- Wed Aug 17 10:37:20 UTC 2011 - puzel@novell.com -- update to util-linux-2.20-rc2 +- update to util-linux-2.20-rc2 - bugfixes - drop patches: - util-linux-fix-manpages.patch @@ -1441,22 +1488,22 @@ Wed Aug 17 10:37:20 UTC 2011 - puzel@novell.com ------------------------------------------------------------------- Wed Aug 10 13:42:33 UTC 2011 - puzel@novell.com -- add util-linux-2.20-rc1-hexdump-segfault.patch (bnc#710877) +- add util-linux-2.20-rc1-hexdump-segfault.patch (bnc#710877) ------------------------------------------------------------------- Wed Aug 10 12:20:41 UTC 2011 - puzel@novell.com -- add util-linux-2.20-rc-fix-dmesg.patch (bnc#710417) +- add util-linux-2.20-rc-fix-dmesg.patch (bnc#710417) ------------------------------------------------------------------- Wed Aug 10 11:06:15 UTC 2011 - puzel@novell.com -- add util-linux-2.20-rc1-agetty-fixes.patch (bnc#711240) +- add util-linux-2.20-rc1-agetty-fixes.patch (bnc#711240) ------------------------------------------------------------------- Mon Aug 1 13:44:21 UTC 2011 - puzel@novell.com -- update to util-linux-2.20-rc1 +- update to util-linux-2.20-rc1 - Release highlights agetty(8): - mingetty features have been merged to agetty @@ -1486,7 +1533,7 @@ Mon Aug 1 13:44:21 UTC 2011 - puzel@novell.com - supports real-time signals in formats RT, RTMIN+ and RTMAX- lsblk(8): - - supports new columns + - supports new columns - supports new command line option "-D" to print device discard topology lscpu(8): @@ -1508,7 +1555,7 @@ Tue May 3 09:39:37 UTC 2011 - puzel@novell.com - update to util-linux-2.19.1 - numerous bugfixes, including (bnc#690486 and bnc#690488) - drop umount-by-imgname.patch (merged upstream) -- cleanup: do not register ipc.info.gz (not provided by +- cleanup: do not register ipc.info.gz (not provided by this package) ------------------------------------------------------------------- @@ -1520,12 +1567,12 @@ Thu Apr 14 16:27:27 UTC 2011 - puzel@novell.com ------------------------------------------------------------------- Mon Feb 21 16:28:38 UTC 2011 - puzel@novell.com -- add umount-by-imgname.patch (bnc#666161) +- add umount-by-imgname.patch (bnc#666161) ------------------------------------------------------------------- Thu Feb 10 11:01:40 UTC 2011 - puzel@novell.com -- update to util-linux-2.19 +- update to util-linux-2.19 - uuid fixes - cleanups, documentation and translation updates - drop util-linux-2.19-rc1-loop-offset.diff (fixed in upstream, by @@ -1556,7 +1603,7 @@ Tue Jan 18 09:47:11 UTC 2011 - bwiedemann@novell.com ------------------------------------------------------------------- Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com -- update to util-linux-2.19-rc1 +- update to util-linux-2.19-rc1 - important changes: * lsblk(8): - this NEW COMMAND lists information about all or selected block @@ -1585,7 +1632,7 @@ Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com * fsck(8): - supports new command line option "-l" to lock whole-disk device by exclusive flock(2). This option is recommended when more - fsck(8) instances are executed in the same time. + fsck(8) instances are executed in the same time. * rtcwake(8): - supports new mode "show" to print the current RTC alarm time * fstrim(8): @@ -1600,7 +1647,7 @@ Thu Jan 6 16:43:46 UTC 2011 - puzel@novell.com - util-linux-agetty-s-option.patch - util-linux-fsck-l-option.patch - util-linux-2.18-no-canonicalize-fix.patch - - util-linux-swapon-canonicalize-swap-device.patch + - util-linux-swapon-canonicalize-swap-device.patch - fix uuidd Summary and Description - build with --enable-libmount-mount (new option) - use set_permissions macros @@ -1626,12 +1673,12 @@ Thu Dec 2 15:23:36 CET 2010 - mszeredi@suse.cz ------------------------------------------------------------------- Tue Nov 30 12:19:53 UTC 2010 - puzel@novell.com -- update util-linux-2.17.1-mount_losetup_crypto.patch (bnc#655804) +- update util-linux-2.17.1-mount_losetup_crypto.patch (bnc#655804) ------------------------------------------------------------------- Fri Nov 26 19:10:27 CET 2010 - kay.sievers@novell.com -- add Provides: fsck-with-dev-lock +- add Provides: fsck-with-dev-lock ------------------------------------------------------------------- Thu Nov 25 13:37:43 CET 2010 - kay.sievers@novell.com @@ -1641,7 +1688,7 @@ Thu Nov 25 13:37:43 CET 2010 - kay.sievers@novell.com ------------------------------------------------------------------- Tue Nov 16 16:08:48 UTC 2010 - cristian.rodriguez@opensuse.org -- disable silent rules +- disable silent rules ------------------------------------------------------------------- Thu Nov 11 10:36:35 CET 2010 - kay.sievers@novell.com @@ -1667,7 +1714,7 @@ Fri Jul 9 06:23:27 UTC 2010 - puzel@novell.com - full release notes: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes - update to adjtimex-1.28 -- update to which-2.20 +- update to which-2.20 - drop util-linux-2.14.1-mount_skip_sync.patch (fixed upstream) - drop util-linux-addpart-use-atoll.patch (fixed upstream) - drop util-linux-mount-detect-ro-mount.patch (fixed upstream) @@ -1692,24 +1739,24 @@ Tue Jun 22 16:48:29 UTC 2010 - bg@novell.com ------------------------------------------------------------------- Tue Jun 1 14:23:23 UTC 2010 - puzel@novell.com -- do not run uuidd as root, but uuidd:uuidd (bnc#604168) +- do not run uuidd as root, but uuidd:uuidd (bnc#604168) ------------------------------------------------------------------- Fri May 28 13:24:43 UTC 2010 - puzel@novell.com -- add util-linux-mount-detect-ro-mount.patch (bnc#481123) +- add util-linux-mount-detect-ro-mount.patch (bnc#481123) ------------------------------------------------------------------- Tue May 11 13:58:49 UTC 2010 - puzel@novell.com -- add util-linux-addpart-use-atoll.patch (bnc#603328) +- add util-linux-addpart-use-atoll.patch (bnc#603328) ------------------------------------------------------------------- Tue Apr 6 13:22:37 UTC 2010 - hvogel@novell.com - update to version 2.17.2 - fix small typo in v2.17.1-ReleaseNotes - - fix -b fdisk + - fix -b fdisk - fix typo in ionice - fix display of device size, fix infinite loop when probe chain bails out early, more robust minix probing, remove "0x" prefix @@ -1721,7 +1768,7 @@ Tue Apr 6 13:22:37 UTC 2010 - hvogel@novell.com /etc/filesystems in mount - update ja.po, pl.po, update vi.po - remove " (deleted)" from filenames from /proc/swaps - - cleanup usage() and man page of wipefs + - cleanup usage() and man page of wipefs ------------------------------------------------------------------- Wed Mar 10 23:11:42 CET 2010 - jeffm@suse.de @@ -1770,7 +1817,7 @@ Sun Nov 15 14:04:48 CET 2009 - meissner@suse.de ------------------------------------------------------------------- Mon Oct 26 17:45:53 UTC 2009 - crrodriguez@opensuse.org -- fsck during boot up fails with Too many open files [bnc#503008] +- fsck during boot up fails with Too many open files [bnc#503008] ------------------------------------------------------------------- Tue Oct 20 12:14:24 CEST 2009 - dmueller@suse.de @@ -1787,7 +1834,7 @@ Tue Sep 29 12:58:37 UTC 2009 - hvogel@novell.com - finaly remove the mount mtab locking patch: * util-linux-2.14.1-mount_race.patch - It causes too much regressions. + It causes too much regressions. ------------------------------------------------------------------- Mon Jul 13 14:21:07 CEST 2009 - kay.sievers@novell.com @@ -1837,7 +1884,7 @@ Thu Apr 16 14:55:22 CEST 2009 - werner@suse.de Mon Feb 16 12:35:00 CET 2009 - mkoenig@suse.de - remove util-linux-2.14.1-fdisk_cylinder.patch - fixed upstream + fixed upstream ------------------------------------------------------------------- Thu Feb 12 17:12:28 CET 2009 - mkoenig@suse.de @@ -1886,13 +1933,13 @@ Sat Feb 7 18:28:58 CET 2009 - schwab@suse.de Wed Jan 7 15:42:38 CET 2009 - mkoenig@suse.de - fix locking problem for external mount helpers when type - is not given [bnc#459839] + is not given [bnc#459839] ------------------------------------------------------------------- Tue Dec 2 12:23:37 CET 2008 - mkoenig@suse.de - raw: do not stat the raw devices when binding, since they - are created dynamically [bnc#450675] + are created dynamically [bnc#450675] ------------------------------------------------------------------- Thu Nov 27 01:27:19 CET 2008 - dmueller@suse.de @@ -1903,7 +1950,7 @@ Thu Nov 27 01:27:19 CET 2008 - dmueller@suse.de ------------------------------------------------------------------- Mon Nov 24 15:24:11 CET 2008 - mkoenig@suse.de -- mount: fix locking patch to not break -n [bnc#447937] +- mount: fix locking patch to not break -n [bnc#447937] ------------------------------------------------------------------- Thu Nov 20 18:08:33 CET 2008 - mkoenig@suse.de @@ -1921,7 +1968,7 @@ Fri Nov 7 14:50:00 CET 2008 - mkoenig@suse.de - fdisk: support +cylinder notation [bnc#441871] - check for EACCES when using ro fallback when loop mounting - a readonly image + a readonly image - fix uninitialized variable in swapon pagesize detection ------------------------------------------------------------------- @@ -1950,7 +1997,7 @@ Wed Sep 24 11:28:07 CEST 2008 - mkoenig@suse.de - add new tool /bin/hypervisor for x86, x86_64 from Ky Srinivasan - to detect the presence of a hypervisor [fate#303051] + to detect the presence of a hypervisor [fate#303051] ------------------------------------------------------------------- Wed Sep 10 15:58:52 CEST 2008 - mkoenig@suse.de @@ -1968,7 +2015,7 @@ Wed Sep 10 15:58:52 CEST 2008 - mkoenig@suse.de ------------------------------------------------------------------- Wed Aug 20 15:20:06 CEST 2008 - mkoenig@suse.de -- enable SELinux support [fate#303662] +- enable SELinux support [fate#303662] ------------------------------------------------------------------- Mon Aug 18 18:13:10 CEST 2008 - mrueckert@suse.de @@ -1978,7 +2025,7 @@ Mon Aug 18 18:13:10 CEST 2008 - mrueckert@suse.de ------------------------------------------------------------------- Mon Aug 18 12:36:39 CEST 2008 - mkoenig@suse.de -- raw: fix init script tags +- raw: fix init script tags ------------------------------------------------------------------- Mon Jul 7 15:13:24 CEST 2008 - mkoenig@suse.de @@ -1987,7 +2034,7 @@ Mon Jul 7 15:13:24 CEST 2008 - mkoenig@suse.de * Upgraded code from bash to version 3.2. This DOES has influence on how Which behaves under certain circumstances. * When the environment variable HOME is not set, the home directory - is now read from /etc/passwd or set to '/' if no home directory + is now read from /etc/passwd or set to '/' if no home directory could be found (this now matches the tilde lib used in bash) * Changed the license to GPLv3 * Add support for shells that output '{' on the same line as the @@ -1999,7 +2046,7 @@ Wed Jul 2 15:47:08 CEST 2008 - mkoenig@suse.de - replace util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch with upstream version - util-linux-2.14-loop_autoclear.patch + util-linux-2.14-loop_autoclear.patch ------------------------------------------------------------------- Fri Jun 27 17:05:46 CEST 2008 - schwab@suse.de @@ -2009,7 +2056,7 @@ Fri Jun 27 17:05:46 CEST 2008 - schwab@suse.de ------------------------------------------------------------------- Wed Jun 25 14:26:49 CEST 2008 - mkoenig@suse.de -- update to version 2.14 +- update to version 2.14 most important changes: * new command ldattach mount: @@ -2059,18 +2106,18 @@ Sun Mar 23 11:13:13 CET 2008 - coolo@suse.de ------------------------------------------------------------------- Wed Feb 13 10:21:42 CET 2008 - bg@suse.de -- don't try to package parisc*.8 manual pages +- don't try to package parisc*.8 manual pages ------------------------------------------------------------------- Mon Feb 11 17:49:04 CET 2008 - mkoenig@suse.de - update to version 2.13.1 again -- fix broken util-linux-2.13.1-getfs_fix.patch +- fix broken util-linux-2.13.1-getfs_fix.patch ------------------------------------------------------------------- Sun Feb 10 18:11:07 CET 2008 - lrupp@suse.de -- revert to 2.13.0.1+git20071121 +- revert to 2.13.0.1+git20071121 breaks current 'mount' call in Buildservice ------------------------------------------------------------------- @@ -2093,7 +2140,7 @@ Thu Feb 7 12:41:25 CET 2008 - mkoenig@suse.de - mount: fix problem with device canonicalization when using persistent name in fstab but call mount with real bd name - patches merged: - util-linux-2.13-mount_fd_leak.patch + util-linux-2.13-mount_fd_leak.patch ------------------------------------------------------------------- Tue Dec 18 15:55:19 CET 2007 - mkoenig@suse.de @@ -2104,7 +2151,7 @@ Tue Dec 18 15:55:19 CET 2007 - mkoenig@suse.de ------------------------------------------------------------------- Mon Dec 3 11:03:57 CET 2007 - ro@suse.de -- remove "arch", in coreutils now +- remove "arch", in coreutils now ------------------------------------------------------------------- Thu Nov 29 17:51:17 CET 2007 - lnussel@suse.de @@ -2127,16 +2174,16 @@ Wed Nov 21 13:43:31 CET 2007 - mkoenig@suse.de ------------------------------------------------------------------- Tue Nov 20 17:49:35 CET 2007 - mkoenig@suse.de -- fix raw path in init script +- fix raw path in init script ------------------------------------------------------------------- Tue Nov 6 16:11:02 CET 2007 - mkoenig@suse.de - update to 2.13.0.1+git20071106 -- prevent loop mounting the same file twice [#240653] +- prevent loop mounting the same file twice [#240653] - merged upstream: util-linux-2.13-mount_helper_fix.patch - util-linux-2.13-hwclock_rtc_option.patch + util-linux-2.13-hwclock_rtc_option.patch ------------------------------------------------------------------- Thu Oct 4 22:24:04 CEST 2007 - bg@suse.de @@ -2152,7 +2199,7 @@ Mon Oct 1 17:08:06 CEST 2007 - mkoenig@suse.de util-linux-2.13-loop.patch util-linux-2.13-mount_create_mtab.patch util-linux-2.13-schedutils_error_handling.patch - util-linux-2.13-sys_utils_build_rdev_x86_64.patch + util-linux-2.13-sys_utils_build_rdev_x86_64.patch - fix hwclock --rtc option [#326106] - fix setuid/setgid mixup and error checking [#327022] @@ -2160,12 +2207,12 @@ Mon Oct 1 17:08:06 CEST 2007 - mkoenig@suse.de Fri Sep 14 11:24:33 CEST 2007 - mkoenig@suse.de - link cfdisk against libncursesw instead libncurses to fix - broken utf-8 characters [#307353] + broken utf-8 characters [#307353] ------------------------------------------------------------------- Wed Aug 29 12:22:21 CEST 2007 - mkoenig@suse.de -- fix fd leaks in previous patch +- fix fd leaks in previous patch ------------------------------------------------------------------- Tue Aug 28 16:42:04 CEST 2007 - lnussel@suse.de @@ -2177,20 +2224,20 @@ Tue Aug 28 16:42:04 CEST 2007 - lnussel@suse.de Fri Aug 24 14:09:19 CEST 2007 - mkoenig@suse.de - avoid duplicates of root fs if defined with LABEL in fstab - [#297959] + [#297959] - fix ionice error handling [#301675] ------------------------------------------------------------------- Thu Aug 16 18:34:30 CEST 2007 - ssommer@suse.de -- free loop devices when mount fails [#297172] +- free loop devices when mount fails [#297172] ------------------------------------------------------------------- Wed Jul 25 18:43:42 CEST 2007 - mkoenig@suse.de - update to git20070725 - removed patches (merged upstream): - util-linux-2.12r-mount_mount.8_xfs_update.patch + util-linux-2.12r-mount_mount.8_xfs_update.patch util-linux-2.12r-sys_utils_readprofile_mapfile.patch util-linux-2.12r-disk_utils_mkswap_fix.patch util-linux-2.13-schedutils_ionice_idle.patch @@ -2199,8 +2246,8 @@ Wed Jul 25 18:43:42 CEST 2007 - mkoenig@suse.de Tue Jul 17 10:44:18 CEST 2007 - mkoenig@suse.de - updated to version 2.13-rc2: - * add wakertc -- cleanup ionice usage [#270251] + * add wakertc +- cleanup ionice usage [#270251] - enable hwclock audit support [#280113] - removed patches (merged/fixed upstream) util-linux-login_utils_wall.patch @@ -2221,17 +2268,17 @@ Fri Jul 13 12:31:56 CEST 2007 - mkoenig@suse.de util-linux-2.11z-hwclock_geteuid.patch it is intentional that suid hwclock capabilities are limited - removed patch (fixed upstream) - util-linux-2.12q-mount_--move.patch + util-linux-2.12q-mount_--move.patch ------------------------------------------------------------------- Mon Jul 9 11:34:33 CEST 2007 - mkoenig@suse.de -- add libuuid-devel to BuildRequires to let mkswap use UUIDs +- add libuuid-devel to BuildRequires to let mkswap use UUIDs ------------------------------------------------------------------- Thu Jul 5 16:08:58 CEST 2007 - mkoenig@suse.de -- use %config(noreplace) for /etc/filesystems +- use %config(noreplace) for /etc/filesystems - Keep rdev stuff for x86_64 util-linux-2.13-sys_utils_build_rdev_x86_64.patch - removed patches (merged upstream) @@ -2264,21 +2311,21 @@ Thu Jun 21 14:50:58 CEST 2007 - mkoenig@suse.de ------------------------------------------------------------------- Thu Jun 14 10:52:25 CEST 2007 - mkoenig@suse.de -- mkzimage_cmdline: activate commandline if used with -s [#279935] +- mkzimage_cmdline: activate commandline if used with -s [#279935] ------------------------------------------------------------------- Wed Jun 13 12:33:59 CEST 2007 - mkoenig@suse.de - schedutils: let chrt accept pid 0 for current process and fix some documentation bugs [#266879] - util-linux-2.13-schedutils_chrt.patch + util-linux-2.13-schedutils_chrt.patch ------------------------------------------------------------------- Wed Jun 6 16:15:43 CEST 2007 - mkoenig@suse.de - update to git20070530 - removed patches - util-linux-2.13-mount_volume_id.patch + util-linux-2.13-mount_volume_id.patch util-linux-2.12r-mount_by_uuid.patch util-linux-2.13-build_gnu_source.patch - fix build with ncurses @@ -2323,7 +2370,7 @@ Mon Apr 23 16:49:00 CEST 2007 - mkoenig@suse.de - update to git20070412 - remove chkdupexe and scriptreplay to get rid of the - perl dependency [#265757] + perl dependency [#265757] util-linux-2.13-build_no_perl_dependency.patch - upstream integration of umount helper support [#252089] - merged patches: @@ -2341,9 +2388,9 @@ Tue Apr 10 17:25:34 CEST 2007 - mkoenig@suse.de - update to version git20070330 of new forked development tree - removed Suse crypto patches for losetup [FATE#302001] -- removed binaries: +- removed binaries: /bin/guessfstype - /sbin/sln + /sbin/sln /usr/bin/setfdprm - removed obsolete patches: * guessfstype2.patch @@ -2382,7 +2429,7 @@ Tue Apr 10 17:25:34 CEST 2007 - mkoenig@suse.de ------------------------------------------------------------------- Wed Apr 4 12:55:40 CEST 2007 - mkoenig@suse.de -- add Supplements line [FATE#301966] +- add Supplements line [FATE#301966] ------------------------------------------------------------------- Mon Mar 26 15:49:09 CEST 2007 - rguenther@suse.de @@ -2392,13 +2439,13 @@ Mon Mar 26 15:49:09 CEST 2007 - rguenther@suse.de ------------------------------------------------------------------- Thu Mar 15 17:24:34 CET 2007 - mkoenig@suse.de -- mount: Let swapon automatically reinitialize a suspended - swap partition [#254437] +- mount: Let swapon automatically reinitialize a suspended + swap partition [#254437] ------------------------------------------------------------------- Thu Mar 9 11:00:11 CET 2007 - mkoenig@suse.de -- mount: fix mtablock patch to avoid mtab corruption [#226783] +- mount: fix mtablock patch to avoid mtab corruption [#226783] ------------------------------------------------------------------- Thu Mar 8 17:27:22 CET 2007 - mkoenig@suse.de @@ -2413,8 +2460,8 @@ Wed Mar 7 16:58:08 CET 2007 - rguenther@suse.de ------------------------------------------------------------------- Tue Feb 27 10:58:46 CET 2007 - mkoenig@suse.de -- fix missing return code in - util-linux-2.12r-losetup_password.patch +- fix missing return code in + util-linux-2.12r-losetup_password.patch - mount: fix race condition in mount -o loop [#242750] ------------------------------------------------------------------- @@ -2430,7 +2477,7 @@ Fri Feb 2 13:27:31 CET 2007 - mkoenig@suse.de ------------------------------------------------------------------- Wed Jan 31 12:06:55 CET 2007 - mkoenig@suse.de -- let mkfs tools open with O_EXCL [#238687] +- let mkfs tools open with O_EXCL [#238687] ------------------------------------------------------------------- Tue Dec 12 11:04:07 CET 2006 - mkoenig@suse.de @@ -2451,14 +2498,14 @@ Tue Dec 5 18:13:32 CET 2006 - mkoenig@suse.de ------------------------------------------------------------------- Tue Nov 7 13:09:45 CET 2006 - mkoenig@suse.de -- enable partx [#214992] +- enable partx [#214992] ------------------------------------------------------------------- Tue Oct 10 18:17:42 CEST 2006 - mkoenig@suse.de - Round up partition end LBA to a cylinder boundary during add_partition() [#174892] -- Fix readprofile on ppc64 [#179122] +- Fix readprofile on ppc64 [#179122] - Fix cal formatting bug [#203469] ------------------------------------------------------------------- @@ -2470,7 +2517,7 @@ Mon Oct 9 12:27:33 CEST 2006 - mkoenig@suse.de ------------------------------------------------------------------- Mon Aug 21 12:10:01 CEST 2006 - mkoenig@suse.de -- Added sysfs to list of filesystems not to unmount with +- Added sysfs to list of filesystems not to unmount with umount -a, resolves #190385 ------------------------------------------------------------------- @@ -2571,14 +2618,14 @@ Wed Feb 1 03:58:58 CET 2006 - olh@suse.de ------------------------------------------------------------------- Wed Feb 1 02:20:17 CET 2006 - ro@suse.de -- fix typo in previous change, binary negation is "~" +- fix typo in previous change, binary negation is "~" ------------------------------------------------------------------- Fri Jan 27 13:02:36 CET 2006 - sscheler@suse.de -- fixed mount hotplug option (#143352). now we don't send the - MS_HOTPLUG flag to the kernel any longer, because the kernel - doesn't know this option (EINVAL) and actually doesn't need to +- fixed mount hotplug option (#143352). now we don't send the + MS_HOTPLUG flag to the kernel any longer, because the kernel + doesn't know this option (EINVAL) and actually doesn't need to know about it. ------------------------------------------------------------------- @@ -3222,7 +3269,7 @@ Mon Oct 13 21:44:43 CEST 2003 - kukuk@suse.de ------------------------------------------------------------------- Thu Oct 2 11:31:14 CEST 2003 - kukuk@suse.de -- Fix compiling with kernel 2.6.0-test6 header files +- Fix compiling with kernel 2.6.0-test6 header files ------------------------------------------------------------------- Tue Aug 12 15:27:20 CEST 2003 - mmj@suse.de @@ -3291,7 +3338,7 @@ Mon Mar 3 16:19:04 CET 2003 - mmj@suse.de ------------------------------------------------------------------- Mon Mar 3 12:27:01 CET 2003 - ro@suse.de -- add missing info dir entries +- add missing info dir entries ------------------------------------------------------------------- Tue Feb 18 14:29:45 CET 2003 - agruen@suse.de @@ -3323,7 +3370,7 @@ Fri Feb 7 01:30:53 CET 2003 - ro@suse.de ------------------------------------------------------------------- Tue Feb 4 22:34:10 CET 2003 - ro@suse.de -- don't package /bin/kill (part of coreutils now) +- don't package /bin/kill (part of coreutils now) ------------------------------------------------------------------- Tue Feb 4 12:40:00 CET 2003 - meissner@suse.de @@ -3383,7 +3430,7 @@ Wed Nov 27 11:01:52 CET 2002 - mmj@suse.de o fdisk,cfdisk: cosmetic fixes o mount,umount: fix LABEL= handling for non-root [#17322] o more: kill external help file - o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC + o simpleinit: security: refuse initctl_fd if setting FD_CLOEXEC fails (patch we had, now folded upstream) ------------------------------------------------------------------- @@ -3421,7 +3468,7 @@ Thu Oct 31 14:59:11 CET 2002 - mmj@suse.de ------------------------------------------------------------------- Thu Oct 31 00:40:09 CET 2002 - ro@suse.de -- hack time to build on alpha +- hack time to build on alpha ------------------------------------------------------------------- Tue Oct 22 16:13:36 CEST 2002 - mmj@suse.de @@ -3565,7 +3612,7 @@ Mon Jul 8 21:16:07 CEST 2002 - mmj@suse.de * fdformat: remove test on major * fdisk, hwclock and swap polishing * Lots of translations - * cramfs tools includes from the kernel + * cramfs tools includes from the kernel * swap{on,off} honours /proc/swaps * mount small fixups @@ -3648,7 +3695,7 @@ Mon Jan 28 13:59:26 CET 2002 - mmj@suse.de ------------------------------------------------------------------- Thu Jan 24 10:16:37 CET 2002 - ro@suse.de -- modified fillup_and_insserv call (perl-hack not needed here) +- modified fillup_and_insserv call (perl-hack not needed here) ------------------------------------------------------------------- Mon Jan 21 17:08:17 CET 2002 - mmj@suse.de @@ -3658,7 +3705,7 @@ Mon Jan 21 17:08:17 CET 2002 - mmj@suse.de ------------------------------------------------------------------- Thu Jan 10 14:18:21 CET 2002 - ro@suse.de -- removed ACTIVATE_RAW_DEV +- removed ACTIVATE_RAW_DEV ------------------------------------------------------------------- Mon Dec 31 19:05:45 UTC 2001 - adrian@suse.de @@ -3818,7 +3865,7 @@ Mon Feb 12 15:23:14 CET 2001 - kukuk@suse.de ------------------------------------------------------------------- Tue Feb 6 11:54:34 CET 2001 - ro@suse.de -- wall.c: include time.h +- wall.c: include time.h ------------------------------------------------------------------- Mon Feb 5 11:13:56 CET 2001 - kukuk@suse.de @@ -3837,14 +3884,14 @@ Fri Feb 2 12:18:56 CET 2001 - werner@suse.de ------------------------------------------------------------------- Thu Jan 25 00:37:22 CET 2001 - ro@suse.de -- added Provides: util +- added Provides: util ------------------------------------------------------------------- Fri Jan 12 10:08:29 MET 2001 - garloff@suse.de - Apply patch to lomount to allow all kerneli crypt algos to be passed and allow to pass passwd with -k. -- losetup seems to support >2GB files just fine (#5433) +- losetup seems to support >2GB files just fine (#5433) ------------------------------------------------------------------- Tue Jan 2 12:04:33 CET 2001 - kukuk@suse.de @@ -3864,9 +3911,9 @@ Tue Dec 5 11:24:34 CET 2000 - kukuk@suse.de ------------------------------------------------------------------- Tue Dec 5 11:10:10 CET 2000 - schwab@suse.de - + - Don't use _syscallX on ia64. - + ------------------------------------------------------------------- Mon Dec 4 09:27:28 CET 2000 - olh@suse.de @@ -3876,7 +3923,7 @@ Mon Dec 4 09:27:28 CET 2000 - olh@suse.de ------------------------------------------------------------------- Sun Dec 3 00:09:16 CET 2000 - olh@suse.de -- no segfaults with AIX disklabels +- no segfaults with AIX disklabels ------------------------------------------------------------------- Wed Nov 29 18:21:25 CET 2000 - uli@suse.de @@ -3937,7 +3984,7 @@ Wed Sep 27 11:30:21 CEST 2000 - kukuk@suse.de ------------------------------------------------------------------- Tue Sep 26 17:54:23 CEST 2000 - kukuk@suse.de -- Fix mount for new NFS kernel patch +- Fix mount for new NFS kernel patch ------------------------------------------------------------------- Sat Sep 9 17:36:24 CEST 2000 - kukuk@suse.de @@ -4040,7 +4087,7 @@ Thu Mar 9 21:25:15 CET 2000 - kukuk@suse.de ------------------------------------------------------------------- Tue Mar 7 17:23:57 CET 2000 - kukuk@suse.de -- etc/filesystems: Add minix and reiserfs +- etc/filesystems: Add minix and reiserfs ------------------------------------------------------------------- Tue Mar 7 11:49:23 CET 2000 - kukuk@suse.de @@ -4070,23 +4117,23 @@ Thu Feb 3 14:42:23 CET 2000 - kukuk@suse.de ------------------------------------------------------------------- Thu Feb 3 11:14:29 CET 2000 - kukuk@suse.de -- util-linux: Update to 2.10f (mount security fix) +- util-linux: Update to 2.10f (mount security fix) ------------------------------------------------------------------- Sun Jan 23 15:45:08 CET 2000 - kukuk@suse.de -- util-linux: Update to 2.10e +- util-linux: Update to 2.10e ------------------------------------------------------------------- Tue Jan 18 19:18:08 CET 2000 - kukuk@suse.de - mount now looks at first in /etc/filesystems and then in - /proc/filesystems + /proc/filesystems ------------------------------------------------------------------- Tue Jan 18 16:32:05 CET 2000 - ro@suse.de -- fixed pmac-utils to build with 2.3 as well +- fixed pmac-utils to build with 2.3 as well ------------------------------------------------------------------- Tue Jan 18 14:56:22 CET 2000 - kukuk@suse.de @@ -4099,7 +4146,7 @@ Mon Jan 17 18:23:56 CET 2000 - kukuk@suse.de - Fix setserial for Linux 2.3.40 - Remove write, is now in nkitb - Build minix and bfs tools for SPARC -- Fix some buffer overflows in fdisk +- Fix some buffer overflows in fdisk ------------------------------------------------------------------- Fri Dec 17 15:00:19 MET 1999 - kukuk@suse.de @@ -4121,7 +4168,7 @@ Tue Nov 30 17:49:27 MET 1999 - uli@suse.de ------------------------------------------------------------------- Mon Nov 15 12:39:41 MET 1999 - kukuk@suse.de -- util-linux: Update to 2.10b +- util-linux: Update to 2.10b ------------------------------------------------------------------- Sat Nov 13 15:36:37 MET 1999 - kukuk@suse.de @@ -4148,7 +4195,7 @@ Sat Oct 16 16:40:13 MEST 1999 - kukuk@suse.de ------------------------------------------------------------------- Fri Oct 8 10:58:48 MEST 1999 - kukuk@suse.de -- Update to util-linux-2.9y (execpt fdisk) +- Update to util-linux-2.9y (execpt fdisk) ------------------------------------------------------------------- Tue Sep 14 18:14:53 CEST 1999 - uli@suse.de @@ -4163,12 +4210,12 @@ Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de ------------------------------------------------------------------- Thu Aug 26 15:05:03 CEST 1999 - uli@suse.de -- disabled hayesesp for PPC +- disabled hayesesp for PPC ------------------------------------------------------------------- Wed Aug 25 18:04:35 MEST 1999 - kukuk@suse.de -- Don't install tsort, its now in textutils 2.0 +- Don't install tsort, its now in textutils 2.0 ------------------------------------------------------------------- Tue Aug 24 10:11:06 MEST 1999 - kukuk@suse.de @@ -4194,7 +4241,7 @@ Mon Jul 12 12:11:45 MEST 1999 - kukuk@suse.de ------------------------------------------------------------------- Tue Jul 6 12:23:47 MEST 1999 - kukuk@suse.de -- update to util-linux-2.9t +- update to util-linux-2.9t ------------------------------------------------------------------- Fri Jun 25 14:44:30 MEST 1999 - kukuk@suse.de diff --git a/util-linux.spec b/util-linux.spec index 5e5f95e..97b4276 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -94,8 +94,7 @@ BuildRequires: librtas-devel %if %build_util_linux_systemd BuildRequires: socat BuildRequires: systemd-rpm-macros -BuildRequires: pkgconfig(libsystemd-daemon) -BuildRequires: pkgconfig(libsystemd-journal) +BuildRequires: pkgconfig(libsystemd) %endif %if %build_python_libmount BuildRequires: python-devel @@ -113,7 +112,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.28.2 +Version: 2.29 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -122,7 +121,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.xz +Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init Source5: etc.raw @@ -132,7 +131,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/%{_name}-%{version}.tar.sign +Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -519,12 +518,11 @@ AUTOPOINT=true autoreconf -vfi --docdir=%{_docdir}/%{_name} \ --with-audit \ --with-gnu-ld \ - --with-ncurses \ + --with-ncursesw \ --with-selinux \ $uhead \ --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ --with-systemdsystemunitdir=%{_unitdir} \ - --enable-libmount-force-mountinfo \ --enable-libuuid-force-uuidd \ --enable-sulogin-emergency-mount \ --disable-use-tty-group \ @@ -532,6 +530,10 @@ AUTOPOINT=true autoreconf -vfi --disable-rpath \ --enable-all-programs \ --disable-reset \ + --disable-chfn-chsh \ + --disable-newgrp \ + --disable-vipw \ + --disable-pg \ %if %{without enable_last} --disable-last \ %endif @@ -570,6 +572,7 @@ export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" export TS_OPT_libfdisk_gpt_known_fail="yes" +export TS_OPT_misc_flock_known_fail="yes" export TS_OPT_misc_ionice_known_fail="yes" export TS_OPT_misc_swaplabel_known_fail="yes" export TS_OPT_kill_name_to_number_known_fail="yes" @@ -676,17 +679,6 @@ ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw mv %{buildroot}%{_docdir}/%{_name}/getopt %{buildroot}%{_datadir}/ # Stupid hack so we don't have a tcsh dependency chmod 644 %{buildroot}%{_datadir}/getopt/getopt*.tcsh -# Following files we don't want to package, so remove them -rm -f %{buildroot}%{_bindir}/pg -rm -f %{buildroot}%{_mandir}/man1/pg.1* -# Do not package these files to get rid of the perl dependency -rm -f %{buildroot}%{_bindir}/chkdupexe -rm -f %{buildroot}%{_mandir}/man1/chkdupexe.1 -# we use this tools from pwdutils -rm -f %{buildroot}%{_bindir}/{chfn,chsh,newgrp} -rm -f %{buildroot}%{_sbindir}/{vigr,vipw} -rm -f %{buildroot}%{_mandir}/man1/{chfn.1*,chsh.1*,newgrp.1*} -rm -f %{buildroot}%{_mandir}/man8/{vigr.8*,vipw.8*} # login is always and only in /bin mv %{buildroot}%{_bindir}/login %{buildroot}/bin/ # arch dependent From 13a5039daf650217889de6598dc17f0e64a72e6f54921b65aea9dbd3a87dd52c Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 1 Mar 2017 22:39:12 +0000 Subject: [PATCH 207/211] Accepting request 457450 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/457450 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=216 --- etc.raw | 6 +- python-libmount.changes | 44 ++++++ python-libmount.spec | 65 +++++--- raw.init | 62 -------- raw.service | 17 +++ util-linux-2.29.1.tar.sign | 17 +++ util-linux-2.29.1.tar.xz | 3 + util-linux-2.29.tar.sign | 17 --- util-linux-2.29.tar.xz | 3 - ...upport-for-setting-logical-blocksize.patch | 140 ++++++++++++++++++ util-linux-systemd.changes | 44 ++++++ util-linux-systemd.spec | 65 +++++--- util-linux.changes | 44 ++++++ util-linux.spec | 65 +++++--- 14 files changed, 450 insertions(+), 142 deletions(-) delete mode 100644 raw.init create mode 100644 raw.service create mode 100644 util-linux-2.29.1.tar.sign create mode 100644 util-linux-2.29.1.tar.xz delete mode 100644 util-linux-2.29.tar.sign delete mode 100644 util-linux-2.29.tar.xz create mode 100644 util-linux-losetup-Add-support-for-setting-logical-blocksize.patch diff --git a/etc.raw b/etc.raw index 6d98cdd..8eff0a0 100644 --- a/etc.raw +++ b/etc.raw @@ -4,12 +4,12 @@ # to block devices # # The format of this file is: -# raw: +# raw: # # example: # --------- -# raw1:hdb1 +# raw1:sdb1 # -# this means: bind /dev/raw/raw1 to /dev/hdb1 +# this means: bind /dev/raw/raw1 to /dev/sdb1 # # ... diff --git a/python-libmount.changes b/python-libmount.changes index ea48eb4..86c3c6a 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,47 @@ +------------------------------------------------------------------- +Fri Feb 10 10:40:23 UTC 2017 - fbui@suse.com + +- presets are managed by the branding presets package (bsc#1012850) + + The default activation state is defined by the branding preset + package. + + This also get rid of the only use of the rpm preset macros so we can + kill them. + +------------------------------------------------------------------- +Wed Feb 8 18:16:22 CET 2017 - sbrabec@suse.com + +- Merge SLE12 SP3 changes to make the package compatible with + Tumbleweed, SLE12 SP3 and Leap 42.3. +- Drop patch tests-script-race-on-force-only.patch from SLE12 SP3 + and Leap 42.3. Upstream has a different workaround. + https://github.com/karelzak/util-linux/issues/296 +- INCOMPATIBLE CHANGE for SLE12 SP3 and Leap 42.3: + losetup -L changes its meaning from SLE12 SP1&SP2 specific + --logical-blocksize to the upstream --nooverlap). + --logical-blocksize can be used only with long option. +- Include SLE12 + Leap 42 exclusive feature, implemented by + hare@suse.de: + * losetup: Add support for setting logical blocksizes + (bsc#931634, FATE#319010) + + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch + +------------------------------------------------------------------- +Tue Feb 7 20:07:55 CET 2017 - sbrabec@suse.com + +- Update to version 2.29.1: + * lscpu: add aarch64 specific names + * lubmount: Disable disable ro/rw mtab checks (bsc#1012632) + * More details at: + https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29.1-ReleaseNotes + +------------------------------------------------------------------- +Tue Feb 7 18:31:04 CET 2017 - sbrabec@suse.com + +- Replace raw initscript by a systemd service doing the same thing. + Based on previous work of fcrozat@suse.com (FATE#321122). + ------------------------------------------------------------------- Thu Jan 5 12:34:33 UTC 2017 - sweet_f_a@gmx.de diff --git a/python-libmount.spec b/python-libmount.spec index e21be5f..82bc4f7 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -16,7 +16,11 @@ # +%if 0%{?suse_version} >= 1330 %bcond_without enable_last +%else +%bcond_with enable_last +%endif Name: python-libmount %define _name util-linux @@ -112,7 +116,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.29 +Version: 2.29.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -123,7 +127,7 @@ Release: 0 Url: https://www.kernel.org/pub/linux/utils/util-linux/ Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc -Source4: raw.init +Source4: raw.service Source5: etc.raw Source6: etc_filesystems Source7: baselibs.conf @@ -150,7 +154,9 @@ Source51: blkid.conf ## util-linux patches ## # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path -Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff +Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff +# PATCH-FEATURE-SLE util-linux-losetup-Add-support-for-setting-logical-blocksize.patch bsc931634 FATE319010 hare@suse.de -- Add support for setting logical blocksizes. +Patch1: util-linux-losetup-Add-support-for-setting-logical-blocksize.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -159,7 +165,6 @@ Provides: fsck-with-dev-lock = %{version} # bnc#651598: Provides: util-linux(fake+no-canonicalize) PreReq: %install_info_prereq permissions -PreReq: %insserv_prereq %fillup_prereq /bin/sed Recommends: %{name}-lang = %{version} Provides: eject = 2.1.0-166.8 Provides: login = 4.0-33.7 @@ -174,6 +179,8 @@ Conflicts: coreutils < 8.21 Conflicts: sysvinit-tools < 2.88+-87 # File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3). Conflicts: bash-completion <= 2.1-13.1 +# The preset is provided by the presets branding package since 0.4 (bsc#1012850) +Conflicts: systemd-presets-branding < 0.4 # bnc#805684: %ifarch s390x Obsoletes: s390-32 @@ -189,6 +196,13 @@ Obsoletes: uuid-runtime < %{version}-%{release} Recommends: adjtimex Recommends: time Recommends: which +# +%if 0%{?suse_version} < 1330 +# Using Conflicts as util-linux-losetup-Add-support-for-setting-logical-blocksize +# now uses bit 5 of lo_flags with meaning LO_FLAGS_BLOCKSIZE bsc#966891 +# +Conflicts: kernel < 4.4 +%endif %else %if %build_python_libmount %else @@ -383,7 +397,11 @@ library. %endif %prep %setup -q -n %{_name}-%{version} -b 40 -%patch4 -p1 +%patch0 -p1 +%if 0%{?suse_version} < 1330 +# logical block size support in loop does not exist in Tumbleweed and upstream kernel yet +%patch1 -p1 +%endif # # setctsid cp -p %{S:22} %{S:23} . @@ -599,7 +617,7 @@ exit "$result" %install %if %build_util_linux -mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} +mkdir -p %{buildroot}{%{_sysconfdir}/{pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote @@ -608,7 +626,6 @@ install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su -mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates pushd ../klogconsole # klogconsole install make install DEST=%{buildroot} @@ -672,8 +689,8 @@ echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir} chmod 755 %{buildroot}%{_sbindir}/flushb # Install scripts to configure raw devices at boot time install -m 644 $RPM_SOURCE_DIR%{_sysconfdir}.raw %{buildroot}%{_sysconfdir}/raw -install -m 755 $RPM_SOURCE_DIR/raw.init %{buildroot}%{_initddir}/raw -ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw +install -m 644 $RPM_SOURCE_DIR/raw.service %{buildroot}%{_unitdir} +ln -sf service %{buildroot}%{_sbindir}/rcraw # upstream moved getopt examples from datadir to docdir but we keep # the old location because we would need to fix the manpage first mv %{buildroot}%{_docdir}/%{_name}/getopt %{buildroot}%{_datadir}/ @@ -732,14 +749,11 @@ mkdir -p %{buildroot}/bin mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid mkdir -p %{buildroot}/run/uuidd -mkdir -p %{buildroot}/usr/lib/systemd/system-preset ln -s %{_bindir}/logger %{buildroot}/bin # clock.txt from uuidd is a ghost file touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt ln -sf /sbin/service %{buildroot}/usr/sbin/rcuuidd ln -sf /sbin/service %{buildroot}/usr/sbin/rcfstrim -# Use socket activated uuidd by default. -echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/systemd/system-preset/50-uuidd.preset %if !%build_util_linux %make_install %endif @@ -748,8 +762,11 @@ echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/system %fdupes -s %{buildroot}%{_prefix} %if %build_util_linux +%pre +%{service_add_pre raw.service} + %post -%{fillup_and_insserv raw} +%{service_add_post raw.service} %set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount %set_permissions %{_bindir}/su # Safely migrate PAM files from coreutils to util-linux @@ -775,8 +792,11 @@ if [ -f etc/fstab ]; then sed -i 's:code=:codepage=:' etc/fstab fi +%preun +%{service_del_preun raw.service} + %postun -%{insserv_cleanup} +%{service_del_postun raw.service} %verifyscript %verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount @@ -825,7 +845,6 @@ fi /usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ -d /var/run/uuidd uuidd 2>/dev/null || : %{service_add_pre uuidd.socket uuidd.service} -%{?systemd_preset_pre} %post -n uuidd %{service_add_post uuidd.socket uuidd.service} @@ -836,8 +855,6 @@ fi %postun -n uuidd %{service_del_postun uuidd.socket uuidd.service} -%posttrans -p /bin/bash -n uuidd -%{?systemd_preset_posttrans} %endif %if %build_util_linux @@ -860,7 +877,7 @@ fi %doc Documentation/modems-with-agetty.txt %doc Documentation/mount.txt %doc Documentation/pg.txt -%config %attr(744,root,root) %{_sysconfdir}/init.d/raw +%{_unitdir}/raw.service %config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw %config(noreplace) %{_sysconfdir}/filesystems %config(noreplace) %{_sysconfdir}/blkid.conf @@ -1115,6 +1132,8 @@ fi %dir %{_datadir}/getopt %attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh +# These directories should be owned by bash-completion. But we don't want to +# install them on build, so own these two directories: %dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/* @@ -1251,6 +1270,15 @@ fi /bin/logger %{_bindir}/logger %{_bindir}/lslogins +#BEGIN bootstrap_hack +%if 0%{?suse_version} < 1330 +# Build images of some products use util-linux that does not come from this +# spec and does not own bash-completion dir. So we have to own own these two +# directories in util-linux-systemd as well: +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%endif +#END bootstrap_hack %{_datadir}/bash-completion/completions/logger %{_datadir}/bash-completion/completions/lslogins %{_mandir}/man1/logger.1.gz @@ -1270,7 +1298,6 @@ fi %{_sbindir}/rcuuidd %{_unitdir}/uuidd.service %{_unitdir}/uuidd.socket -/usr/lib/systemd/system-preset/50-uuidd.preset %endif %if %build_python_libmount diff --git a/raw.init b/raw.init deleted file mode 100644 index 3b5d849..0000000 --- a/raw.init +++ /dev/null @@ -1,62 +0,0 @@ -#! /bin/sh -# Copyright (c) 1995-2001 SuSE GmbH Nuernberg, Germany. -# -# Author: Dirk Lerner -# -# /etc/init.d/raw -# -# and symbolic its link -# -# /usr/sbin/rcraw -# -### BEGIN INIT INFO -# Provides: raw -# Required-Start: $local_fs $remote_fs -# Required-Stop: $local_fs $remote_fs -# Default-Start: 2 3 5 -# Default-Stop: 0 1 6 -# Short-Description: raw devices -# Description: raw-devices -### END INIT INFO - -. /etc/rc.status - -CONFIG=/etc/raw -RAW_BIN=/sbin/raw -RAW_MODULE=raw -test -x $RAW_BIN || exit 5 - -if [ ! -f $CONFIG ];then - echo "file: $CONFIG not found" - exit 6 -fi - -rc_reset -case "$1" in - start) - /sbin/modprobe $RAW_MODULE && sleep 2 - line=`grep -v ^# < $CONFIG` - - for i in $line;do - rawdev=`echo $i | cut -f1 -d:` - rawbind=`echo $i | cut -f2- -d:` - echo -n "bind /dev/raw/$rawdev to /dev/$rawbind..." - $RAW_BIN /dev/raw/$rawdev /dev/$rawbind > /dev/null 2>&1 - rc_status -v - done - ;; - stop) - echo -n "to unbind the rawdevice please perform a system shutdown" - rc_failed 3 - rc_status -v - ;; - status) - $RAW_BIN -qa 2> /dev/null - rc_status -v - ;; - *) - echo "Usage: $0 {start|stop|status}" - exit 1 - ;; -esac -rc_exit diff --git a/raw.service b/raw.service new file mode 100644 index 0000000..37d53b3 --- /dev/null +++ b/raw.service @@ -0,0 +1,17 @@ +[Unit] +Description=raw devices +After=local-fs.target remote-fs.target + +[Service] +Type=oneshot +ExecStart=/bin/sh -c "\ + /sbin/modprobe raw;\ + /sbin/udevadm settle;\ + for i in `grep -v ^# /etc/raw`; do\ + rawdev=`echo $i | cut -f1 -d:`;\ + rawbind=`echo $i | cut -f2- -d:`;\ + /usr/sbin/raw /dev/raw/$rawdev /dev/$rawbind;\ + done" + +[Install] +WantedBy=multi-user.target diff --git a/util-linux-2.29.1.tar.sign b/util-linux-2.29.1.tar.sign new file mode 100644 index 0000000..ee6ab49 --- /dev/null +++ b/util-linux-2.29.1.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCAAGBQJYghWjAAoJEOS3HV7sOcKEsRsP/Rhl+vlB9TQmxHF4EhglTJMv +i8x65Eq4WznF+qf9ZMZ4qSrsfS/FqvIccw9MWEywj3lAHBx05jhW5Bx6vEzFijiS +CuzRcx+5UuO6DQHxySIRqxromCRaCNzUnNhZfFVlJo1EAD1TVzuF62otCRHxE6F+ +NMjw9+PAPrYT00L6I3AzIHc7t+EgZX6Cyr2Yb22VQnTIJc8E7XfiA7iXgjdhqsn9 +kKUl4kUDGZULX9cIjRkbaVIR7Z8+DH0LcA7QyvA+Xw3fu4UGVCRHR5EquUWEplQD +1rycHxEjRvOjheZCHdAUlhzHguNm2xVSTtcLjvMieMOM60pNxijLibhKkMmqkjJX +e/CLWFHPLnxpJ+WPRUAA5qVrpRjkUm3Wh5O/TBytICQUPTRw7wG4WPgOtgpq3aSr +aet8iClLZkAw7wNS3O+VTRZuzB+mfbguRR7S2o0UemmEBJ9Y4nkaZN/SyT/aX4t0 +vhvM3tbIgw3sGozEsYMjzO/iQTDRIi284DVnfPS7Y1A2RY5lDkSzKowiL9X1vh61 +5tapPthH4Fmss+sd/mC6W3XiBRvLR32l6gTq1M4kMPVKZ3XPlo2uvNbTiL93nI1q +DDWSzORi+bSsjMGUYU3VDlzqnsrhwxzdCNl6eA+/Y65tRwQNmOPpBVkSOfp+Fqy9 +R6VzZW/Y6fWxPojd34A2 +=OXAT +-----END PGP SIGNATURE----- diff --git a/util-linux-2.29.1.tar.xz b/util-linux-2.29.1.tar.xz new file mode 100644 index 0000000..09ad2cd --- /dev/null +++ b/util-linux-2.29.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ce40600b934ec2fecfa6bfc4efe6982d051ba96c2832b05201347aec582f54f +size 4278756 diff --git a/util-linux-2.29.tar.sign b/util-linux-2.29.tar.sign deleted file mode 100644 index b17a572..0000000 --- a/util-linux-2.29.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQIcBAABCAAGBQJYIa+yAAoJEOS3HV7sOcKEkPEQAJ6qcx836hUP93e+q8lH7Anf -6odYlxYWC5Pgb8Qopn1KDMh5c3GAbPrnbSoVRKS3jvc24uZuhlCCwYnJbcmEt/+L -am+/zQyIF9T5ZwTadnGD2bkYXI5N9eS4R5O0N/OdBTgsVr9rjZ318zHg+8YCUZN0 -hCh4e1UlUC8uL7C/WgeLW/+kN+D+/1KJISDerkw+u5FFPZGWcPcYPh7ofi4ZyV/h -OPgvaEHt3/IxsZnuUNtIEVhFBpabjdwLkXm1LQ26XLnkdipBuuadVB8jaSLUz29J -rkNVI0iiH9vq5abE0wDIzQ2Lt4Lv65fQM7dmw/Ek188tZn9MyX8vT+C5Vyu+EFtU -K+1BwMVNqfW5hZHPM2z7izO/ml77wnydEFGy9GZZpLqQAzUGgsQDC3JbiczC7Qfq -bTFGhz32sHp/2gyOqciwhLPzWxD6jOLVG84vC9Obvtm+xQEfvLa71FnHdcLU3uZA -uZHt50WSuusZJtCWDhhLgfV6NV7c+YB1tELfrStlXAHyZT3Ws0pNPv+5Sue81dGt -uYVOOlXd+5qVpcgJRs5ai86yzv65kCeqmDsSAiHMIwPfFYBOeYessiRmWpqJXTt2 -S38j00fHFbNh5qqgDyso6myan4ZNLVIpihZLT2JLJqxEnf4ILZVV7krNW9p09teq -afEkNizqGL/NF2I7ltpe -=5e/s ------END PGP SIGNATURE----- diff --git a/util-linux-2.29.tar.xz b/util-linux-2.29.tar.xz deleted file mode 100644 index 1107cb6..0000000 --- a/util-linux-2.29.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2c59ea67cc7b564104f60532f6e0a95fe17a91acb870ba8fd7e986f273abf9e7 -size 4249020 diff --git a/util-linux-losetup-Add-support-for-setting-logical-blocksize.patch b/util-linux-losetup-Add-support-for-setting-logical-blocksize.patch new file mode 100644 index 0000000..723355d --- /dev/null +++ b/util-linux-losetup-Add-support-for-setting-logical-blocksize.patch @@ -0,0 +1,140 @@ +Index: util-linux-2.29/include/loopdev.h +=================================================================== +--- util-linux-2.29.orig/include/loopdev.h ++++ util-linux-2.29/include/loopdev.h +@@ -41,6 +41,7 @@ enum { + LO_FLAGS_AUTOCLEAR = 4, /* kernel >= 2.6.25 */ + LO_FLAGS_PARTSCAN = 8, /* kernel >= 3.2 */ + LO_FLAGS_DIRECT_IO = 16, /* kernel >= 4.2 */ ++ LO_FLAGS_BLOCKSIZE = 32, /* Tentative */ + }; + + #define LO_NAME_SIZE 64 +@@ -120,7 +121,8 @@ enum { + LOOPDEV_FL_NOIOCTL = (1 << 6), + LOOPDEV_FL_DEVSUBDIR = (1 << 7), + LOOPDEV_FL_CONTROL = (1 << 8), /* system with /dev/loop-control */ +- LOOPDEV_FL_SIZELIMIT = (1 << 9) ++ LOOPDEV_FL_SIZELIMIT = (1 << 9), ++ LOOPDEV_FL_BLOCKSIZE = (1 << 10) + }; + + /* +@@ -173,6 +175,7 @@ int loopcxt_set_offset(struct loopdev_cx + int loopcxt_set_sizelimit(struct loopdev_cxt *lc, uint64_t sizelimit); + int loopcxt_set_flags(struct loopdev_cxt *lc, uint32_t flags); + int loopcxt_set_backing_file(struct loopdev_cxt *lc, const char *filename); ++int loopcxt_set_blocksize(struct loopdev_cxt *lc, uint64_t blocksize); + + extern char *loopcxt_get_backing_file(struct loopdev_cxt *lc); + extern int loopcxt_get_backing_devno(struct loopdev_cxt *lc, dev_t *devno); +Index: util-linux-2.29/lib/loopdev.c +=================================================================== +--- util-linux-2.29.orig/lib/loopdev.c ++++ util-linux-2.29/lib/loopdev.c +@@ -1115,6 +1115,26 @@ int loopcxt_set_backing_file(struct loop + } + + /* ++ * @lc: context ++ * @blocksize: logical blocksize for the device ++ * ++ * The setting is removed by loopcxt_set_device() loopcxt_next()! ++ * ++ * Returns: 0 on success, <0 on error. ++ */ ++int loopcxt_set_blocksize(struct loopdev_cxt *lc, uint64_t blocksize) ++{ ++ if (!lc) ++ return -EINVAL; ++ ++ lc->info.lo_init[0] = blocksize; ++ lc->info.lo_flags |= LO_FLAGS_BLOCKSIZE; ++ ++ DBG(CXT, ul_debugobj(lc, "set blocksize=%llu", (long long unsigned int)lc->info.lo_init[0])); ++ return 0; ++} ++ ++/* + * In kernels prior to v3.9, if the offset or sizelimit options + * are used, the block device's size won't be synced automatically. + * blockdev --getsize64 and filesystems will use the backing +Index: util-linux-2.29/sys-utils/losetup.c +=================================================================== +--- util-linux-2.29.orig/sys-utils/losetup.c ++++ util-linux-2.29/sys-utils/losetup.c +@@ -398,6 +398,7 @@ static void usage(FILE *out) + + fputs(_(" -o, --offset start at offset into file\n"), out); + fputs(_(" --sizelimit device is limited to bytes of the file\n"), out); ++ fputs(_(" -L, --logical-blocksize set the logical block size to \n"), out); + fputs(_(" -P, --partscan create a partitioned loop device\n"), out); + fputs(_(" -r, --read-only set up a read-only loop device\n"), out); + fputs(_(" --direct-io[=] open backing file with O_DIRECT\n"), out); +@@ -447,7 +448,8 @@ static void warn_size(const char *filena + + static int create_loop(struct loopdev_cxt *lc, + int nooverlap, int lo_flags, int flags, +- const char *file, uint64_t offset, uint64_t sizelimit) ++ const char *file, uint64_t offset, uint64_t sizelimit, ++ uint64_t blocksize) + { + int hasdev = loopcxt_has_device(lc); + int rc = 0; +@@ -533,6 +535,8 @@ static int create_loop(struct loopdev_cx + loopcxt_set_offset(lc, offset); + if (flags & LOOPDEV_FL_SIZELIMIT) + loopcxt_set_sizelimit(lc, sizelimit); ++ if (flags & LOOPDEV_FL_BLOCKSIZE) ++ loopcxt_set_blocksize(lc, blocksize); + if (lo_flags) + loopcxt_set_flags(lc, lo_flags); + if ((rc = loopcxt_set_backing_file(lc, file))) { +@@ -561,7 +565,7 @@ int main(int argc, char **argv) + struct loopdev_cxt lc; + int act = 0, flags = 0, no_overlap = 0, c; + char *file = NULL; +- uint64_t offset = 0, sizelimit = 0; ++ uint64_t offset = 0, sizelimit = 0, blocksize = 0; + int res = 0, showdev = 0, lo_flags = 0; + char *outarg = NULL; + int list = 0; +@@ -571,7 +575,8 @@ int main(int argc, char **argv) + OPT_SIZELIMIT = CHAR_MAX + 1, + OPT_SHOW, + OPT_RAW, +- OPT_DIO ++ OPT_DIO, ++ OPT_BLOCKSIZE + }; + static const struct option longopts[] = { + { "all", 0, 0, 'a' }, +@@ -584,6 +589,7 @@ int main(int argc, char **argv) + { "associated", 1, 0, 'j' }, + { "json", 0, 0, 'J' }, + { "list", 0, 0, 'l' }, ++ { "logical-blocksize", 1, 0, 'L' }, + { "noheadings", 0, 0, 'n' }, + { "offset", 1, 0, 'o' }, + { "output", 1, 0, 'O' }, +@@ -657,6 +663,10 @@ int main(int argc, char **argv) + act = A_SHOW; + file = optarg; + break; ++ case OPT_BLOCKSIZE: ++ blocksize = strtosize_or_err(optarg, _("failed to parse logical block size")); ++ flags |= LOOPDEV_FL_BLOCKSIZE; ++ break; + case 'l': + list = 1; + break; +@@ -789,7 +799,8 @@ int main(int argc, char **argv) + + switch (act) { + case A_CREATE: +- res = create_loop(&lc, no_overlap, lo_flags, flags, file, offset, sizelimit); ++ res = create_loop(&lc, no_overlap, lo_flags, flags, file, offset, ++ sizelimit, blocksize); + if (res == 0) { + if (showdev) + printf("%s\n", loopcxt_get_device(&lc)); diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index ea48eb4..86c3c6a 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,47 @@ +------------------------------------------------------------------- +Fri Feb 10 10:40:23 UTC 2017 - fbui@suse.com + +- presets are managed by the branding presets package (bsc#1012850) + + The default activation state is defined by the branding preset + package. + + This also get rid of the only use of the rpm preset macros so we can + kill them. + +------------------------------------------------------------------- +Wed Feb 8 18:16:22 CET 2017 - sbrabec@suse.com + +- Merge SLE12 SP3 changes to make the package compatible with + Tumbleweed, SLE12 SP3 and Leap 42.3. +- Drop patch tests-script-race-on-force-only.patch from SLE12 SP3 + and Leap 42.3. Upstream has a different workaround. + https://github.com/karelzak/util-linux/issues/296 +- INCOMPATIBLE CHANGE for SLE12 SP3 and Leap 42.3: + losetup -L changes its meaning from SLE12 SP1&SP2 specific + --logical-blocksize to the upstream --nooverlap). + --logical-blocksize can be used only with long option. +- Include SLE12 + Leap 42 exclusive feature, implemented by + hare@suse.de: + * losetup: Add support for setting logical blocksizes + (bsc#931634, FATE#319010) + + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch + +------------------------------------------------------------------- +Tue Feb 7 20:07:55 CET 2017 - sbrabec@suse.com + +- Update to version 2.29.1: + * lscpu: add aarch64 specific names + * lubmount: Disable disable ro/rw mtab checks (bsc#1012632) + * More details at: + https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29.1-ReleaseNotes + +------------------------------------------------------------------- +Tue Feb 7 18:31:04 CET 2017 - sbrabec@suse.com + +- Replace raw initscript by a systemd service doing the same thing. + Based on previous work of fcrozat@suse.com (FATE#321122). + ------------------------------------------------------------------- Thu Jan 5 12:34:33 UTC 2017 - sweet_f_a@gmx.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index baa5501..583e8a8 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -16,7 +16,11 @@ # +%if 0%{?suse_version} >= 1330 %bcond_without enable_last +%else +%bcond_with enable_last +%endif Name: util-linux-systemd %define _name util-linux @@ -112,7 +116,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.29 +Version: 2.29.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -123,7 +127,7 @@ Release: 0 Url: https://www.kernel.org/pub/linux/utils/util-linux/ Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc -Source4: raw.init +Source4: raw.service Source5: etc.raw Source6: etc_filesystems Source7: baselibs.conf @@ -150,7 +154,9 @@ Source51: blkid.conf ## util-linux patches ## # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path -Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff +Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff +# PATCH-FEATURE-SLE util-linux-losetup-Add-support-for-setting-logical-blocksize.patch bsc931634 FATE319010 hare@suse.de -- Add support for setting logical blocksizes. +Patch1: util-linux-losetup-Add-support-for-setting-logical-blocksize.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -159,7 +165,6 @@ Provides: fsck-with-dev-lock = %{version} # bnc#651598: Provides: util-linux(fake+no-canonicalize) PreReq: %install_info_prereq permissions -PreReq: %insserv_prereq %fillup_prereq /bin/sed Recommends: %{name}-lang = %{version} Provides: eject = 2.1.0-166.8 Provides: login = 4.0-33.7 @@ -174,6 +179,8 @@ Conflicts: coreutils < 8.21 Conflicts: sysvinit-tools < 2.88+-87 # File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3). Conflicts: bash-completion <= 2.1-13.1 +# The preset is provided by the presets branding package since 0.4 (bsc#1012850) +Conflicts: systemd-presets-branding < 0.4 # bnc#805684: %ifarch s390x Obsoletes: s390-32 @@ -189,6 +196,13 @@ Obsoletes: uuid-runtime < %{version}-%{release} Recommends: adjtimex Recommends: time Recommends: which +# +%if 0%{?suse_version} < 1330 +# Using Conflicts as util-linux-losetup-Add-support-for-setting-logical-blocksize +# now uses bit 5 of lo_flags with meaning LO_FLAGS_BLOCKSIZE bsc#966891 +# +Conflicts: kernel < 4.4 +%endif %else %if %build_python_libmount %else @@ -383,7 +397,11 @@ library. %endif %prep %setup -q -n %{_name}-%{version} -b 40 -%patch4 -p1 +%patch0 -p1 +%if 0%{?suse_version} < 1330 +# logical block size support in loop does not exist in Tumbleweed and upstream kernel yet +%patch1 -p1 +%endif # # setctsid cp -p %{S:22} %{S:23} . @@ -599,7 +617,7 @@ exit "$result" %install %if %build_util_linux -mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} +mkdir -p %{buildroot}{%{_sysconfdir}/{pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote @@ -608,7 +626,6 @@ install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su -mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates pushd ../klogconsole # klogconsole install make install DEST=%{buildroot} @@ -672,8 +689,8 @@ echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir} chmod 755 %{buildroot}%{_sbindir}/flushb # Install scripts to configure raw devices at boot time install -m 644 $RPM_SOURCE_DIR%{_sysconfdir}.raw %{buildroot}%{_sysconfdir}/raw -install -m 755 $RPM_SOURCE_DIR/raw.init %{buildroot}%{_initddir}/raw -ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw +install -m 644 $RPM_SOURCE_DIR/raw.service %{buildroot}%{_unitdir} +ln -sf service %{buildroot}%{_sbindir}/rcraw # upstream moved getopt examples from datadir to docdir but we keep # the old location because we would need to fix the manpage first mv %{buildroot}%{_docdir}/%{_name}/getopt %{buildroot}%{_datadir}/ @@ -732,14 +749,11 @@ mkdir -p %{buildroot}/bin mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid mkdir -p %{buildroot}/run/uuidd -mkdir -p %{buildroot}/usr/lib/systemd/system-preset ln -s %{_bindir}/logger %{buildroot}/bin # clock.txt from uuidd is a ghost file touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt ln -sf /sbin/service %{buildroot}/usr/sbin/rcuuidd ln -sf /sbin/service %{buildroot}/usr/sbin/rcfstrim -# Use socket activated uuidd by default. -echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/systemd/system-preset/50-uuidd.preset %if !%build_util_linux %make_install %endif @@ -748,8 +762,11 @@ echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/system %fdupes -s %{buildroot}%{_prefix} %if %build_util_linux +%pre +%{service_add_pre raw.service} + %post -%{fillup_and_insserv raw} +%{service_add_post raw.service} %set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount %set_permissions %{_bindir}/su # Safely migrate PAM files from coreutils to util-linux @@ -775,8 +792,11 @@ if [ -f etc/fstab ]; then sed -i 's:code=:codepage=:' etc/fstab fi +%preun +%{service_del_preun raw.service} + %postun -%{insserv_cleanup} +%{service_del_postun raw.service} %verifyscript %verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount @@ -825,7 +845,6 @@ fi /usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ -d /var/run/uuidd uuidd 2>/dev/null || : %{service_add_pre uuidd.socket uuidd.service} -%{?systemd_preset_pre} %post -n uuidd %{service_add_post uuidd.socket uuidd.service} @@ -836,8 +855,6 @@ fi %postun -n uuidd %{service_del_postun uuidd.socket uuidd.service} -%posttrans -p /bin/bash -n uuidd -%{?systemd_preset_posttrans} %endif %if %build_util_linux @@ -860,7 +877,7 @@ fi %doc Documentation/modems-with-agetty.txt %doc Documentation/mount.txt %doc Documentation/pg.txt -%config %attr(744,root,root) %{_sysconfdir}/init.d/raw +%{_unitdir}/raw.service %config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw %config(noreplace) %{_sysconfdir}/filesystems %config(noreplace) %{_sysconfdir}/blkid.conf @@ -1115,6 +1132,8 @@ fi %dir %{_datadir}/getopt %attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh +# These directories should be owned by bash-completion. But we don't want to +# install them on build, so own these two directories: %dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/* @@ -1251,6 +1270,15 @@ fi /bin/logger %{_bindir}/logger %{_bindir}/lslogins +#BEGIN bootstrap_hack +%if 0%{?suse_version} < 1330 +# Build images of some products use util-linux that does not come from this +# spec and does not own bash-completion dir. So we have to own own these two +# directories in util-linux-systemd as well: +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%endif +#END bootstrap_hack %{_datadir}/bash-completion/completions/logger %{_datadir}/bash-completion/completions/lslogins %{_mandir}/man1/logger.1.gz @@ -1270,7 +1298,6 @@ fi %{_sbindir}/rcuuidd %{_unitdir}/uuidd.service %{_unitdir}/uuidd.socket -/usr/lib/systemd/system-preset/50-uuidd.preset %endif %if %build_python_libmount diff --git a/util-linux.changes b/util-linux.changes index ea48eb4..86c3c6a 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,47 @@ +------------------------------------------------------------------- +Fri Feb 10 10:40:23 UTC 2017 - fbui@suse.com + +- presets are managed by the branding presets package (bsc#1012850) + + The default activation state is defined by the branding preset + package. + + This also get rid of the only use of the rpm preset macros so we can + kill them. + +------------------------------------------------------------------- +Wed Feb 8 18:16:22 CET 2017 - sbrabec@suse.com + +- Merge SLE12 SP3 changes to make the package compatible with + Tumbleweed, SLE12 SP3 and Leap 42.3. +- Drop patch tests-script-race-on-force-only.patch from SLE12 SP3 + and Leap 42.3. Upstream has a different workaround. + https://github.com/karelzak/util-linux/issues/296 +- INCOMPATIBLE CHANGE for SLE12 SP3 and Leap 42.3: + losetup -L changes its meaning from SLE12 SP1&SP2 specific + --logical-blocksize to the upstream --nooverlap). + --logical-blocksize can be used only with long option. +- Include SLE12 + Leap 42 exclusive feature, implemented by + hare@suse.de: + * losetup: Add support for setting logical blocksizes + (bsc#931634, FATE#319010) + + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch + +------------------------------------------------------------------- +Tue Feb 7 20:07:55 CET 2017 - sbrabec@suse.com + +- Update to version 2.29.1: + * lscpu: add aarch64 specific names + * lubmount: Disable disable ro/rw mtab checks (bsc#1012632) + * More details at: + https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29.1-ReleaseNotes + +------------------------------------------------------------------- +Tue Feb 7 18:31:04 CET 2017 - sbrabec@suse.com + +- Replace raw initscript by a systemd service doing the same thing. + Based on previous work of fcrozat@suse.com (FATE#321122). + ------------------------------------------------------------------- Thu Jan 5 12:34:33 UTC 2017 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index 97b4276..2ab2c8f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -16,7 +16,11 @@ # +%if 0%{?suse_version} >= 1330 %bcond_without enable_last +%else +%bcond_with enable_last +%endif Name: util-linux %define _name util-linux @@ -112,7 +116,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.29 +Version: 2.29.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -123,7 +127,7 @@ Release: 0 Url: https://www.kernel.org/pub/linux/utils/util-linux/ Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc -Source4: raw.init +Source4: raw.service Source5: etc.raw Source6: etc_filesystems Source7: baselibs.conf @@ -150,7 +154,9 @@ Source51: blkid.conf ## util-linux patches ## # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path -Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff +Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff +# PATCH-FEATURE-SLE util-linux-losetup-Add-support-for-setting-logical-blocksize.patch bsc931634 FATE319010 hare@suse.de -- Add support for setting logical blocksizes. +Patch1: util-linux-losetup-Add-support-for-setting-logical-blocksize.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -159,7 +165,6 @@ Provides: fsck-with-dev-lock = %{version} # bnc#651598: Provides: util-linux(fake+no-canonicalize) PreReq: %install_info_prereq permissions -PreReq: %insserv_prereq %fillup_prereq /bin/sed Recommends: %{name}-lang = %{version} Provides: eject = 2.1.0-166.8 Provides: login = 4.0-33.7 @@ -174,6 +179,8 @@ Conflicts: coreutils < 8.21 Conflicts: sysvinit-tools < 2.88+-87 # File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3). Conflicts: bash-completion <= 2.1-13.1 +# The preset is provided by the presets branding package since 0.4 (bsc#1012850) +Conflicts: systemd-presets-branding < 0.4 # bnc#805684: %ifarch s390x Obsoletes: s390-32 @@ -189,6 +196,13 @@ Obsoletes: uuid-runtime < %{version}-%{release} Recommends: adjtimex Recommends: time Recommends: which +# +%if 0%{?suse_version} < 1330 +# Using Conflicts as util-linux-losetup-Add-support-for-setting-logical-blocksize +# now uses bit 5 of lo_flags with meaning LO_FLAGS_BLOCKSIZE bsc#966891 +# +Conflicts: kernel < 4.4 +%endif %else %if %build_python_libmount %else @@ -383,7 +397,11 @@ library. %endif %prep %setup -q -n %{_name}-%{version} -b 40 -%patch4 -p1 +%patch0 -p1 +%if 0%{?suse_version} < 1330 +# logical block size support in loop does not exist in Tumbleweed and upstream kernel yet +%patch1 -p1 +%endif # # setctsid cp -p %{S:22} %{S:23} . @@ -599,7 +617,7 @@ exit "$result" %install %if %build_util_linux -mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} +mkdir -p %{buildroot}{%{_sysconfdir}/{pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote @@ -608,7 +626,6 @@ install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su -mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates pushd ../klogconsole # klogconsole install make install DEST=%{buildroot} @@ -672,8 +689,8 @@ echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir} chmod 755 %{buildroot}%{_sbindir}/flushb # Install scripts to configure raw devices at boot time install -m 644 $RPM_SOURCE_DIR%{_sysconfdir}.raw %{buildroot}%{_sysconfdir}/raw -install -m 755 $RPM_SOURCE_DIR/raw.init %{buildroot}%{_initddir}/raw -ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw +install -m 644 $RPM_SOURCE_DIR/raw.service %{buildroot}%{_unitdir} +ln -sf service %{buildroot}%{_sbindir}/rcraw # upstream moved getopt examples from datadir to docdir but we keep # the old location because we would need to fix the manpage first mv %{buildroot}%{_docdir}/%{_name}/getopt %{buildroot}%{_datadir}/ @@ -732,14 +749,11 @@ mkdir -p %{buildroot}/bin mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid mkdir -p %{buildroot}/run/uuidd -mkdir -p %{buildroot}/usr/lib/systemd/system-preset ln -s %{_bindir}/logger %{buildroot}/bin # clock.txt from uuidd is a ghost file touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt ln -sf /sbin/service %{buildroot}/usr/sbin/rcuuidd ln -sf /sbin/service %{buildroot}/usr/sbin/rcfstrim -# Use socket activated uuidd by default. -echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/systemd/system-preset/50-uuidd.preset %if !%build_util_linux %make_install %endif @@ -748,8 +762,11 @@ echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/system %fdupes -s %{buildroot}%{_prefix} %if %build_util_linux +%pre +%{service_add_pre raw.service} + %post -%{fillup_and_insserv raw} +%{service_add_post raw.service} %set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount %set_permissions %{_bindir}/su # Safely migrate PAM files from coreutils to util-linux @@ -775,8 +792,11 @@ if [ -f etc/fstab ]; then sed -i 's:code=:codepage=:' etc/fstab fi +%preun +%{service_del_preun raw.service} + %postun -%{insserv_cleanup} +%{service_del_postun raw.service} %verifyscript %verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount @@ -825,7 +845,6 @@ fi /usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ -d /var/run/uuidd uuidd 2>/dev/null || : %{service_add_pre uuidd.socket uuidd.service} -%{?systemd_preset_pre} %post -n uuidd %{service_add_post uuidd.socket uuidd.service} @@ -836,8 +855,6 @@ fi %postun -n uuidd %{service_del_postun uuidd.socket uuidd.service} -%posttrans -p /bin/bash -n uuidd -%{?systemd_preset_posttrans} %endif %if %build_util_linux @@ -860,7 +877,7 @@ fi %doc Documentation/modems-with-agetty.txt %doc Documentation/mount.txt %doc Documentation/pg.txt -%config %attr(744,root,root) %{_sysconfdir}/init.d/raw +%{_unitdir}/raw.service %config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw %config(noreplace) %{_sysconfdir}/filesystems %config(noreplace) %{_sysconfdir}/blkid.conf @@ -1115,6 +1132,8 @@ fi %dir %{_datadir}/getopt %attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash %attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh +# These directories should be owned by bash-completion. But we don't want to +# install them on build, so own these two directories: %dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/* @@ -1251,6 +1270,15 @@ fi /bin/logger %{_bindir}/logger %{_bindir}/lslogins +#BEGIN bootstrap_hack +%if 0%{?suse_version} < 1330 +# Build images of some products use util-linux that does not come from this +# spec and does not own bash-completion dir. So we have to own own these two +# directories in util-linux-systemd as well: +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%endif +#END bootstrap_hack %{_datadir}/bash-completion/completions/logger %{_datadir}/bash-completion/completions/lslogins %{_mandir}/man1/logger.1.gz @@ -1270,7 +1298,6 @@ fi %{_sbindir}/rcuuidd %{_unitdir}/uuidd.service %{_unitdir}/uuidd.socket -/usr/lib/systemd/system-preset/50-uuidd.preset %endif %if %build_python_libmount From 7f2aa2aa8e04ef30e0c58991a997c3c7a5973d02a0b5a219485bc1e563382c46 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Tue, 25 Apr 2017 06:55:20 +0000 Subject: [PATCH 208/211] Accepting request 487606 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/487606 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=217 --- ...-sysfs-for-table-access-if-available.patch | 71 ++++++++++++ python-libmount.changes | 106 ++++++++++++++++-- python-libmount.spec | 31 ++--- util-linux-2.29.1.tar.sign | 17 --- util-linux-2.29.1.tar.xz | 3 - util-linux-2.29.2.tar.sign | 17 +++ util-linux-2.29.2.tar.xz | 3 + ...upport-for-setting-logical-blocksize.patch | 6 +- util-linux-systemd.changes | 106 ++++++++++++++++-- util-linux-systemd.spec | 31 ++--- util-linux.changes | 106 ++++++++++++++++-- util-linux.spec | 31 ++--- 12 files changed, 445 insertions(+), 83 deletions(-) create mode 100644 arm64-lscpu-use-sysfs-for-table-access-if-available.patch delete mode 100644 util-linux-2.29.1.tar.sign delete mode 100644 util-linux-2.29.1.tar.xz create mode 100644 util-linux-2.29.2.tar.sign create mode 100644 util-linux-2.29.2.tar.xz diff --git a/arm64-lscpu-use-sysfs-for-table-access-if-available.patch b/arm64-lscpu-use-sysfs-for-table-access-if-available.patch new file mode 100644 index 0000000..cbb20e9 --- /dev/null +++ b/arm64-lscpu-use-sysfs-for-table-access-if-available.patch @@ -0,0 +1,71 @@ +Return-Path: +Delivered-To: agraf@imap.suse.de +From: Ard Biesheuvel +To: util-linux-ng@vger.kernel.org +Cc: leif.lindholm@linaro.org, + agraf@suse.de, + kzak@redhat.com, + Ard Biesheuvel +Subject: [PATCH] lspcu: use sysfs for table access if available +Date: Wed, 12 Apr 2017 10:11:29 +0100 +Message-Id: <20170412091129.27283-1-ard.biesheuvel@linaro.org> +X-Mailer: git-send-email 2.9.3 + +On ARM systems, accessing SMBIOS tables via /dev/mem using read() +calls is not supported. The reason is that such tables are usually +located in EFI_RUNTIME_SERVICE_DATA memory, which is not covered +by the linear mapping on those systems, and so read() calls will +fail. + +So instead, use the /sys/firmware/dmi/tables/DMI sysfs file, which +contains the entire structure table array, and will be available +on any recent Linux system, even on ones that only export the rev3 +SMBIOS entry point, which is currently ignored by lscpu. + +Note that the max 'num' value is inferred from the size. This is not +a limitation of the sysfs interface, but a limitation of the rev3 +entry point, which no longer carries a number of array elements. + +Signed-off-by: Ard Biesheuvel +Signed-off-by: Alexander Graf +--- + sys-utils/lscpu-dmi.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/sys-utils/lscpu-dmi.c b/sys-utils/lscpu-dmi.c +index 0e497d10c..a8298ff74 100644 +--- a/sys-utils/lscpu-dmi.c ++++ b/sys-utils/lscpu-dmi.c +@@ -192,6 +192,18 @@ static int hypervisor_decode_smbios(uint8_t *buf, const char *devmem) + devmem); + } + ++static int hypervisor_decode_sysfw(void) ++{ ++ static char const sys_fw_dmi_tables[] = "/sys/firmware/dmi/tables/DMI"; ++ struct stat st; ++ ++ if (stat(sys_fw_dmi_tables, &st)) ++ return -1; ++ ++ return hypervisor_from_dmi_table(0, st.st_size, st.st_size / 4, ++ sys_fw_dmi_tables); ++} ++ + /* + * Probe for EFI interface + */ +@@ -242,6 +254,10 @@ int read_hypervisor_dmi(void) + || '\0' != 0) + return rc; + ++ rc = hypervisor_decode_sysfw(); ++ if (rc >= 0) ++ return rc; ++ + /* First try EFI (ia64, Intel-based Mac) */ + switch (address_from_efi(&fp)) { + case EFI_NOT_FOUND: +-- +2.11.0 + diff --git a/python-libmount.changes b/python-libmount.changes index 86c3c6a..2c9f0dd 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,47 @@ +------------------------------------------------------------------- +Wed Apr 12 09:19:21 UTC 2017 - agraf@suse.com + +- Prefer sysfs exported SMBIOS3 tables in lscu (bsc#1033718) + + arm64-lscpu-use-sysfs-for-table-access-if-available.patch + +------------------------------------------------------------------- +Thu Apr 6 17:35:34 CEST 2017 - sbrabec@suse.com + +- To cover release numbers of both SLE12 SP3 and Leap 42.3, relax + release based conflict with bash-completion from 13.1 to 10. + +------------------------------------------------------------------- +Tue Apr 4 14:51:09 UTC 2017 - sweet_f_a@gmx.de + +- fix util-linux-losetup-Add-support-for-setting-logical-blocksize.patch + --logical-blocksize was behaving like --nooverlap + +------------------------------------------------------------------- +Fri Mar 17 17:18:28 CET 2017 - sbrabec@suse.com + +- Conflict with old systemd-presets-branding to ensure correct + preset migration (boo#1029775, bsc#1012850). + +------------------------------------------------------------------- +Thu Mar 16 22:44:12 CET 2017 - sbrabec@suse.com + +- Drop "codepage" fstab migration needed for SuSE Linux < 9.1 + (bsc#51950 (suse#36950)). + +------------------------------------------------------------------- +Tue Feb 28 17:27:58 CET 2017 - sbrabec@suse.com + +- Keep dependency on insserv and fillup for compatibilitiy reasons + in Leap 42.3. Too many poorly written packages depend on it. + (Marked as "sysv compatibility hack".) + +------------------------------------------------------------------- +Wed Feb 22 22:00:05 UTC 2017 - sweet_f_a@gmx.de + +- Update to version 2.29.2: + * su(1) security issue CVE-2017-2616 (bsc#1023041) + * minor bugfixes and enhancements + ------------------------------------------------------------------- Fri Feb 10 10:40:23 UTC 2017 - fbui@suse.com @@ -20,12 +64,48 @@ Wed Feb 8 18:16:22 CET 2017 - sbrabec@suse.com - INCOMPATIBLE CHANGE for SLE12 SP3 and Leap 42.3: losetup -L changes its meaning from SLE12 SP1&SP2 specific --logical-blocksize to the upstream --nooverlap). - --logical-blocksize can be used only with long option. + --logical-blocksize can be used only with long option + (bsc#966891). - Include SLE12 + Leap 42 exclusive feature, implemented by hare@suse.de: * losetup: Add support for setting logical blocksizes (bsc#931634, FATE#319010) + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch + SLE12 & Leap 42 specific changes: + * Fix for SLE12: bsc#956540, SLE12 SP1: bsc#953691, Leap 42.1: + boo#954482, was obsoleted by the systemd update, and skipped. + * Remove --enable-ncurses that is intended to force non-wide + ncurses (boo#978993). + * Make release-dependent conflict with old sysvinit-tools SLE + specific, as it is required only for SLE 11 upgrade, + and breaks openSUSE staging builds (boo#994399). + * Obsolete these patches, now upstreamed: + * Drop upstreamed patches + (tests-script-race-on-force-only.patch, + util-linux-libmount-ignore-redundant-slashes.patch, + util-linux-sfdisk-show-pt-geometry-1.patch, + util-linux-sfdisk-show-pt-geometry-2.patch, + util-linux-sfdisk-show-pt-geometry-3.patch, + util-linux-libblkid-partition-loop.patch, + util-linux-libblkid-wipe-offset.patch, + util-linux-mount-reuse-loop-1.patch, + util-linux-mount-reuse-loop-2.patch, + util-linux-mount-reuse-loop-3.patch, + util-linux-mount-reuse-loop-4.patch, + util-linux-loop-reuse-01.patch, util-linux-loop-reuse-02.patch, + util-linux-loop-reuse-03.patch, util-linux-loop-reuse-04.patch, + util-linux-loop-reuse-05.patch, util-linux-loop-reuse-06.patch, + util-linux-loop-reuse-07.patch, util-linux-loop-reuse-08.patch, + util-linux-loop-reuse-09.patch, util-linux-loop-reuse-10.patch, + util-linux-loop-reuse-12.patch, util-linux-loop-reuse-13.patch, + util-linux-loop-reuse-14.patch, util-linux-loop-reuse-15.patch, + util-linux-loop-reuse-16.patch, util-linux-loop-reuse-17.patch, + util-linux-loop-reuse-18.patch, util-linux-loop-reuse-19.patch, + util-linux-loop-reuse-20.patch, + util-linux-libmount-cifs-is_mounted.patch). + * Refreshed patches + (make-sure-sbin-resp-usr-sbin-are-in-PATH.diff, + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch). ------------------------------------------------------------------- Tue Feb 7 20:07:55 CET 2017 - sbrabec@suse.com @@ -67,7 +147,7 @@ Wed Dec 7 16:12:55 CET 2016 - sbrabec@suse.com ------------------------------------------------------------------- Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de -- Update to version 2.29 +- Update to version 2.29 (FATE#322090) * cal: possible to specify month by name (e.g. "cal January 2017") and use relative placeholders (cal "+1 month") * fdisk(8) allows to wipe newly created partitions; the feature @@ -84,6 +164,11 @@ Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de mount all of them in the same time. The restriction is that the regions should not overlap. * lscpu supports the "drawer" topology for IBM S/390. + * sfdisk: Support for deprecated --show-pt-geometry (bsc#990531). + * libmount: various issues with cifs mount + (bsc#982331, bsc#987176). + * libblkid: Prevent infinite loop DoS while parsing DOS partition + tables (bsc#988361, CVE-2016-5011). * More details at: http://karelzak.blogspot.de/2016/10/util-linux-v229-whats-new.html https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes @@ -195,7 +280,7 @@ Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de openat-family functions anymore. * The python binding for libsmartcols is available in separate project at https://github.com/ignatenkobrain/python-smartcols - * Other bug fixes (bsc#970404, bsc#975082). + * Other bug fixes (bsc#970404, bsc#975082, FATE#318444). * Security issue: CVE-2016-2779 is NOT FIXED yet. - Remove old util-linux-noenc-suse.patch @@ -209,6 +294,7 @@ Wed Nov 11 15:46:46 UTC 2015 - sweet_f_a@gmx.de - Update to version 2.27.1, bugfix release, see ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes + (fixes bsc#950778, FATE#320552). ------------------------------------------------------------------- Wed Nov 11 11:25:25 UTC 2015 - schwab@suse.de @@ -240,7 +326,8 @@ Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com * rtcwake supports a news option --list-modes and --date, no support RTC_ALM_READ and RTC_ALM_SET fallbacks any more. * Many fixes, most notably: - * fsck: now supports -r {fd} (bsc#903738) + * fsck: now supports -r {fd} (bsc#923777, bsc#903738) + * Fix fsck -C {fd} parsing (bsc#923777, bsc#903738) * better handling of multi-path devices (bsc#880468, bsc#924994) * flock: improve timeout handling (bsc#926945) @@ -258,7 +345,7 @@ Tue Aug 4 20:31:55 CEST 2015 - sbrabec@suse.com - Add %systemd_preset_pre and %systemd_preset_posttrans that will do one shot presetting of uuidd.service on upgrade. - (bnc#900935#c46, FATE#318949). + (bnc#900935#c46, FATE#318949, FATE#317727). - Remove one shot presetting hacks. ------------------------------------------------------------------- @@ -304,7 +391,9 @@ Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz scripts; it's possible to save your partitioning layout to text files and (re)use it in all fdisks * fdisk(8), sfdisk(8): support new command-line option "--output - " to specify output columns for --list or print commands + " to specify output columns for --list or print commands, + do not abort when fdisk -l when device cannot be opened + [bnc#886790], [bnc#893712], [bnc#890351] * nsenter(1): has been updated to work with the latest kernel changes in user namespaces supports new command-line option --preserve-credentials @@ -324,10 +413,13 @@ Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz * logger(1): supports new command-line option --id= to specify PID (or another ID) allows to specify --rfc3164 or --rfc5424 syslog protocols + * lscpu: recognizes Unisys s-Par as hypervisor (FATE#318231) * libfdisk: the library is distributed as a shared library with a stable API and a standard header file * libmount: provides a new simple API to monitor mount-table changes (including changes in userspace mount options) + * libmount: Fix mount point lookup (and mount -a) if the path + contains // (bsc#931955). - Fix lack of I18N support in util-linux-systemd (mis-compilation). ------------------------------------------------------------------- @@ -403,7 +495,7 @@ Fri Oct 17 21:18:43 CEST 2014 - sbrabec@suse.cz Mon Sep 8 21:04:34 CEST 2014 - sbrabec@suse.cz - Install runuser and runuser-l PAM file - (runuser.pamd, bnc#892079). + (runuser.pamd, bnc#892079, bnc#894833). ------------------------------------------------------------------- Wed Sep 3 16:21:57 CEST 2014 - sbrabec@suse.cz diff --git a/python-libmount.spec b/python-libmount.spec index 82bc4f7..622fb47 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -116,7 +116,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.29.1 +Version: 2.29.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -125,7 +125,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz +Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.service Source5: etc.raw @@ -135,7 +135,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.sign +Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -157,6 +157,8 @@ Source51: blkid.conf Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FEATURE-SLE util-linux-losetup-Add-support-for-setting-logical-blocksize.patch bsc931634 FATE319010 hare@suse.de -- Add support for setting logical blocksizes. Patch1: util-linux-losetup-Add-support-for-setting-logical-blocksize.patch +# PATCH-BUG-FIX arm64-lscpu-use-sysfs-for-table-access-if-available.patch bsc#1033718 agraf@suse.de -- Use SMBIOS3 tables when available in lscpu +Patch2: arm64-lscpu-use-sysfs-for-table-access-if-available.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -178,9 +180,9 @@ Conflicts: coreutils < 8.21 # File conflict of sulogin and utmpdump (up to 12.3 and SLE11). Conflicts: sysvinit-tools < 2.88+-87 # File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3). -Conflicts: bash-completion <= 2.1-13.1 -# The preset is provided by the presets branding package since 0.4 (bsc#1012850) -Conflicts: systemd-presets-branding < 0.4 +Conflicts: bash-completion <= 2.1-10 +# The preset is provided by the presets branding package since 0.4 (bsc#1012850) and since 12.2 in SLE (boo#1029775) +Conflicts: systemd-presets-branding < 12.2 # bnc#805684: %ifarch s390x Obsoletes: s390-32 @@ -189,6 +191,15 @@ Provides: s390-32 # uuid-runtime appeared in SLE11 SP1 to SLE11 SP3 Provides: uuid-runtime = %{version}-%{release} Obsoletes: uuid-runtime < %{version}-%{release} +%if 0%{?suse_version} < 1330 +#BEGIN sysv compatibility hack +# After migration of raw init script to systemd, util-linux no more depends on +# fillup and insserv. Many poorly written packages implicitly depend on them +# without declaring it. Keep these dependencies in Leap 42 + SLE 12 line to +# prevent failures. +PreReq: %insserv_prereq %fillup_prereq +#END sysv compatibility hack +%endif # # Using "Requires" here would lend itself to help upgrading, but since # util-linux is in the initial bootstrap, that is not a good thing to do: @@ -402,6 +413,7 @@ library. # logical block size support in loop does not exist in Tumbleweed and upstream kernel yet %patch1 -p1 %endif +%patch2 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -787,11 +799,6 @@ for PAM_FILE in default/su pam.d/su pam.d/su-l ; do fi done -# mount option 'code=' is now called 'codepage=' so change fstab -if [ -f etc/fstab ]; then - sed -i 's:code=:codepage=:' etc/fstab -fi - %preun %{service_del_preun raw.service} @@ -854,7 +861,6 @@ fi %postun -n uuidd %{service_del_postun uuidd.socket uuidd.service} - %endif %if %build_util_linux @@ -1257,7 +1263,6 @@ fi %files -n libfdisk-devel-static %defattr(-, root, root) %{_libdir}/libfdisk.*a - %endif %if %build_util_linux_systemd diff --git a/util-linux-2.29.1.tar.sign b/util-linux-2.29.1.tar.sign deleted file mode 100644 index ee6ab49..0000000 --- a/util-linux-2.29.1.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQIcBAABCAAGBQJYghWjAAoJEOS3HV7sOcKEsRsP/Rhl+vlB9TQmxHF4EhglTJMv -i8x65Eq4WznF+qf9ZMZ4qSrsfS/FqvIccw9MWEywj3lAHBx05jhW5Bx6vEzFijiS -CuzRcx+5UuO6DQHxySIRqxromCRaCNzUnNhZfFVlJo1EAD1TVzuF62otCRHxE6F+ -NMjw9+PAPrYT00L6I3AzIHc7t+EgZX6Cyr2Yb22VQnTIJc8E7XfiA7iXgjdhqsn9 -kKUl4kUDGZULX9cIjRkbaVIR7Z8+DH0LcA7QyvA+Xw3fu4UGVCRHR5EquUWEplQD -1rycHxEjRvOjheZCHdAUlhzHguNm2xVSTtcLjvMieMOM60pNxijLibhKkMmqkjJX -e/CLWFHPLnxpJ+WPRUAA5qVrpRjkUm3Wh5O/TBytICQUPTRw7wG4WPgOtgpq3aSr -aet8iClLZkAw7wNS3O+VTRZuzB+mfbguRR7S2o0UemmEBJ9Y4nkaZN/SyT/aX4t0 -vhvM3tbIgw3sGozEsYMjzO/iQTDRIi284DVnfPS7Y1A2RY5lDkSzKowiL9X1vh61 -5tapPthH4Fmss+sd/mC6W3XiBRvLR32l6gTq1M4kMPVKZ3XPlo2uvNbTiL93nI1q -DDWSzORi+bSsjMGUYU3VDlzqnsrhwxzdCNl6eA+/Y65tRwQNmOPpBVkSOfp+Fqy9 -R6VzZW/Y6fWxPojd34A2 -=OXAT ------END PGP SIGNATURE----- diff --git a/util-linux-2.29.1.tar.xz b/util-linux-2.29.1.tar.xz deleted file mode 100644 index 09ad2cd..0000000 --- a/util-linux-2.29.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0ce40600b934ec2fecfa6bfc4efe6982d051ba96c2832b05201347aec582f54f -size 4278756 diff --git a/util-linux-2.29.2.tar.sign b/util-linux-2.29.2.tar.sign new file mode 100644 index 0000000..0cd5265 --- /dev/null +++ b/util-linux-2.29.2.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCAAGBQJYrYE9AAoJEOS3HV7sOcKEjB4P/2gYS9GoYqlJaCmPj+cpRl3u +nvKd3xl6HbDZVusmj3lTdXVUZu2UF0BzZa4jp/yErzjVyKEqwXij6IE/hX2GoyU1 +brqw8p9lWX7ARZAXc2v0B+u6Js8O1RY1hnprn+8L9MeJeGUxT4h2QqXmPk1gZrjb +b41yQhU21lAz3YSVf5zsmTy2wmgFZ8b8y3MYfLB9dWgCrL74xxCb3598YXf1tgG/ +Ig3oThWL2Z5in3GTPwPhawu/lNQxHgxVxVUL7ntLtdiqrdX+jG7FXEtgpOpiGtvg +T4U5iJt7kQhFZC2xMFhRa8nxW+LnuqR7k2vW8qwjGpH0NqBhMPOmHutgjfcHZ9iI +ENjQ2eVGo3kmniWZ5LgH+vVtf070QIoV5kCV8zSmMvGuCImamFxUcIqqSyhD6Z1V +aQWxhOj7PylxiOXDH7v0Uvo9euv9/Odv8AWWwJSn7nDGpu2o5jHSRxC2/r4nOqog ++SgQt+4vfD0Loei11ORimSEozeUmlvF/Wgdg+2XzHm3zRgI7pw+yB70xrn/TwPKz +iIL7jgwrlVe30QTjsht4KFFAVED0yJRwU2vZnVe71CaWwiVWcO5n5NsWZVg0RNvJ +xTwHbxs1JwLajgooQJ3YWnV1/b5vVZJFwMsrBNz8DLpZdKeIjdUVYZixN+l6uaSC +B+QbU2NQcwl0rESmYnzv +=V43B +-----END PGP SIGNATURE----- diff --git a/util-linux-2.29.2.tar.xz b/util-linux-2.29.2.tar.xz new file mode 100644 index 0000000..0bc6d42 --- /dev/null +++ b/util-linux-2.29.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:accea4d678209f97f634f40a93b7e9fcad5915d1f4749f6c47bee6bf110fe8e3 +size 4277668 diff --git a/util-linux-losetup-Add-support-for-setting-logical-blocksize.patch b/util-linux-losetup-Add-support-for-setting-logical-blocksize.patch index 723355d..664fb43 100644 --- a/util-linux-losetup-Add-support-for-setting-logical-blocksize.patch +++ b/util-linux-losetup-Add-support-for-setting-logical-blocksize.patch @@ -67,7 +67,7 @@ Index: util-linux-2.29/sys-utils/losetup.c fputs(_(" -o, --offset start at offset into file\n"), out); fputs(_(" --sizelimit device is limited to bytes of the file\n"), out); -+ fputs(_(" -L, --logical-blocksize set the logical block size to \n"), out); ++ fputs(_(" --logical-blocksize set the logical block size to \n"), out); fputs(_(" -P, --partscan create a partitioned loop device\n"), out); fputs(_(" -r, --read-only set up a read-only loop device\n"), out); fputs(_(" --direct-io[=] open backing file with O_DIRECT\n"), out); @@ -105,7 +105,7 @@ Index: util-linux-2.29/sys-utils/losetup.c OPT_RAW, - OPT_DIO + OPT_DIO, -+ OPT_BLOCKSIZE ++ OPT_BLOCKSIZE, }; static const struct option longopts[] = { { "all", 0, 0, 'a' }, @@ -113,7 +113,7 @@ Index: util-linux-2.29/sys-utils/losetup.c { "associated", 1, 0, 'j' }, { "json", 0, 0, 'J' }, { "list", 0, 0, 'l' }, -+ { "logical-blocksize", 1, 0, 'L' }, ++ { "logical-blocksize", 1, 0, OPT_BLOCKSIZE }, { "noheadings", 0, 0, 'n' }, { "offset", 1, 0, 'o' }, { "output", 1, 0, 'O' }, diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 86c3c6a..2c9f0dd 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,47 @@ +------------------------------------------------------------------- +Wed Apr 12 09:19:21 UTC 2017 - agraf@suse.com + +- Prefer sysfs exported SMBIOS3 tables in lscu (bsc#1033718) + + arm64-lscpu-use-sysfs-for-table-access-if-available.patch + +------------------------------------------------------------------- +Thu Apr 6 17:35:34 CEST 2017 - sbrabec@suse.com + +- To cover release numbers of both SLE12 SP3 and Leap 42.3, relax + release based conflict with bash-completion from 13.1 to 10. + +------------------------------------------------------------------- +Tue Apr 4 14:51:09 UTC 2017 - sweet_f_a@gmx.de + +- fix util-linux-losetup-Add-support-for-setting-logical-blocksize.patch + --logical-blocksize was behaving like --nooverlap + +------------------------------------------------------------------- +Fri Mar 17 17:18:28 CET 2017 - sbrabec@suse.com + +- Conflict with old systemd-presets-branding to ensure correct + preset migration (boo#1029775, bsc#1012850). + +------------------------------------------------------------------- +Thu Mar 16 22:44:12 CET 2017 - sbrabec@suse.com + +- Drop "codepage" fstab migration needed for SuSE Linux < 9.1 + (bsc#51950 (suse#36950)). + +------------------------------------------------------------------- +Tue Feb 28 17:27:58 CET 2017 - sbrabec@suse.com + +- Keep dependency on insserv and fillup for compatibilitiy reasons + in Leap 42.3. Too many poorly written packages depend on it. + (Marked as "sysv compatibility hack".) + +------------------------------------------------------------------- +Wed Feb 22 22:00:05 UTC 2017 - sweet_f_a@gmx.de + +- Update to version 2.29.2: + * su(1) security issue CVE-2017-2616 (bsc#1023041) + * minor bugfixes and enhancements + ------------------------------------------------------------------- Fri Feb 10 10:40:23 UTC 2017 - fbui@suse.com @@ -20,12 +64,48 @@ Wed Feb 8 18:16:22 CET 2017 - sbrabec@suse.com - INCOMPATIBLE CHANGE for SLE12 SP3 and Leap 42.3: losetup -L changes its meaning from SLE12 SP1&SP2 specific --logical-blocksize to the upstream --nooverlap). - --logical-blocksize can be used only with long option. + --logical-blocksize can be used only with long option + (bsc#966891). - Include SLE12 + Leap 42 exclusive feature, implemented by hare@suse.de: * losetup: Add support for setting logical blocksizes (bsc#931634, FATE#319010) + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch + SLE12 & Leap 42 specific changes: + * Fix for SLE12: bsc#956540, SLE12 SP1: bsc#953691, Leap 42.1: + boo#954482, was obsoleted by the systemd update, and skipped. + * Remove --enable-ncurses that is intended to force non-wide + ncurses (boo#978993). + * Make release-dependent conflict with old sysvinit-tools SLE + specific, as it is required only for SLE 11 upgrade, + and breaks openSUSE staging builds (boo#994399). + * Obsolete these patches, now upstreamed: + * Drop upstreamed patches + (tests-script-race-on-force-only.patch, + util-linux-libmount-ignore-redundant-slashes.patch, + util-linux-sfdisk-show-pt-geometry-1.patch, + util-linux-sfdisk-show-pt-geometry-2.patch, + util-linux-sfdisk-show-pt-geometry-3.patch, + util-linux-libblkid-partition-loop.patch, + util-linux-libblkid-wipe-offset.patch, + util-linux-mount-reuse-loop-1.patch, + util-linux-mount-reuse-loop-2.patch, + util-linux-mount-reuse-loop-3.patch, + util-linux-mount-reuse-loop-4.patch, + util-linux-loop-reuse-01.patch, util-linux-loop-reuse-02.patch, + util-linux-loop-reuse-03.patch, util-linux-loop-reuse-04.patch, + util-linux-loop-reuse-05.patch, util-linux-loop-reuse-06.patch, + util-linux-loop-reuse-07.patch, util-linux-loop-reuse-08.patch, + util-linux-loop-reuse-09.patch, util-linux-loop-reuse-10.patch, + util-linux-loop-reuse-12.patch, util-linux-loop-reuse-13.patch, + util-linux-loop-reuse-14.patch, util-linux-loop-reuse-15.patch, + util-linux-loop-reuse-16.patch, util-linux-loop-reuse-17.patch, + util-linux-loop-reuse-18.patch, util-linux-loop-reuse-19.patch, + util-linux-loop-reuse-20.patch, + util-linux-libmount-cifs-is_mounted.patch). + * Refreshed patches + (make-sure-sbin-resp-usr-sbin-are-in-PATH.diff, + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch). ------------------------------------------------------------------- Tue Feb 7 20:07:55 CET 2017 - sbrabec@suse.com @@ -67,7 +147,7 @@ Wed Dec 7 16:12:55 CET 2016 - sbrabec@suse.com ------------------------------------------------------------------- Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de -- Update to version 2.29 +- Update to version 2.29 (FATE#322090) * cal: possible to specify month by name (e.g. "cal January 2017") and use relative placeholders (cal "+1 month") * fdisk(8) allows to wipe newly created partitions; the feature @@ -84,6 +164,11 @@ Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de mount all of them in the same time. The restriction is that the regions should not overlap. * lscpu supports the "drawer" topology for IBM S/390. + * sfdisk: Support for deprecated --show-pt-geometry (bsc#990531). + * libmount: various issues with cifs mount + (bsc#982331, bsc#987176). + * libblkid: Prevent infinite loop DoS while parsing DOS partition + tables (bsc#988361, CVE-2016-5011). * More details at: http://karelzak.blogspot.de/2016/10/util-linux-v229-whats-new.html https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes @@ -195,7 +280,7 @@ Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de openat-family functions anymore. * The python binding for libsmartcols is available in separate project at https://github.com/ignatenkobrain/python-smartcols - * Other bug fixes (bsc#970404, bsc#975082). + * Other bug fixes (bsc#970404, bsc#975082, FATE#318444). * Security issue: CVE-2016-2779 is NOT FIXED yet. - Remove old util-linux-noenc-suse.patch @@ -209,6 +294,7 @@ Wed Nov 11 15:46:46 UTC 2015 - sweet_f_a@gmx.de - Update to version 2.27.1, bugfix release, see ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes + (fixes bsc#950778, FATE#320552). ------------------------------------------------------------------- Wed Nov 11 11:25:25 UTC 2015 - schwab@suse.de @@ -240,7 +326,8 @@ Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com * rtcwake supports a news option --list-modes and --date, no support RTC_ALM_READ and RTC_ALM_SET fallbacks any more. * Many fixes, most notably: - * fsck: now supports -r {fd} (bsc#903738) + * fsck: now supports -r {fd} (bsc#923777, bsc#903738) + * Fix fsck -C {fd} parsing (bsc#923777, bsc#903738) * better handling of multi-path devices (bsc#880468, bsc#924994) * flock: improve timeout handling (bsc#926945) @@ -258,7 +345,7 @@ Tue Aug 4 20:31:55 CEST 2015 - sbrabec@suse.com - Add %systemd_preset_pre and %systemd_preset_posttrans that will do one shot presetting of uuidd.service on upgrade. - (bnc#900935#c46, FATE#318949). + (bnc#900935#c46, FATE#318949, FATE#317727). - Remove one shot presetting hacks. ------------------------------------------------------------------- @@ -304,7 +391,9 @@ Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz scripts; it's possible to save your partitioning layout to text files and (re)use it in all fdisks * fdisk(8), sfdisk(8): support new command-line option "--output - " to specify output columns for --list or print commands + " to specify output columns for --list or print commands, + do not abort when fdisk -l when device cannot be opened + [bnc#886790], [bnc#893712], [bnc#890351] * nsenter(1): has been updated to work with the latest kernel changes in user namespaces supports new command-line option --preserve-credentials @@ -324,10 +413,13 @@ Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz * logger(1): supports new command-line option --id= to specify PID (or another ID) allows to specify --rfc3164 or --rfc5424 syslog protocols + * lscpu: recognizes Unisys s-Par as hypervisor (FATE#318231) * libfdisk: the library is distributed as a shared library with a stable API and a standard header file * libmount: provides a new simple API to monitor mount-table changes (including changes in userspace mount options) + * libmount: Fix mount point lookup (and mount -a) if the path + contains // (bsc#931955). - Fix lack of I18N support in util-linux-systemd (mis-compilation). ------------------------------------------------------------------- @@ -403,7 +495,7 @@ Fri Oct 17 21:18:43 CEST 2014 - sbrabec@suse.cz Mon Sep 8 21:04:34 CEST 2014 - sbrabec@suse.cz - Install runuser and runuser-l PAM file - (runuser.pamd, bnc#892079). + (runuser.pamd, bnc#892079, bnc#894833). ------------------------------------------------------------------- Wed Sep 3 16:21:57 CEST 2014 - sbrabec@suse.cz diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 583e8a8..5dc3eda 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -116,7 +116,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.29.1 +Version: 2.29.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -125,7 +125,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz +Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.service Source5: etc.raw @@ -135,7 +135,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.sign +Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -157,6 +157,8 @@ Source51: blkid.conf Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FEATURE-SLE util-linux-losetup-Add-support-for-setting-logical-blocksize.patch bsc931634 FATE319010 hare@suse.de -- Add support for setting logical blocksizes. Patch1: util-linux-losetup-Add-support-for-setting-logical-blocksize.patch +# PATCH-BUG-FIX arm64-lscpu-use-sysfs-for-table-access-if-available.patch bsc#1033718 agraf@suse.de -- Use SMBIOS3 tables when available in lscpu +Patch2: arm64-lscpu-use-sysfs-for-table-access-if-available.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -178,9 +180,9 @@ Conflicts: coreutils < 8.21 # File conflict of sulogin and utmpdump (up to 12.3 and SLE11). Conflicts: sysvinit-tools < 2.88+-87 # File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3). -Conflicts: bash-completion <= 2.1-13.1 -# The preset is provided by the presets branding package since 0.4 (bsc#1012850) -Conflicts: systemd-presets-branding < 0.4 +Conflicts: bash-completion <= 2.1-10 +# The preset is provided by the presets branding package since 0.4 (bsc#1012850) and since 12.2 in SLE (boo#1029775) +Conflicts: systemd-presets-branding < 12.2 # bnc#805684: %ifarch s390x Obsoletes: s390-32 @@ -189,6 +191,15 @@ Provides: s390-32 # uuid-runtime appeared in SLE11 SP1 to SLE11 SP3 Provides: uuid-runtime = %{version}-%{release} Obsoletes: uuid-runtime < %{version}-%{release} +%if 0%{?suse_version} < 1330 +#BEGIN sysv compatibility hack +# After migration of raw init script to systemd, util-linux no more depends on +# fillup and insserv. Many poorly written packages implicitly depend on them +# without declaring it. Keep these dependencies in Leap 42 + SLE 12 line to +# prevent failures. +PreReq: %insserv_prereq %fillup_prereq +#END sysv compatibility hack +%endif # # Using "Requires" here would lend itself to help upgrading, but since # util-linux is in the initial bootstrap, that is not a good thing to do: @@ -402,6 +413,7 @@ library. # logical block size support in loop does not exist in Tumbleweed and upstream kernel yet %patch1 -p1 %endif +%patch2 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -787,11 +799,6 @@ for PAM_FILE in default/su pam.d/su pam.d/su-l ; do fi done -# mount option 'code=' is now called 'codepage=' so change fstab -if [ -f etc/fstab ]; then - sed -i 's:code=:codepage=:' etc/fstab -fi - %preun %{service_del_preun raw.service} @@ -854,7 +861,6 @@ fi %postun -n uuidd %{service_del_postun uuidd.socket uuidd.service} - %endif %if %build_util_linux @@ -1257,7 +1263,6 @@ fi %files -n libfdisk-devel-static %defattr(-, root, root) %{_libdir}/libfdisk.*a - %endif %if %build_util_linux_systemd diff --git a/util-linux.changes b/util-linux.changes index 86c3c6a..2c9f0dd 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,47 @@ +------------------------------------------------------------------- +Wed Apr 12 09:19:21 UTC 2017 - agraf@suse.com + +- Prefer sysfs exported SMBIOS3 tables in lscu (bsc#1033718) + + arm64-lscpu-use-sysfs-for-table-access-if-available.patch + +------------------------------------------------------------------- +Thu Apr 6 17:35:34 CEST 2017 - sbrabec@suse.com + +- To cover release numbers of both SLE12 SP3 and Leap 42.3, relax + release based conflict with bash-completion from 13.1 to 10. + +------------------------------------------------------------------- +Tue Apr 4 14:51:09 UTC 2017 - sweet_f_a@gmx.de + +- fix util-linux-losetup-Add-support-for-setting-logical-blocksize.patch + --logical-blocksize was behaving like --nooverlap + +------------------------------------------------------------------- +Fri Mar 17 17:18:28 CET 2017 - sbrabec@suse.com + +- Conflict with old systemd-presets-branding to ensure correct + preset migration (boo#1029775, bsc#1012850). + +------------------------------------------------------------------- +Thu Mar 16 22:44:12 CET 2017 - sbrabec@suse.com + +- Drop "codepage" fstab migration needed for SuSE Linux < 9.1 + (bsc#51950 (suse#36950)). + +------------------------------------------------------------------- +Tue Feb 28 17:27:58 CET 2017 - sbrabec@suse.com + +- Keep dependency on insserv and fillup for compatibilitiy reasons + in Leap 42.3. Too many poorly written packages depend on it. + (Marked as "sysv compatibility hack".) + +------------------------------------------------------------------- +Wed Feb 22 22:00:05 UTC 2017 - sweet_f_a@gmx.de + +- Update to version 2.29.2: + * su(1) security issue CVE-2017-2616 (bsc#1023041) + * minor bugfixes and enhancements + ------------------------------------------------------------------- Fri Feb 10 10:40:23 UTC 2017 - fbui@suse.com @@ -20,12 +64,48 @@ Wed Feb 8 18:16:22 CET 2017 - sbrabec@suse.com - INCOMPATIBLE CHANGE for SLE12 SP3 and Leap 42.3: losetup -L changes its meaning from SLE12 SP1&SP2 specific --logical-blocksize to the upstream --nooverlap). - --logical-blocksize can be used only with long option. + --logical-blocksize can be used only with long option + (bsc#966891). - Include SLE12 + Leap 42 exclusive feature, implemented by hare@suse.de: * losetup: Add support for setting logical blocksizes (bsc#931634, FATE#319010) + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch + SLE12 & Leap 42 specific changes: + * Fix for SLE12: bsc#956540, SLE12 SP1: bsc#953691, Leap 42.1: + boo#954482, was obsoleted by the systemd update, and skipped. + * Remove --enable-ncurses that is intended to force non-wide + ncurses (boo#978993). + * Make release-dependent conflict with old sysvinit-tools SLE + specific, as it is required only for SLE 11 upgrade, + and breaks openSUSE staging builds (boo#994399). + * Obsolete these patches, now upstreamed: + * Drop upstreamed patches + (tests-script-race-on-force-only.patch, + util-linux-libmount-ignore-redundant-slashes.patch, + util-linux-sfdisk-show-pt-geometry-1.patch, + util-linux-sfdisk-show-pt-geometry-2.patch, + util-linux-sfdisk-show-pt-geometry-3.patch, + util-linux-libblkid-partition-loop.patch, + util-linux-libblkid-wipe-offset.patch, + util-linux-mount-reuse-loop-1.patch, + util-linux-mount-reuse-loop-2.patch, + util-linux-mount-reuse-loop-3.patch, + util-linux-mount-reuse-loop-4.patch, + util-linux-loop-reuse-01.patch, util-linux-loop-reuse-02.patch, + util-linux-loop-reuse-03.patch, util-linux-loop-reuse-04.patch, + util-linux-loop-reuse-05.patch, util-linux-loop-reuse-06.patch, + util-linux-loop-reuse-07.patch, util-linux-loop-reuse-08.patch, + util-linux-loop-reuse-09.patch, util-linux-loop-reuse-10.patch, + util-linux-loop-reuse-12.patch, util-linux-loop-reuse-13.patch, + util-linux-loop-reuse-14.patch, util-linux-loop-reuse-15.patch, + util-linux-loop-reuse-16.patch, util-linux-loop-reuse-17.patch, + util-linux-loop-reuse-18.patch, util-linux-loop-reuse-19.patch, + util-linux-loop-reuse-20.patch, + util-linux-libmount-cifs-is_mounted.patch). + * Refreshed patches + (make-sure-sbin-resp-usr-sbin-are-in-PATH.diff, + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch). ------------------------------------------------------------------- Tue Feb 7 20:07:55 CET 2017 - sbrabec@suse.com @@ -67,7 +147,7 @@ Wed Dec 7 16:12:55 CET 2016 - sbrabec@suse.com ------------------------------------------------------------------- Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de -- Update to version 2.29 +- Update to version 2.29 (FATE#322090) * cal: possible to specify month by name (e.g. "cal January 2017") and use relative placeholders (cal "+1 month") * fdisk(8) allows to wipe newly created partitions; the feature @@ -84,6 +164,11 @@ Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de mount all of them in the same time. The restriction is that the regions should not overlap. * lscpu supports the "drawer" topology for IBM S/390. + * sfdisk: Support for deprecated --show-pt-geometry (bsc#990531). + * libmount: various issues with cifs mount + (bsc#982331, bsc#987176). + * libblkid: Prevent infinite loop DoS while parsing DOS partition + tables (bsc#988361, CVE-2016-5011). * More details at: http://karelzak.blogspot.de/2016/10/util-linux-v229-whats-new.html https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes @@ -195,7 +280,7 @@ Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de openat-family functions anymore. * The python binding for libsmartcols is available in separate project at https://github.com/ignatenkobrain/python-smartcols - * Other bug fixes (bsc#970404, bsc#975082). + * Other bug fixes (bsc#970404, bsc#975082, FATE#318444). * Security issue: CVE-2016-2779 is NOT FIXED yet. - Remove old util-linux-noenc-suse.patch @@ -209,6 +294,7 @@ Wed Nov 11 15:46:46 UTC 2015 - sweet_f_a@gmx.de - Update to version 2.27.1, bugfix release, see ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes + (fixes bsc#950778, FATE#320552). ------------------------------------------------------------------- Wed Nov 11 11:25:25 UTC 2015 - schwab@suse.de @@ -240,7 +326,8 @@ Wed Sep 23 14:16:22 CEST 2015 - sbrabec@suse.com * rtcwake supports a news option --list-modes and --date, no support RTC_ALM_READ and RTC_ALM_SET fallbacks any more. * Many fixes, most notably: - * fsck: now supports -r {fd} (bsc#903738) + * fsck: now supports -r {fd} (bsc#923777, bsc#903738) + * Fix fsck -C {fd} parsing (bsc#923777, bsc#903738) * better handling of multi-path devices (bsc#880468, bsc#924994) * flock: improve timeout handling (bsc#926945) @@ -258,7 +345,7 @@ Tue Aug 4 20:31:55 CEST 2015 - sbrabec@suse.com - Add %systemd_preset_pre and %systemd_preset_posttrans that will do one shot presetting of uuidd.service on upgrade. - (bnc#900935#c46, FATE#318949). + (bnc#900935#c46, FATE#318949, FATE#317727). - Remove one shot presetting hacks. ------------------------------------------------------------------- @@ -304,7 +391,9 @@ Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz scripts; it's possible to save your partitioning layout to text files and (re)use it in all fdisks * fdisk(8), sfdisk(8): support new command-line option "--output - " to specify output columns for --list or print commands + " to specify output columns for --list or print commands, + do not abort when fdisk -l when device cannot be opened + [bnc#886790], [bnc#893712], [bnc#890351] * nsenter(1): has been updated to work with the latest kernel changes in user namespaces supports new command-line option --preserve-credentials @@ -324,10 +413,13 @@ Wed Feb 25 20:43:28 CET 2015 - sbrabec@suse.cz * logger(1): supports new command-line option --id= to specify PID (or another ID) allows to specify --rfc3164 or --rfc5424 syslog protocols + * lscpu: recognizes Unisys s-Par as hypervisor (FATE#318231) * libfdisk: the library is distributed as a shared library with a stable API and a standard header file * libmount: provides a new simple API to monitor mount-table changes (including changes in userspace mount options) + * libmount: Fix mount point lookup (and mount -a) if the path + contains // (bsc#931955). - Fix lack of I18N support in util-linux-systemd (mis-compilation). ------------------------------------------------------------------- @@ -403,7 +495,7 @@ Fri Oct 17 21:18:43 CEST 2014 - sbrabec@suse.cz Mon Sep 8 21:04:34 CEST 2014 - sbrabec@suse.cz - Install runuser and runuser-l PAM file - (runuser.pamd, bnc#892079). + (runuser.pamd, bnc#892079, bnc#894833). ------------------------------------------------------------------- Wed Sep 3 16:21:57 CEST 2014 - sbrabec@suse.cz diff --git a/util-linux.spec b/util-linux.spec index 2ab2c8f..8ca3b4d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -116,7 +116,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.29.1 +Version: 2.29.2 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -125,7 +125,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz +Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.service Source5: etc.raw @@ -135,7 +135,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.sign +Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -157,6 +157,8 @@ Source51: blkid.conf Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FEATURE-SLE util-linux-losetup-Add-support-for-setting-logical-blocksize.patch bsc931634 FATE319010 hare@suse.de -- Add support for setting logical blocksizes. Patch1: util-linux-losetup-Add-support-for-setting-logical-blocksize.patch +# PATCH-BUG-FIX arm64-lscpu-use-sysfs-for-table-access-if-available.patch bsc#1033718 agraf@suse.de -- Use SMBIOS3 tables when available in lscpu +Patch2: arm64-lscpu-use-sysfs-for-table-access-if-available.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -178,9 +180,9 @@ Conflicts: coreutils < 8.21 # File conflict of sulogin and utmpdump (up to 12.3 and SLE11). Conflicts: sysvinit-tools < 2.88+-87 # File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3). -Conflicts: bash-completion <= 2.1-13.1 -# The preset is provided by the presets branding package since 0.4 (bsc#1012850) -Conflicts: systemd-presets-branding < 0.4 +Conflicts: bash-completion <= 2.1-10 +# The preset is provided by the presets branding package since 0.4 (bsc#1012850) and since 12.2 in SLE (boo#1029775) +Conflicts: systemd-presets-branding < 12.2 # bnc#805684: %ifarch s390x Obsoletes: s390-32 @@ -189,6 +191,15 @@ Provides: s390-32 # uuid-runtime appeared in SLE11 SP1 to SLE11 SP3 Provides: uuid-runtime = %{version}-%{release} Obsoletes: uuid-runtime < %{version}-%{release} +%if 0%{?suse_version} < 1330 +#BEGIN sysv compatibility hack +# After migration of raw init script to systemd, util-linux no more depends on +# fillup and insserv. Many poorly written packages implicitly depend on them +# without declaring it. Keep these dependencies in Leap 42 + SLE 12 line to +# prevent failures. +PreReq: %insserv_prereq %fillup_prereq +#END sysv compatibility hack +%endif # # Using "Requires" here would lend itself to help upgrading, but since # util-linux is in the initial bootstrap, that is not a good thing to do: @@ -402,6 +413,7 @@ library. # logical block size support in loop does not exist in Tumbleweed and upstream kernel yet %patch1 -p1 %endif +%patch2 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -787,11 +799,6 @@ for PAM_FILE in default/su pam.d/su pam.d/su-l ; do fi done -# mount option 'code=' is now called 'codepage=' so change fstab -if [ -f etc/fstab ]; then - sed -i 's:code=:codepage=:' etc/fstab -fi - %preun %{service_del_preun raw.service} @@ -854,7 +861,6 @@ fi %postun -n uuidd %{service_del_postun uuidd.socket uuidd.service} - %endif %if %build_util_linux @@ -1257,7 +1263,6 @@ fi %files -n libfdisk-devel-static %defattr(-, root, root) %{_libdir}/libfdisk.*a - %endif %if %build_util_linux_systemd From 4b2cc68e6472a78103936d7f4054c4fc3d8679c56a5b710a6e401076f50be3ba Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 29 Jun 2017 12:58:21 +0000 Subject: [PATCH 209/211] Accepting request 504843 from Base:System - don't conflict with sysvinit-tools in Tumblweed anymore. Needed for Leap 15 which wants to use a different release number scheme (lp150.x which produces lower numbers than the conflict). - Update to version 2.30: * Many changes and improvements, most notably: * The libblkid library has been improved for hybrid CDROM/DVD media. * The deprecated command tailf has been removed. Use "tail -f" from coreutils. * blkzone -- NEW COMMAND to run zone commands on block devices that support Zoned Block Commands (ZBC) or Zoned-device ATA Commands (ZAC). * fincore -- NEW COMMAND to count pages of file contents in core (memory). * lsmem -- NEW COMMAND to list the ranges of available memory with their online status. * The command fallocate -- supports an "insert range" operation now. * The command "column -t|--table" has been modified to use libsmartcols. It now provides nearly all of that library's functionality from the command line. * Security issues: * hwclock - no longer makes any internal permission checks. The System Administrator must set proper permissions to control user access to the RTC. It is NOT recommended to use SUID. * CVE-2016-2779 - This security issue is NOT FIXED yet. * More details at: https://www.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30-ReleaseNotes - Drop upstreamed patch arm64-lscpu-use-sysfs-for-table-access-if-available.patch - Refreshed patch util-linux-losetup-Add-support-for-setting-logical-blocksize.patch - fix compiler warnings for mkzimage_cmdline - When when hypervisor_decode_sysfw fails continue with other detection methods (bsc#1042991, bsc#1039360, bsc#1033718) + util-linux-lscpu-cleanup-DMI-detection-return-codes.patch OBS-URL: https://build.opensuse.org/request/show/504843 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=218 --- ...-sysfs-for-table-access-if-available.patch | 71 ---------------- mkzimage_cmdline.c | 4 +- python-libmount.changes | 56 +++++++++++- python-libmount.spec | 32 +++++-- util-linux-2.29.2.tar.sign | 17 ---- util-linux-2.29.2.tar.xz | 3 - util-linux-2.30.tar.sign | 17 ++++ util-linux-2.30.tar.xz | 3 + ...upport-for-setting-logical-blocksize.patch | 78 ++++++++++------- ...u-cleanup-DMI-detection-return-codes.patch | 85 +++++++++++++++++++ util-linux-systemd.changes | 56 +++++++++++- util-linux-systemd.spec | 32 +++++-- util-linux.changes | 56 +++++++++++- util-linux.spec | 32 +++++-- 14 files changed, 379 insertions(+), 163 deletions(-) delete mode 100644 arm64-lscpu-use-sysfs-for-table-access-if-available.patch delete mode 100644 util-linux-2.29.2.tar.sign delete mode 100644 util-linux-2.29.2.tar.xz create mode 100644 util-linux-2.30.tar.sign create mode 100644 util-linux-2.30.tar.xz create mode 100644 util-linux-lscpu-cleanup-DMI-detection-return-codes.patch diff --git a/arm64-lscpu-use-sysfs-for-table-access-if-available.patch b/arm64-lscpu-use-sysfs-for-table-access-if-available.patch deleted file mode 100644 index cbb20e9..0000000 --- a/arm64-lscpu-use-sysfs-for-table-access-if-available.patch +++ /dev/null @@ -1,71 +0,0 @@ -Return-Path: -Delivered-To: agraf@imap.suse.de -From: Ard Biesheuvel -To: util-linux-ng@vger.kernel.org -Cc: leif.lindholm@linaro.org, - agraf@suse.de, - kzak@redhat.com, - Ard Biesheuvel -Subject: [PATCH] lspcu: use sysfs for table access if available -Date: Wed, 12 Apr 2017 10:11:29 +0100 -Message-Id: <20170412091129.27283-1-ard.biesheuvel@linaro.org> -X-Mailer: git-send-email 2.9.3 - -On ARM systems, accessing SMBIOS tables via /dev/mem using read() -calls is not supported. The reason is that such tables are usually -located in EFI_RUNTIME_SERVICE_DATA memory, which is not covered -by the linear mapping on those systems, and so read() calls will -fail. - -So instead, use the /sys/firmware/dmi/tables/DMI sysfs file, which -contains the entire structure table array, and will be available -on any recent Linux system, even on ones that only export the rev3 -SMBIOS entry point, which is currently ignored by lscpu. - -Note that the max 'num' value is inferred from the size. This is not -a limitation of the sysfs interface, but a limitation of the rev3 -entry point, which no longer carries a number of array elements. - -Signed-off-by: Ard Biesheuvel -Signed-off-by: Alexander Graf ---- - sys-utils/lscpu-dmi.c | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git a/sys-utils/lscpu-dmi.c b/sys-utils/lscpu-dmi.c -index 0e497d10c..a8298ff74 100644 ---- a/sys-utils/lscpu-dmi.c -+++ b/sys-utils/lscpu-dmi.c -@@ -192,6 +192,18 @@ static int hypervisor_decode_smbios(uint8_t *buf, const char *devmem) - devmem); - } - -+static int hypervisor_decode_sysfw(void) -+{ -+ static char const sys_fw_dmi_tables[] = "/sys/firmware/dmi/tables/DMI"; -+ struct stat st; -+ -+ if (stat(sys_fw_dmi_tables, &st)) -+ return -1; -+ -+ return hypervisor_from_dmi_table(0, st.st_size, st.st_size / 4, -+ sys_fw_dmi_tables); -+} -+ - /* - * Probe for EFI interface - */ -@@ -242,6 +254,10 @@ int read_hypervisor_dmi(void) - || '\0' != 0) - return rc; - -+ rc = hypervisor_decode_sysfw(); -+ if (rc >= 0) -+ return rc; -+ - /* First try EFI (ia64, Intel-based Mac) */ - switch (address_from_efi(&fp)) { - case EFI_NOT_FOUND: --- -2.11.0 - diff --git a/mkzimage_cmdline.c b/mkzimage_cmdline.c index a60edbc..ed27294 100644 --- a/mkzimage_cmdline.c +++ b/mkzimage_cmdline.c @@ -162,9 +162,9 @@ int main(int argc, char **argv) if (clear) memset(s, 0x0, tmp - s); if (set) - snprintf(s, tmp - s, "%s", string); + snprintf((char*)s, tmp - s, "%s", string); } else { - fprintf(stdout, "cmd_line size:%d\n", tmp - s); + fprintf(stdout, "cmd_line size:%td\n", tmp - s); fprintf(stdout, "cmd_line: %s\n", s); fprintf(stdout, "active: %c\n", *active); } diff --git a/python-libmount.changes b/python-libmount.changes index 2c9f0dd..6bfa847 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,51 @@ +------------------------------------------------------------------- +Sun Jun 11 12:12:44 UTC 2017 - lnussel@suse.de + +- don't conflict with sysvinit-tools in Tumblweed anymore. Needed for Leap 15 + which wants to use a different release number scheme (lp150.x which produces + lower numbers than the conflict). + +------------------------------------------------------------------- +Thu Jun 8 21:21:12 UTC 2017 - sweet_f_a@gmx.de + +- Update to version 2.30: + * Many changes and improvements, most notably: + * The libblkid library has been improved for hybrid CDROM/DVD + media. + * The deprecated command tailf has been removed. Use "tail -f" + from coreutils. + * blkzone -- NEW COMMAND to run zone commands on block devices + that support Zoned Block Commands (ZBC) or Zoned-device ATA + Commands (ZAC). + * fincore -- NEW COMMAND to count pages of file contents in + core (memory). + * lsmem -- NEW COMMAND to list the ranges of available memory + with their online status. + * The command fallocate -- supports an "insert range" operation + now. + * The command "column -t|--table" has been modified to use + libsmartcols. It now provides nearly all of that library's + functionality from the command line. + * Security issues: + * hwclock - no longer makes any internal permission checks. The + System Administrator must set proper permissions to control + user access to the RTC. It is NOT recommended to use SUID. + * CVE-2016-2779 - This security issue is NOT FIXED yet. + * More details at: + https://www.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30-ReleaseNotes +- Drop upstreamed patch + arm64-lscpu-use-sysfs-for-table-access-if-available.patch +- Refreshed patch + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch +- fix compiler warnings for mkzimage_cmdline + +------------------------------------------------------------------- +Thu Jun 8 16:28:41 UTC 2017 - msuchanek@suse.com + +- When when hypervisor_decode_sysfw fails continue with other + detection methods (bsc#1042991, bsc#1039360, bsc#1033718) + + util-linux-lscpu-cleanup-DMI-detection-return-codes.patch + ------------------------------------------------------------------- Wed Apr 12 09:19:21 UTC 2017 - agraf@suse.com @@ -178,13 +226,13 @@ Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de - Update to version 2.28.2, bugfix release, see - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes + https://www.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes ------------------------------------------------------------------- Thu Aug 11 13:24:34 UTC 2016 - sweet_f_a@gmx.de - Update to version 2.28.1, bugfix release, see - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes + https://www.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes - Remove util-linux-libblkid-wipe-offset.patch (upstream) - use the new configure option --enable-libuuid-force-uuidd instead of sed'ing configure.ac @@ -293,7 +341,7 @@ Tue Dec 1 10:27:17 UTC 2015 - sweet_f_a@gmx.de Wed Nov 11 15:46:46 UTC 2015 - sweet_f_a@gmx.de - Update to version 2.27.1, bugfix release, see - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes + https://www.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes (fixes bsc#950778, FATE#320552). ------------------------------------------------------------------- @@ -1848,7 +1896,7 @@ Fri Jul 9 06:23:27 UTC 2010 - puzel@novell.com - new commands: findmnt, fsfreeze, swaplabel - blkid: new option "-i" to print I/O limits - full release notes: - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes + https://www.kernel.org/pub/linux/utils/util-linux/v2.18/v2.18-ReleaseNotes - update to adjtimex-1.28 - update to which-2.20 - drop util-linux-2.14.1-mount_skip_sync.patch (fixed upstream) diff --git a/python-libmount.spec b/python-libmount.spec index 622fb47..5615295 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -116,7 +116,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.29.2 +Version: 2.30 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -125,7 +125,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-%{version}.tar.xz +Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.30/util-linux-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.service Source5: etc.raw @@ -135,7 +135,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-%{version}.tar.sign +Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.30/util-linux-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -157,8 +157,8 @@ Source51: blkid.conf Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FEATURE-SLE util-linux-losetup-Add-support-for-setting-logical-blocksize.patch bsc931634 FATE319010 hare@suse.de -- Add support for setting logical blocksizes. Patch1: util-linux-losetup-Add-support-for-setting-logical-blocksize.patch -# PATCH-BUG-FIX arm64-lscpu-use-sysfs-for-table-access-if-available.patch bsc#1033718 agraf@suse.de -- Use SMBIOS3 tables when available in lscpu -Patch2: arm64-lscpu-use-sysfs-for-table-access-if-available.patch +# PATCH-BUG-FIX util-linux-lscpu-cleanup-DMI-detection-return-codes.patch bsc#1039360 msuchanek@suse.de -- lscpu: cleanup DMI detection return codes +Patch2: util-linux-lscpu-cleanup-DMI-detection-return-codes.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -177,8 +177,10 @@ Obsoletes: login < 4.0-33.7 # File conflict of su and kill (up to 12.3 and SLE11). # It should be coreutils < 8.21-4, but coreutils provide Release-less symbol. Conflicts: coreutils < 8.21 +%if 0%{?suse_version} < 1330 # File conflict of sulogin and utmpdump (up to 12.3 and SLE11). Conflicts: sysvinit-tools < 2.88+-87 +%endif # File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3). Conflicts: bash-completion <= 2.1-10 # The preset is provided by the presets branding package since 0.4 (bsc#1012850) and since 12.2 in SLE (boo#1029775) @@ -601,6 +603,7 @@ make %{?_smp_mflags} export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" +export TS_OPT_fincore_count_known_fail="yes" export TS_OPT_libfdisk_gpt_known_fail="yes" export TS_OPT_misc_flock_known_fail="yes" export TS_OPT_misc_ionice_known_fail="yes" @@ -610,7 +613,7 @@ export TS_OPT_kill_print_pid_known_fail="yes" export TS_OPT_kill_queue_known_fail="yes" export TS_OPT_uuid_uuidd_known_fail="yes" # unsupported syscall in script(1) ... might be fixed in qemu -export TS_OPT_script_known_fail="yes" +export TS_OPT_script_known_fail="yes" # may segfault on qemu-user-space export TS_OPT_misc_setarch_known_fail="yes" %endif @@ -934,6 +937,7 @@ done %{_bindir}/su %{_bindir}/eject %{_bindir}/cal +%{_bindir}/chmem %{_bindir}/chrt %{_bindir}/col %{_bindir}/colcrt @@ -941,6 +945,7 @@ done %{_bindir}/column %{_bindir}/dmesg %{_bindir}/fallocate +%{_bindir}/fincore %{_bindir}/findmnt %{_bindir}/flock %{_bindir}/getopt @@ -960,6 +965,7 @@ done %{_bindir}/lscpu %{_bindir}/lsipc %{_bindir}/lslocks +%{_bindir}/lsmem %{_bindir}/lsns %{_bindir}/mcookie %{_bindir}/mesg @@ -976,7 +982,6 @@ done %{_bindir}/setarch %{_bindir}/setpriv %{_bindir}/setsid -%{_bindir}/tailf %{_bindir}/taskset %{_bindir}/ul %{_bindir}/umount @@ -994,6 +999,10 @@ done %{_sbindir}/agetty %{_sbindir}/blkid %{_sbindir}/blkdiscard +# blkzone depends on linux/blkzoned.h +%if 0%{?suse_version} >= 1330 +%{_sbindir}/blkzone +%endif %{_sbindir}/blockdev %{_sbindir}/chcpu %{_sbindir}/ctrlaltdel @@ -1041,6 +1050,7 @@ done %{_mandir}/man1/dmesg.1.gz %{_mandir}/man1/eject.1.gz %{_mandir}/man1/fallocate.1.gz +%{_mandir}/man1/fincore.1.gz %{_mandir}/man1/flock.1.gz %{_mandir}/man1/getopt.1.gz %{_mandir}/man1/hexdump.1.gz @@ -1055,6 +1065,7 @@ done %{_mandir}/man1/look.1.gz %{_mandir}/man1/lscpu.1.gz %{_mandir}/man1/lsipc.1.gz +%{_mandir}/man1/lsmem.1.gz %{_mandir}/man1/mcookie.1.gz %{_mandir}/man1/mesg.1.gz %{_mandir}/man1/more.1.gz @@ -1070,7 +1081,6 @@ done %{_mandir}/man1/script.1.gz %{_mandir}/man1/scriptreplay.1.gz %{_mandir}/man1/setterm.1.gz -%{_mandir}/man1/tailf.1.gz %{_mandir}/man1/taskset.1.gz %{_mandir}/man1/ul.1.gz %{_mandir}/man1/unshare.1.gz @@ -1086,9 +1096,13 @@ done %{_mandir}/man5/terminal-colors.d.5.gz %{_mandir}/man8/addpart.8.gz %{_mandir}/man8/agetty.8.gz +%if 0%{?suse_version} >= 1330 +%{_mandir}/man8/blkzone.8.gz +%endif %{_mandir}/man8/blockdev.8.gz -%{_mandir}/man8/delpart.8.gz +%{_mandir}/man8/chmem.8.gz %{_mandir}/man8/ctrlaltdel.8.gz +%{_mandir}/man8/delpart.8.gz %{_mandir}/man8/blkid.8.gz %{_mandir}/man8/blkdiscard.8.gz %{_mandir}/man8/switch_root.8.gz diff --git a/util-linux-2.29.2.tar.sign b/util-linux-2.29.2.tar.sign deleted file mode 100644 index 0cd5265..0000000 --- a/util-linux-2.29.2.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQIcBAABCAAGBQJYrYE9AAoJEOS3HV7sOcKEjB4P/2gYS9GoYqlJaCmPj+cpRl3u -nvKd3xl6HbDZVusmj3lTdXVUZu2UF0BzZa4jp/yErzjVyKEqwXij6IE/hX2GoyU1 -brqw8p9lWX7ARZAXc2v0B+u6Js8O1RY1hnprn+8L9MeJeGUxT4h2QqXmPk1gZrjb -b41yQhU21lAz3YSVf5zsmTy2wmgFZ8b8y3MYfLB9dWgCrL74xxCb3598YXf1tgG/ -Ig3oThWL2Z5in3GTPwPhawu/lNQxHgxVxVUL7ntLtdiqrdX+jG7FXEtgpOpiGtvg -T4U5iJt7kQhFZC2xMFhRa8nxW+LnuqR7k2vW8qwjGpH0NqBhMPOmHutgjfcHZ9iI -ENjQ2eVGo3kmniWZ5LgH+vVtf070QIoV5kCV8zSmMvGuCImamFxUcIqqSyhD6Z1V -aQWxhOj7PylxiOXDH7v0Uvo9euv9/Odv8AWWwJSn7nDGpu2o5jHSRxC2/r4nOqog -+SgQt+4vfD0Loei11ORimSEozeUmlvF/Wgdg+2XzHm3zRgI7pw+yB70xrn/TwPKz -iIL7jgwrlVe30QTjsht4KFFAVED0yJRwU2vZnVe71CaWwiVWcO5n5NsWZVg0RNvJ -xTwHbxs1JwLajgooQJ3YWnV1/b5vVZJFwMsrBNz8DLpZdKeIjdUVYZixN+l6uaSC -B+QbU2NQcwl0rESmYnzv -=V43B ------END PGP SIGNATURE----- diff --git a/util-linux-2.29.2.tar.xz b/util-linux-2.29.2.tar.xz deleted file mode 100644 index 0bc6d42..0000000 --- a/util-linux-2.29.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:accea4d678209f97f634f40a93b7e9fcad5915d1f4749f6c47bee6bf110fe8e3 -size 4277668 diff --git a/util-linux-2.30.tar.sign b/util-linux-2.30.tar.sign new file mode 100644 index 0000000..c1e2ca1 --- /dev/null +++ b/util-linux-2.30.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCAAGBQJZMUBLAAoJEOS3HV7sOcKEr9IP/i90Hc8Tiukh8Hlap02p4uWa +t083KEdi79a7H7vhCKNPjM8bkeod8F5/I+61uhSc9r4QoEpKX0vk8UU69NVK3gn1 +RntwmuXjZB4ZR+aDN6vmp3uuZlPEMG6em8dgiO+Gjy61xRGw9Krxo6+jyTvTzouT +bZsPy3JnVRXg0toawyR39ScRjGiLjb5P+3KMoJK8R6MUbkOMCgAN73yx6UHBkzb3 +n0zAALs10Y4OfYaIA4R+mcq4AKvPPsb/eCXTia75aThv/uFvdEpXK2wDYeUmjJmH +eVqTU2zYrhWvueu3FW7suAx/6o+ijGWD8ROu9Dd6sHnUK9mGLomxfxTthh2UlBES +23ZJBLLoIDPL+aUKq3EYeIsqLMf4eRaRUb5VIHwEZwcMqWvSvVZJGlk0WR3SzhfQ +UCAGWEE6ifQskVg6QbAZe8qFybbiTcH5onqKUJ2DlDiP53Kk8+0YKxhkNLulFoU1 +XrN0hqRP7z2BtlrSzhGt25heExfnMMIelpiqYb2jVtbXV9s5/0jKZT4x2CRFhZ86 +EHKvN1W0gtzMD1ZOLVEj1MaopS68TvmLooxf+x4Ns5GPGMReILWqwNWklwqXFGjs +P91JD3l6opcoUMO2xjVpVIcH6oLhXeLfAFEmUggrdmk/Jm4kjYQZAUi1ByWrJg30 +3fOzxEEoirUWP5cZoV5B +=8KFU +-----END PGP SIGNATURE----- diff --git a/util-linux-2.30.tar.xz b/util-linux-2.30.tar.xz new file mode 100644 index 0000000..ef2c745 --- /dev/null +++ b/util-linux-2.30.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c208a4ff6906cb7f57940aa5bc3a6eed146e50a7cc0a092f52ef2ab65057a08d +size 4478016 diff --git a/util-linux-losetup-Add-support-for-setting-logical-blocksize.patch b/util-linux-losetup-Add-support-for-setting-logical-blocksize.patch index 664fb43..e0710b6 100644 --- a/util-linux-losetup-Add-support-for-setting-logical-blocksize.patch +++ b/util-linux-losetup-Add-support-for-setting-logical-blocksize.patch @@ -1,7 +1,20 @@ -Index: util-linux-2.29/include/loopdev.h -=================================================================== ---- util-linux-2.29.orig/include/loopdev.h -+++ util-linux-2.29/include/loopdev.h +From a60cc5c2eeaad7ea5ea0c4a74cc4af5e2dc3f6c2 Mon Sep 17 00:00:00 2001 +From: Ruediger Meier +Date: Tue, 4 Apr 2017 16:29:58 +0200 +Subject: [PATCH] + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch + +Signed-off-by: Ruediger Meier +--- + include/loopdev.h | 5 ++++- + lib/loopdev.c | 20 ++++++++++++++++++++ + sys-utils/losetup.c | 19 +++++++++++++++---- + 3 files changed, 39 insertions(+), 5 deletions(-) + +diff --git a/include/loopdev.h b/include/loopdev.h +index 953d2db..7c783bf 100644 +--- a/include/loopdev.h ++++ b/include/loopdev.h @@ -41,6 +41,7 @@ enum { LO_FLAGS_AUTOCLEAR = 4, /* kernel >= 2.6.25 */ LO_FLAGS_PARTSCAN = 8, /* kernel >= 3.2 */ @@ -20,7 +33,7 @@ Index: util-linux-2.29/include/loopdev.h }; /* -@@ -173,6 +175,7 @@ int loopcxt_set_offset(struct loopdev_cx +@@ -173,6 +175,7 @@ int loopcxt_set_offset(struct loopdev_cxt *lc, uint64_t offset); int loopcxt_set_sizelimit(struct loopdev_cxt *lc, uint64_t sizelimit); int loopcxt_set_flags(struct loopdev_cxt *lc, uint32_t flags); int loopcxt_set_backing_file(struct loopdev_cxt *lc, const char *filename); @@ -28,11 +41,11 @@ Index: util-linux-2.29/include/loopdev.h extern char *loopcxt_get_backing_file(struct loopdev_cxt *lc); extern int loopcxt_get_backing_devno(struct loopdev_cxt *lc, dev_t *devno); -Index: util-linux-2.29/lib/loopdev.c -=================================================================== ---- util-linux-2.29.orig/lib/loopdev.c -+++ util-linux-2.29/lib/loopdev.c -@@ -1115,6 +1115,26 @@ int loopcxt_set_backing_file(struct loop +diff --git a/lib/loopdev.c b/lib/loopdev.c +index fd4f166..b85e2ce 100644 +--- a/lib/loopdev.c ++++ b/lib/loopdev.c +@@ -1115,6 +1115,26 @@ int loopcxt_set_backing_file(struct loopdev_cxt *lc, const char *filename) } /* @@ -59,19 +72,19 @@ Index: util-linux-2.29/lib/loopdev.c * In kernels prior to v3.9, if the offset or sizelimit options * are used, the block device's size won't be synced automatically. * blockdev --getsize64 and filesystems will use the backing -Index: util-linux-2.29/sys-utils/losetup.c -=================================================================== ---- util-linux-2.29.orig/sys-utils/losetup.c -+++ util-linux-2.29/sys-utils/losetup.c -@@ -398,6 +398,7 @@ static void usage(FILE *out) - +diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c +index 2218d3b..d8f1bfa 100644 +--- a/sys-utils/losetup.c ++++ b/sys-utils/losetup.c +@@ -399,6 +399,7 @@ static void usage(FILE *out) + fputs(USAGE_SEPARATOR, out); fputs(_(" -o, --offset start at offset into file\n"), out); fputs(_(" --sizelimit device is limited to bytes of the file\n"), out); + fputs(_(" --logical-blocksize set the logical block size to \n"), out); fputs(_(" -P, --partscan create a partitioned loop device\n"), out); fputs(_(" -r, --read-only set up a read-only loop device\n"), out); fputs(_(" --direct-io[=] open backing file with O_DIRECT\n"), out); -@@ -447,7 +448,8 @@ static void warn_size(const char *filena +@@ -448,7 +449,8 @@ static void warn_size(const char *filename, uint64_t size) static int create_loop(struct loopdev_cxt *lc, int nooverlap, int lo_flags, int flags, @@ -81,7 +94,7 @@ Index: util-linux-2.29/sys-utils/losetup.c { int hasdev = loopcxt_has_device(lc); int rc = 0; -@@ -533,6 +535,8 @@ static int create_loop(struct loopdev_cx +@@ -534,6 +536,8 @@ static int create_loop(struct loopdev_cxt *lc, loopcxt_set_offset(lc, offset); if (flags & LOOPDEV_FL_SIZELIMIT) loopcxt_set_sizelimit(lc, sizelimit); @@ -90,7 +103,7 @@ Index: util-linux-2.29/sys-utils/losetup.c if (lo_flags) loopcxt_set_flags(lc, lo_flags); if ((rc = loopcxt_set_backing_file(lc, file))) { -@@ -561,7 +565,7 @@ int main(int argc, char **argv) +@@ -562,7 +566,7 @@ int main(int argc, char **argv) struct loopdev_cxt lc; int act = 0, flags = 0, no_overlap = 0, c; char *file = NULL; @@ -99,7 +112,7 @@ Index: util-linux-2.29/sys-utils/losetup.c int res = 0, showdev = 0, lo_flags = 0; char *outarg = NULL; int list = 0; -@@ -571,7 +575,8 @@ int main(int argc, char **argv) +@@ -572,7 +576,8 @@ int main(int argc, char **argv) OPT_SIZELIMIT = CHAR_MAX + 1, OPT_SHOW, OPT_RAW, @@ -108,16 +121,16 @@ Index: util-linux-2.29/sys-utils/losetup.c + OPT_BLOCKSIZE, }; static const struct option longopts[] = { - { "all", 0, 0, 'a' }, -@@ -584,6 +589,7 @@ int main(int argc, char **argv) - { "associated", 1, 0, 'j' }, - { "json", 0, 0, 'J' }, - { "list", 0, 0, 'l' }, -+ { "logical-blocksize", 1, 0, OPT_BLOCKSIZE }, - { "noheadings", 0, 0, 'n' }, - { "offset", 1, 0, 'o' }, - { "output", 1, 0, 'O' }, -@@ -657,6 +663,10 @@ int main(int argc, char **argv) + { "all", no_argument, NULL, 'a' }, +@@ -585,6 +590,7 @@ int main(int argc, char **argv) + { "associated", required_argument, NULL, 'j' }, + { "json", no_argument, NULL, 'J' }, + { "list", no_argument, NULL, 'l' }, ++ { "logical-blocksize", required_argument, NULL, OPT_BLOCKSIZE }, + { "noheadings", no_argument, NULL, 'n' }, + { "offset", required_argument, NULL, 'o' }, + { "output", required_argument, NULL, 'O' }, +@@ -658,6 +664,10 @@ int main(int argc, char **argv) act = A_SHOW; file = optarg; break; @@ -128,7 +141,7 @@ Index: util-linux-2.29/sys-utils/losetup.c case 'l': list = 1; break; -@@ -789,7 +799,8 @@ int main(int argc, char **argv) +@@ -790,7 +800,8 @@ int main(int argc, char **argv) switch (act) { case A_CREATE: @@ -138,3 +151,6 @@ Index: util-linux-2.29/sys-utils/losetup.c if (res == 0) { if (showdev) printf("%s\n", loopcxt_get_device(&lc)); +-- +1.8.5.6 + diff --git a/util-linux-lscpu-cleanup-DMI-detection-return-codes.patch b/util-linux-lscpu-cleanup-DMI-detection-return-codes.patch new file mode 100644 index 0000000..13c00b5 --- /dev/null +++ b/util-linux-lscpu-cleanup-DMI-detection-return-codes.patch @@ -0,0 +1,85 @@ +From c972852b29391c35b1d5c7d3e1e6413e0cc86908 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 13 Jun 2017 12:15:11 +0200 +Subject: [PATCH] lscpu: cleanup DMI detection return codes + +Michal wrote: + There is weird mix of logic in lscpu-dmi.c which sometimes returns 0 and + sometimes -1 on error. Since most checks are if (rc) goto done; this + bails out early on error skipping some detection methods. Further, in + lscpu.c all following detections are guarder by if(hyper) so returning + -1 causes all following methods to be skipped. + +Reported-by: Michal Suchanek +Signed-off-by: Karel Zak +--- + sys-utils/lscpu-dmi.c | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +diff --git a/sys-utils/lscpu-dmi.c b/sys-utils/lscpu-dmi.c +index 3ba999124a2e..4b845b97ccd9 100644 +--- a/sys-utils/lscpu-dmi.c ++++ b/sys-utils/lscpu-dmi.c +@@ -174,7 +174,7 @@ done: + static int hypervisor_decode_legacy(uint8_t *buf, const char *devmem) + { + if (!checksum(buf, 0x0F)) +- return HYPER_NONE; ++ return -1; + + return hypervisor_from_dmi_table(DWORD(buf + 0x08), WORD(buf + 0x06), + WORD(buf + 0x0C), +@@ -254,11 +254,15 @@ int read_hypervisor_dmi(void) + || sizeof(uint16_t) != 2 + || sizeof(uint32_t) != 4 + || '\0' != 0) +- return rc; ++ goto done; + ++ /* -1 : no DMI in /sys, ++ * 0 : DMI exist, nothing detected (HYPER_NONE) ++ * >0 : hypervisor detected ++ */ + rc = hypervisor_decode_sysfw(); +- if (rc >= 0) +- return rc; ++ if (rc >= HYPER_NONE) ++ goto done; + + /* First try EFI (ia64, Intel-based Mac) */ + switch (address_from_efi(&fp)) { +@@ -273,8 +277,9 @@ int read_hypervisor_dmi(void) + goto done; + + rc = hypervisor_decode_smbios(buf, _PATH_DEV_MEM); +- if (rc) ++ if (rc >= HYPER_NONE) + goto done; ++ + free(buf); + buf = NULL; + memory_scan: +@@ -287,17 +292,17 @@ memory_scan: + for (fp = 0; fp <= 0xFFF0; fp += 16) { + if (memcmp(buf + fp, "_SM_", 4) == 0 && fp <= 0xFFE0) { + rc = hypervisor_decode_smbios(buf + fp, _PATH_DEV_MEM); +- if (rc == -1) ++ if (rc < 0) + fp += 16; + + } else if (memcmp(buf + fp, "_DMI_", 5) == 0) + rc = hypervisor_decode_legacy(buf + fp, _PATH_DEV_MEM); + +- if (rc >= 0) ++ if (rc >= HYPER_NONE) + break; + } + #endif + done: + free(buf); +- return rc; ++ return rc < 0 ? HYPER_NONE : rc; + } +-- +2.12.3 + diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 2c9f0dd..6bfa847 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,51 @@ +------------------------------------------------------------------- +Sun Jun 11 12:12:44 UTC 2017 - lnussel@suse.de + +- don't conflict with sysvinit-tools in Tumblweed anymore. Needed for Leap 15 + which wants to use a different release number scheme (lp150.x which produces + lower numbers than the conflict). + +------------------------------------------------------------------- +Thu Jun 8 21:21:12 UTC 2017 - sweet_f_a@gmx.de + +- Update to version 2.30: + * Many changes and improvements, most notably: + * The libblkid library has been improved for hybrid CDROM/DVD + media. + * The deprecated command tailf has been removed. Use "tail -f" + from coreutils. + * blkzone -- NEW COMMAND to run zone commands on block devices + that support Zoned Block Commands (ZBC) or Zoned-device ATA + Commands (ZAC). + * fincore -- NEW COMMAND to count pages of file contents in + core (memory). + * lsmem -- NEW COMMAND to list the ranges of available memory + with their online status. + * The command fallocate -- supports an "insert range" operation + now. + * The command "column -t|--table" has been modified to use + libsmartcols. It now provides nearly all of that library's + functionality from the command line. + * Security issues: + * hwclock - no longer makes any internal permission checks. The + System Administrator must set proper permissions to control + user access to the RTC. It is NOT recommended to use SUID. + * CVE-2016-2779 - This security issue is NOT FIXED yet. + * More details at: + https://www.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30-ReleaseNotes +- Drop upstreamed patch + arm64-lscpu-use-sysfs-for-table-access-if-available.patch +- Refreshed patch + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch +- fix compiler warnings for mkzimage_cmdline + +------------------------------------------------------------------- +Thu Jun 8 16:28:41 UTC 2017 - msuchanek@suse.com + +- When when hypervisor_decode_sysfw fails continue with other + detection methods (bsc#1042991, bsc#1039360, bsc#1033718) + + util-linux-lscpu-cleanup-DMI-detection-return-codes.patch + ------------------------------------------------------------------- Wed Apr 12 09:19:21 UTC 2017 - agraf@suse.com @@ -178,13 +226,13 @@ Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de - Update to version 2.28.2, bugfix release, see - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes + https://www.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes ------------------------------------------------------------------- Thu Aug 11 13:24:34 UTC 2016 - sweet_f_a@gmx.de - Update to version 2.28.1, bugfix release, see - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes + https://www.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes - Remove util-linux-libblkid-wipe-offset.patch (upstream) - use the new configure option --enable-libuuid-force-uuidd instead of sed'ing configure.ac @@ -293,7 +341,7 @@ Tue Dec 1 10:27:17 UTC 2015 - sweet_f_a@gmx.de Wed Nov 11 15:46:46 UTC 2015 - sweet_f_a@gmx.de - Update to version 2.27.1, bugfix release, see - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes + https://www.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes (fixes bsc#950778, FATE#320552). ------------------------------------------------------------------- @@ -1848,7 +1896,7 @@ Fri Jul 9 06:23:27 UTC 2010 - puzel@novell.com - new commands: findmnt, fsfreeze, swaplabel - blkid: new option "-i" to print I/O limits - full release notes: - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes + https://www.kernel.org/pub/linux/utils/util-linux/v2.18/v2.18-ReleaseNotes - update to adjtimex-1.28 - update to which-2.20 - drop util-linux-2.14.1-mount_skip_sync.patch (fixed upstream) diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 5dc3eda..2ddc222 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -116,7 +116,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.29.2 +Version: 2.30 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -125,7 +125,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-%{version}.tar.xz +Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.30/util-linux-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.service Source5: etc.raw @@ -135,7 +135,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-%{version}.tar.sign +Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.30/util-linux-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -157,8 +157,8 @@ Source51: blkid.conf Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FEATURE-SLE util-linux-losetup-Add-support-for-setting-logical-blocksize.patch bsc931634 FATE319010 hare@suse.de -- Add support for setting logical blocksizes. Patch1: util-linux-losetup-Add-support-for-setting-logical-blocksize.patch -# PATCH-BUG-FIX arm64-lscpu-use-sysfs-for-table-access-if-available.patch bsc#1033718 agraf@suse.de -- Use SMBIOS3 tables when available in lscpu -Patch2: arm64-lscpu-use-sysfs-for-table-access-if-available.patch +# PATCH-BUG-FIX util-linux-lscpu-cleanup-DMI-detection-return-codes.patch bsc#1039360 msuchanek@suse.de -- lscpu: cleanup DMI detection return codes +Patch2: util-linux-lscpu-cleanup-DMI-detection-return-codes.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -177,8 +177,10 @@ Obsoletes: login < 4.0-33.7 # File conflict of su and kill (up to 12.3 and SLE11). # It should be coreutils < 8.21-4, but coreutils provide Release-less symbol. Conflicts: coreutils < 8.21 +%if 0%{?suse_version} < 1330 # File conflict of sulogin and utmpdump (up to 12.3 and SLE11). Conflicts: sysvinit-tools < 2.88+-87 +%endif # File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3). Conflicts: bash-completion <= 2.1-10 # The preset is provided by the presets branding package since 0.4 (bsc#1012850) and since 12.2 in SLE (boo#1029775) @@ -601,6 +603,7 @@ make %{?_smp_mflags} export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" +export TS_OPT_fincore_count_known_fail="yes" export TS_OPT_libfdisk_gpt_known_fail="yes" export TS_OPT_misc_flock_known_fail="yes" export TS_OPT_misc_ionice_known_fail="yes" @@ -610,7 +613,7 @@ export TS_OPT_kill_print_pid_known_fail="yes" export TS_OPT_kill_queue_known_fail="yes" export TS_OPT_uuid_uuidd_known_fail="yes" # unsupported syscall in script(1) ... might be fixed in qemu -export TS_OPT_script_known_fail="yes" +export TS_OPT_script_known_fail="yes" # may segfault on qemu-user-space export TS_OPT_misc_setarch_known_fail="yes" %endif @@ -934,6 +937,7 @@ done %{_bindir}/su %{_bindir}/eject %{_bindir}/cal +%{_bindir}/chmem %{_bindir}/chrt %{_bindir}/col %{_bindir}/colcrt @@ -941,6 +945,7 @@ done %{_bindir}/column %{_bindir}/dmesg %{_bindir}/fallocate +%{_bindir}/fincore %{_bindir}/findmnt %{_bindir}/flock %{_bindir}/getopt @@ -960,6 +965,7 @@ done %{_bindir}/lscpu %{_bindir}/lsipc %{_bindir}/lslocks +%{_bindir}/lsmem %{_bindir}/lsns %{_bindir}/mcookie %{_bindir}/mesg @@ -976,7 +982,6 @@ done %{_bindir}/setarch %{_bindir}/setpriv %{_bindir}/setsid -%{_bindir}/tailf %{_bindir}/taskset %{_bindir}/ul %{_bindir}/umount @@ -994,6 +999,10 @@ done %{_sbindir}/agetty %{_sbindir}/blkid %{_sbindir}/blkdiscard +# blkzone depends on linux/blkzoned.h +%if 0%{?suse_version} >= 1330 +%{_sbindir}/blkzone +%endif %{_sbindir}/blockdev %{_sbindir}/chcpu %{_sbindir}/ctrlaltdel @@ -1041,6 +1050,7 @@ done %{_mandir}/man1/dmesg.1.gz %{_mandir}/man1/eject.1.gz %{_mandir}/man1/fallocate.1.gz +%{_mandir}/man1/fincore.1.gz %{_mandir}/man1/flock.1.gz %{_mandir}/man1/getopt.1.gz %{_mandir}/man1/hexdump.1.gz @@ -1055,6 +1065,7 @@ done %{_mandir}/man1/look.1.gz %{_mandir}/man1/lscpu.1.gz %{_mandir}/man1/lsipc.1.gz +%{_mandir}/man1/lsmem.1.gz %{_mandir}/man1/mcookie.1.gz %{_mandir}/man1/mesg.1.gz %{_mandir}/man1/more.1.gz @@ -1070,7 +1081,6 @@ done %{_mandir}/man1/script.1.gz %{_mandir}/man1/scriptreplay.1.gz %{_mandir}/man1/setterm.1.gz -%{_mandir}/man1/tailf.1.gz %{_mandir}/man1/taskset.1.gz %{_mandir}/man1/ul.1.gz %{_mandir}/man1/unshare.1.gz @@ -1086,9 +1096,13 @@ done %{_mandir}/man5/terminal-colors.d.5.gz %{_mandir}/man8/addpart.8.gz %{_mandir}/man8/agetty.8.gz +%if 0%{?suse_version} >= 1330 +%{_mandir}/man8/blkzone.8.gz +%endif %{_mandir}/man8/blockdev.8.gz -%{_mandir}/man8/delpart.8.gz +%{_mandir}/man8/chmem.8.gz %{_mandir}/man8/ctrlaltdel.8.gz +%{_mandir}/man8/delpart.8.gz %{_mandir}/man8/blkid.8.gz %{_mandir}/man8/blkdiscard.8.gz %{_mandir}/man8/switch_root.8.gz diff --git a/util-linux.changes b/util-linux.changes index 2c9f0dd..6bfa847 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,51 @@ +------------------------------------------------------------------- +Sun Jun 11 12:12:44 UTC 2017 - lnussel@suse.de + +- don't conflict with sysvinit-tools in Tumblweed anymore. Needed for Leap 15 + which wants to use a different release number scheme (lp150.x which produces + lower numbers than the conflict). + +------------------------------------------------------------------- +Thu Jun 8 21:21:12 UTC 2017 - sweet_f_a@gmx.de + +- Update to version 2.30: + * Many changes and improvements, most notably: + * The libblkid library has been improved for hybrid CDROM/DVD + media. + * The deprecated command tailf has been removed. Use "tail -f" + from coreutils. + * blkzone -- NEW COMMAND to run zone commands on block devices + that support Zoned Block Commands (ZBC) or Zoned-device ATA + Commands (ZAC). + * fincore -- NEW COMMAND to count pages of file contents in + core (memory). + * lsmem -- NEW COMMAND to list the ranges of available memory + with their online status. + * The command fallocate -- supports an "insert range" operation + now. + * The command "column -t|--table" has been modified to use + libsmartcols. It now provides nearly all of that library's + functionality from the command line. + * Security issues: + * hwclock - no longer makes any internal permission checks. The + System Administrator must set proper permissions to control + user access to the RTC. It is NOT recommended to use SUID. + * CVE-2016-2779 - This security issue is NOT FIXED yet. + * More details at: + https://www.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30-ReleaseNotes +- Drop upstreamed patch + arm64-lscpu-use-sysfs-for-table-access-if-available.patch +- Refreshed patch + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch +- fix compiler warnings for mkzimage_cmdline + +------------------------------------------------------------------- +Thu Jun 8 16:28:41 UTC 2017 - msuchanek@suse.com + +- When when hypervisor_decode_sysfw fails continue with other + detection methods (bsc#1042991, bsc#1039360, bsc#1033718) + + util-linux-lscpu-cleanup-DMI-detection-return-codes.patch + ------------------------------------------------------------------- Wed Apr 12 09:19:21 UTC 2017 - agraf@suse.com @@ -178,13 +226,13 @@ Tue Nov 8 15:11:37 UTC 2016 - sweet_f_a@gmx.de Wed Sep 7 12:43:31 UTC 2016 - sweet_f_a@gmx.de - Update to version 2.28.2, bugfix release, see - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes + https://www.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes ------------------------------------------------------------------- Thu Aug 11 13:24:34 UTC 2016 - sweet_f_a@gmx.de - Update to version 2.28.1, bugfix release, see - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes + https://www.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes - Remove util-linux-libblkid-wipe-offset.patch (upstream) - use the new configure option --enable-libuuid-force-uuidd instead of sed'ing configure.ac @@ -293,7 +341,7 @@ Tue Dec 1 10:27:17 UTC 2015 - sweet_f_a@gmx.de Wed Nov 11 15:46:46 UTC 2015 - sweet_f_a@gmx.de - Update to version 2.27.1, bugfix release, see - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes + https://www.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes (fixes bsc#950778, FATE#320552). ------------------------------------------------------------------- @@ -1848,7 +1896,7 @@ Fri Jul 9 06:23:27 UTC 2010 - puzel@novell.com - new commands: findmnt, fsfreeze, swaplabel - blkid: new option "-i" to print I/O limits - full release notes: - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes + https://www.kernel.org/pub/linux/utils/util-linux/v2.18/v2.18-ReleaseNotes - update to adjtimex-1.28 - update to which-2.20 - drop util-linux-2.14.1-mount_skip_sync.patch (fixed upstream) diff --git a/util-linux.spec b/util-linux.spec index 8ca3b4d..fa84494 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -116,7 +116,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.29.2 +Version: 2.30 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -125,7 +125,7 @@ Release: 0 # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-%{version}.tar.xz +Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.30/util-linux-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.service Source5: etc.raw @@ -135,7 +135,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-%{version}.tar.sign +Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.30/util-linux-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 @@ -157,8 +157,8 @@ Source51: blkid.conf Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # PATCH-FEATURE-SLE util-linux-losetup-Add-support-for-setting-logical-blocksize.patch bsc931634 FATE319010 hare@suse.de -- Add support for setting logical blocksizes. Patch1: util-linux-losetup-Add-support-for-setting-logical-blocksize.patch -# PATCH-BUG-FIX arm64-lscpu-use-sysfs-for-table-access-if-available.patch bsc#1033718 agraf@suse.de -- Use SMBIOS3 tables when available in lscpu -Patch2: arm64-lscpu-use-sysfs-for-table-access-if-available.patch +# PATCH-BUG-FIX util-linux-lscpu-cleanup-DMI-detection-return-codes.patch bsc#1039360 msuchanek@suse.de -- lscpu: cleanup DMI detection return codes +Patch2: util-linux-lscpu-cleanup-DMI-detection-return-codes.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -177,8 +177,10 @@ Obsoletes: login < 4.0-33.7 # File conflict of su and kill (up to 12.3 and SLE11). # It should be coreutils < 8.21-4, but coreutils provide Release-less symbol. Conflicts: coreutils < 8.21 +%if 0%{?suse_version} < 1330 # File conflict of sulogin and utmpdump (up to 12.3 and SLE11). Conflicts: sysvinit-tools < 2.88+-87 +%endif # File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3). Conflicts: bash-completion <= 2.1-10 # The preset is provided by the presets branding package since 0.4 (bsc#1012850) and since 12.2 in SLE (boo#1029775) @@ -601,6 +603,7 @@ make %{?_smp_mflags} export TS_OPT_fdisk_gpt_known_fail="yes" export TS_OPT_fdisk_oddinput_known_fail="yes" export TS_OPT_fdisk_sunlabel_known_fail="yes" +export TS_OPT_fincore_count_known_fail="yes" export TS_OPT_libfdisk_gpt_known_fail="yes" export TS_OPT_misc_flock_known_fail="yes" export TS_OPT_misc_ionice_known_fail="yes" @@ -610,7 +613,7 @@ export TS_OPT_kill_print_pid_known_fail="yes" export TS_OPT_kill_queue_known_fail="yes" export TS_OPT_uuid_uuidd_known_fail="yes" # unsupported syscall in script(1) ... might be fixed in qemu -export TS_OPT_script_known_fail="yes" +export TS_OPT_script_known_fail="yes" # may segfault on qemu-user-space export TS_OPT_misc_setarch_known_fail="yes" %endif @@ -934,6 +937,7 @@ done %{_bindir}/su %{_bindir}/eject %{_bindir}/cal +%{_bindir}/chmem %{_bindir}/chrt %{_bindir}/col %{_bindir}/colcrt @@ -941,6 +945,7 @@ done %{_bindir}/column %{_bindir}/dmesg %{_bindir}/fallocate +%{_bindir}/fincore %{_bindir}/findmnt %{_bindir}/flock %{_bindir}/getopt @@ -960,6 +965,7 @@ done %{_bindir}/lscpu %{_bindir}/lsipc %{_bindir}/lslocks +%{_bindir}/lsmem %{_bindir}/lsns %{_bindir}/mcookie %{_bindir}/mesg @@ -976,7 +982,6 @@ done %{_bindir}/setarch %{_bindir}/setpriv %{_bindir}/setsid -%{_bindir}/tailf %{_bindir}/taskset %{_bindir}/ul %{_bindir}/umount @@ -994,6 +999,10 @@ done %{_sbindir}/agetty %{_sbindir}/blkid %{_sbindir}/blkdiscard +# blkzone depends on linux/blkzoned.h +%if 0%{?suse_version} >= 1330 +%{_sbindir}/blkzone +%endif %{_sbindir}/blockdev %{_sbindir}/chcpu %{_sbindir}/ctrlaltdel @@ -1041,6 +1050,7 @@ done %{_mandir}/man1/dmesg.1.gz %{_mandir}/man1/eject.1.gz %{_mandir}/man1/fallocate.1.gz +%{_mandir}/man1/fincore.1.gz %{_mandir}/man1/flock.1.gz %{_mandir}/man1/getopt.1.gz %{_mandir}/man1/hexdump.1.gz @@ -1055,6 +1065,7 @@ done %{_mandir}/man1/look.1.gz %{_mandir}/man1/lscpu.1.gz %{_mandir}/man1/lsipc.1.gz +%{_mandir}/man1/lsmem.1.gz %{_mandir}/man1/mcookie.1.gz %{_mandir}/man1/mesg.1.gz %{_mandir}/man1/more.1.gz @@ -1070,7 +1081,6 @@ done %{_mandir}/man1/script.1.gz %{_mandir}/man1/scriptreplay.1.gz %{_mandir}/man1/setterm.1.gz -%{_mandir}/man1/tailf.1.gz %{_mandir}/man1/taskset.1.gz %{_mandir}/man1/ul.1.gz %{_mandir}/man1/unshare.1.gz @@ -1086,9 +1096,13 @@ done %{_mandir}/man5/terminal-colors.d.5.gz %{_mandir}/man8/addpart.8.gz %{_mandir}/man8/agetty.8.gz +%if 0%{?suse_version} >= 1330 +%{_mandir}/man8/blkzone.8.gz +%endif %{_mandir}/man8/blockdev.8.gz -%{_mandir}/man8/delpart.8.gz +%{_mandir}/man8/chmem.8.gz %{_mandir}/man8/ctrlaltdel.8.gz +%{_mandir}/man8/delpart.8.gz %{_mandir}/man8/blkid.8.gz %{_mandir}/man8/blkdiscard.8.gz %{_mandir}/man8/switch_root.8.gz From f59fa3617d439e75c488baa7c1fdee947ceb8e145474b8ee71086e17c20731cb Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sun, 9 Jul 2017 11:03:52 +0000 Subject: [PATCH 210/211] Accepting request 507990 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/507990 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=219 --- python-libmount.changes | 5 +++++ python-libmount.spec | 3 +++ util-linux-systemd.changes | 5 +++++ util-linux-systemd.spec | 3 +++ util-linux.changes | 5 +++++ util-linux.spec | 3 +++ 6 files changed, 24 insertions(+) diff --git a/python-libmount.changes b/python-libmount.changes index 6bfa847..ba8d776 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 3 12:38:36 UTC 2017 - schwab@suse.de + +- Make sure group tty is defined + ------------------------------------------------------------------- Sun Jun 11 12:12:44 UTC 2017 - lnussel@suse.de diff --git a/python-libmount.spec b/python-libmount.spec index 5615295..5f866e6 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -163,6 +163,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux Supplements: filesystem(minix) +%if 0%{?suse_version} >= 1330 +Requires: group(tty) +%endif Provides: fsck-with-dev-lock = %{version} # bnc#651598: Provides: util-linux(fake+no-canonicalize) diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 6bfa847..ba8d776 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 3 12:38:36 UTC 2017 - schwab@suse.de + +- Make sure group tty is defined + ------------------------------------------------------------------- Sun Jun 11 12:12:44 UTC 2017 - lnussel@suse.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 2ddc222..aa78a04 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -163,6 +163,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux Supplements: filesystem(minix) +%if 0%{?suse_version} >= 1330 +Requires: group(tty) +%endif Provides: fsck-with-dev-lock = %{version} # bnc#651598: Provides: util-linux(fake+no-canonicalize) diff --git a/util-linux.changes b/util-linux.changes index 6bfa847..ba8d776 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 3 12:38:36 UTC 2017 - schwab@suse.de + +- Make sure group tty is defined + ------------------------------------------------------------------- Sun Jun 11 12:12:44 UTC 2017 - lnussel@suse.de diff --git a/util-linux.spec b/util-linux.spec index fa84494..bea859e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -163,6 +163,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux Supplements: filesystem(minix) +%if 0%{?suse_version} >= 1330 +Requires: group(tty) +%endif Provides: fsck-with-dev-lock = %{version} # bnc#651598: Provides: util-linux(fake+no-canonicalize) From 3aed3caa56c0d01121170ae579e989b5c6734495a75f321c0647fa0295cb180a Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sun, 9 Jul 2017 18:29:39 +0000 Subject: [PATCH 211/211] Accepting request 509038 from openSUSE:Factory Revert - this drags in even systemd into ring0 OBS-URL: https://build.opensuse.org/request/show/509038 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=220 --- python-libmount.changes | 5 ----- python-libmount.spec | 3 --- util-linux-systemd.changes | 5 ----- util-linux-systemd.spec | 3 --- util-linux.changes | 5 ----- util-linux.spec | 3 --- 6 files changed, 24 deletions(-) diff --git a/python-libmount.changes b/python-libmount.changes index ba8d776..6bfa847 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Mon Jul 3 12:38:36 UTC 2017 - schwab@suse.de - -- Make sure group tty is defined - ------------------------------------------------------------------- Sun Jun 11 12:12:44 UTC 2017 - lnussel@suse.de diff --git a/python-libmount.spec b/python-libmount.spec index 5f866e6..5615295 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -163,9 +163,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux Supplements: filesystem(minix) -%if 0%{?suse_version} >= 1330 -Requires: group(tty) -%endif Provides: fsck-with-dev-lock = %{version} # bnc#651598: Provides: util-linux(fake+no-canonicalize) diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index ba8d776..6bfa847 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Mon Jul 3 12:38:36 UTC 2017 - schwab@suse.de - -- Make sure group tty is defined - ------------------------------------------------------------------- Sun Jun 11 12:12:44 UTC 2017 - lnussel@suse.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index aa78a04..2ddc222 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -163,9 +163,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux Supplements: filesystem(minix) -%if 0%{?suse_version} >= 1330 -Requires: group(tty) -%endif Provides: fsck-with-dev-lock = %{version} # bnc#651598: Provides: util-linux(fake+no-canonicalize) diff --git a/util-linux.changes b/util-linux.changes index ba8d776..6bfa847 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Mon Jul 3 12:38:36 UTC 2017 - schwab@suse.de - -- Make sure group tty is defined - ------------------------------------------------------------------- Sun Jun 11 12:12:44 UTC 2017 - lnussel@suse.de diff --git a/util-linux.spec b/util-linux.spec index bea859e..fa84494 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -163,9 +163,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux Supplements: filesystem(minix) -%if 0%{?suse_version} >= 1330 -Requires: group(tty) -%endif Provides: fsck-with-dev-lock = %{version} # bnc#651598: Provides: util-linux(fake+no-canonicalize)