Gerard Beekmans wrote: >> Both RPM and Debian package managers require writing a set of control files >> in >> order to create a package. Although it is possible to write dummy files >> containing only packaging information for pre-built files (and no building >> instructions), this is not how these tools are supposed to be used. I.e., I >> strongly object to this severe lobotomization. In this case, a simpler >> package > > Can you elaborate what you mean by all that? I'm not following.
Sure. Compare this: 1) fully functional spec file for Lynx (from Fedora), that specifies both build and packaging instructions: > Summary: A text-based Web browser > Name: lynx > Version: 2.8.6 > Release: 13%{?dist} > License: GPL > Group: Applications/Internet > Source: http://lynx.isc.org/current/lynx%{version}.tar.bz2 > URL: http://lynx.isc.org/ > Patch0: lynx-2.8.6-redhat.patch > Patch1: lynx-crash.patch > Patch2: lynx-2.8.6-options.patch > Patch3: lynx-2.8.6-backgrcolor.patch > Patch4: lynx-2.8.6-fmt_string.patch > Requires: indexhtml > Provides: webclient > Provides: text-www-browser > BuildRequires: openssl-devel, pkgconfig, ncurses-devel >= 5.3-5, > BuildRequires: slang-devel, zlib-devel, gettext, rsh, telnet, zip, unzip > Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) > > %description > Lynx is a text-based Web browser. Lynx does not display any images, > but it does support frames, tables, and most other HTML tags. One > advantage Lynx has over graphical browsers is speed; Lynx starts and > exits quickly and swiftly displays webpages. > > %prep > %setup -q -n lynx2-8-6 > %patch0 -p1 -b .redhat > %patch1 -p1 -b .crash > %patch2 -p1 -b .opt > %patch3 -p1 -b .bgcol > %patch4 -p1 -b .fmt_string > perl -pi -e > "s,^HELPFILE:.*,HELPFILE:file://localhost/usr/share/doc/lynx-%{version}/lynx_help/lynx_help_main.html,g" > lynx.cfg > perl -pi -e > "s,^DEFAULT_INDEX_FILE:.*,DEFAULT_INDEX_FILE:http://www.google.com/,g" > lynx.cfg > perl -pi -e 's,^#LOCALE_CHARSET:.*,LOCALE_CHARSET:TRUE,' lynx.cfg > > %build > export PATH=`pwd`:$PATH > cat >gcc <<EOF > #!/bin/sh > ARGS="" > while [ \$# != 0 ]; do > if [ \$1 != "-I/usr/include" -a \$1 != "-I/usr/include/" ]; then > ARGS="\$ARGS \$1" > fi > shift > done > exec /usr/bin/gcc \$ARGS > EOF > chmod 0755 gcc > CFLAGS="-ggdb $RPM_OPT_FLAGS -DNCURSES -DNCURSES_MOUSE_VERSION" ; export > CFLAGS > CXXFLAGS="-ggdb $RPM_OPT_FLAGS -DNCURSES -DNCURSES_MOUSE_VERSION" ; export > CXXFLAGS > if pkg-config openssl ; then > CPPFLAGS=`pkg-config --cflags openssl` ; export CPPFLAGS > LDFLAGS=`pkg-config --libs-only-L openssl` ; export LDFLAGS > fi > %configure --libdir=/etc \ > --with-screen=ncursesw --enable-warnings \ > --enable-default-colors --enable-externs \ > --enable-internal-links --enable-nsl-fork \ > --enable-persistent-cookies --enable-prettysrc \ > --disable-font-switch --enable-source-cache \ > --enable-kbd-layout --with-zlib \ > --enable-charset-choice --enable-file-upload \ > --enable-cgi-links --enable-read-eta \ > --enable-addrlist-page --enable-cjk \ > --enable-justify-elts --enable-scrollbar \ > --enable-libjs --enable-cgi-links --enable-nls \ > --enable-ipv6 \ > --enable-locale-charset \ > --enable-japanese-utf8 \ > --with-ssl=%{_libdir} > make %{?_smp_mflags} > > %install > rm -rf $RPM_BUILD_ROOT > chmod -x samples/mailto-form.pl > %makeinstall mandir=$RPM_BUILD_ROOT%{_mandir}/man1 libdir=$RPM_BUILD_ROOT/etc > # Install Lang dependent resources > mkdir -p $RPM_BUILD_ROOT/usr/share/locale/ja/LC_MESSAGES/ > > mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/applnk/Internet > > cat >$RPM_BUILD_ROOT%{_sysconfdir}/lynx-site.cfg <<EOF > # Place any local lynx configuration options (proxies etc.) here. > EOF > > %find_lang %{name} > > %clean > rm -rf $RPM_BUILD_ROOT > > %files -f %{name}.lang > %defattr(-,root,root,-) > %doc docs README INSTALLATION samples > %doc test lynx.hlp lynx_help > %{_bindir}/lynx > %{_mandir}/*/* > %config %{_sysconfdir}/lynx.cfg > %config(noreplace) %{_sysconfdir}/lynx.lss > %config(noreplace,missingok) %{_sysconfdir}/lynx-site.cfg > > %changelog <trimmed> 2) dummy spec file from LSB that packages a pre-built (using nALFS) Lynx: > Summary: A text-based Web browser. > Name: lsb-lynx > Version: 2.8.6 > Release: 1.lsb3 > Vendor: Linux Foundation > Packager: Appbat Team <[EMAIL PROTECTED]> > License: GPL > Group: Appbat/browsers > Buildroot: %{pkgroot}/%{name} > AutoReqProv: no > PreReq: lsb >= 3.2 > > %description > LSB conforming version of lynx. Lynx is a text-based Web browser. Lynx > is added to the LSB Application Battery primarly to demonstrate the use > of the ncurses library. > > %pre > > %install > > %post > > %preun > > %postun > > %clean > > %files > > %attr ( - bin bin ) /opt/lsb/appbat >> So: given that we still can't agree on the set of features to implement, I >> propose LFS to never have any sort of PM, and those who disagree with this >> "no >> PM" policy should start a fork right now. > > We'll never agree. That's why we'll likely end up offering some options > but we can't support all the options in-house. That's why we provide a > set of known instructions - it the bootscripts are just a sample > implementation for people who don't want/need to come up with their own > boot scheme. Sometimes understanding the system is good enough. Same can > be said about the PM system. > > Most users in the end won't really care which system is used. As long as > there's something usable for them available to make life easier. > > We're not in decision phase yet. We're still in speccing out the various > methods and getting some concrete ideas what it would mean if we were to > pick one over the other. As far as I understand, the outcome was (roughly) that LFS needs to provide at least a no-PM and PM versions, with a well-known PM. And a requirement has been formulated that the commands must match between these two versions (thus ruling out %configure for RPM). Now Bruce wonders if we create a source RPM for each package. The answer (obvious from a sample implementation that has been posted already to this list, and from Dan's work) is that we don't create a source RPM, but a spec file indeed has to be created for each package. There is no way to use RPM without spec files. The second question (how to use a PM in LFS) is left unanswered, because of its inexact formulation. I don't see any other way for RPM except writing a spec file, running "rpm -bb" on it, and installing the resulting binary package with "rpm -i" onto one or more systems, and the same principle applies to every other DESTDIR-based package manager. -- Alexander E. Patrakov -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page