diff --git a/.gitignore b/.gitignore index 9c8088a4183..283e19f0048 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/xbps-src/libexec/Makefile b/xbps-src/libexec/Makefile index dee44e4da1f..50ff84ada94 100644 --- a/xbps-src/libexec/Makefile +++ b/xbps-src/libexec/Makefile @@ -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 diff --git a/xbps-src/libexec/xbps-src-chroot-helper.sh.in b/xbps-src/libexec/chroot-helper.sh.in similarity index 96% rename from xbps-src/libexec/xbps-src-chroot-helper.sh.in rename to xbps-src/libexec/chroot-helper.sh.in index 304a8454fd9..510dc10bf53 100644 --- a/xbps-src/libexec/xbps-src-chroot-helper.sh.in +++ b/xbps-src/libexec/chroot-helper.sh.in @@ -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 diff --git a/xbps-src/libexec/xbps-src-doinst-helper.sh.in b/xbps-src/libexec/doinst-helper.sh.in similarity index 100% rename from xbps-src/libexec/xbps-src-doinst-helper.sh.in rename to xbps-src/libexec/doinst-helper.sh.in diff --git a/xbps-src/libexec/xbps-src-getdeps-helper.sh.in b/xbps-src/libexec/getdeps-helper.sh.in similarity index 100% rename from xbps-src/libexec/xbps-src-getdeps-helper.sh.in rename to xbps-src/libexec/getdeps-helper.sh.in diff --git a/xbps-src/shutils/chroot.sh.in b/xbps-src/shutils/chroot.sh.in index 92c90c7bfd1..df98074f912 100644 --- a/xbps-src/shutils/chroot.sh.in +++ b/xbps-src/shutils/chroot.sh.in @@ -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 $? } diff --git a/xbps-src/shutils/pkgtarget_funcs.sh.in b/xbps-src/shutils/pkgtarget_funcs.sh.in index 4050acb970c..433b33aa2b6 100644 --- a/xbps-src/shutils/pkgtarget_funcs.sh.in +++ b/xbps-src/shutils/pkgtarget_funcs.sh.in @@ -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. diff --git a/xbps-src/xbps-src.sh.in b/xbps-src/xbps-src.sh.in index b4658e1bfb5..28493e4af30 100644 --- a/xbps-src/xbps-src.sh.in +++ b/xbps-src/xbps-src.sh.in @@ -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