Skip to content

OpenPrinting/foomatic-db-webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to setup openprinting site and database from bazaar branch
==============================================================

1) Copy the whole contents of the site branch to a folder where it is going to 
be located I.e.,

  # cp printing-new/* /srv/www/openprinting/

2) Install the bzr and build-essential packages if you have not done so yet.

3) Install Foomatic into the setup:

  # export WORKDIR=/srv/www/openprinting/foomatic
  # cd $WORKDIR
  # bzr branch http://bzr.linuxfoundation.org/openprinting/foomatic/foomatic-db-engine
  # bzr branch http://bzr.linuxfoundation.org/openprinting/foomatic/foomatic-db
  # bzr branch http://bzr.linuxfoundation.org/openprinting/foomatic/foomatic-db-nonfree
  # cd foomatic-db-engine
  # ./make_configure
  # ./configure
  # make inplace
  # cd ../..

4) Install a secondary copy of Foomatic for maintaining pre-built ppd files:

  # export WORKDIR=/srv/www/openprinting/ppd/foomatic
  # mkdir -p $WORKDIR
  # cd $WORKDIR
  # bzr branch http://bzr.linuxfoundation.org/openprinting/foomatic/foomatic-db-engine
  # bzr branch http://bzr.linuxfoundation.org/openprinting/foomatic/foomatic-db
  # bzr branch http://bzr.linuxfoundation.org/openprinting/foomatic/foomatic-db-nonfree
  # cd foomatic-db-engine
  # ./make_configure
  # ./configure
  # make inplace
  # ./foomatic-compiledb -j 4 -t ppd -f -d $WORKDIR/ppd/ppd-files
  # cd ../../..

5) Create "inc/siteconf.php" configuration file for the site. You can use
siteconf-DEV.php or siteconf-PROD.php as a basis. In that file you should set
access parameters for the MySQL database, mail addresses and some other settings.

6) Edit the "build" script - set BASEDIR variable at the top of the script to the actual directory where the site is located

7) Launch the build script:

  # ./build

Note that this script uses inc/siteconf.php to create mysql.conf file for
foomatic.

8) If you want to create openprinting database from scratch, launch setupdb.sh
script from the maint/scripts folder:

  # cd maint/scripts
  # ./setupdb.sh


Note that setupdb.sh uses inc/siteconf.php to get database access parameters.

9) Now you can populate the database using the data from bzr using
"importfrombzr" script which tries to parse printer xml files and load them
to the database. Let's try to import everything from foomatic-db and
foomatic-db-nonfree:

  # export WORKDIR=/srv/www/openprinting/foomatic

  # revno=`cd $WORKDIR/foomatic-db && bzr revno`
  # maint/scripts/importfrombzr $WORKDIR/foomatic-db 1 $revno

  # revno=`cd $WORKDIR/foomatic-db-nonfree && bzr revno`
  # maint/scripts/importfrombzr $WORKDIR/foomatic-db-nonfree 1 $revno

10) The next step is setting up the management for printer driver querying.
Install snap on your system and ensure it is running. Additionally install
mailx for automatic reporting of information related to this feature.

11) Create "snap/papp_list_recipient.txt". Each line of this file should be
one email address which will receive updates about new potential printer
applications in the snap store as well as any errors reported by the querying
scripts.

12) Modify "snap/error-report.sh" and "snap/printer-app-check.sh" to change
the sender email from "nobody@osuosl.org" to one owned by you and attached
to your mail relay.

13) Create "snap/printer-apps.txt". Each line of this file should be the name
of a printer application found on the snap store that you wish to have
installed for use in printer driver querying. These should be in priority
order. If desired, each line can additionally have a second application name
that specifies the actual binary name to be called.

Example:

  # cat snap/printer-apps.txt
    hplip-printer-app hplip-printer-app
    gutenprint-printer-app

The first "hplip-printer-app" is the name of the application on the snap store.
The second on the same line is the actual snap binary that will be called. If
there is no need to specify separate snap store name and binary name, then
only one name needs to be specified.

14) Create cron jobs to run the following:

  snap/cache-check.sh          Checks if the output cache has been invalidated,
                               and if so clears the cache.
  snap/error-report.sh         Reports errors periodically via email.
  snap/printer-app-check.sh    Checks the snap store for new printer apps,
                               reports the new apps via email.
  snap/update-printer-apps.sh  Ensures the desired printer apps are installed
                               and in the correct state.

======
That's all. Now you should be able to access your copy of the openprinting site.

About

OpenPrinting printer support database - web app of OpenPrinting web site

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published