Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Feb 2016 15:21:31 +0100 (CET)
From:      =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
To:        Marius Schamschula <lists@schamschula.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: mysql57 upgrade issue
Message-ID:  <alpine.BSF.2.20.1602051519400.22050@mail.fig.ol.no>
In-Reply-To: <9EE3E5E5-F717-4536-9EEB-C0CD07A190A8@schamschula.com>
References:  <71862CB3-F0C9-4981-9730-2C1054C3E572@schamschula.com> <alpine.BSF.2.20.1602051055050.1065@mail.fig.ol.no> <9EE3E5E5-F717-4536-9EEB-C0CD07A190A8@schamschula.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 5 Feb 2016 07:42-0600, Marius Schamschula wrote:

> Trond,
> 
> Apparently there is something amiss here, I probably should open a ticket.
> 
> portupgrade -fprv databases/mysql57-server databases/mysql57-client

You can't run that as a single invocation. portupgrade would then 
determine that upgrading the client should precede the upgrading of 
the server, and you'll be back at square one.

> also failed with the same error, just leaving mysql57-client uninstalled.
> 
> I ended up running the following:
> 
> cd /usr/ports/databases/mysql57-server 
> 
> make deinstall
> make install
> 
> This left me with a working mysql-client/server-5.7.10_2
> 
> On Feb 5, 2016, at 3:57 AM, Trond Endrestøl <Trond.Endrestol@fagskolen.gjovik.no> wrote:
> 
> > On Thu, 4 Feb 2016 19:26-0600, Marius Schamschula wrote:
> > 
> >> While running portmaster I found this failure:
> >> 
> >> ===>   Registering installation for mysql57-client-5.7.10_2
> >> Installing mysql57-client-5.7.10_2...
> >> pkg-static: mysql57-client-5.7.10_2 conflicts with mysql57-server-5.7.10_1 (installs files into the same place).  Problematic file: /usr/local/include/mysql/binary_log_types.h
> >> *** Error code 70
> >> 
> >> Stop.
> >> 
> >> What to do? Manually, uninstall mysql57-server-5.7.10_1?
> > 
> > I'm using portupgrade, and I had to update databases/mysql57-server 
> > prior to databases/mysql57-client.
> > 
> > Something along these lines:
> > 
> > portupgrade -fprv databases/mysql57-server
> > portupgrade -fprv databases/mysql57-client

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+
From owner-freebsd-questions@freebsd.org  Fri Feb  5 18:20:23 2016
Return-Path: <owner-freebsd-questions@freebsd.org>
Delivered-To: freebsd-questions@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFEEEA9D817
 for <freebsd-questions@mailman.ysv.freebsd.org>;
 Fri,  5 Feb 2016 18:20:23 +0000 (UTC)
 (envelope-from sergeig.public@gmail.com)
Received: from mail-vk0-x22f.google.com (mail-vk0-x22f.google.com
 [IPv6:2607:f8b0:400c:c05::22f])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 7C9491C38
 for <freebsd-questions@freebsd.org>; Fri,  5 Feb 2016 18:20:23 +0000 (UTC)
 (envelope-from sergeig.public@gmail.com)
Received: by mail-vk0-x22f.google.com with SMTP id c3so15246361vkb.3
 for <freebsd-questions@freebsd.org>; Fri, 05 Feb 2016 10:20:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:date:message-id:subject:from:to:content-type;
 bh=6KTTo8diorUhtYW/pNSpkAaXLjZLRaS2wDZTLWIjFWc=;
 b=crhSPvImBkiri/Cm7NrORGWcHcZrV0TpYEtea0Czum1hNrZ9kly74DqQkUMngnq0PU
 /ieNU7SuRAewEgxSeXMclxsT9s1OZCCtS0NldU9qFV3q+zd26VQzT/xke8gcQgteiMCT
 eedRiTlVkfqIkz2hHgdaVm1Wucr4hG88z9FjBkZrxXgFZgMdrYZoX6ex1psg3MGG2N8V
 6KLd2EJcA5fovb4uHsnejpcdTdwviistpMen4ECh/PcvHru14GKIOMe7kxBdYMgo2mnd
 RjA3oDALJcf4TZM9BH02AvOBvpvGBhOL/2ROboLGk4+5RQW4vMC2h6tk7cZvebfZP5a2
 j5Sg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:date:message-id:subject:from:to
 :content-type;
 bh=6KTTo8diorUhtYW/pNSpkAaXLjZLRaS2wDZTLWIjFWc=;
 b=cb+eZoVxbUPaC38R2+CzBJaivj1wGeEdAhWXFGj1lEf9RN5UQ06DHrgZzor2z2gyz0
 zP5MjiK21TrYW4tHHTgP/JJppLbvEyW1LPMdfIZ4352B9VmQ3XY91mUK+hVPF7Tadlr0
 R8R4sJU1j6XwOvjfsPWv+wIC0m/YpB5piUoI8RQ+lzTPBcJxM5P/HfZb/vNOHfh6byVd
 tweYz3XJhyhag+IaF7eq/Szfo4glEaQq89wiQrl5+ISlL+DdiB3zmNZ0totlzZ+7M8LA
 tNIRc48hqNfc4IZHbiscqUvVEx0OBaJeN331qMwFCQsfwY5txAQU/gX7Ya4DkkofDai5
 +GWg==
X-Gm-Message-State: AG10YOSQQ+ZmEMpC/Zn7F+fKxZJ9EmbAtEHw3lUQCccEw4GYIcCZCrdBAAhBenmDB9xCBKwk0YHv9UvB3kjbOw==
MIME-Version: 1.0
X-Received: by 10.31.0.215 with SMTP id 206mr10662598vka.22.1454696422442;
 Fri, 05 Feb 2016 10:20:22 -0800 (PST)
Received: by 10.31.174.132 with HTTP; Fri, 5 Feb 2016 10:20:22 -0800 (PST)
Date: Fri, 5 Feb 2016 10:20:22 -0800
Message-ID: <CAFLLzCOpdqQEWhd-wEPBRg6KeYyVwUcgt4s+7M630wbFAaty4Q@mail.gmail.com>
Subject: A: ezjail to qjail migration
From: Sergei G <sergeig.public@gmail.com>
To: FreeBSD Questions <freebsd-questions@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-Content-Filtered-By: Mailman/MimeDel 2.1.20
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>;
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Feb 2016 18:20:23 -0000

FYI

If for watever (in)sane reason you need to migrate your ezjail installation
to qjail, here is what appears have worked for me.

* stop jails
* pkg remove ezjail
* comment out your jail related, IP management related /etc/rc.conf entries
* move content of /usr/jails/ to some other location.  I moved it to /mnt,
because of the file system remount.
* pkg install qjail    (not qjail2)
* qjail install

Actual jail migration

I created a Makefile (it is my personal preference due to ease of named
parameters, auto quit on error and ability to create new task quickly) in
/usr/jails

Here is a relevant Makefile content:

name=noname
lip=254
oldjails=oldjails
oldname=$(name)
n=n

default:
        cat Makefile

# create jail
create:
        qjail create -n bce0 -4 192.168.3.$(lip) $(name)

# make sync oldname=... name=... n=
old=/mnt/$(oldname)
sync:
        rsync -aAXSH$(n)v --log-file=sync-$(name).log
--exclude-from=sync-excl.txt $(old)/etc $(old)/root $(old)/tmp $(old)/usr
$(old)/var $(name)

# push update to jail
s-resolv:
        -rm $(name)/etc/resolv.conf
        cp flavors/hnet/etc/resolv.conf $(name)/etc/resolv.conf



And important rsync exclusions file:

 cat sync-excl.txt
/sbin
/libexec
/sys
/lib
/usr/libdata
/usr/libexec
/usr/src
/usr/include
/usr/bin
/usr/share
/usr/sbin
/usr/lib32
/usr/lib
/usr/ports
/bin
/etc/rc.conf
/etc/periodic.conf
/etc/resolv.conf


For example, if I have wiki-hnet jail in /mnt/wiki-hnet-old and I want to
create a new jail wiki-hnet on the same 192.168.3.11 IP I will do:

1. create qjails jail with:

   make create lip=11 name=wiki-hnet

2. now I need to merge content of wiki-hnet-old jail from
/mnt/wiki-hnet-old into new jail:
test run:      make sync oldname=wiki-hnet-old name=wiki-hnet
real run:      make sync oldname=wiki-hnet-old name=wiki-hnet n=

That uses rsync to copy files, but excludes list of shared jailed
directories.  Last 3 items in sync-excl.txt are files that I added, because
of my configuration differences and need to do manual merge.

I had to copy reolv.conf file enough times that there is a custom make
target for that:

make s-resolv name=wiki-hnet

which copies content from flavor directory.

The variables have defaults to prevent destruction in case you forget a
value.

It seems to work for me on fully updated FreeBSD 10.2 release.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1602051519400.22050>