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/ masterdir/
xbps-src/etc/xbps-src.conf xbps-src/etc/xbps-src.conf
xbps-src/libexec/xbps-src-capchroot xbps-src/libexec/capchroot
xbps-src/libexec/xbps-src-chroot-capmount xbps-src/libexec/capmount
xbps-src/libexec/xbps-src-chroot-capumount xbps-src/libexec/capumount
xbps-src/libexec/xbps-src-chroot-helper xbps-src/libexec/chroot-helper
xbps-src/libexec/xbps-src-doinst-helper xbps-src/libexec/doinst-helper
xbps-src/libexec/getdeps-helper
xbps-src/shutils/chroot.sh xbps-src/shutils/chroot.sh
xbps-src/shutils/init_funcs.sh xbps-src/shutils/init_funcs.sh
xbps-src/shutils/pkgtarget_funcs.sh xbps-src/shutils/pkgtarget_funcs.sh

View File

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

View File

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

View File

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

View File

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

View File

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