From: jhell on
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On Sun, 23 May 2010 02:02, Matthew Seaman wrote:
In Message-Id: <4BF8C4F8.9090103(a)infracaninophile.co.uk>

> On 23/05/2010 04:47:49, jhell wrote:
>> But if a port can install a user there is no reason that it can not
>> uninstall a user via pw(8) that is available from bsd.commands.mk after
>> checking a recorded md5(1) sum that it could create upon installation
>> for the output of pw usershow/groupshow UID/GID.
>
> The trick would be to teach the ports how to tell if a port was being
> deleted for good, when trashing the user would be appropriate, or if the
> port was being deleted as part of the process of upgrading it, when
> you'ld want to keep the user.
>

That shouldn't actually be to hard. If a utility like the three main
upgrade tools that are being used the most right now would export a
variable for say "UPGRADING=yes" then the uninstall script could check
against that to decide whether or not the port is being removed or
upgraded and make the proper decision while alerting the admin to whats
going on.


Regards,

- --

jhell

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iQEcBAEBAgAGBQJL+VbIAAoJEJBXh4mJ2FR+6d0H/RzxsitENOuEiG1j9l6cucod
taGMfoitDYEFe7umLAyx/qfcLVkxRoVKNcStXGdQYFmhgbs0U3LgRfeCroKHcgaG
GQkojvJvHMq0bGPXkGyM5Uqk2duN59dJbWyRqlfAxAt1b9SDl6LkHzfi4Bb0CoZ6
6/+izQ5Nl0nDDGGwzou2uCqhJ20YTm9N+XD5pdvDPPdC208wCc+1IPRNlZbx1stM
B4viIveIBNJei1ooNqH3qwzO/fdOpJhd09eZNncOGLKPguHNNmqa/UH0ftXIBykU
3edE+gP+bvnf0kYeFBofYJDrG7H6grAyRUoObcD42sROLoD9Wk/RTO/MXZ8ekjA=
=6JuP
-----END PGP SIGNATURE-----
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Chuck Swiger on
Hi--

On May 22, 2010, at 10:59 PM, Matthew Seaman wrote:
> OpenBSD has a convention that all system user accounts start with a '_'
> character. There are a few accounts in UIDs that have adopted that, but
> no great stampede to adopt the idea despite most people agreeing with it.

That convention is being adopted by MacOS 10.6, also. It does make it easier for one to separate out processes invoked by a human from automated tasks in ps or top...

Regards,
--
-Chuck




_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Doug Barton on
On 05/23/10 09:24, jhell wrote:
>
> That shouldn't actually be to hard. If a utility like the three main
> upgrade tools that are being used the most right now would export a
> variable for say "UPGRADING=yes" then the uninstall script could check
> against that to decide whether or not the port is being removed or
> upgraded and make the proper decision while alerting the admin to whats
> going on.

The previous author of portupgrade and I agreed on the following
variables to be set in our tools:
UPGRADE_TOOL=portmaster
UPGRADE_PORT=<name of port with version>
UPGRADE_PORT_VER=`echo $UPGRADE_PORT | sed 's#.*-\(.*\)#\1#'`

The last 2 are not set if this is a new install.


hth,

Doug

--

... and that's just a little bit of history repeating.
-- Propellerheads

Improve the effectiveness of your Internet presence with
a domain name makeover! http://SupersetSolutions.com/

_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Alexander Churanov on
2010/5/23 jhell <jhell(a)dataix.net>:
> That shouldn't actually be to hard. If a utility like the three main upgrade
> tools that are being used the most right now would export a variable for say
> "UPGRADING=yes" then the uninstall script could check against that to decide
> whether or not the port is being removed or upgraded and make the proper
> decision while alerting the admin to whats going on.

Folks,

May be is' better to add another make target, called "update", which
would invoke "deinstall", followed by "reinstall"? This would
encapsulate the mechanism inside port.mk.

Alexander Churanov
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Garrett Cooper on
On May 24, 2010, at 9:22 AM, Alexander Churanov wrote:

> 2010/5/23 jhell <jhell(a)dataix.net>:
>> That shouldn't actually be to hard. If a utility like the three main upgrade
>> tools that are being used the most right now would export a variable for say
>> "UPGRADING=yes" then the uninstall script could check against that to decide
>> whether or not the port is being removed or upgraded and make the proper
>> decision while alerting the admin to whats going on.
>
> Folks,
>
> May be is' better to add another make target, called "update", which
> would invoke "deinstall", followed by "reinstall"? This would
> encapsulate the mechanism inside port.mk.

I'm going to have toe disagree with you on this. Using pkg_install with the appropriate install/deinstall scripts would better solve the installation and deletion scenarios properly (especially because adding code like this to port.mk would be haphazard in cases where you need to specify a specific DESTDIR, PREFIX, etc).
Thanks,
-Garrett_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"