public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Diego 'Flameeyes' Pettenò" <flameeyes@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev]  Re: user/group manipultaion feedback request.
Date: Mon, 3 Oct 2005 14:00:23 +0200	[thread overview]
Message-ID: <200510031400.29672@enterprise.flameeyes.is-a-geek.org> (raw)
In-Reply-To: <1128339545.6208.390.camel@thor.tres.org>

On Monday 03 October 2005 13:39, Tres Melton wrote:
> I've coded the parts that 
> extract and parse the information from the /etc/{passwd,group} files
I think with this you're already out of portability. /etc/passwd structure in 
Linux and FreeBSD is different, and on Darwin the users part is completely 
another story. Take a look to enewuser/enewgroup functions on eutils eclass.

> find
This is mostly compatible a part a couple of commands (like -printf) and the 
fact that it *needs* that you give him a path to work on.

> ps
This is different from OS to OS, the Linux version is not portable. Have a 
look to pgrep, but that's not completely portable, too.

> tar
As long as you use the basic commands, it should be safe. You cannot ignore 
the format of the archive, tho, as just bsdtar and later GNU tars support 
that.

> gzip ? (or something else to compress things with)
That's just the same.

> Although Gentoo is my primary goal I want things to work on a
> minimal system of any flavor of *nix that has bash.
You'll probably have not to use directly the /etc/{passwd,group} files, as 
they are not universal. Every os uses its own ways to access those data, and 
things do not get better when adding pam as a variable in all this.

Take a look to egetent, egethome functions in eutils and portability eclass if 
you want to take a look to what is done now. That is still incomplete, 
though, so you will probably have other things to arrange...

You're wellcome to join gentoo-alt mailing list to discuss of portability in 
case :)

-- 
Diego "Flameeyes" Pettenò - http://dev.gentoo.org/~flameeyes/
Gentoo/ALT lead, Gentoo/FreeBSD, Video, AMD64, Sound, PAM, KDE

-- 
gentoo-dev@gentoo.org mailing list



      reply	other threads:[~2011-10-31  3:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-03  6:49 [gentoo-dev] user/group manipultaion feedback request Tres Melton
2005-10-03  9:14 ` [gentoo-dev] " Duncan
     [not found]   ` <200510031204.58995@enterprise.flameeyes.is-a-geek.org>
2005-10-03 11:39     ` Tres Melton
2005-10-03 12:00       ` Diego 'Flameeyes' Pettenò [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200510031400.29672@enterprise.flameeyes.is-a-geek.org \
    --to=flameeyes@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox