Bug 213948 - www/node: mv www/node7 to www/node
Summary: www/node: mv www/node7 to www/node
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Adam Weinberger
URL:
Keywords:
Depends on: 213945
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-31 12:45 UTC by Bradley T. Hughes
Modified: 2016-12-09 15:12 UTC (History)
1 user (show)

See Also:


Attachments
metaport (15.57 KB, patch)
2016-10-31 12:45 UTC, Bradley T. Hughes
bhughes: maintainer-approval+
Details | Diff
www/node meta-port (15.61 KB, patch)
2016-11-01 21:08 UTC, Bradley T. Hughes
bhughes: maintainer-approval+
Details | Diff
www/node: become a meta-port for the latest major version of Node.js (17.91 KB, patch)
2016-11-10 21:57 UTC, Bradley T. Hughes
bhughes: maintainer-approval-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bradley T. Hughes freebsd_committer freebsd_triage 2016-10-31 12:45:15 UTC
Created attachment 176339 [details]
metaport

USES=node:run will make this port depend on and install the default
version of Node.js.
Comment 1 Bradley T. Hughes freebsd_committer freebsd_triage 2016-11-01 20:56:22 UTC
portlint: OK (-AC, WARN: Makefile: no MASTER_SITES found. is it ok?)

Yes, this is now a meta-port ;)
Comment 2 Bradley T. Hughes freebsd_committer freebsd_triage 2016-11-01 21:08:20 UTC
Created attachment 176401 [details]
www/node meta-port

Updated patch to add LICENSE=NONE
Comment 3 Bradley T. Hughes freebsd_committer freebsd_triage 2016-11-03 22:04:07 UTC
I'm wondering if this needs an UPDATING entry. Essentially I am going to create a new port for every new node.js major release, and just let the metaport always pick up the latest. This means that, currently, we would have www/node4, www/node6, and www/node7, with the meta-port picking www/node7 unless the user changes it via DEFAULT_VERSION.

Thoughts?
Comment 4 Adam Weinberger freebsd_committer freebsd_triage 2016-11-05 17:05:21 UTC
Yes, an UPDATING entry is always a good idea. It doesn't have to be elaborate, but should contain a head's up on what command to enter to stay on node6.
Comment 5 Bradley T. Hughes freebsd_committer freebsd_triage 2016-11-10 21:57:47 UTC
Created attachment 176878 [details]
www/node: become a meta-port for the latest major version of Node.js

Add a RUN_DEPENDS on the latest major version of node.js (7.x) and
USES=metaport. Set LICENSE=NONE since this is a meta-port.
    
Remove node-[0-9]* from CONFLICTS_INSTALL on all www/node* ports. It
is possible to install the meta-port along sie the "real" ports.
Comment 6 Bradley T. Hughes freebsd_committer freebsd_triage 2016-11-10 22:13:13 UTC
For UPDATING:

2016MMDD:
  AFFECTS: users of www/node
  AUTHOR: bradleythughes@fastmail.fm

  The www/node port is now a meta-port to pull in the latest major
  version of Node.js. Users that wish to stay on Node.js v6.x can
  use the www/node6 port or node6 package using one of the following
  commands:

  # pkg install node6
    or
  # portmaster -o www/node6 www/node
    or
  # portupgrade -o www/node6 www/node
Comment 7 Adam Weinberger freebsd_committer freebsd_triage 2016-11-10 22:15:28 UTC
(In reply to Bradley T. Hughes from comment #6)

The UPDATING message shouldn't be about node becoming a meta-port. It should be about www/node being updated to version 7.0.
Comment 8 Bradley T. Hughes freebsd_committer freebsd_triage 2016-11-10 22:27:53 UTC
Adam: I could perhaps also summarize the changes leading up to this one, something like below. I'm not sure if I should comment that I intend to create new ports for every major Node.js version?

2016MMDD:
  AFFECTS: users of www/node
  AUTHOR: bradleythughes@fastmail.fm

  Node.js v6.x has moved to www/node6. Node.js v7.x has been added in
  www/node7. The www/node port now pulls in Node.js v7.x instead of
  v6.x. Users that wish to continue to use v6.x can install the
  www/node6 port or node6 package using on of the following commands:

  # pkg install node6
    or
  # portmaster -o www/node6 www/node
    or
  # portupgrade -o www/node6 www/node
Comment 9 Adam Weinberger freebsd_committer freebsd_triage 2016-11-10 22:30:20 UTC
(In reply to Bradley T. Hughes from comment #8)

Are there enough fundamental differences between them that every major version needs its own port?

Either way, I'd say no, you don't need to pre-warn people. Just announce new versions in UPDATING when they land.
Comment 10 Bradley T. Hughes freebsd_committer freebsd_triage 2016-11-10 22:33:51 UTC
(In reply to Adam Weinberger from comment #9)

Yes, so far there have been breaking changes between every major version, hence the semver major number increases. There are and will continue to be several release lines, with varying levels of support, so I think it makes sense to provide all of the currently maintained versions as separate ports.

I agree with you, btw... I'll just announce new ports and how to keep or follow major version changes as they happen.

Thanks for the help :)
Comment 11 Adam Weinberger freebsd_committer freebsd_triage 2016-11-19 22:41:37 UTC
Bradley, I don't think I like this metaport. It makes upgrading *harder* for people, because while the node "metaport" gets updated, its one and only dependency still has to be switched manually from the command-line.

I think that node7 should be removed and moved to www/node, and www/node should just remain the latest version.
Comment 12 Adam Weinberger freebsd_committer freebsd_triage 2016-11-22 17:35:08 UTC
Bradley, give me some direction here. Are you sure that you want www/node to be a meta-port, understanding that major version bumps will require manual command-line intervention? Or do you want node7 merged into www/node?

I'll do whatever you decide but I need your input before I can proceed either way.
Comment 13 Bradley T. Hughes freebsd_committer freebsd_triage 2016-11-23 13:57:16 UTC
Adam: I'm currently traveling and have been afk, but I'd like to discuss this more with you. I'll get back to you shortly. :)
Comment 14 Bradley T. Hughes freebsd_committer freebsd_triage 2016-11-28 21:41:07 UTC
Hi Adam! I just responded to your email about this topic. For the sake of public discussion, I want to include my response here:

---
I got curious about what would actually happen, and actually, `pkg upgrade` seems to do the right thing. I changed my www/node meta-port to install v6, then changed it to v7, and pkg will remove node6 and install node7 when the dependency changes:

$ sudo pkg install -r poudriere node
Updating poudriere repository catalogue...
poudriere repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The following 5 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	node: 6 [poudriere]
	node6: 6.9.1_2 [poudriere]
	c-ares: 1.12.0 [poudriere]
	libuv: 1.10.1 [poudriere]
	icu: 58.1,1 [poudriere]

Number of packages to be installed: 5

The process will require 65 MiB more space.

Proceed with this action? [y/N]: y
...
$ sudo pkg update
...
$ sudo pkg upgrade node
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
Updating poudriere repository catalogue...
poudriere repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (1 conflicting)
 - node7-7.1.0_1 [poudriere] conflicts with node6-6.9.1_2 [installed] on /usr/local/bin/node
Checking integrity... done (0 conflicting)
The following 3 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
	node6-6.9.1_2

New packages to be INSTALLED:
	node7: 7.1.0_1 [poudriere]

Installed packages to be UPGRADED:
	node: 6 -> 7 [poudriere]

Number of packages to be removed: 1
Number of packages to be installed: 1
Number of packages to be upgraded: 1

The process will require 2 MiB more space.

Proceed with this action? [y/N]: y
[1/3] Deinstalling node6-6.9.1_2...
[1/3] Deleting files for node6-6.9.1_2: 100%
[2/3] Installing node7-7.1.0_1...
[2/3] Extracting node7-7.1.0_1: 100%
[3/3] Upgrading node from 6 to 7...
[3/3] Extracting node-7: 100%
Message from node7-7.1.0_1:
Note: If you need npm (Node Package Manager), please install www/npm.
Message from node-7:
Note: If you need npm (Node Package Manager), please install www/npm.

Given that `pkg upgrade` does replace node6 with node7 in my example above, I want to keep it as a meta-port. Ports users will probably need to deal with the upgrade/replacement, something I can live with for now.
Comment 15 Adam Weinberger freebsd_committer freebsd_triage 2016-11-28 22:02:48 UTC
Okay, nice. I'll concede on that issue based upon your evidence!

I still disagree that this is a meta-port. It's just an alias.

The problem goes away once USES=node and DEFAULT_VERSIONS+=node=7 gets added.

But, in the meantime, every port that depends on node via
    RUN_DEPENDS=    node:www/node
might have problems, because www/node doesn't provide the www/node binary.

Have you tested that poudriere will handle those dependencies correctly?
Comment 16 Adam Weinberger freebsd_committer freebsd_triage 2016-11-28 22:05:39 UTC
And if you are sure, can you please regenerate the patch so that it applies cleanly, and also fix the dependency lines? If a note in UPDATING is needed when we commit this  (I don't feel strongly about it one way or the other) please write that up too.
Comment 17 Adam Weinberger freebsd_committer freebsd_triage 2016-12-06 21:37:15 UTC
To fold node7 back into node, these are the steps I think we need to run:

svn rm www/node
svn mv www/node7 www/node
Add an entry for www/node7 to /usr/ports/MOVED
Update CONFLICTS for the remaining node ports

Does that look right? Am I missing anything?
Comment 18 Bradley T. Hughes freebsd_committer freebsd_triage 2016-12-07 21:13:25 UTC
Is the 'svn rm www/node' and 'svn mv www/node7 www/node' atomic, or will there be a period with no www/node port (albeit brief)? I am almost tempted to say I will just submit an update to www/node to move it from 6.9.1 to 7.2.1 (the latest), and then we can remove www/node7 after that?
Comment 19 Adam Weinberger freebsd_committer freebsd_triage 2016-12-07 21:16:20 UTC
It's nonatomic, but I'm getting pretty good at typing; we won't have it down for long.

It needs to be a rm/copy. We should preserve the upgrade history (even though it's brief) for the node7 port, which is lost if we just update www/node without an rm/copy.
Comment 20 Bradley T. Hughes freebsd_committer freebsd_triage 2016-12-07 21:19:29 UTC
Ok, sounds good. What do you need from me? I was wondering if we'd need an UPDATING entry to let www/node users know about the major version bump, and the existence of www/node6 should they need/want it.
Comment 21 Adam Weinberger freebsd_committer freebsd_triage 2016-12-07 21:21:02 UTC
Definitely not a bad idea. Write up the text and I'll throw it into UPDATING.
Comment 22 Bradley T. Hughes freebsd_committer freebsd_triage 2016-12-07 22:06:28 UTC
20161207:
  AFFECTS: users of www/node
  AUTHOR: bradleythughes@fastmail.fm

  The www/node port has been updated to node.js v7.2.0, the latest
  upstream release. A new port, www/node6, has been created for the
  v6.x LTS branch. Users wanting to stay on v6.x can replace www/node
  with www/node6 with one of the following commands:

  # pkg install node6
    or
  # portmaster -o www/node6 www/node
    or
  # portupgrade -o www/node6 www/node
Comment 23 Adam Weinberger freebsd_committer freebsd_triage 2016-12-07 23:48:02 UTC
If it's okay, I'd like to change that pkg line to:

pkg set -o www/node:www/node6

Doesn't rely on magic.
Comment 24 commit-hook freebsd_committer freebsd_triage 2016-12-07 23:55:26 UTC
A commit references this bug:

Author: adamw
Date: Wed Dec  7 23:54:57 UTC 2016
New revision: 428089
URL: https://svnweb.freebsd.org/changeset/ports/428089

Log:
  Remove www/node in preparation for moving node7 into its place.
  Update the CONFLICTS lines for the node ports at the same time.

  PR:		213948
  Approved by:	maintainer (Bradley T. Hughes)

Changes:
  head/www/node/
  head/www/node012/Makefile
  head/www/node4/Makefile
  head/www/node6/Makefile
  head/www/node7/Makefile
Comment 25 commit-hook freebsd_committer freebsd_triage 2016-12-07 23:57:29 UTC
A commit references this bug:

Author: adamw
Date: Wed Dec  7 23:56:57 UTC 2016
New revision: 428090
URL: https://svnweb.freebsd.org/changeset/ports/428090

Log:
  Move www/node7 to www/node, and add an entry for the move into
  MOVED. When node becomes node8 and node7 gets branched, the
  MOVED entry will need to be removed.

  PR:		213948
  Approved by:	maintainer (Bradley T. Hughes)

Changes:
  head/MOVED
  head/www/Makefile
  head/www/node/
  head/www/node/Makefile
  head/www/node7/
Comment 26 commit-hook freebsd_committer freebsd_triage 2016-12-08 00:00:34 UTC
A commit references this bug:

Author: adamw
Date: Thu Dec  8 00:00:09 UTC 2016
New revision: 428091
URL: https://svnweb.freebsd.org/changeset/ports/428091

Log:
  Add an entry to UPDATING about www/node becoming v7, and switching
  to www/node6 to stay on that LTS version.

  PR:		213948
  Submitted by:	maintainer (Bradley T. Hughes)

Changes:
  head/UPDATING
Comment 27 Adam Weinberger freebsd_committer freebsd_triage 2016-12-08 00:01:59 UTC
Okay I think we should be good here. I'm going to leave this PR open until you're satisfied that things are running correctly, Bradley.
Comment 28 Bradley T. Hughes freebsd_committer freebsd_triage 2016-12-09 13:02:18 UTC
Everything looks good to me. We can close this PR now :)