Mailing List Archive

Re: [gentoo-commits] gentoo-x86 commit in sys-cluster/csync2: ChangeLog csync2-1.34.ebuild
On 08:49 Thu 20 Sep , Christian Zoffoli (xmerlin) wrote:
> xmerlin 07/09/20 08:49:25
>
> Modified: ChangeLog
> Added: csync2-1.34.ebuild
> Log:
> Version bump.
> (Portage version: 2.1.2.2)

> 1.1 sys-cluster/csync2/csync2-1.34.ebuild
>
> file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/csync2/csync2-1.34.ebuild?rev=1.1&view=markup
> plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/csync2/csync2-1.34.ebuild?rev=1.1&content-type=text/plain

> src_compile() {
> econf \
> --localstatedir=/var \
> --sysconfdir=/etc/csync2 \
> || die
>
> emake || die

These could really use some die() messages, so you know which one failed.

> make DESTDIR=${D} \
> localstatedir=/var \
> sysconfdir=/etc/csync2 \
> install || die "install problem"

Use emake here too...

> pkg_config() {
> einfo "Updating /etc/services"
> { grep -v ^${PN} /etc/services;
> echo "csync2 30865/tcp"
> } > /etc/services.new
> mv -f /etc/services.new /etc/services
>
> if [ ! -f /etc/${PN}/csync2_ssl_key.pem ]; then
> einfo "Creating default certificate in /etc/${PN}"
>
> openssl genrsa -out /etc/${PN}/csync2_ssl_key.pem 1024 &> /dev/null
>
> yes '' | \
> openssl req -new \
> -key /etc/${PN}/csync2_ssl_key.pem \
> -out /etc/${PN}/csync2_ssl_cert.csr \
> &> /dev/null
>
> openssl x509 -req -days 600 \
> -in /etc/${PN}/csync2_ssl_cert.csr \
> -signkey /etc/${PN}/csync2_ssl_key.pem \
> -out /etc/${PN}/csync2_ssl_cert.pem \
> &> /dev/null
>
> rm /etc/${PN}/csync2_ssl_cert.csr
> chmod 400 /etc/${PN}/csync2_ssl_key.pem /etc/${PN}/csync2_ssl_cert.pem
> fi
> }

This function doesn't respect ${ROOT}.

Thanks,
Donnie
--
gentoo-dev@gentoo.org mailing list
Re: gentoo-x86 commit in sys-cluster/csync2: ChangeLog csync2-1.34.ebuild [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

2007-09-20 19:20:41 Donnie Berkholz napisał(a):
> On 08:49 Thu 20 Sep , Christian Zoffoli (xmerlin) wrote:
> > xmerlin 07/09/20 08:49:25
> >
> > Modified: ChangeLog
> > Added: csync2-1.34.ebuild
> > Log:
> > Version bump.
> > (Portage version: 2.1.2.2)
>
> > 1.1 sys-cluster/csync2/csync2-1.34.ebuild
> >
> > file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/csync2/csync2-1.34.ebuild?rev=1.1&view=markup
> > plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/csync2/csync2-1.34.ebuild?rev=1.1&content-type=text/plain
>
> > src_compile() {
> > econf \
> > --localstatedir=/var \
> > --sysconfdir=/etc/csync2 \
> > || die
> >
> > emake || die
>
> These could really use some die() messages, so you know which one failed.

econf has default "econf failed" die message.
The following would be sufficient:
econf \
--localstatedir=/var \
--sysconfdir=/etc/csync2


- --
Arfrever Frehtes Taifersar Arahesis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFG8q6q/axNJ4Xo/ZERAkj4AJ9D2hO+CfjENmHB6fhTlP8afVvyaACgprji
ARAvSORW6ojPwlzE8f/2CFw=
=UfIJ
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
Re: gentoo-x86 commit in sys-cluster/csync2: ChangeLog csync2-1.34.ebuild [ In reply to ]
On 19:31 Thu 20 Sep , Arfrever Frehtes Taifersar Arahesis wrote:
> > > src_compile() {
> > > econf \
> > > --localstatedir=/var \
> > > --sysconfdir=/etc/csync2 \
> > > || die
> > >
> > > emake || die
> >
> > These could really use some die() messages, so you know which one failed.
>
> econf has default "econf failed" die message.
> The following would be sufficient:
> econf \
> --localstatedir=/var \
> --sysconfdir=/etc/csync2

Is that so ... when did that appear? Does it happen for all of the
package managers? Which functions do this? Where is it documented?

Thanks,
Donnie
--
gentoo-dev@gentoo.org mailing list
Re: gentoo-x86 commit in sys-cluster/csync2: ChangeLog csync2-1.34.ebuild [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

2007-09-20 19:53:53 Donnie Berkholz napisał(a):
> On 19:31 Thu 20 Sep , Arfrever Frehtes Taifersar Arahesis wrote:
> > > > src_compile() {
> > > > econf \
> > > > --localstatedir=/var \
> > > > --sysconfdir=/etc/csync2 \
> > > > || die
> > > >
> > > > emake || die
> > >
> > > These could really use some die() messages, so you know which one failed.
> >
> > econf has default "econf failed" die message.
> > The following would be sufficient:
> > econf \
> > --localstatedir=/var \
> > --sysconfdir=/etc/csync2
>
> Does it happen for all of the package managers?

I don't know.

> Which functions do this?

Read /usr/lib/portage/bin/ebuild.sh:econf().

> Where is it documented?

Unfortunately it's probably undocumented.

- --
Arfrever Frehtes Taifersar Arahesis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFG8rXB/axNJ4Xo/ZERAqh5AJ9iwuH3EEWKXLb5P9L/TZCaM2r95ACfdWiz
Ogzh4t/qqSvvwvjwSY/Z0R4=
=19/n
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
Re: gentoo-x86 commit in sys-cluster/csync2: ChangeLog csync2-1.34.ebuild [ In reply to ]
On Thursday 20 September 2007 19:54:16 Donnie Berkholz wrote:
> > econf has default "econf failed" die message.
> > The following would be sufficient:
> >       econf \
> >               --localstatedir=/var \
> >               --sysconfdir=/etc/csync2
>
> Is that so ... when did that appear? Does it happen for all of the
> package managers? Which functions do this? Where is it documented?

The currect PMS draft documents it (for econf only). All three package
managers conform to it.

--
Bo Andresen
Re: gentoo-x86 commit in sys-cluster/csync2: ChangeLog csync2-1.34.ebuild [ In reply to ]
On Thursday 20 September 2007, Donnie Berkholz wrote:
> On 19:31 Thu 20 Sep , Arfrever Frehtes Taifersar Arahesis wrote:
> > > > src_compile() {
> > > > econf \
> > > > --localstatedir=/var \
> > > > --sysconfdir=/etc/csync2 \
> > > >
> > > > || die
> > > >
> > > > emake || die
> > >
> > > These could really use some die() messages, so you know which one
> > > failed.
> >
> > econf has default "econf failed" die message.
> > The following would be sufficient:
> > econf \
> > --localstatedir=/var \
> > --sysconfdir=/etc/csync2
>
> Is that so ... when did that appear? Does it happen for all of the
> package managers? Which functions do this? Where is it documented?

econf has always died as far as i know ... however, we've been using econf||
die as a standard for just as long and i dont think we should change now
-mike
Re: gentoo-x86 commit in sys-cluster/csync2: ChangeLog csync2-1.34.ebuild [ In reply to ]
On 9/20/07, Bo Ørsted Andresen <bo.andresen@zlin.dk> wrote:
> On Thursday 20 September 2007 19:54:16 Donnie Berkholz wrote:
> > > econf has default "econf failed" die message.
> > > The following would be sufficient:
> > > econf \
> > > --localstatedir=/var \
> > > --sysconfdir=/etc/csync2
> >
> > Is that so ... when did that appear? Does it happen for all of the
> > package managers? Which functions do this? Where is it documented?
>
> The currect PMS draft documents it (for econf only). All three package
> managers conform to it.

As you seem to know, PMS is still a draft and as such can't be
considered a valid reference document yet. The econf function is
indeed the only one that is officially documented as aborting
automatically via die(). You can find this in our Gentoo Development
Guide available at devmanual.gentoo.org.

In any case it is considered good practice to always add '||
die("message")' after all helper functions. The reason is you can't
(or shouldn't) rely on any of them dying properly now or in the
future. Plus adding a specific message helps debugging.

And about the existence of other package managers, yes, I've heard
that rumor too. I've even heard that they may work, but I can't
confirm.

Denis.
éí¢‡^¾§¶Š(® šŠX§‚X¬