From owner-freebsd-pkgbase@freebsd.org Thu Jun 7 15:49:39 2018 Return-Path: Delivered-To: freebsd-pkgbase@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 476A5FE1F63 for ; Thu, 7 Jun 2018 15:49:39 +0000 (UTC) (envelope-from egypcio@gmail.com) Received: from mail-pl0-x243.google.com (mail-pl0-x243.google.com [IPv6:2607:f8b0:400e:c01::243]) (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 BEAF2708D8; Thu, 7 Jun 2018 15:49:38 +0000 (UTC) (envelope-from egypcio@gmail.com) Received: by mail-pl0-x243.google.com with SMTP id g20-v6so6405645plq.1; Thu, 07 Jun 2018 08:49:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=MkKAFwrZFC0ab90pXCJxSKpTJWr31/T1Xd5tCVeq+1g=; b=uheTBMEFd0AwSZuO50aAzCIK8L1w2rAmxl1E1PO4QoK9vjSgVM3NqKCS6rfau90XIC qwDw4XuX8qaFmlXceZHM+sYzwgMJWOw1uurI5zzU3A+FGOOX6JtR7/LB8/14qUX8jPJE v4kCwP9GKrNQFGMK8l7TLooFOy+R27Gk8kLxmhY7boIC4JNkBIrN2PZZyBgrkMCvC9uB SYfVg52zza5sjIC0s9uHBiQ3/jCbQ+rIPrBVl+Bzi1Ym9csuh1F95+bCYZw5sTqYQWdP CgaNjz8Ft7iq3EMsjUvdQzLjwM0L4TQE6iB0RdsfLspLImGj3P6SG/J5OEBWuKQBHpcq gCvA== X-Gm-Message-State: APt69E3BZo4uOx/ibMXyHMVVAITIEMTEdQUvkOB5ytVQRL7X/wgfK3Gl varamsDt9K40eZBTDMGSm5NaAj3oppGkCD+4ecvQAw== X-Google-Smtp-Source: ADUXVKJS8H7vRK3QSPPDWMdsbtxvk1ZSbKuPrPhBu2q30pBGJjKAswu4Fg/DSetR1tjgQ+AsuCj+R58ZDPL8jJpiOKU= X-Received: by 2002:a17:902:8341:: with SMTP id z1-v6mr2629729pln.40.1528386577713; Thu, 07 Jun 2018 08:49:37 -0700 (PDT) MIME-Version: 1.0 Sender: egypcio@gmail.com Received: by 2002:a17:90a:1fcc:0:0:0:0 with HTTP; Thu, 7 Jun 2018 08:49:37 -0700 (PDT) In-Reply-To: <20171113195144.GH53537@corpmail.liquidneon.com> References: <20170927163012.GA99112@FreeBSD.org> <20171113172054.GA23670@FreeBSD.org> <1972909.hTPcQf8OeH@ralph.baldwin.cx> <20171113195144.GH53537@corpmail.liquidneon.com> From: =?UTF-8?Q?Vin=C3=ADcius_Zavam?= Date: Thu, 7 Jun 2018 17:49:37 +0200 X-Google-Sender-Auth: eUjGTEtOiWpkZKdUZP7FKUoPbPk Message-ID: Subject: Re: Problems with packaging /etc and etcupdate(8) To: Brad Davis Cc: John Baldwin , Glen Barber , freebsd-pkgbase@freebsd.org, Will Andrews Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-pkgbase@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Packaging the FreeBSD base system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2018 15:49:39 -0000 2017-11-13 20:51 GMT+01:00 Brad Davis : > > On Mon, Nov 13, 2017 at 09:26:49AM -0800, John Baldwin wrote: > > I had assumed that in a pkgbase setup, one wouldn't use etcupdate or mergemaster. > > Instead, my understanding is that pkg was going to "learn" about configuration > > files and would grow etcupdate-like functionality to merge in changes to configuration > > files during upgrades (and would also support 'pkg confdiff', etc. so that > > 'pkg confdiff -a' would replace 'etcupdate diff' for example, but would also support > > packages built from ports, not just base system conf files). Each pkgbase package > > would contain its associated /etc files as configuration files in this scheme. > > To that end Will and I have been working on a patch to move all files in head/etc/ > to the places they belong. I am probably ~75% of the way through them so > far. Once I get the last bit wrapped up, I will post a review. > > > Regards, > Brad Davis I am sorry for getting back into this thread, but talking to some friends a while ago it occurred me that something I run at home could be useful for others here - related to etcupdate and updates using pkg-base (on HEAD). I'll not cover the delete-files things here, and I must admit that I was not following the mailing list for a while :\ so, after building world, kernel and creating the respective distfiles (base.txz, kernel.txz) my build server generates the "etc.tbz" using the following command: # etcupdate build -B -s /usr/src /dist/etc.tbz in another machine (my laptop, also running HEAD), where I extract the distfiles for base and kernel, here is how I deal with updating/upgrading: ~ fetch *.txz stuff, and etc.tbz ~ extract kernel.txz to / # rm -rf /var/db/etcupdate/previous # mkdir -p /var/db/etcupdate/current # mkdir -p /var/db/meu # tar --unlink -xjpf /whatever/etc.tbz -C /var/db/meu/etc for FILE in $(find /var/db/meu/etc -type f | cut -d\/ -f6-9); do d=3D$(dirname ${FILE}) f=3D$(basename ${FILE}) mkdir -p /var/db/etcupdate/previous/$d cp -a /$d/$f /var/db/etcupdate/previous/$d/$f 2>/dev/null done # etcupdate -p -F -t /var/db/meu/etc.tbz # etcupdate resolve -p # etcupdate diff > /var/db/meu/etc.diff.pre ~ extract base.txz to / # etcupdate -F -t /var/db/meu/etc.tbz # etcupdate resolve # etcupdate diff > /var/db/meu/etc.diff ~ reboot. well, it's indeed NOT an .ucl to be used direclty with pkg, but the idea of scripting it is there. right? -- Vin=C3=ADcius Zavam keybase.io/egypcio/key.asc