[Mageia-dev] get-skype package for submission
Barry Jackson
zen25000 at zen.co.uk
Mon Jun 13 16:31:23 CEST 2011
On 13/06/11 13:24, Anssi Hannula wrote:
> On 12.06.2011 02:37, Barry Jackson wrote:
>> On 11/06/11 18:03, Anssi Hannula wrote:
>>>
>>> - Best to add a comment in the %post script to remind that any new files
>>> need to have a %ghost entry created.
>>> (btw: an alternative idea is to create a post-script and the filelist
>>> at the same time in a single for loop in %build/%install, so that
>>> the lists can never get out of sync as they are created from a single
>>> list; however, your current solution is adequate as well)
>>
>> Note added - keep it simple.
>>
>
> You added the note in the %files section, not in %post. The issue only
> happens if someone updates %post but not %files, so it doesn't make
> sense to put the reminder in %files :)
>
OK moved
>>> - You don't check for failures. If the mktemp call fails, you extract
>>> the tarball into /root etc.etc.. You need to check for failures on
>>> the mktemp/mkdir/cd commands (mktemp failure can be detected by
>>> checking if $newtmp string is empty), or alternatively run "set -e"
>>> to make the shell exit on failures (this leaves the tmpdir polluted,
>>> but it doesn't matter as much as it is an uncommon failure case and
>>> /tmp is cleaned periodically anyway).
>>
>> Added some checks - with clean-up of previously created dirs etc on fail.
>
>> mkdir %{mytmp}
>> [[ -d %{mytmp} ]] || exit 1
>> cd %{mytmp}
>
> cd is not guaranteed to work even if %mytmp exists. Add "|| exit 1".
>
OK - done.
>> cd ${tmpextdir}
>> tar jxf %{mytmp}/skype-%{version}.tar.bz2
>
> Same here...
>
> Well, actually these two aren't that serious, since they can't be
> exploited by non-root anyway. I'm somewhat ok with them, as long as your
> mentor is as well and no one else objects.
>
I need a mentor ;)
> Note that your "if ! [[ -d %{tmpdir} ]]; then" check is not 100%
> necessary, as %tmpdir not existing is unlikely and causes no side effects.
>
I added that as the dir is created by tar, so if the tarball had the
wrong content the dir may not be created with the correct name.
Unlikely as you say.
> Other nits:
> - Use better variable names- %mytmp, $tmpextdir, %tmpdir are confusing.
Changed to tmp_download_dir, tmp_extract_dir and tmp_skype_dir
> - The description starts with an empty line. Remove it.
Gone
>
I have started writing a script to generate the .txt files but can't
decide whether it should go as far as downloading the source from Skype
or simply be run on an extracted skype-<version> folder.
A first draft of this is attached.
I assume this would ultimately be added as a SOURCE file with notes in
the package.
Barry
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: get-skype.spec
URL: </pipermail/mageia-dev/attachments/20110613/2c715ab6/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: skype-txt-gen
URL: </pipermail/mageia-dev/attachments/20110613/2c715ab6/attachment-0001.ksh>
More information about the Mageia-dev
mailing list