mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 06:37:14 +08:00
usbutils/util-linux/udev bump/fixes/cleanup
This commit is contained in:
parent
0be1cfe56e
commit
63925dd2d2
40
gcc/PKGBUILD
40
gcc/PKGBUILD
@ -9,26 +9,27 @@
|
|||||||
|
|
||||||
pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-ada' 'gcc-go')
|
pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-ada' 'gcc-go')
|
||||||
pkgver=4.6.2
|
pkgver=4.6.2
|
||||||
pkgrel=1
|
pkgrel=7
|
||||||
_snapshot=
|
_snapshot=4.6-20120120
|
||||||
_libstdcppmanver=20110814 # Note: check source directory name when updating this
|
_libstdcppmanver=20111215 # Note: check source directory name when updating this
|
||||||
pkgdesc="The GNU Compiler Collection"
|
pkgdesc="The GNU Compiler Collection"
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
license=('GPL' 'LGPL' 'FDL' 'custom')
|
license=('GPL' 'LGPL' 'FDL' 'custom')
|
||||||
url="http://gcc.gnu.org"
|
url="http://gcc.gnu.org"
|
||||||
makedepends=('binutils>=2.21-9' 'libmpc' 'cloog' 'ppl' 'gcc-ada')
|
makedepends=('binutils>=2.22' 'libmpc' 'cloog' 'ppl' 'gcc-ada')
|
||||||
checkdepends=('dejagnu')
|
checkdepends=('dejagnu')
|
||||||
options=('!libtool' '!emptydirs')
|
options=('!libtool' '!emptydirs')
|
||||||
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
|
source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
|
||||||
#http://chakra-project.org/sources/${pkgname}/gcc-${_snapshot}.tar.bz2
|
ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2
|
||||||
#ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2
|
ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-man.${_libstdcppmanver}.tar.bz2
|
||||||
ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api.${_libstdcppmanver}.man.tar.bz2
|
|
||||||
gcc_pure64.patch
|
gcc_pure64.patch
|
||||||
gcc-hash-style-both.patch)
|
gcc-hash-style-both.patch
|
||||||
md5sums=('028115c4fbfb6cfd75d6369f4a90d87e'
|
gcc-4.6.2-cloog-0.17.patch)
|
||||||
'ce920d2550ff7e042b9f091d27764d8f'
|
md5sums=('f7ca5d9f7a07216577f81318b7cf56ef'
|
||||||
|
'450772ce32daed97d7383199f8797f33'
|
||||||
'4030ee1c08dd1e843c0225b772360e76'
|
'4030ee1c08dd1e843c0225b772360e76'
|
||||||
'4df25b623799b148a0703eaeec8fdf3f')
|
'4df25b623799b148a0703eaeec8fdf3f'
|
||||||
|
'6d9939a2e667376031679ac9f9c49263')
|
||||||
|
|
||||||
if [ -n "${_snapshot}" ]; then
|
if [ -n "${_snapshot}" ]; then
|
||||||
_basedir="${srcdir}/gcc-${_snapshot}"
|
_basedir="${srcdir}/gcc-${_snapshot}"
|
||||||
@ -50,6 +51,9 @@ build() {
|
|||||||
fi
|
fi
|
||||||
patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch
|
patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch
|
||||||
|
|
||||||
|
# compatibility with latest cloog
|
||||||
|
patch -Np1 -i ${srcdir}/gcc-4.6.2-cloog-0.17.patch
|
||||||
|
|
||||||
echo ${pkgver} > gcc/BASE-VER
|
echo ${pkgver} > gcc/BASE-VER
|
||||||
|
|
||||||
cd ${srcdir}
|
cd ${srcdir}
|
||||||
@ -63,11 +67,12 @@ build() {
|
|||||||
--enable-shared --enable-threads=posix \
|
--enable-shared --enable-threads=posix \
|
||||||
--with-system-zlib --enable-__cxa_atexit \
|
--with-system-zlib --enable-__cxa_atexit \
|
||||||
--disable-libunwind-exceptions --enable-clocale=gnu \
|
--disable-libunwind-exceptions --enable-clocale=gnu \
|
||||||
|
--disable-libstdcxx-pch --enable-libstdcxx-time \
|
||||||
--enable-gnu-unique-object --enable-linker-build-id \
|
--enable-gnu-unique-object --enable-linker-build-id \
|
||||||
--with-ppl --enable-cloog-backend=isl \
|
--with-ppl --enable-cloog-backend=isl \
|
||||||
--enable-lto --enable-gold --enable-ld=default \
|
--enable-lto --enable-gold --enable-ld=default \
|
||||||
--enable-plugin --with-plugin-ld=ld.gold \
|
--enable-plugin --with-plugin-ld=ld.gold \
|
||||||
--disable-multilib --disable-libssp --disable-libstdcxx-pch \
|
--disable-multilib --disable-libssp \
|
||||||
--enable-checking=release
|
--enable-checking=release
|
||||||
make
|
make
|
||||||
}
|
}
|
||||||
@ -117,7 +122,7 @@ package_gcc-libs()
|
|||||||
package_gcc()
|
package_gcc()
|
||||||
{
|
{
|
||||||
pkgdesc="The GNU Compiler Collection - C and C++ frontends"
|
pkgdesc="The GNU Compiler Collection - C and C++ frontends"
|
||||||
depends=("gcc-libs=$pkgver-$pkgrel" 'binutils>=2.21.1' 'libmpc' 'cloog' 'ppl')
|
depends=("gcc-libs=$pkgver-$pkgrel" 'binutils>=2.22' 'libmpc' 'cloog' 'ppl')
|
||||||
groups=('base-devel')
|
groups=('base-devel')
|
||||||
install=gcc.install
|
install=gcc.install
|
||||||
|
|
||||||
@ -148,6 +153,11 @@ package_gcc()
|
|||||||
install -m755 gcc/build/gengtype $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/
|
install -m755 gcc/build/gengtype $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/
|
||||||
install -m644 gcc/gtype.state $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/
|
install -m644 gcc/gtype.state $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/
|
||||||
|
|
||||||
|
# plugin headers are all over the place at the moment...
|
||||||
|
for i in common objc pragma pretty-print; do
|
||||||
|
ln -sf ../c-$i.h $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/plugin/include/c-family/c-$i.h
|
||||||
|
done
|
||||||
|
|
||||||
# POSIX conformance launcher scripts for c89 and c99
|
# POSIX conformance launcher scripts for c89 and c99
|
||||||
cat > $pkgdir/usr/bin/c89 <<"EOF"
|
cat > $pkgdir/usr/bin/c89 <<"EOF"
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
@ -179,7 +189,7 @@ EOF
|
|||||||
|
|
||||||
# install the libstdc++ man pages
|
# install the libstdc++ man pages
|
||||||
install -dm755 ${pkgdir}/usr/share/man/man3
|
install -dm755 ${pkgdir}/usr/share/man/man3
|
||||||
install -m644 ${srcdir}/man/man3/* ${pkgdir}/usr/share/man/man3/
|
install -m644 ${srcdir}/man3/* ${pkgdir}/usr/share/man/man3/
|
||||||
|
|
||||||
# Install Runtime Library Exception
|
# Install Runtime Library Exception
|
||||||
install -Dm644 ${_basedir}/COPYING.RUNTIME \
|
install -Dm644 ${_basedir}/COPYING.RUNTIME \
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
# These rules create /dev/{cdrom,dvd,...} symlinks
|
|
||||||
SUBSYSTEM=="block", KERNEL=="sr0" , SYMLINK+="cdrom cdrw dvd dvdrw"
|
|
||||||
SUBSYSTEM=="block", KERNEL=="sr1" , SYMLINK+="cdrom1 cdrw1 dvd1 dvdrw1"
|
|
||||||
SUBSYSTEM=="block", KERNEL=="sr2" , SYMLINK+="cdrom2 cdrw2 dvd2 dvdrw2"
|
|
||||||
SUBSYSTEM=="block", KERNEL=="sr3" , SYMLINK+="cdrom3 cdrw3 dvd3 dvdrw3"
|
|
||||||
SUBSYSTEM=="block", KERNEL=="sr4" , SYMLINK+="cdrom4 cdrw4 dvd4 dvdrw4"
|
|
||||||
SUBSYSTEM=="block", KERNEL=="sr5" , SYMLINK+="cdrom5 cdrw5 dvd5 dvdrw5"
|
|
||||||
SUBSYSTEM=="block", KERNEL=="sr6" , SYMLINK+="cdrom6 cdrw6 dvd6 dvdrw6"
|
|
||||||
SUBSYSTEM=="block", KERNEL=="sr7" , SYMLINK+="cdrom7 cdrw7 dvd7 dvdrw7"
|
|
||||||
SUBSYSTEM=="block", KERNEL=="sr8" , SYMLINK+="cdrom8 cdrw8 dvd8 dvdrw8"
|
|
||||||
SUBSYSTEM=="block", KERNEL=="sr9" , SYMLINK+="cdrom9 cdrw9 dvd9 dvdrw9"
|
|
||||||
|
|
@ -8,21 +8,17 @@ pkgname=udev
|
|||||||
pkgver=181
|
pkgver=181
|
||||||
pkgrel=6
|
pkgrel=6
|
||||||
pkgdesc="The userspace dev tools (udev)"
|
pkgdesc="The userspace dev tools (udev)"
|
||||||
depends=('util-linux' 'libusb-compat' 'glib2' 'kmod' 'pciutils' 'usbutils' 'pciutils')
|
depends=('util-linux' 'libusb-compat' 'glib2' 'kmod' 'pciutils' 'usbutils' 'pciutils' 'acl')
|
||||||
install=udev.install
|
install=udev.install
|
||||||
arch=(i686 x86_64)
|
arch=(i686 x86_64)
|
||||||
license=('GPL')
|
license=('GPL')
|
||||||
makedepends=('gobject-introspection' 'gperf' 'libxslt' 'usbutils' 'kmod')
|
makedepends=('gobject-introspection' 'gperf' 'libxslt' 'usbutils' 'kmod')
|
||||||
source=("ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/$pkgname-$pkgver.tar.xz"
|
source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/$pkgname-$pkgver.tar.xz
|
||||||
'82-optical-symlinks.rules'
|
initcpio-hooks-udev
|
||||||
'initcpio-hooks-udev'
|
initcpio-install-udev)
|
||||||
'initcpio-install-udev'
|
|
||||||
'modprobe.nouveau.conf')
|
|
||||||
md5sums=('0d7af750702620a871b9f9b98d8ad859'
|
md5sums=('0d7af750702620a871b9f9b98d8ad859'
|
||||||
'4538d729fa292fbb8f9dca6265dc9c14'
|
|
||||||
'a4dd853050bf2e0ae6b2e3d2c75499c2'
|
'a4dd853050bf2e0ae6b2e3d2c75499c2'
|
||||||
'ee0bfe91a20fff12cc25ab1d1e024853'
|
'ee0bfe91a20fff12cc25ab1d1e024853')
|
||||||
'633dabda1fbfa4b6fe4dab5452b40fed')
|
|
||||||
url="http://git.kernel.org/?p=linux/hotplug/udev.git;a=summary"
|
url="http://git.kernel.org/?p=linux/hotplug/udev.git;a=summary"
|
||||||
backup=(etc/udev/udev.conf)
|
backup=(etc/udev/udev.conf)
|
||||||
groups=('base')
|
groups=('base')
|
||||||
@ -47,7 +43,11 @@ package() {
|
|||||||
make DESTDIR=${pkgdir} install
|
make DESTDIR=${pkgdir} install
|
||||||
|
|
||||||
# udevd moved, symlink to make life easy for restarting udevd manually
|
# udevd moved, symlink to make life easy for restarting udevd manually
|
||||||
ln -s /lib/udev/udevd ${pkgdir}/usr/bin/udevd
|
ln -s ../../lib/udev/udevd ${pkgdir}/usr/bin/udevd
|
||||||
|
|
||||||
|
# the path to udevadm is hardcoded in some places
|
||||||
|
install -d ${pkgdir}/sbin
|
||||||
|
ln -s ../usr/bin/udevadm ${pkgdir}/sbin/udevadm
|
||||||
|
|
||||||
# Replace dialout/tape/cdrom group in rules with uucp/storage/optical group
|
# Replace dialout/tape/cdrom group in rules with uucp/storage/optical group
|
||||||
for i in $pkgdir/lib/udev/rules.d/*.rules; do
|
for i in $pkgdir/lib/udev/rules.d/*.rules; do
|
||||||
@ -56,14 +56,8 @@ package() {
|
|||||||
s#GROUP="cdrom"#GROUP="optical"#g' $i
|
s#GROUP="cdrom"#GROUP="optical"#g' $i
|
||||||
done
|
done
|
||||||
|
|
||||||
for rule in "${srcdir}"/*.rules; do
|
|
||||||
install -m644 "${rule}" "${pkgdir}/lib/udev/rules.d"
|
|
||||||
done
|
|
||||||
|
|
||||||
# nouveau still conflicts with some other standard kernel modules, should go away soon
|
|
||||||
install -D -m644 ../modprobe.nouveau.conf ${pkgdir}/lib/modprobe.d/nouveau.conf
|
|
||||||
|
|
||||||
# install the mkinitpcio hook
|
# install the mkinitpcio hook
|
||||||
install -D -m644 ../initcpio-hooks-udev ${pkgdir}/lib/initcpio/hooks/udev
|
install -D -m644 ../initcpio-hooks-udev ${pkgdir}/lib/initcpio/hooks/udev
|
||||||
install -D -m644 ../initcpio-install-udev ${pkgdir}/lib/initcpio/install/udev
|
install -D -m644 ../initcpio-install-udev ${pkgdir}/lib/initcpio/install/udev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
# The following modules conflict with nouveau
|
|
||||||
# They will probably soon be disabled from the stock kernel
|
|
||||||
# config, and this file will go away.
|
|
||||||
# See <http://nouveau.freedesktop.org/wiki/KernelModeSetting>
|
|
||||||
#
|
|
||||||
blacklist nvidiafb
|
|
||||||
blacklist rivafb
|
|
@ -2,7 +2,7 @@
|
|||||||
# arg 2: the old package version
|
# arg 2: the old package version
|
||||||
|
|
||||||
post_upgrade() {
|
post_upgrade() {
|
||||||
if [ "$(vercmp $2 181)" -lt 0 ]; then
|
if [ "$(vercmp $2 181-3)" -lt 0 ]; then
|
||||||
echo "udev changes:"
|
echo "udev changes:"
|
||||||
if [ "$(vercmp $2 168)" -lt 0 ]; then
|
if [ "$(vercmp $2 168)" -lt 0 ]; then
|
||||||
echo " * Kernel 2.6.32 or newer is now required."
|
echo " * Kernel 2.6.32 or newer is now required."
|
||||||
@ -48,10 +48,12 @@ post_upgrade() {
|
|||||||
echo " * devtmpfs support is now a hard requirement. Users of the official Chakra"
|
echo " * devtmpfs support is now a hard requirement. Users of the official Chakra"
|
||||||
echo " kernels have this enabled."
|
echo " kernels have this enabled."
|
||||||
fi
|
fi
|
||||||
|
if [ "$(vercmp $2 181)" -lt 0 ]; then
|
||||||
|
echo " * udev-compat has been removed, and should be uninstalled."
|
||||||
|
echo " * Framebuffers are no longer blacklisted by default."
|
||||||
|
echo " * binaries moved from /sbin to /usr/bin"
|
||||||
|
fi
|
||||||
|
echo " * if your kernel does not provide /dev/loop-control, you need to manually"
|
||||||
|
echo " load the 'loop' module before using losetup"
|
||||||
fi
|
fi
|
||||||
echo " * udev-compat has been removed, and should be uninstalled."
|
|
||||||
echo " * Framebuffers are no longer blacklisted by default."
|
|
||||||
echo " * binaries moved from /sbin to /usr/bin"
|
|
||||||
echo " * if your kernel does not provide /dev/loop-control, you need to manually"
|
|
||||||
echo " load the 'loop' module before using losetup"
|
|
||||||
}
|
}
|
||||||
|
@ -2,26 +2,31 @@
|
|||||||
# Maintainer: Judd Vinet <jvinet@zeroflux.org>
|
# Maintainer: Judd Vinet <jvinet@zeroflux.org>
|
||||||
# Contributor: Curtis Campbell <curtisjamescampbell@hotmail.com>
|
# Contributor: Curtis Campbell <curtisjamescampbell@hotmail.com>
|
||||||
pkgname=usbutils
|
pkgname=usbutils
|
||||||
pkgver=0.87
|
pkgver=005
|
||||||
pkgrel=2
|
pkgrel=1
|
||||||
pkgdesc="USB Device Utilities"
|
pkgdesc="USB Device Utilities"
|
||||||
arch=(i686 x86_64)
|
arch=(i686 x86_64)
|
||||||
license=('GPL')
|
license=('GPL')
|
||||||
groups=('base')
|
groups=('base')
|
||||||
makedepends=('wget')
|
depends=('libusb')
|
||||||
depends=('glibc' 'libusb')
|
optdepends=('python2: for lsusb.py usage'
|
||||||
|
'coreutils: for lsusb.py usage'
|
||||||
|
'wget: for update-usbids.sh usage')
|
||||||
url="http://linux-usb.sourceforge.net/"
|
url="http://linux-usb.sourceforge.net/"
|
||||||
source=(http://www.kernel.org/pub/linux/utils/usb/$pkgname/$pkgname-$pkgver.tar.gz)
|
source=("http://chakra-linux.org/sources/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
|
||||||
md5sums=('c19a11092dd0f5a5c6a93b0599740fe5')
|
fix-python2.patch)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd $srcdir/$pkgname-$pkgver
|
cd $srcdir/$pkgname-$pkgver
|
||||||
rm usb.ids
|
# patch lsusb.py to use correct usb.ids file and python2 interpreter
|
||||||
wget http://www.linux-usb.org/usb.ids
|
patch -Np1 -i $srcdir/fix-python2.patch
|
||||||
./configure --prefix=/usr --datadir=/usr/share/hwdata --disable-zlib
|
./configure --prefix=/usr --datadir=/usr/share/hwdata --disable-zlib
|
||||||
make || return 1
|
make
|
||||||
make DESTDIR=$pkgdir install
|
|
||||||
# fix pkgconfig file
|
|
||||||
mkdir -p $pkgdir/usr/lib
|
|
||||||
mv $pkgdir/usr/share/hwdata/pkgconfig $pkgdir/usr/lib/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd $srcdir/$pkgname-$pkgver
|
||||||
|
make DESTDIR=$pkgdir install
|
||||||
|
}
|
||||||
|
md5sums=('6a21f7b6c02b76df5e8a7c208d746654'
|
||||||
|
'45766196895b4cc50b53cd56e1bbf3d1')
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
pkgname=util-linux
|
pkgname=util-linux
|
||||||
pkgver=2.21
|
pkgver=2.21
|
||||||
pkgrel=2
|
pkgrel=1
|
||||||
pkgdesc="Miscellaneous system utilities for Linux"
|
pkgdesc="Miscellaneous system utilities for Linux"
|
||||||
url="http://www.kernel.org/pub/linux/utils/util-linux/"
|
url="http://www.kernel.org/pub/linux/utils/util-linux/"
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
@ -17,12 +17,7 @@ provides=("util-linux-ng=${pkgver}")
|
|||||||
license=('GPL2')
|
license=('GPL2')
|
||||||
options=('!libtool')
|
options=('!libtool')
|
||||||
source=(ftp://ftp.kernel.org/pub/linux/utils/${pkgname}/v${pkgver}/${pkgname}-${pkgver}.tar.xz
|
source=(ftp://ftp.kernel.org/pub/linux/utils/${pkgname}/v${pkgver}/${pkgname}-${pkgver}.tar.xz
|
||||||
libmount-canonicalize-all-paths-from-fs-tab.patch
|
stable-fixes-2.21.patch)
|
||||||
lib-canonicalize-always-remove-tailing-slash.patch
|
|
||||||
libmount-canonicalize-targets-from-fstab-on-mount-a.patch
|
|
||||||
mount-new-cleanup-mount-a-return-codes.patch
|
|
||||||
libmount-use-mount.-type-s-for-NFS-only.patch
|
|
||||||
libmount-allow-empty-source-for-mount-2-syscall.patch)
|
|
||||||
optdepends=('perl: for chkdupexe support')
|
optdepends=('perl: for chkdupexe support')
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
@ -31,19 +26,13 @@ build() {
|
|||||||
# hardware clock
|
# hardware clock
|
||||||
sed -e 's%etc/adjtime%var/lib/hwclock/adjtime%' -i include/pathnames.h
|
sed -e 's%etc/adjtime%var/lib/hwclock/adjtime%' -i include/pathnames.h
|
||||||
|
|
||||||
patch -p1 -i ../libmount-canonicalize-all-paths-from-fs-tab.patch
|
patch -p1 -i ../stable-fixes-2.21.patch
|
||||||
patch -p1 -i ../lib-canonicalize-always-remove-tailing-slash.patch
|
|
||||||
patch -p1 -i ../libmount-canonicalize-targets-from-fstab-on-mount-a.patch
|
|
||||||
patch -p1 -i ../mount-new-cleanup-mount-a-return-codes.patch
|
|
||||||
patch -p1 -i ../libmount-use-mount.-type-s-for-NFS-only.patch
|
|
||||||
patch -p1 -i ../libmount-allow-empty-source-for-mount-2-syscall.patch
|
|
||||||
|
|
||||||
./configure --prefix=/usr \
|
./configure --prefix=/usr \
|
||||||
--libdir=/usr/lib \
|
--libdir=/usr/lib \
|
||||||
--enable-write \
|
--enable-write \
|
||||||
--enable-raw \
|
--enable-raw \
|
||||||
--disable-wall \
|
--disable-wall
|
||||||
--enable-new-mount
|
|
||||||
|
|
||||||
make
|
make
|
||||||
}
|
}
|
||||||
@ -61,9 +50,4 @@ package() {
|
|||||||
rm -r usr/share/man/ru
|
rm -r usr/share/man/ru
|
||||||
}
|
}
|
||||||
md5sums=('208aa058f4117759d2939d1be7d662fc'
|
md5sums=('208aa058f4117759d2939d1be7d662fc'
|
||||||
'c4011222a19b020d9b8465c3c7e443f6'
|
'415b850a4efa9174cd9c34022949f177')
|
||||||
'8c1bf7b10e22e2b835441e6ae2d804d6'
|
|
||||||
'7b92423c588ed35229a9a166349c29a9'
|
|
||||||
'c483ab2d52609b5857d096b256a5075c'
|
|
||||||
'e31037773db7f3244b71db434f60e6f0'
|
|
||||||
'2de5ae7916e79970e90bf06542e43d86')
|
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
From 28074a0952469aebf021821d95238cfb964d13ff Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Fri, 24 Feb 2012 21:26:11 +0100
|
|
||||||
Subject: [PATCH 09/12] lib/canonicalize: always remove tailing slash
|
|
||||||
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
lib/canonicalize.c | 13 ++++++++++---
|
|
||||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/canonicalize.c b/lib/canonicalize.c
|
|
||||||
index ab32c10..fd18af4 100644
|
|
||||||
--- a/lib/canonicalize.c
|
|
||||||
+++ b/lib/canonicalize.c
|
|
||||||
@@ -174,9 +174,16 @@ canonicalize_path(const char *path)
|
|
||||||
if (path == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
- if (!myrealpath(path, canonical, PATH_MAX+1))
|
|
||||||
- return strdup(path);
|
|
||||||
-
|
|
||||||
+ if (!myrealpath(path, canonical, PATH_MAX+1)) {
|
|
||||||
+ char *res = strdup(path);
|
|
||||||
+ if (res) {
|
|
||||||
+ p = strrchr(res, '/');
|
|
||||||
+ /* delete trailing slash */
|
|
||||||
+ if (p && p > res && *(p + 1) == '\0')
|
|
||||||
+ *p = '\0';
|
|
||||||
+ }
|
|
||||||
+ return res;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
p = strrchr(canonical, '/');
|
|
||||||
if (p && strncmp(p, "/dm-", 4) == 0 && isdigit(*(p + 4))) {
|
|
||||||
--
|
|
||||||
1.7.9.2
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
From 772cce373f693096c2ae6f156306acf9e20c09e8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Tue, 28 Feb 2012 00:02:30 +0100
|
|
||||||
Subject: [PATCH] libmount: allow empty source for mount(2) syscall
|
|
||||||
|
|
||||||
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=797438
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
libmount/src/context_mount.c | 4 +++-
|
|
||||||
sys-utils/mount.c | 6 +++++-
|
|
||||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
|
|
||||||
index a0c5951..098243b 100644
|
|
||||||
--- a/libmount/src/context_mount.c
|
|
||||||
+++ b/libmount/src/context_mount.c
|
|
||||||
@@ -451,8 +451,10 @@ static int do_mount(struct libmnt_context *cxt, const char *try_type)
|
|
||||||
src = mnt_fs_get_srcpath(cxt->fs);
|
|
||||||
target = mnt_fs_get_target(cxt->fs);
|
|
||||||
|
|
||||||
- if (!src || !target)
|
|
||||||
+ if (!target)
|
|
||||||
return -EINVAL;
|
|
||||||
+ if (!src)
|
|
||||||
+ src = "none";
|
|
||||||
|
|
||||||
type = try_type ? : mnt_fs_get_fstype(cxt->fs);
|
|
||||||
|
|
||||||
diff --git a/sys-utils/mount.c b/sys-utils/mount.c
|
|
||||||
index 3fbac04..23abc91 100644
|
|
||||||
--- a/sys-utils/mount.c
|
|
||||||
+++ b/sys-utils/mount.c
|
|
||||||
@@ -347,7 +347,11 @@ try_readonly:
|
|
||||||
return MOUNT_EX_USAGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (src == NULL || tgt == NULL) {
|
|
||||||
+ /*
|
|
||||||
+ * 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
|
|
||||||
--
|
|
||||||
1.7.9.2
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
From 59e32a1f240c5f6a1d64d5e71a4a357245c34eaf Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Fri, 24 Feb 2012 20:25:43 +0100
|
|
||||||
Subject: [PATCH 07/12] libmount: canonicalize all paths from (fs)tab
|
|
||||||
|
|
||||||
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=797216
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
libmount/src/tab.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/libmount/src/tab.c b/libmount/src/tab.c
|
|
||||||
index 37f47bd..f10c1de 100644
|
|
||||||
--- a/libmount/src/tab.c
|
|
||||||
+++ b/libmount/src/tab.c
|
|
||||||
@@ -456,7 +456,7 @@ struct libmnt_fs *mnt_table_find_target(struct libmnt_table *tb, const char *pat
|
|
||||||
while(mnt_table_next_fs(tb, &itr, &fs) == 0) {
|
|
||||||
char *p;
|
|
||||||
|
|
||||||
- if (!fs->target || !mnt_fs_is_swaparea(fs) ||
|
|
||||||
+ if (!fs->target || mnt_fs_is_swaparea(fs) ||
|
|
||||||
(*fs->target == '/' && *(fs->target + 1) == '\0'))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.9.2
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
|||||||
From 6eba938376c2c870d9258ef9d7b6a3690cfa78dd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Fri, 24 Feb 2012 22:52:45 +0100
|
|
||||||
Subject: [PATCH 11/12] libmount: canonicalize targets from fstab on mount -a
|
|
||||||
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
libmount/src/tab.c | 10 ++++++----
|
|
||||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libmount/src/tab.c b/libmount/src/tab.c
|
|
||||||
index 66a9e4d..21b05c7 100644
|
|
||||||
--- a/libmount/src/tab.c
|
|
||||||
+++ b/libmount/src/tab.c
|
|
||||||
@@ -830,8 +830,8 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs)
|
|
||||||
{
|
|
||||||
char *root = NULL;
|
|
||||||
struct libmnt_fs *src_fs;
|
|
||||||
- const char *src, *tgt;
|
|
||||||
- char *xsrc = NULL;
|
|
||||||
+ const char *src;
|
|
||||||
+ char *xsrc = NULL, *tgt;
|
|
||||||
int flags = 0, rc = 0;
|
|
||||||
|
|
||||||
assert(tb);
|
|
||||||
@@ -852,7 +852,7 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs)
|
|
||||||
src = xsrc = mnt_resolve_spec(mnt_fs_get_source(fstab_fs),
|
|
||||||
tb->cache);
|
|
||||||
|
|
||||||
- tgt = mnt_fs_get_target(fstab_fs);
|
|
||||||
+ tgt = mnt_resolve_path(mnt_fs_get_target(fstab_fs), tb->cache);
|
|
||||||
|
|
||||||
if (tgt && src && root) {
|
|
||||||
struct libmnt_iter itr;
|
|
||||||
@@ -870,7 +870,7 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs)
|
|
||||||
* network filesystem source paths.
|
|
||||||
*/
|
|
||||||
if (t && s && r &&
|
|
||||||
- strcmp(t, tgt) == 0 &&
|
|
||||||
+ streq_except_trailing_slash(t, tgt) &&
|
|
||||||
streq_except_trailing_slash(s, src) &&
|
|
||||||
strcmp(r, root) == 0)
|
|
||||||
break;
|
|
||||||
@@ -881,6 +881,8 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs)
|
|
||||||
|
|
||||||
if (xsrc && !tb->cache)
|
|
||||||
free(xsrc);
|
|
||||||
+ if (!tb->cache)
|
|
||||||
+ free(tgt);
|
|
||||||
|
|
||||||
free(root);
|
|
||||||
return rc;
|
|
||||||
--
|
|
||||||
1.7.9.2
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
From 9bf9690114b7432144caf815e149e35640bc3ad0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Mon, 27 Feb 2012 16:43:12 +0100
|
|
||||||
Subject: [PATCH] libmount: use mount.<type> -s for NFS only
|
|
||||||
|
|
||||||
Unfortunately, it seems that for example mount.cifs don't care about
|
|
||||||
the API, so we need exception like the original mount(8).
|
|
||||||
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
libmount/src/context_mount.c | 7 ++++++-
|
|
||||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
|
|
||||||
index 8cbc25b..a0c5951 100644
|
|
||||||
--- a/libmount/src/context_mount.c
|
|
||||||
+++ b/libmount/src/context_mount.c
|
|
||||||
@@ -369,7 +369,12 @@ static int exec_helper(struct libmnt_context *cxt)
|
|
||||||
args[i++] = mnt_fs_get_srcpath(cxt->fs);/* 2 */
|
|
||||||
args[i++] = mnt_fs_get_target(cxt->fs); /* 3 */
|
|
||||||
|
|
||||||
- if (mnt_context_is_sloppy(cxt))
|
|
||||||
+ /*
|
|
||||||
+ * TODO: remove the exception for "nfs", -s is documented
|
|
||||||
+ * for years should be usable everywhere.
|
|
||||||
+ */
|
|
||||||
+ if (mnt_context_is_sloppy(cxt) &&
|
|
||||||
+ type && startswith(type, "nfs"))
|
|
||||||
args[i++] = "-s"; /* 4 */
|
|
||||||
if (mnt_context_is_fake(cxt))
|
|
||||||
args[i++] = "-f"; /* 5 */
|
|
||||||
--
|
|
||||||
1.7.9.2
|
|
||||||
|
|
@ -1,101 +0,0 @@
|
|||||||
From 16b73aae8cb73df2974fd75c2a42ec3b92535851 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Fri, 24 Feb 2012 23:03:22 +0100
|
|
||||||
Subject: [PATCH 12/12] mount: (new) cleanup mount -a return codes
|
|
||||||
|
|
||||||
New return codes:
|
|
||||||
|
|
||||||
0 : all mounted (or all ignored)
|
|
||||||
64 : some mounted, some failed
|
|
||||||
32 : all failed
|
|
||||||
|
|
||||||
Note that already mounted or ignored (filtered out by -t or -O)
|
|
||||||
filesystems don't affect the final return code.
|
|
||||||
|
|
||||||
The original mount(8) returns 0 instead of 64, so the situation
|
|
||||||
"some mounted, some failed" cannot be detected.
|
|
||||||
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
sys-utils/mount.8 | 4 ++++
|
|
||||||
sys-utils/mount.c | 23 +++++++++++++++++------
|
|
||||||
2 files changed, 21 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/sys-utils/mount.8 b/sys-utils/mount.8
|
|
||||||
index f1cff74..d18881b 100644
|
|
||||||
--- a/sys-utils/mount.8
|
|
||||||
+++ b/sys-utils/mount.8
|
|
||||||
@@ -2759,6 +2759,10 @@ mount failure
|
|
||||||
.TP
|
|
||||||
.BR 64
|
|
||||||
some mount succeeded
|
|
||||||
+.RE
|
|
||||||
+
|
|
||||||
+The command mount -a returns 0 (all success), 32 (all failed) or 64 (some
|
|
||||||
+failed, some success).
|
|
||||||
|
|
||||||
.SH NOTES
|
|
||||||
The syntax of external mount helpers is:
|
|
||||||
diff --git a/sys-utils/mount.c b/sys-utils/mount.c
|
|
||||||
index 17991b0..3fbac04 100644
|
|
||||||
--- a/sys-utils/mount.c
|
|
||||||
+++ b/sys-utils/mount.c
|
|
||||||
@@ -182,6 +182,8 @@ static int mount_all(struct libmnt_context *cxt)
|
|
||||||
struct libmnt_fs *fs;
|
|
||||||
int mntrc, ignored, rc = MOUNT_EX_SUCCESS;
|
|
||||||
|
|
||||||
+ int nsucc = 0, nerrs = 0;
|
|
||||||
+
|
|
||||||
itr = mnt_new_iter(MNT_ITER_FORWARD);
|
|
||||||
if (!itr) {
|
|
||||||
warn(_("failed to initialize libmount iterator"));
|
|
||||||
@@ -197,31 +199,40 @@ static int mount_all(struct libmnt_context *cxt)
|
|
||||||
printf(ignored == 1 ? _("%-25s: ignored\n") :
|
|
||||||
_("%-25s: already mounted\n"),
|
|
||||||
tgt);
|
|
||||||
-
|
|
||||||
} else if (mnt_context_is_fork(cxt)) {
|
|
||||||
if (mnt_context_is_verbose(cxt))
|
|
||||||
printf("%-25s: mount successfully forked\n", tgt);
|
|
||||||
} else {
|
|
||||||
- rc |= mk_exit_code(cxt, mntrc);
|
|
||||||
+ mk_exit_code(cxt, mntrc); /* to print warnings */
|
|
||||||
|
|
||||||
if (mnt_context_get_status(cxt)) {
|
|
||||||
- rc |= MOUNT_EX_SOMEOK;
|
|
||||||
+ nsucc++;
|
|
||||||
|
|
||||||
if (mnt_context_is_verbose(cxt))
|
|
||||||
printf("%-25s: successfully mounted\n", tgt);
|
|
||||||
- }
|
|
||||||
+ } else
|
|
||||||
+ nerrs++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mnt_context_is_parent(cxt)) {
|
|
||||||
/* wait for mount --fork children */
|
|
||||||
- int nerrs = 0, nchildren = 0;
|
|
||||||
+ int nchildren = 0;
|
|
||||||
+
|
|
||||||
+ nerrs = 0, nsucc = 0;
|
|
||||||
|
|
||||||
rc = mnt_context_wait_for_children(cxt, &nchildren, &nerrs);
|
|
||||||
if (!rc && nchildren)
|
|
||||||
- rc = nchildren == nerrs ? MOUNT_EX_FAIL : MOUNT_EX_SOMEOK;
|
|
||||||
+ nsucc = nchildren - nerrs;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (nerrs == 0)
|
|
||||||
+ rc = MOUNT_EX_SUCCESS; /* all success */
|
|
||||||
+ else if (nsucc == 0)
|
|
||||||
+ rc = MOUNT_EX_FAIL; /* all failed */
|
|
||||||
+ else
|
|
||||||
+ rc = MOUNT_EX_SOMEOK; /* some success, some failed */
|
|
||||||
+
|
|
||||||
mnt_free_iter(itr);
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
1.7.9.2
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user