WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] what is best way of getting EULA into a tcz?  (Read 3732 times)

aus9

  • Guest
[SOLVED] what is best way of getting EULA into a tcz?
« on: December 13, 2012, 08:01:33 PM »
hi

I intend to submit an tcz that has an EULA (end user license agreement)
its already a txt file
I know that I need to use /usr/local/tce.installed to create a script that will output the text onto the user's screen and then ask the end user to tab from disagree to agree.

How do I do that?

Alternatively, can anyone name an existing tcz that does this, so I can cheat off their /usr/local/tce.installed/filename script?

2) Do I create the file structure of the other files in nomal tcz structure or do I make the script take files from say
/tmp/unpack to their true positions once agreement has been confirmed

3) Is there any need for an audit trial that the user actually agreed?
--Do I need to create a file that has to be backed up in their .filetool.lst
------------------------------------------------------------------------------------------------------------------------
If I can find some kind soul to help my lack of coding skills, I can submit an EULA type tcz
Otherwise I might submit a "get a big file yourself to extract one file" tcz
---which I am thinking is not too smart

I already have a way to get the file....its the pepper flashplayer from Google Chrome.

I just need help in packaging it.

thanks for reading

trivia below----------------------
I looked at opera9....tce-load -i opera9 did not force me to read anything
ditto sun-jre7
YMMV

some funny EULA terms can be seen here
http://www.makeuseof.com/tag/10-ridiculous-eula-clauses-agreed/
« Last Edit: December 14, 2012, 07:53:10 AM by aus9 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11502
Re: what is best way of getting EULA into a tcz?
« Reply #1 on: December 13, 2012, 08:18:23 PM »
Hi aus9
Read the info file for  sun-jre.tcz

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: what is best way of getting EULA into a tcz?
« Reply #2 on: December 13, 2012, 08:51:00 PM »
I looked at opera9....tce-load -i opera9 did not force me to read anything

Quite sure opera would prompt for accepting EULA upon each startup when no profile present.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

aus9

  • Guest
Re: what is best way of getting EULA into a tcz?
« Reply #3 on: December 13, 2012, 09:21:47 PM »
Rich
I have been advised that user must actively agree, not sufficient to have in info file

tinypoodle

EEK I was expecting something to happen on download and install $ tce-load -i opera9

thanks for that

running
Code: [Select]
opera
EULA appears

so its not in the /usr/local/tce.installed/opera9 but somewhere else
I can't see it asking for /usr/local/share/opera/doc/license

I will have to go hunting later

I will re-look at sun-jre7 later as well
« Last Edit: December 14, 2012, 03:24:52 AM by aus9 »

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: what is best way of getting EULA into a tcz?
« Reply #4 on: December 13, 2012, 10:10:59 PM »
Asking for the EULA as part of the tce.installed script could be troublesome - what if I've got the extension in my onboot.lst?

You also almost definitely want to write out the user's acceptance to a file that can be backed up - Would you ask for the licence every time the user loads for the extension?

I would suggest just wrapping the binary in a script which checks and displays the EULA, but I don't think that would work for a browser plugin. One approach could be to copy some ideas from getflash.tcz? (A getpepperflash.tcz which has a script which checks the EULA and then creates the actual extension on the fly)

aus9

  • Guest
Re: what is best way of getting EULA into a tcz?
« Reply #5 on: December 14, 2012, 12:04:37 AM »
althalus

aah that explains why its not in the opera tce.installed script.

when I delete (dot)opera .....running opera recalls the EULA ....which is good.

but I lack the skills to know how create such.

I agree that what I might have is a script ....lets call it pepper
pepper goes in the menu and the desktop exec entry

it looks for (say) /home/tc/.pepper/agreed
--if found load the plugin
--otherwise call up aterm and redo the EULA
--when running the script....the text is displayed and the end user types "accept"
----------and so .pepper/agreed appears

I know how to write an if-then script but not how to get the output to get the input of the user

I lack the skills which is why I posted in the first place.

I did look at getFlash11 but AFAIK it does not compel any agreement  on the end user so did not pursue it.

I also lack html skills so opera9 may not be the best to cheat off either....as the EULA for opera calls up a web browser.

2) getFlash11 does contain file called ....libflashsupport.so

but I don't think the EULA for pepper allows me to reverse engineer the plugin to a basic form
--luckily I don't have the skills even if the agreement did allow such

maybe I should post in the programming section to Linuxquestions to get the syntax?
« Last Edit: December 14, 2012, 12:20:13 AM by aus9 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11502
Re: what is best way of getting EULA into a tcz?
« Reply #6 on: December 14, 2012, 12:38:54 AM »
Hi aus9
Quote
I know how to write an if-then script but not how to get the output to get the input of the user
Enter this in a terminal:
Code: [Select]
popask Do you agree to these terms?If you click  Yes, it returns 1. If you click  No, it returns 0. You can call it from a script and test the return value.


aus9

  • Guest
Re: what is best way of getting EULA into a tcz?
« Reply #7 on: December 14, 2012, 03:27:25 AM »
Rich

ok just a quick test

Code: [Select]
aterm -e less EULA.txt && popask Do you agree to these terms?

b) I had to use less and not cat, to keep the window open and its a looooong agreement to read

c) My apols to everyone for my bad spelling but long is deliberate, others were not

aaah I have got the idea of popask, any text after popask is echoed......that is great to know

cool feature

d) Now is there an easy way to grab the return value?

maybe
http://linuxconfig.org/Bash_scripting_Tutorial  --reading user input?
« Last Edit: December 14, 2012, 03:49:29 AM by aus9 »

aus9

  • Guest
Re: what is best way of getting EULA into a tcz?
« Reply #8 on: December 14, 2012, 04:29:18 AM »
read function seems to be it, but I might eliminate the popask, so it becomes in crude terms
Code: [Select]
script starts aterm higher up
...
echo 'read the EULA then press q to quit'
aterm -e less EULA.txt ---> popup of new aterm with EULA appears
(user presses q to quit popup)
echo 'Do you accept the EULA? type  yes or no please'
read input
(user types yes or no)

$input is now defined and hopefully I can develop that further


Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: what is best way of getting EULA into a tcz?
« Reply #9 on: December 14, 2012, 04:42:22 AM »
Do you need a console application or application running in X environment? If so, make it in fltk. Easy to do, small, fast and fltk runtime is part of the graphical system.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

aus9

  • Guest
Re: what is best way of getting EULA into a tcz?
« Reply #10 on: December 14, 2012, 06:00:56 AM »
bmarkus

its a web browser plugin so X required but I solve that by having chromium-browser as the dependency of this new tcz, when it is build correctly

aus9

  • Guest
Re: what is best way of getting EULA into a tcz?
« Reply #11 on: December 14, 2012, 07:47:34 AM »
ok work-in-progress but heres the plan

no script in /usr/local/tce.installed as discussed
info file to alert user to run (/usr/local/bin/pepper-consent)....can be run at any time if they fancy
also there is a /usr/local/bin/pepper script which calls chromium-browser in a certain way
also a desktop entry...called  pepper with exec line of pepper

rough contents of consent is now
Code: [Select]
#!/bin/sh

if [ "$USER" == "root" ]; then
echo "Run as non-root please.  Exiting."
exit 1
fi

# set the local user to $THISUSER
THISUSER=`cat /etc/sysconfig/tcuser`

echo 'This plugin has an EULA that needs your consent'
echo 'if you use it, you grant consent as well'
echo 'after reading the agreement please close the browser'

/bin/sleep 6
chromium-browser /usr/local/share/doc/flash-pepper/eula_text.html

echo 'Do you accept the EULA? type  yes  or no   please'
read input

if [ $input != yes ] ; then
   echo 'agreement refused, exitting'
   else
   # clear away old junk and create new entry
    if [ -d /home/$THISUSER/.pepper ] ; then rm -r -f /home/$THISUSER/.pepper
           else mkdir /home/$THISUSER/.pepper && touch /home/$THISUSER/.pepper/agreed
            fi
fi

# if here, agreement confirmed
/usr/local/bin/pepper

I cheated off roberts for the root test and  I have been cheating off bmarkus for the rm -r -f in most of my tczs

Of course, I am to blame for any errors in my outputs.

2) The pepper script will seek out the file .pepper/agreed. I won't publish it here as this post was concerned only with how to get EULA working.

I will  unmark  [SOLVED]  if there are any issues that arise from my posts

thank you all for your input or patience, I am on a learning curve and am grateful for even negative comments (sometimes)  :-[
« Last Edit: December 14, 2012, 07:23:31 PM by aus9 »

aus9

  • Guest
Re: [SOLVED] what is best way of getting EULA into a tcz?
« Reply #12 on: December 14, 2012, 07:14:24 PM »
I have just realized that I can use roberts code from getFlash11 to set the local user, will adjust above code later
Code: [Select]
THISUSER=`cat /etc/sysconfig/tcuser`