Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors installing on FreeBSD 10 #33

Closed
tehfink opened this issue Nov 9, 2014 · 6 comments
Closed

Errors installing on FreeBSD 10 #33

tehfink opened this issue Nov 9, 2014 · 6 comments
Assignees

Comments

@tehfink
Copy link

tehfink commented Nov 9, 2014

Hi,
I followed the directions here:
http://www.bsdstore.ru/en/installing_cbsd.html
but was unable to install on a fresh FreeBSD 10 installation in Virtualbox, with an updated ports tree:

root@tookie:/usr/ports/sysutils/cbsd # uname -a
FreeBSD tookie 10.0-RELEASE-p12 FreeBSD 10.0-RELEASE-p12 #0: Tue Nov  4 05:07:17 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
root@tookie:~ # pkg install cbsd
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
pkg: No packages available to install matching 'cbsd' have been found in the repositories
root@tookie:/usr/ports/sysutils/cbsd # cd /usr/ports/sysutils/cbsd
root@tookie:/usr/ports/sysutils/cbsd # make clean
===>  Cleaning for cbsd-10.1.1_1
root@tookie:/usr/ports/sysutils/cbsd # make -C /usr/ports/sysutils/cbsd install
===>  License BSD2CLAUSE accepted by the user
===>   cbsd-10.1.1_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by cbsd-10.1.1_1 for building
===>  Extracting for cbsd-10.1.1_1
=> SHA256 Checksum OK for cbsd-10.1.1.tar.gz.
===>  Patching for cbsd-10.1.1_1
===>  Applying FreeBSD patches for cbsd-10.1.1_1
Ignoring previously applied (or reversed) patch.
1 out of 1 hunks ignored--saving rejects to ./Makefile.rej
=> Patch patch-Makefile failed to apply cleanly.
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/cbsd
@tehfink tehfink changed the title Errors installing from ports on FreeBSD 10 Errors installing on FreeBSD 10 Nov 9, 2014
@olevole olevole self-assigned this Nov 9, 2014
@olevole
Copy link
Member

olevole commented Nov 9, 2014

I do not really understand what is patch caused this message:

"Ignoring previously applied (or reversed) patch.
1 out of 1 hunks ignored--saving rejects to ./Makefile.rej
=> Patch patch-Makefile failed to apply cleanly.
"

Can you send the result for:

% ls -la /usr/ports/sysutils/cbsd/files

This directory should not contain any patches now.

Also, with the latest update of SQLite3, the CBSD port is broken for build (but your case is different) and I recently sent update that has not yet commited in port tree: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194879

@olevole
Copy link
Member

olevole commented Nov 9, 2014

I've upload ( https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194879 ) version of port to: http://www.olevole.ru/cbsd.tgz

You can try this as temporary solution. e.g:

cd /tmp
fetch http://www.olevole.ru/cbsd.tgz
tar xfz cbsd.tgz
cd cbsd
make clean
make && make install

@tehfink
Copy link
Author

tehfink commented Nov 10, 2014

Hi! Thanks for looking into this. As you requested:

root@tookie:~ # ls -la /usr/ports/sysutils/cbsd/files
total 35
drwxr-xr-x  2 root  wheel     6 Nov  7 20:36 .
drwxr-xr-x  4 root  wheel     9 Nov  9 18:26 ..
-rw-r--r--  1 root  wheel  1569 Nov  7 20:36 cbsdd.in
-rw-r--r--  1 root  wheel   492 Nov  7 20:36 cbsdrsyncd.in
-rw-r--r--  1 root  wheel   446 Jan 16  2014 patch-Makefile
-rw-r--r--  1 root  wheel   436 Nov  7 20:36 pkg-message.in
root@tookie:/usr/ports/sysutils/cbsd # cd /usr/ports/sysutils/cbsd/files
root@tookie:/usr/ports/sysutils/cbsd/files # tail +1 *
==> cbsdd.in <==
#!/bin/sh
#
# PROVIDE: cbsdd
# REQUIRE: LOGIN FILESYSTEMS sshd
# KEYWORD: shutdown
#
# cbsdd_enable="YES"
#

. /etc/rc.subr

name=cbsdd
rcvar=cbsdd_enable
load_rc_config $name

: ${cbsdd_enable="NO"}

export workdir="${cbsd_workdir}"
export NO_CBSD_HISTORY=yes
globalconf=${cbsd_globalconf:-"${workdir}/cbsd.conf"}

if [ ! -f ${globalconf} ]; then
    echo "cbsd: no such ${globalconf}";
    exit 1
fi

if [ ! -f ${inventory} ]; then
    echo "cbsd: no such ${inventory}";
    exit 1
fi

if [ ! -f ${mdtools} ]; then
    echo "cbsd: no such ${mdtools}";
    exit 1
fi

if [ ! -f ${subr} ]; then
    echo "cbsd: no such ${subr}";
    exit 1
fi

if [ ! -f ${localcbsdconf} ]; then
    echo "cbsd: no such ${localcbsdconf}";
    exit 1
fi

. ${globalconf}
. ${inventory}
. ${mdtools}
. ${subr}

. ${localcbsdconf}

start_precmd=${name}_prestart
stop_precmd=${name}_prestop
stop_cmd=${name}_stop
reload_cmd=${name}_reload
extra_commands="reload"

command="${toolsdir}/cbsdd"
pidfile="/var/run/$name.pid"
command_args="&"

cbsdd_prestart() {
    %%PREFIX%%/bin/cbsd task mode=flushall > /dev/null 2>&1
    %%PREFIX%%/bin/cbsd sysinv mode=update
    %%PREFIX%%/bin/cbsd netinv

    . ${inventory}

    [ -n "$nat_enable" ] && %%PREFIX%%/bin/cbsd naton
    /usr/sbin/daemon -f ${rcddir}/jails-astart start
}

cbsdd_prestop()
{
    ${rcddir}/jails-astart stop
    [ -n "${nat_enable}" ] && %%PREFIX%%/bin/cbsd natoff
}

cbsdd_stop()
{
    [ -f "${pidfile}" ] && kill -9 $( cat ${pidfile} )
}

cbsdd_reload()
{
    [ -f "${pidfile}" ] && kill -9 $( cat ${pidfile} ) > /dev/null 2>&1
    run_rc_command "start"
    exit 0
}

run_rc_command "$1"

==> cbsdrsyncd.in <==
#!/bin/sh
# PROVIDE: cbsdrsyncd
# REQUIRE: LOGIN
# KEYWORD: shutdown

# cbsdrsyncd_enable="YES"
# cbsdrsyncd_flags="<set as needed>"
#
# See rsync(1) for cbsdrsyncd_flags
#

. /etc/rc.subr
. /etc/rc.conf

name="cbsdrsyncd"
rcvar=cbsdrsyncd_enable

command="%%PREFIX%%/bin/rsync"
command_args="--daemon"
pidfile="/var/run/$name.pid"
required_files="${cbsd_workdir}/etc/rsyncd.conf"

# read configuration and set defaults
load_rc_config "$name"
: ${cbsdrsyncd_enable="NO"}

run_rc_command "$1"

==> patch-Makefile <==
--- ./Makefile.orig 2013-12-14 16:53:31.000000000 -0200
+++ ./Makefile  2013-12-14 16:53:49.000000000 -0200
@@ -3,7 +3,7 @@
 all:

 install:
-   mkdir -p ${PREFIX}/cbsd
-   cp -Rpv * ${PREFIX}/cbsd/
-   cp -Rpv .ssh ${PREFIX}/cbsd/
-   install man/cbsd.8  ${PREFIX}/man/man8/cbsd.8
+   mkdir -p ${DESTDIR}${PREFIX}/cbsd
+   cp -Rpv * ${DESTDIR}${PREFIX}/cbsd/
+   cp -Rpv .ssh ${DESTDIR}${PREFIX}/cbsd/
+   install man/cbsd.8 ${DESTDIR}${PREFIX}/man/man8/cbsd.8

==> pkg-message.in <==
===============================================================================

cbsd is now installed, but requires additional setup steps:

Upon initial installation, run:

  env workdir="/path" %%PREFIX%%/cbsd/sudoexec/initenv

Where /path is the path to the cbsd workdir, e.g.: /usr/jails

For upgrading an existing installation, run:

  cbsd initenv

===============================================================================

Why do you think installing with a package does not work?

@olevole
Copy link
Member

olevole commented Nov 10, 2014

Why do you think installing with a package does not work?

I think this is due to a error that I corrected via the last PR. FreeBSD cluster not able to build ports so it was not droped to FTP, and I received a notice from pkg-fallout ;)

Anyway, I see that my recent fix already commited in the ports tree, and in the next time FreeBSD cluster must to build CBSD and package will be back.

As for the "ls " command from your system: its strange, because this file: patch-Makefile should not have been in cbsd-10.1.1_1

I recommend you update the ports tree, cbsd-10.1.1_2 should be build properly.

@tehfink
Copy link
Author

tehfink commented Nov 14, 2014

Hey, thanks for your help. It was weird that the patch was present, because I had just installed FreeBSD and downloaded ports with svnup. Changing this setting in svnup's configuration file seemed to clear things up, and now cbsd builds cleanly:

trim_tree=1

@olevole
Copy link
Member

olevole commented Nov 14, 2014

perfect!

@olevole olevole closed this as completed Nov 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants