xbps-src: rename libexec helpers, they were too long.

This commit is contained in:
Juan RP 2011-07-14 13:24:00 +02:00
parent 8e9b2bcf42
commit e78e0028ca
8 changed files with 22 additions and 23 deletions

11
.gitignore vendored
View File

@ -2,11 +2,12 @@ syntax: glob
masterdir/
xbps-src/etc/xbps-src.conf
xbps-src/libexec/xbps-src-capchroot
xbps-src/libexec/xbps-src-chroot-capmount
xbps-src/libexec/xbps-src-chroot-capumount
xbps-src/libexec/xbps-src-chroot-helper
xbps-src/libexec/xbps-src-doinst-helper
xbps-src/libexec/capchroot
xbps-src/libexec/capmount
xbps-src/libexec/capumount
xbps-src/libexec/chroot-helper
xbps-src/libexec/doinst-helper
xbps-src/libexec/getdeps-helper
xbps-src/shutils/chroot.sh
xbps-src/shutils/init_funcs.sh
xbps-src/shutils/pkgtarget_funcs.sh

View File

@ -1,9 +1,9 @@
include ../vars.mk
SH_BINS = xbps-src-chroot-helper xbps-src-doinst-helper xbps-src-getdeps-helper
MOUNT_BIN = xbps-src-chroot-capmount
UMOUNT_BIN = xbps-src-chroot-capumount
CHROOT_BIN = xbps-src-capchroot
SCRIPTS = chroot-helper doinst-helper getdeps-helper
MOUNT_BIN = capmount
UMOUNT_BIN = capumount
CHROOT_BIN = capchroot
BINS = $(CHROOT_BIN) $(MOUNT_BIN) $(UMOUNT_BIN)
WFLAGS = -Wall -Werror
LDFLAGS = -lcap
@ -14,7 +14,7 @@ endif
.PHONY: all
all: $(BINS)
for bin in $(SH_BINS); do \
for bin in $(SCRIPTS); do \
sed -e "s|@@XBPS_INSTALL_PREFIX@@|$(PREFIX)|g" \
-e "s|@@XBPS_INSTALL_ETCDIR@@|$(ETCDIR)|g" \
-e "s|@@XBPS_INSTALL_SHAREDIR@@|$(SHAREDIR)|g" \
@ -25,12 +25,12 @@ all: $(BINS)
.PHONY: clean
clean:
-rm -f $(BINS) $(SH_BINS)
-rm -f $(BINS) $(SCRIPTS)
.PHONY: install
install: all
install -d $(DESTDIR)$(LIBEXECDIR)
for bin in $(SH_BINS); do \
for bin in $(SCRIPTS); do \
install -m755 $$bin $(DESTDIR)$(LIBEXECDIR); \
done
ifdef BINS
@ -44,7 +44,7 @@ endif
.PHONY: uninstall
uninstall:
for bin in $(BINS) $(SH_BINS); do \
for bin in $(BINS) $(SCRIPTS); do \
rm -f $(DESTDIR)$(LIBEXECDIR)/$$bin; \
done

View File

@ -65,7 +65,7 @@ mount_chroot_fs()
continue
fi
[ ! -d ${blah} ] && echo "failed." && continue
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-capmount \
@@XBPS_INSTALL_LIBEXECDIR@@/capmount \
${dowrite} ${blah} ${XBPS_MASTERDIR}/${f} \
2>/dev/null
if [ $? -eq 0 ]; then
@ -95,7 +95,7 @@ umount_chroot_fs()
echo ${cnt} > ${XBPS_MASTERDIR}/.${fs}_mount_bind_done
else
echo -n "=> Unmounting ${fs} from chroot... "
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-capumount \
@@XBPS_INSTALL_LIBEXECDIR@@/capumount \
${XBPS_MASTERDIR} ${fs} 2>/dev/null
if [ $? -eq 0 ]; then
rm -f ${XBPS_MASTERDIR}/.${fs}_mount_bind_done

View File

@ -25,17 +25,15 @@
_mount()
{
MASTERDIR="${XBPS_MASTERDIR}" HOSTDIR="${XBPS_HOSTDIR}" \
${sudo_cmd} \
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper mount
MASTERDIR="${XBPS_MASTERDIR}" HOSTDIR="${XBPS_HOSTDIR}" ${sudo_cmd} \
@@XBPS_INSTALL_LIBEXECDIR@@/chroot-helper mount
return $?
}
_umount()
{
MASTERDIR="${XBPS_MASTERDIR}" HOSTDIR="${XBPS_HOSTDIR}" \
${sudo_cmd} \
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount
MASTERDIR="${XBPS_MASTERDIR}" HOSTDIR="${XBPS_HOSTDIR}" ${sudo_cmd} \
@@XBPS_INSTALL_LIBEXECDIR@@/chroot-helper umount
return $?
}

View File

@ -101,7 +101,7 @@ install_pkg()
wrksrc=${wrksrc} \
BOOTSTRAP_PKG_REBUILD=$BOOTSTRAP_PKG_REBUILD \
${fakeroot_cmd} ${fakeroot_cmd_args} \
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-doinst-helper \
@@XBPS_INSTALL_LIBEXECDIR@@/doinst-helper \
${curpkgn} || return $?
# Strip binaries/libraries.

View File

@ -287,7 +287,7 @@ check_reqhost_utils
# Fix up some vars when XBPS_USE_CAPABILITIES is set.
#
if [ -n "$XBPS_USE_CAPABILITIES" ]; then
chroot_cmd="@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-capchroot"
chroot_cmd="@@XBPS_INSTALL_LIBEXECDIR@@/capchroot"
unset sudo_cmd
fi