You are not logged in.

#1 2015-04-24 09:17:48

Costinio
Member
Registered: 2007-07-12
Posts: 12

/usr/sbin exists in filesystem

Hey Archers,

I tried to build this package from AUR [ https://aur.archlinux.org/packages/jailkit/ ] and I get the error:

error: failed to commit transaction (conflicting files)
jailkit: /usr/sbin exists in filesystem

Any suggestions?

Offline

#2 2015-04-24 09:37:18

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: /usr/sbin exists in filesystem

Costinio wrote:

Any suggestions?

You seem to have given one yourself on the AUR page (unless it's another Costinio):

Also I think the executables inside /usr/sbin have to be moved to /usr/bin because during installation I get this one:

If you want suggestions for that, the first thing to try would be passing --sbindir=/usr/bin to configure.

Last edited by Raynman (2015-04-24 09:37:25)

Offline

#3 2015-04-24 10:51:14

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: /usr/sbin exists in filesystem

Pacman has to install all binaries in /usr/bin, as this is only non symlink dir (not counting /usr/local). Pacman does not follow symlinks and /bin /sbin /usr/sbin are all symlinks to /usr/bin owned by package filesystem. So if you tell pacman to install to /bin it would see a file owned by filesystem, not a symlink to proper director. As a result you have to install to /usr/bin.

Offline

#4 2015-04-24 17:00:33

Costinio
Member
Registered: 2007-07-12
Posts: 12

Re: /usr/sbin exists in filesystem

Hey guys,

Thanks for your answers smile

Raynman, yes the post in AUR is also mine and yes I had solved the first issue already. Thanks for the suggestion on the /usr/sbin issue, I'm trying your solution asap.

Offline

#5 2015-04-24 19:44:21

Costinio
Member
Registered: 2007-07-12
Posts: 12

Re: /usr/sbin exists in filesystem

Didn't work, unfortunately sad

configure: error: python not found please install python

python2 is in place (/usr/bin/python2) and can be found by the configure script when I omit the --sbindir parameter.

Offline

#6 2015-04-24 20:05:46

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,614

Re: /usr/sbin exists in filesystem

Did you forget to put a backslash after it so the next line gets included?

Offline

#7 2015-04-24 21:35:11

Costinio
Member
Registered: 2007-07-12
Posts: 12

Re: /usr/sbin exists in filesystem

Brilliant! I had ommited that and it messed up.
But there's more, unfortunately. It seems the /usr/sbin directory is hardcoded somewhere and I can't find where.

For example this piece of code inside the Makefile:

install:
        ${INSTALL} -d -m 755 ${DESTDIR}${iniprefix}
        for file in ${INIFILES} ; do \
                if [ -f ${DESTDIR}${iniprefix}$${file} ]; then \
                        ${INSTALL} -m 0644 ini/$${file} ${DESTDIR}${iniprefix}$${file}.dist ;\
                else \
                        ${INSTALL} -m 0644 ini/$${file} ${DESTDIR}${iniprefix} ;\
                fi ;\
        done
        @cd src/ && $(MAKE) install
        @cd py/ && $(MAKE) install
        @cd man/ && $(MAKE) install
        # test if the jk_chrootsh is already in /etc/shells
        # this previously had @echo but that fails on FreeBSD
        if test -w /etc/shells; then \
                if ! grep ${prefix}/sbin/jk_chrootsh /etc/shells ; then \
                        echo "appending ${prefix}/sbin/jk_chroots to /etc/shells";\
                        echo ${prefix}/sbin/jk_chrootsh >> /etc/shells ;\
                fi \
        fi

produces this output when compiling:

/usr/bin/install -c -d -m 755 /home/costinio/aur/jailkit/pkg/jailkit//etc/jailkit/
for file in jk_check.ini jk_init.ini jk_lsh.ini jk_socketd.ini jk_chrootsh.ini jk_update.ini jk_uchroot.ini ; do \
    if [ -f /home/costinio/aur/jailkit/pkg/jailkit//etc/jailkit/${file} ]; then \
        /usr/bin/install -c -m 0644 ini/${file} /home/costinio/aur/jailkit/pkg/jailkit//etc/jailkit/${file}.dist ;\
    else \
        /usr/bin/install -c -m 0644 ini/${file} /home/costinio/aur/jailkit/pkg/jailkit//etc/jailkit/ ;\
    fi ;\
done
make[1]: Entering directory '/home/costinio/aur/jailkit/src/jailkit-2.17/src'
/usr/bin/install -c -d -m 755 /home/costinio/aur/jailkit/pkg/jailkit//usr
/usr/bin/install -c -d -m 755 /home/costinio/aur/jailkit/pkg/jailkit//usr/bin
/usr/bin/install -c -d -m 755 /home/costinio/aur/jailkit/pkg/jailkit//usr/sbin
/usr/bin/install -c -m 0755 jk_socketd /home/costinio/aur/jailkit/pkg/jailkit//usr/sbin/
/usr/bin/install -c -m 0755 jk_chrootlaunch /home/costinio/aur/jailkit/pkg/jailkit//usr/sbin/
/usr/bin/install -c -m 0755 jk_lsh /home/costinio/aur/jailkit/pkg/jailkit//usr/sbin/
/usr/bin/install -c -m 4755 jk_chrootsh /home/costinio/aur/jailkit/pkg/jailkit//usr/sbin/
/usr/bin/install -c -m 4755 jk_uchroot /home/costinio/aur/jailkit/pkg/jailkit//usr/bin/
if [ -z "#" ]; then \
    /usr/bin/install -c -m 4755 jk_procmailwrapper /home/costinio/aur/jailkit/pkg/jailkit//usr/sbin/ ;\
fi
make[1]: Leaving directory '/home/costinio/aur/jailkit/src/jailkit-2.17/src'
make[1]: Entering directory '/home/costinio/aur/jailkit/src/jailkit-2.17/py'
/usr/bin/install -c -d -m 755 /home/costinio/aur/jailkit/pkg/jailkit//usr/bin
for file in jk_cp jk_init jk_check jk_addjailuser jk_jailuser jk_list jk_update; do \
    /usr/bin/install -c -m 0755 ${file} /home/costinio/aur/jailkit/pkg/jailkit//usr/bin/ ; \
done
/usr/bin/install -c -d -m 755 /home/costinio/aur/jailkit/pkg/jailkit//usr/share/jailkit
/usr/bin/install -c -m 0644 jk_lib.py /home/costinio/aur/jailkit/pkg/jailkit//usr/share/jailkit/
/usr/bin/install -c -m 0644 jk_lib.pyc /home/costinio/aur/jailkit/pkg/jailkit//usr/share/jailkit/
make[1]: Leaving directory '/home/costinio/aur/jailkit/src/jailkit-2.17/py'
make[1]: Entering directory '/home/costinio/aur/jailkit/src/jailkit-2.17/man'
/usr/bin/install -c -d -m 755 /home/costinio/aur/jailkit/pkg/jailkit//usr/share/man/man8/
for file in jailkit.8.gz jk_chrootsh.8.gz jk_uchroot.8.gz jk_lsh.8.gz jk_socketd.8.gz jk_init.8.gz jk_check.8.gz jk_cp.8.gz jk_chrootlaunch.8.gz jk_addjailuser.8.gz jk_jailuser.8.gz jk_list.8.gz jk_update.8.gz ; do \
    /usr/bin/install -c -m 0644 ${file} /home/costinio/aur/jailkit/pkg/jailkit//usr/share/man/man8/ ;\
done
make[1]: Leaving directory '/home/costinio/aur/jailkit/src/jailkit-2.17/man'
# test if the jk_chrootsh is already in /etc/shells
# this previously had @echo but that fails on FreeBSD
if test -w /etc/shells; then \
    if ! grep /usr/sbin/jk_chrootsh /etc/shells ; then \
        echo "appending /usr/sbin/jk_chroots to /etc/shells";\
        echo /usr/sbin/jk_chrootsh >> /etc/shells ;\
    fi \
fi

More specifically, these lines from the output:

make[1]: Entering directory '/home/costinio/aur/jailkit/src/jailkit-2.17/src'
/usr/bin/install -c -d -m 755 /home/costinio/aur/jailkit/pkg/jailkit//usr
/usr/bin/install -c -d -m 755 /home/costinio/aur/jailkit/pkg/jailkit//usr/bin
/usr/bin/install -c -d -m 755 /home/costinio/aur/jailkit/pkg/jailkit//usr/sbin
/usr/bin/install -c -m 0755 jk_socketd /home/costinio/aur/jailkit/pkg/jailkit//usr/sbin/
/usr/bin/install -c -m 0755 jk_chrootlaunch /home/costinio/aur/jailkit/pkg/jailkit//usr/sbin/
/usr/bin/install -c -m 0755 jk_lsh /home/costinio/aur/jailkit/pkg/jailkit//usr/sbin/
/usr/bin/install -c -m 4755 jk_chrootsh /home/costinio/aur/jailkit/pkg/jailkit//usr/sbin/
/usr/bin/install -c -m 4755 jk_uchroot /home/costinio/aur/jailkit/pkg/jailkit//usr/bin/

are produced by this one in the makefile:

@cd src/ && $(MAKE) install

and I can't seem to figure out where the sbin directory comes from hmm

Offline

#8 2015-04-28 20:18:42

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,979

Re: /usr/sbin exists in filesystem

Looks like upstream never anticipated someone would use the --sbindir option, atleast one of the makefiles in the subdirs  overrides the --sbindir variable .

Check src/jailkit-2.17/py/Makefile , there may be more that override sbindir.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB