aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: Something big new in today's cvs?  (Read 8871 times)

Ryanlee

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 16
    • Wings of Mind
Something big new in today's cvs?
« on: December 10, 2005, 11:04:46 AM »

http://www.ed2k-serverboard.de/downloads/ihmselbst/rpm/SuSE/10.0/amule/cvs/

I download cvs rpms from there everyday. Most cvs rpms it's about 2.9M or 3.0M.But todays cvs aMule-CVS-20051210.i586-SuSE_10.0.rpm is 3.8M , so I guess there must be something new.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Something big new in today's cvs?
« Reply #1 on: December 10, 2005, 11:37:48 AM »

just lots of changes afaik
Logged

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Something big new in today's cvs?
« Reply #2 on: December 10, 2005, 12:04:08 PM »

Unfortunately, the src.rpm is missing... Maybe the packager just enabled some optional stuff that was disabled before.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Something big new in today's cvs?
« Reply #3 on: December 10, 2005, 12:30:52 PM »

Simply ask IhmSelbst, he's the one who creates the packages.
Logged

IhmSelbst

  • Full Member
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 220
    • http://www.ed2k-serverboard.de/
Re: Something big new in today's cvs?
« Reply #4 on: December 11, 2005, 12:34:23 AM »

Quote
Originally posted by Gerd78
Unfortunately, the src.rpm is missing... Maybe the packager just enabled some optional stuff that was disabled before.
yep. indeed, it is nothing secret or special or so, i just built it with enabled daemon (amuled) this time, because of several requests. ;) - the *.src.rpm is "missing" for lack of webspace. ;(


cu

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Something big new in today's cvs?
« Reply #5 on: December 11, 2005, 01:02:33 AM »

Quote
Originally posted by IhmSelbst
the *.src.rpm is "missing" for lack of webspace. ;(
You can mark the source tarball as "NoSource", then you will get a nosrc.rpm instead of src.rpm. nosrc.rpm is the same as src.rpm, but without the sources. This way, people can fetch the source from amule.hirnriss.net and rebuild your nosrc.rpm with it.

You probably have something like this:
Code: [Select]
Source0:      aMule-CVS-20051211.tar.bz2Simply modify it like this:
Code: [Select]
Source0:      aMule-CVS-20051211.tar.bz2
NoSource:     0
This instructs rpm to omit source number 0 from the src.rpm and create a nosrc.rpm instead.

Be careful: This might sound confusing, but it isn't. The "0" doesn't mean "false" as in "true/false", it refers to the number of the source that should be omitted.
Logged

IhmSelbst

  • Full Member
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 220
    • http://www.ed2k-serverboard.de/
Re: Something big new in today's cvs?
« Reply #6 on: December 11, 2005, 01:09:09 AM »

or with rpm -qip packagename.rpm (if addy is specified) ;)


cu

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Something big new in today's cvs?
« Reply #7 on: December 11, 2005, 01:11:01 AM »

Quote
Originally posted by IhmSelbst
or with rpm -qip packagename.rpm
This doesn't give the "real" information, i.e. the .spec file and the patches, if any.
Logged

IhmSelbst

  • Full Member
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 220
    • http://www.ed2k-serverboard.de/
Re: Something big new in today's cvs?
« Reply #8 on: December 11, 2005, 01:15:54 AM »

Quote
Originally posted by Gerd78
This doesn't give the "real" information, i.e. the .spec file and the patches, if any.
of course, it doesn´t, but, if specified, it gives the emailaddy of the maintainer. ;)


cu

IhmSelbst

  • Full Member
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 220
    • http://www.ed2k-serverboard.de/
Re: Something big new in today's cvs?
« Reply #9 on: December 11, 2005, 01:16:39 AM »

well, then i also have to upload the nosource.rpm anyway, instead of the src.rpm, eating webspace as well... ;(


cu

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Something big new in today's cvs?
« Reply #10 on: December 11, 2005, 01:24:24 AM »

Do you have any patches or extra sources (i.e. Source1, Source2 etc.) in your package? If not, the nosrc.rpm contains only the .spec file, so you can simply upload the .spec file and nothing else.

This way, people can use the .spec file as a starting point for their own adjustments which is "good practice" for all OSS apps (it's actually required by the GPL, although I don't know whether the aMule team really has a problem with publishing or not publishing it).

btw. If you need to save bandwidth and disk space, you can optimise everything for size. It works well and makes a real difference with aMule (ca. 25%).

You probably have something like this:
Code: [Select]
./configure \
   --enable-whatever
Or like this:
Code: [Select]
CFLAGS="$RPM_OPT_FLAGS" \
CXXFLAGS="$RPM_OPT_FLAGS" \
./configure \
   --enable-whatever
Use this instead:
Code: [Select]
CFLAGS="-Os" \
CXXFLAGS="-Os" \
./configure \
   --enable-whatever
The official Debian packages have been built like this for quite a long time and there were no complains, so there shouldn't be any problems.

EDIT: And you can save some extra 100 kB by stripping the binaries more aggressively. You probably have something like this:
Code: [Select]
make DESTDIR=$RPM_BUILD_ROOT install-stripor
Code: [Select]
make DESTDIR=$RPM_BUILD_ROOT install
strip $RPM_BUILD_ROOT%{_bindir}/*
Simply add these two lines after it:
Code: [Select]
strip -R .comment $RPM_BUILD_ROOT%{_bindir}/*
strip -R .note $RPM_BUILD_ROOT%{_bindir}/*
« Last Edit: December 11, 2005, 01:39:32 AM by Gerd78 »
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Something big new in today's cvs?
« Reply #11 on: December 11, 2005, 02:35:48 AM »

We can give you hosting if you REALLY need it.
Logged

IhmSelbst

  • Full Member
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 220
    • http://www.ed2k-serverboard.de/
Re: Something big new in today's cvs?
« Reply #12 on: December 12, 2005, 07:21:56 AM »

@Gerd78 (and all):
well, will check out the modifications next days.

"my" specfile is no secret at all, it is nearly the same as in the cvsversions (stolen):
Code: [Select]
%define cvsdate %(date +%Y%m%d)

Name: aMule
Summary: aMule - another eMule p2p client
Version: CVS
Release: %{cvsdate}.%{suserel}
License: GPL
Group: Applications/Internet/P2P

Source: aMule-%{version}-%{cvsdate}.tar.bz2
BuildRoot:   %{_builddir}/%{name}-%{version}-root
Packager: ihmselbst
Distribution: SUSE 9.3 (i586)
Prefix: /usr
Url: [URL]http://www.amule.org[/URL]
Vendor: The aMule Team ([URL]http://forum.amule.org/[/URL])
Provides:    %{name}

%description
aMule is a peer to peer file sharing client, based on the well known eMule.
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it the first multi-platform edonkey network client.

%pre
echo "************************************************************************************"
echo "Warning: This is a cvs release!"
echo "This release is made for testing purpose and it may cause several problems,"
echo "burn your house, kill your dog, etc, but it *should* be safe to use anyway."
echo "If you would like to test some of the great new features go on and install."
echo "Otherwise you may press ctrl-c within the next 15 seconds to abort the installation."
echo "This version reguires wxGTK-2.6.1.!"
echo "You can download a matching version from here:"
echo "http://www.ed2k-serverboard.de/downloads/ihmselbst/rpm/SuSE/9.3/"
echo -n "Waiting for user... "
for i in $(seq 15 -1 1); do
    echo -n "$i, "
    sleep 1
done
echo " 0, ok, here we go then... Muhahaha :), installing."

%prep
rm -rf $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT

#%setup -q
%setup -q -n amule-cvs

%build
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
./configure --prefix=%{prefix} --enable-kad-compile --enable-debug --enable-cas --enable-wxcas --enable-amuleweb --enable-amulecmd --enable-webserver --enable-webservergui --enable-alc --enable-alcc --disable-optimize
make -j 2

%install
make DESTDIR=$RPM_BUILD_ROOT install-strip

cd $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/file.list.%{name}
rm -rf $RPM_BUILD_DIR/file.list.%{name}.libs
rm -rf $RPM_BUILD_DIR/file.list.%{name}.files
rm -rf $RPM_BUILD_DIR/file.list.%{name}.files.tmp
rm -rf $RPM_BUILD_DIR/file.list.%{name}.dirs

%files

%defattr(-,root,root,0755)
%{_bindir}/amule
%{_bindir}/ed2k
%{_bindir}/amulecmd
%{_bindir}/alc
%{_bindir}/alcc
%{_bindir}/cas
%{_bindir}/wxcas
%{_bindir}/amuleweb
%{_libdir}/xchat/plugins/xas.pl
%{_datadir}/applications/*
%{_datadir}/locale/*
%{_datadir}/pixmaps/*
%{_prefix}/man/*/*
%dir %{_datadir}/doc/%{name}-%{version}
%doc %{_datadir}/doc/%{name}-%{version}/*
%dir %{_datadir}/cas
%{_datadir}/cas/*
%dir %{_datadir}/amule
%dir %{_datadir}/amule/webserver
%{_datadir}/amule/webserver/*


%changelog
* Mon Apr 19 2005 Marcelo Jimenez
- Removed curl dependency, aMule now uses wxHTTP.

* Mon Mar 26 2005 Marcelo Jimenez
- Added a distro test, so we know the distro.
- Tests for UTF-8 enabled LANG to use UTF-8 systray.

* Mon Mar 21 2005 Marcelo Jimenez
- Removed krb5-libs require and krb5-devel buildprereq. curl-lib and
curl-devel is enough.

* Tue Mar 08 2005 Marcelo Jimenez
- Made it work with cvs snapshots at their very same day.

* Wed Jun 16 2004 Ariano Bertacca
- added tool package.

* Sat May 22 2004 Ariano Bertacca
- added webserver package.

* Sun Mar 28 2004 Ariano Bertacca
- added libcryptopp to dependencies/BuildPreReq
- getting wx-config and wxbase-config from installed rpm to avoid problems
  with people using wxGTK-2.5.
  Idea taken from aMule-2.0.0rc1.spec done by
  deltaHF and
  pure_ascii

* Tue Feb 10 2004 Ariano Bertacca
- modified the BuildPreReq to satisfy amulecmd build requirements.

* Sat Jan 23 2004 Ariano Bertacca
- initial amule.spec release

the "%{suserel}" is in .rpmmacros:
Code: [Select]
# SuSE Release
%suserel        SuSE_10.0
(or SuSE_9.3 for the 9.3-version)

@Kry:
mni thx for the nice offer. :) - i´ll tell you, if it comes to the crunch.


cu

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Something big new in today's cvs?
« Reply #13 on: December 13, 2005, 12:25:53 AM »

A few notes:

This:
Code: [Select]
%prep
rm -rf $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT
is redundant because %prep does it automatically, simply use
Code: [Select]
%prepDo not use
Code: [Select]
Prefix: /usrbecause aMule is not relocatable (the paths for webserver HTML + GIF files and translations are hard-compiled in the executables). Instead, use
Code: [Select]
%define prefix /usrThis:
Code: [Select]
Provides: %{name}is redundant because a package always provides itself, simply delete it
This:
Code: [Select]
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
./configure --prefix=%{prefix} --enable-kad-compile ---enable-debug --disable-optimize
is nonsense because:

- --disable-optimize is overridden by RPM_OPT_FLAGS, remove one of them (you should remove --disable-optimize, see below)
- --enable-kad-compile does no longer exist, Kademlia is always compiled and cannot be disabled
- --enable-debug is useless if you strip the binaries because you compile the debug info which takes a lot of time and disk space just in order to strip it away later, so remove one of them (see below)

The other ./configure options are OK.

So you have to decide:

- whether to enable and keep debug info (no stripping) or disable it from the beginning on. You will probably want to disable it because otherwise the package will be 5 times larger.
- whether to enable or disable optimisation. You will probably want to enable it because disabling it is only useful for debugging, but debugging is only useful without stripping, so because you are using stripping, you can also use optimisation without any disadvantage.

This line:
Code: [Select]
cd $RPM_BUILD_ROOTdoes nothing, you can remove it

This:
Code: [Select]
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/file.list.%{name}
rm -rf $RPM_BUILD_DIR/file.list.%{name}.libs
rm -rf $RPM_BUILD_DIR/file.list.%{name}.files
rm -rf $RPM_BUILD_DIR/file.list.%{name}.files.tmp
rm -rf $RPM_BUILD_DIR/file.list.%{name}.dirs
looks very nonsensual because $RPM_BUILD_DIR is deleted anyway with the next build, so you can use this instead:
Code: [Select]
%clean
rm -rf $RPM_BUILD_ROOT
Your package will fail to build on x86_64 systems because of this:
Code: [Select]
%{_libdir}/xchat/plugins/xas.plIt's OK by itself, but you also have to add
Code: [Select]
--libdir=%{_libdir}to your ./configure line because otherwise xas.pl will end up in %{prefix}/lib which is different from %{_libdir} on x86_64 systems.

Furthermore, your package is not FHS compliant because it installs man pages to /usr/man. This is forbidden, so please add
Code: [Select]
--mandir=%{_mandir}to your ./configure line and change this
Code: [Select]
%{_prefix}/man/*/*to something like this:
Code: [Select]
%{_mandir}/*/*The package installs various directories without adding them to the %files list which results in these directories remaining on the user's systems after uninstalling the package. Try to avoid that. I see at least one such thing with the translations. You should also use the %find_lang macro to avoid that. Please google for "max-rpm.pdf".

And finally, the documentation is installed to a default directory specified in the makefiles, you should use dynamic macros instead. To do that, you can use
Code: [Select]
make DESTDIR=$RPM_BUILD_ROOT install-strip \
   docdir=%{_defaultdocdir}/%{name}
instead of just
Code: [Select]
make DESTDIR=$RPM_BUILD_ROOT install-stripThis will ensure that the documentation of your package is installed where all other packages install their documentation. If you do that, you must also change
Code: [Select]
%dir %{_datadir}/doc/%{name}-%{version}
%doc %{_datadir}/doc/%{name}-%{version}/*
to
Code: [Select]
%{_defaultdocdir}/%{name}in the %files list.

I'd recommend to look at some other people's .spec files (preferably ones from distros, not from third parties because the latter ones are often problematic). You will find a lot of useful conventions, style guides etc. in them. And "max-rpm.pdf" is a must-read.
« Last Edit: December 13, 2005, 12:31:08 AM by Gerd78 »
Logged

IhmSelbst

  • Full Member
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 220
    • http://www.ed2k-serverboard.de/
Re: Something big new in today's cvs?
« Reply #14 on: December 13, 2005, 06:44:16 AM »

thx for the hints.  :baby: :)
ahum, ok, the specfile is a bit elder somehow, (indeed, it is as old as the hills, see the  "--enable-kad-compile" - once the only possibility to get a kadversion.) i just forgot to keep it up-to-date. maybe it´s age-related, but i hope, it´s not Alzheimer's disease by now. but it worked, and perhaps, i simply became somewhat lazy...  :]

updated it a bit just now, according some of your suggestions, and must wait and see now, if it works with today´s cvs later on, or if i totally destroyed it instead. *g

have to to plough through the "max-rpm.pdf" now.


btw:
perhaps, someone should update the current cvs-specfile, too. - seems, as if it doesn´t include some minor changes, you posted above, too...  :))


cu


of course, i blowed up my suse10.0spec first, lol. so the rpm is up somewhat later today.
but, for some reason, the suse10.0rpm seems to have increased a bit, while the 9.3-version shrinked a little. will check this out asap, but must fly now. (the rl calls...) ;(


cu
« Last Edit: December 13, 2005, 07:52:30 AM by IhmSelbst »
Logged
Pages: [1] 2