From owner-freebsd-ports@freebsd.org Sun Dec 6 09:52:11 2015 Return-Path: Delivered-To: freebsd-ports@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 C3D6974DC for ; Sun, 6 Dec 2015 09:52:11 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (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 5FBF8133C for ; Sun, 6 Dec 2015 09:52:11 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wmvv187 with SMTP id v187so128706225wmv.1 for ; Sun, 06 Dec 2015 01:52:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=nWJaj1eViWXGvOP5OsKo4rb2qNwEaHuOzBP77wRczWU=; b=NfTynElTV1agUcV3Tj+XdAqCG07Exs2Ix3wpOz+zYedZWiXP/adrOPGkbz5Anlw9pT MDqeT1kj2sd0Bqn/V8zy0+QeVnrVl3ly3iYHvRcnmIs8JB1ttp33k+i2p54CcAmRXYnd SHqs9dwP7BXR1oiae86Nm0Marecr8MH7ictVxCreTw0evttzjYbeHAv4VWE1ov0OwwtC fWpmfLdcIylAu5JdOoqszc2csYQf817e5wwBGVGJ3U9RinGO83m29SnvG4GCrLb871EA /jPsWOxKGT4vw/uBoodKAauJPeNEl1m+Q+GJeFPMwPkWWJWctpkg+Y8JRyI+Xeav25wY CGdQ== X-Received: by 10.28.19.84 with SMTP id 81mr15693279wmt.26.1449395529839; Sun, 06 Dec 2015 01:52:09 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id f11sm11356005wmd.7.2015.12.06.01.52.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Dec 2015 01:52:09 -0800 (PST) Sender: Baptiste Daroussin Date: Sun, 6 Dec 2015 10:52:07 +0100 From: Baptiste Daroussin To: Nick Rogers Cc: "freebsd-ports@freebsd.org" Subject: Re: pkg regression 1.6.1 to 1.6.2: custom package dependencies missing after install Message-ID: <20151206095207.GF27529@ivaldir.etoilebsd.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QXO0/MSS4VvK6f+D" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2015 09:52:12 -0000 --QXO0/MSS4VvK6f+D Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 05, 2015 at 07:24:39PM -0800, Nick Rogers wrote: > Hello, >=20 > I have an interesting problem since upgrading to the latest pkg version. I > am running FreeBSD 10.1-RELEASE-p24. >=20 > I use "pkg create" to create a custom package (lets call it "mypkg") to > distribute some proprietary software. In the custom package's manifest, I > specify dependencies that the software relies on. These dependencies are > all "real" ports in the FreeBSD ports tree. I use poudriere to host a > custom repository that contains all the necessary dependencies. When I > bring up a new system, to install the software I run "pkg install mypkg", > and that automatically installs all the necessary dependency packages. The > custom repo is configured in /usr/local/etc/pkg/repos, and the default > "FreeBSD" repo is disabled. >=20 > This has worked great for some time until I upgraded to pkg 1.6.2 > (previously was using 1.6.1). Now when I install my package for the first > time, pkg seems to ignore some of the dependencies and does not install > some packages (about 14 out of over 200). >=20 > The MANIFEST of the custom package used in pkg create looks something like > this: > Generating +MANIFEST > name: mypkg > origin: myorigin/mypkg > version: "1.23" > comment: mypkg > prefix: /mypkg > arch: freebsd:10:* > deps: { > "bonnie++": { > origin: "benchmarks/bonnie++" > version: "*" > }, > "iperf": { > origin: "benchmarks/iperf" > version: "*" > }, > "mgetty": { > origin: "comms/mgetty+sendfax" > version: "*" > }, > "bash": { > origin: "shells/bash" > version: "*" > }, > .... more dependencies .... >=20 >=20 > There are no errors when I do the initial pkg install mypkg. It does not > complain about missing dependencies. Most of the dependencies are > installed, and a few are left out. >=20 > When I run "pkg check -d" after the initial "pkg install mypkg", pkg > clearly recognizes that some packages are missing, but then it crashes wi= th > an abort trap. Here you can see which packages are ignored and the error. >=20 > Checking all packages: 100% > mypkg has a missing dependency: iperf > mypkg has a missing dependency: bash > mypkg has a missing dependency: gmake > mypkg has a missing dependency: rubygem-daemons > mypkg has a missing dependency: mrtg > mypkg has a missing dependency: python > mypkg has a missing dependency: dmidecode > mypkg has a missing dependency: bwm-ng > mypkg has a missing dependency: freeradius3 > mypkg has a missing dependency: flex > mypkg has a missing dependency: p5-Devel-Size > mypkg has a missing dependency: tclGetOpts >=20 > >>> Missing package dependencies were detected. > >>> Found 13 issue(s) in the package database. >=20 > Assertion failed: (pattern !=3D NULL), function pkg_jobs_maybe_match_file, > file pkg_jobs.c, line 188. > Child process pid=3D29412 terminated abnormally: Abort trap >=20 > If I try the same "pkg install mypkg" with pkg 1.6.1, against the exact > same custom package file and the same poudriere repo, all packages are > installed as expected and "pkg check -d" returns a success. So it seems > that the problem lies in some change in the behavior of pkg between 1.6.1 > and 1.6.2, and not my custom package or the repo. Note that the custom > package is created with pkg 1.6.2 as well. >=20 > I am inclined to think the problem has something to do with the way I am > specifying dependencies in my custom packages MANIFEST. My gut tells me it > has something to do with the following commit/change to pkg between 1.6.2 > and 1.6.1, but I am unfamiliar with the code. > https://github.com/freebsd/pkg/commit/7e5152d942cba492142c7a226974913b9d3= 8af21 >=20 > The list of packages that are left-out is the same every time, but I do n= ot > notice any correlation between them as far as how they are named or what > not, but there must be some similarity. >=20 > Hoping someone can shed some light on what is going on. >=20 > I have opened a similar issue on github in case this is the wrong forum f= or > such weirdness. > https://github.com/freebsd/pkg/issues/1356 >=20 > Thanks! As replied on the github issue, the MANIFEST definition is wrong, at least = not doing that is expected: is means depending on for example bash-* (not a glob really the "*" charact= er. pkg accepted the installation in pkg 1.6.1 due to a bug in the solver fixed= in 1.6.2. The proper way to do what is expected is to just drop the version: "*" line= s. How ever pkg should not die in pkg check, I will work on a fix for that. Best regards, Bapt --QXO0/MSS4VvK6f+D Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlZkBUcACgkQ8kTtMUmk6EzEeQCgoTvjwxspx+ieiL0i/2h+skaI MgQAoLEMnxCRxGLD4h81fdwTpn7j2apX =OkAI -----END PGP SIGNATURE----- --QXO0/MSS4VvK6f+D--