[Momonga-devel.ja:01495] Re: foomatic-3.0.0beta1


nosanosaです。

[Momonga-devel.ja:01487]の小松さんのメールにしたがってcups-1.1.18-2m +
foomatic-3.0.0beta1 + foomatic-db-20030315を試してみました。

それでいくつか気づいたことを御報告します。

1. Samba経由での印刷

ドキュメント(/usr/share/doc/cups/sam.html)によると、Windowsにつながっ
たプリンターなどにsamba経由で印刷するにはデフォルトでは存在しない

/usr/lib/cups/backend/smb -> /usr/bin/smbspool

というシンボリックリンクが必要なようです。このリンクを張った後に
foomatic-configureの -c オプションにsmb://user:pass@server/sharenameの
形を指定して

# foomatic-configure -s cups -n lp9300 -c smb://user:pass@server/sharename -p Epson-LP-xx00 -d escpage

などとすることでプリンタを使えました。ドキュメントによるとこの書式は

   smb://workgroup/server/sharename
   smb://server/sharename
   smb://user:pass@workgroup/server/sharename
   smb://user:pass@server/sharename

のいずれでもよいようです。

このリンクをデフォルトでcupsパッケージに含めていただけたらと思います。
とりあえず、このリンクを含めるように修正したspecファイルとの差分
cups.spec.diffを添付しますので宜しくお願いします。m(_ _)m


2. Web browserでの設定

これは的外れかもしれませんが…

CUPSはウェブブラウザでhttp://localhost:631/にアクセスすることによって
も設定できるらしいのですが、実際に設定しようとするとModel/Driverのと
ころにほとんど種類がありません。(Driverは12種類のみ)

コマンドラインでもちゃんと設定できるのでウェブブラウザでのインターフェ
イスはなくてもいいのかもしれませんが、やっぱりこっちの方が楽そうだった
ので調べてみました。

で、ここに出てくるプリンターの種類は/usr/share/cups/model以下のppdファ
イルが反映されているようなのですが、このファイルはfoomatic,foomatic-db
と同じところにある

http://www.linuxprinting.org/download/foomatic/foomatic-filters-ppds-20030320.tar.gz

で配布されていて、これをインストールしてcupsを再起動してやることでサポー
トされているプリンタすべて?が選択できるようになって、例えばSamba経由
の場合は

Device で Windows Printer via SAMBA
Device URI で smb://user:password@server/sharename

とした後にプリンタのmakerとmodelを選ぶことでプリンタを設定できました。

それでこのフィルタをインストールするfoomatic-filters-ppds.specを作って
みましたので、一応、添付しておきます。
Red Hat 8ではこのフィルタがインストールされていて、インストール先が
/usr/share/cups/model/foomaticだったので、それに合わせてみました。

Red Hat 8ではこのフィルタはfoomaticのサブパッケージとしてcups-drivers
という名前で作られていました。foomatic-dbと同期していなければならない
ものならfoomatic-dbのサブパッケージになるべきもののような気もします。

ただ、RawHideの最新のfoomatic-2.0.2-15.src.rpmでは、このパッケージは作
られず

* Mon Oct 21 2002 Tim Waugh <twaugh@xxxxxxxxxx> 2.0.2-1
- 2.0.2.
- No longer need 67973, 970c patches.
- Remove cups-drivers-* packages (no longer needed).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Remove files not shipped.  Ship filter.conf.
- Conditionally restart cups.

ということなので、私がここでいっていることは全然時代遅れなのかもしれま
せん。^^;

なので、詳しい方々のフォローをお願いします。m(_ _)m

では。

===============================================================
	佐野雅之 sano@xxxxxxxxxxxxxxxxxxx
==============================================================
%define  ppdsdir %{_datadir}/cups/model/foomatic

Summary: all PPD files generated from the Foomatic database
Name:    foomatic-filters-ppds
Version: 20030320
Release: 0.0.1m
Group:   System Environment/Libraries
License: GPL
URL:     http://www.linuxprinting.org/
Source0: http://www.linuxprinting.org/download/foomatic/%{name}-20030320.tar.gz
Requires: foomatic cups
Buildroot: %{_tmppath}/%{name}-%{version}-root
Buildarch: noarch
#NoSource: 0

%description
This package contains all PPD files which can be generated from the
Foomatic database, the filter scripts needed to use the PPDs:
"foomatic-rip", "foomatic-gswrapper", and their man pages.

%prep
%setup -q

%build

%install
rm -rf %{buildroot}
./install -p %{_prefix} -d %{buildroot} -z

## fix install path
mkdir -p %{buildroot}%{ppdsdir}
mv %{buildroot}%{_datadir}/ppd/* %{buildroot}%{ppdsdir}

## remove files which confilict with foomatic
rm -rf %{buildroot}%{_bindir}/foomatic-rip
rm -rf %{buildroot}%{_mandir}/man1/foomatic-rip*

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYING  README 
%{_bindir}/*
%{_datadir}/*

%changelog
* Thu Mar 20 2003 Masayuki SANO <sano@xxxxxxxxxxxxxxxxxxx>
- (20030320-0.0.1m)
- build for Momonga Linux
? cups.spec.diff
Index: cups.spec
===================================================================
RCS file: /home/cvs/pkgs/cups/cups.spec,v
retrieving revision 1.6
diff -u -r1.6 cups.spec
--- cups.spec	20 Mar 2003 13:05:38 -0000	1.6
+++ cups.spec	20 Mar 2003 17:12:16 -0000
@@ -66,6 +66,9 @@
 
 make install BUILDROOT=%{buildroot}
 
+## make symbolic link for printing via samba
+ln -s /usr/bin/smbspool %{buildroot}%{_libdir}/cups/backend/smb
+
 mkdir -p %{buildroot}/%{_initscriptdir}
 cp %{buildroot}/etc/rc.d/init.d/cups %{buildroot}/%{_initscriptdir}
 cp %SOURCE1 %{buildroot}/etc/pam.d