[MacPorts] #57698: Travis: Use the normal MacPorts installer

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[MacPorts] #57698: Travis: Use the normal MacPorts installer

MacPorts
#57698: Travis: Use the normal MacPorts installer
----------------------------+---------------------
 Reporter:  ryandesign      |      Owner:  admin@…
     Type:  defect          |     Status:  new
 Priority:  Normal          |  Milestone:
Component:  server/hosting  |    Version:
 Keywords:                  |       Port:
----------------------------+---------------------
 For Travis, we currently use a custom MacPorts installer built
 specifically for Travis. This is an additional asset that needs to be
 produced every time we release a new version of MacPorts. (And it's not
 currently documented in the [browser:macports-
 base/portmgr/ReleaseProcess.md release process] how to do that.) It would
 be great if we could eliminate that requirement and have Travis use the
 normal MacPorts installer.

 From [browser:macports-base/.travis.yml@travis-ci .travis.yml], it looks
 like the differences between the regular MacPorts installer and the build
 for Travis are:

 * The Travis build is packaged as a .tar.bz2 instead of a .pkg

  From my point of view, there is no need for this difference. It's no
 problem to install a .pkg from the command line using the `installer`
 command.

 * The Travis build modifies the postflight script so that it does not run
 selfupdate

  It's a little more work, but the postflight script could be extracted
 from the pkg, modified, and put back into the pkg before installing the
 pkg. Better yet, maybe we can find a way (argument? environment variable?
 config file? subpackage?) to let the user running `installer` specify
 whether selfupdate should be run; this would benefit not only our Travis
 configuration but anybody else needing similar functionality.

 * The Travis build copies the postflight script into /opt/local; after
 extracting the tarball, [browser:macports-ports/_ci/bootstrap.sh
 bootstrap.sh] runs it and deletes it

  This would be unnecessary if it were a pkg since it would run
 automatically.

 * The Travis build copies the .tcl files into /opt/local

  I don't know why it does that. If there is a reason, perhaps it can be
 addressed another way.

 If the problem is that Travis doesn't know what version of the MacPorts
 installer to download, it could determine the current version by querying
 [browser:macports-base/config/RELEASE_URL].

--
Ticket URL: <https://trac.macports.org/ticket/57698>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57698: Travis: Use the normal MacPorts installer

MacPorts
#57698: Travis: Use the normal MacPorts installer
-----------------------------+---------------------
  Reporter:  ryandesign      |      Owner:  admin@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  server/hosting  |    Version:
Resolution:                  |   Keywords:
      Port:                  |
-----------------------------+---------------------

Comment (by ryandesign):

 In fact, Travis is currently using MacPorts 2.5.2, instead of the current
 version 2.5.4, because of this. That's not good.

--
Ticket URL: <https://trac.macports.org/ticket/57698#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57698: Travis: Use the normal MacPorts installer

MacPorts
In reply to this post by MacPorts
#57698: Travis: Use the normal MacPorts installer
-----------------------------+---------------------
  Reporter:  ryandesign      |      Owner:  admin@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  server/hosting  |    Version:
Resolution:                  |   Keywords:
      Port:                  |
-----------------------------+---------------------

Comment (by l2dy):

 It is documented in the [https://github.com/macports/macports-
 base/blob/master/portmgr/ReleaseProcess.md#make-the-release-available-for-
 pull-request-checks-on-travis-ci release process].

--
Ticket URL: <https://trac.macports.org/ticket/57698#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57698: Travis: Use the normal MacPorts installer

MacPorts
In reply to this post by MacPorts
#57698: Travis: Use the normal MacPorts installer
-----------------------------+---------------------
  Reporter:  ryandesign      |      Owner:  admin@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  server/hosting  |    Version:
Resolution:                  |   Keywords:
      Port:                  |
-----------------------------+---------------------

Comment (by l2dy):

 Replying to [ticket:57698 ryandesign]:
 >  From my point of view, there is no need for this difference. It's no
 problem to install a .pkg from the command line using the `installer`
 command.

 It was done to skip the selfupdate in the postflight script, which would
 download and extract base and ports into
 `/opt/local/var/macports/sources`.
 https://github.com/macports/macports-
 base/blob/15c064eb508ce0c9bb82c8cfb216cd36ad1895d8/.travis.yml#L17

 {{{
 - sed -i "" "s/-v selfupdate/version/" portmgr/dmg/postflight
 - sudo install portmgr/dmg/postflight /opt/local/
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/57698#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57698: Travis: Use the normal MacPorts installer

MacPorts
In reply to this post by MacPorts
#57698: Travis: Use the normal MacPorts installer
-----------------------------+---------------------
  Reporter:  ryandesign      |      Owner:  admin@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  server/hosting  |    Version:
Resolution:                  |   Keywords:
      Port:                  |
-----------------------------+---------------------

Comment (by ryandesign):

 Replying to [comment:2 l2dy]:
 > It is documented in the [https://github.com/macports/macports-
 base/blob/master/portmgr/ReleaseProcess.md#make-the-release-available-for-
 pull-request-checks-on-travis-ci release process].

 Oops, I didn't see that there, and I didn't realize that just doing that
 would automatically build and upload the new version to a place Travis
 could use it. Still, if that step weren't necessary, it would be simpler.

--
Ticket URL: <https://trac.macports.org/ticket/57698#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57698: Travis: Use the normal MacPorts installer

MacPorts
In reply to this post by MacPorts
#57698: Travis: Use the normal MacPorts installer
-----------------------------+---------------------
  Reporter:  ryandesign      |      Owner:  admin@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  server/hosting  |    Version:
Resolution:                  |   Keywords:
      Port:                  |
-----------------------------+---------------------

Comment (by ryandesign):

 Replying to [comment:3 l2dy]:
 > Replying to [ticket:57698 ryandesign]:
 > >  From my point of view, there is no need for this difference. It's no
 problem to install a .pkg from the command line using the `installer`
 command.
 >
 > It was done to skip the selfupdate in the postflight script

 Ok, so if we had a way of preventing selfupdate when using the pkg
 installer, we could use that?

--
Ticket URL: <https://trac.macports.org/ticket/57698#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57698: Travis: Use the normal MacPorts installer

MacPorts
In reply to this post by MacPorts
#57698: Travis: Use the normal MacPorts installer
-----------------------------+---------------------
  Reporter:  ryandesign      |      Owner:  admin@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  server/hosting  |    Version:
Resolution:                  |   Keywords:
      Port:                  |
-----------------------------+---------------------

Comment (by l2dy):

 Replying to [comment:4 ryandesign]:
 > Oops, I didn't see that there, and I didn't realize that just doing that
 would automatically build and upload the new version to a place Travis
 could use it. Still, if that step weren't necessary, it would be simpler.

 We can merge the Travis configurations (in a new commit, not git-merge),
 but I'd suggest creating a new bintray account for uploading (currently
 using `l2dybot`). Travis CI supports deploying tags only: https://docs
 .travis-ci.com/user/deployment/#conditional-releases-with-on.

--
Ticket URL: <https://trac.macports.org/ticket/57698#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57698: Travis: Use the normal MacPorts installer

MacPorts
In reply to this post by MacPorts
#57698: Travis: Use the normal MacPorts installer
-----------------------------+---------------------
  Reporter:  ryandesign      |      Owner:  admin@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  server/hosting  |    Version:
Resolution:                  |   Keywords:
      Port:                  |
-----------------------------+---------------------

Comment (by l2dy):

 Replying to [comment:5 ryandesign]:
 > Replying to [comment:3 l2dy]:
 > > Replying to [ticket:57698 ryandesign]:
 > > >  From my point of view, there is no need for this difference. It's
 no problem to install a .pkg from the command line using the `installer`
 command.
 > >
 > > It was done to skip the selfupdate in the postflight script
 >
 > Ok, so if we had a way of preventing selfupdate when using the pkg
 installer, we could use that?

 Sure. That's the only reason preventing us from using the pkg installers.

--
Ticket URL: <https://trac.macports.org/ticket/57698#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57698: Travis: Use the normal MacPorts installer

MacPorts
In reply to this post by MacPorts
#57698: Travis: Use the normal MacPorts installer
-----------------------------+---------------------
  Reporter:  ryandesign      |      Owner:  admin@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  server/hosting  |    Version:
Resolution:                  |   Keywords:
      Port:                  |
-----------------------------+---------------------

Comment (by ryandesign):

 Replying to [comment:6 l2dy]:
 > We can merge the Travis configurations (in a new commit, not git-merge),
 but I'd suggest creating a new bintray account for uploading (currently
 using `l2dybot`). Travis CI supports deploying tags only: https://docs
 .travis-ci.com/user/deployment/#conditional-releases-with-on.

 I don't understand the issues you're talking about, but we do have a
 "macports" account at Bintray that's not currently being used for
 anything.

--
Ticket URL: <https://trac.macports.org/ticket/57698#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57698: Travis: Use the normal MacPorts installer

MacPorts
In reply to this post by MacPorts
#57698: Travis: Use the normal MacPorts installer
-----------------------------+---------------------
  Reporter:  ryandesign      |      Owner:  admin@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  server/hosting  |    Version:
Resolution:                  |   Keywords:
      Port:                  |
-----------------------------+---------------------

Comment (by l2dy):

 Replying to [comment:7 l2dy]:
 > Replying to [comment:5 ryandesign]:
 > > Replying to [comment:3 l2dy]:
 > > > Replying to [ticket:57698 ryandesign]:
 > > > >  From my point of view, there is no need for this difference. It's
 no problem to install a .pkg from the command line using the `installer`
 command.
 > > >
 > > > It was done to skip the selfupdate in the postflight script
 > >
 > > Ok, so if we had a way of preventing selfupdate when using the pkg
 installer, we could use that?
 >
 > Sure. That's the only reason preventing us from using the pkg
 installers.

 And of course, the bootstrap.sh script in macports-ports has to be
 modified to auto-discover the current version.

--
Ticket URL: <https://trac.macports.org/ticket/57698#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57698: Travis: Use the normal MacPorts installer

MacPorts
In reply to this post by MacPorts
#57698: Travis: Use the normal MacPorts installer
-----------------------------+---------------------
  Reporter:  ryandesign      |      Owner:  admin@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  server/hosting  |    Version:
Resolution:                  |   Keywords:
      Port:                  |
-----------------------------+---------------------

Comment (by ryandesign):

 Replying to [comment:7 l2dy]:
 > > Ok, so if we had a way of preventing selfupdate when using the pkg
 installer, we could use that?
 >
 > Sure. That's the only reason preventing us from using the pkg
 installers.

 I'll see what I can do about adding this to the installer pkg. I have some
 ideas.

--
Ticket URL: <https://trac.macports.org/ticket/57698#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57698: Travis: Use the normal MacPorts installer

MacPorts
In reply to this post by MacPorts
#57698: Travis: Use the normal MacPorts installer
-----------------------------+---------------------
  Reporter:  ryandesign      |      Owner:  admin@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  server/hosting  |    Version:
Resolution:                  |   Keywords:
      Port:                  |
-----------------------------+---------------------

Comment (by l2dy):

 Replying to [comment:8 ryandesign]:
 > Replying to [comment:6 l2dy]:
 > > We can merge the Travis configurations (in a new commit, not git-
 merge), but I'd suggest creating a new bintray account for uploading
 (currently using `l2dybot`). Travis CI supports deploying tags only:
 https://docs.travis-ci.com/user/deployment/#conditional-releases-with-on.
 >
 > I don't understand the issues you're talking about, but we do have a
 "macports" account at Bintray that's not currently being used for
 anything.

 I'd like to use a more "official" account for uploading, e.g.
 `macportsbot`. `macports` on Bintray is currently an organization, not a
 user, and only users can have API keys to put into `.travis.yml` (with
 encryption).

--
Ticket URL: <https://trac.macports.org/ticket/57698#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS