The following changes were made:

* Add usher to manage config files
  * nsswitch.conf and ld.so.conf are now managed with usher
This commit is contained in:
2017-06-16 13:55:56 -05:00
parent cdd4db20d5
commit 320820267e
2 changed files with 30 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ URL = https://www.gnu.org/software/libc/
BRIEF = The GNU C Library BRIEF = The GNU C Library
DESC = The GNU C Library is used as the C library in the GNU system and in \ DESC = The GNU C Library is used as the C library in the GNU system and in \
GNU/Linux systems, as well as many other systems that use Linux as the kernel. GNU/Linux systems, as well as many other systems that use Linux as the kernel.
SNAPVER = 5 SNAPVER = 6
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
@@ -70,8 +70,11 @@ $(ROOT): $(BUILDDIR)/elf/ldd
@cd $(BUILDDIR) && make install DESTDIR=$(ROOT) && \ @cd $(BUILDDIR) && make install DESTDIR=$(ROOT) && \
install -d -m 755 $(ROOT)/etc/ld.so.conf.d && \ install -d -m 755 $(ROOT)/etc/ld.so.conf.d && \
install -d -m 755 $(ROOT)/var/cache/nscd && \ install -d -m 755 $(ROOT)/var/cache/nscd && \
install -m 644 $(PWD)/SNAP/ld.so.conf $(ROOT)/etc/ld.so.conf && \ install -d -m 755 $(ROOT)/usr/share/glibc && \
install -m 644 $(PWD)/SNAP/nsswitch.conf $(ROOT)/etc/nsswitch.conf && \ install -m 644 $(PWD)/SNAP/ld.so.conf \
$(ROOT)/usr/share/glibc/ld.so.conf && \
install -m 644 $(PWD)/SNAP/nsswitch.conf \
$(ROOT)/usr/share/glibc/nsswitch.conf && \
rm -v $(ROOT)/usr/share/info/dir rm -v $(ROOT)/usr/share/info/dir
test: $(ROOT) test: $(ROOT)

24
SNAP/usher Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
set -e
case $1 in
preinst)
exit 0
;;
postinst)
if [ ! -f ${TARGET}/etc/ld.so.conf ]; then
cp ${TARGET}/usr/share/glibc/ld.so.conf /etc/ld.so.conf
fi
if [ ! -f ${TARGET}/etc/nsswitch.conf ]; then
cp ${TARGET}/usr/share/glibc/nsswitch.conf /etc/nsswitch.conf
fi
;;
prerm)
exit 0
;;
postrm)
exit 0
;;
esac