Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Dec 2008 19:40:39 +0530
From:      wahjava.ml@gmail.com (Ashish Shukla =?utf-8?B?4KSG4KS24KWA4KS3IA==?= =?utf-8?B?4KS24KWB4KSV4KWN4KSy?=)
To:        Dmitry Marakasov <amdmi3@amdmi3.ru>
Cc:        FreeBSD Ports Mailing List <freebsd-ports@freebsd.org>, "Andrew W. Nosenko" <andrew.w.nosenko@gmail.com>
Subject:   Re: [PROPOSAL] Ports using SCM repositories as source instead of distfiles
Message-ID:  <87vdtqls4g.fsf@chateau.d.lf>
In-Reply-To: <20081211113556.GA7422@hades.panopticon> (Dmitry Marakasov's message of "Thu, 11 Dec 2008 14:35:56 %2B0300")
References:  <20081209181354.GB29817@hades.panopticon> <87tz9di38u.fsf@chateau.d.lf> <20081209222042.GC29817@hades.panopticon> <8763lsi10m.fsf@chateau.d.lf> <20081210181125.GA86341@hades.panopticon> <87zlj3heor.fsf@chateau.d.lf> <20081210223522.GA6367@hades.panopticon> <87vdtrhb6r.fsf@chateau.d.lf> <20081211082325.GA6167@hades.panopticon> <6161f3180812110156n43803ee9s88443b6777bd0743@mail.gmail.com> <20081211113556.GA7422@hades.panopticon>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=
Content-Transfer-Encoding: quoted-printable

Dmitry Marakasov writes:
> * Andrew W. Nosenko (andrew.w.nosenko@gmail.com) wrote:

>> > I understand. But you're implying that there is Makefile and it suppor=
ts
>> > DESTDIR. As I understand, you're referring to autotools-based ports.
>> > Remember, those are less than 1/4 of the collection.
>> Excuse me, but he refers not to autotools-based ports, but to ports
>> that follows GNU Coding Standards (section "Makefile Conventions" if
>> more preciously).
>> Autotools just brings such support out-of-the-box.
>> And, IMO, projects that violates these things heavy, should be fixed ups=
tream.
>> BTW, from my expiriense, there are little amount of project that
>> doesn't support DESTDIR of it's analog.  And many of them may be
>> worked around anyway.

Yes, I meant that only.

> I didn't count or check thoroughfully, but the feeling I've got
> from my 150+ ports is that no one actually supports it. I may be
> wrong though.

> And again, GNU Coding Standards don't cover build systems other
> than make.  Also, it's not even a requirement: "So, we strongly
> recommend GNU packages support DESTDIR, though it is not an absolute
> requirement."

> I agree with that you can't require all upstream maintainers to
> support this feature. Architecturally this should be completely
> package manager's problem (i.e. upstream should only provide
> installation into PREFIX, and may optionally support DESTDIR, and
> if package manager needs features like that staged install or
> automatic plist generation, and upstream don't provide it, package
> manager should take care of it by itself.

> Tecnically, we may support DESTDIR in all ports. But considering
> the amount of work required, and increased complexety of everything
> as a result, I'd stick with static plists without hesitation.

Yes, that is why I mentioned having a variable which enables this
behaviour, by default it is disabled. I mean ports which are okay
with providing static plists are fine, but ports which aren't
predictable with what files are going to installed can go with this
dynamic plist support, where ports infrastructure will only help in
generating a plist from an already setup directory tree
(/var/tmp/${portname}), now it is maintainer's responsibility to make
sure that all files will be installed in /var/tmp/${portname} which
{s,}he can do by either using 'make install DESTDIR=3D/var/tmp/${portname}'
 or something similar if supported by port's upstream or {s,}he has to
 add installation commands in ports Makefile rather than going with
 upstream's way of installing things.

> See
> http://lists.freebsd.org/pipermail/freebsd-ports/2006-August/034745.html
> those are some real examples of complexity and resulting confusion,
> from first variant of DESTDIR support in ports. Now, when we have
> one DESTDIR implementation, adding another will likely make some heads
> explode, just think of variable naming.

The DESTDIR issue in above link refers to the DESTDIR support[1] present in
FreeBSD Ports system, and the one which I'm talking about has nothing to
do with that.

> I'll remind that what we are talking about is automatic plist generation,
> and I think that this can be done without any hacks like installing a
> port into intermediate directory before real installation just by
> logging all writes to the filesystem.=20

Yes that intermediate directory is what DESTDIR is. And if you're
capable of logging all writes in the DESTDIR, then its cool, but
remember you're also talking about installing port in an intermediate
directory. After the port gets installed in intermediate directory, the
plist can be generated with your filesystem writes logger component or a
well tested version of following simply command line:

% find /var/tmp/${PORTNAME} -type f |sed -e \
    "s[/var/tmp/${PORTNAME}${PREFIX}/[[g" > plist.tmp

HTH
=2D-=20
Ashish Shukla

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAklBH2MACgkQHy+EEHYuXnT53ACfVSmMJprUpT9LFW/HzyXls92S
nCMAoMLXJn8WLaXjtv1zk0JO5sUa5Vad
=/Xk2
-----END PGP SIGNATURE-----
--=-=-=--



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