- move /etc/blkid.tab* to /etc/blkid/blkid.tab* so they inherit selinux

contexts from the directory
This commit is contained in:
Peter Jones 2006-03-08 20:17:01 +00:00
parent d82d9ef7a5
commit 2b9cfe1919
2 changed files with 132 additions and 4 deletions

View File

@ -0,0 +1,116 @@
--- e2fsprogs-1.38/doc/libblkid.txt.etcblkid 2006-03-08 15:02:33.000000000 -0500
+++ e2fsprogs-1.38/doc/libblkid.txt 2006-03-08 15:04:08.000000000 -0500
@@ -58,7 +58,7 @@
}
If a program needs to call multiple blkid functions, then passing in a
-cache value of NULL is not recommended, since the /etc/blkid.tab file
+cache value of NULL is not recommended, since the /etc/blkid/blkid.tab file
will be repeatedly parsed over and over again, with memory allocated
and deallocated. To initialize the blkid cache, blkid_get_cache()
function is used:
@@ -68,7 +68,7 @@
The second parameter of blkid_get_cache (if non-zero) is the alternate
filename of the blkid cache file (where the default is
-/etc/blkid.tab). Normally, programs should just pass in NULL.
+/etc/blkid/blkid.tab). Normally, programs should just pass in NULL.
If you have called blkid_get_cache(), you should call blkid_put_cache()
when you are done using the blkid library functions. This will save the
--- e2fsprogs-1.38/misc/blkid.8.in.etcblkid 2006-03-08 15:02:46.000000000 -0500
+++ e2fsprogs-1.38/misc/blkid.8.in 2006-03-08 15:04:17.000000000 -0500
@@ -55,7 +55,7 @@
Read from
.I cachefile
instead of reading from the default cache file
-.IR /etc/blkid.tab .
+.IR /etc/blkid/blkid.tab .
If you want to start with a clean cache (i.e. don't report devices previously
scanned but not necessarily available at this time), specify
.IR /dev/null.
@@ -139,7 +139,7 @@
Write the device cache to
.I writecachefile
instead of writing it to the default cache file
-.IR /etc/blkid.tab .
+.IR /etc/blkid/blkid.tab .
If you don't want to save the cache to the default file, specify
.IR /dev/null.
If not specified it will be the same file as that given by the
--- e2fsprogs-1.38/misc/blkid.c.etcblkid 2006-03-08 15:02:39.000000000 -0500
+++ e2fsprogs-1.38/misc/blkid.c 2006-03-08 15:04:19.000000000 -0500
@@ -39,7 +39,7 @@
fprintf(out,
"usage:\t%s [-c <file>] [-hl] [-o format] "
"[-s <tag>] [-t <token>]\n [-v] [-w <file>] [dev ...]\n"
- "\t-c\tcache file (default: /etc/blkid.tab, /dev/null = none)\n"
+ "\t-c\tcache file (default: /etc/blkid/blkid.tab, /dev/null = none)\n"
"\t-h\tprint this usage message and exit\n"
"\t-s\tshow specified tag(s) (default show all tags)\n"
"\t-t\tfind device with a specific token (NAME=value pair)\n"
--- e2fsprogs-1.38/lib/blkid/Makefile.in.etcblkid 2006-03-08 15:04:56.000000000 -0500
+++ e2fsprogs-1.38/lib/blkid/Makefile.in 2006-03-08 15:05:59.000000000 -0500
@@ -129,9 +129,10 @@
@cd $(top_builddir); CONFIG_FILES=lib/blkid/blkid.pc ./config.status
installdirs::
- @echo " MKINSTALLDIRS $(libdir) $(includedir)/blkid"
+ @echo " MKINSTALLDIRS $(libdir) $(includedir)/blkid /etc/blkid"
@$(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
- $(DESTDIR)$(includedir)/blkid $(DESTDIR)$(libdir)/pkgconfig
+ $(DESTDIR)$(includedir)/blkid $(DESTDIR)$(libdir)/pkgconfig \
+ $(DESTDIR)/etc/blkid
install:: all installdirs
@echo " INSTALL_DATA $(libdir)/libblkid.a"
@@ -157,6 +158,7 @@
$(RM) -f $(DESTDIR)$(libdir)/libblkid.a \
$(DESTDIR)$(libdir)/pkgconfig/blkid.pc
$(RM) -rf $(DESTDIR)$(includedir)/blkid
+ $(RM) -rf $(DESTDIR)/etc/blkid
for i in $(SMANPAGES); do \
$(RM) -f $(DESTDIR)$(man3dir)/$$i; \
done
--- e2fsprogs-1.38/lib/blkid/libblkid.3.in.etcblkid 2006-03-08 15:02:58.000000000 -0500
+++ e2fsprogs-1.38/lib/blkid/libblkid.3.in 2006-03-08 15:04:22.000000000 -0500
@@ -24,7 +24,7 @@
specific block device names into configuration files.
.P
Block device information is normally kept in a cache file
-.I /etc/blkid.tab
+.I /etc/blkid/blkid.tab
and is verified to still be valid before being returned to the user
(if the user has read permission on the raw block device, otherwise not).
The cache file also allows unprivileged users (normally anyone other
@@ -49,7 +49,7 @@
from Ted Ts'o. The library was subsequently heavily modified by Ted Ts'o.
.SH FILES
.TP
-.I /etc/blkid.tab
+.I /etc/blkid/blkid.tab
Caches data extracted from each recognized block device.
.SH AVAILABILITY
.B libblkid
--- e2fsprogs-1.38/lib/blkid/blkidP.h.etcblkid 2006-03-08 15:03:04.000000000 -0500
+++ e2fsprogs-1.38/lib/blkid/blkidP.h 2006-03-08 15:04:25.000000000 -0500
@@ -104,7 +104,7 @@
extern char *blkid_strdup(const char *s);
extern char *blkid_strndup(const char *s, const int length);
-#define BLKID_CACHE_FILE "/etc/blkid.tab"
+#define BLKID_CACHE_FILE "/etc/blkid/blkid.tab"
extern const char *blkid_devdirs[];
#define BLKID_ERR_IO 5
--- e2fsprogs-1.38/RELEASE-NOTES.etcblkid 2006-03-08 15:02:53.000000000 -0500
+++ e2fsprogs-1.38/RELEASE-NOTES 2006-03-08 15:04:30.000000000 -0500
@@ -718,7 +718,7 @@
Fixed a bug in the blkid library wihch could avoid an infinite loop
in blkid_find_dev_with_tag() if /proc is not mounted and there the
-/etc/blkid.tab file has not yet been created.
+/etc/blkid/blkid.tab file has not yet been created.
Fixed the badblocks program so that the destructive read/write test
honors the -c option, and to use O_DIRECT when possible to avoid

View File

@ -4,7 +4,7 @@
Summary: Utilities for managing the second extended (ext2) filesystem. Summary: Utilities for managing the second extended (ext2) filesystem.
Name: e2fsprogs Name: e2fsprogs
Version: 1.38 Version: 1.38
Release: 11 Release: 12
License: GPL License: GPL
Group: System Environment/Base Group: System Environment/Base
Source: ftp://download.sourceforge.net/pub/sourceforge/e2fsprogs/e2fsprogs-%{version}.tar.gz Source: ftp://download.sourceforge.net/pub/sourceforge/e2fsprogs/e2fsprogs-%{version}.tar.gz
@ -28,6 +28,7 @@ Patch32: e2fsprogs-1.38-no_pottcdate.patch
Patch33: e2fsprogs-1.38-lost+found.patch Patch33: e2fsprogs-1.38-lost+found.patch
Patch34: e2fsprogs-1.38-blkid-devmapper.patch Patch34: e2fsprogs-1.38-blkid-devmapper.patch
Patch35: e2fsprogs-1.38-blkid-epoch.patch Patch35: e2fsprogs-1.38-blkid-epoch.patch
Patch36: e2fsprogs-1.38-etcblkid.patch
Url: http://e2fsprogs.sourceforge.net/ Url: http://e2fsprogs.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-root BuildRoot: %{_tmppath}/%{name}-root
Requires: e2fsprogs-libs = %{version}-%{release}, device-mapper Requires: e2fsprogs-libs = %{version}-%{release}, device-mapper
@ -124,6 +125,9 @@ popd
# disable blkid.tab caching if time is set before epoch # disable blkid.tab caching if time is set before epoch
%patch35 -p1 -b .epoch %patch35 -p1 -b .epoch
# put blkid.tab in /etc/blkid/
%patch36 -p1 -b .etcblkid
%build %build
aclocal aclocal
autoconf autoconf
@ -171,6 +175,10 @@ popd
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%post
[ -e /etc/blkid.tab ] && mv /etc/blkid.tab /etc/blkid/blkid.tab || :
[ -e /etc/blkid.tab.old ] && mv /etc/blkid.tab.old /etc/blkid/blkid.tab.old || :
%post libs -p /sbin/ldconfig %post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig
@ -196,6 +204,7 @@ exit 0
%doc %{ext2resize_name}/README.ext2resize %doc %{ext2resize_name}/README.ext2resize
%doc %{ext2resize_name}/doc/HOWTO.ext2resize %doc %{ext2resize_name}/doc/HOWTO.ext2resize
%dir /etc/blkid
%{_root_sbindir}/badblocks %{_root_sbindir}/badblocks
%{_root_sbindir}/blkid %{_root_sbindir}/blkid
%{_root_sbindir}/debugfs %{_root_sbindir}/debugfs
@ -301,10 +310,13 @@ exit 0
%{_mandir}/man3/uuid_unparse.3* %{_mandir}/man3/uuid_unparse.3*
%changelog %changelog
* Tue Mar 07 2006 David Cantrell <dcantrell@redhat.com> - 1.38-11 * Wed Mar 8 2006 Peter Jones <pjones@redhat.com> - 1.38-12
- Move /etc/blkid.tab to /etc/blkid/blkid.tab
* Tue Mar 7 2006 David Cantrell <dcantrell@redhat.com> - 1.38-11
- BuildRequires pkgconfig - BuildRequires pkgconfig
* Tue Mar 07 2006 David Cantrell <dcantrell@redhat.com> - 1.38-10 * Tue Mar 7 2006 David Cantrell <dcantrell@redhat.com> - 1.38-10
- Disable /etc/blkid.tab caching if time is set before epoch (#182188) - Disable /etc/blkid.tab caching if time is set before epoch (#182188)
* Fri Feb 24 2006 Peter Jones <pjones@redhat.com> - 1.38-9 * Fri Feb 24 2006 Peter Jones <pjones@redhat.com> - 1.38-9
@ -319,7 +331,7 @@ exit 0
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.38-6.2 * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.38-6.2
- bump again for double-long bug on ppc(64) - bump again for double-long bug on ppc(64)
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.38-6.1 * Tue Feb 7 2006 Jesse Keating <jkeating@redhat.com> - 1.38-6.1
- rebuilt for new gcc4.1 snapshot and glibc changes - rebuilt for new gcc4.1 snapshot and glibc changes
* Wed Jan 11 2006 Karel Zak <kzak@redhat.com> 1.38-6 * Wed Jan 11 2006 Karel Zak <kzak@redhat.com> 1.38-6