Hello community,
here is the log from the commit of package util-linux for openSUSE:Factory
checked in at Fri Jul 3 17:12:54 CEST 2009.
--------
--- util-linux/util-linux.changes 2009-04-16 14:56:27.000000000 +0200
+++ util-linux/util-linux.changes 2009-07-01 14:48:51.000000000 +0200
@@ -1,0 +2,21 @@
+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)
+
+-------------------------------------------------------------------
@@ -1509,2 +1530,2 @@
- � 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
@@ -1512,3 +1533,3 @@
- � 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
@@ -2342 +2363 @@
-- Don�t install tsort, its now in textutils 2.0
+- Don?t install tsort, its now in textutils 2.0
calling whatdependson for head-i586
Old:
----
fix-hang-on-stale-nfs.diff
util-linux-2.12r-fdisk_cyl.patch
util-linux-2.13-rpmlintrc
util-linux-2.14.1-disk_utils_raw_should_use_ioctl_to_create_device.patch
util-linux-2.14.1-hwclock_adjust_and_hctosys.patch
util-linux-2.14.1-lscpu_add_hypervisor_detection.patch
util-linux-2.14.1-lscpu.patch
util-linux-2.14.1-lscpu_sysroot_option.patch
util-linux-2.14.1-mount_swap_pagesize.patch
util-linux-2.14.1-sys-utils_lscpu_exit.patch
util-linux-2.14.2-mount_allow_loop_suid_umount.patch
util-linux-2.14.2-schedutils_fix_email.patch
util-linux-2.14.2-schedutils_ionice_enosys.patch
util-linux-ng-2.14.2.tar.bz2
v2.14.1-ReleaseNotes
v2.14.2-ReleaseNotes
v2.14-ReleaseNotes
New:
----
HEAD.patch
util-linux-ng-2.16-rc1.tar.bz2
util-linux-rpmlintrc
uuidd.rc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ util-linux.spec ++++++
--- /var/tmp/diff_new_pack.Crj869/_old 2009-07-03 17:09:31.000000000 +0200
+++ /var/tmp/diff_new_pack.Crj869/_new 2009-07-03 17:09:31.000000000 +0200
@@ -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 @@
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 @@
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.
+
+%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).
-Authors:
---------
- Karel Zak
+%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,12 +225,13 @@
%ifarch %ix86 x86_64
BUILD_ENABLE="--enable-rdev"
%endif
-# Use autogen, when building from git tree
autoreconf -fi
-#./autogen.sh
-./configure --mandir=%{_mandir} \
+./configure \
+ --mandir=%{_mandir} \
--datadir=%{_datadir} \
- --with-fsprobe=volume_id \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --libdir=/%{_lib} \
--with-audit \
--with-selinux \
--enable-elvtune \
@@ -228,6 +240,7 @@
--enable-raw \
--enable-write \
--disable-use-tty-group \
+ --disable-static \
$BUILD_ENABLE \
CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
make
@@ -240,8 +253,11 @@
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 @@
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 @@
# 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%{_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 @@
%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 @@
/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 @@
/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 @@
/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 @@
%{_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 @@
%{_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 @@
%{_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,3 +670,37 @@
#%{_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*
+
++++++ HEAD.patch ++++++
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<N> where <N> 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),
++++++ util-linux-mount_losetup_crypto.patch ++++++
--- /var/tmp/diff_new_pack.Crj869/_old 2009-07-03 17:09:32.000000000 +0200
+++ /var/tmp/diff_new_pack.Crj869/_new 2009-07-03 17:09:32.000000000 +0200
@@ -22,54 +22,41 @@
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
-
- 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)
-
-@@ -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 @@
+ 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
+
+ # 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
+
+ # 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 @@
+#define MIN(a,b) ((a\n"
@@ -290,22 +277,22 @@
" -o | --offset <num> start at offset <num> into file\n"
" --sizelimit <num> loop limited to only <num> bytes of the file\n"
" -p | --pass-fd <num> read passphrase from file descriptor <num>\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 @@
{ "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 @@
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 @@
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 @@
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 @@
.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 @@
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 @@
.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 @@
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 @@
/* 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 @@
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 @@
{ "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 @@
*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 @@
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 @@
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 @@
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 @@
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 @@
+ 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 @@
+#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 @@
+ 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 @@
+/* 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);
++++++ util-linux-rpmlintrc ++++++
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)")
++++++ uuidd.rc ++++++
#!/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
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org