Okay, it took me most of the day to make sure I fixed this properly. I actually had a similar problem yesterday when building 'gcal'.
First, the easy and fast solution to the problem is that you need to pass '--disable-desktop_icon' to the configure script (-e=--disable-desktop_icon or EXTRA_CONFIGS=--disable-desktop_icon in script).
You can avoid the long time for recompiling (if you haven't removed the build dirs) by cd into the SRC_DIR and run:
./configure --prefix=/usr --disable-desktop_icon
Then, go back to where you ran src2pkg from and run it with the same command but add:
--resume=fake_install to the options.
It took me a long time because, first of all I had to compile and install wxwidgets-2.8 -that took over two hours. Then codelite needed nearyl two hours to build as well.
Meanwhile I used the shorter gcal build to come up with the best fix for the problem. You may have noticed that src2pkg warned you about the package containing your $HOME directory (if you are using the latest src2pkg-1.9.9). But it still allowed the build to continue.
What I have done is had src2pkg marks this and similar errors as being fatal and the build is aborted instead of just warning. This meantadding a new option to the src2pkg.conf file which allows the default behaviour to be overridden when needed/wanted.
The reason you had this problem is because you were building the package as a normal user. Your $HOME dir was included in the package (from installing a codelite.desktop file). codelite has an 'evil' Makefile -but it is not the only one that does such things. the reason that your $HOME dir got its' perms changed is because, when running as a normal user, src2pkg uses an option to 'tar' which allows all the file ownerships and group to be changed to root. Usually, package content should all be owned by root, but that is not always the case. If you had built the package as 'root' the package would still have contained the directory /root -which should not be the case.
For gcal, I had to fix the problem with a patch to a Makefile.in, but codelite has the above-mentioned configure option which allows you to disable the installation of the dekstop file in your $HOME dir. It is still an 'evil' thing and the authors knew about it:
I found this in the configure script:
Code:
# The next 2 aren't in the Usage, but will prevent undesirable things from happening when e.g. making rpms
elif [ "$1" = "--disable-desktop_icon" ]; then
add_desktop_icon="no"
elif [ "$1" = "--disable-make_symlink" ]; then
make_symlink="no
Actually, I had already found the fix for it because I downloaded the fc rpm sources and lloked at the codelite.spec file which shows these options to configure:
--prefix=%{_prefix} --plugins-dir=%{_libdir}/%{name} --disable-debian --disable-desktop_icon --disable-make_symlink
After checking, it seems that the other options are not needed, only: --disable-desktop_icon
To finish, thanks very much for promptly reporting the problem and congratulations(?) for having reported the worst problem with src2pkg in its' five-year history! Your name fit in several times in the long entry for the fix to the ChangeLog of the next version. I hope you didn't get panicky when you got locked out of your $HOME!!
In answer to your last question, 'src2pkg -N tarball-name' generates a generic NAME.src2pkg.auto script ready for editing -be sure to change the name to drop the '.auto' part so it doesn't get 'clobbered'.
Thanks to Drew for alerting me to this thread!