[Mageia-dev] get-skype package for submission

Anssi Hannula anssi.hannula at iki.fi
Sat Jun 11 19:03:10 CEST 2011


On 11.06.2011 19:13, Barry Jackson wrote:
> On 11/06/11 09:14, Anssi Hannula wrote:
> ---------snip---------
>> Probably the easiest way is to use a fixed location under
>> %{_localstatedir}/lib/%{name} for the tarball instead. Then you can use
>> mktemp locally in %post.
>>
>> Also, is there a need to use -q for mktemp?
>>
> 
> Thanks - that works fine and is certainly the least complicated way to
> do this. I could have created a script for use in %post while in %pre,
> but it would have made the spec harder to read.
> 
> I have dealt with all the points you raised in the attached spec which
> is working OK.
> Please dissect it and comment again if you see any blunders ;)
> 
> I will update the tar.gz in the bug report with this latest version.

OK, here goes :)

- I see you didn't get what I meant with the versionized filelist files.
  The idea was that if someone updates the package to a new skype
  version, the rpmbuild process would fail if one didn't touch the
  filelist files.  With your changes such a failure doesn't happen.
  You need to use lang-%{version}.txt instead, so that when someone
  updates %version, it will automatically start failing until the lang
  list file is updated/moved.

- 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)

- Why define %tmpextdir instead of using $newtmp directly? Quite
  confusing as %variables are defined at build-time while $variables
  at run-time.

- 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).

- Dot in Summary.

- Noarch seems wrong to me.

-- 
Anssi Hannula


More information about the Mageia-dev mailing list