Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Oct 2014 16:07:08 +0100
From:      Baptiste Daroussin <bapt@freebsd.org>
To:        Nick Rogers <ncrogers@gmail.com>
Cc:        "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org>
Subject:   Re: pkgng "requirements" script equivalent
Message-ID:  <20141030150708.GB2894@ivaldir.etoilebsd.net>
In-Reply-To: <CAKOb=YZOYECz53y3sTTv2owRLC0UqD2Wce75n2x%2BYe5rUwprNA@mail.gmail.com>
References:  <CAKOb=YYW1DHSJA=HGM7Js8-hShmNCx6XjtMPg7rPkGcCytv5-A@mail.gmail.com> <20141029200212.GE11033@ivaldir.etoilebsd.net> <CAKOb=YbL4gJN9Bn44teKCPT91v87rcrTSPz50XqMQNR2asnK=w@mail.gmail.com> <20141030004434.GS11033@ivaldir.etoilebsd.net> <CAKOb=YZOYECz53y3sTTv2owRLC0UqD2Wce75n2x%2BYe5rUwprNA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Yylu36WmvOXNoKYn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Oct 30, 2014 at 07:52:51AM -0700, Nick Rogers wrote:
> On Wed, Oct 29, 2014 at 5:44 PM, Baptiste Daroussin <bapt@freebsd.org>
> wrote:
>=20
> > On Wed, Oct 29, 2014 at 01:43:27PM -0700, Nick Rogers wrote:
> > > On Wed, Oct 29, 2014 at 1:02 PM, Baptiste Daroussin <bapt@freebsd.org>
> > > wrote:
> > >
> > > > On Wed, Oct 29, 2014 at 12:44:21PM -0700, Nick Rogers wrote:
> > > > > Hello,
> > > > >
> > > > > I am in the process of upgrading some proprietary software that h=
as
> > > > always
> > > > > been deployed via a "custom" package created by the old pkg_creat=
e.
> > So
> > > > far
> > > > > I've been able to use "pkg create" to achieve what I want, but it
> > seems
> > > > > that the "requirements" script is no longer a part of the new pkg
> > > > > framework. This used to be a script that you could include with a
> > package
> > > > > that could halt the pkg add or remove process by returning a non-=
zero
> > > > exit
> > > > > code from the script. I've been using it with the old pkg tools a=
s a
> > way
> > > > to
> > > > > enforce some proprietary requirements logic that goes beyond
> > requiring
> > > > > certain pkg dependencies, architecture, etc. One example is to ma=
ke
> > sure
> > > > a
> > > > > specific custom kernel is running by analyzing uname output.
> > > > >
> > > > > I am wondering if anyone has a suggestion as to how to interrupt =
the
> > pkg
> > > > > add process in a similar way. It looks like the "requirements"
> > script has
> > > > > been removed entirely, and from what I can tell a failure in the
> > > > > pre-install script does not halt pkg add.
> > > >
> > > > What is the requirement script you are speaking about? I never heard
> > of it?
> > > >
> > >
> > > man pkg_create(1)
> > >
> > https://www.freebsd.org/cgi/man.cgi?query=3Dpkg_create&apropos=3D0&sekt=
ion=3D1&manpath=3DFreeBSD+8.3-RELEASE&arch=3Ddefault&format=3Dhtml
> > > -r rscript
> > >     Set rscript to be the ``requirements'' procedure for the package.
> > >     This can be any executable program (or shell script).  It will be
> > >     invoked automatically at installation/deinstallation time to
> > >     determine whether or not installation/deinstallation should pro-
> > >     ceed.  To differentiate between installation and deinstallation,
> > >     the keywords INSTALL and DEINSTALL are passed respectively, along
> > >     with the package's name.
> > >
> > >
> > > > Explain me in detail the way you were producing the package with
> > > > pkg_create and
> > > > I'll explain you how to do the same with pkg(8).
> > > >
> > >
> > > I was running pkg_create with the following arguments:
> > >
> > > pkg_create -f plistfile -c -'comment' -d -description' -v -P 'list of
> > > dependency packages' -v -r requirements_script_file -i
> > > pre-install_script_file -I post-install-script_file -k
> > > pre-deinstall_script_file -K post-deinstall_script_file -s
> > > /space/build/trunk -D displayfile -p /space/rxg -o category/name pkg.=
tbz
> > >
> > > For the most part I've figured out the appropriate +MANIFEST file and
> > > manifest directory contents, except for the "requirements procedure"
> > script.
> > >
> >
> > Ok requirements are gone, and you have a perfectly justified use case, I
> > will
> > readd such functionnality as soon as I can when dealing with binary
> > upgrade it
> > is basically a wrong idea to fail the procedure because a script fails =
so
> > I need
> > to add the notion of trigger and run the requirements prior the procedu=
re.
> >
> > Might be complicated to add but it is for sure something we need.
> >
> > I cannot promise anything for pkg 1.4 which is in freeze time but I'll =
try
> > to
> > see what I can do.
> >
>=20
> Yeah that is what I suspected. I will probably find a way to accomplish
> what I am doing some other way (i.e., outside of pkg), as I am trying to
> get this working for upcoming 10.1-RELEASE. However it would be nice to
> have a requirements procedure again sometime in the future. Thanks!
>=20
I have added it in my TODO list and will push it in priority.

Regards,
Bapt

--Yylu36WmvOXNoKYn
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlRSVBwACgkQ8kTtMUmk6ExKoACePQcxnkwrP5q8iNdmchYQ6ygD
b6IAnj0qbilI/VWkuJTyK0r9XZ9DInNp
=mUgk
-----END PGP SIGNATURE-----

--Yylu36WmvOXNoKYn--



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