[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] Specfile changes



Kenneth Porter <shiva@xxxxxxxxxxxxxxx> writes:

> I'm attaching a diff of my spec for the latest snapshot. Changes are as
> follows:
>
> Package version is set to 2.0 and the snapshot string is appended to the
> release string, instead. This is because rpm-4.0.4-7x (Red Hat 7.2)
> complains that "-" is illegal in a version string. The release is set to
> 0 to clarify that it's a beta/pre-release, so the full release string is
> "0.20020910a". I'm not sure how to retrofit this back into
> leafnode.spec.in.

I might better get rid of the - and put 2.0.0.alpha20020910a or
something instead. That should satisfy RPM. Users that actually install
may have to use rpm -Uhv --oldpackage to install a newer alpha when they
update from a beta, but that's a minor annoyance.

> The rest of these should be easy to put in leafnode.spec.in:

Thanks. I did things slightly differently, particularly, programs should
be installed as root/root to prevent the programs from tampering with
themselves should a security bug be found later.

I just tried the new .spec file with RPM 3.0.6 and it worked (but I did
not try to run it when installed from RPM).

This is what a "COMPILED" .spec file looks like now. I'd be interested
if YOUR system compresses the man pages automatically (SuSE Linux 7.3
does) or if I must do it manually.


# DO NOT EDIT!
# leafnode.spec.  Generated from leafnode.spec.in by configure.

Version: 2.0.0.alpha20020910b
Summary: Leafnode - a leafsite NNTP server (version %version)
Summary(de): Leafnode - ein offline-Newsserver (Version %version)
Name: leafnode
Release: 0
Copyright: see COPYING
Group: Applications/News
Source: http://mandree.home.pages.de/leafnode/beta/leafnode-%version.tar.bz2

%define prefix      /usr
%define spooldir    /var/spool/news
%define confdir     /etc/leafnode
%define lockdir     /var/lock/news/fetchnews.lck
%define lockfile    %{lockdir}/fetchnews.lck
%define runas_user  news
%define runas_group news

# Distribution: ${DISTRIBUTION}
Buildroot: /var/tmp/leafnode-%version-buildroot/
Packager: Matthias Andree <matthias.andree@xxxxxx>
%description
Leafnode is a small NNTP server for leaf sites without permanent
connection to the internet. It supports a subset of NNTP and is able to
automatically fetch the newsgroups the user reads regularly from the
newsserver of the ISP.

%description -l de
Leafnode ist ein offline-Newsserver, der vor allem für den typischen
Einzelnutzer-Rechner ohne permanente Internetanbindung geeignet ist.
Leafnode bezieht automatisch die Newsgroups, die der oder die Nutzer
regelmäßig lesen, vom Newsserver des Providers.

%prep
%setup
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix --mandir=%_mandir \
 --with-spooldir=%spooldir\
 --sysconfdir=%confdir --with-lockfile=%lockfile \
 --with-runas-user=%{runas_user} --with-runas-group=%{runas_group}

%build
make

%install
# first clean out any prior aborted runs
[ "$RPM_BUILD_ROOT" != "/" ] && [ "x$RPM_BUILD_ROOT" != "x" ] && rm -rf $RPM_BUILD_ROOT
make  DESTDIR=$RPM_BUILD_ROOT install-strip

%files
%defattr(-,root,root)
%attr(640,root,root) %confdir/config.example
%attr(755,root,root) %{prefix}/bin/newsq
%attr(755,root,root) %{prefix}/sbin/applyfilter
%attr(755,root,root) %{prefix}/sbin/checkgroups
%attr(755,root,root) %{prefix}/sbin/leafnode
%attr(755,root,root) %{prefix}/sbin/rnews
%attr(755,root,root) %{prefix}/sbin/fetchnews
%attr(755,root,root) %{prefix}/sbin/texpire
%attr(775,%{runas_user},%{runas_group}) %dir %{lockdir}
%doc %_mandir/man1/*
%doc %_mandir/man5/*
%doc %_mandir/man8/*
%doc ChangeLog AUTHORS CREDITS FAQ INSTALL README TODO
%doc README.html
#%doc tools/*.pl
%attr(2755,%{runas_user},%{runas_group}) %spooldir

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ "x$RPM_BUILD_ROOT" != "x" ] && rm -rf $RPM_BUILD_ROOT

-- 
Matthias Andree

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list