Quantcast

License agreement in package installation

classic Classic list List threaded Threaded
4 messages Options
hce
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

License agreement in package installation

hce
Hi,

I need to add an interfactive license agreement to an RPM package when it is installed in Linux terminal (not GUI), it should display the license and asked whether the user agree or not. I noticed from cmake 2.8.8 document there is CPACK_RESOURCE_FILE_LICENSE may produce such process, am I right? If I am wrong, how can I make it work with cmake / cpack?

Thank you.

Kind regards,

Jupiter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: License agreement in package installation

Eric Noulard
2012/9/17 hce <[hidden email]>:
> Hi,
>
> I need to add an interfactive license agreement to an RPM package when it is
> installed in Linux terminal (not GUI), it should display the license and
> asked whether the user agree or not. I noticed from cmake 2.8.8 document
> there is CPACK_RESOURCE_FILE_LICENSE may produce such process, am I right?

This is the right way to do it but...

> If I am wrong, how can I make it work with cmake / cpack?

This is not supported by CPack RPM, we could include the license text
file as a %doc file but..

..it is usually a bad idea to include interactivity (i.e. install time
question) in an RPM,
because most of the time no-one will be there to answer it:

http://stackoverflow.com/questions/2132828/adding-license-agreement-in-rpm-package

(see licensing guidelines of RPM based distros as well:
 http://fedoraproject.org/wiki/Packaging/LicensingGuidelines
 http://wiki.mandriva.com/en/Policies/Licensing)

On Debian dpkg sometimes ask question but there is a mean to avoid
them of provide default answers in a 'non-interactive' way:
http://serverfault.com/questions/84521/automate-dpkg-reconfigure-tzdata


That said, with CPackRPM
you may use CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
see:
cpack --help-variable CPACK_RPM_PRE_INSTALL_SCRIPT_FILE

in order to launch a pre-install script that may ask a question.

An appropriate alternative would be to pop-up the license agreement at
some other point:
  - Before downloading the RPM
  - On the first run of the installed software
  - ...

--
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: License agreement in package installation

Andreas Mohr
In reply to this post by hce
Hi,

On Mon, Sep 17, 2012 at 12:00:03PM -0400, [hidden email] wrote:

> Date: Mon, 17 Sep 2012 04:59:28 -0700 (PDT)
> From: hce <[hidden email]>
> Subject: [CMake] License agreement in package installation
> To: [hidden email]
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=us-ascii
>
> Hi,
>
> I need to add an interfactive license agreement to an RPM package when it is
> installed in Linux terminal (not GUI), it should display the license and
> asked whether the user agree or not. I noticed from cmake 2.8.8 document
> there is CPACK_RESOURCE_FILE_LICENSE may produce such process, am I right?
> If I am wrong, how can I make it work with cmake / cpack?

"You don't." ;)
(as quoted from
http://stackoverflow.com/questions/1797455/how-to-put-license-agreement-in-spec-file-rpm
)
Eric mentioned another stackoverflow URL, too.

Note that shell archive (shar-style) package generators (STGZ, STBZ2 etc.)
do have a license acknowledge step, though.


If you do feel the urge to add this to an explicitly automation-capable
mechanism (e.g. RPM), then definitely make sure to check for
non-interactive shell environment, as Eric said.

Philosophically spoken you could say that since you need to prevent
non-interactive installs from getting blocked, this means that one user group
will be prompted, whereas another user group (with installation carried
out automatically) will not have any license acknowledgement step.
IOW, this strongly hints at RPM install step being the wrong place
to do such things.

HTH,

Andreas Mohr
--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
hce
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: License agreement in package installation

hce
In reply to this post by Eric Noulard
Thanks Eric and Andreas.

On 9/18/12, Eric Noulard <[hidden email]> wrote:

> 2012/9/17 hce <[hidden email]>:
>> Hi,
>>
>> I need to add an interfactive license agreement to an RPM package when it
>> is
>> installed in Linux terminal (not GUI), it should display the license and
>> asked whether the user agree or not. I noticed from cmake 2.8.8 document
>> there is CPACK_RESOURCE_FILE_LICENSE may produce such process, am I
>> right?
>
> This is the right way to do it but...
>
>> If I am wrong, how can I make it work with cmake / cpack?
>
> This is not supported by CPack RPM, we could include the license text
> file as a %doc file but..
>
> ..it is usually a bad idea to include interactivity (i.e. install time
> question) in an RPM,
> because most of the time no-one will be there to answer it:
>
> http://stackoverflow.com/questions/2132828/adding-license-agreement-in-rpm-package
>
> (see licensing guidelines of RPM based distros as well:
>  http://fedoraproject.org/wiki/Packaging/LicensingGuidelines
>  http://wiki.mandriva.com/en/Policies/Licensing)
>
> On Debian dpkg sometimes ask question but there is a mean to avoid
> them of provide default answers in a 'non-interactive' way:
> http://serverfault.com/questions/84521/automate-dpkg-reconfigure-tzdata
>
>
> That said, with CPackRPM
> you may use CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
> see:
> cpack --help-variable CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
>
> in order to launch a pre-install script that may ask a question.
>
> An appropriate alternative would be to pop-up the license agreement at
> some other point:
>   - Before downloading the RPM
>   - On the first run of the installed software
>   - ...
>
> --
> Erk
> Le gouvernement représentatif n'est pas la démocratie --
> http://www.le-message.org
>
--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Loading...